From: Lukas Stockner Date: Sat, 2 May 2026 17:32:23 +0000 (+0200) Subject: base-files: handle name collision between kernel UBI volume and MTD partition X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5497d5ba23dc24f5b8eee2f62f7613decce4d248;p=thirdparty%2Fopenwrt.git base-files: handle name collision between kernel UBI volume and MTD partition On the AP-325 (and variants), the bootloader enforces a particular UBI volume layout and naming, so unfortunately the kernel's UBI volume and MTD partition end up with the name, which confuses the current logic. Therefore, add an option to ignore the MTD partition. Signed-off-by: Lukas Stockner Link: https://github.com/openwrt/openwrt/pull/20738 Signed-off-by: Paul Spooren --- diff --git a/package/base-files/files/lib/upgrade/nand.sh b/package/base-files/files/lib/upgrade/nand.sh index e4a255b9c0e..4bf9fc993ef 100644 --- a/package/base-files/files/lib/upgrade/nand.sh +++ b/package/base-files/files/lib/upgrade/nand.sh @@ -328,6 +328,10 @@ nand_upgrade_tar() { local rootfs_type [ "$rootfs_length" ] && rootfs_type="$(identify_tar "$tar_file" "$cmd" "$board_dir/root")" + # If CI_SKIP_KERNEL_MTD is set, ignore any potential kernel MTD partition that was found. + # This is needed if there's an MTD partition with the same name as the kernel's UBI volume. + [ "${CI_SKIP_KERNEL_MTD:-}" ] && kernel_mtd= + local ubi_kernel_length if [ "$kernel_length" ]; then if [ "$kernel_mtd" ]; then