Transplantation of linux-2.6.35 kernel-NIC driver
Last Update:2014-06-05
Source: Internet
Author: User
Linux-2.6.35 Kernel Porting & mdash; Nic Driver porting I. porting environment: 1. Ubuntu10.10 Release 2. u-boot.binhttp: // others... linux-2.6.35 kernel transplantation-NIC driver transplantation I. porting environment: 1. Ubuntu 10.10 release 2. u-boot.bin http://download.csdn.net/detail/baby_afu/44128263. target machine: FS_S5PC100 platform 4. cross compiler arm-cortex_a8-linux-gnueabi-gcc ---------------------------------------------------------------------
2. porting step 1. platform code modification $ vim arch/arm/mach-s5pc100/mach-smdkc100.c add the required header file # if defined (CONFIG_DM9000) # include # Include # Endif www.2cto.com platform device addition/** DM9000 Support **/# if defined (CONFIG_DM9000) static struct resource dm9000_resources [] = {[0] = {. start = 0x88000000 ,. end = 0x88000000 + 0x3 ,. flags = IORESOURCE_MEM,}, [1] = {. start = 0x88000000 + 0x4 ,. end = 0x88000000 + 0x4 + 0x3 ,. flags = IORESOURCE_MEM,}, [2] = {. start = IRQ_EINT (10 ),. end = IRQ_EINT (10 ),. flags = IORESOURCE_IRQ | IRQ_TYPE_LEVEL_HIGH, },}; www.2cto.com static struct dm9000_plat_data s5pc100_dm9000_platdata = {. flags = DM9000_PLATF_16BITONLY ,. dev_addr [0] = 0x00 ,. dev_addr [1] = 0x00 ,. dev_addr [2] = 0x3e ,. dev_addr [3] = 0x26 ,. dev_addr [4] = 0x0a ,. dev_addr [5] = 0x00,}; static struct platform_device s5pc100_device_dm9000 = {. name = "dm9000 ",. id =-1 ,. num_resources = ARRAY_SIZE (dm9000_resources ),. resource = dm9000_resources ,. dev = {. platform_data = & s5pc100_dm9000_platdata, },}; # Add an endif platform device list # if defined (CONFIG_DM9000) & s5pc100_device_dm9000, # endif www.2cto.com 2. configure the kernel $ make menuconfig network configuration [*] Networking support (NEW) ---> Networking option ---> <*> Packet socket <*> Unix domain socket [*] TCP/IP networking [*] IP: multicasting [*] IP: kernel level autoconfiguration [*] IP: BOOTP support online driver configuration [*] Device Drivers ---> [*] Network device support ---> [*] Ethernet (10 or 100 Mbit) ---> <*> DM9000 support www.2cto.com Network File system configuration File systems ---> [*] Network File Systems ---> <*> NFS client support [*] NFS client support for NFS version 3 [*] NFS client support for the NFSv3 ACL protocol extension [*] Root file system on NFS ----------------------------------------------------------------- 3. Compile the kernel, copy the file to the $ make zImage $ cp arch/arm/boot/zImage/tftpboot startup Development Board in the tftpboot Directory, modify the kernel startup parameters, and mount the root file system author lr_ting in NFS mode.