Licheepi Zero Ethernet适配指南
一、U-Boot适配Ethernet#
U-Boot
2017已经支持了sun8i-emac的驱动,只需要在编译时选上并且修改dts就行。
- 进入u-boot源码目录:
- 选择 Device Drivers --->
- 选择 Network device support ---> 并选中 Allwinner Sun8i
Ethernet MAC support
- 修改dts
编译:
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-
烧写:
$ dd if=u-boot-sunxi-with-spl.bin of=${card} bs=1024 seek=8
使用Ethernet:
二、Kernel适配Ethernet#
目前Linux
4.12还没又对sun8i-emac进行支持,所以Kernel要使用V3s的以太网要打sun8i-emac的补丁还有修改dts文件。
- 打上sun8i-emac补丁:
拉下我已经适配好的内核源码:https://github.com/techping/linux/tree/licheepi-zero
- 修改dts(上面git仓库是已经修改完的):
- 进入内核目录:
- 选择 Device Drivers --->
- 选择 Network device support --->
- 选择 Ethernet driver support --->
- 选中 Allwinner sun8i EMAC support 和 Use dwmac-sun8i
bindings
- 编译
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-
得到 zImage 和 sun8i-v3s-licheepi-zero.dtb
- 烧写
将内核、dtb、rootfs刷入sd卡中,启动:
$ ifup eth0
eth0启动成功!
Ethernet驱动适配成功!
Related Issues not found
Please login GitHub to create issue