[U-Boot-Users] Problems with root JFFS2 on NAND Flash
Stuart Wood
stuart.wood at labxtechnologies.com
Fri Jun 13 16:45:43 CEST 2008
Sorry for the initial incomplete post......
I'm having some new problems with my jffs2 root file system when it is
mounted the first time from small page nand flash.
I'm pretty sure its some sort of configuration problem but the web
hasn't helped so far.
NAND Flash,
erase block = 0x4000 (16K)
page size = 0x200 (512)
The jffs2 image is being built with this command from Buildroot:
# Use fakeroot so mkfs.jffs2 believes the previous fakery
echo "/home/stuart/ArmLinux/buildroot/toolchain_build_arm_nofpu/mtd_orig/util/mkfs.jffs2
-e 0x4000 -p -l -s 0x200 -n -D target/generic/device_table.txt -d
/home/stuart/ArmLinux/buildroot/build_arm_nofpu/root -o
/home/stuart/ArmLinux/buildroot/rootfs.arm_nofpu.jffs2" \
>> /opt/buildroot/_fakeroot.rootfs.arm_nofpu.jffs2
chmod a+x /opt/buildroot/_fakeroot.rootfs.arm_nofpu.jffs2
/opt/buildroot/usr/bin/fakeroot --
/opt/buildroot/_fakeroot.rootfs.arm_nofpu.jffs2
rootdir=/home/stuart/ArmLinux/buildroot/build_arm_nofpu/root
table='target/generic/device_table.txt'
mkfs.jffs2: skipping device_table entry '/dev': no parent directory!
mkfs.jffs2: skipping device_table entry '/tmp': no parent directory!
mkfs.jffs2: skipping device_table entry '/etc': no parent directory!
-rw-r--r-- 1 stuart stuart 2736128 2008-06-13 09:52
/home/stuart/ArmLinux/buildroot/rootfs.arm_nofpu.jffs2
/sbin/ldconfig -r /home/stuart/ArmLinux/buildroot/build_arm_nofpu/root
2>/dev/null
I'm using u-boot 1.3.3 to load the image like this:
u-boot>
u-boot> loady
## Ready for binary (ymodem) download to 0xE1000000 at 115200 bps...
C## Total Size = 0x0029c000 = 2736128 Bytes
u-boot> nand erase clean 500000 1b00000
NAND erase: device 0 offset 0x500000, size 0x1b00000
Erasing at 0x1ffc000 -- 100% complete. Cleanmarker written at 0x1ffc000.
OK
u-boot> nand write.jffs2 e1000000 500000
NAND write: device 0 offset 0x500000, size 0x1b00000
Writing data at 0x1fffe00 -- 100% complete.
28311552 bytes written: OK
u-boot>
And then when I boot the image I get these errors:
jffs_check_nand_cleanmarker returned 0
jffs_check_nand_cleanmarker returned 0
jffs_check_nand_cleanmarker returned 0
<CLIPPED>
jffs_check_nand_cleanmarker returned 0
jffs_check_nand_cleanmarker returned 0
jffs_check_nand_cleanmarker returned 0
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0029c000:
0x138e instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0029c004:
0x1358 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0029c008:
0x33cc instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0029c00c:
0x73c8 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0029c010:
0x31ec instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0029c014:
0x35cc instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0029c018:
0x93cc instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0029c01c:
0x31cc instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0029c020:
0x13ce instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0029c024:
0x728c instead
Further such events for this erase block will not be printed
JFFS2: Erase block at 0x0029c000 is not formatted. It will be erased
jffs_check_nand_cleanmarker returned 0
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x002a0000:
0x138e instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x002a0004:
0x1378 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x002a0008:
0x33cc instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x002a000c:
0x73c8 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x002a0010:
0x31ac instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x002a0014:
0x35cc instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x002a0018:
0x93cc instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x002a001c:
0x31cc instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x002a0020:
0x13ce instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x002a0024:
0x728c instead
Further such events for this erase block will not be printed
JFFS2: Erase block at 0x002a0000 is not formatted. It will be erased
<CLIPPED>
JFFS2: Erase block at 0x01af8000 is not formatted. It will be erased
jffs_check_nand_cleanmarker returned 0
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x01afc000:
0x33c8 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x01afc004:
0x37c4 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x01afc008:
0x33c8 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x01afc00c:
0x33cc instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x01afc010:
0x1284 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x01afc014:
0x338c instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x01afc018:
0x33c8 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x01afc01c:
0x03e1 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x01afc020:
0x21c8 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x01afc024:
0x33cc instead
Further such events for this erase block will not be printed
JFFS2: Erase block at 0x01afc000 is not formatted. It will be erased
VFS: Mounted root (jffs2 filesystem).
Freeing init memory: 84K
Initializing random number generator... done.
Starting network...
ip: RTNETLINK answers: File exists
udhcpc (v1.2.2) started
Jan 1 00:21:07 udhcpc[171]: udhcpc (v1.2.2) started
Sending discover...
Jan 1 00:21:07 udhcpc[171]: Sending discover...
Sending select for 192.168.0.144...
Jan 1 00:21:08 udhcpc[171]: Sending select for 192.168.0.144...
Lease of 192.168.0.144 obtained, lease time 86400
Jan 1 00:21:08 udhcpc[171]: Lease of 192.168.0.144 obtained, lease time 86400
deleting routers
route: SIOC[ADD|DEL]RT: No such process
adding dns 66.133.170.2
adding dns 67.50.135.146
Creating FPGA Device Nodes
Spartan IIIe: INITIALIZATION OK
Found image: MIX_EVM_FPGA
Spartan IIIe: Finished
Reseting SRC4193's
Wrote: 0x 200,
Ininitalizing SRC4193
Ininitalizing AK4620B Codec
Auto Select Mode
Wrote: 0x 72,
MIX Module driver loaded
Mix_IO Initialized
modprobe: module cm2_module not found.
modprobe: failed to load module cm2_module
Creating Mix Module Device Nodes
Welcome to the Mix-EVM.
mix-evm login:
It takes approx. 20 minutes to get through the JFFS@ warnings.
The kernel is 2.6.18 and the JFFS2 settings are:
# CONFIG_JFFS_FS is not set
CONFIG_JFFS2_FS=y
CONFIG_JFFS2_FS_DEBUG=0
CONFIG_JFFS2_FS_WRITEBUFFER=y
CONFIG_JFFS2_SUMMARY=y
# CONFIG_JFFS2_FS_XATTR is not set
# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
CONFIG_JFFS2_ZLIB=y
CONFIG_JFFS2_RTIME=y
# CONFIG_JFFS2_RUBIN is not set
Any thoughts on what might be wrong would be appriciated!
Thanks
--
Stuart Wood
More information about the U-Boot
mailing list