Skip to content
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#3925 - wgt634u: jffs2 Filesystem overwrites the bootloader param partition #8925

Closed
openwrt-bot opened this issue Jul 10, 2021 · 1 comment
Closed
Labels
flyspray release/19.07

Comments

@openwrt-bot
Copy link

@openwrt-bot openwrt-bot commented Jul 10, 2021

yvjek:

Supply the following if possible:

  • Device problem occurs on WGT643u
  • Software versions of OpenWrt/LEDE OpenWrt 19.07
    Steps to reproduce:
  • after fresh install I installed some bigger packages then the system hangs
  • a reboot with power off/on not working
  • The serial/UART/Terminal of the box shows the bootloader stops because the param partition at the end of the flash was overwritten and the checksum was wrong

It seems the partition size of the jffs2 partition is wrong.

Linux side:
root@OpenWrt:/# cat /proc/partitions
major minor #blocks name

31 0 640 mtdblock0
31 1 7424 mtdblock1
31 2 2 mtdblock2
31 3 1324 mtdblock3
31 4 6097 mtdblock4
31 5 3456 mtdblock5
31 6 128 mtdblock6 -->param partition

root@OpenWrt:/# cat /proc/mtd
dev: size erasesize name
mtd0: 000a0000 00020000 "boot"
mtd1: 00740000 00020000 "firmware"
mtd2: 00000928 00000928 "loader"
mtd3: 0014b2bc 00020000 "linux"
mtd4: 005f4400 00020000 "rootfs"
mtd5: 00360000 00020000 "rootfs_data"
mtd6: 00020000 00020000 "nvram" -->bootloader param partition == 131072 bytes (Bootloader says 8KB...)

root@OpenWrt:/# mount
/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,noatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
tmpfs on /tmp/root type tmpfs (rw,noatime,mode=755)
overlayfs:/tmp/root on / type overlay (rw,noatime,lowerdir=/,upperdir=/tmp/root/upper,workdir=/tmp/root/wo)
tmpfs on /dev type tmpfs (rw,nosuid,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,mode=600,ptmxmode=000)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)

UART/Terminal shows after boot:
[ 127.964107] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000000: 0x0c3b instead
[ 128.053636] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000004: 0x58cd instead
[ 128.063208] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000008: 0x54cc instead
[ 128.193636] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000000c: 0x6859 instead
[ 128.203202] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000010: 0x916a instead
[ 128.283363] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000014: 0x9d93 instead
[ 128.303639] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000018: 0x6b25 instead
[ 128.313209] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000001c: 0x54bb instead
[ 128.413768] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000020: 0xeacc instead
[ 128.423620] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000024: 0x8dc5 instead
[ 128.433144] jffs2: Further such events for this erase block will not be printed
[ 128.829317] jffs2: Empty flash at 0x00010004 ends at 0x00011000
[ 128.884133] jffs2: Empty flash at 0x00011004 ends at 0x00012000
[ 128.891154] jffs2: Empty flash at 0x00012004 ends at 0x00014000
[ 128.999749] jffs2_scan_eraseblock(): End of filesystem marker found at 0x20000
[ 129.133686] jffs2: Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes
[ 129.142209] jffs2: empty_blocks 26, bad_blocks 0, c->nr_blocks 27

root@OpenWrt:/# reboot
root@OpenWrt:/# ^C

See on the UART/Terminal while power on and press CTRL-C long:

CFE version 1.0.34 for BCM95365R (32bit,SP,LE)
Build Date: Tue Feb 24 03:21:41 CST 2004 (root@jackylinux)
Copyright (C) 2000,2001,2002 Broadcom Corporation.

Add MAC client version(DNI).
Initializing Arena.
Initializing Devices.
et0: Broadcom BCM47xx 10/100 Mbps Ethernet Controller
CPU type 0x29007: 200MHz
Total memory: 0x2000000 bytes (32MB)

Total memory used by CFE: 0x81BB1280 - 0x82000000 (4517248)
Initialized Data: 0x81BB1280 - 0x81BB3E90 (11280)
BSS Area: 0x81BB3E90 - 0x81BB45D0 (1856)
Local Heap: 0x81BB45D0 - 0x81FB45D0 (4194304)
Stack Area: 0x81FB45D0 - 0x81FB65D0 (8192)
Text (code) segment: 0x81FB65E0 - 0x81FFFFB0 (301520)
Boot area (physical): 0x01B70000 - 0x01BB0000
Relocation Factor: I:E23B65E0 - D:01BB0280

configure vlans


*********************** VLAN Driver initial ********************


Process LAN port(2-5) vlan Architecture...
SUCCESS: trying to create VLAN 0 for switch
SUCCESS: trying to add LAN port

Process WAN port(2-5) vlan Architecture...
SUCCESS: trying to create VLAN 0 for switch
SUCCESS: trying to add WAN port
SUCCESS: enable ports success
configure vlans...done
Automatic startup canceled via Ctrl-C

CFE> show devices
Device Name Description


uart0 NS16550 UART at 0x18000300
uart1 NS16550 UART at 0x18000400
flash0.boot New CFI flash at 1C000000 offset 00000000 size 384KB
flash0.config New CFI flash at 1C000000 offset 00060000 size 128KB
flash0.os New CFI flash at 1C000000 offset 00080000 size 7672KB
flash0.nvram New CFI flash at 1C000000 offset 007FE000 size 8KB ----->param partition for bootloader

please fix the jffs2 partition size!

@aparcar aparcar added the release/19.07 label Feb 22, 2022
@ynezz
Copy link
Member

@ynezz ynezz commented May 24, 2022

OpenWrt 19.07 release is EOL, try to reproduce the issue with latest supported release and feel free to ask for issue reopening if the problem is still present, thanks.

@ynezz ynezz closed this as completed May 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray release/19.07
Projects
None yet
Development

No branches or pull requests

3 participants