Chinaunix首页 | 论坛 | 博客
  • 博客访问: 372552
  • 博文数量: 50
  • 博客积分: 1495
  • 博客等级: 上尉
  • 技术积分: 805
  • 用 户 组: 普通用户
  • 注册时间: 2010-12-21 14:19
文章分类

全部博文(50)

文章存档

2011年(47)

2010年(3)

分类: 嵌入式

2011-06-02 19:18:20

移植内核之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.

[] (unwind_backtrace+0x0/0xd8) from [] (panic+0x40/0x10c)

[] (panic+0x40/0x10c) from [] (init_post+0xec/0x120)

[] (init_post+0xec/0x120) from [] (kernel_init+0xdc/0x10c)

[] (kernel_init+0xdc/0x10c) from [] (kernel_thread_exit+0x0/0x8)

 

在用以前在mini2440上使用过的mkyaffs2image不行,后来用yaffs2补丁中原有的mkyaffs2imageOK了,很奇怪!



阅读(2824) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~