summaryrefslogtreecommitdiffstats
path: root/target/linux/mediatek/files
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2023-11-24 12:22:27 +0000
committerDaniel Golle <daniel@makrotopia.org>2024-02-15 19:06:36 +0000
commitcff4335245e0d23e27917c6cb8f3e1eefda5bb1e (patch)
tree1f51ef91e1aa73e7936ba64274c6d23721beff42 /target/linux/mediatek/files
parent548c383bdf505c9f71378c51885603911f8008c7 (diff)
downloadopenwrt-cff4335245e0d23e27917c6cb8f3e1eefda5bb1e.tar.gz
openwrt-cff4335245e0d23e27917c6cb8f3e1eefda5bb1e.tar.bz2
openwrt-cff4335245e0d23e27917c6cb8f3e1eefda5bb1e.zip
kernel: allow skipping deprecated uImage.FIT partition parser
In order to allow gradually migrating the boards currently using the uImage.FIT partition (deprecated/rejected) parser to the new fitblk driver, skip the partition parser code in case the new fitblk driver (which serves the same purpose) is used. As an indicator for the use of the new fitblk driver, check if the /chosen/rootdisk property is present in the Device Tree. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'target/linux/mediatek/files')
-rw-r--r--target/linux/mediatek/files/block/partitions/fit.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/target/linux/mediatek/files/block/partitions/fit.c b/target/linux/mediatek/files/block/partitions/fit.c
index 91b25e0581..463cd4e9ab 100644
--- a/target/linux/mediatek/files/block/partitions/fit.c
+++ b/target/linux/mediatek/files/block/partitions/fit.c
@@ -144,6 +144,10 @@ int parse_fit_partitions(struct parsed_partitions *state, u64 fit_start_sector,
np = of_find_node_by_path("/chosen");
if (np) {
+ /* new fitblk driver should take over if /chosen/rootdisk is defined */
+ if (of_get_property(np, "rootdisk", NULL))
+ return 0;
+
bootconf_c = of_get_property(np, "u-boot,bootconf", &bootconf_len);
if (bootconf_c && bootconf_len)
bootconf = kmemdup_nul(bootconf_c, bootconf_len, GFP_KERNEL);