xilinx: Allow alternative boot strategies in zynq-common.h
authorMike Looijmans <mike.looijmans@topic.nl>
Wed, 12 Mar 2025 15:36:31 +0000 (16:36 +0100)
committerMichal Simek <michal.simek@amd.com>
Wed, 16 Apr 2025 11:42:06 +0000 (13:42 +0200)
Allow config headers that include zynq-common.h to provide their own
(distro) boot strategies. This is implemented by skipping the section
when BOOT_ENV has already been defined.

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
Link: https://lore.kernel.org/r/20250312153741.24007-1-mike.looijmans@topic.nl
Signed-off-by: Michal Simek <michal.simek@amd.com>
include/configs/zynq-common.h

index 93ae589..94273d0 100644 (file)
 
 #ifdef CONFIG_XPL_BUILD
 #define BOOTENV
-#else
+#endif
+
+/* Only use this section if no BOOTENV has been configured yet */
+#ifndef BOOTENV
 
 #ifdef CONFIG_CMD_MMC
 #define BOOT_TARGET_DEVICES_MMC(func) func(MMC, mmc, 0) func(MMC, mmc, 1)
        BOOT_TARGET_DEVICES_DHCP(func)
 
 #include <config_distro_bootcmd.h>
-#endif /* CONFIG_XPL_BUILD */
+
+#endif /* BOOTENV */
 
 /* Default environment */
 #ifndef CFG_EXTRA_ENV_SETTINGS