linux-2.6.34内核早已经发布,我就下载下来编译,基本没有太多的修改,只需要修该Makefile两行
ARCH ?= arm
CROSS_COMPILE ?= arm-linux- //这个是交叉编译工具
然后运行 make mini2440_defconfig
修改arch/arm/mach-s3c2440/mach-mini2440.c
+#include
static void __init mini2440_map_io(void)
{
+ unsigned int value; //tekkaman for dm9000
s3c24xx_init_io(mini2440_iodesc, ARRAY_SIZE(mini2440_iodesc));
s3c24xx_init_clocks(12000000);
s3c24xx_init_uarts(mini2440_uartcfgs, ARRAY_SIZE(mini2440_uartcfgs));
+
+//******************************tekkaman for dm9000********************************
+//config the bwscon for bank 4
+ value = __raw_readl(S3C2410_BWSCON);
+ value &= ~(S3C2410_BWSCON_WS4|
+ S3C2410_BWSCON_ST4|
+ S3C2410_BWSCON_DW4_32);
+ value |= (S3C2410_BWSCON_ST4|
+ S3C2410_BWSCON_DW4_16);
+ __raw_writel(value, S3C2410_BWSCON);
+
+//config the bankcon4
+ value = 0;
+ value = (S3C2410_BANKCON_Tacs4|
+ S3C2410_BANKCON_Tcos4|
+ S3C2410_BANKCON_Tacc14|
+ S3C2410_BANKCON_Tcoh4|
+ S3C2410_BANKCON_Tcah4|
+ S3C2410_BANKCON_Tacp6|
+ S3C2410_BANKCON_PMCnorm);
+ __raw_writel(value,S3C2410_BANKCON4);
+
+//config the irq pin (for mini2440' dm9000 )
+ set_irq_type(IRQ_EINT7,IRQ_TYPE_LEVEL_HIGH);
+ s3c2410_gpio_cfgpin(S3C2410_GPF(7), S3C2410_GPF7_EINT7);
+ s3c2410_gpio_pullup(S3C2410_GPF(7), 0);
+//******************************tekkaman for dm9000********************************
}
再make,十分钟飘过,内核就OK 了。
测试我用uboot+NFS启动。
但是好像背光及触摸不正常!
如果提示
dm9000 Ethernet Driver, V1.31
dm9000 dm9000: eth%d: Invalid ethernet MAC address. Please set using ifconfig
则编辑 device/net/dm9000.c,插入一行代码如下:
1587 if (!is_valid_ether_addr(ndev->dev_addr)) {
1588 /* try reading from mac */
1589
1590 mac_src = "chip";
1591 for (i = 0; i < 6; i++)
1592 ndev->dev_addr[i] = ior(db, i+DM9000_PAR);
1593 }
1594
1595 + memcpy(ndev->dev_addr, "x08x90x90x90x90x90",6);
1596
1597 if (!is_valid_ether_addr(ndev->dev_addr))
1598 dev_warn(db->dev, "%s: Invalid ethernet MAC address. Please "
1599 "set using ifconfign", ndev->name);