mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-30 22:11:59 -09:00
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>
This commit is contained in:
committed by
Arnout Vandecappelle (Essensium/Mind)
parent
82e27fd38a
commit
2c8ff251cb
@@ -487,6 +487,8 @@ menuconfig BR2_TARGET_UBOOT_ENVIMAGE
|
|||||||
|
|
||||||
The environment image will be called uboot-env.bin.
|
The environment image will be called uboot-env.bin.
|
||||||
|
|
||||||
|
Leave empty to generate image from compiled-in env.
|
||||||
|
|
||||||
if BR2_TARGET_UBOOT_ENVIMAGE
|
if BR2_TARGET_UBOOT_ENVIMAGE
|
||||||
|
|
||||||
config BR2_TARGET_UBOOT_ENVIMAGE_SOURCE
|
config BR2_TARGET_UBOOT_ENVIMAGE_SOURCE
|
||||||
|
|||||||
@@ -271,8 +271,11 @@ define UBOOT_BUILD_OMAP_IFT
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
ifneq ($(BR2_TARGET_UBOOT_ENVIMAGE),)
|
ifneq ($(BR2_TARGET_UBOOT_ENVIMAGE),)
|
||||||
|
UBOOT_GENERATE_ENV_FILE=$(call qstrip,$(BR2_TARGET_UBOOT_ENVIMAGE_SOURCE))
|
||||||
define UBOOT_GENERATE_ENV_IMAGE
|
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
|
>$(@D)/buildroot-env.txt
|
||||||
$(HOST_DIR)/bin/mkenvimage -s $(BR2_TARGET_UBOOT_ENVIMAGE_SIZE) \
|
$(HOST_DIR)/bin/mkenvimage -s $(BR2_TARGET_UBOOT_ENVIMAGE_SIZE) \
|
||||||
$(if $(BR2_TARGET_UBOOT_ENVIMAGE_REDUNDANT),-r) \
|
$(if $(BR2_TARGET_UBOOT_ENVIMAGE_REDUNDANT),-r) \
|
||||||
@@ -385,9 +388,6 @@ endef
|
|||||||
|
|
||||||
ifeq ($(BR2_TARGET_UBOOT_ENVIMAGE),y)
|
ifeq ($(BR2_TARGET_UBOOT_ENVIMAGE),y)
|
||||||
ifeq ($(BR_BUILDING),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)),)
|
ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_ENVIMAGE_SIZE)),)
|
||||||
$(error Please provide Uboot environment size (BR2_TARGET_UBOOT_ENVIMAGE_SIZE setting))
|
$(error Please provide Uboot environment size (BR2_TARGET_UBOOT_ENVIMAGE_SIZE setting))
|
||||||
endif
|
endif
|
||||||
|
|||||||
Reference in New Issue
Block a user