Hi,
I am working in LS1021-ATWR board with QorIQ SDK. I am verifying HDLC interface. I downloaded sethdlc source from https://mirrors.edge.kernel.org/pub/linux/utils/net/hdlc/ and build it for arm using arm-linux-gnueabihf-gcc sethdlc.c -o sethdlc command. when i run it in the board, am getting invalid argument error
root@ls1021-atwr:~# ifconfig hdlc0
hdlc0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
POINTOPOINT NOARP MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:16
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)root@ls1021-atwr:~# ./sethdlc hdlc0 hdlc
hdlc0: Unable to set HDLC protocol information: Invalid argument 22
root@ls1021-atwr:~# ./sethdlc hdlc0
hdlc0: interface e1 clock type unknown slotmap 10110010111000101101010000000001
no protocol set
root@ls1021-atwr:~#
Can someone help me to resolve this issue?
I have verified HDLC with QorIQ SDK 2.0 1703 images on LS1021ATWR, it worked normally, please refer to the following procedure.
Please configure Linux Kernel as the following.
Device Drivers --->
SOC (System On Chip) specific Drivers --->
[*] Freescale QUICC Engine (QE) Support
[*] Network device support --->
[*] Wan interfaces support --->
<*> Generic HDLC layer
<*> Raw HDLC support
<*> Freescale QUICC Engine HDLC support
On the target board:
root@ls1021atwr:~# ./sethdlc hdlc0 hdlc
root@ls1021atwr:~# ifconfig hdlc0 192.168.0.1 up
hdlc0: Carrier detected
root@ls1021atwr:~# ./sethdlc hdlc0
hdlc0: interface e1 clock type unknown slotmap 10101010010001011111010000000001
protocol hdlc nrz crc16-itu
root@ls1021atwr:~#
The attached are uImage, ls1021a-twr.dtb and sethdlc, you could use them to do verification on your target board.