aboutsummaryrefslogtreecommitdiff
path: root/boot/uboot/uboot.mk
diff options
context:
space:
mode:
authorGravatar Denis Osterland <Denis.Osterland@diehl.com>2018-11-12 10:18:19 +0000
committerGravatar Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>2019-08-01 12:52:29 +0200
commit2c8ff251cb16d38fb417a488ee0367cd03eebda2 (patch)
tree7ae001d59fae9dd798e888ec300233321ef6f02c /boot/uboot/uboot.mk
parent82e27fd38a97955b1b5a4503093e1a3a14b4c936 (diff)
downloadbuildroot-2c8ff251cb16d38fb417a488ee0367cd03eebda2.tar.gz
buildroot-2c8ff251cb16d38fb417a488ee0367cd03eebda2.tar.bz2
boot/uboot: add option to generate env image from default env
This patch adds support to extract compiled in default env via u-boot's get_default_envs script and generate env image from it. Signed-off-by: Denis Osterland <Denis.Osterland@diehl.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Diffstat (limited to 'boot/uboot/uboot.mk')
-rw-r--r--boot/uboot/uboot.mk8
1 files changed, 4 insertions, 4 deletions
diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
index ae09c37d84..0a8856d7db 100644
--- a/boot/uboot/uboot.mk
+++ b/boot/uboot/uboot.mk
@@ -271,8 +271,11 @@ define UBOOT_BUILD_OMAP_IFT
endef
ifneq ($(BR2_TARGET_UBOOT_ENVIMAGE),)
+UBOOT_GENERATE_ENV_FILE=$(call qstrip,$(BR2_TARGET_UBOOT_ENVIMAGE_SOURCE))
define UBOOT_GENERATE_ENV_IMAGE
- cat $(call qstrip,$(BR2_TARGET_UBOOT_ENVIMAGE_SOURCE)) \
+ $(if $(UBOOT_GENERATE_ENV_FILE), \
+ cat $(UBOOT_GENERATE_ENV_FILE), \
+ CROSS_COMPILE="$(TARGET_CROSS)" $(@D)/scripts/get_default_envs.sh $(@D)) \
>$(@D)/buildroot-env.txt
$(HOST_DIR)/bin/mkenvimage -s $(BR2_TARGET_UBOOT_ENVIMAGE_SIZE) \
$(if $(BR2_TARGET_UBOOT_ENVIMAGE_REDUNDANT),-r) \
@@ -385,9 +388,6 @@ endef
ifeq ($(BR2_TARGET_UBOOT_ENVIMAGE),y)
ifeq ($(BR_BUILDING),y)
-ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_ENVIMAGE_SOURCE)),)
-$(error Please define a source file for Uboot environment (BR2_TARGET_UBOOT_ENVIMAGE_SOURCE setting))
-endif
ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_ENVIMAGE_SIZE)),)
$(error Please provide Uboot environment size (BR2_TARGET_UBOOT_ENVIMAGE_SIZE setting))
endif