Patchwork [RFC,v1,10/14] uboot: support out of tree build

login
register
mail settings
Submitter Thomas Petazzoni
Date Jan. 20, 2013, 11:52 p.m.
Message ID <1358725943-31485-11-git-send-email-thomas.petazzoni@free-electrons.com>
Download mbox | patch
Permalink /patch/214011/
State Changes Requested
Headers show

Comments

Thomas Petazzoni - Jan. 20, 2013, 11:52 p.m.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 boot/uboot/uboot.mk |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Patch

diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
index ea77259..1a4f251 100644
--- a/boot/uboot/uboot.mk
+++ b/boot/uboot/uboot.mk
@@ -10,6 +10,7 @@  UBOOT_LICENSE = GPLv2+
 UBOOT_LICENSE_FILES = COPYING
 
 UBOOT_INSTALL_IMAGES = YES
+UBOOT_SUPPORTS_OUT_OF_TREE = YES
 
 ifeq ($(UBOOT_VERSION),custom)
 # Handle custom U-Boot tarballs as specified by the configuration
@@ -71,8 +72,8 @@  UBOOT_POST_PATCH_HOOKS += UBOOT_APPLY_CUSTOM_PATCHES
 endif
 
 define UBOOT_CONFIGURE_CMDS
-	$(TARGET_CONFIGURE_OPTS) $(UBOOT_CONFIGURE_OPTS) 	\
-		$(MAKE) -C $(@D) $(UBOOT_MAKE_OPTS)		\
+	$(TARGET_CONFIGURE_OPTS) $(UBOOT_CONFIGURE_OPTS) 		\
+		$(MAKE) -C $(UBOOT_SRCDIR) O=$(@D) $(UBOOT_MAKE_OPTS)	\
 		$(UBOOT_BOARD_NAME)_config
 	@echo >> $(@D)/include/config.h
 	@echo "/* Add a wrapper around the values Buildroot sets. */" >> $(@D)/include/config.h
@@ -91,7 +92,7 @@  endef
 
 define UBOOT_BUILD_CMDS
 	$(TARGET_CONFIGURE_OPTS) $(UBOOT_CONFIGURE_OPTS) 	\
-		$(MAKE) -C $(@D) $(UBOOT_MAKE_OPTS) 		\
+		$(MAKE) -C $(UBOOT_SRCDIR) O=$(@D) $(UBOOT_MAKE_OPTS) 		\
 		$(UBOOT_MAKE_TARGET)
 endef