嵌入式Linux教程:移植DM9000网卡

1,vi include/linux/dm9000.h
28行增加

unsigned char    param_addr[6];

2,复制 友善的 arch/arm/mach-s3c64xx/mach-mini6410.c 到相应目录下

3,vi drivers/net/dm9000.c

大概1586行
将mac_src = "platform data";
memcpy(ndev->dev_addr, pdata->dev_addr, 6);

改成

mac_src = "param data";
  memcpy(ndev->dev_addr, pdata->param_addr, 6);

大概1598行
增加
   if (!is_valid_ether_addr(ndev->dev_addr) && pdata != NULL) {
                mac_src = "platform data";
                memcpy(ndev->dev_addr, pdata->dev_addr, 6);
        }

4,make menuconfig
        [*] Networking support  --->
                Networking options  ---> 
               <*> Packet socket                                               
                 <*> Unix domain sockets 
                [*] TCP/IP networking
                  [*]   IP: kernel level autoconfiguration                      
                      [*]     IP: DHCP support                                       
                          [*]     IP: BOOTP support                                       
                      [*]     IP: RARP support
    Device Drivers  --->
        [*] Network device support  --->
            [*]   Ethernet (10 or 100Mbit)  --->
                 <*>   DM9000 support 
            [ ]   Ethernet (1000 Mbit)  --->   去掉
其他的默认  执行make 编译出来就可以了

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wysfyp.html