u boot1 1 6的移植 網絡卡支援

2021-05-17 12:31:21 字數 1645 閱讀 3988

注:藍色為修改部分!

driver/dm9000x.c中修改:

inteth_init(bd_t * bd)

//hj_end    //  

www.embedsky.net

*/printf("mac: %02x:%02x:%02x:%02x:%02x:%02x/n", bd->bi_enetaddr[0],

bd->bi_enetaddr[1], bd->bi_enetaddr[2], bd->bi_enetaddr[3],

bd->bi_enetaddr[4], bd->bi_enetaddr[5]);

for (i = 0, oft = 0x10; i < 6; i++, oft++)

dm9000_iow(oft, bd->bi_enetaddr[i]);

for (i = 0, oft = 0x16; i < 8; i++, oft++)

dm9000_iow(oft, 0xff);

// read back mac, just to be sure */

for (i = 0, oft = 0x10; i < 6; i++, oft++)

dm9000_dbg("%02x:", dm9000_ior(oft));

dm9000_dbg("/n");

// activate dm9000 */

dm9000_iow(dm9000_rcr, rcr_dis_long | rcr_dis_crc | rcr_rxen); // rx enable */

dm9000_iow(dm9000_imr, imr_par); // enable tx/rx interrupt mask */

return 0;}

driver/makefile裡修改:

cobjs  = dm9000x.o

include/configs/jzy2440.h

//* hardware drivers

*/#define config_driver_dm9000  1

#define config_dm9000_base  0x20000300

#define dm9000_io   config_dm9000_base

#define dm9000_data   (config_dm9000_base + 4)/*base+4  ;cmd接addr2*/

/*base+16;cmd接addr4*/

#define config_dm9000_use_16bit

#define config_bootdelay  1

#define config_bootargs  "noinitrd root=/dev/mtdblock2 init=/linuxrc console=ttysac0"

#define config_ethaddr   0a:1b:2c:3d:4e:5f

#define config_netmask   255.255.255.0

#define config_ipaddr   192.168.1.6

#define config_serverip   192.168.1.8

#define config_bootcommand  "nboot 0x32000000 0 0x50000; bootm 0x32000000"

u boot 1 1 6移植筆記(初級篇)

u boot版本 1.1.6 交叉編譯器 3.3.2 開發板 友善之臂mini2440 開發板配置 soc s3c2440 網絡卡 dm9000 nor flash am29lv160db 2m nand flash 256m sdram 64m 以原始檔已存在的 smdk2410專案為基礎進行移植...

UBOOT 1 1 6 錯誤集合

1.1.6的u boot老掉牙了,用版本高的編譯器編譯會出現莫名其妙的問題 實際是我不懂 usr local arm 4.4.3 bin lib gcc arm none linux gnueabi 4.4.3 libgcc.a udivsi3.o in function aeabi uidiv o...

U Boot 1 1 6的編譯過程

從頂層makefile說起 92行 mkconfig srctree mkconfig其中的mkconfig是乙個shell指令碼,srctree預設值為u boot的頂層目錄。117行 include objtree include config.mkinclude config.mk由92行的指...