Issues with squashfs image

I am building two images, one squashfs and one initramfs. The initramfs runs fine, but the squash gives me this error:

[    1.833558] hctosys: unable to open rtc device (rtc0)
[    1.839318] /dev/root: Can't open blockdev
[    1.843460] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[    1.850926] Please append a correct "root=" boot option; here are the available partitions:
[    1.859247] 1f00             192 mtdblock0 
[    1.859251]  (driver?)
[    1.865771] 1f01              64 mtdblock1 
[    1.865775]  (driver?)
[    1.872299] 1f02              64 mtdblock2 
[    1.872303]  (driver?)
[    1.878803] 1f03           16064 mtdblock3 
[    1.878805]  (driver?)
[    1.885323] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    1.893586] Rebooting in 1 seconds..

Any tips on what it could be?

it's what the error message indicates, it can't find the root FS.

Where do I append this? Furthermore what do I have to provide? I pretty much compiled this one out of the box.

As kernel param, usually in the boot loader.

Or you're missing some FS support, required for the root FS to be recognized, and mounted.

It's better to show full boot logs.

Full log:

   Image Name:   MIPS OpenWrt Linux-5.4.143
   Image Type:   MIPS Linux Kernel Image (uncompressed)
   Data Size:    2454307 Bytes = 2.3 MiB
   Load Address: 80001000
   Entry Point:  80001000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK



OpenWrt kernel loader for MIPS based SoC

Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>

Decompressing kernel... done!

Starting kernel at 80001000...


[    0.000000] Linux version 5.4.143 (root@z-VirtualBox) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r16279-5cc0535800)) #0 SMP Tue Aug 31 22:20:08 2021
[    0.000000] SoC Type: MediaTek MT7621 ver:1 eco:3
[    0.000000] printk: bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001992f (MIPS 1004Kc)
[    0.000000] MIPS: machine is UniElec U7621-06 (64M flash)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] VPE topology {2,2} total 4
[    0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.000000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000]   HighMem  [mem 0x0000000010000000-0x0000000023ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000001bffffff]
[    0.000000]   node   0: [mem 0x0000000020000000-0x0000000023ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000023ffffff]
[    0.000000] percpu: Embedded 14 pages/cpu s26736 r8192 d22416 u57344
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 130496
[    0.000000] Kernel command line: console=ttyS0,115200 rootfstype=squashfs,jffs2
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000] Writing ErrCtl register=000004c0
[    0.000000] Readback ErrCtl register=000004c0
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 509744K/524288K available (5904K kernel code, 204K rwdata, 1272K rodata, 1244K init, 230K bss, 14544K reserved, 0K cma-reserved, 262144K highmem)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    0.000000] NR_IRQS: 256
[    0.000000] random: get_random_bytes called from start_kernel+0x36c/0x584 with crng_init=0
[    0.000000] CPU Clock: 880MHz
[    0.000000] clocksource: GIC: mask: 0xffffffffffffffff max_cycles: 0xcaf478abb4, max_idle_ns: 440795247997 ns
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 4343773742 ns
[    0.000009] sched_clock: 32 bits at 440MHz, resolution 2ns, wraps every 4880645118ns
[    0.007813] Calibrating delay loop... 583.68 BogoMIPS (lpj=1167360)
[    0.042019] pid_max: 32768 minimum: 301
[    0.046804] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.054031] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.064551] rcu: Hierarchical SRCU implementation.
[    0.070021] smp: Bringing up secondary CPUs ...
[    8.629549] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    8.629560] Pta cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    8.629573] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    8.629676] CPU1 revision is: 0001992f (MIPS 1004Kc)
[    0.102798] Synchronize counters for CPU 1: done.
[    8.198870] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    8.198877] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    8.198886] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    8.198943] CPU2 revision is: 0001992f (MIPS 1004Kc)
[    0.167532] Synchronize counters for CPU 2: done.
[    8.262202] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    8.262209] Pche 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    8.262219] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    8.262280] CPU3 revision is: 0001992f (MIPS 1004Kc)
[    0.225388] Synchronize counters for CPU 3: done.
[    0.255265] smp: Brought up 1 node, 4 CPUs
[    0.263611] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.273297] futex hash table entries: 1024 (order: 3, 32768 bytes, linear)
[    0.280326] pinctrl core: initialized pinctrl subsystem
[    0.287080] NET: Registered protocol family 16
[    0.321463] workqueue: max_active 576 requested for napi_workq is out of range, clamping between 1 and 512
[    0.333373] clocksource: Switched to clocksource GIC
[    0.340410] NET: Registered protocol family 2
[    0.344888] IP idents hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.352707] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.361005] TCP established hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.368596] TCP bind hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.375685] TCP: Hash tables configured (established 2048 bind 2048)
[    0.382105] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.388577] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.395753] NET: Registered protocol family 1
[    0.400071] PCI: CLS 0 bytes, default 32
[    0.493151] 4 CPUs re-calibrate udelay(lpj = 1167360)
[    0.499951] workingset: timestamp_bits=14 max_order=17 bucket_order=3
[    0.509324] random: fast init done
[    0.518539] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.524312] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.535852] bounce: pool size: 64 pages
[    0.541874] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    0.547742] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    0.553535] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    0.559972] Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
[    0.567690] printk: console [ttyS0] disabled
[    0.571976] 1e000c00.uartlite: ttyS0 at MMIO 0x1e000c00 (irq = 19, base_baud = 3125000) is a 16550A
[    0.580960] printk: console [ttyS0] enabled
[    0.580960] printk: console [ttyS0] enabled
[    0.589226] printk: bootconsole [early0] disabled
[    0.589226] printk: bootconsole [early0] disabled
[    0.603830] spi-mt7621 1e000b00.spi: sys_freq: 220000000
[    0.610371] spi-nor spi0.0: mx25l12805d (16384 Kbytes)
[    0.615585] 4 fixed-partitions partitions found on MTD device spi0.0
[    0.621975] Creating 4 MTD partitions on "spi0.0":
[    0.626772] 0x000000000000-0x000000030000 : "bootloader"
[    0.633385] 0x000000030000-0x000000040000 : "config"
[    0.639466] 0x000000040000-0x000000050000 : "factory"
[    0.645674] 0x000000050000-0x000004000000 : "firmware"
[    0.650824] mtd: partition "firmware" extends beyond the end of device "spi0.0" -- size truncated to 0xfb0000
[    0.664507] libphy: Fixed MDIO Bus: probed
[    0.695591] libphy: mdio: probed
[    0.699078] mt7530 mdio-bus:1f: MT7530 adapts as multi-chip module
[    0.707892] mtk_soc_eth 1e100000.ethernet: generated random MAC address d6:fa:70:ab:73:03
[    0.717016] mtk_soc_eth 1e100000.ethernet eth0: mediatek frame engine at 0xbe100000, irq 22
[    0.727478] mt7621-pci 1e140000.pcie: Parsing DT failed
[    0.735417] NET: Registered protocol family 10
[    0.741411] Segment Routing with IPv6
[    0.745251] NET: Registered protocol family 17
[    0.750079] 8021q: 802.1Q VLAN Support v1.8
[    0.756522] gpio-export gpio-export: 1 gpio(s) exported
[    0.761994] mt7530 mdio-bus:1f: MT7530 adapts as multi-chip module
[    0.781077] libphy: dsa slave smi: probed
[    0.785551] mt7530 mdio-bus:1f lan1 (uninitialized): PHY [dsa-0.0:00] driver [Generic PHY]
[    0.795358] mt7530 mdio-bus:1f lan2 (uninitialized): PHY [dsa-0.0:01] driver [Generic PHY]
[    0.805102] mt7530 mdio-bus:1f lan3 (uninitialized): PHY [dsa-0.0:02] driver [Generic PHY]
[    0.814873] mt7530 mdio-bus:1f lan4 (uninitialized): PHY [dsa-0.0:03] driver [Generic PHY]
[    0.824744] mt7530 mdio-bus:1f wan (uninitialized): PHY [dsa-0.0:04] driver [Generic PHY]
[    0.834506] mt7530 mdio-bus:1f: configuring for fixed/rgmii link mode
[    0.845728] DSA: tree 0 setup
[    0.849050] rt2880-pinmux pinctrl: pcie is already enabled
[    0.854679] mt7621-pci-phy 1e149000.pcie-phy: PHY for 0xbe149000 (dual port = 1)
[    0.862272] mt7621-pci-phy 1e14a000.pcie-phy: PHY for 0xbe14a000 (dual port = 0)
[    0.969706] mt7621-pci-phy 1e149000.pcie-phy: Xtal is 40MHz
[    0.975285] mt7621-pci-phy 1e14a000.pcie-phy: Xtal is 40MHz
[    1.080793] mt7621-pci 1e140000.pcie: pcie2 no card, disable it (RST & CLK)
[    1.087744] mt7621-pci 1e140000.pcie: PCIE0 enabled
[    1.092612] mt7621-pci 1e140000.pcie: PCIE1 enabled
[    1.097490] mt7621-pci 1e140000.pcie: PCI coherence region base: 0x60000000, mask/settings: 0xf0000002
[    1.106952] mt7621-pci 1e140000.pcie: PCI host bridge to bus 0000:00
[    1.113317] pci_bus 0000:00: root bus resource [io  0x1e160000-0x1e16ffff]
[    1.120178] pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff]
[    1.127043] pci_bus 0000:00: root bus resource [bus 00-ff]
[    1.132558] pci 0000:00:00.0: [0e8d:0801] type 01 class 0x060400
[    1.138589] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x7fffffff]
[    1.144846] pci 0000:00:00.0: reg 0x14: [mem 0x60600000-0x6060ffff]
[    1.151170] pci 0000:00:00.0: supports D1
[    1.155183] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    1.161364] pci 0000:00:01.0: [0e8d:0801] type 01 class 0x060400
[    1.167394] pci 0000:00:01.0: reg 0x10: [mem 0x00000000-0x7fffffff]
[    1.173654] pci 0000:00:01.0: reg 0x14: [mem 0x60610000-0x6061ffff]
[    1.179964] pci 0000:00:01.0: supports D1
[    1.183969] pci 0000:00:01.0: PME# supported from D0 D1 D3hot
[    1.191285] pci 0000:01:00.0: [14c3:7916] type 00 class 0x000280
[    1.197364] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x000fffff 64bit pref]
[    1.204584] pci 0000:01:00.0: reg 0x18: [mem 0x00000000-0x00003fff 64bit pref]
[    1.211806] pci 0000:01:00.0: reg 0x20: [mem 0x00000000-0x00000fff 64bit pref]
[    1.219137] pci 0000:01:00.0: supports D1 D2
[    1.223402] pci 0000:01:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[    1.230039] pci 0000:01:00.0: 2.000 Gb/s available PCIe bandwidth, limited by 2.5 GT/s x1 link at 0000:00:00.0 (capable of 4.000 Gb/s with 5 GT/s x1 link)
[    1.245204] pci 0000:00:00.0: PCI bridge to [bus 01-ff]
[    1.250431] pci 0000:00:00.0:   bridge window [io  0x0000-0x0fff]
[    1.256511] pci 0000:00:00.0:   bridge window [mem 0x60000000-0x600fffff]
[    1.263288] pci 0000:00:00.0:   bridge window [mem 0x60100000-0x602fffff pref]
[    1.270501] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    1.277355] pci 0000:02:00.0: [14c3:7915] type 00 class 0x000280
[    1.283429] pci 0000:02:00.0: reg 0x10: [mem 0x00000000-0x000fffff 64bit pref]
[    1.290654] pci 0000:02:00.0: reg 0x18: [mem 0x00000000-0x00003fff 64bit pref]
[    1.297876] pci 0000:02:00.0: reg 0x20: [mem 0x00000000-0x00000fff 64bit pref]
[    1.305218] pci 0000:02:00.0: supports D1 D2
[    1.309483] pci 0000:02:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[    1.316115] pci 0000:02:00.0: 2.000 Gb/s available PCIe bandwidth, limited by 2.5 GT/s x1 link at 0000:00:01.0 (capable of 4.000 Gb/s with 5 GT/s x1 link)
[    1.331230] pci 0000:00:01.0: PCI bridge to [bus 02-ff]
[    1.336460] pci 0000:00:01.0:   bridge window [io  0x0000-0x0fff]
[    1.342545] pci 0000:00:01.0:   bridge window [mem 0x60300000-0x603fffff]
[    1.349323] pci 0000:00:01.0:   bridge window [mem 0x60400000-0x605fffff pref]
[    1.356531] pci_bus 0000:02: busn_res: [bus 02-ff] end is updated to 02
[    1.363181] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[    1.369783] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[    1.376730] pci 0000:00:01.0: BAR 0: no space for [mem size 0x80000000]
[    1.383330] pci 0000:00:01.0: BAR 0: failed to assign [mem size 0x80000000]
[    1.390282] pci 0000:00:00.0: BAR 8: assigned [mem 0x60000000-0x600fffff]
[    1.397058] pci 0000:00:00.0: BAR 9: assigned [mem 0x60100000-0x602fffff pref]
[    1.404268] pci 0000:00:01.0: BAR 8: assigned [mem 0x60300000-0x603fffff]
[    1.411056] pci 0000:00:01.0: BAR 9: assigned [mem 0x60400000-0x605fffff pref]
[    1.418267] pci 0000:00:00.0: BAR 1: assigned [mem 0x60600000-0x6060ffff]
[    1.425045] pci 0000:00:01.0: BAR 1: assigned [mem 0x60610000-0x6061ffff]
[    1.431826] pci 0000:00:00.0: BAR 7: assigned [io  0x1e160000-0x1e160fff]
[    1.438605] pci 0000:00:01.0: BAR 7: assigned [io  0x1e161000-0x1e161fff]
[    1.445393] pci 0000:01:00.0: BAR 0: assigned [mem 0x60100000-0x601fffff 64bit pref]
[    1.453131] pci 0000:01:00.0: BAR 2: assigned [mem 0x60200000-0x60203fff 64bit pref]
[    1.460874] pci 0000:01:00.0: BAR 4: assigned [mem 0x60204000-0x60204fff 64bit pref]
[    1.468612] pci 0000:00:00.0: PCI bridge to [bus 01]
[    1.473573] pci 0000:00:00.0:   bridge window [io  0x1e160000-0x1e160fff]
[    1.480347] pci 0000:00:00.0:   bridge window [mem 0x60000000-0x600fffff]
[    1.487123] pci 0000:00:00.0:   bridge window [mem 0x60100000-0x602fffff pref]
[    1.494340] pci 0000:02:00.0: BAR 0: assigned [mem 0x60400000-0x604fffff 64bit pref]
[    1.502082] pci 0000:02:00.0: BAR 2: assigned [mem 0x60500000-0x60503fff 64bit pref]
[    1.509823] pci 0000:02:00.0: BAR 4: assigned [mem 0x60504000-0x60504fff 64bit pref]
[    1.517560] pci 0000:00:01.0: PCI bridge to [bus 02]
[    1.522517] pci 0000:00:01.0:   bridge window [io  0x1e161000-0x1e161fff]
[    1.529293] pci 0000:00:01.0:   bridge window [mem 0x60300000-0x603fffff]
[    1.536064] pci 0000:00:01.0:   bridge window [mem 0x60400000-0x605fffff pref]
[    1.544076] hctosys: unable to open rtc device (rtc0)
[    1.550014] /dev/root: Can't open blockdev
[    1.554138] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[    1.561600] Please append a correct "root=" boot option; here are the available partitions:
[    1.569940] 1f00             192 mtdblock0 
[    1.569944]  (driver?)
[    1.576462] 1f01              64 mtdblock1 
[    1.576465]  (driver?)
[    1.582993] 1f02              64 mtdblock2 
[    1.582996]  (driver?)
[    1.589526] 1f03           16064 mtdblock3 
[    1.589529]  (driver?)
[    1.596046] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    1.604305] Rebooting in 1 seconds..

As you can read in this article openwrt try to parse firmware partition and split it into kernel, rootfs and rootfs_data subpartition. Example log:

Creating 5 MTD partitions on "spi0.0":
0x000000000000-0x000000020000 : "u-boot"
0x000000020000-0x000000160000 : "kernel"
0x000000160000-0x0000007f0000 : "rootfs"
mtd: partition "rootfs" set to be root filesystem
mtd: partition "rootfs_data" created automatically, ofs=2C0000, len=530000
0x0000002c0000-0x0000007f0000 : "rootfs_data"
0x0000007f0000-0x000000800000 : "art"
0x000000020000-0x0000007f0000 : "firmware"

In successful case you see message: mtd:partition "rootfs" set to be root filesystem.
In your case kernel fail to parse firmware partition and don't assign root filesystem:

[    0.621975] Creating 4 MTD partitions on "spi0.0":
[    0.626772] 0x000000000000-0x000000030000 : "bootloader"
[    0.633385] 0x000000030000-0x000000040000 : "config"
[    0.639466] 0x000000040000-0x000000050000 : "factory"
[    0.645674] 0x000000050000-0x000004000000 : "firmware"
[    0.650824] mtd: partition "firmware" extends beyond the end of device "spi0.0" -- size truncated to 0xfb0000

It's very possible that kernel stop parsing firmware because of size error.
BTW why do you use

[    0.000000] MIPS: machine is UniElec U7621-06 (64M flash)

for device with 16M flash?

[    0.610371] spi-nor spi0.0: mx25l12805d (16384 Kbytes)
1 Like

Well, I was trying different sizes to see if there was any difference. Logs with 16m:

   Image Name:   MIPS OpenWrt Linux-5.4.143
   Image Type:   MIPS Linux Kernel Image (uncompressed)
   Data Size:    2454307 Bytes = 2.3 MiB
   Load Address: 80001000
   Entry Point:  80001000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK



OpenWrt kernel loader for MIPS based SoC

Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>

Decompressing kernel... done!

Starting kernel at 80001000...


[    0.000000] Linux version 5.4.143 (root@z-VirtualBox) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r16279-5cc0535800)) #0 SMP Tue Aug 31 22:20:08 2021
[    0.000000] SoC Type: MediaTek MT7621 ver:1 eco:3
[    0.000000] printk: bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001992f (MIPS 1004Kc)
[    0.000000] MIPS: machine is UniElec U7621-06 (16M flash)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] VPE topology {2,2} total 4
[    0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.000000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000]   HighMem  [mem 0x0000000010000000-0x0000000023ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000001bffffff]
[    0.000000]   node   0: [mem 0x0000000020000000-0x0000000023ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000023ffffff]
[    0.000000] percpu: Embedded 14 pages/cpu s26736 r8192 d22416 u57344
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 130496
[    0.000000] Kernel command line: console=ttyS0,115200 rootfstype=squashfs,jffs2
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000] Writing ErrCtl register=000000c0
[    0.000000] Readback ErrCtl register=000000c0
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 509744K/524288K available (5904K kernel code, 204K rwdata, 1272K rodata, 1244K init, 230K bss, 14544K reserved, 0K cma-reserved, 262144K highmem)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    0.000000] NR_IRQS: 256
[    0.000000] random: get_random_bytes called from start_kernel+0x36c/0x584 with crng_init=0
[    0.000000] CPU Clock: 880MHz
[    0.000000] clocksource: GIC: mask: 0xffffffffffffffff max_cycles: 0xcaf478abb4, max_idle_ns: 440795247997 ns
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 4343773742 ns
[    0.000008] sched_clock: 32 bits at 440MHz, resolution 2ns, wraps every 4880645118ns
[    0.007810] Calibrating delay loop... 583.68 BogoMIPS (lpj=1167360)
[    0.042015] pid_max: 32768 minimum: 301
[    0.046797] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.054023] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.064509] rcu: Hierarchical SRCU implementation.
[    0.069972] smp: Bringing up secondary CPUs ...
[    8.630577] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    8.630588] Pa cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    8.630600] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    8.630703] CPU1 revision is: 0001992f (MIPS 1004Kc)
[    0.102743] Synchronize counters for CPU 1: done.
[    8.202027] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    8.202035] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    8.202044] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    8.202100] CPU2 revision is: 0001992f (MIPS 1004Kc)
[    0.167467] Synchronize counters for CPU 2: done.
[    8.265387] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    8.265395] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    8.265405] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    8.265466] CPU3 revision is: 0001992f (MIPS 1004Kc)
[    0.225322] Synchronize counters for CPU 3: done.
[    0.255200] smp: Brought up 1 node, 4 CPUs
[    0.263532] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.273215] futex hash table entries: 1024 (order: 3, 32768 bytes, linear)
[    0.280245] pinctrl core: initialized pinctrl subsystem
[    0.286980] NET: Registered protocol family 16
[    0.321126] workqueue: max_active 576 requested for napi_workq is out of range, clamping between 1 and 512
[    0.332518] clocksource: Switched to clocksource GIC
[    0.339270] NET: Registered protocol family 2
[    0.343787] IP idents hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.351596] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.359905] TCP established hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.367503] TCP bind hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.374591] TCP: Hash tables configured (established 2048 bind 2048)
[    0.381009] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.387492] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.394658] NET: Registered protocol family 1
[    0.398985] PCI: CLS 0 bytes, default 32
[    0.492487] 4 CPUs re-calibrate udelay(lpj = 1163264)
[    0.499059] workingset: timestamp_bits=14 max_order=17 bucket_order=3
[    0.512458] random: fast init done
[    0.520214] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.525990] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.537556] bounce: pool size: 64 pages
[    0.543317] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    0.549158] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    0.554990] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    0.561344] Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
[    0.569143] printk: console [ttyS0] disabled
[    0.573437] 1e000c00.uartlite: ttyS0 at MMIO 0x1e000c00 (irq = 19, base_baud = 3125000) is a 16550A
[    0.582423] printk: console [ttyS0] enabled
[    0.582423] printk: console [ttyS0] enabled
[    0.590683] printk: bootconsole [early0] disabled
[    0.590683] printk: bootconsole [early0] disabled
[    0.605025] spi-mt7621 1e000b00.spi: sys_freq: 220000000
[    0.611329] spi-nor spi0.0: mx25l12805d (16384 Kbytes)
[    0.616585] 4 fixed-partitions partitions found on MTD device spi0.0
[    0.622960] Creating 4 MTD partitions on "spi0.0":
[    0.627759] 0x000000000000-0x000000030000 : "bootloader"
[    0.634373] 0x000000030000-0x000000040000 : "config"
[    0.640712] 0x000000040000-0x000000050000 : "factory"
[    0.647026] 0x000000050000-0x000001000000 : "firmware"
[    0.655747] libphy: Fixed MDIO Bus: probed
[    0.686887] libphy: mdio: probed
[    0.690409] mt7530 mdio-bus:1f: MT7530 adapts as multi-chip module
[    0.699111] mtk_soc_eth 1e100000.ethernet: generated random MAC address 76:fd:43:58:e7:af
[    0.708215] mtk_soc_eth 1e100000.ethernet eth0: mediatek frame engine at 0xbe100000, irq 22
[    0.718597] mt7621-pci 1e140000.pcie: Parsing DT failed
[    0.726328] NET: Registered protocol family 10
[    0.732242] Segment Routing with IPv6
[    0.736072] NET: Registered protocol family 17
[    0.740834] 8021q: 802.1Q VLAN Support v1.8
[    0.747123] gpio-export gpio-export: 1 gpio(s) exported
[    0.752602] mt7530 mdio-bus:1f: MT7530 adapts as multi-chip module
[    0.768423] libphy: dsa slave smi: probed
[    0.772929] mt7530 mdio-bus:1f lan1 (uninitialized): PHY [dsa-0.0:00] driver [Generic PHY]
[    0.782710] mt7530 mdio-bus:1f lan2 (uninitialized): PHY [dsa-0.0:01] driver [Generic PHY]
[    0.792560] mt7530 mdio-bus:1f lan3 (uninitialized): PHY [dsa-0.0:02] driver [Generic PHY]
[    0.802333] mt7530 mdio-bus:1f lan4 (uninitialized): PHY [dsa-0.0:03] driver [Generic PHY]
[    0.812221] mt7530 mdio-bus:1f wan (uninitialized): PHY [dsa-0.0:04] driver [Generic PHY]
[    0.822002] mt7530 mdio-bus:1f: configuring for fixed/rgmii link mode
[    0.833253] DSA: tree 0 setup
[    0.836575] rt2880-pinmux pinctrl: pcie is already enabled
[    0.842205] mt7621-pci-phy 1e149000.pcie-phy: PHY for 0xbe149000 (dual port = 1)
[    0.849785] mt7621-pci-phy 1e14a000.pcie-phy: PHY for 0xbe14a000 (dual port = 0)
[    0.956887] mt7621-pci-phy 1e149000.pcie-phy: Xtal is 40MHz
[    0.962465] mt7621-pci-phy 1e14a000.pcie-phy: Xtal is 40MHz
[    1.067653] mt7621-pci 1e140000.pcie: pcie2 no card, disable it (RST & CLK)
[    1.074606] mt7621-pci 1e140000.pcie: PCIE0 enabled
[    1.079477] mt7621-pci 1e140000.pcie: PCIE1 enabled
[    1.084356] mt7621-pci 1e140000.pcie: PCI coherence region base: 0x60000000, mask/settings: 0xf0000002
[    1.093813] mt7621-pci 1e140000.pcie: PCI host bridge to bus 0000:00
[    1.100176] pci_bus 0000:00: root bus resource [io  0x1e160000-0x1e16ffff]
[    1.107043] pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff]
[    1.113911] pci_bus 0000:00: root bus resource [bus 00-ff]
[    1.119430] pci 0000:00:00.0: [0e8d:0801] type 01 class 0x060400
[    1.125464] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x7fffffff]
[    1.131726] pci 0000:00:00.0: reg 0x14: [mem 0x60600000-0x6060ffff]
[    1.138053] pci 0000:00:00.0: supports D1
[    1.142064] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    1.148165] pci 0000:00:01.0: [0e8d:0801] type 01 class 0x060400
[    1.154209] pci 0000:00:01.0: reg 0x10: [mem 0x00000000-0x7fffffff]
[    1.160492] pci 0000:00:01.0: reg 0x14: [mem 0x60610000-0x6061ffff]
[    1.166805] pci 0000:00:01.0: supports D1
[    1.170815] pci 0000:00:01.0: PME# supported from D0 D1 D3hot
[    1.178054] pci 0000:01:00.0: [14c3:7916] type 00 class 0x000280
[    1.184139] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x000fffff 64bit pref]
[    1.191369] pci 0000:01:00.0: reg 0x18: [mem 0x00000000-0x00003fff 64bit pref]
[    1.198596] pci 0000:01:00.0: reg 0x20: [mem 0x00000000-0x00000fff 64bit pref]
[    1.205930] pci 0000:01:00.0: supports D1 D2
[    1.210200] pci 0000:01:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[    1.216842] pci 0000:01:00.0: 2.000 Gb/s available PCIe bandwidth, limited by 2.5 GT/s x1 link at 0000:00:00.0 (capable of 4.000 Gb/s with 5 GT/s x1 link)
[    1.231927] pci 0000:00:00.0: PCI bridge to [bus 01-ff]
[    1.237173] pci 0000:00:00.0:   bridge window [io  0x0000-0x0fff]
[    1.243261] pci 0000:00:00.0:   bridge window [mem 0x60000000-0x600fffff]
[    1.250041] pci 0000:00:00.0:   bridge window [mem 0x60100000-0x602fffff pref]
[    1.257256] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    1.264055] pci 0000:02:00.0: [14c3:7915] type 00 class 0x000280
[    1.270122] pci 0000:02:00.0: reg 0x10: [mem 0x00000000-0x000fffff 64bit pref]
[    1.277351] pci 0000:02:00.0: reg 0x18: [mem 0x00000000-0x00003fff 64bit pref]
[    1.284578] pci 0000:02:00.0: reg 0x20: [mem 0x00000000-0x00000fff 64bit pref]
[    1.291907] pci 0000:02:00.0: supports D1 D2
[    1.296177] pci 0000:02:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[    1.302817] pci 0000:02:00.0: 2.000 Gb/s available PCIe bandwidth, limited by 2.5 GT/s x1 link at 0000:00:01.0 (capable of 4.000 Gb/s with 5 GT/s x1 link)
[    1.317904] pci 0000:00:01.0: PCI bridge to [bus 02-ff]
[    1.323148] pci 0000:00:01.0:   bridge window [io  0x0000-0x0fff]
[    1.329238] pci 0000:00:01.0:   bridge window [mem 0x60300000-0x603fffff]
[    1.336016] pci 0000:00:01.0:   bridge window [mem 0x60400000-0x605fffff pref]
[    1.343230] pci_bus 0000:02: busn_res: [bus 02-ff] end is updated to 02
[    1.349883] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[    1.356494] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[    1.363446] pci 0000:00:01.0: BAR 0: no space for [mem size 0x80000000]
[    1.370051] pci 0000:00:01.0: BAR 0: failed to assign [mem size 0x80000000]
[    1.377007] pci 0000:00:00.0: BAR 8: assigned [mem 0x60000000-0x600fffff]
[    1.383788] pci 0000:00:00.0: BAR 9: assigned [mem 0x60100000-0x602fffff pref]
[    1.391001] pci 0000:00:01.0: BAR 8: assigned [mem 0x60300000-0x603fffff]
[    1.397784] pci 0000:00:01.0: BAR 9: assigned [mem 0x60400000-0x605fffff pref]
[    1.404999] pci 0000:00:00.0: BAR 1: assigned [mem 0x60600000-0x6060ffff]
[    1.411783] pci 0000:00:01.0: BAR 1: assigned [mem 0x60610000-0x6061ffff]
[    1.418568] pci 0000:00:00.0: BAR 7: assigned [io  0x1e160000-0x1e160fff]
[    1.425350] pci 0000:00:01.0: BAR 7: assigned [io  0x1e161000-0x1e161fff]
[    1.432139] pci 0000:01:00.0: BAR 0: assigned [mem 0x60100000-0x601fffff 64bit pref]
[    1.439884] pci 0000:01:00.0: BAR 2: assigned [mem 0x60200000-0x60203fff 64bit pref]
[    1.447631] pci 0000:01:00.0: BAR 4: assigned [mem 0x60204000-0x60204fff 64bit pref]
[    1.455372] pci 0000:00:00.0: PCI bridge to [bus 01]
[    1.460335] pci 0000:00:00.0:   bridge window [io  0x1e160000-0x1e160fff]
[    1.467116] pci 0000:00:00.0:   bridge window [mem 0x60000000-0x600fffff]
[    1.473895] pci 0000:00:00.0:   bridge window [mem 0x60100000-0x602fffff pref]
[    1.481117] pci 0000:02:00.0: BAR 0: assigned [mem 0x60400000-0x604fffff 64bit pref]
[    1.488862] pci 0000:02:00.0: BAR 2: assigned [mem 0x60500000-0x60503fff 64bit pref]
[    1.496608] pci 0000:02:00.0: BAR 4: assigned [mem 0x60504000-0x60504fff 64bit pref]
[    1.504347] pci 0000:00:01.0: PCI bridge to [bus 02]
[    1.509312] pci 0000:00:01.0:   bridge window [io  0x1e161000-0x1e161fff]
[    1.516090] pci 0000:00:01.0:   bridge window [mem 0x60300000-0x603fffff]
[    1.522869] pci 0000:00:01.0:   bridge window [mem 0x60400000-0x605fffff pref]
[    1.530702] mt7530 mdio-bus:1f: Link is Up - 1Gbps/Full - flow control off
[    1.531067] hctosys: unable to open rtc device (rtc0)
[    1.543555] /dev/root: Can't open blockdev
[    1.547696] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[    1.555157] Please append a correct "root=" boot option; here are the available partitions:
[    1.563496] 1f00             192 mtdblock0 
[    1.563500]  (driver?)
[    1.570031] 1f01              64 mtdblock1 
[    1.570034]  (driver?)
[    1.576562] 1f02              64 mtdblock2 
[    1.576565]  (driver?)
[    1.583082] 1f03           16064 mtdblock3 
[    1.583085]  (driver?)
[    1.589611] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    1.597870] Rebooting in 1 seconds..

Ok. Partition size of firmware is not the reason of error.
In this case your self compiled kernel don't contain needed mtd parser/splitter. Just for test you can compare with release image for UniElec 7621-06 (16M flash).
Or you miss correct compatible property of firmware partition in dts-file for your device. For typical uimage format it looks like:

			firmware: partition@50000 {
				compatible = "denx,uimage";
				label = "firmware";
				reg = <0x50000 0xfb0000>;
			};

The dts-file seems correct:

firmware: partition@50000 {
    compatible = "denx,uimage";
    label = "firmware";
    reg = <0x50000 0xfb0000>;
};

I haven't really touched it. How can I include the mtd parser?

As a side note, the prebuilt release is also giving me the same issue.

Something wrong with installation procedure because of release image have the same error.
Can you interrupt boot process and inspect content of flash at 0x50000 offset from uboot command line? If I'm not mistaken flash is mapped to memory at 0xbfc00000 so command looks like:

md bfc50000

Or you start squashfs image from memory without writing to flash? :slight_smile:

Yes, I am trying to run it from memory, that is probably it. What is the correct way to deploy this? Dump at md bfc50000 gives me only zeroes.

Only initramfs image can be started from memory without writing to flash. It contain ramdisk as root filesystem and don't need flash at all. Squashfs image always try to read flash and find root filesystem there. See Image formats.
So you have to write squashfs image to flash at correct offset ( at 0x50000 in your case).

I wrote the squash to the flash, are you sure it is 0x50000? I could only write at 0x90000, where the firmware partition is. Now it is giving me an error:

Error: no Image found at 0xbfc90000

Same error I get when I try sysupgrade after booting on initramfs.

Edit: I managed to write to 0x50000 but same error.

As I understand your bootloader search firmware at 0x90000 offset of flash. In this case you need to change flash layout in dts-file:

			firmware: partition@90000 {
				compatible = "denx,uimage";
				label = "firmware";
				reg = <0x90000 0xf70000>;
			};

and write firmware at 0x90000.

You are right, it worked. Thanks a lot.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.