@@ -71,6 +71,24 @@ config BR2_TARGET_UBOOT_CUSTOM_GIT_VERSION
endif
choice
+ prompt "U-Boot configuration"
+ default BR2_TARGET_UBOOT_USE_DEFCONFIG
+
+config BR2_TARGET_UBOOT_USE_DEFCONFIG
+ bool "Using default board configuration file"
+
+config BR2_TARGET_UBOOT_USE_CUSTOM_CONFIG
+ bool "Using a custom board configuration file"
+
+endchoice
+
+config BR2_TARGET_UBOOT_CUSTOM_CONFIG_FILE
+ string "Configuration file path"
+ depends on BR2_TARGET_UBOOT_USE_CUSTOM_CONFIG
+ help
+ Path to the board configuration file
+
+choice
prompt "U-Boot binary format"
default BR2_TARGET_UBOOT_FORMAT_BIN
@@ -80,6 +80,9 @@ UBOOT_POST_PATCH_HOOKS += UBOOT_APPLY_CUSTOM_PATCHES
endif
define UBOOT_CONFIGURE_CMDS
+ $(if $(BR2_TARGET_UBOOT_USE_CUSTOM_CONFIG),
+ cp -pf $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_CONFIG_FILE)) \
+ $(@D)/include/configs/$(UBOOT_BOARD_NAME).h)
$(TARGET_CONFIGURE_OPTS) $(UBOOT_CONFIGURE_OPTS) \
$(MAKE) -C $(@D) $(UBOOT_MAKE_OPTS) \
$(UBOOT_BOARD_NAME)_config