From: Marek Belisko <marek.belisko@open-nandra.com>
To: buildroot@busybox.net
Subject: [Buildroot] [RFC 1/2] barebox: Build barebox in separate directory.
Date: Wed, 28 Nov 2012 00:05:52 +0100 [thread overview]
Message-ID: <1354057553-6337-2-git-send-email-marek.belisko@open-nandra.com> (raw)
In-Reply-To: <1354057553-6337-1-git-send-email-marek.belisko@open-nandra.com>
This is necessary when we would like to add support for building also barebox
xloader (MLO).
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
---
boot/barebox/barebox.mk | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/boot/barebox/barebox.mk b/boot/barebox/barebox.mk
index a025d5f..16110b9 100644
--- a/boot/barebox/barebox.mk
+++ b/boot/barebox/barebox.mk
@@ -54,9 +54,12 @@ else ifeq ($(BR2_TARGET_BAREBOX_USE_CUSTOM_CONFIG),y)
BAREBOX_SOURCE_CONFIG = $(BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE)
endif
+BAREBOX_BUILD_DIR = barebox
+
define BAREBOX_CONFIGURE_CMDS
+ mkdir -p $(@D)/$(BAREBOX_BUILD_DIR)
cp $(BAREBOX_SOURCE_CONFIG) $(@D)/arch/$(BAREBOX_ARCH)/configs/buildroot_defconfig
- $(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(@D) buildroot_defconfig
+ $(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(@D) buildroot_defconfig O=$(BAREBOX_BUILD_DIR)
endef
ifeq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y)
@@ -68,11 +71,11 @@ endif
define BAREBOX_BUILD_CMDS
$(BAREBOX_BUILD_BAREBOXENV_CMDS)
- $(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(@D)
+ $(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(@D) O=$(BAREBOX_BUILD_DIR)
endef
define BAREBOX_INSTALL_IMAGES_CMDS
- cp $(@D)/barebox.bin $(BINARIES_DIR)
+ cp $(@D)/$(BAREBOX_BUILD_DIR)/barebox.bin $(BINARIES_DIR)
endef
ifeq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y)
@@ -97,15 +100,15 @@ barebox-menuconfig barebox-xconfig barebox-gconfig barebox-nconfig: barebox-conf
rm -f $(BAREBOX_DIR)/.stamp_{built,target_installed,images_installed}
barebox-savedefconfig: barebox-configure
- $(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(BAREBOX_DIR) \
+ $(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(BAREBOX_DIR) O=$(BAREBOX_BUILD_DIR) \
$(subst barebox-,,$@)
ifeq ($(BR2_TARGET_BAREBOX_USE_CUSTOM_CONFIG),y)
-barebox-update-config: barebox-configure $(BAREBOX_DIR)/.config
- cp -f $(BAREBOX_DIR)/.config $(BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE)
+barebox-update-config: barebox-configure $(BAREBOX_DIR)/$(BAREBOX_BUILD_DIR)/.config
+ cp -f $(BAREBOX_DIR)/$(BAREBOX_BUILD_DIR)/.config $(BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE)
barebox-update-defconfig: barebox-savedefconfig
- cp -f $(BAREBOX_DIR)/defconfig $(BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE)
+ cp -f $(BAREBOX_DIR)/$(BAREBOX_BUILD_DIR)/defconfig $(BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE)
else
barebox-update-config: ;
barebox-update-defconfig: ;
--
1.7.10.4
next prev parent reply other threads:[~2012-11-27 23:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-27 23:05 [Buildroot] [RFC 0/2] Add support for building barebox xloader Marek Belisko
2012-11-27 23:05 ` Marek Belisko [this message]
2012-11-27 23:05 ` [Buildroot] [RFC 2/2] barebox: Add possibility to build also barebox xloader (MLO) Marek Belisko
2012-12-16 14:01 ` [Buildroot] [RFC 0/2] Add support for building barebox xloader Belisko Marek
-- strict thread matches above, loose matches on Subject: below --
2012-12-22 23:04 Marek Belisko
2012-12-22 23:04 ` [Buildroot] [RFC 1/2] barebox: Build barebox in separate directory Marek Belisko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1354057553-6337-2-git-send-email-marek.belisko@open-nandra.com \
--to=marek.belisko@open-nandra.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox