主题 : 请教:关于JFFS2映像的问题 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 5080
精华: 0
发帖: 13
金钱: 80 两
威望: 35 点
贡献值: 0 点
综合积分: 26 分
注册时间: 2009-04-09
最后登录: 2010-08-07
楼主  发表于: 2010-04-15 09:15

 请教:关于JFFS2映像的问题

最近想尝试做一个jffs2的映像文件,几经努力最后以失败而告终。想请教各位一下原因?
使用mkfs.jffs2 -n -s 512 -e 16KiB -d rootfs -o rootfs.jffs2生成jffs2映像文件以后,通过u-boot烧写到开发板中,启动以后输出如下:
U-Boot 1.3.2-mini2440 (Apr 14 2010 - 14:53:11)

I2C: ready
DRAM: 64 MB
Flash:    2 MB
NAND: Bad block table not found for chip 0
Bad block table not found for chip 0
128 MiB
Found Environment offset in OOB..
USB: S3C2410 USB Deviced
In: serial
Out: serial
Err: serial
MAC: 08:08:11:18:12:27
Hit any key to stop autoboot: 0

Loading from NAND 128MiB 3,3V 8-bit, offset 0x60000
Image Name:     Linux-2.6.29.6
Created:     2010-04-14 3:00:41 UTC
Image Type:     ARM Linux Kernel Image (uncompressed)
Data Size:     1941964 Bytes = 1.9 MB
Load Address: 30008000
Entry Point: 30008000
## Booting kernel from Legacy Image at 32000000 ...
Image Name:     Linux-2.6.29.6
Created:     2010-04-14 3:00:41 UTC
Image Type:     ARM Linux Kernel Image (uncompressed)
Data Size:     1941964 Bytes = 1.9 MB
Load Address: 30008000
Entry Point: 30008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux............................................................................................................................. done, booting the kernel.
Linux version 2.6.29.6 (mini2440@debian) (gcc version 4.3.2 (Debian 4.3.2-1.1) ) #4 Wed Apr 14 10:59:35 CST 2010
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
CPU: VIVT data cache, VIVT instruction cache
Machine: SMDK2440
Memory policy: ECC disabled, Data cache writeback
CPU S3C2440A (id 0x32440001)
S3C24XX Clocks, (c) 2004 Simtec Electronics
S3C244X: core 405.000 MHz, memory 101.250 MHz, peripheral 50.625 MHz
CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on
Built 1 zonelists in Zone order, mobility grouping on.    Total pages: 16256
Kernel command line: root=/dev/mtdblock3 rootfstype=jffs2 console=ttySAC0,115200
irq: clearing subpending status 00000002
PID hash table entries: 256 (order: 8, 1024 bytes)
Console: colour dummy device 80x30
console [ttySAC0] enabled
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 60712KB available (3576K code, 410K data, 152K init)
SLUB: Genslabs=12, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Calibrating delay loop... 201.93 BogoMIPS (lpj=504832)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 672 bytes
NET: Registered protocol family 16
S3C2410 Power Management, (c) 2004 Simtec Electronics
S3C2440: Initialising architecture
S3C2440: IRQ Support
S3C24XX DMA Driver, (c) 2003-2004,2006 Simtec Electronics
DMA channel 0 at c4808000, irq 33
DMA channel 1 at c4808040, irq 34
DMA channel 2 at c4808080, irq 35
DMA channel 3 at c48080c0, irq 36
S3C244X: Clock Support, DVS off
bio: create slab <bio-0> at 0
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
NET: Registered protocol family 1
JFFS2 version 2.2. (NAND) 2001-2006 Red Hat, Inc.
msgmni has been set to 118
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
Console: switching to colour frame buffer device 80x40
fb0: s3c2410fb frame buffer device
adc    initialized
s3c2440-uart.0: s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2440
s3c2440-uart.1: s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2440
s3c2440-uart.2: s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2440
brd: module loaded
dm9000 Ethernet Driver, V1.31
Now use the default MAC address: 08:00:3e:26:0a:5b
eth0 (dm9000): not using net_device_ops yet
eth0: dm9000e at c486e000,c4872004 IRQ 51 MAC: 08:00:3e:26:0a:5b (evmcu)
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c2440-nand s3c2440-nand: Tacls=3, 29ns Twrph0=7 69ns, Twrph1=3 29ns
NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V 8-bit)
Scanning device for bad blocks
Creating 4 MTD partitions on "NAND 128MiB 3,3V 8-bit":
0x000000000000-0x000000040000 : "u-boot"
0x000000040000-0x000000060000 : "u-boot-env"
0x000000060000-0x000000560000 : "kernel"
uncorrectable error : <5>0x000000560000-0x000008000000 : "root"
uncorrectable error : <6>ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
usbcore: registered new interface driver libusual
mice: PS/2 mouse device common for all mice
s3c2410 TouchScreen successfully loaded
input: s3c2410 TouchScreen as /devices/virtual/input/input0
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
s3c2410-rtc s3c2410-rtc: rtc disabled, re-enabling
s3c2410-rtc s3c2410-rtc: rtc core: registered s3c as rtc0
i2c /dev entries driver
s3c2440-i2c s3c2440-i2c: slave address 0x10
s3c2440-i2c s3c2440-i2c: bus frequency set to 98 KHz
s3c2440-i2c s3c2440-i2c: i2c-0: S3C I2C adapter
S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled
cpuidle: using governor ladder
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
s3c2440-sdi s3c2440-sdi: host detect has no irq available
mapped channel 0 to 0
s3c2440-sdi s3c2440-sdi: powered down.
s3c2440-sdi s3c2440-sdi: initialisation done.
s3c2440-sdi s3c2440-sdi: running at 0kHz (requested: 0kHz).
s3c2440-sdi s3c2440-sdi: running at 198kHz (requested: 197kHz).
s3c2440-sdi s3c2440-sdi: running at 198kHz (requested: 197kHz).
s3c2440-sdi s3c2440-sdi: running at 198kHz (requested: 197kHz).
Registered led device: led4
Registered led device: led5
Registered led device: led6
Registered led device: led7
s3c2440-sdi s3c2440-sdi: powered down.
usbcore: registered new interface driver hiddev
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
Advanced Linux Sound Architecture Driver Version 1.0.18a.
No device for DAI UDA134X
No device for DAI s3c24xx-i2s
S3C24XX_UDA134X SoC Audio driver
UDA134X SoC Audio Codec
asoc: UDA134X <-> s3c24xx-i2s mapping ok
ALSA device list:
#0: S3C24XX_UDA134X (UDA134X)
TCP cubic registered
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
s3c2410-rtc s3c2410-rtc: setting system clock to 2029-10-05 08:26:50 UTC (1885883210)
CLEANMARKER node found at 0x00000000 has totlen 0xc != normal 0x0
Empty flash at 0x0000fffc ends at 0x00010000
CLEANMARKER node found at 0x00010000 has totlen 0xc != normal 0x0
CLEANMARKER node found at 0x00020000 has totlen 0xc != normal 0x0
Empty flash at 0x0002fffc ends at 0x00030000
CLEANMARKER node found at 0x00030000 has totlen 0xc != normal 0x0
CLEANMARKER node found at 0x00040000 has totlen 0xc != normal 0x0
uncorrectable error : <4>mtd->read(0x1f700 bytes from 0x40900) returned ECC error
Empty flash at 0x0004fffc ends at 0x00050000
CLEANMARKER node found at 0x00050000 has totlen 0xc != normal 0x0
CLEANMARKER node found at 0x00060000 has totlen 0xc != normal 0x0
...............................................................................
Empty flash at 0x014efffc ends at 0x014f0000
CLEANMARKER node found at 0x014f0000 has totlen 0xc != normal 0x0
CLEANMARKER node found at 0x01500000 has totlen 0xc != normal 0x0
Empty flash at 0x0150fffc ends at 0x01510000
CLEANMARKER node found at 0x01510000 has totlen 0xc != normal 0x0
CLEANMARKER node found at 0x01520000 has totlen 0xc != normal 0x0
Empty flash at 0x0152fffc ends at 0x01530000
CLEANMARKER node found at 0x01530000 has totlen 0xc != normal 0x0
CLEANMARKER node found at 0x01540000 has totlen 0xc != normal 0x0
uncorrectable error : <4>mtd->read(0x7c bytes from 0x784) returned ECC error
uncorrectable error : <4>mtd->read(0xec bytes from 0x714) returned ECC error
uncorrectable error : <4>mtd->read(0x15c bytes from 0x6a4) returned ECC error
uncorrectable error : <4>mtd->read(0x1cc bytes from 0x634) returned ECC error
uncorrectable error : <4>mtd->read(0x23c bytes from 0x5c4) returned ECC error
uncorrectable error : <4>mtd->read(0x2b0 bytes from 0x550) returned ECC error
VFS: Mounted root (jffs2 filesystem) on device 31:3.
Freeing init memory: 152K
uncorrectable error : <4>mtd->read(0xfc bytes from 0x190f04) returned ECC error
uncorrectable error : <4>mtd->read(0x2c8 bytes from 0x190538) returned ECC error
uncorrectable error : <4>mtd->read(0x8c bytes from 0x18ff74) returned ECC error
................................................................................................
JFFS2 notice: (1) read_direntry: header CRC failed on dirent node at 0x193fd0: read 0x6a770c5e, calculated 0xe8868efd
uncorrectable error : <4>mtd->read(0x140 bytes from 0x19b6c0) returned ECC error
uncorrectable error : <4>mtd->read(0x44 bytes from 0x6e47d8) returned ECC error
uncorrectable error : <4>mtd->read(0x44 bytes from 0x6e6210) returned ECC error
uncorrectable error : <3>uncorrectable error : <4>mtd->read(0x9f5 bytes from 0x6e6254) returned ECC error
JFFS2 notice: (1) jffs2_get_inode_nodes: Node header CRC failed at 0x478fb0. {1985,e001,0000082c,e0f1565f}
uncorrectable error : <4>mtd->read(0x138 bytes from 0x478ec8) returned ECC error
uncorrectable error : <4>mtd->read(0x1b4 bytes from 0x19b64c) returned ECC error
uncorrectable error : <4>mtd->read(0x228 bytes from 0x19b5d8) returned ECC error
.................................................................................................
uncorrectable error : <4>mtd->read(0x804 bytes from 0x194ffc) returned ECC error
uncorrectable error : <4>mtd->read(0x608 bytes from 0x1f8) returned ECC error
uncorrectable error : <4>mtd->read(0x524 bytes from 0x2dc) returned ECC error
Data CRC ccd66a60 != calculated CRC 19d2c6fc for node at 001bfb58
Kernel panic - not syncing: Attempted to kill init!

我的NAND Flash为Device 0: NAND 128MiB 3,3V 8-bit, page size 2048, sector size 128 KiB
请问:制作jffs2映像和NAND大小有关吗?mkfs.jffs2中-s选项指明的是一页的最大值而不是NAND的page size对吗?
又试过mkfs.jffs2 -n -e 16KiB -d rootfs --pad -o rootfs.jffs2 --little-endian --faketime同样还是不行。
那该如何制作jffs2映像呢?谢谢各位了!
[ 此帖被hrbeu06ws在2010-04-16 11:20重新编辑 ]
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
1楼  发表于: 2010-04-15 11:38
对于128MB的NAND Flash来说,命令应该是
mkfs.jffs2 --pad -n -s 2048 -e 128KiB -d rootfs -o rootfs.jffs2

这是mkfs.jff2的用法:
mkfs.jffs2: Usage: mkfs.jffs2 [OPTIONS]
Make a JFFS2 file system image from an existing directory tree

Options:
  -p, --pad[=SIZE]        Pad output to SIZE bytes with 0xFF. If SIZE is
                          not specified, the output is padded to the end of
                          the final erase block
  -r, -d, --root=DIR      Build file system from directory DIR (default: cwd)
  -s, --pagesize=SIZE     Use page size (max data node size) SIZE (default: 4KiB)
  -e, --eraseblock=SIZE   Use erase block size SIZE (default: 64KiB)
  -c, --cleanmarker=SIZE  Size of cleanmarker (default 12)
  -m, --compr-mode=MODE   Select compression mode (default: priortiry)
  -x, --disable-compressor=COMPRESSOR_NAME
                          Disable a compressor
  -X, --enable-compressor=COMPRESSOR_NAME
                          Enable a compressor
  -y, --compressor-priority=PRIORITY:COMPRESSOR_NAME
                          Set the priority of a compressor
  -L, --list-compressors  Show the list of the avaiable compressors
  -t, --test-compression  Call decompress and compare with the original (for test)
  -n, --no-cleanmarkers   Don't add a cleanmarker to every eraseblock
  -o, --output=FILE       Output to FILE (default: stdout)
  -l, --little-endian     Create a little-endian filesystem
  -b, --big-endian        Create a big-endian filesystem
  -D, --devtable=FILE     Use the named FILE as a device table file
  -f, --faketime          Change all file times to '0' for regression testing
  -q, --squash            Squash permissions and owners making all files be owned by root
  -U, --squash-uids       Squash owners making all files be owned by root
  -P, --squash-perms      Squash permissions on all files
      --with-xattr        stuff all xattr entries into image
      --with-selinux      stuff only SELinux Labels into jffs2 image
      --with-posix-acl    stuff only POSIX ACL entries into jffs2 image
  -h, --help              Display this help text
  -v, --verbose           Verbose operation
  -V, --version           Display version information
  -i, --incremental=FILE  Parse FILE and generate appendage output for it
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 5080
精华: 0
发帖: 13
金钱: 80 两
威望: 35 点
贡献值: 0 点
综合积分: 26 分
注册时间: 2009-04-09
最后登录: 2010-08-07
2楼  发表于: 2010-04-15 14:17
首先多谢版主的指点,版主的意思jffs2的映像和NAND Flash的大小有关是吧!
我按照版主的方法来制作映像,可还是不行,输出如下:

U-Boot 1.3.2-mini2440 (Apr 14 2010 - 14:53:11)

I2C:   ready
DRAM:  64 MB
Flash:    2 MB
NAND:  Bad block table not found for chip 0
Bad block table not found for chip 0
128 MiB
Found Environment offset in OOB..
USB:   S3C2410 USB Deviced
In:    serial
Out:   serial
Err:   serial
MAC: 08:08:11:18:12:27
Hit any key to stop autoboot:  0

Loading from NAND 128MiB 3,3V 8-bit, offset 0x60000
   Image Name:     Linux-2.6.29.6
   Created:     2010-04-15   5:57:07 UTC
   Image Type:     ARM Linux Kernel Image (uncompressed)
   Data Size:     1941960 Bytes =  1.9 MB
   Load Address: 30008000
   Entry Point:  30008000
## Booting kernel from Legacy Image at 32000000 ...
   Image Name:     Linux-2.6.29.6
   Created:     2010-04-15   5:57:07 UTC
   Image Type:     ARM Linux Kernel Image (uncompressed)
   Data Size:     1941960 Bytes =  1.9 MB
   Load Address: 30008000
   Entry Point:  30008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux............................................................................................................................. done, booting the kernel.
Linux version 2.6.29.6 (mini2440@debian) (gcc version 4.3.2 (Debian 4.3.2-1.1) ) #1 Thu Apr 15 13:55:45 CST 2010
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
CPU: VIVT data cache, VIVT instruction cache
Machine: SMDK2440
Memory policy: ECC disabled, Data cache writeback
CPU S3C2440A (id 0x32440001)
S3C24XX Clocks, (c) 2004 Simtec Electronics
S3C244X: core 405.000 MHz, memory 101.250 MHz, peripheral 50.625 MHz
CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on
Built 1 zonelists in Zone order, mobility grouping on.    Total pages: 16256
Kernel command line: root=/dev/mtdblock3 rootfstype=jffs2 console=ttySAC0,115200
irq: clearing subpending status 00000002
PID hash table entries: 256 (order: 8, 1024 bytes)
Console: colour dummy device 80x30
console [ttySAC0] enabled
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 60712KB available (3576K code, 410K data, 152K init)
SLUB: Genslabs=12, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Calibrating delay loop... 201.93 BogoMIPS (lpj=504832)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 672 bytes
NET: Registered protocol family 16
S3C2410 Power Management, (c) 2004 Simtec Electronics
S3C2440: Initialising architecture
S3C2440: IRQ Support
S3C24XX DMA Driver, (c) 2003-2004,2006 Simtec Electronics
DMA channel 0 at c4808000, irq 33
DMA channel 1 at c4808040, irq 34
DMA channel 2 at c4808080, irq 35
DMA channel 3 at c48080c0, irq 36
S3C244X: Clock Support, DVS off
bio: create slab <bio-0> at 0
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
NET: Registered protocol family 1
JFFS2 version 2.2. (NAND)  2001-2006 Red Hat, Inc.
msgmni has been set to 118
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
Console: switching to colour frame buffer device 80x40
fb0: s3c2410fb frame buffer device
adc    initialized
s3c2440-uart.0: s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2440
s3c2440-uart.1: s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2440
s3c2440-uart.2: s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2440
brd: module loaded
dm9000 Ethernet Driver, V1.31
Now use the default MAC address: 08:00:3e:26:0a:5b
eth0 (dm9000): not using net_device_ops yet
eth0: dm9000e at c486e000,c4872004 IRQ 51 MAC: 08:00:3e:26:0a:5b (evmcu)
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c2440-nand s3c2440-nand: Tacls=3, 29ns Twrph0=7 69ns, Twrph1=3 29ns
NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V 8-bit)
Scanning device for bad blocks
Creating 4 MTD partitions on "NAND 128MiB 3,3V 8-bit":
0x000000000000-0x000000040000 : "u-boot"
0x000000040000-0x000000060000 : "u-boot-env"
0x000000060000-0x000000560000 : "kernel"
0x000000560000-0x000008000000 : "root"
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
usbcore: registered new interface driver libusual
mice: PS/2 mouse device common for all mice
s3c2410 TouchScreen successfully loaded
input: s3c2410 TouchScreen as /devices/virtual/input/input0
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
s3c2410-rtc s3c2410-rtc: rtc disabled, re-enabling
s3c2410-rtc s3c2410-rtc: rtc core: registered s3c as rtc0
i2c /dev entries driver
s3c2440-i2c s3c2440-i2c: slave address 0x10
s3c2440-i2c s3c2440-i2c: bus frequency set to 98 KHz
s3c2440-i2c s3c2440-i2c: i2c-0: S3C I2C adapter
S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled
cpuidle: using governor ladder
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
mapped channel 0 to 0
s3c2440-sdi s3c2440-sdi: powered down.
s3c2440-sdi s3c2440-sdi: initialisation done.
s3c2440-sdi s3c2440-sdi: running at 0kHz (requested: 0kHz).
s3c2440-sdi s3c2440-sdi: running at 198kHz (requested: 197kHz).
s3c2440-sdi s3c2440-sdi: running at 198kHz (requested: 197kHz).
s3c2440-sdi s3c2440-sdi: running at 198kHz (requested: 197kHz).
Registered led device: led4
Registered led device: led5
Registered led device: led6
Registered led device: led7
s3c2440-sdi s3c2440-sdi: powered down.
usbcore: registered new interface driver hiddev
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
Advanced Linux Sound Architecture Driver Version 1.0.18a.
No device for DAI UDA134X
No device for DAI s3c24xx-i2s
S3C24XX_UDA134X SoC Audio driver
UDA134X SoC Audio Codec
asoc: UDA134X <-> s3c24xx-i2s mapping ok
ALSA device list:
  #0: S3C24XX_UDA134X (UDA134X)
TCP cubic registered
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
s3c2410-rtc s3c2410-rtc: setting system clock to 2029-10-06 02:11:49 UTC (1885947109)
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0001ef74: 0x47a7 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0001ef78: 0xc8e7 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0001ef7c: 0xa4eb instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0001ef80: 0x19de instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0001ef84: 0x85de instead
................................................................................................
Further such events for this erase block will not be printed
uncorrectable error : <4>mtd->read(0x1f560 bytes from 0x360aa0) returned ECC error
uncorrectable error : <4>mtd->read(0x1f6e4 bytes from 0xaa091c) returned ECC error
uncorrectable error : <4>mtd->read(0x1f674 bytes from 0xea098c) returned ECC error
uncorrectable error : <4>mtd->read(0x1f6c4 bytes from 0xfc093c) returned ECC error
uncorrectable error : <4>mtd->read(0x1f61c bytes from 0x11409e4) returned ECC error
Empty flash at 0x016effb4 ends at 0x016effe8
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x016effe8: 0xffff instead
JFFS2 notice: (1) read_direntry: header CRC failed on dirent node at 0x000708: read 0xe2c19793, calculated 0xda8cd173
uncorrectable error : <4>mtd->read(0x168 bytes from 0x698) returned ECC error
uncorrectable error : <4>mtd->read(0x1d8 bytes from 0x628) returned ECC error
uncorrectable error : <4>mtd->read(0x248 bytes from 0x5b8) returned ECC error
uncorrectable error : <4>mtd->read(0x2bc bytes from 0x544) returned ECC error
VFS: Mounted root (jffs2 filesystem) on device 31:3.
Freeing init memory: 152K
uncorrectable error : <4>mtd->read(0x2d8 bytes from 0x1b0528) returned ECC error
uncorrectable error : <4>mtd->read(0x520 bytes from 0x1afae0) returned ECC error
uncorrectable error : <4>mtd->read(0x5b4 bytes from 0x1aea4c) returned ECC error
uncorrectable error : <4>mtd->read(0x94 bytes from 0x1adf6c) returned ECC error
uncorrectable error : <4>mtd->read(0x2ec bytes from 0x1add14) returned ECC error
uncorrectable error : <4>mtd->read(0x54c bytes from 0x1a12b4) returned ECC error
.................................................................................................
JFFS2 notice: (1) read_direntry: header CRC failed on dirent node at 0x1b0fa8: read 0x1816361e, calculated 0x1ce3e623
uncorrectable error : <4>mtd->read(0x6f4 bytes from 0x10c) returned ECC error
uncorrectable error : <4>mtd->read(0x5d0 bytes from 0x1b1230) returned ECC error
uncorrectable error : <4>mtd->read(0x454 bytes from 0x841bac) returned ECC error
uncorrectable error : <4>mtd->read(0x550 bytes from 0x841ab0) returned ECC error
uncorrectable error : <4>mtd->read(0x2ec bytes from 0x83dd14) returned ECC error
..................................................................................................
JFFS2 notice: (721) read_dnode: node CRC failed on dnode at 0x0007a4: read 0xe98cfdf1, calculated 0xc72fcf0b
JFFS2 warning: (721) jffs2_do_read_inode_internal: no data nodes found for ino #19
JFFS2 notice: (721) jffs2_do_read_inode_internal: but it has children so we fake some modes for it
JFFS2 notice: (1) read_dnode: wrong data CRC in data node at 0x00063338: read 0x37884c2b, calculated 0xd8dafaca.
uncorrectable error : <4>mtd->read(0x110 bytes from 0x62ef0) returned ECC error
uncorrectable error : <4>mtd->read(0x508 bytes from 0x62af8) returned ECC error
JFFS2 notice: (1) read_dnode: node CRC failed on dnode at 0x062768: read 0x2609bc64, calculated 0xc2cdbd19
uncorrectable error : <4>mtd->read(0x70 bytes from 0x61f90) returned ECC error
uncorrectable error : <4>mtd->read(0x4c4 bytes from 0x61b3c) returned ECC error
uncorrectable error : <4>mtd->read(0xb8 bytes from 0x61748) returned ECC error
uncorrectable error : <4>mtd->read(0x554 bytes from 0x612ac) returned ECC error
uncorrectable error : <4>mtd->read(0x1c0 bytes from 0x60e40) returned ECC error
.................................................................................................
JFFS2 notice: (1) check_node_data: wrong data CRC in data node at 0x00002bb0: read 0x9aaba5df, calculated 0xa0abd6fb.
uncorrectable error : <4>mtd->read(0x2ea bytes from 0x2000) returned ECC error
uncorrectable error : <4>mtd->read(0x21a bytes from 0x1800) returned ECC error
uncorrectable error : <4>mtd->read(0xfc bytes from 0x1000) returned ECC error
uncorrectable error : <4>mtd->read(0x44 bytes from 0x6ada4) returned ECC error
Kernel panic - not syncing: No init found.  Try passing init= option to kernel.

难道是u-boot烧写的问题?我用的是nand write.jffs2 0x30000000 rootfs $(filesize)命令烧写的。不知道是那里出了问题,还望指教。
[ 此帖被hrbeu06ws在2010-04-15 14:59重新编辑 ]
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
3楼  发表于: 2010-04-15 15:15
nand write.jffs2之前有没有先nand erase?
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 5080
精华: 0
发帖: 13
金钱: 80 两
威望: 35 点
贡献值: 0 点
综合积分: 26 分
注册时间: 2009-04-09
最后登录: 2010-08-07
4楼  发表于: 2010-04-15 15:47
引用第3楼kasim于2010-04-15 15:15发表的  :
nand write.jffs2之前有没有先nand erase?


有过,完整的下载命令如下:
tftp 0x30000000 rootfs.jffs2
nand erase rootfs
nand write.jffs2 0x30000000 rootfs $(filesize)

u-boot用的是http://repo.or.cz/w/u-boot-openmoko/mini2440.git
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
5楼  发表于: 2010-04-15 15:54

 回 4楼(hrbeu06ws) 的帖子

uncorrectable error : <4>mtd->read(0x1f560 bytes from 0x360aa0) returned ECC error

内核用的是Software ECC还是S3C2440A的Hardware ECC? 是否更改过ECC在OOB中的layout配置?
http://repo.or.cz/w/u-boot-openmoko/mini2440.git这个uboot我用过,默认应该是Software ECC的,内核的配置必须和它保持一致。
[ 此帖被kasim在2010-04-15 16:06重新编辑 ]
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
6楼  发表于: 2010-04-15 16:00
Creating 4 MTD partitions on "NAND 128MiB 3,3V 8-bit":
0x000000000000-0x000000040000 : "u-boot"
0x000000040000-0x000000060000 : "u-boot-env"
0x000000060000-0x000000560000 : "kernel"
uncorrectable error : <5>0x000000560000-0x000008000000 : "root"

另外,你确定内核用的分区和u-boot中所用的是一致的?
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 5080
精华: 0
发帖: 13
金钱: 80 两
威望: 35 点
贡献值: 0 点
综合积分: 26 分
注册时间: 2009-04-09
最后登录: 2010-08-07
7楼  发表于: 2010-04-15 16:20

 Re:回 4楼(hrbeu06ws) 的帖子

引用第5楼kasim于2010-04-15 15:54发表的 回 4楼(hrbeu06ws) 的帖子 :

内核用的是Software ECC还是S3C2440A的Hardware ECC? 是否更改过ECC在OOB中的layout配置?
http://repo.or.cz/w/u-boot-openmoko/mini2440.git这个uboot我用过,默认应该是Software ECC的,内核的配置必须和它保持一致。


内核采用的是Software ECC,并没有设置NAND Hardware ECC,也没有改过OOB中的layout配置。
另外,内核对应的MTD分区如下:
static struct mtd_partition smdk_default_nand_part[] = {
        [0] = {
                .name   = "u-boot",
                .size   = SZ_256K,
                .offset = 0,
        },
        [1] = {
                .name   = "u-boot-env",
                .size   = SZ_128K,
                .offset = SZ_256K,
        },
        [2] = {
                .name   = "kernel",
                /* 5 megabytes, for a kernel with no modules
                 * or a uImage with a ramdisk attached */
                .size   = 0x00500000,
                .offset = SZ_256K + SZ_128K,
        },
        [3] = {
                .name   = "root",
                .offset = SZ_256K + SZ_128K + 0x00500000,
                .size   = MTDPART_SIZ_FULL,
        }


NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V 8-bit)
Scanning device for bad blocks
Creating 4 MTD partitions on "NAND 128MiB 3,3V 8-bit":
0x000000000000-0x000000040000 : "u-boot"
0x000000040000-0x000000060000 : "u-boot-env"
0x000000060000-0x000000560000 : "kernel"
0x000000560000-0x000008000000 : "root"

从第二次的启动信息可以看出MTD的分区信息已经对应上了
[ 此帖被hrbeu06ws在2010-04-15 16:29重新编辑 ]
级别: 新手上路
UID: 5080
精华: 0
发帖: 13
金钱: 80 两
威望: 35 点
贡献值: 0 点
综合积分: 26 分
注册时间: 2009-04-09
最后登录: 2010-08-07
8楼  发表于: 2010-04-16 11:17
今天尝试禁用NAND Flash的ECC校验,重新烧写以后发现内核竟然可以正常挂载JFFS2的文件系统了。看来是内核的ECC校验算法和JFFS2的不匹配啊!以前在做YAFFS2的时候就遇到过类似的问题。不是说u-boot和内核对JFFS2支持的比较好吗?尝试了很多次,总算有了一些结果。