Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] uboot: support -r option for mkenvimage
@ 2013-10-11  7:57 spdawson at gmail.com
  2013-10-11 21:18 ` Arnout Vandecappelle
  0 siblings, 1 reply; 4+ messages in thread
From: spdawson at gmail.com @ 2013-10-11  7:57 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>
---
 boot/uboot/Config.in | 5 +++++
 boot/uboot/uboot.mk  | 1 +
 2 files changed, 6 insertions(+)

diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
index 998cda2..d33e8e1 100644
--- a/boot/uboot/Config.in
+++ b/boot/uboot/Config.in
@@ -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
diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
index dc8e26f..330c177 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] 4+ messages in thread

* [Buildroot] [PATCH] uboot: support -r option for mkenvimage
  2013-10-11  7:57 [Buildroot] [PATCH] uboot: support -r option for mkenvimage spdawson at gmail.com
@ 2013-10-11 21:18 ` Arnout Vandecappelle
  2013-10-11 21:21   ` Thomas Petazzoni
  0 siblings, 1 reply; 4+ messages in thread
From: Arnout Vandecappelle @ 2013-10-11 21:18 UTC (permalink / raw)
  To: buildroot

On 11/10/13 09:57, 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>
> ---
>   boot/uboot/Config.in | 5 +++++
>   boot/uboot/uboot.mk  | 1 +
>   2 files changed, 6 insertions(+)
>
> diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
> index 998cda2..d33e8e1 100644
> --- a/boot/uboot/Config.in
> +++ b/boot/uboot/Config.in
> @@ -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"?

> +	help
> +	  The environment has multiple copies in flash.

  It's always two :-)


  Regards,
  Arnout

> +
>   endif # BR2_TARGET_UBOOT_ENVIMAGE
>
>   endif # BR2_TARGET_UBOOT
> diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
> index dc8e26f..330c177 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
>
>


-- 
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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] uboot: support -r option for mkenvimage
  2013-10-11 21:18 ` Arnout Vandecappelle
@ 2013-10-11 21:21   ` Thomas Petazzoni
  2013-10-12 10:00     ` Simon Dawson
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2013-10-11 21:21 UTC (permalink / raw)
  To: buildroot

Dear Arnout Vandecappelle,

On Fri, 11 Oct 2013 23:18:48 +0200, Arnout Vandecappelle wrote:

> > +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
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] uboot: support -r option for mkenvimage
  2013-10-11 21:21   ` Thomas Petazzoni
@ 2013-10-12 10:00     ` Simon Dawson
  0 siblings, 0 replies; 4+ messages in thread
From: Simon Dawson @ 2013-10-12 10:00 UTC (permalink / raw)
  To: buildroot

On 11 October 2013 22:21, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> 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.

Okay; thanks for the feedback Thomas.

Simon.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-10-12 10:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-11  7:57 [Buildroot] [PATCH] uboot: support -r option for mkenvimage spdawson at gmail.com
2013-10-11 21:18 ` Arnout Vandecappelle
2013-10-11 21:21   ` Thomas Petazzoni
2013-10-12 10:00     ` Simon Dawson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox