New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FS#385 - rampis / JFFS2-problem / Xiaomi Miwifi mini / r2919 / wrong erase size? #5417
Comments
bittorf: just a note: |
mkresin: Please provide a full bootlog and the output of
cat /proc/mtd
|
bittorf:
root@xiaomi:~ cat /proc/mtd
dev: size erasesize name
mtd0: 00030000 00001000 "u-boot"
mtd1: 00010000 00001000 "u-boot-env"
mtd2: 00010000 00001000 "factory"
mtd3: 00f80000 00001000 "firmware"
mtd4: 001353c1 00001000 "kernel"
mtd5: 00e4ac3f 00001000 "rootfs"
mtd6: 00ad0000 00001000 "rootfs_data"
mtd7: 00010000 00001000 "crash"
mtd8: 00010000 00001000 "reserved"
mtd9: 00010000 00001000 "Bdata"
root@xiaomi:~
|
mkresin: Would you please give the attached patch a try. If it still does not work, please try again with a stock configuration. Means, no extra packages like zram etc. If you report bugs for custom builds, please paste always the output of ./scripts/diffconfig.sh. Btw. your zram seem to have issues as well:
[ 20.226080] zram: Unknown symbol lz4_compress (err 0)
[ 20.231361] zram: Unknown symbol lz4_decompress_unknownoutputsize (err 0)
Seams to me that either a dependency to [[http://lxr.free-electrons.com/source/lib/lz4/Makefile?v=4.4|CONFIG_LZ4*]] is missing or zram is compiled with lz4 support where it should not. Maybe you can investigate the issue by yourself and provide a patch. |
bittorf: is does work! the zram-problem message is there since ages, but zram is working. here the output of the new image, which a produced like this: make menuconfig (my changes) apply your patchmake scp + sysupgrade image her the diffconfig just in case:
here new dmesg without any errors:
|
mkresin: The issue is not fixed by my patch. It took some time till I figured out what's the reason for the jffs2 errors. You have done a sysupgrade from a version prior r1597 and preserved the config. To preserve the config a small jffs2 partition is created and a tar.gz archive with your config files is written to this partition. On next boot, the config is restored from this jffs2 partition. With [[https://git.lede-project.org/925e63e71fa6691f3fa374f71c77d0a91c7e7539|r1597]] I've enabled support for 4KB sectors and the flash chip of the MiWiFi Mini supports 4KB sectors. During sysupgrade with preserving the config from a version prior r1597, a backup partition with 64KB sector size is create. On boot of the new image, the kernel (with 4KB sector size support) recognizes the mismatch of the sector size of the flash chip (0x1000 bytes) and the sector size used for creating the jffs2 backup partition (0x10000 bytes) and at warns about it. Not sure if the restore of the config really worked for you. It was finally fixed by running sysupgrade again. I've no idea how this error could be prevented. The only solution I've so far for upgrading from a pre r1597 is:
Till now I wasn't aware of the jffs2 backup partition and never expected such an issue in regard to enabling 4K support in the kernel. |
s7lx: I have a miwif nano too. how do you use 16M flash ? |
bittorf: @richard: i use a 'mini' not a 'nano'. |
bittorf:
after flashing r2919 i can see strange message with dmesg:
root@lede:~ dmesg | grep -i jffs [ 0.000000] Kernel command line: console=ttyS0,115200 rootfstype=squashfs,jffs2 [ 0.638380] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc. [ 9.908794] jffs2: Node at 0x00000044 with length 0x00001044 would run over the end of the erase block [ 9.918337] jffs2: Perhaps the file system was created with the wrong erase size? [ 9.926009] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000048: 0x1044 instead [ 9.935697] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000004c: 0x586d instead [ 9.945403] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000050: 0x0002 instead [ 9.955094] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000054: 0x0002 instead [ 9.964797] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000058: 0x81a4 instead [ 9.974488] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000060: 0xd8a2 instead [ 9.984190] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000064: 0x9ad1 instead [ 9.993881] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000068: 0x9ad2 instead [ 10.003587] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000006c: 0x9ad2 instead [ 10.013278] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000074: 0x1000 instead [ 10.022959] jffs2: Further such events for this erase block will not be printed [ 11.479386] jffs2: notice: (377) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found. [ 11.496420] block: attempting to load /tmp/jffs_cfg/upper/etc/config/fstab [ 11.525523] jffs2: Node at 0x00000044 with length 0x00001044 would run over the end of the erase block [ 11.535100] jffs2: Perhaps the file system was created with the wrong erase size? [ 11.542896] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000048: 0x1044 instead [ 11.552600] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000004c: 0x586d instead [ 11.562304] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000050: 0x0002 instead [ 11.571994] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000054: 0x0002 instead [ 11.581696] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000058: 0x81a4 instead [ 11.591387] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000060: 0xd8a2 instead [ 11.601089] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000064: 0x9ad1 instead [ 11.610780] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000068: 0x9ad2 instead [ 11.620481] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000006c: 0x9ad2 instead [ 11.630173] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000074: 0x1000 instead [ 11.639854] jffs2: Further such events for this erase block will not be printed [ 13.095966] jffs2: notice: (374) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found. [ 14.064922] block: attempting to load /tmp/jffs_cfg/upper/etc/config/fstab [ 14.086950] mount_root: switching to jffs2 overlay root@lede:~
beside that, it seems that the device is working:
root@lede:~ df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 3.5M 3.5M 0 100% /rom
tmpfs 61.5M 1.1M 60.4M 2% /tmp
/dev/mtdblock6 10.8M 796.0K 10.0M 7% /overlay
overlayfs:/overlay 10.8M 796.0K 10.0M 7% /
tmpfs 512.0K 0 512.0K 0% /dev
tmpfs 2.0M 0 2.0M 0% /coredumps
The text was updated successfully, but these errors were encountered: