FL2440開發板安裝DM9000網絡卡支援

2021-09-22 20:19:05 字數 1770 閱讀 5497

1.修改核心**

首先cd 到核心**資料夾下,在命令列輸入以下命令

vim arch/arm/mach-s3c2440/mach-smdk2440.c
開啟mach-smdk2440.c檔案後在檔案頭插入標頭檔案

#include
然後插入以下**

#define dm9000_base    (s3c2410_cs4 + 0x300)  

static struct resource s3c_dm9000_resource = ,

[1] = ,

[2] =

};/*

* the dm9000 has no eeprom, and it's mac address is set by

* the bootloader before starting the kernel.

*/static struct dm9000_plat_data s3c_dm9000_pdata = ;

static struct platform_device s3c_device_dm9000 = ,

};

我看了很多人寫的部落格,大家都說在此文件中插入以上**,但是並沒有指出到底插入到什麼位置。經過自己嘗試的幾個位置後,發現這段**要放在

static struct platform_device *smdk2440_devices __initdata =;
這個結構體之前就可以了

*2.在static struct platform_device smdk2440_devices __initdata ={};這個結構體中插入&s3c_device_dm9000,這段**

static struct platform_device *smdk2440_devices __initdata = ;
3.在dm9000.h中新增標頭檔案

在以下路徑中開啟dm9000.**件

vim include/linux/dm9000.h
在其中插入標頭檔案

#include
重新make編譯核心燒錄到開發板上

4.在開發板上檢視網絡卡

在命令列輸入ifconfig命令檢視網絡卡資訊

eth0      link encap:ethernet  hwaddr 0a:38:f6:22:06:6d  

inet addr:192.168.1.155 bcast:192.168.1.255 mask:255.255.255.0

up broadcast multicast mtu:1500 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:1000

rx bytes:0 (0.0 b) tx bytes:0 (0.0 b)

interrupt:51 base address:0x4300

ifconfig eth0 192.168.0.xx

FL2440開發板Jlink操作

fl2440開發板主控晶元為s3c2440。h halt,停止cpu執行 j link hspeed 設定 j link的速率 j link speed 12000loadbin 從本地硬碟載入檔案到記憶體中去 sram和sdram j link loadbin d bin 0 載入bootstra...

fl2440開發板上移植dropbear的過程

背景 開發板fl2440與pc的securecrt連線的傳統方式是用串列埠轉usb線連線,但是我在使用的過程中發現串列埠轉usb線有時連線不穩定,另外串列埠也需要用於收發資料,所以我在開發板上移植 輕量級的ssh軟體dropbear,一根網線輕鬆解決開發板與securecrt連線,話不多說,進入正題...

控制fl2440開發板led燈亮滅,蜂鳴器發聲

led燈亮滅,蜂鳴器發聲是通過設定相應暫存器的值來控制的,主要有gpbcon gpbdat gpbup等,gpbcon有gpb0 10,每乙個gpbi設定不同的值來表示輸入輸出等,設定gpbdat的每一位表示高低電平,gpbup設定gpbi是否有效,通過對這三個暫存器的設定則可實現led燈和蜂鳴器。...