这几天感觉很头痛,本来觉得移植个最小的linux 2.6.32系统在OK6410开发板上也不是什么难事,但是有一个问题一直无法解,也查了很多有关的资料,但至今还没有得到答案,希望各位高手帮帮小弟呀
原本这块板子带的系统是2.6.28的内核 ,我现在想升到2.6.32,于是,我下了一个2.6.32的内核,然后解压,
再运行
make smdk6400_defconfig ,
make menuconfig
加入启动参数
root=/dev/mtdblock2 rootfstype=cramfs init=/linuxrc console=ttySSAC0,115200 mem=256M
make
把编好的zimge烧到板子上,出现错误如下:
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
mousedev: PS/2 mouse device common for all mice
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
i2c /dev entries driver
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 5
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
VFS: Cannot open root device "mtdblock2" or unknown-block(0,0)
Please append a correct "root=" boot option; here are the available partitions:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[<c002f63c>] (unwind_backtrace+0x0/0xf8) from [<c01df4c4>] (panic+0x58/0x19c)
[<c01df4c4>] (panic+0x58/0x19c) from [<c0008e54>] (mount_block_root+0x180/0x2c0
由此可以看出,内核已经可以启动,串口也配置好了,但是还没有识别出mtdblock2分区,这个是还没有加上nand flash的驱动的原因
所以我便把飞凌自带的2.8.28内核里的nand驱动直接复制进去
再把yaffs2文 件系统也加进去了
#make menuconfig
Device Drivers --->
<*> Memory Technology Device (MTD) support --->
MTD partitioning support
<*> NAND Device Support --->
<*> NAND Flash support for S3C/S3C SoC
再把这个选项选上
device drivers ->
Memory Technology Device (MTD) support --->
Caching block device access to MTD devices
把yaffs2文 件系统也选上了
<*> YAFFS2 file system support │ │
│ │ -*- 512 byte / page devices │ │
│ │ [ ] Use older-style on-NAND data format with pageStatus byt│ │
│ │ [ ] Lets Yaffs do its own ECC │ │
│ │ -*- 2048 byte (or larger) / page devices │ │
│ │ [*] Autoselect yaffs2 format │ │
│ │ [ ] Disable YAFFS from doing ECC on tags by default │ │
│ │ [ ] Disable lazy loading │ │
│ │ [*] Turn off wide tnodes │
再把cramfs也选上了
<*> Compressed ROM file system support (cramfs)
编译通过
再把zimage烧进去
*************************************************************************************************************
出现以下别我头痛到现在的问题
NAND device: Manufacturer ID: 0xec, Chip ID: 0xd5 (Samsung NAND 2GiB 3,3V 8-bit)
Creating 4 MTD partitions on "NAND 2GiB 3,3V 8-bit":
0x000000000000-0x000000040000 : "Bootloader"
0x000000040000-0x000000400000 : "Kernel"
0x000000400000-0x000005400000 : "Rootfs"
0x000005400000-0x000080000000 : "User File System"
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
Buffer I/O error on device mtdblock2, logical block 3
List of all partitions:
1f00 256 mtdblock0 (driver?)
1f01 3840 mtdblock1 (driver?)
1f02 81920 mtdblock2 (driver?)
1f03 2011136 mtdblock3 (driver?)
No filesystem could mount root, tried: cramfs
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,2)