参考博客:RK3568开发笔记-buildroot移远EC20模块调试记录
一、内核配置
cd 到kernel目录,执行make ARCH=arm64 menuconfig,
Device Drivers
>USB support
> USB Serial Converter support
选中 USB driver for GSM and CDMA modems选项,usb串口驱动内核配置如下截图所示:
sdk默认已选中。
Device Drivers
>Network device support
>USB Network Adapters
选中 QMI WWAN driver for Qualcomm MSM based 3G and LTE modems
sdk默认没选中,需要选择。然后点击save,最新的配置已保存到.config文件中了,需要将.config的内容覆盖编译所用的config文件,我编译所用的config文件为rockchip_linux_defconfig,那么执行cp .config arch/arm64/configs/rockchip_linux_defconfig
然后重新编译kernel。
二、测试
重新烧写boot.img,然后重启设备。
执行lsusb执行查看是否有id为2c7c:0125的设备:
[root@RK356X:/]# lsusb
Bus 005 Device 001: ID 1d6b:0002
Bus 003 Device 001: ID 1d6b:0001
Bus 001 Device 001: ID 1d6b:0002
Bus 005 Device 002: ID 2c7c:0125
Bus 006 Device 001: ID 1d6b:0003
Bus 004 Device 001: ID 1d6b:0001
Bus 002 Device 001: ID 1d6b:0002
执行ifconfig查看是否有wwan0网卡:
[root@RK356X:/]# ifconfig
eth0 Link encap:Ethernet HWaddr 8C:AE:49:61:00:6B
UP BROADCAST MULTICAST 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:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:35
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:58 errors:0 dropped:0 overruns:0 frame:0
TX packets:58 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3928 (3.8 KiB) TX bytes:3928 (3.8 KiB)
p2p0 Link encap:Ethernet HWaddr 16:F5:F9:87:0F:BE
UP BROADCAST MULTICAST 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:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
wlan0 Link encap:Ethernet HWaddr 14:F5:F9:87:0F:BE
UP BROADCAST MULTICAST 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:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
wwan0 Link encap:Ethernet HWaddr BE:F6:0A:C3:6E:E3
inet addr:169.254.14.152 Bcast:169.254.255.255 Mask:255.255.0.0
inet6 addr: fe80::f786:a01:d513:29c6/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:19 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:2656 (2.5 KiB)