[LEDE-DEV] NAND JFFS2 question
hamsi2k at freenet.de
hamsi2k at freenet.de
Wed Mar 8 14:01:29 PST 2017
Hi!
I currently work to assembly a fullimage.img for the Easybox 904xdsl.
Actually there are some differences to upstream made by the vendor.
I take over some code and now I'm able to update the firmware, or at
least the kernel via the recovery method within the uboot.
As I wrote, the kernel and also the rootfs is flashed without errors.
When I try to boot the image, or mount the partition it is not possible
due some strange ECC errors.
So I did some investigations: When I boot into the target system
via sdcard as rootfs and then I perform a
------------------------------------------------------------------------
flash_eraseall /dev/mtd1
nand_write /dev/mtd1 /root/image.jffs2
mkdir /tmp/disk
mount -t jffs2 /dev/mtdblock1 /tmp/disk
------------------------------------------------------------------------
The parition is mounted as expected.
When I perform a manual update within the u-boot cmdline
(mostly the same as the automated update mechanismn does):
------------------------------------------------------------------------
Bytes transferred = 23334912 (1641000 hex)
VR9 # nand erase $(f_rootfs_addr) $(f_rootfs_size) clean
NAND erase: device 0 offset 0x0000000000040000, size 0x0000000003c00000
Erasing at 0x3c20000 -- 100% complete. Cleanmarker written at 0x3c20000.
OK
VR9 # nand write.jffs2 $(loadaddr) $(f_rootfs_addr) $(filesize)
NAND write: device 0 offset 0x0000000000040000, size 0x0000000001641000
0x1641000 bytes written: OK
VR9 #
------------------------------------------------------------------------
After that, I tried to mount the image, I got errors, errors and errors (and errors).
------------------------------------------------------------------------
root at LEDE:/# mount -t jffs2 /dev/mtdblock1 /tmp/disk/1 /tmp/disk/
[ 131.607779] __nand_correct_data: uncorrectable ECC error
[ 131.611745] jffs2: mtd->read(0x100 bytes from 0x0) returned ECC error
[ 131.618502] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000008: 0xffff instead
[ 131.627858] jffs2: Empty flash at 0x0000000c ends at 0x00000010
[ 131.633824] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000018: 0xffff instead
[ 131.643704] __nand_correct_data: uncorrectable ECC error
------------------------------------------------------------------------
It must have something to do with the jffs-format when erasing the image.
( clean flag of "nand erase $(f_rootfs_addr) $(f_rootfs_size) clean" )
If I dump the first block after flashing the image, it looks completely
different from the source file. If I erase without the clean flag and flash
the file - it looks the same. It is so weird :-(
Maybe someone has an explanation for this?
Thanks,
Quallenauge
---
https://email.freenet.de/emig/index.html?utm_medium=Text&utm_source=Footersatz&utm_campaign=Footersatz_Sicherheit170207&epid=e9900000699&utm_content=Text Wir garantieren Ihnen verschlüsselte Datenübertragung & Datenspeicherung auf deutschen Servern - E-Mail made in Germany!
More information about the Lede-dev
mailing list