uboot: support -r option for mkenvimage
Some boards are configured in u-boot to store multiple redundant copies of the environment image in flash. For these boards, it is required to pass the -r flag, when generating a boot environment image using mkenvimage. Signed-off-by: Simon Dawson <spdawson@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
parent
08db3236c4
commit
f3fbfc52eb
@ -251,6 +251,20 @@ config BR2_TARGET_UBOOT_ENVIMAGE_SIZE
|
|||||||
Size of envronment, can be prefixed with 0x for hexadecimal
|
Size of envronment, can be prefixed with 0x for hexadecimal
|
||||||
values.
|
values.
|
||||||
|
|
||||||
|
config BR2_TARGET_UBOOT_ENVIMAGE_REDUNDANT
|
||||||
|
bool "Environment has two copies"
|
||||||
|
help
|
||||||
|
Some platforms define in their U-Boot configuration that the
|
||||||
|
U-Boot environment should be duplicated in two locations (for
|
||||||
|
extra safety). Check your U-Boot configuration for the
|
||||||
|
CONFIG_ENV_ADDR_REDUND and CONFIG_ENV_SIZE_REDUND settings to
|
||||||
|
see if this is the case for your platform.
|
||||||
|
|
||||||
|
If it is the case, then you should enable this option to
|
||||||
|
ensure that the U-Boot environment image generated by
|
||||||
|
Buildroot is compatible with the "redundant environment"
|
||||||
|
mechanism of U-Boot.
|
||||||
|
|
||||||
endif # BR2_TARGET_UBOOT_ENVIMAGE
|
endif # BR2_TARGET_UBOOT_ENVIMAGE
|
||||||
|
|
||||||
endif # BR2_TARGET_UBOOT
|
endif # BR2_TARGET_UBOOT
|
||||||
|
@ -120,6 +120,7 @@ define UBOOT_INSTALL_IMAGES_CMDS
|
|||||||
cp -dpf $(@D)/$(BR2_TARGET_UBOOT_SPL_NAME) $(BINARIES_DIR)/)
|
cp -dpf $(@D)/$(BR2_TARGET_UBOOT_SPL_NAME) $(BINARIES_DIR)/)
|
||||||
$(if $(BR2_TARGET_UBOOT_ENVIMAGE),
|
$(if $(BR2_TARGET_UBOOT_ENVIMAGE),
|
||||||
$(HOST_DIR)/usr/bin/mkenvimage -s $(BR2_TARGET_UBOOT_ENVIMAGE_SIZE) \
|
$(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 $(BR2_TARGET_UBOOT_ENVIMAGE_SOURCE))
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user