Hi! thanks for help in 128mb nand and sorry for reviving an old topics. I'm currently trying to boot openwrt and get VFS: Cannot open root device
with ubi0 error: validate_ec_hdr: bad VID header offset 256, expected 512
. Here is my bootcmd and bootargs am i missing something or get it all wrong? Thanks!
Marvell>> set bootargs 'ubi.mtd=3 rootfstype=ubifs root=/dev/mtdblock3'
Marvell>> set bootcmd 'nand read 2000000 100000 400000;bootm'
Marvell>> boot
Here is the boot log
NAND read: device 0 offset 0x100000, size 0x400000
4194304 bytes read: OK
## Booting kernel from Legacy Image at 02000000 ...
Image Name: ARM OpenWrt Linux-5.15.114
Created: 2023-06-03 8:27:00 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2808587 Bytes = 2.7 MB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 5.15.114 (catzy@catzy-550-red-arc) (arm-openwrt-linux-muslgnueabi-gcc (OpenWrt GCC 12.3.0 r23339-5cb870bdd6) 12.3.0, GNU ld (GNU Binutils) 2.40.0) #0 Sat Jun 3 08:27:00 2023
[ 0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[ 0.000000] CPU: VIVT data cache, VIVT instruction cache
[ 0.000000] OF: fdt: Machine model: ZTE F460 F660
[ 0.000000] Memory policy: Data cache writeback
[ 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] Built 1 zonelists, mobility grouping on. Total pages: 32480
[ 0.000000] Kernel command line: ubi.mtd=3 rootfstype=ubifs root=/dev/mtdblock3
[ 0.000000] Unknown kernel command line parameters "mangled_fs=ubifs mangled_rootblock=3", will be passed to user space.
[ 0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 119708K/131072K available (5927K kernel code, 576K rwdata, 1520K rodata, 1024K init, 209K bss, 11364K reserved, 0K cma-reserved)
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[ 0.000001] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[ 0.000043] Switching to timer-based delay loop, resolution 5ns
[ 0.000201] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=2000000)
[ 0.000236] pid_max: default: 32768 minimum: 301
[ 0.001556] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.001594] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.003535] CPU: Testing write buffer coherency: ok
[ 0.005100] Setting up static identity map for 0x100000 - 0x10003c
[ 0.005350] mvebu-soc-id: MVEBU SoC ID=0x6560, Rev=0x2
[ 0.009424] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.009466] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[ 0.009729] pinctrl core: initialized pinctrl subsystem
[ 0.011669] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[ 0.012102] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.013350] thermal_sys: Registered thermal governor 'step_wise'
[ 0.013438] cpuidle: using governor ladder
[ 0.013780] Feroceon L2: Enabling L2
[ 0.013825] Feroceon L2: Cache support initialised.
[ 0.019552] No ATAGs?
[ 0.027576] SCSI subsystem initialized
[ 0.028075] usbcore: registered new interface driver usbfs
[ 0.028136] usbcore: registered new interface driver hub
[ 0.028188] usbcore: registered new device driver usb
[ 0.029485] clocksource: Switched to clocksource orion_clocksource
[ 0.030983] NET: Registered PF_INET protocol family
[ 0.031180] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[ 0.031782] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[ 0.031828] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[ 0.031852] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.031883] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.031912] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.032021] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[ 0.032057] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[ 0.032389] NET: Registered PF_UNIX/PF_LOCAL protocol family
[ 0.032439] PCI: CLS 0 bytes, default 32
[ 0.034540] workingset: timestamp_bits=14 max_order=15 bucket_order=1
[ 0.040919] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.040948] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 0.044839] armada-370-pinctrl f1018000.pinctrl: registered pinctrl driver
[ 0.046709] mvebu-pcie mbus@f1000000:pcie@82000000: host bridge /mbus@f1000000/pcie@82000000 ranges:
[ 0.046768] mvebu-pcie mbus@f1000000:pcie@82000000: MEM 0x00f1040000..0x00f1041fff -> 0x0000040000
[ 0.046807] mvebu-pcie mbus@f1000000:pcie@82000000: MEM 0x00f1044000..0x00f1045fff -> 0x0000044000
[ 0.046843] mvebu-pcie mbus@f1000000:pcie@82000000: MEM 0x00f1080000..0x00f1081fff -> 0x0000080000
[ 0.046877] mvebu-pcie mbus@f1000000:pcie@82000000: MEM 0xffffffffffffffff..0x00fffffffe -> 0x0100000000
[ 0.046911] mvebu-pcie mbus@f1000000:pcie@82000000: IO 0xffffffffffffffff..0x00fffffffe -> 0x0100000000
[ 0.046944] mvebu-pcie mbus@f1000000:pcie@82000000: MEM 0xffffffffffffffff..0x00fffffffe -> 0x0200000000
[ 0.046970] mvebu-pcie mbus@f1000000:pcie@82000000: IO 0xffffffffffffffff..0x00fffffffe -> 0x0200000000
[ 0.047271] mvebu-pcie mbus@f1000000:pcie@82000000: PCI host bridge to bus 0000:00
[ 0.047294] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 0.047317] pci_bus 0000:00: root bus resource [mem 0xf1040000-0xf1041fff] (bus address [0x00040000-0x00041fff])
[ 0.047339] pci_bus 0000:00: root bus resource [mem 0xf1044000-0xf1045fff] (bus address [0x00044000-0x00045fff])
[ 0.047360] pci_bus 0000:00: root bus resource [mem 0xf1080000-0xf1081fff] (bus address [0x00080000-0x00081fff])
[ 0.047379] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[ 0.047396] pci_bus 0000:00: root bus resource [io 0x1000-0xeffff]
[ 0.047523] pci 0000:00:01.0: [11ab:6560] type 01 class 0x060400
[ 0.047832] pci 0000:00:02.0: [11ab:6500] type 01 class 0x060400
[ 0.048854] PCI: bus0: Fast back to back transfers disabled
[ 0.048874] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[ 0.048898] pci 0000:00:02.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[ 0.049955] PCI: bus1: Fast back to back transfers enabled
[ 0.049976] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[ 0.050184] pci 0000:02:00.0: [10ec:8191] type 00 class 0x028000
[ 0.050226] pci 0000:02:00.0: reg 0x10: [io 0xf2000000-0xf20000ff]
[ 0.050269] pci 0000:02:00.0: reg 0x18: [mem 0x44000000-0x44003fff 64bit]
[ 0.050398] pci 0000:02:00.0: supports D1 D2
[ 0.050414] pci 0000:02:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[ 0.051446] PCI: bus2: Fast back to back transfers disabled
[ 0.051465] pci_bus 0000:02: busn_res: [bus 02-ff] end is updated to 02
[ 0.051690] pci 0000:00:02.0: BAR 8: assigned [mem 0xe0000000-0xe00fffff]
[ 0.051716] pci 0000:00:02.0: BAR 7: assigned [io 0x10000-0x10fff]
[ 0.051736] pci 0000:00:01.0: PCI bridge to [bus 01]
[ 0.051763] pci 0000:02:00.0: BAR 2: assigned [mem 0xe0000000-0xe0003fff 64bit]
[ 0.051794] pci 0000:02:00.0: BAR 0: assigned [io 0x10000-0x100ff]
[ 0.051817] pci 0000:00:02.0: PCI bridge to [bus 02]
[ 0.051834] pci 0000:00:02.0: bridge window [io 0x10000-0x10fff]
[ 0.051857] pci 0000:00:02.0: bridge window [mem 0xe0000000-0xe00fffff]
[ 0.052365] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[ 0.053085] printk: console [ttyS0] disabled
[ 0.053188] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 30, base_baud = 12500000) is a 16550A
[ 0.755994] printk: console [ttyS0] enabled
[ 0.761339] nand: device found, Manufacturer ID: 0x01, Chip ID: 0xf1
[ 0.767738] nand: AMD/Spansion S34ML01G1
[ 0.771711] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[ 0.779345] Scanning device for bad blocks
[ 0.836983] Bad eraseblock 491 at 0x000003d60000
[ 0.899593] 4 fixed-partitions partitions found on MTD device orion_nand
[ 0.906338] Creating 4 MTD partitions on "orion_nand":
[ 0.911520] 0x000000000000-0x0000000c0000 : "u-boot"
[ 0.920528] 0x0000000c0000-0x000000100000 : "uboot_env"
[ 0.926443] 0x000000100000-0x000000400000 : "kernel"
[ 0.933536] 0x000000400000-0x000002000000 : "ubi"
[ 0.946074] mv88e6085 f1072004.mdio-bus-mii:08: switch 0x440 detected: Marvell 88E6351, revision 2
[ 1.150160] mvneta f1070000.ethernet eth0: Using hardware mac address 00:50:43:00:02:02
[ 1.158486] i2c_dev: i2c /dev entries driver
[ 1.163576] orion_wdt: Initial timeout 21 sec
[ 1.170839] NET: Registered PF_INET6 protocol family
[ 1.190281] Segment Routing with IPv6
[ 1.194046] In-situ OAM (IOAM) with IPv6
[ 1.198081] NET: Registered PF_PACKET protocol family
[ 1.203398] 8021q: 802.1Q VLAN Support v1.8
[ 1.212933] mv88e6085 f1072004.mdio-bus-mii:08: switch 0x440 detected: Marvell 88E6351, revision 2
[ 2.383950] mv88e6085 f1072004.mdio-bus-mii:08: configuring for fixed/ link mode
[ 2.400551] mv88e6085 f1072004.mdio-bus-mii:08: Link is Up - 1Gbps/Full - flow control off
[ 2.499568] mv88e6085 f1072004.mdio-bus-mii:08 internet (uninitialized): PHY [mv88e6xxx-1:00] driver [Marvell 88E1540] (irq=45)
[ 2.531714] mv88e6085 f1072004.mdio-bus-mii:08 ethernet1 (uninitialized): PHY [mv88e6xxx-1:01] driver [Marvell 88E3016] (irq=46)
[ 2.558410] mv88e6085 f1072004.mdio-bus-mii:08 ethernet2 (uninitialized): PHY [mv88e6xxx-1:02] driver [Marvell 88E3016] (irq=47)
[ 2.587471] mv88e6085 f1072004.mdio-bus-mii:08 ethernet3 (uninitialized): PHY [mv88e6xxx-1:03] driver [Marvell 88E3016] (irq=48)
[ 2.606088] DSA: tree 0 setup
[ 2.609409] ubi0: attaching mtd3
[ 2.612999] ubi0 error: validate_ec_hdr: bad VID header offset 256, expected 512
[ 2.620487] ubi0 error: validate_ec_hdr: bad EC header
[ 2.625663] Erase counter header dump:
[ 2.629430] magic 0x55424923
[ 2.633212] version 1
[ 2.636198] ec 0
[ 2.639182] vid_hdr_offset 256
[ 2.642350] data_offset 512
[ 2.645510] image_seq 1685780820
[ 2.649279] hdr_crc 0xaf8992df
[ 2.653058] erase counter header hexdump:
[ 2.657121] CPU: 0 PID: 1 Comm: swapper Not tainted 5.15.114 #0
[ 2.663089] Hardware name: Marvell Kirkwood (Flattened Device Tree)
[ 2.669397] [<c01074e0>] (unwind_backtrace) from [<c0104650>] (show_stack+0x10/0x14)
[ 2.677221] [<c0104650>] (show_stack) from [<c04a2384>] (validate_ec_hdr+0x11c/0x170)
[ 2.685126] [<c04a2384>] (validate_ec_hdr) from [<c04a2fa4>] (ubi_io_read_ec_hdr+0x1b4/0x254)
[ 2.693724] [<c04a2fa4>] (ubi_io_read_ec_hdr) from [<c04a8054>] (ubi_attach+0x3e0/0x15f4)
[ 2.701975] [<c04a8054>] (ubi_attach) from [<c049c960>] (ubi_attach_mtd_dev+0x430/0xae8)
[ 2.710144] [<c049c960>] (ubi_attach_mtd_dev) from [<c0919428>] (ubi_init+0xfc/0x340)
[ 2.718035] [<c0919428>] (ubi_init) from [<c0101568>] (do_one_initcall+0x50/0x1fc)
[ 2.725672] [<c0101568>] (do_one_initcall) from [<c0901208>] (kernel_init_freeable+0x168/0x1f0)
[ 2.734454] [<c0901208>] (kernel_init_freeable) from [<c06c41ec>] (kernel_init+0x10/0x120)
[ 2.742792] [<c06c41ec>] (kernel_init) from [<c0100108>] (ret_from_fork+0x14/0x2c)
[ 2.750425] Exception stack(0xc101dfb0 to 0xc101dff8)
[ 2.755512] dfa0: 00000000 00000000 00000000 00000000
[ 2.763749] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 2.771985] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000
[ 2.778636] ubi0 error: ubi_io_read_ec_hdr: validation failed for PEB 0
[ 2.785311] ubi0 error: ubi_attach_mtd_dev: failed to attach mtd3, error -22
[ 2.793407] UBI error: cannot attach mtd3
[ 2.814664] random: crng init done
[ 2.908685] /dev/root: Can't open blockdev
[ 2.916820] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[ 2.928230] Please append a correct "root=" boot option; here are the available partitions:
[ 2.942276] 1f00 768 mtdblock0
[ 2.943365] (driver?)
[ 2.957611] 1f01 256 mtdblock1
[ 2.958698] (driver?)
[ 2.972953] 1f02 3072 mtdblock2
[ 2.974040] (driver?)
[ 2.988286] 1f03 28672 mtdblock3
[ 2.989373] (driver?)
[ 2.997618] irq 30: nobody cared (try booting with the "irqpoll" option)
[ 2.997626] CPU: 0 PID: 1 Comm: swapper Not tainted 5.15.114 #0
[ 2.997637] Hardware name: Marvell Kirkwood (Flattened Device Tree)
[ 2.997646] [<c01074e0>] (unwind_backtrace) from [<c0104650>] (show_stack+0x10/0x14)
[ 2.997677] [<c0104650>] (show_stack) from [<c0150fe4>] (__report_bad_irq+0x30/0xb4)
[ 2.997705] [<c0150fe4>] (__report_bad_irq) from [<c0151368>] (note_interrupt+0x28c/0x2f0)
[ 2.997726] [<c0151368>] (note_interrupt) from [<c014e69c>] (handle_irq_event+0x78/0x7c)
[ 2.997746] [<c014e69c>] (handle_irq_event) from [<c0151c0c>] (handle_level_irq+0x9c/0x170)
[ 2.997766] [<c0151c0c>] (handle_level_irq) from [<c014def8>] (handle_domain_irq+0x50/0x6c)
[ 2.997785] [<c014def8>] (handle_domain_irq) from [<c03d0e84>] (orion_handle_irq+0x64/0x88)
[ 2.997813] [<c03d0e84>] (orion_handle_irq) from [<c0100ab8>] (__irq_svc+0x58/0x6c)
[ 2.997831] Exception stack(0xc101dca0 to 0xc101dce8)
[ 2.997846] dca0: c101dd92 c101dccb 00000000 00000000 c101dd92 ffffffff 00000020 c101dd5c
[ 2.997859] dcc0: 0000000a ffffffff c101dd8c 00000000 00000000 c101dcec 00000000 c03c85ec
[ 2.997867] dce0: 60000013 ffffffff
[ 2.997873] [<c0100ab8>] (__irq_svc) from [<c03c85ec>] (number+0x344/0x44c)
[ 2.997891] [<c03c85ec>] (number) from [<00000002>] (0x2)
[ 2.997907] handlers:
[ 2.997909] [<f1c1fc63>] serial8250_interrupt
[ 2.997936] Disabling IRQ #30
[ 3.131274] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 3.139587] Rebooting in 1 seconds..