Xiaomi Mi WiFi Mini - kern.err kernel Bad cell count for /palmbus@10000000/spi@b00/flash@0/partitions - openwrt 24.10

Good day!
After successfully installing firmware 24.10, I saw errors in the system logs

Mon Feb  3 23:10:01 2025 kern.notice kernel: [    0.873785] 7 fixed-partitions partitions found on MTD device spi0.0
Mon Feb  3 23:10:01 2025 kern.err kernel: [    0.880318] OF: Bad cell count for /palmbus@10000000/spi@b00/flash@0/partitions
Mon Feb  3 23:10:01 2025 kern.err kernel: [    0.887838] OF: Bad cell count for /palmbus@10000000/spi@b00/flash@0/partitions
Mon Feb  3 23:10:01 2025 kern.notice kernel: [    0.895630] Creating 7 MTD partitions on "spi0.0":
Mon Feb  3 23:10:01 2025 kern.notice kernel: [    0.900541] 0x000000000000-0x000000030000 : "u-boot"
Mon Feb  3 23:10:01 2025 kern.notice kernel: [    0.909781] 0x000000030000-0x000000040000 : "u-boot-env"
Mon Feb  3 23:10:01 2025 kern.notice kernel: [    0.917979] 0x000000040000-0x000000050000 : "factory"
Mon Feb  3 23:10:01 2025 kern.err kernel: [    0.926048] OF: Bad cell count for /palmbus@10000000/spi@b00/flash@0/partitions
Mon Feb  3 23:10:01 2025 kern.notice kernel: [    0.933981] 0x000000050000-0x000000fd0000 : "firmware"
Mon Feb  3 23:10:01 2025 kern.notice kernel: [    0.942456] 2 uimage-fw partitions found on MTD device firmware
Mon Feb  3 23:10:01 2025 kern.notice kernel: [    0.948541] Creating 2 MTD partitions on "firmware":
Mon Feb  3 23:10:01 2025 kern.notice kernel: [    0.953636] 0x000000000000-0x0000002771bc : "kernel"
Mon Feb  3 23:10:01 2025 kern.warn kernel: [    0.958709] mtd: partition "kernel" doesn't end on an erase/write block -- force read-only
Mon Feb  3 23:10:01 2025 kern.notice kernel: [    0.969872] 0x0000002771bc-0x000000f80000 : "rootfs"
Mon Feb  3 23:10:01 2025 kern.warn kernel: [    0.975048] mtd: partition "rootfs" doesn't start on an erase/write block boundary -- force read-only
Mon Feb  3 23:10:01 2025 kern.info kernel: [    0.987047] mtd: setting mtd5 (rootfs) as root device
[    0.000000] Linux version 6.6.73 (builder@buildhost) (mipsel-openwrt-linux-musl-gcc (OpenWrt GCC 13.3.0 r28427-6df0e3d02a) 13.3.0, GNU ld (GNU Binutils) 2.42) #0 Mon Feb  3 23:09:37 2025
[    0.000000] Board has DDR2
[    0.000000] Analog PMU set to hw control
[    0.000000] Digital PMU set to hw control
[    0.000000] SoC Type: MediaTek MT7620A ver:2 eco:6
[    0.000000] printk: bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019650 (MIPS 24KEc)
[    0.000000] MIPS: machine is Xiaomi MiWiFi Mini
[    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, PIPT, no 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] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Kernel command line: console=ttyS0,115200 rootfstype=squashfs,jffs2
[    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] Writing ErrCtl register=0007e000
[    0.000000] Readback ErrCtl register=0007e000
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32480
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 120068K/131072K available (6658K kernel code, 620K rwdata, 880K rodata, 1240K init, 241K bss, 11004K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 256
[    0.000000] CPU Clock: 580MHz
[    0.000000] clocksource: systick: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 583261500 ns
[    0.000000] systick: enable autosleep mode
[    0.000000] systick: running - mult: 214748, shift: 32
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6590553264 ns
[    0.000002] sched_clock: 32 bits at 290MHz, resolution 3ns, wraps every 7405115902ns
[    0.007682] Calibrating delay loop... 385.84 BogoMIPS (lpj=1929216)
[    0.073593] pid_max: default: 32768 minimum: 301
[    0.090903] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.097965] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.117074] RCU Tasks Trace: Setting shift to 0 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=1.
[    0.134716] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.144308] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.154220] pinctrl core: initialized pinctrl subsystem
[    0.163503] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.170127] thermal_sys: Registered thermal governor 'step_wise'
[    0.174356] /pinctrl: Fixed dependency cycle(s) with /pinctrl/pinctrl0
[    0.461462] PCI host bridge to bus 0000:00
[    0.465405] pci_bus 0000:00: root bus resource [mem 0x20000000-0x2fffffff]
[    0.472113] pci_bus 0000:00: root bus resource [io  0x10160000-0x1016ffff]
[    0.478748] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.486515] pci 0000:00:00.0: [1814:0801] type 01 class 0x060400
[    0.492310] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x7fffffff]
[    0.498399] pci 0000:00:00.0: reg 0x14: [mem 0x20200000-0x2020ffff]
[    0.504550] pci 0000:00:00.0: supports D1
[    0.508386] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    0.516507] pci 0000:01:00.0: [14c3:7662] type 00 class 0x028000
[    0.522389] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x000fffff 64bit]
[    0.528975] pci 0000:01:00.0: reg 0x30: [mem 0x00000000-0x0000ffff pref]
[    0.535572] pci 0000:01:00.0: PME# supported from D0 D3hot D3cold
[    0.541792] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    0.548211] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 01
[    0.554624] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[    0.561030] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[    0.567788] pci 0000:00:00.0: BAR 8: assigned [mem 0x20000000-0x200fffff]
[    0.574386] pci 0000:00:00.0: BAR 9: assigned [mem 0x20100000-0x201fffff pref]
[    0.581391] pci 0000:00:00.0: BAR 1: assigned [mem 0x20200000-0x2020ffff]
[    0.588006] pci 0000:01:00.0: BAR 0: assigned [mem 0x20000000-0x200fffff 64bit]
[    0.595100] pci 0000:01:00.0: BAR 6: assigned [mem 0x20100000-0x2010ffff pref]
[    0.602112] pci 0000:00:00.0: PCI bridge to [bus 01]
[    0.606920] pci 0000:00:00.0:   bridge window [mem 0x20000000-0x200fffff]
[    0.613521] pci 0000:00:00.0:   bridge window [mem 0x20100000-0x201fffff pref]
[    0.622381] clocksource: Switched to clocksource systick
[    0.641526] NET: Registered PF_INET protocol family
[    0.646644] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.655564] tcp_listen_portaddr_hash hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.663821] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.671299] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.678757] TCP bind hash table entries: 1024 (order: 1, 8192 bytes, linear)
[    0.685620] TCP: Hash tables configured (established 1024 bind 1024)
[    0.692727] MPTCP token hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.700019] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.706382] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.714369] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.719928] PCI: CLS 0 bytes, default 32
[    0.724063] rt-timer 10000100.timer: maximum frequency is 1220Hz
[    0.737427] workingset: timestamp_bits=14 max_order=15 bucket_order=1
[    0.745870] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.751489] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.768480] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    0.778173] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.791316] printk: console [ttyS0] disabled
[    0.796180] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baud = 2500000) is a Palmchip BK-3103
[    0.805904] printk: console [ttyS0] enabled
[    0.814363] printk: bootconsole [early0] disabled
[    0.863910] spi spi0.0: force spi mode3
[    0.868660] spi-nor spi0.0: w25q128 (16384 Kbytes)
[    0.873785] 7 fixed-partitions partitions found on MTD device spi0.0
[    0.880318] OF: Bad cell count for /palmbus@10000000/spi@b00/flash@0/partitions
[    0.887838] OF: Bad cell count for /palmbus@10000000/spi@b00/flash@0/partitions
[    0.895630] Creating 7 MTD partitions on "spi0.0":
[    0.900541] 0x000000000000-0x000000030000 : "u-boot"
[    0.909781] 0x000000030000-0x000000040000 : "u-boot-env"
[    0.917979] 0x000000040000-0x000000050000 : "factory"
[    0.926048] OF: Bad cell count for /palmbus@10000000/spi@b00/flash@0/partitions
[    0.933981] 0x000000050000-0x000000fd0000 : "firmware"
[    0.942456] 2 uimage-fw partitions found on MTD device firmware
[    0.948541] Creating 2 MTD partitions on "firmware":
[    0.953636] 0x000000000000-0x0000002771bc : "kernel"
[    0.958709] mtd: partition "kernel" doesn't end on an erase/write block -- force read-only
[    0.969872] 0x0000002771bc-0x000000f80000 : "rootfs"
[    0.975048] mtd: partition "rootfs" doesn't start on an erase/write block boundary -- force read-only
[    0.987047] mtd: setting mtd5 (rootfs) as root device
[    0.992327] 1 squashfs-split partitions found on MTD device rootfs
[    0.998719] 0x000000650000-0x000000f80000 : "rootfs_data"
[    1.006944] 0x000000fd0000-0x000000fe0000 : "crash"
[    1.014666] 0x000000fe0000-0x000000ff0000 : "reserved"
[    1.022715] 0x000000ff0000-0x000001000000 : "Bdata"
[    1.068192] gsw: setting port4 to ephy mode
[    1.072783] mtk_soc_eth 10100000.ethernet: mdio-bus disabled
[    1.078786] mtk_soc_eth 10100000.ethernet: loaded mt7620 driver
[    1.085769] mtk_soc_eth 10100000.ethernet eth0: mediatek frame engine at 0xb0100000, irq 5
[    1.095025] rt2880_wdt 10000120.watchdog: Initialized
[    1.102981] NET: Registered PF_INET6 protocol family
[    1.116019] Segment Routing with IPv6
[    1.119927] In-situ OAM (IOAM) with IPv6
[    1.124229] NET: Registered PF_PACKET protocol family
[    1.129451] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    1.143085] 8021q: 802.1Q VLAN Support v1.8
[    1.195202] clk: Disabling unused clocks
[    1.208763] VFS: Mounted root (squashfs filesystem) readonly on device 31:5.
[    1.222871] Freeing unused kernel image (initmem) memory: 1240K
[    1.228937] This architecture does not have kernel memory protection.
[    1.235547] Run /sbin/init as init process
[    1.239728]   with arguments:
[    1.239737]     /sbin/init
[    1.239746]   with environment:
[    1.239753]     HOME=/
[    1.239760]     TERM=linux
[    2.169640] init: Console is alive
[    2.173723] init: - watchdog -
[    3.317445] mtk_soc_eth 10100000.ethernet eth0: port 4 link up (100Mbps/Full duplex)
[    3.681095] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    3.776392] usbcore: registered new interface driver usbfs
[    3.782302] usbcore: registered new interface driver hub
[    3.787846] usbcore: registered new device driver usb
[    3.797901] gpio_button_hotplug: loading out-of-tree module taints kernel.
[    3.825727] mtk_soc_eth 10100000.ethernet eth0: port 1 link up (100Mbps/Full duplex)
[    3.837887] phy phy-usbphy.0: remote usb device wakeup disabled
[    3.843950] phy phy-usbphy.0: UTMI 16bit 30MHz
[    3.848490] ehci-platform 101c0000.ehci: EHCI Host Controller
[    3.854406] ehci-platform 101c0000.ehci: new USB bus registered, assigned bus number 1
[    3.862721] ehci-platform 101c0000.ehci: irq 26, io mem 0x101c0000
[    3.877851] ehci-platform 101c0000.ehci: USB 2.0 started, EHCI 1.00
[    3.885703] hub 1-0:1.0: USB hub found
[    3.890804] hub 1-0:1.0: 1 port detected
[    3.906962] ohci-platform 101c1000.ohci: Generic Platform OHCI controller
[    3.914044] ohci-platform 101c1000.ohci: new USB bus registered, assigned bus number 2
[    3.922400] ohci-platform 101c1000.ohci: irq 26, io mem 0x101c1000
[    3.959012] hub 2-0:1.0: USB hub found
[    3.963663] hub 2-0:1.0: 1 port detected
[    3.981004] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    3.993241] init: - preinit -
[    8.167133] random: crng init done
[    9.362226] 8021q: adding VLAN 0 to HW filter on device eth0
[   11.067234] mount_root: jffs2 not ready yet, using temporary tmpfs overlay
[   11.087080] urandom-seed: Seed file not found (/etc/urandom.seed)
[   11.199517] procd: - early -
[   11.202818] procd: - watchdog -
[   11.789074] procd: - watchdog -
[   11.793594] procd: - ubus -
[   11.967798] procd: - init -
[   13.739760] kmodloader: loading kernel modules from /etc/modules.d/*
[   14.454088] jitterentropy: Initialization failed with host not compliant with requirements: 9
[   14.912455] Loading modules backported from Linux version v6.12.6-0-ge9d65b48ce1a
[   14.920198] Backport generated by backports.git v6.1.110-1-35-g410656ef04d2
[   15.565904] mt76x2e 0000:01:00.0: card - bus=0x1, slot = 0x0 irq=4
[   15.572545] mt76x2e 0000:01:00.0: ASIC revision: 76120044
[   16.274731] mt76x2e 0000:01:00.0: ROM patch build: 20141115060606a
[   16.305613] mt76x2e 0000:01:00.0: Firmware Version: 0.0.00
[   16.311257] mt76x2e 0000:01:00.0: Build: 1
[   16.315507] mt76x2e 0000:01:00.0: Build Time: 201607111443____
[   16.383510] mt76x2e 0000:01:00.0: Firmware running!
[   16.388713] mt76x2e 0000:01:00.0: registering led 'mt76-phy0'
[   16.396627] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   16.727001] PPP generic driver version 2.4.2
[   16.747392] NET: Registered PF_PPPOX protocol family
[   16.896418] ieee80211 phy1: rt2x00_set_rt: Info - RT chipset 6352, rev 0500 detected
[   16.904851] ieee80211 phy1: rt2x00_set_rf: Info - RF chipset 7620 detected
[   16.913702] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
[   17.373193] jitterentropy: Initialization failed with host not compliant with requirements: 9
[   18.261579] kmodloader: 1 module could not be probed
[   18.279848] kmodloader: - jitterentropy_rng - 0
[   62.749545] mtk_soc_eth 10100000.ethernet eth0: port 1 link down
[   65.299946] mtk_soc_eth 10100000.ethernet eth0: port 1 link up (100Mbps/Full duplex)
[  116.368232] mtk_soc_eth 10100000.ethernet eth0: port 1 link down
[  118.907371] mtk_soc_eth 10100000.ethernet eth0: port 1 link up (100Mbps/Full duplex)
[  148.475974] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[  148.523546] jffs2_build_filesystem(): unlocking the mtd device... 
[  148.523628] done.
[  148.531902] jffs2_build_filesystem(): erasing all blocks after the end marker... 
[  150.351174] 8021q: adding VLAN 0 to HW filter on device eth0
[  150.474060] br-lan: port 1(eth0.1) entered blocking state
[  150.479621] br-lan: port 1(eth0.1) entered disabled state
[  150.485259] eth0.1: entered allmulticast mode
[  150.489725] mtk_soc_eth 10100000.ethernet eth0: entered allmulticast mode
[  150.497085] eth0.1: entered promiscuous mode
[  150.501476] mtk_soc_eth 10100000.ethernet eth0: entered promiscuous mode
[  150.663832] br-lan: port 1(eth0.1) entered blocking state
[  150.669423] br-lan: port 1(eth0.1) entered forwarding state
[  191.334010] urngd: v1.0.2 started.
[  198.455767] done.
[  198.457792] jffs2: notice: (2069) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[  199.064523] overlayfs: upper fs does not support tmpfile.
[  237.637480] mtk_soc_eth 10100000.ethernet eth0: port 1 link down
[  240.345320] mtk_soc_eth 10100000.ethernet eth0: port 1 link up (100Mbps/Full duplex)
[  510.718843] br-lan: port 2(phy0-ap0) entered blocking state
[  510.724667] br-lan: port 2(phy0-ap0) entered disabled state
[  510.730413] mt76x2e 0000:01:00.0 phy0-ap0: entered allmulticast mode
[  510.737487] mt76x2e 0000:01:00.0 phy0-ap0: entered promiscuous mode
[  511.732277] br-lan: port 2(phy0-ap0) entered blocking state
[  511.738086] br-lan: port 2(phy0-ap0) entered forwarding state
[  519.087494] br-lan: port 3(phy1-ap0) entered blocking state
[  519.093301] br-lan: port 3(phy1-ap0) entered disabled state
[  519.099123] rt2800_wmac 10180000.wmac phy1-ap0: entered allmulticast mode
[  519.106624] rt2800_wmac 10180000.wmac phy1-ap0: entered promiscuous mode
[  520.331270] br-lan: port 3(phy1-ap0) entered blocking state
[  520.337021] br-lan: port 3(phy1-ap0) entered forwarding state

Tell me if this is normal or will it cause problems. I would appreciate any answer, thank you.

It is small inaccuracy in dts file not affecting device operation. Also unaligned readonly partitions are totally expected.

Thank you for your response, out of curiosity, I'd like to fix it.

Source here (device-specific file includes manufacturer, series, soc and architecture dtsi files)

something about partitions. Interpret each line using devicetree specifications.

no need to do anything about kernel/rootfs alignment, they are intentionally packed together ti save 64-128kB flash space.

1 Like

Thank you.