Re: Booting from any non-first-containing-rootfs partition is broken Was: Librerouter v1 booting from second partition broken

2024-02-08 Thread Bjørn Mork
I don't know what plans there are. But I agree that there should be a better and standardized way to manage dual boot support in combination with partition splitters. There are many dual booting devices where OpenWrt can boot only from the first firmware partition, most likely because it's so

Re: Booting from any non-first-containing-rootfs partition is broken Was: Librerouter v1 booting from second partition broken

2024-02-08 Thread Gio
Thanks Bjørn Clean DTS file and CONFIG_MTD_SPLIT_FIRMWARE=y were definitely needed. In conclusion to have dual boot working from a clean checkout I needed just kconfig_unset CONFIG_MIPS_CMDLINE_FROM_DTB kconfig_set CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER kconfig_set CONFIG_MTD_SPLIT_FIRMWARE

Re: Booting from any non-first-containing-rootfs partition is broken Was: Librerouter v1 booting from second partition broken

2024-02-07 Thread Bjørn Mork
Don't change the name of fw1/firmware in DT. If you change it to fw1 then it will match the cmdline definition and the of_node is copied. And the uimage splitter will parse it based on compatible match. What I suggest is keeping everything else as-is, but define CONFIG_MTD_SPLIT_FIRMWARE=y

Re: Booting from any non-first-containing-rootfs partition is broken Was: Librerouter v1 booting from second partition broken

2024-02-07 Thread Gio
Bjorn I have tested your suggestion too but same result happens, the DTS in my buildroot is manually edited so partitions are called fw1 and fw2 and not firmware and fw2, but the behaviour is identical [    0.337578] spi-nor spi0.0: w25q128 (16384 Kbytes) [    0.342531] mtd: Found partition

Re: Booting from any non-first-containing-rootfs partition is broken Was: Librerouter v1 booting from second partition broken

2024-02-07 Thread Bjørn Mork
To me it looks like the uimage-fw parser isn't running at all in the second case. I assume that is because CONFIG_MTD_SPLIT_FIRMWARE is unset. The reason splitting works in the first case is because of 421-drivers-mtd-parsers-add-nvmem-support-to-cmdlinepart.patch which copies the "firmware"