[tiny4412][kernel]tiny4412 Linux4.4 DM9621网卡移植

硬件:
    核心板  : Tiny4412-1306-Schematic
    底板    : Tiny4412SDK-1308(没有micro USB)其他都一样

参考博客:https://www.cnblogs.com/pengdonglin137/p/5153794.html

在此感谢前辈分享。

代码已上传至github上管理。https://github.com/Jason543716996/tiny4412.git

[root@tiny4412 ]# dmesg | grep 4640
[    2.115931] usb4640 usb-hub: switched to HUB mode
[    2.120273] usb4640 usb-hub: usb4640_probe: probed in hub mode

查看网卡信息:

[root@tiny4412 ]# ifconfig eth0 192.168.1.11
[  158.178888] dm9601 2-1.4:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xC1E1
[root@tiny4412 ]# ifconfig
eth0      Link encap:Ethernet  HWaddr FA:CE:C7:57:3F:AE  
          inet addr:192.168.1.11  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::f8ce:c7ff:fe57:3fae%2067552/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:160 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:12359 (12.0 KiB)  TX bytes:592 (592.0 B)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1%2067552/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  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:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

接下来通过NFS文件系统来启动,方便以后调试。

配置bootcmd:

setenv bootcmd "fatload mmc 1 0x40000000 uImage;fatload mmc 1 0x42000000 exynos4412-tiny4412.dtb;bootm 0x40000000 - 0x42000000"

配置bootargs:

setenv bootargs 'root=/dev/nfs rw nfsroot=192.168.1.12:/home/jason/work/rootfs ethmac=1C:6F:65:34:51:7E ip=192.168.1.11:192.168.1.12:192.168.1.1:255.255.255.0::eth0:off console=ttySAC0,115200 init=/linuxrc'; 

192.168.1.12为服务器IP

192.168.1.11为tiny4412的IP

log为:

[    2.890113] dm9601 2-1.4:1.0 eth0: register 'dm9601' at usb-12580000.ehci-1.4, Davicom DM96xx USB 10/100 Ethernet, 1c:6f:65:34:51:7e
[    3.278368] dm9601 2-1.4:1.0 eth0: link down
[    3.282816] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    5.139377] dm9601 2-1.4:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xC1E1
[    5.140356] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    5.151004] dm9601 2-1.4:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xC1E1
[    5.155926] IP-Config: Complete:
[    5.156028]      device=eth0, hwaddr=1c:6f:65:34:51:7e, ipaddr=192.168.1.11, mask=255.255.255.0, gw=192.168.1.1
[    5.156194]      host=192.168.1.11, domain=, nis-domain=(none)
[    5.156523]      bootserver=192.168.1.12, rootserver=192.168.1.12, rootpath=
[    5.165398] ALSA device list:
[    5.166498]   No soundcards found.
[    5.564475] VFS: Mounted root (nfs filesystem) on device 0:14.
[    5.565675] devtmpfs: mounted
[    5.566650] Freeing unused kernel memory: 432K (c0798000 - c0804000)
[   14.825164] nfs: server 192.168.1.12 not responding, still trying
[   18.825170] nfs: server 192.168.1.12 not responding, still trying
[   18.871067] nfs: server 192.168.1.12 OK
[   21.113181] nfs: server 192.168.1.12 OK

Please press Enter to activate this console. 

可以看看根文件系统大小:

[root@tiny4412 ]# df -h
Filesystem                Size      Used Available Use% Mounted on
192.168.1.12:/home/jason/work/rootfs
                         47.1G     39.2G      5.5G  88% /
devtmpfs                470.6M         0    470.6M   0% /dev
tmpfs                   502.8M         0    502.8M   0% /tmp

接下来适配SDMMC和EMMC,这样以后就可以直接在MMC上运行。

猜你喜欢

转载自blog.csdn.net/qq543716996/article/details/102545661