移植内核之yaffs2
从http://www.yaffs.net/node/346下载yaffs2补丁源码
解压之后,进入yaffs2目录
./patch-ker.sh c
../../../arm6410/linux-2.6.32.36/
这样yaffs2的补丁就打好了
配置内核,选中yaffs2
Make menuconfig ARCH=arm
File systems --->
[*] Miscellaneous filesystems --->
<*> YAFFS2 file system support
编译烧写内核
Make zImage ARCH=arm
CROSS_COMPILE=arm-linux-
设置bootargs参数:
setenv bootargs noinitrd
root=/dev/mtdblock init=/linuxrc rootfstype=yaffs2 console=ttySAC0,115200
可能遇到的问题:
此问题,让我纠结了很久,FUCK一下
NAND device:
Manufacturer ID: 0xec, Chip ID: 0xda (Samsung NAND 256MiB 3,3V 8-bit)
Creating 4 MTD
partitions on "NAND 256MiB 3,3V 8-bit":
0x000000000000-0x000000040000
: "u-boot"
0x000000040000-0x000000400000
: "kernel"
0x000000400000-0x000005400000
: "rootfs"
0x000005400000-0x000010000000
: "file system"
mice: PS/2 mouse device
common for all mice
i2c /dev entries driver
sdhci: Secure Digital
Host Controller Interface driver
sdhci: Copyright(c)
Pierre Ossman
TCP cubic registered
yaffs: dev is 32505858
name is "mtdblock2"
yaffs: passed flags
""
yaffs: Attempting MTD
mount on 31.2, "mtdblock2"
yaffs_read_super:
isCheckpointed 0
VFS: Mounted root
(yaffs2 filesystem) on device 31:2.
Freeing init memory:
108K
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.
[<c0029974>]
(unwind_backtrace+0x0/0xd8) from [<c024ece4>] (panic+0x40/0x10c)
[<c024ece4>]
(panic+0x40/0x10c)
from [<c00235d0>] (init_post+0xec/0x120)
[<c00235d0>]
(init_post+0xec/0x120) from [<c00085bc>] (kernel_init+0xdc/0x10c)
[<c00085bc>]
(kernel_init+0xdc/0x10c)
from [<c0024e34>] (kernel_thread_exit+0x0/0x8)
在用以前在mini2440上使用过的mkyaffs2image不行,后来用yaffs2补丁中原有的mkyaffs2image就OK了,很奇怪!
|