linux-2.6.35核心移植—網卡驅動的移植

來源:互聯網
上載者:User

linux-2.6.35核心移植—網卡驅動的移植 一、移植環境:1、  Ubuntu 10.10發行版2、  u-boot.bin http://download.csdn.net/detail/baby_afu/44128263、  目標機:FS_S5PC100平台4、  交叉編譯器 arm-cortex_a8-linux-gnueabi-gcc---------------------------------------------------------------------
 二、移植步驟1、平台代碼修改$ vim arch/arm/mach-s5pc100/mach-smdkc100.c添加需要的標頭檔#if defined(CONFIG_DM9000)#include <linux/dm9000.h>#include <linux/irq.h>#endif  www.2cto.com  平台裝置的添加 /** 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,    },};#endif 平台裝置列表的添加#if defined(CONFIG_DM9000)    &s5pc100_device_dm9000,#endif   www.2cto.com   2、配置核心$ make menuconfig 網路設定 [*] Networking support(NEW) --->  Networking option --->    <*> Packet socket    <*> Unix domain socket    [*] TCP/IP networking    [*] IP: multicasting    [*] IP: kernel level autoconfiguration    [*] IP: BOOTP support 網上驅動配置[*] Device Drivers --->  [*] Network device support --->    [*] Ethernet(10 or 100Mbit) --->      <*> DM9000 support   www.2cto.com  網路檔案系統的配置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 --------------------------------------------------------------------- 三、編譯核心,並拷貝到tftpboot目錄下$ make zImage$ cp  arch/arm/boot/zImage  /tftpboot  啟動開發板,修改核心啟動參數,通過NFS方式掛載根檔案系統  作者 lr_ting

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.