barebox has for many years supported a superset of the upstream OF partitions binding by parsing partitions out of SD/eMMC and EEPROM in addition to MTD. Unfortunately, we didn't upstream our binding and a different binding went upstream into Linux v6.13-rc1 along with Linux commit 2e3a191e89f9 ("block: add support for partition table defined in OF"). Since then, if CONFIG_OF_PARTITION, which is disabled by default, is enabled, Linux will ignore any GPT/MBR if an SD/eMMC node has a fixed-partitions compatible subnode. This is different from the barebox behavior, which allows both OF partitions and GPT/MBR to co-exist as long as they don't conflict. As many barebox boards: - Place the environment in non-partitioned space prior to the first partition - Fixup all fixed-partitions into the kernel device tree by default this results in breakage if a newer kernel is booted with CONFIG_OF_PARTITION enabled. As first step towards resolving this, teach barebox to parse barebox,fixed-partitions the same way it parses fixed-partitions. Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx> --- drivers/of/of_path.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/of/of_path.c b/drivers/of/of_path.c index b3feaa07e39d..57bd82a741ba 100644 --- a/drivers/of/of_path.c +++ b/drivers/of/of_path.c @@ -14,7 +14,9 @@ bool of_node_is_fixed_partitions(const struct device_node *np) { - return of_device_is_compatible(np, "fixed-partitions"); + return of_device_is_compatible(np, "fixed-partitions") || + of_device_is_compatible(np, "barebox,fixed-partitions"); + } struct device *of_find_device_by_node_path(const char *path) -- 2.39.5