Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] u-boot: allow to pass a custom configuration file
@ 2013-09-19 11:10 Eric Jarrige
  2013-09-19 15:43 ` Thomas Petazzoni
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Eric Jarrige @ 2013-09-19 11:10 UTC (permalink / raw)
  To: buildroot


Signed-off-by: Eric Jarrige <eric.jarrige@armadeus.org>
---
 boot/uboot/Config.in |   18 ++++++++++++++++++
 boot/uboot/uboot.mk  |    3 +++
 2 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
index 1b98339..1358f4a 100644
--- a/boot/uboot/Config.in
+++ b/boot/uboot/Config.in
@@ -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 configuration"
+
+config BR2_TARGET_UBOOT_USE_CUSTOM_CONFIG
+	bool "Using a custom 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 customized U-Boot configuration file
+
+choice
 	prompt "U-Boot binary format"
 	default BR2_TARGET_UBOOT_FORMAT_BIN
 
diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
index 631da6b..8bcf260 100644
--- a/boot/uboot/uboot.mk
+++ b/boot/uboot/uboot.mk
@@ -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
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-04-30  6:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-19 11:10 [Buildroot] [PATCH 1/1] u-boot: allow to pass a custom configuration file Eric Jarrige
2013-09-19 15:43 ` Thomas Petazzoni
2013-09-19 20:07   ` Eric Jarrige
2013-09-20  5:08     ` Thomas Petazzoni
2013-09-20  9:51       ` Eric Jarrige
2013-09-20 10:01       ` Eric Jarrige
2013-09-20 11:03 ` [Buildroot] [PATCH v2] " Eric Jarrige
2013-09-20 11:11 ` [Buildroot] [PATCH v2 1/1] " Eric Jarrige
2014-04-30  6:11   ` Arnout Vandecappelle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox