uboot: support -r option for mkenvimage
PATCH 1/1 uboot: support -r option for mkenvimage
From: Simon Dawson <[email protected]>
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.
--- boot/uboot/Config.in | 5 +++++ boot/uboot/uboot.mk | 1 + 2 files changed, 6 insertions(+)
boot/uboot/Config.in +5 -0
@@ -242,6 +242,11 @@ config BR2_TARGET_UBOOT_ENVIMAGE_SIZE Size of envronment, can be prefixed with 0x for hexadecimal values. +config BR2_TARGET_UBOOT_ENVIMAGE_REDUNDANT + bool "Redundant environment" + help + The environment has multiple copies in flash. + endif # BR2_TARGET_UBOOT_ENVIMAGE endif # BR2_TARGET_UBOOT
boot/uboot/uboot.mk +1 -0
@@ -117,6 +117,7 @@ define UBOOT_INSTALL_IMAGES_CMDS cp -dpf $(@D)/$(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)) endef
Signature · 1 line
1.8.1.2
PATCH 1/1 uboot: support -r option for mkenvimage
Quoted 17 lines · spdawson at gmail.com
From: Simon Dawson <[email protected]>
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 <[email protected]>--- boot/uboot/Config.in | 5 +++++ boot/uboot/uboot.mk | 1 + 2 files changed, 6 insertions(+)boot/uboot/Config.in +0
-0
boot/uboot/Config.in config BR2_TARGET_UBOOT_ENVIMAGE_SIZE · line 246
Quoted 5 lines
boot/uboot/Config.in +2
-0@@ -242,6 +242,11 @@ config BR2_TARGET_UBOOT_ENVIMAGE_SIZE Size of envronment, can be prefixed with 0x for hexadecimal values. +config BR2_TARGET_UBOOT_ENVIMAGE_REDUNDANT + bool "Redundant environment"
"Redundant environment" sounds as if it's... redundant :-)
How about "Environment has two copies"?
boot/uboot/Config.in config BR2_TARGET_UBOOT_ENVIMAGE_SIZE · line 248
Quoted 2 lines
boot/uboot/Config.in +2
-0+ help + The environment has multiple copies in flash.
It's always two :-)
Regards,
Arnout
Quoted 17 lines
boot/uboot/Config.in +1
-0+ endif # BR2_TARGET_UBOOT_ENVIMAGE endif # BR2_TARGET_UBOOTboot/uboot/uboot.mk +1
-0@@ -117,6 +117,7 @@ define UBOOT_INSTALL_IMAGES_CMDS cp -dpf $(@D)/$(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)) endef
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
PATCH 1/1 uboot: support -r option for mkenvimage
Dear Arnout Vandecappelle,
Quoted 6 lines · Arnout Vandecappelle
boot/uboot/Config.in config BR2_TARGET_UBOOT_ENVIMAGE_SIZE · line 246
Quoted 2 lines
boot/uboot/Config.in +2
-0+config BR2_TARGET_UBOOT_ENVIMAGE_REDUNDANT + bool "Redundant environment""Redundant environment" sounds as if it's... redundant :-)
How about "Environment has two copies"?
I would also mention in the help text that it's related to the usage of the CONFIG_ENV_ADDR_REDUND / CONFIG_ENV_SIZE_REDUND options of U-Boot, so that the user can more easily match that with the U-Boot configuration for his platform.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 uboot: support -r option for mkenvimage
Quoted 4 lines · Thomas Petazzoni
I would also mention in the help text that it's related to the usage of the
CONFIG_ENV_ADDR_REDUND/CONFIG_ENV_SIZE_REDUNDoptions of U-Boot, so that the user can more easily match that with the U-Boot configuration for his platform.
Okay; thanks for the feedback Thomas.
Simon.