* [Buildroot] [PATCH] barebox: Allow to build an environment image
@ 2013-01-22 15:40 Maxime Ripard
2013-01-23 16:03 ` Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: Maxime Ripard @ 2013-01-22 15:40 UTC (permalink / raw)
To: buildroot
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
boot/barebox/Config.in | 11 +++++++++++
boot/barebox/barebox.mk | 14 ++++++++++++++
2 files changed, 25 insertions(+)
diff --git a/boot/barebox/Config.in b/boot/barebox/Config.in
index b9e03b3..24fcb38 100644
--- a/boot/barebox/Config.in
+++ b/boot/barebox/Config.in
@@ -99,4 +99,15 @@ config BR2_TARGET_BAREBOX_BAREBOXENV
help
Install bareboxenv tool in target.
+config BR2_TARGET_BAREBOX_CUSTOM_ENV
+ bool "Generate an environment image"
+ help
+ Generate a custom environment image.
+
+config BR2_TARGET_BAREBOX_CUSTOM_ENV_PATH
+ string "Environment path"
+ depends on BR2_TARGET_BAREBOX_CUSTOM_ENV
+ help
+ Path to the custom barebox environment
+
endif
diff --git a/boot/barebox/barebox.mk b/boot/barebox/barebox.mk
index 143338e..5ec47f6 100644
--- a/boot/barebox/barebox.mk
+++ b/boot/barebox/barebox.mk
@@ -67,9 +67,22 @@ define BAREBOX_BUILD_BAREBOXENV_CMDS
endef
endif
+ifeq ($(BR2_TARGET_BAREBOX_CUSTOM_ENV),y)
+BAREBOX_ENV_NAME = $(notdir $(call qstrip, $(BR2_TARGET_BAREBOX_CUSTOM_ENV_PATH)))
+define BAREBOX_BUILD_CUSTOM_ENV
+ $(@D)/scripts/bareboxenv -s \
+ $(call qstrip, $(BR2_TARGET_BAREBOX_CUSTOM_ENV_PATH)) \
+ $(@D)/$(BAREBOX_ENV_NAME)
+endef
+define BAREBOX_INSTALL_CUSTOM_ENV
+ cp $(@D)/$(BAREBOX_ENV_NAME) $(BINARIES_DIR)
+endef
+endif
+
define BAREBOX_BUILD_CMDS
$(BAREBOX_BUILD_BAREBOXENV_CMDS)
$(TARGET_MAKE_ENV) $(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(@D)
+ $(BAREBOX_BUILD_CUSTOM_ENV)
endef
define BAREBOX_INSTALL_IMAGES_CMDS
@@ -78,6 +91,7 @@ define BAREBOX_INSTALL_IMAGES_CMDS
else \
cp $(@D)/barebox.bin $(BINARIES_DIR);\
fi
+ $(BAREBOX_INSTALL_CUSTOM_ENV)
endef
ifeq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y)
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH] barebox: Allow to build an environment image
2013-01-22 15:40 [Buildroot] [PATCH] barebox: Allow to build an environment image Maxime Ripard
@ 2013-01-23 16:03 ` Thomas Petazzoni
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2013-01-23 16:03 UTC (permalink / raw)
To: buildroot
Dear Maxime Ripard,
On Tue, 22 Jan 2013 16:40:42 +0100, Maxime Ripard wrote:
> +config BR2_TARGET_BAREBOX_CUSTOM_ENV
> + bool "Generate an environment image"
> + help
> + Generate a custom environment image.
> +
> +config BR2_TARGET_BAREBOX_CUSTOM_ENV_PATH
> + string "Environment path"
> + depends on BR2_TARGET_BAREBOX_CUSTOM_ENV
> + help
> + Path to the custom barebox environment
In general I'm fine, but I'd like to see more details in the help text
here. At least explaining what is an environment image, that it gets
generated from a text file in such or such format (possibly with a
pointer into the Barebox documentation). Make it clear that
BR2_TARGET_BAREBOX_CUSTOM_ENV_PATH is the path to the source
environment, and where the image will be generated, with what name, etc.
Best regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-01-23 16:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-22 15:40 [Buildroot] [PATCH] barebox: Allow to build an environment image Maxime Ripard
2013-01-23 16:03 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox