Dts - image Code for redboot device.Help

Hi, i am facing this problem that i could not seek proper code to get it to run..

OEM mtd @ booting from primary

Generic platform RAM MTD, (c) 2004 Simtec Electronics
Embedded root device: 0x396000 at 0x29d000
ar7100 flash: size is 16MB
Creating 8 MTD partitions on "ar7100-nor0":
0x00000000-0x00040000 : "redboot"
0x00040000-0x00740000 : "rootfs"
0x00740000-0x00e40000 : "upgrade"
0x00e40000-0x00e50000 : "nvram"
0x00f70000-0x00fd0000 : "jffs2"
0x00fe0000-0x00ff0000 : "bootfis"
0x00fe0000-0x00ff0000 : "bootcfg"
0x00ff0000-0x01000000 : "bdcfg"
No partitions found on flash bank 0

OEM mtd @ booting from secondary

Generic platform RAM MTD, (c) 2004 Simtec Electronics
Embedded root device: 0x39c000 at 0x29d000
ar7100 flash: size is 16MB
Creating 8 MTD partitions on "ar7100-nor0":
0x00000000-0x00040000 : "redboot"
0x00740000-0x00e40000 : "rootfs"
0x00040000-0x00740000 : "upgrade"
0x00e40000-0x00e50000 : "nvram"
0x00f80000-0x00fe0000 : "jffs2"
0x00fe0000-0x00ff0000 : "bootfis"
0x00fe0000-0x00ff0000 : "bootcfg"
0x00ff0000-0x01000000 : "bdcfg"
No partitions found on flash bank 0

OEM fis list command

RedBoot> fis list
Name              FLASH addr  Mem addr    Length      Entry point
RedBoot           0xBF000000  0xBF000000  0x00040000  0x00000000
image1            0xBF040000  0x80800000  0x00700000  0x80800000
image2            0xBF740000  0x80800000  0x00700000  0x80800000
nvram             0xBFE40000  0xBFE40000  0x00010000  0x00000000
FIS directory     0xBFFE0000  0xBFFE0000  0x00010000  0x00000000

after init command another hidden partition is displayed

Name              FLASH addr  Mem addr    Length      Entry point
RedBoot           0xBF000000  0xBF000000  0x00040000  0x00000000
image1            0xBF040000  0xBF040000  0x00700000  0x80800000
image2            0xBF740000  0xBF740000  0x00700000  0x80800000
nvram             0xBFE40000  0xBFE40000  0x00010000  0x00000000
FIS directory     0xBFFE0000  0xBFFE0000  0x0000F000  0x00000000
RedBoot config    0xBFFEF000  0xBFFEF000  0x00001000  0x00000000

i tried several methods with no luck

Can you help me correct dts spi node and generating image code?

Seeing that "FIS directory" and "RedBoot config" share the same erase block You can try to mimic jjPlus JA76PF2 image recipe: https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/ath79/image/generic.mk#l1676, just drop DEVICE_COMPAT_* variables and adjust IMAGE_SIZE to the size of image1 and image2 combined. You'll find the SPI flash node in the dts (https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/ath79/dts/ar7161_jjplus_ja76pf2.dts#l114) for the device, adjust the last three partitions to Your layout. Remember to backup flash contents before writing any image and use initramfs image to asses if there's no issues with Your modified layout.
Show Your resulting code changes before writing image to the flash, then I can check it for errors.

Thank you for your reply,
i did try this already
but i will try it again and post results .

i was getting syntax error when i use openwrt,ih-magic = <IH_MAGIC_OKLI>;

using

&spi {
	status = "okay";

	flash@0 {
		compatible = "jedec,spi-nor";
		reg = <0>;
		spi-max-frequency = <25000000>;

		partitions {
			compatible = "fixed-partitions";
			#address-cells = <1>;
			#size-cells = <1>;

			partition@0 {
				label = "RedBoot";
				reg = <0x000000 0x040000>;
				read-only;
			};

			partition@40000 {
				label = "loader";
				reg = <0x040000 0x020000>;
			};

			partition@60000 {
				label = "firmware";
				reg = <0x060000 0xe00000>;
				compatible = "openwrt,uimage", "denx,uimage";
				openwrt,ih-magic = <IH_MAGIC_OKLI>;
			};
				
			partition@fe0000 {
				label = "FIS directory";
				reg = <0xfe0000 0x00f000>;
				read-only;
			};

			partition@fef000 {
				label = "RedBoot config";
				reg = <0xfef000 0x001000>;
				read-only;
			};

			bdcfg:	partition@ff0000 {
				label = "bdcfg";
				reg = <0xff0000 0x010000>;
				read-only;
			};
		};
	};
};

Compiling exit with error

Error: ../dts/ar7161_vendor_model.dts:132.25-26 syntax error
FATAL ERROR: Unable to parse input tree

removing this line. do the job.

booting live from initramfs

[    6.241527] spi-nor spi0.0: s25sl12801 (16384 Kbytes)
[    6.246703] 6 fixed-partitions partitions found on MTD device spi0.0
[    6.253080] OF: Bad cell count for /spi@1f000000/flash@0/partitions
[    6.259370] OF: Bad cell count for /spi@1f000000/flash@0/partitions
[    6.266770] OF: Bad cell count for /spi@1f000000/flash@0/partitions
[    6.273040] OF: Bad cell count for /spi@1f000000/flash@0/partitions
[    6.280883] Creating 6 MTD partitions on "spi0.0":
[    6.285742] 0x000000000000-0x000000040000 : "RedBoot"
[    6.296227] 0x000000040000-0x000000060000 : "loader"
[    6.302121] 0x000000060000-0x000000e60000 : "firmware"
[    6.356480] 0x000000fe0000-0x000000fef000 : "FIS directory"
[    6.362995] 0x000000fef000-0x000000ff0000 : "RedBoot config"
[    6.371079] 0x000000ff0000-0x000001000000 : "bdcfg"

image section

define Device/vendor_model
  SOC := ar7161
  DEVICE_VENDOR := vendor
  DEVICE_MODEL := model
  DEVICE_PACKAGES += kmod-ath9k kmod-ath5k fconfig kmod-owl-loader -swconfig -uboot-envtools
  LOADER_TYPE := bin
  LOADER_FLASH_OFFS := 0x60000
  COMPILE := loader-$(1).bin
  COMPILE/loader-$(1).bin := loader-okli-compile | lzma | pad-to 128k
  ARTIFACTS := loader.bin
  ARTIFACT/loader.bin := append-loader-okli $(1)
  IMAGES += firmware.bin
  IMAGE/firmware.bin := append-kernel | uImage lzma -M 0x4f4b4c49 | pad-to $$$$(BLOCKSIZE) | \
	append-rootfs | pad-rootfs | pad-to $$$$(BLOCKSIZE) | check-size
  IMAGE/sysupgrade.bin := $$(IMAGE/firmware.bin) | \
	sysupgrade-tar kernel=$$$$(KDIR)/loader-$(1).bin rootfs=$$$$@ | append-metadata
  KERNEL := kernel-bin | append-dtb | lzma
  KERNEL_INITRAMFS := kernel-bin | append-dtb
  IMAGE_SIZE := 14336k
endef
TARGET_DEVICES += vendor_model

actually i was trying with different image size as i was using all size between 0x60000 to the beginning of FIS directory

I thought it might be this, but after i followed what you told me, total image size is 0x700000 + 0x700000

as i already have 2 devices i am ready to write data to one of them.. and already writing it to Image1 partition

loader to be written with it's actual size on the whole partition area.
and firmware.bin to be written after 0x20000 from the beginning of image1 partition

@ 0xBF060000

so writing loader @ 0xBF040000
and firmware @ 0xBF060000

bootlog is

[    0.732301] spi-nor spi0.0: s25sl12801 (16384 Kbytes)
[    0.737476] 6 fixed-partitions partitions found on MTD device spi0.0
[    0.743867] OF: Bad cell count for /spi@1f000000/flash@0/partitions
[    0.750132] OF: Bad cell count for /spi@1f000000/flash@0/partitions
[    0.757542] OF: Bad cell count for /spi@1f000000/flash@0/partitions
[    0.763857] OF: Bad cell count for /spi@1f000000/flash@0/partitions
[    0.771641] Creating 6 MTD partitions on "spi0.0":
[    0.776497] 0x000000000000-0x000000040000 : "RedBoot"
[    0.786943] 0x000000040000-0x000000060000 : "loader"
[    0.792834] 0x000000060000-0x000000e60000 : "firmware"
[    0.847270] 0x000000fe0000-0x000000fef000 : "FIS directory"
[    0.853819] 0x000000fef000-0x000000ff0000 : "RedBoot config"
[    0.861828] 0x000000ff0000-0x000001000000 : "bdcfg"
[    1.248959] ag71xx 19000000.eth: connected to PHY at mdio.0:01 [uid=02430d91, driver=ICPlus IP1001]
[    1.258641] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode: rgmii
[    1.604948] ag71xx 1a000000.eth: connected to PHY at mdio.0:03 [uid=02430d91, driver=ICPlus IP1001]
[    1.614602] eth1: Atheros AG71xx at 0xba000000, irq 5, mode: rgmii
[    1.621044] i2c /dev entries driver
[    1.626229] NET: Registered protocol family 10
[    1.636867] Segment Routing with IPv6
[    1.640651] NET: Registered protocol family 17
[    1.645222] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    1.658160] 8021q: 802.1Q VLAN Support v1.8
[    1.664264] /dev/root: Can't open blockdev
[    1.668375] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[    1.675895] Please append a correct "root=" boot option; here are the available partitions:
[    1.684248] 1f00             256 mtdblock0
[    1.684252]  (driver?)
[    1.690771] 1f01             128 mtdblock1
[    1.690774]  (driver?)
[    1.697308] 1f02           14336 mtdblock2
[    1.697312]  (driver?)
[    1.703844] 1f03              60 mtdblock3
[    1.703848]  (driver?)
[    1.710365] 1f04               4 mtdblock4
[    1.710368]  (driver?)
[    1.716894] 1f05              64 mtdblock5
[    1.716897]  (driver?)
[    1.723413] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    1.731659] Rebooting in 1 seconds..
+

Any idea ?

It's because Your dts doesn't have #include <dt-bindings/mtd/partitions/uimage.h> in the includes section.

Going back to partition table it should look like this:

&spi {
	status = "okay";

	flash@0 {
		compatible = "jedec,spi-nor";
		reg = <0>;
		spi-max-frequency = <25000000>;

		partitions {
			compatible = "fixed-partitions";
			#address-cells = <1>;
			#size-cells = <1>;

			partition@0 {
				label = "RedBoot";
				reg = <0x000000 0x040000>;
				read-only;
			};

			partition@40000 {
				label = "loader";
				reg = <0x040000 0x020000>;
			};

			partition@60000 {
				label = "firmware";
				reg = <0x060000 0xde0000>;
				compatible = "openwrt,uimage", "denx,uimage";
				openwrt,ih-magic = <IH_MAGIC_OKLI>;
			};
				
			partition@e40000 {
				label = "nvram";
				reg = <0xe40000 0x010000>;
				read-only;
			};

			partition@fe0000 {
				label = "FIS directory";
				reg = <0xfe0000 0x00f000>;
				read-only;
			};

			partition@fef000 {
				label = "RedBoot config";
				reg = <0xfef000 0x001000>;
				read-only;
			};

			bdcfg: partition@ff0000 {
				label = "bdcfg";
				reg = <0xff0000 0x010000>;
				read-only;
			};
		};
	};
};

I forgot to mention that "firmware" partition should have subtracted 0x20000 of "loader" partition. That means also IMAGE_SIZE needs to be reduced to 14208k.
What is stored in "nvram" partition?

1 Like

Yes Thank you.. this fixed it. and firmware partition upon loading is now spliting and creating mtd partitions..

[    6.242368] spi-nor spi0.0: s25sl12801 (16384 Kbytes)
[    6.247544] 6 fixed-partitions partitions found on MTD device spi0.0
[    6.253936] OF: Bad cell count for /spi@1f000000/flash@0/partitions
[    6.260200] OF: Bad cell count for /spi@1f000000/flash@0/partitions
[    6.267608] OF: Bad cell count for /spi@1f000000/flash@0/partitions
[    6.273923] OF: Bad cell count for /spi@1f000000/flash@0/partitions
[    6.281727] Creating 6 MTD partitions on "spi0.0":
[    6.286582] 0x000000000000-0x000000040000 : "RedBoot"
[    6.297121] 0x000000040000-0x000000060000 : "loader"
[    6.303007] 0x000000060000-0x000000e40000 : "firmware"
[    6.310897] 2 uimage-fw partitions found on MTD device firmware
[    6.316865] Creating 2 MTD partitions on "firmware":
[    6.321824] 0x000000000000-0x000000230000 : "kernel"
[    6.327704] 0x000000230000-0x000000de0000 : "rootfs"
[    6.334992] mtd: setting mtd4 (rootfs) as root device
[    6.340183] 1 squashfs-split partitions found on MTD device rootfs
[    6.346419] 0x0000005f0000-0x000000de0000 : "rootfs_data"
[    6.353501] 0x000000fe0000-0x000000fef000 : "FIS directory"
[    6.360109] 0x000000fef000-0x000000ff0000 : "RedBoot config"
[    6.368211] 0x000000ff0000-0x000001000000 : "bdcfg"

i was aware of that, thank you very much.

OEM WiFi configuration this is the data @ start of nvram partition

HSLF..e.!.#.=-.ywebredir/
whiteurl154=.wlan1_9/
keyid=0.wlan0_6/
nat=1.wlan0_8/
hiddenssid=0.wlan0_9/
acl=0.webredir/
whiteurl155=.wlan1_8/
ssid=Wireless.wlan1_3/
encryptkey=none.wlan1_0/
assoccount=0.wlan1/
freqspec=24.wlan1/
wmm_sta_bk_cwmax=10.wlan0_5/
securityprofilename=Profile7.webredir/
whiteurl156=.wlan0_8/
wmm=1.wlan0_10/
wmm=1.webredir/
and so on .................. whitelist URLs and bunch of settings related to OEM firmware.

Also for jffs2 partitions
0xf70000 0x60000
0xf80000 0x60000

OEM logs are stored there, for this device with dual boot, so they are 2 separate partitions

S0004 root: system Cold Start
S0007 root: system Cold Start
S0024 root: system Admin Restart [172.30.8.1, httpd]

so i think i can make firmware partition occupy the whole size between 0x60000 after loader partition.
and up to 0xfe0000 the starting of FIS directory..

Now for these errors

[    6.253936] OF: Bad cell count for /spi@1f000000/flash@0/partitions
[    6.260200] OF: Bad cell count for /spi@1f000000/flash@0/partitions
[    6.267608] OF: Bad cell count for /spi@1f000000/flash@0/partitions
[    6.273923] OF: Bad cell count for /spi@1f000000/flash@0/partitions

i tried to add in dts file the 3 partitions nvram jffs2 jffs2
as nvram oem1 oem2 i though it might fix this up.

but with no luck

now my dts spi node is

&spi {
	status = "okay";

	flash@0 {
		compatible = "jedec,spi-nor";
		reg = <0>;
		spi-max-frequency = <25000000>;

		partitions {
			compatible = "fixed-partitions";
			#address-cells = <1>;
			#size-cells = <1>;

			partition@0 {
				label = "RedBoot";
				reg = <0x000000 0x040000>;
				read-only;
			};

			partition@40000 {
				label = "loader";
				reg = <0x040000 0x020000>;
			};

			partition@60000 {
				label = "firmware";
				reg = <0x060000 0xf80000>;
				compatible = "openwrt,uimage", "denx,uimage";
				openwrt,ih-magic = <IH_MAGIC_OKLI>;
			};
										
			partition@fe0000 {
				label = "FIS directory";
				reg = <0xfe0000 0x00f000>;
				read-only;
			};

			partition@fef000 {
				label = "RedBoot config";
				reg = <0xfef000 0x001000>;
				read-only;
			};

			bdcfg:	partition@ff0000 {
				label = "bdcfg";
				reg = <0xff0000 0x010000>;
				read-only;
			};
		};
	};
};

and boot log is

[    0.000000] Linux version 5.10.176 (build@build) (mips-openwrt-linux-musl-gcc (OpenWrt GCC 11.2.0 r20134-5f15225c1e) 11.2.0, GNU ld (GNU Binutils) 2.37) #0 Thu Apr 27 20:28:15 2023
[    0.000000] printk: bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019374 (MIPS 24Kc)
[    0.000000] MIPS: machine is vendor model
[    0.000000] SoC: Atheros AR7161 rev 2
[    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] Built 1 zonelists, mobility grouping on.  Total pages: 32480
[    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=0007e302
[    0.000000] Readback ErrCtl register=0007e302
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 121096K/131072K available (5860K kernel code, 605K rwdata, 748K rodata, 1224K init, 209K bss, 9976K 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.007871] Calibrating delay loop... 452.19 BogoMIPS (lpj=2260992)
[    0.074128] pid_max: default: 32768 minimum: 301
[    0.078901] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.086199] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.095808] dyndbg: Ignore empty _ddebug table in a CONFIG_DYNAMIC_DEBUG_CORE build
[    0.105877] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.115743] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.122626] pinctrl core: initialized pinctrl subsystem
[    0.131844] NET: Registered protocol family 16
[    0.136957] thermal_sys: Registered thermal governor 'step_wise'
[    0.440243] PCI host bridge /ahb/apb/pcie-controller@17010000 ranges:
[    0.452706]  MEM 0x0000000010000000..0x0000000016ffffff
[    0.457921]   IO 0x0000000000000000..0x0000000000000000
[    0.499358] PCI host bridge to bus 0000:00
[    0.503529] pci_bus 0000:00: root bus resource [mem 0x10000000-0x16ffffff]
[    0.510389] pci_bus 0000:00: root bus resource [io  0x0000]
[    0.515957] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.522727] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.531056] pci 0000:00:11.0: [168c:ff1d] type 00 class 0x020000
[    0.537065] pci 0000:00:11.0: reg 0x10: [mem 0x00000000-0x0000ffff]
[    0.544765] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
[    0.551389] pci 0000:00:11.0: BAR 0: assigned [mem 0x10000000-0x1000ffff]
[    0.563661] clocksource: Switched to clocksource MIPS
[    0.569838] NET: Registered protocol family 2
[    0.574470] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.582424] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.590875] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.598548] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.605604] TCP: Hash tables configured (established 1024 bind 1024)
[    0.612085] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.618654] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.625895] NET: Registered protocol family 1
[    0.630294] PCI: CLS 0 bytes, default 32
[    0.639922] workingset: timestamp_bits=14 max_order=15 bucket_order=1
[    0.650758] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.656646] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.668164] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    0.677377] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.685848] printk: console [ttyS0] disabled
[    0.690194] 18020000.uart: ttyS0 at MMIO 0x18020000 (irq = 10, base_baud = 10625000) is a 16550A
[    0.699042] printk: console [ttyS0] enabled
[    0.699042] printk: console [ttyS0] enabled
[    0.707393] printk: bootconsole [early0] disabled
[    0.707393] printk: bootconsole [early0] disabled
[    0.732305] spi-nor spi0.0: s25sl12801 (16384 Kbytes)
[    0.737485] 6 fixed-partitions partitions found on MTD device spi0.0
[    0.743875] OF: Bad cell count for /spi@1f000000/flash@0/partitions
[    0.750140] OF: Bad cell count for /spi@1f000000/flash@0/partitions
[    0.757551] OF: Bad cell count for /spi@1f000000/flash@0/partitions
[    0.763866] OF: Bad cell count for /spi@1f000000/flash@0/partitions
[    0.771653] Creating 6 MTD partitions on "spi0.0":
[    0.776515] 0x000000000000-0x000000040000 : "RedBoot"
[    0.786956] 0x000000040000-0x000000060000 : "loader"
[    0.792844] 0x000000060000-0x000000fe0000 : "firmware"
[    0.800699] 2 uimage-fw partitions found on MTD device firmware
[    0.806668] Creating 2 MTD partitions on "firmware":
[    0.811625] 0x000000000000-0x000000230000 : "kernel"
[    0.817515] 0x000000230000-0x000000f80000 : "rootfs"
[    0.824786] mtd: setting mtd4 (rootfs) as root device
[    0.829975] 1 squashfs-split partitions found on MTD device rootfs
[    0.836213] 0x0000005f0000-0x000000f80000 : "rootfs_data"
[    0.843271] 0x000000fe0000-0x000000fef000 : "FIS directory"
[    0.849852] 0x000000fef000-0x000000ff0000 : "RedBoot config"
[    0.857917] 0x000000ff0000-0x000001000000 : "bdcfg"
[    1.249003] ag71xx 19000000.eth: connected to PHY at mdio.0:01 [uid=02430d91, driver=ICPlus IP1001]
[    1.258692] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode: rgmii
[    1.604954] ag71xx 1a000000.eth: connected to PHY at mdio.0:03 [uid=02430d91, driver=ICPlus IP1001]
[    1.614611] eth1: Atheros AG71xx at 0xba000000, irq 5, mode: rgmii
[    1.621057] i2c /dev entries driver
[    1.626217] NET: Registered protocol family 10
[    1.636861] Segment Routing with IPv6
[    1.640627] NET: Registered protocol family 17
[    1.645210] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    1.658155] 8021q: 802.1Q VLAN Support v1.8
[    1.681292] VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
[    1.692056] Freeing unused kernel memory: 1224K
[    1.696607] This architecture does not have kernel memory protection.
[    1.703037] Run /sbin/init as init process
[    2.659215] init: Console is alive
[    2.663082] init: - watchdog -
[    4.174005] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    4.223391] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    4.241118] init: - preinit -
[    5.147467] random: procd: uninitialized urandom read (4 bytes read)
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[    6.339272] mount_root: jffs2 not ready yet, using temporary tmpfs overlay
[    6.350364] urandom-seed: Seed file not found (/etc/urandom.seed)
[    6.476342] procd: - early -
[    6.479581] procd: - watchdog -
[    7.146378] procd: - watchdog -
[    7.185913] procd: - ubus -
[    7.320247] random: ubusd: uninitialized urandom read (4 bytes read)
[    7.346264] random: ubusd: uninitialized urandom read (4 bytes read)
[    7.364675] random: ubusd: uninitialized urandom read (4 bytes read)
[    7.377608] procd: - init -
Please press Enter to activate this console.
[    8.333644] random: jshn: uninitialized urandom read (4 bytes read)
[    8.382245] random: ubusd: uninitialized urandom read (4 bytes read)
[    8.433928] random: ubus: uninitialized urandom read (4 bytes read)
[    8.551588] kmodloader: loading kernel modules from /etc/modules.d/*
[    9.081529] urngd: v1.0.2 started.
[    9.132309] Loading modules backported from Linux version v5.15.92-0-ge515b9902f5f
[    9.139929] Backport generated by backports.git v5.15.92-1-0-gdfe0f60c
[    9.195239] ath9k_pci_owl_loader 0000:00:11.0: enabling device (0000 -> 0002)
[    9.226234] ath9k_pci_owl_loader 0000:00:11.0: Direct firmware load for ath9k-eeprom-pci-0000:00:11.0.bin failed with error -2
[    9.237667] ath9k_pci_owl_loader 0000:00:11.0: Falling back to sysfs fallback for: ath9k-eeprom-pci-0000:00:11.0.bin
[   10.003054] random: crng init done
[   10.006550] random: 20 urandom warning(s) missed due to ratelimiting
[   10.056011] ath9k_pci_owl_loader 0000:00:11.0: fixup device configuration
[   10.081567] pci 0000:00:11.0: [168c:0029] type 00 class 0x028000
[   10.087666] pci 0000:00:11.0: reg 0x10: [mem 0x10000000-0x1000ffff]
[   10.093998] pci 0000:00:11.0: PME# supported from D0 D3hot
[   10.100185] pci 0000:00:11.0: BAR 0: assigned [mem 0x10000000-0x1000ffff]
[   10.145012] PPP generic driver version 2.4.2
[   10.151700] NET: Registered protocol family 24
[   10.275275] ath9k 0000:00:11.0: enabling device (0000 -> 0002)
[   10.287449] ath: phy0: Ignoring endianness difference in EEPROM magic bytes.
[   10.312884] ieee80211 phy0: Atheros AR9280 Rev:2 mem=0xb0000000, irq=15
[   10.352192] kmodloader: done loading kernel modules from /etc/modules.d/*
[   47.274482] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[   47.281386] jffs2_build_filesystem(): unlocking the mtd device...
[   47.281390] done.
[   47.289515] jffs2_build_filesystem(): erasing all blocks after the end marker...
[   48.938333] br-lan: port 1(eth0) entered blocking state
[   48.951071] br-lan: port 1(eth0) entered disabled state
[   48.956607] device eth0 entered promiscuous mode
[   52.034171] eth0: link up (100Mbps/Full duplex)
[   52.039121] br-lan: port 1(eth0) entered blocking state
[   52.044408] br-lan: port 1(eth0) entered forwarding state
[   52.070947] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[  102.589681] done.
[  102.591643] jffs2: notice: (1826) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[  103.093898] overlayfs: upper fs does not support tmpfile.

what do you think ?

With assumption most crucial data is stored in "bdcfg" partition, like MAC address or calibration data.
Could these values in "nvram" partition be re-created by OEM firmware, then it can be safely assigned to "firmware" partition. If You don't plan to ever go back to original firmware, then it's not worth to keep it.

This is usually read-write, so if it's only storing logs it can safely be assigned to "firmware" partition. If "nvram" will be kept, there's mtd-concat option, I don't remember if it's only for two separate flash chips or if it can be used to join two separate partitions. Check examples in other dts.

You can safely ignore those, I think this was problem with cell hierarchy enumeration in kernel drivers, probably fixed in 5.15 OpenWrt kernel.

Bootlog looks good, overlay properly initiated, so You're good to go.

1 Like

Thank you very much for your Help,
you cleared things out, much appreciated.

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