diff options
author | Cam Hutchison <camh@xdna.net> | 2016-01-31 11:48:33 +1100 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2016-05-31 22:59:35 +0200 |
commit | 0542bb79e823505a730b6a2c2f01b33b6293cf03 (patch) | |
tree | 3158f7af31e5a7f02707e9a737e7c020f8d42bf5 /boot | |
parent | 690ed04845cbde378b3668316d5313d845f6862e (diff) |
uboot: Support multiple environment source files
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>
[Thomas: adjust indentation in the .mk file.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'boot')
-rw-r--r-- | boot/uboot/Config.in | 8 | ||||
-rw-r--r-- | boot/uboot/uboot.mk | 7 |
2 files changed, 10 insertions, 5 deletions
diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in index 21f9abda5..9ffbb5145 100644 --- a/boot/uboot/Config.in +++ b/boot/uboot/Config.in @@ -348,9 +348,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 e071303f7..3b2a23040 100644 --- a/boot/uboot/uboot.mk +++ b/boot/uboot/uboot.mk @@ -165,9 +165,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), - $(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)) + 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 -) endef define UBOOT_INSTALL_OMAP_IFT_IMAGE |