五、 DM9000在Uboot2010.03上的移植
1)首先进入include/configs/修改smdk6410.h文件,屏蔽CS8900的相关宏定义同时添加DM9000AE的相关宏
#cd include/configs///
#gedit smdk6410.h //
smdk6410.h修改内容如下:
#define CONFIG_NET_MULTI 1
//#define CONFIG_CS8900 /* we have a CS8900 on-board */
//#define CONFIG_CS8900_BASE 0x18800300
//#define CONFIG_CS8900_BUS16 /* follow the Linux driver */
#define CONFIG_DRIVER_DM9000 1/* we have a DM9000AE on-board */
#define CONFIG_DM9000_BASE 0x18000300
#define DM9000_IO CONFIG_DM9000_BASE
#define DM9000_DATA (CONFIG_DM9000_BASE + 4)
#define CONFIG_DM9000_USE_16BIT
#define CONFIG_ETHADDR 10:23:45:67:89:ab
#define CONFIG_NETMASK 255.255.255.0
#define CONFIG_IPADDR 192.168.174.2 //开发板上的ip地址
#define CONFIG_SERVERIP 192.168.174.1//虚拟机上的ip地址
#define CONFIG_GATEWAYIP 192.168.174.6
#define CONFIG_DM9000_DEBUG//一定要加上否则会出现没有设置ipaddr的现象
2)修改net/eth.c,添加DM9000AE的初始化函数(红色部分为修改的地方):
int eth_initialize(bd_t *bis)
{
unsigned char env_enetaddr[6];
int eth_number = 0;
eth_devices = NULL;
eth_current = NULL;
show_boot_progress (64);
#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII)
miiphy_init();
#endif
/* Try board-specific initialization first. If it fails or isn't
* present, try the cpu-specific initialization */
if (board_eth_init(bis) < 0)
cpu_eth_init(bis);
#if defined(CONFIG_DB64360) || defined(CONFIG_CPCI750)
mv6436x_eth_initialize(bis);
#endif
#if defined(CONFIG_DB64460) || defined(CONFIG_P3Mx)
mv6446x_eth_initialize(bis);
#endif
#if defined(CONFIG_DRIVER_DM9000)
dm9000_initialize(bis);
#endif
if (!eth_devices) {
puts ("No ethernet found./n");
show_boot_progress (-64);
} else {
struct eth_device *dev = eth_devices;
char *ethprime = getenv ("ethprime");
show_boot_progress (65);
do {
if (eth_number)
puts (", ");
printf("%s", dev->name);
if (ethprime && strcmp (dev->name, ethprime) == 0) {
eth_current = dev;
puts (" [PRIME]");
}
eth_getenv_enetaddr_by_index(eth_number, env_enetaddr);
if (memcmp(env_enetaddr, "/0/0/0/0/0/0", 6)) {
if (memcmp(dev->enetaddr, "/0/0/0/0/0/0", 6) &&
memcmp(dev->enetaddr, env_enetaddr, 6))
{
printf ("/nWarning: %s MAC addresses don't match:/n",
dev->name);
printf ("Address in SROM is %pM/n",
dev->enetaddr);
printf ("Address in environment is %pM/n",
env_enetaddr);
}
memcpy(dev->enetaddr, env_enetaddr, 6);
}
eth_number++;
dev = dev->next;
} while(dev != eth_devices);
重新编译uboot,并下载uboot到nand flash中,重新启动开发板,观察打印信息如下,可以发现uboot已经能识别DM9000芯片:
使用ping指令进行测试如下:
至此,uboot已经能支持dm9000的网卡,可以使用tftp协议下载程序并在ram中运行了。
相关推荐
u-boot-2010.06移植到TQ2440,串口可以打印出东西,支持nor flash、nand flash、DM9000.
u-boot最新版本,支持更多的处理器,可以很方便的移植到你自己的开发板 平台。
u-boot-tiny6410.tar.gz支持sd卡启动,修改u-boot - mini6410 - 20101106.tar.gz而来,屡试不爽
TI的AM335X EVM板的Uboot源码u-boot-2011.09-psp04.06.00.08.tar.gz
u-boot-2011.03在TQ2440上的移植--最新uboot移植文档.
u-boot-1.1.6.tar.bz & u-boot-1.1.6_jz2440.patch
u-boot-2014.04-tq210,实现uboot初步移植,适用于S5PV210平台
赠送jar包:spring-boot-autoconfigure-2.3.12.RELEASE.jar; 赠送原API文档:spring-boot-autoconfigure-2.3.12.RELEASE-javadoc.jar; 赠送源代码:spring-boot-autoconfigure-2.3.12.RELEASE-sources.jar; 赠送...
u-boot-xlnx-xilinx-v2017.4.tar,zynq7000系列UBOOT源文件,可以使用petalinux进行编译。
赠送jar包:spring-boot-actuator-autoconfigure-2.3.12.RELEASE.jar; 赠送原API文档:spring-boot-actuator-autoconfigure-2.3.12.RELEASE-javadoc.jar; 赠送源代码:spring-boot-actuator-autoconfigure-2.3.12....
很多同学都喜欢学习嵌入式,但是个人觉得u-boot 可以很明显的体现个人的嵌入式水平。这里是u-boot-2013.01.tar.bz2的源代码。
现在网上已经有了u-boot-2012.04.01移植到TQ2440的过程,我也是看的别人的移植笔记,但是还是有些地方没有那么详细。所以细化了一下!给对u-boot移植不太熟悉的同学参考一下!
u-boot-2011.03在TQ2440上的移植文档,详细解答
u-boot-2011.03.tar.bz2
关于arm mini2440的U-Boot-2010.03移植详解
终于和linux内核一样通过图形界面配置 make menuconfig值得期待
嵌入式Linux之我行——u-boot-2009.08在2440上的移植详解.doc
u-boot 三星 s5pv210芯片
tekkamanninja opensource u-boot-2010.03_tekkaman for Friendly-ARM mini2440
u-boot-2017.09.tar.bz2 u-boot2017.09版本源码