- 论坛徽章:
- 0
|
我用的目标板是arm9 + linux 2.6.30. 采用yaffs2 文件系统。
分区如下:
dev: size erasesize name
mtd0: 00020000 00020000 "bootstrap"
mtd1: 00040000 00020000 "uboot"
mtd2: 00020000 00020000 "env1"
mtd3: 00020000 00020000 "env2"
mtd4: 00200000 00020000 "linux"
mtd5: 07d60000 00020000 "root"
现在增加在线烧写固件的功能。编译最新的busybox 1.20后,得到flash_erase/flash_eraseall, nandwrite/nanddump.
在板子上分别运行
flash_eraseall /dev/mtd4
nandwrite -p /dev/mtd4 new_uImage //新的kernel
flash_eraseall /dev/mtd5
nandwrite -p /dev/mtd5 new_rfs.yaffs2 //新的文件系统
# reboot
save exit: isCheckpointed 1
The system is going down NOW!
Sent SIGTERM to all processes
Sent SIGKILL to all processes
Requesting system reboot
Restarting system.
重启后,kernel升级成功,但文件系统载入失败。错误信息如下:
Kernel command line: console=ttyS0,115200 root=/dev/mtdblock5 mtdparts=atmel_nan
d:128k(bootstrap)ro,256k(uboot)ro,128k(env1)ro,128k(env2)ro,2M(linux),-(root) rw
rootfstype=yaffs2
.
.
.
NET: Registered protocol family 1
NetWinder Floating Point Emulator V0.97 (double precision)
yaffs Jun 20 2012 15:58:17 Installing.
msgmni has been set to 121
io scheduler noop registered
.
.
.
NAND device: Manufacturer ID: 0x20, Chip ID: 0xf1 (ST Micro NAND 128MiB 3,3V 8-b
it)
AT91 NAND: 8-bit, Software ECC
Scanning device for bad blocks
6 cmdlinepart partitions found on MTD device atmel_nand
Creating 6 MTD partitions on "atmel_nand":
0x000000000000-0x000000020000 : "bootstrap"
0x000000020000-0x000000060000 : "uboot"
0x000000060000-0x000000080000 : "env1"
0x000000080000-0x0000000a0000 : "env2"
0x0000000a0000-0x0000002a0000 : "linux"
0x0000002a0000-0x000008000000 : "root"
.
.
.
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
yaffs: dev is 32505861 name is "mtdblock5"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.5, "mtdblock5"
uncorrectable error : <3>uncorrectable error : yaffs_read_super: isCheckpointed
0
VFS: Mounted root (yaffs2 filesystem) on device 31:5.
Freeing init memory: 124K
Warning: unable to open an initial console.
Kernel panic - not syncing: No init found. Try passing init= option to kernel.
Backtrace:
[<c002b34c>] (dump_backtrace+0x0/0x104) from [<c002b468>] (dump_stack+0x18/0x1c)
r7:00000000 r6:c02ce87c r5:c0020eac r4:c02ce5b4
[<c002b450>] (dump_stack+0x0/0x1c) from [<c003ca4c>] (panic+0x40/0x10c)
[<c003ca0c>] (panic+0x0/0x10c) from [<c00274d4>] (init_post+0xd0/0x100)
r3:c3805e30 r2:0000000d r1:0000000c r0:c027794c
[<c0027404>] (init_post+0x0/0x100) from [<c0008a54>] (kernel_init+0xbc/0xe4)
r4:c02ce5b8
[<c0008998>] (kernel_init+0x0/0xe4) from [<c003ef5c>] (do_exit+0x0/0x58
r5:00000000 r4:00000000
请问是否busybox提供的nand擦写工具不支持yaffs2?
|
|