内核编译过程:linux-3.0.8
该内核是在s5pv210上跑的1、解压linux-3.0.8,并修改Makefile vi Makefile +195 195 ARCH ?= arm 196 CROSS_COMPILE ?= arm-none-linux-gnueabi-2、选择soc m
该内核是在s5pv210上跑的
1、解压linux-3.0.8,并修改Makefile
vi Makefile +195
195 ARCH ?= arm
196 CROSS_COMPILE ?= arm-none-linux-gnueabi-
2、选择soc
make s5pv210_defconfig
3、执行 make menuconfig 进行相关编译选择
System Type --->
(0) S3C UART to use for low-level messages
[*] Networking support --->
Networking options --->
<*> Packet socket
<*> Unix domain sockets
[*] TCP/IP networking
[*] IP: kernel level autoconfiguration
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
4、编译内核 make zImage -j2
5、将编译好的内核烧写到开发板测试,会发现问题,但是没关系,继续第6步的配置
6、修改文件 arch/arm/mach-s5pv210/mach-smdkv210.c (以下是与平台相关):
vi arch/arm/mach-s5pv210/mach-smdkv210.c
修改结构体数组smdkv210_dm9000_resources为:
static struct resource smdkv210_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 | IORESOURCE_IRQ_HIGHLEVEL,
},
};
static struct dm9000_plat_data smdkv210_dm9000_platdata = {
.flags = DM9000_PLATF_16BITONLY | DM9000_PLATF_NO_EEPROM,
.dev_addr = { 0x00, 0x09, 0xc0, 0xff, 0xec, 0xYY}, /* YY为主机编号,如果小于10, 则在前面添加0 */
};
修改函数smdkv210_dm9000_init为:
static void __init smdkv210_dm9000_init(void)
{
unsigned int tmp;
gpio_request(S5PV210_MP01(1), "nCS1");
s3c_gpio_cfgpin(S5PV210_MP01(1), S3C_GPIO_SFN(2));
gpio_free(S5PV210_MP01(1));
tmp = (5 << S5P_SROM_BCX__TACC__SHIFT);
__raw_writel(tmp, S5P_SROM_BC1);
tmp = __raw_readl(S5P_SROM_BW);
tmp &= (S5P_SROM_BW__CS_MASK << S5P_SROM_BW__NCS1__SHIFT);
tmp |= (1 << S5P_SROM_BW__NCS1__SHIFT);
__raw_writel(tmp, S5P_SROM_BW);
}
7、执行 make menuconfig
Device Drivers --->
[*] Network device support --->
[*] Ethernet (10 or 100Mbit) --->
<*> DM9000 support
(4) DM9000 maximum debug level
8、重新编译内核 make zImage -j2
并将编译好的内核烧写到开发板测试,这下应该就ok了
更多推荐
所有评论(0)