* [Buildroot] [PATCH 1/1] uboot: Support multiple environment source files
@ 2016-01-31 0:48 Cam Hutchison
2016-05-31 21:00 ` Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: Cam Hutchison @ 2016-01-31 0:48 UTC (permalink / raw)
To: buildroot
Allow multiple file names to be listed in
BR2_TARGET_UBOOT_ENVIMAGE_SOURCE, concatenating them in the order
listed.
This allows the bulk of the environment to be shared across multiple
boards using a common environment file with board-specific values
supplied in a secondary environment source file.
Signed-off-by: Cam Hutchison <camh@xdna.net>
---
boot/uboot/Config.in | 8 ++++++--
boot/uboot/uboot.mk | 3 ++-
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
index dde4710..04c36bc 100644
--- a/boot/uboot/Config.in
+++ b/boot/uboot/Config.in
@@ -349,9 +349,13 @@ menuconfig BR2_TARGET_UBOOT_ENVIMAGE
if BR2_TARGET_UBOOT_ENVIMAGE
config BR2_TARGET_UBOOT_ENVIMAGE_SOURCE
- string "Source file for environment"
+ string "Source files for environment"
help
- Text file describing the environment.
+ Text files describing the environment. Files should have
+ lines of the form var=value, one per line. Blank lines
+ and lines starting with a # are ignored.
+
+ Multiple source files are concatenated in the order listed.
config BR2_TARGET_UBOOT_ENVIMAGE_SIZE
string "Size of environment"
diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
index d539b31..515b1ea 100644
--- a/boot/uboot/uboot.mk
+++ b/boot/uboot/uboot.mk
@@ -171,9 +171,10 @@ define UBOOT_INSTALL_IMAGES_CMDS
$(if $(BR2_TARGET_UBOOT_SPL),
cp -dpf $(@D)/$(call qstrip,$(BR2_TARGET_UBOOT_SPL_NAME)) $(BINARIES_DIR)/)
$(if $(BR2_TARGET_UBOOT_ENVIMAGE),
+ cat $(call qstrip,$(BR2_TARGET_UBOOT_ENVIMAGE_SOURCE)) | \
$(HOST_DIR)/usr/bin/mkenvimage -s $(BR2_TARGET_UBOOT_ENVIMAGE_SIZE) \
$(if $(BR2_TARGET_UBOOT_ENVIMAGE_REDUNDANT),-r) \
- -o $(BINARIES_DIR)/uboot-env.bin $(BR2_TARGET_UBOOT_ENVIMAGE_SOURCE))
+ -o $(BINARIES_DIR)/uboot-env.bin -)
endef
define UBOOT_INSTALL_OMAP_IFT_IMAGE
--
2.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH 1/1] uboot: Support multiple environment source files
2016-01-31 0:48 [Buildroot] [PATCH 1/1] uboot: Support multiple environment source files Cam Hutchison
@ 2016-05-31 21:00 ` Thomas Petazzoni
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2016-05-31 21:00 UTC (permalink / raw)
To: buildroot
Hello,
On Sun, 31 Jan 2016 11:48:33 +1100, Cam Hutchison wrote:
> diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
> index d539b31..515b1ea 100644
> --- a/boot/uboot/uboot.mk
> +++ b/boot/uboot/uboot.mk
> @@ -171,9 +171,10 @@ define UBOOT_INSTALL_IMAGES_CMDS
> $(if $(BR2_TARGET_UBOOT_SPL),
> cp -dpf $(@D)/$(call qstrip,$(BR2_TARGET_UBOOT_SPL_NAME)) $(BINARIES_DIR)/)
> $(if $(BR2_TARGET_UBOOT_ENVIMAGE),
> + cat $(call qstrip,$(BR2_TARGET_UBOOT_ENVIMAGE_SOURCE)) | \
> $(HOST_DIR)/usr/bin/mkenvimage -s $(BR2_TARGET_UBOOT_ENVIMAGE_SIZE) \
> $(if $(BR2_TARGET_UBOOT_ENVIMAGE_REDUNDANT),-r) \
> - -o $(BINARIES_DIR)/uboot-env.bin $(BR2_TARGET_UBOOT_ENVIMAGE_SOURCE))
> + -o $(BINARIES_DIR)/uboot-env.bin -)
The lines following the pipe should have been indented by one more tab
(but it admittedly wasn't done so far). I've fixed that up and applied
your patch to our next branch.
Thanks, and sorry for the long delay!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-05-31 21:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-31 0:48 [Buildroot] [PATCH 1/1] uboot: Support multiple environment source files Cam Hutchison
2016-05-31 21:00 ` Thomas Petazzoni
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.