* [Buildroot] [PATCH v2] uboot: support -r option for mkenvimage
@ 2013-10-12 10:05 spdawson at gmail.com
2013-10-12 10:23 ` Thomas Petazzoni
0 siblings, 1 reply; 3+ messages in thread
From: spdawson at gmail.com @ 2013-10-12 10:05 UTC (permalink / raw)
To: buildroot
From: Simon Dawson <spdawson@gmail.com>
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>
---
v2: Change configuration menu text and help text, in response to feedback
from Arnout Vandecappelle and Thomas Petazzoni
boot/uboot/Config.in | 8 ++++++++
boot/uboot/uboot.mk | 1 +
2 files changed, 9 insertions(+)
diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
index 998cda2..b750c77 100644
--- a/boot/uboot/Config.in
+++ b/boot/uboot/Config.in
@@ -242,6 +242,14 @@ config BR2_TARGET_UBOOT_ENVIMAGE_SIZE
Size of envronment, can be prefixed with 0x for hexadecimal
values.
+config BR2_TARGET_UBOOT_ENVIMAGE_REDUNDANT
+ bool "Environment has two copies"
+ help
+ There are two copies of the environment in flash.
+
+ Check your u-boot configuration for the CONFIG_ENV_ADDR_REDUND and
+ CONFIG_ENV_SIZE_REDUND settings.
+
endif # BR2_TARGET_UBOOT_ENVIMAGE
endif # BR2_TARGET_UBOOT
diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
index dc8e26f..e21ee81 100644
--- a/boot/uboot/uboot.mk
+++ b/boot/uboot/uboot.mk
@@ -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
--
1.8.1.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH v2] uboot: support -r option for mkenvimage
2013-10-12 10:05 [Buildroot] [PATCH v2] uboot: support -r option for mkenvimage spdawson at gmail.com
@ 2013-10-12 10:23 ` Thomas Petazzoni
2013-10-13 7:42 ` Simon Dawson
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2013-10-12 10:23 UTC (permalink / raw)
To: buildroot
Simon,
On Sat, 12 Oct 2013 11:05:39 +0100, spdawson at gmail.com wrote:
> From: Simon Dawson <spdawson@gmail.com>
>
> 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>
> ---
> v2: Change configuration menu text and help text, in response to feedback
> from Arnout Vandecappelle and Thomas Petazzoni
>
> boot/uboot/Config.in | 8 ++++++++
> boot/uboot/uboot.mk | 1 +
> 2 files changed, 9 insertions(+)
>
> diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
> index 998cda2..b750c77 100644
> --- a/boot/uboot/Config.in
> +++ b/boot/uboot/Config.in
> @@ -242,6 +242,14 @@ config BR2_TARGET_UBOOT_ENVIMAGE_SIZE
> Size of envronment, can be prefixed with 0x for hexadecimal
> values.
>
> +config BR2_TARGET_UBOOT_ENVIMAGE_REDUNDANT
> + bool "Environment has two copies"
> + help
> + There are two copies of the environment in flash.
> +
> + Check your u-boot configuration for the CONFIG_ENV_ADDR_REDUND and
> + CONFIG_ENV_SIZE_REDUND settings.
I'm sorry but I'm still unhappy with the help text, especially since
your commit log is in fact better :-)
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 it 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 this "redundant environment"
mechanism of U-Boot.
Or something along those lines (don't hesitate to fix the broken
english if needed).
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH v2] uboot: support -r option for mkenvimage
2013-10-12 10:23 ` Thomas Petazzoni
@ 2013-10-13 7:42 ` Simon Dawson
0 siblings, 0 replies; 3+ messages in thread
From: Simon Dawson @ 2013-10-13 7:42 UTC (permalink / raw)
To: buildroot
On 12 October 2013 11:23, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> I'm sorry but I'm still unhappy with the help text, especially since
> your commit log is in fact better :-)
>
> 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 it 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 this "redundant environment"
> mechanism of U-Boot.
>
> Or something along those lines (don't hesitate to fix the broken
> english if needed).
Okay, I'll try to improve the help text. Thanks for the feedback Thomas.
Simon.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-10-13 7:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-12 10:05 [Buildroot] [PATCH v2] uboot: support -r option for mkenvimage spdawson at gmail.com
2013-10-12 10:23 ` Thomas Petazzoni
2013-10-13 7:42 ` Simon Dawson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.