mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
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>
This commit is contained in:
parent
b763c5cb75
commit
2dd024a02e
@ -145,6 +145,10 @@ int parse_fit_partitions(struct parsed_partitions *state, u64 fit_start_sector,
|
|||||||
|
|
||||||
np = of_find_node_by_path("/chosen");
|
np = of_find_node_by_path("/chosen");
|
||||||
if (np) {
|
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);
|
bootconf_c = of_get_property(np, "u-boot,bootconf", &bootconf_len);
|
||||||
if (bootconf_c && bootconf_len)
|
if (bootconf_c && bootconf_len)
|
||||||
bootconf = kmemdup_nul(bootconf_c, bootconf_len, GFP_KERNEL);
|
bootconf = kmemdup_nul(bootconf_c, bootconf_len, GFP_KERNEL);
|
||||||
|
Loading…
Reference in New Issue
Block a user