openwrt/target/linux/generic
Markus Stockhausen c78765213e
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
kernel: mtdsplit_uimage: return 0 if not fatal
Introduced with Linux 6.7, in commit:
5c2f7727d437 ("mtd: mtdpart: check for subpartitions parsing result"),
when a parser returns an error, this will be passed up, and
consequently, all parent mtd partitions get torn down.

Adjust the mtdsplit_uimage driver to only return an error if there is a
critical problem in reading from the mtd device or allocating memory.
Otherwise return 0 to indicate that no partitions were found.
Also add logging to indicate what went wrong.

E.g. on Realtek devices that are booted for the first time through
initramfs with OpenWrt never installed before boot log will show

[    0.932985] Creating 8 MTD partitions on "spi0.0":
[    0.938412] 0x000000000000-0x000000080000 : "u-boot"
[    0.990151] 0x000000080000-0x0000000c0000 : "u-boot-env"
[    0.999907] 0x0000000c0000-0x000000100000 : "board-name"
[    1.019971] 0x000000100000-0x000000e80000 : "firmware"
[    1.051582] mtdsplit_uimage: no uImage found in "firmware"
[    1.069365] 0x000000e80000-0x000001000000 : "kernel2"
[    1.078959] 0x000001000000-0x000001040000 : "sysinfo"
[    1.099747] 0x000001040000-0x000001c40000 : "rootfs2"
[    1.119865] 0x000001c40000-0x000002000000 : "jffs2"

Similar issue was fixed before with commit ade045084b
("kernel: mtdsplit_minor: return 0 if not fatal")

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19016
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-04 12:50:12 +02:00
..
backport-6.6 generic: backport brcm legacy dsa tag fix 2025-05-31 15:30:08 +02:00
backport-6.12 kernel: bump 6.12 to 6.12.31 2025-05-31 17:35:29 +02:00
files kernel: mtdsplit_uimage: return 0 if not fatal 2025-06-04 12:50:12 +02:00
hack-6.6 kernel: fix warning on retrying page pool release 2025-05-15 15:41:59 +02:00
hack-6.12 kernel: bump 6.12 to 6.12.31 2025-05-31 17:35:29 +02:00
image treewide: strip trailing whitespace 2025-05-20 00:47:37 +02:00
other-files initramfs: switch to tmpfs to fix ujail 2020-11-27 01:23:43 +00:00
pending-6.6 generic: net: add pending wireguard patch to fix build with GCC15 2025-05-29 23:13:49 +02:00
pending-6.12 kernel: bump 6.12 to 6.12.31 2025-05-31 17:35:29 +02:00
config-6.6 kernel/generic: Restore kernel files for v6.6 2025-04-30 16:26:29 +02:00
config-6.12 kernel: reorder kernel symbol configs 2025-05-29 23:05:02 +02:00
config-filter generic: config-filter: filter out CONFIG_PAHOLE_HAS_LANG_EXCLUDE 2025-05-14 11:28:01 +02:00
kernel-6.6 kernel: bump 6.6 to 6.6.92 2025-05-25 17:57:19 +02:00
kernel-6.12 kernel: bump 6.12 to 6.12.31 2025-05-31 17:35:29 +02:00
PATCHES