hello
fyi
there is a ./patches/yaffs_mtdif2.c file, I copied this file into
/yaffs2 directory and recompiled the kernel. After that I can mount a
YAFFS2 directory, place some files in it, then umount and mount again.
the files are there. So mount problem disappeared.
I also managed to boot my board using YAFFS2 as root fs. what I did:
1, mount /dev/mtblock2 as yaffs2 file system. Size is 80MB
2. copy all root fs directories, like /etc, /bin, /dev ... into this
directory
3. set uboot parameters as: root=/dev/mtdblock2 rw rootfstype=yaffs2
then the system boots. Afterwards while I am testing the sistem, I
copied /etc/network/interfaces file from a windows PC to the my board.
THe file system corrupted. I do not know the reason. The boot log is
attached. any comments? thanks.
Ensar
------
NAND read: device 0 offset 0x200000, size 0x200000
Reading data from 0x3ff800 -- 100% complete.
2097152 bytes read: OK
## Downloading image at 01000000 ...
code_offset=0x80
code_base=800000
data_offset=872c
code_size=86ac
data_base=8086ac
data_size=138110
zeroinit_base=9407bc
prog_entry=100
AIFHEADER:
BL_DecompressCode=e1a00000
BL_SelfRelocCode=e1a00000
BL_DbgInitZeroInit=eb00000c
EntryPointOffset=ff800100
ProgramExitInstr=ef000011
ImageReadOnlySize=86ac
ImageReadWriteSize=138110
ImageDebugSize=2060
ImageZeroInitSize=11324
ImageDebugType=1e681
ImageBase=800000
WorkSpace=0
AddressMode=20
DataBase=0
FirstFatOffset=14289c
Reserved2=0
DebugInitInstr=e1a00000
ZeroInitCode[0]=e04ec00f
NAND read: device 0 offset 0x0, size 0x200000
Reading data from 0x1ff800 -- 100% complete.
2097152 bytes read: OK
Copying ARM1 startup code from 07e003c0, start address 02000000
Starting kernel ...
Linux version 2.6.11.7-1.08.9tsavo (root@mete) (gcc version 3.3.2
20030820 (prerelease)) #91 Tue Oct 14 18:29:44 EEST
2008������������������������������������
CPU: ARM920Tid(wb) [41129200] revision 0 (ARMv4T)
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
CPU0: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
Machine: ARM-M825xx2 Comcerto
Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists
Kernel command line: console=ttyS0,115200 mem=110M root=/dev/mtdblock2
rootflags=noatime rw rootfstype=yaffs2
PID hash table entries: 512 (order: 9, 8192 bytes)
HZ: 200
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 110MB = 110MB total
Memory: 109184KB available (1719K code, 597K data, 84K init)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
...
JFFS2 version 2.2. (NAND) (C) 2001-2003 Red Hat, Inc.
yaffs Oct 13 2008 17:35:06 Installing.
Serial: 8250/16550 driver $Revision: 1.1.1.3 $ 2 ports, IRQ sharing disabled
Serial: Comcerto 16550 serial driver $Revision: 1.4 $
......
NAND device: Manufacturer ID: 0x20, Chip ID: 0xf1 (ST Micro NAND 128MiB
3,3V 8-bit)
Scanning device for bad blocks
Creating 4 MTD partitions on "NAND 128MiB 3,3V 8-bit":
0x00000000-0x00200000 : "MSP boot partition"
0x00200000-0x00400000 : "Linux boot partition"
0x00400000-0x05400000 : "Filesystem partition 1"
0x05400000-0x08000000 : "Free data section"
Comcerto flash: request_mem_region(0x5000000, 4194304) failed
SPI core: add adapter comcerto-spi
NET: Registered protocol family 2
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
NET: Registered protocol family 1
NET: Registered protocol family 17
yaffs: dev is 32505858 name is "mtdblock2"
yaffs: Attempting MTD mount on 31.2, "mtdblock2"
Unable to handle kernel paging request at virtual address 00009400
pgd = c0004000
[00009400] *pgd=00000000
Internal error: Oops: 5 [#1]
Modules linked in:
CPU: 0
PC is at yaffs_ScanBackwards+0x3cc/0xc78
LR is at yaffs_ScanBackwards+0x3dc/0xc78
pc : [<c00dc870>] lr : [<c00dc880>] Not tainted
sp : c0385cf8 ip : c6da8668 fp : c0385d80
r10: 00000000 r9 : c6dd0000 r8 : ffffffff
r7 : ffffffff r6 : c6da8000 r5 : c6835f00 r4 : 000093ec
r3 : 000093ec r2 : c0389a50 r1 : c6835f14 r0 : c6da8000
Flags: nzCv IRQs on FIQs on Mode SVC_32 Segment kernel
Control: C000717F Table: 01004000 DAC: 00000017
Process swapper (pid: 1, stack limit = 0xc0384194)
Stack: (0xc0385cf8 to 0xc0386000)
5ce0: c6dd0000
c6d96000
5d00: 000093ec ffffffff 00000000 00000005 aaaaaaaa 00000001 00000105
00000000
5d20: 00000000 00000000 00000000 00000000 00000000 00001001 00000001
00000001
5d40: 00000000 00000000 00000003 00000000 00000000 55555555 c6d998fc
c6da8000
5d60: c01d5af8 00000118 0000000a 00000000 00000000 c0385da8 c0385d84
c00ddc94
5d80: c00dc4b4 c6d1a600 c6d99a00 c01d5af8 c6da8000 00000000 00000000
c0385dfc
5da0: c0385dac c00d6544 c00dd8b4 c6d4b36c 6264746d 6b636f6c c6da0032
c6da7000
5dc0: c0385ddc c6d99b40 00000009 00000009 c0385e10 c036cbbc c036cba0
c6d99a00
5de0: 00008000 c6da7000 c6da4000 c6da7000 c0385e0c c0385e00 c00d6a34
c00d62f0
5e00: c0385e50 c0385e10 c0072c60 c00d6a20 6264746d 6b636f6c c6da0032
c6da1900
5e20: 0000000a c03672a0 c6da1900 c6da6000 c03672a0 fffffff4 c01d5d6c
c6da6000
5e40: 00008000 c0385e64 c0385e54 c00d6a60 c0072b40 c00d6a10 c0385e8c
c0385e68
5e60: c0072ea0 c00d6a54 ffffffff c6da6000 c6da7000 00008000 c0385ec0
00000000
5e80: c0385eb4 c0385e90 c0088a7c c0072e54 00008000 c6da5000 00000000
c6da6000
5ea0: 00000000 c6da7000 c0385f28 c0385eb8 c0089134 c0088a04 c6da6000
c6da7000
5ec0: c036a554 c0367600 c00581f8 c02397c3 00000000 00000001 00000001
00000000
5ee0: c024e180 c001b690 c0385f04 c0385ef8 c0054928 c02397c3 c0385f28
c0385f08
5f00: 00000000 00000000 c01a1ff8 00008000 c6da5000 c024e180 c001b690
c0385f5c
5f20: c0385f2c c008959c c0089014 c6da7000 c6da7000 c6da6000 c6da4000
c02397c3
5f40: c0378000 00008000 c0385f78 c01a1ff8 c0385f74 c0385f60 c0008ff8
c0089508
5f60: c02397c3 c0378000 c0385fc0 c0385f78 c00090e4 c0008fd8 c0385f8d
c0044e28
5f80: c00496c8 01f00002 c0238598 00000000 00000000 00000000 c001b698
c001b648
5fa0: 00000000 00000000 00000000 00000000 00000000 c0385fdc c0385fc4
c0009310
5fc0: c0009098 00000000 c01a1e80 00000000 c0385ff4 c0385fe0 c001d13c
c00092e0
5fe0: 00000000 00000000 00000000 c0385ff8 c0037488 c001d078 00000000
00000000
Backtrace:
[<c00dc4a4>] (yaffs_ScanBackwards+0x0/0xc78) from [<c00ddc94>]
(yaffs_GutsInitialise+0x3f0/0x4b0)
[<c00dd8a4>] (yaffs_GutsInitialise+0x0/0x4b0) from [<c00d6544>]
(yaffs_internal_read_super+0x264/0x6d8)
[<c00d62e0>] (yaffs_internal_read_super+0x0/0x6d8) from [<c00d6a34>]
(yaffs2_internal_read_super_mtd+0x24/0x34)
[<c00d6a10>] (yaffs2_internal_read_super_mtd+0x0/0x34) from [<c0072c60>]
(get_sb_bdev+0x130/0x17c)
[<c0072b30>] (get_sb_bdev+0x0/0x17c) from [<c00d6a60>]
(yaffs2_read_super+0x1c/0x24)
r8 = 00008000 r7 = C6DA6000 r6 = C01D5D6C r5 = FFFFFFF4
r4 = C03672A0
[<c00d6a44>] (yaffs2_read_super+0x0/0x24) from [<c0072ea0>]
(do_kern_mount+0x5c/0xf4)
[<c0072e44>] (do_kern_mount+0x0/0xf4) from [<c0088a7c>]
(do_new_mount+0x88/0xb0)
[<c00889f4>] (do_new_mount+0x0/0xb0) from [<c0089134>]
(do_mount+0x130/0x168)
[<c0089004>] (do_mount+0x0/0x168) from [<c008959c>] (sys_mount+0xa4/0xe8)
[<c00894f8>] (sys_mount+0x0/0xe8) from [<c0008ff8>]
(do_mount_root+0x30/0xc0)
r8 = C01A1FF8 r7 = C0385F78 r6 = 00008000 r5 = C0378000
r4 = C02397C3
[<c0008fc8>] (do_mount_root+0x0/0xc0) from [<c00090e4>]
(mount_block_root+0x5c/0x11c)
r4 = C0378000
[<c0009088>] (mount_block_root+0x0/0x11c) from [<c0009310>]
(prepare_namespace+0x40/0xd8)
[<c00092d0>] (prepare_namespace+0x0/0xd8) from [<c001d13c>]
(init+0xd4/0x108)
r5 = 00000000 r4 = C01A1E80
[<c001d068>] (init+0x0/0x108) from [<c0037488>] (do_exit+0x0/0x3a4)
r5 = 00000000 r4 = 00000000
Code: e3500000 0a000016 e51b4080 e1a00006 (e5942014)
<0>Kernel panic - not syncing: Attempted to kill init!