【TINY4412】LINUX移植笔记:(11)以太网DM9621驱动

【TINY4412】LINUX移植笔记:(11)以太网DM9621驱动

宿主机 : 虚拟机 Ubuntu 16.04 LTS / X64
目标板[底板]: Tiny4412SDK - 1506
目标板[核心板]: Tiny4412 - 1412
LINUX内核: 4.12.0
交叉编译器: gcc-arm-none-eabi-5_4-2016q3
日期: 2017-8-1 19:20:22
作者: SY

简介

开发板使用的以太网芯片DM9621,基于USB接口,首先需要配置USB为主机模式。

Device Drivers  --->
    [*] Network device support  --->
        <*>   USB Network Adapters  ---> 
            <*>     Davicom DM96xx based USB 10/100 ethernet devices

测试

将开发板使用网线连接到路由器,将主机也连接到路由器

[root@TINY4412:/]# [    3.010109] usb 2-2.4: new high-speed USB device number 3 using exynos-ehci
[    3.160987] usb 2-2.4: config 1 interface 0 altsetting 0 endpoint 0x83 has an invalid bInterval 0, changing to 7
[    3.237598] usb 2-2.4: New USB device found, idVendor=0a46, idProduct=9621
[    3.237745] usb 2-2.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    3.250666] dm9601 2-2.4:1.0 eth0: register 'dm9601' at usb-12580000.ehci-2.4, Davicom DM96xx USB 10/100 Ethernet, 00:00:ff:ff:00:00
[    3.350251] usb 2-2.5: new high-speed USB device number 4 using exynos-ehci
[    3.501430] usb 2-2.5: New USB device found, idVendor=0424, idProduct=2530
[    3.501548] usb 2-2.5: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[    3.501664] usb 2-2.5: Product: Bridge device

可以观察到小灯已经闪烁,ping一下主机。

[root@TINY4412:/]# ping 192.168.2.40
PING 192.168.2.40 (192.168.2.40): 56 data bytes
ping: sendto: Network is unreachable
[root@TINY4412:/]# ifconfig
[root@TINY4412:/]# 

居然不能打印以太网配置信息,查资料是以太网没有配置IP地址

[root@TINY4412:/]# ifconfig eth0 192.168.2.39 netmask 255.255.255.0
[root@TINY4412:/]# ping 192.168.2.40
PING 192.168.2.40 (192.168.2.40): 56 data bytes
64 bytes from 192.168.2.40: seq=0 ttl=64 time=1.326 ms
64 bytes from 192.168.2.40: seq=1 ttl=64 time=0.664 ms
64 bytes from 192.168.2.40: seq=2 ttl=64 time=0.630 ms
64 bytes from 192.168.2.40: seq=3 ttl=64 time=0.604 ms
64 bytes from 192.168.2.40: seq=4 ttl=64 time=0.629 ms
64 bytes from 192.168.2.40: seq=5 ttl=64 time=0.683 ms
^C
--- 192.168.2.40 ping statistics ---
6 packets transmitted, 6 packets received, 0% packet loss
round-trip min/avg/max = 0.604/0.756/1.326 ms

每次开机都需要配置IP地址,网络才能工作。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值