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#1547 - ath79/wndr3800: jffs2 errors booting image #8063

Closed
openwrt-bot opened this issue May 13, 2018 · 5 comments
Closed

FS#1547 - ath79/wndr3800: jffs2 errors booting image #8063

openwrt-bot opened this issue May 13, 2018 · 5 comments
Labels

Comments

@openwrt-bot
Copy link

joaochainho:

### SQUASHFS loading 'image/uImage' to 0x80800000 ### SQUASHFS load complete: 1638400 bytes loaded to 0x80800000 ## Booting image at 80800000 ... Image Name: MIPS OpenWrt Linux-4.14.37 Created: 2018-05-12 21:53:44 UTC Image Type: MIPS Linux Kernel Image (lzma compressed) Data Size: 1583450 Bytes = 1.5 MB Load Address: 80060000 Entry Point: 80060000 Verifying Checksum ... OK Uncompressing Kernel Image ... OK No initrd ## Transferring control to Linux (at address 80060000) ... ## Giving linux memsize in bytes, 134217728

Starting kernel ...

[ 0.000000] Linux version 4.14.37 (openwrt@lab) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r6427-ed3860c)) #0 Sat May 12 21:53:44 2018
[ 0.000000] bootconsole [early0] enabled
[ 0.000000] CPU0 revision is: 00019374 (MIPS 24Kc)
[ 0.000000] MIPS: machine is Netgear WNDR3800
[ 0.000000] SoC: Atheros AR7161 rev 2
[ 0.000000] Determined physical RAM map:
[ 0.000000] memory: 08000000 @ 00000000 (usable)
[ 0.000000] Initrd not found or empty - disabling initrd
[ 0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[ 0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[ 0.000000] Zone ranges:
[ 0.000000] Normal [mem 0x0000000000000000-0x0000000007ffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000000000-0x0000000007ffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[ 0.000000] random: get_random_bytes called from start_kernel+0x8c/0x474 with crng_init=0
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 32512
[ 0.000000] Kernel command line: console=ttyS0,115200 root=31:02 rootfstype=jffs2 init=/sbin/init mtdparts=ar7100-nor0:256k(uboot),128k(env),6144k(rootfs),64k(caldata),1024k(uImage) rootfstype=squashfs,jffs2
[ 0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[ 0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[ 0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.000000] Writing ErrCtl register=00000000
[ 0.000000] Readback ErrCtl register=00000000
[ 0.000000] Memory: 123372K/131072K available (3651K kernel code, 141K rwdata, 868K rodata, 1220K init, 212K bss, 7700K reserved, 0K cma-reserved)
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS: 51
[ 0.000000] CPU clock: 680.000 MHz
[ 0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 5621354254 ns
[ 0.000008] sched_clock: 32 bits at 340MHz, resolution 2ns, wraps every 6316128254ns
[ 0.007798] Calibrating delay loop... 452.19 BogoMIPS (lpj=2260992)
[ 0.074072] pid_max: default: 32768 minimum: 301
[ 0.078876] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.085484] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.095783] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.105642] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 0.111794] pinctrl core: initialized pinctrl subsystem
[ 0.117422] NET: Registered protocol family 16
[ 0.426377] PCI host bridge /ahb/apb/pcie-controller@180c0000 ranges:
[ 0.432830] MEM 0x0000000010000000..0x0000000016ffffff
[ 0.438041] IO 0x0000000000000000..0x0000000000000000
[ 0.454372] PCI host bridge to bus 0000:00
[ 0.458475] pci_bus 0000:00: root bus resource [mem 0x10000000-0x16ffffff]
[ 0.465382] pci_bus 0000:00: root bus resource [io 0x0000]
[ 0.470945] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[ 0.477723] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[ 0.486161] pci 0000:00:11.0: BAR 0: assigned [mem 0x10000000-0x1000ffff]
[ 0.492976] pci 0000:00:12.0: BAR 0: assigned [mem 0x10010000-0x1001ffff]
[ 0.500295] clocksource: Switched to clocksource MIPS
[ 0.506186] NET: Registered protocol family 2
[ 0.511221] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.518185] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.524585] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.531070] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.536901] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.543413] NET: Registered protocol family 1
[ 0.550850] Crashlog allocated RAM at address 0x3f00000
[ 0.556915] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[ 0.567315] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.573175] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 0.588710] io scheduler noop registered
[ 0.592681] io scheduler deadline registered (default)
[ 0.598014] ar7100-usb-phy 18030000.usb-phy: phy reset is missing
[ 0.604954] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[ 0.611925] console [ttyS0] disabled
[ 0.615537] 18020000.uart: ttyS0 at MMIO 0x18020000 (irq = 8, base_baud = 10625000) is a 16550A
[ 0.624277] console [ttyS0] enabled
[ 0.624277] console [ttyS0] enabled
[ 0.631242] bootconsole [early0] disabled
[ 0.631242] bootconsole [early0] disabled
[ 0.643469] m25p80 spi0.0: mx25l12805d (16384 Kbytes)
[ 0.648564] 4 fixed-partitions partitions found on MTD device spi0.0
[ 0.654952] Creating 4 MTD partitions on "spi0.0":
[ 0.659738] 0x000000000000-0x000000050000 : "u-boot"
[ 0.665419] 0x000000050000-0x000000070000 : "u-boot-env"
[ 0.671394] 0x000000070000-0x000000ff0000 : "firmware"
[ 0.690082] 2 netgear-fw partitions found on MTD device firmware
[ 0.696117] 0x000000070000-0x0000001f3440 : "kernel"
[ 0.701721] 0x0000001f3440-0x000000ff0000 : "rootfs"
[ 0.707254] mtd: device 4 (rootfs) set to be root filesystem
[ 0.712984] 1 squashfs-split partitions found on MTD device rootfs
[ 0.719154] 0x000000bb0000-0x000000ff0000 : "rootfs_data"
[ 0.725149] 0x000000ff0000-0x000001000000 : "art"
[ 0.730808] Realtek RTL8366S ethernet switch driver version 0.2.2
[ 0.736945] rtl8366s rtl8366s: using GPIO pins 5 (SDA) and 7 (SCK)
[ 0.743256] rtl8366s rtl8366s: RTL8366 ver. 1 chip found
[ 0.796096] libphy: rtl8366s: probed
[ 0.800948] libphy: Fixed MDIO Bus: probed
[ 0.806470] ag71xx 19000000.eth: invalid MAC address, using random address
[ 1.441879] ag71xx 19000000.eth: connected to PHY at fixed-0:00 [uid=00000000, driver=Generic PHY]
[ 1.451417] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RGMII
[ 1.457726] ag71xx 1a000000.eth: invalid MAC address, using random address
[ 1.802150] ag71xx 1a000000.eth: connected to PHY at rtl8366s:04 [uid=001cc960, driver=Generic PHY]
[ 1.811750] eth1: Atheros AG71xx at 0xba000000, irq 5, mode:RGMII
[ 1.819791] NET: Registered protocol family 10
[ 1.827830] Segment Routing with IPv6
[ 1.831634] NET: Registered protocol family 17
[ 1.836110] 8021q: 802.1Q VLAN Support v1.8
[ 1.843723] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000000: 0x3337 instead
[ 1.853247] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000004: 0x436a instead
[ 1.862712] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000008: 0x5af7 instead
[ 1.872175] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000000c: 0x0018 instead
[ 1.881639] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000010: 0xbf07 instead
[ 1.891104] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000014: 0xbf07 instead
[ 1.900568] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000018: 0x84fe instead
[ 1.910023] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000001c: 0x0505 instead
[ 1.919487] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000020: 0x4d49 instead
[ 1.928951] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000024: 0x204f instead
[ 1.938411] jffs2: Further such events for this erase block will not be printed
[ 1.947603] jffs2: Empty flash at 0x000000b0 ends at 0x000000b4
...
[ 2.394143] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040000: 0x75f3 instead
[ 2.403612] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040004: 0xc6b3 instead
[ 2.413075] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040008: 0xc9a5 instead
[ 2.422539] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0004000c: 0x7f22 instead
[ 2.432002] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040010: 0x3134 instead
[ 2.441466] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040014: 0xdee2 instead
[ 2.450931] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040018: 0x5048 instead
[ 2.460394] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0004001c: 0x88ff instead
[ 2.469851] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040020: 0x5b05 instead
[ 2.479314] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040024: 0xdd61 instead
[ 2.488774] jffs2: Further such events for this erase block will not be printed
[ 2.529956] jffs2: Old JFFS2 bitmask found at 0x0004f538
[ 2.535265] jffs2: You cannot use older JFFS2 filesystems with newer kernels
[ 2.542628] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00050000: 0x5031 instead
[ 2.552094] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00050004: 0x82da instead
[ 2.561556] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00050008: 0x1d48 instead
[ 2.571020] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0005000c: 0x2145 instead
[ 2.580480] random: fast init done
...
[ 26.743675] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00b30018: 0xc4f0 instead
[ 26.753154] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00b3001c: 0x214f instead
[ 26.762624] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00b30020: 0xf01e instead
[ 26.772085] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00b30024: 0x3f7e instead
[ 26.781545] jffs2: Further such events for this erase block will not be printed
[ 26.823317] jffs2_scan_eraseblock(): End of filesystem marker found at 0xb40000
[ 26.830632] jffs2: Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes
[ 26.839051] jffs2: empty_blocks 68, bad_blocks 0, c->nr_blocks 248
[ 26.845353] VFS: Cannot open root device "31:02" or unknown-block(31,2): error -5
[ 26.852832] Please append a correct "root=" boot option; here are the available partitions:
[ 26.861173] 1f00 320 mtdblock0
[ 26.861177] (driver?)
[ 26.867698] 1f01 128 mtdblock1
[ 26.867701] (driver?)
[ 26.874226] 1f02 15872 mtdblock2
[ 26.874229] (driver?)
[ 26.880755] 1f03 1549 mtdblock3
[ 26.880758] (driver?)
[ 26.887275] 1f04 14322 mtdblock4
[ 26.887278] (driver?)
[ 26.893804] 1f05 4352 mtdblock5
[ 26.893806] (driver?)
[ 26.900336] 1f06 64 mtdblock6
[ 26.900339] (driver?)
[ 26.906860] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,2)
[ 26.922099] Rebooting in 1 seconds..

@openwrt-bot
Copy link
Author

joaochainho:

Found differences in the command line args:

ar71xx target

[ 0.000000] Kernel command line: board=WNDR3700 mtdparts=spi0.0:320k(u-boot)ro,128k(u-boot-env)ro,15872k(firmware),64k(art)ro console=ttyS0,115200 rootfstype=squashfs noinitrd

** ath79 target**

[ 0.000000] Kernel command line: console=ttyS0,115200 root=31:02 rootfstype=jffs2 init=/sbin/init mtdparts=ar7100-nor0:256k(uboot),128k(env),6144k(rootfs),64k(caldata),1024k(uImage) rootfstype=squashfs,jffs2

@openwrt-bot
Copy link
Author

hnyman:

I compiled today an ath79 image for my WNDR3800 and encountered the same error:
bootcmd looks strange (root=31:02, uboot size wrong), later the mtd partitions look ok, jffs2 markers not found.

console=ttyS0,115200 root=31:02 rootfstype=jffs2 init=/sbin/init mtdparts=ar7100-nor0:256k(uboot),128k(env),6144k(rootfs),64k(caldata),1024k(uImage) rootfstype=squashfs,jffs2

Relevant parts of log below.

*** ath79 master r7161-c8677ca89e 20180608 ***

Starting kernel ...

[ 0.000000] Linux version 4.14.48 (perus@ub1804) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r6781-2c192b6916)) #0 Fri Jun 8 19:54:14 2018
[ 0.000000] bootconsole [early0] enabled
[ 0.000000] CPU0 revision is: 00019374 (MIPS 24Kc)
[ 0.000000] MIPS: machine is Netgear WNDR3800
...
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 32512
[ 0.000000] Kernel command line: console=ttyS0,115200 root=31:02 rootfstype=jffs2 init=/sbin/init mtdparts=ar7100-nor0:256k(uboot),128k(env),6144k(rootfs),64k(caldata),1024k(uImage) rootfstype=squashfs,jffs2
...
[ 0.644436] m25p80 spi0.0: mx25l12805d (16384 Kbytes)
[ 0.649534] 4 fixed-partitions partitions found on MTD device spi0.0
[ 0.655920] Creating 4 MTD partitions on "spi0.0":
[ 0.660707] 0x000000000000-0x000000050000 : "u-boot"
[ 0.666354] 0x000000050000-0x000000070000 : "u-boot-env"
[ 0.672324] 0x000000070000-0x000000ff0000 : "firmware"
[ 0.690986] 2 netgear-fw partitions found on MTD device firmware
[ 0.697031] 0x000000070000-0x0000001fa440 : "kernel"
[ 0.702649] 0x0000001fa440-0x000000ff0000 : "rootfs"
[ 0.708146] mtd: device 4 (rootfs) set to be root filesystem
[ 0.713876] 1 squashfs-split partitions found on MTD device rootfs
[ 0.720051] 0x000000760000-0x000000ff0000 : "rootfs_data"
[ 0.726039] 0x000000ff0000-0x000001000000 : "art"
[ 0.731680] Realtek RTL8366S ethernet switch driver version 0.2.2
...
[ 1.817031] 8021q: 802.1Q VLAN Support v1.8
[ 1.824630] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000000: 0x3337 instead
[ 1.834154] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000004: 0x3927 instead
...
[ 17.266733] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x006e0024: 0x4d07 instead
[ 17.276193] jffs2: Further such events for this erase block will not be printed
[ 17.285393] jffs2: Old JFFS2 bitmask found at 0x006e0278
[ 17.290687] jffs2: You cannot use older JFFS2 filesystems with newer kernels
[ 17.329694] jffs2_scan_eraseblock(): End of filesystem marker found at 0x6f0000
[ 17.337021] jffs2: Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes
[ 17.345449] jffs2: empty_blocks 137, bad_blocks 0, c->nr_blocks 248
[ 17.351812] VFS: Cannot open root device "31:02" or unknown-block(31,2): error -5
[ 17.359274] Please append a correct "root=" boot option; here are the available partitions:
[ 17.367630] 1f00 320 mtdblock0
[ 17.367634] (driver?)
[ 17.374164] 1f01 128 mtdblock1
[ 17.374166] (driver?)
[ 17.380683] 1f02 15872 mtdblock2
[ 17.380686] (driver?)
[ 17.387212] 1f03 1577 mtdblock3
[ 17.387215] (driver?)
[ 17.393750] 1f04 14294 mtdblock4
[ 17.393752] (driver?)
[ 17.400270] 1f05 8768 mtdblock5
[ 17.400273] (driver?)
[ 17.406798] 1f06 64 mtdblock6
[ 17.406801] (driver?)
[ 17.413327] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,2)
[ 17.428485] Rebooting in 1 seconds..

@openwrt-bot
Copy link
Author

hnyman:

Adding a short simple bootcmd helps. Then router boots ok.

See #1026

--- a/target/linux/ath79/dts/ar7161_netgear_wndr3800.dts +++ b/target/linux/ath79/dts/ar7161_netgear_wndr3800.dts @@ -10,6 +10,10 @@ compatible = "netgear,wndr3800", "qca,ar7161"; model = "Netgear WNDR3800";
  •   chosen {
    
  •           bootargs = "console=ttyS0,115200";
    
  •   };
    
  •   memory@0 {
              device_type = "memory";
              reg = <0x0 0x8000000>;
    

It is not yet perfect then, but boots ok, serial console works, ssh works, LuCI works, USB stick is detected

@openwrt-bot
Copy link
Author

adrianschmutzler:

This seems to be fixed and can be closed?

@openwrt-bot
Copy link
Author

hnyman:

It can be closed.
The bug dates to the original ath79 transition over two years ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant