1. 前言
通过USB2.0接口扩展一路百兆虚拟网口
2. 配置lan9500驱动
make ARCH=arm64 menuconfig

?
?
?开启LAN95XX驱动,编译进内核

保存内核配置
3. 编译内核
make ARCH=arm64 CROSS_COMPILE=aarch64-himix100-linux- uImage -j 20
cd ../../arm-trusted-firmware/arm-trusted-firmware
./mk.sh
cp fip.bin /tftp
4. 烧写内核
mw.b 0x42000000 0xff 0x900000
tftp 0x42000000 fip.bin
mmc write 0 0x42000000 0x800 0x4800
按照上面通过网口烧写
5.插上demo板
打印信息如下,已经检测到USB设备
# usb 1-1: new high-speed USB device number 4 using xhci-hcd
hub 1-1:1.0: USB hub found
hub 1-1:1.0: 3 ports detected
usb 1-1.1: new high-speed USB device number 5 using xhci-hcd
smsc95xx v1.0.5
smsc95xx 1-1.1:1.0 eth2: register 'smsc95xx' at usb-12300000.xhci_0-1.1, smsc95xx USB 2.0 Ethernet, 00:1e:c0:e0:f8:e5
查看虚拟网口 ifconfig -a

如上eth2即是多出来的虚拟网口
6. 配置虚拟网口
开启eth2 ifconfig eth2 up

开启正常
配置eth2 ip地址 IP地址配置成功

?ping服务器地址正常

|