将linux2.6.20内核移植到MINI2440上
时间:2009-03-24 来源:帆锅
|
Available machine support:
ID (hex) NAME
000000c1 SMDK2410
0000016a SMDK2440
Please check your kernel config and/or bootloader.
网上一查发现是vivi的mach_type不对,通过友善提供的supervivi可以看到板子的mach_type,然后按照上面提示的SMDK2410的ID修改: Change 'mach_type' value. 0x0000030e(782) to 0x0000016a(362) 保存参数,重新启动,问题解决。 旧问题刚走新问题又来了:内核解压后启动信息没有通过串口打印出来: NOW, Booting Linux......
Uncompressing Linux.............................................................
.................................. done, booting the kernel. 到此处就停住了,网上一查,发现是时钟频率设置不对,
通过修改mach-smdk2440.c中的函数smdk2440_map_io(),将
s3c24xx_init_clocks(16934400)修改
为
s3c24xx_init_clocks(12000000).终于能够有输出了:
.................................. done, booting the kernel.
Linux version 2.6.20 ([email protected]) (gcc version 3.4.1) #5 Tue Mar
24 17:52:50 CST 2009
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
Machine: SMDK2440 ……………… 这个问题解决了,又来了一个:nand出问题: S3C2440: Initialising architecture
kobject_add failed for s3c2440-nand with -EEXIST, don't try to register things w
ith the same name in the same directory.
s3c24xx: failed to add board device s3c2440-nand (-17) @c02c7370 找了半天,原来是内核已经改动了,哎,要想跟上时代的前进还真难啊: 由于用了新的2.6.20内核,在进行自定义nand flash分区时仍然按照以前的步骤,在devs.c中自己添加分区信息,熟不知在2.6.20.3内核在common-smdk.c中已加入了nand-flash驱动,而我又在devs.c中自己定义了分区,所以出现了上面的错误。然后修改common-smdk.c,注销掉有关nand的内容再编译运行,以上错误提示没有了。但新的问题又来了,内核启动时到此位置停止: NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 2048 bind 1024)
TCP reno registered
NetWinder Floating Point Emulator V0.97 (double precision)
JFFS2 version 2.2. (NAND) (C) 2001-2006 Red Hat, Inc.
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered 比较郁闷,半天都找不到原因,难道是因为内核还没有支持yaffs?研究下再继续吧。 加入yaffs支持后问题依旧,看来卡住了- -! 上面的问题已经解决,解决方法:在网上看了别人的启动信息,在io scheduler cfq registered后应该输出的是LCD的驱动信息,所以猜测是我的lcd驱动出问题卡主了,而我并没有移植LCD驱动,所以把内核自带的lcd驱动注销掉:arch/arm/mach-s3c2410/mach-smdk2410.c 中将&s3c_device_lcd行注销,重新编译内核,运行,通过。但是新问题继续出现:
yaffs_read_super: isCheckpointed 0
VFS: Mounted root (yaffs filesystem).
Freeing init memory: 116K
Warning: unable to open an initial console.
Failed to execute /linuxrc. Attempting defaults...
Kernel panic - not syncing: No init found. Try passing init= option to kernel. 哎,继续探索吧,谁叫我菜呢。
相关阅读 更多 +