u-boot.mk: add support for config customization
[openwrt/openwrt.git] / include / u-boot.mk
index 8945e8e2b8f5682e46bac6d574c3beb761768def..2b8106410f592182ad7dc0691f6cfdd47ec695f1 100644 (file)
@@ -83,6 +83,9 @@ endef
 
 define Build/Configure/U-Boot
        +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) $(UBOOT_CONFIGURE_VARS) $(UBOOT_CONFIG)_config
+       $(if $(strip $(UBOOT_CUSTOMIZE_CONFIG)),
+               $(PKG_BUILD_DIR)/scripts/config --file $(PKG_BUILD_DIR)/.config $(UBOOT_CUSTOMIZE_CONFIG)
+               +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) $(UBOOT_CONFIGURE_VARS) oldconfig)
 endef
 
 DTC=$(wildcard $(LINUX_DIR)/scripts/dtc/dtc)