* [Buildroot] [PATCH 1/1] boot/uboot: add support for u-boot-initial-env install
@ 2023-09-11 6:19 James Hilliard
2024-03-15 10:38 ` Andreas Naumann
2024-04-03 19:57 ` Thomas Petazzoni via buildroot
0 siblings, 2 replies; 4+ messages in thread
From: James Hilliard @ 2023-09-11 6:19 UTC (permalink / raw)
To: buildroot; +Cc: James Hilliard
This file is needed by libubootenv for fw_printenv/fw_setenv and
library API's to function when the environment is empty.
See details:
https://github.com/sbabic/libubootenv/tree/v0.3.4#replacement-old-tools
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
boot/uboot/Config.in | 7 +++++++
boot/uboot/uboot.mk | 8 ++++++++
2 files changed, 15 insertions(+)
diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
index 21f19db890..d7f2912ebc 100644
--- a/boot/uboot/Config.in
+++ b/boot/uboot/Config.in
@@ -506,6 +506,13 @@ config BR2_TARGET_UBOOT_SPL_NAME
and TPL name is tpl/u-boot-tpl.bin but not always. SPL name is
MLO on OMAP and SPL on i.MX6 for example.
+config BR2_TARGET_UBOOT_INITIAL_ENV
+ bool "Install u-boot-initial-env"
+ help
+ Install the U-Boot u-boot-initial-env on the target.
+
+ This file is typically required by libubootenv.
+
config BR2_TARGET_UBOOT_ZYNQMP
bool "Boot on the Xilinx ZynqMP SoCs"
depends on BR2_aarch64
diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
index dda606a880..491f654cec 100644
--- a/boot/uboot/uboot.mk
+++ b/boot/uboot/uboot.mk
@@ -138,6 +138,14 @@ UBOOT_MAKE_TARGET += u-boot.stm32
endif
endif
+ifeq ($(BR2_TARGET_UBOOT_INITIAL_ENV),y)
+UBOOT_MAKE_TARGET += u-boot-initial-env
+define UBOOT_INSTALL_UBOOT_INITIAL_ENV
+ $(INSTALL) -D -m 0644 $(@D)/u-boot-initial-env $(TARGET_DIR)/etc/u-boot-initial-env
+endef
+UBOOT_POST_INSTALL_TARGET_HOOKS += UBOOT_INSTALL_UBOOT_INITIAL_ENV
+endif
+
ifeq ($(BR2_TARGET_UBOOT_FORMAT_CUSTOM),y)
UBOOT_BINS += $(call qstrip,$(BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME))
endif
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Buildroot] [PATCH 1/1] boot/uboot: add support for u-boot-initial-env install
2023-09-11 6:19 [Buildroot] [PATCH 1/1] boot/uboot: add support for u-boot-initial-env install James Hilliard
@ 2024-03-15 10:38 ` Andreas Naumann
2024-03-15 19:37 ` James Hilliard
2024-04-03 19:57 ` Thomas Petazzoni via buildroot
1 sibling, 1 reply; 4+ messages in thread
From: Andreas Naumann @ 2024-03-15 10:38 UTC (permalink / raw)
To: James Hilliard, buildroot
Hi James, all,
Am 11.09.23 um 08:19 schrieb James Hilliard:
> This file is needed by libubootenv for fw_printenv/fw_setenv and
> library API's to function when the environment is empty.
>
> See details:
> https://github.com/sbabic/libubootenv/tree/v0.3.4#replacement-old-tools
>
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> ---
> boot/uboot/Config.in | 7 +++++++
> boot/uboot/uboot.mk | 8 ++++++++
> 2 files changed, 15 insertions(+)
Another solution could be to automatically install it if libubootenv is
selected. But that might be a bit unforeseable magic. Not sure if this
is wanted.
To me it's good as is.
Reviewed-by: Andreas Naumann <anaumann@ultratronik.de>
Tested-by: Andreas Naumann <anaumann@ultratronik.de>
[compile-time tested with wandboard_defconfig]
>
> diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
> index 21f19db890..d7f2912ebc 100644
> --- a/boot/uboot/Config.in
> +++ b/boot/uboot/Config.in
> @@ -506,6 +506,13 @@ config BR2_TARGET_UBOOT_SPL_NAME
> and TPL name is tpl/u-boot-tpl.bin but not always. SPL name is
> MLO on OMAP and SPL on i.MX6 for example.
>
> +config BR2_TARGET_UBOOT_INITIAL_ENV
> + bool "Install u-boot-initial-env"
> + help
> + Install the U-Boot u-boot-initial-env on the target.
> +
> + This file is typically required by libubootenv.
> +
> config BR2_TARGET_UBOOT_ZYNQMP
> bool "Boot on the Xilinx ZynqMP SoCs"
> depends on BR2_aarch64
> diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
> index dda606a880..491f654cec 100644
> --- a/boot/uboot/uboot.mk
> +++ b/boot/uboot/uboot.mk
> @@ -138,6 +138,14 @@ UBOOT_MAKE_TARGET += u-boot.stm32
> endif
> endif
>
> +ifeq ($(BR2_TARGET_UBOOT_INITIAL_ENV),y)
> +UBOOT_MAKE_TARGET += u-boot-initial-env
> +define UBOOT_INSTALL_UBOOT_INITIAL_ENV
> + $(INSTALL) -D -m 0644 $(@D)/u-boot-initial-env $(TARGET_DIR)/etc/u-boot-initial-env
> +endef
> +UBOOT_POST_INSTALL_TARGET_HOOKS += UBOOT_INSTALL_UBOOT_INITIAL_ENV
> +endif
> +
> ifeq ($(BR2_TARGET_UBOOT_FORMAT_CUSTOM),y)
> UBOOT_BINS += $(call qstrip,$(BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME))
> endif
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Buildroot] [PATCH 1/1] boot/uboot: add support for u-boot-initial-env install
2024-03-15 10:38 ` Andreas Naumann
@ 2024-03-15 19:37 ` James Hilliard
0 siblings, 0 replies; 4+ messages in thread
From: James Hilliard @ 2024-03-15 19:37 UTC (permalink / raw)
To: Andreas Naumann; +Cc: buildroot
On Fri, Mar 15, 2024 at 4:38 AM Andreas Naumann <dev@andin.de> wrote:
>
> Hi James, all,
>
>
> Am 11.09.23 um 08:19 schrieb James Hilliard:
> > This file is needed by libubootenv for fw_printenv/fw_setenv and
> > library API's to function when the environment is empty.
> >
> > See details:
> > https://github.com/sbabic/libubootenv/tree/v0.3.4#replacement-old-tools
> >
> > Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> > ---
> > boot/uboot/Config.in | 7 +++++++
> > boot/uboot/uboot.mk | 8 ++++++++
> > 2 files changed, 15 insertions(+)
>
> Another solution could be to automatically install it if libubootenv is
> selected. But that might be a bit unforeseable magic. Not sure if this
> is wanted.
> To me it's good as is.
Yeah, I figured it was a better idea to just keep it separate for now in case
someone is generating u-boot-initial-env out of tree or some other way.
>
> Reviewed-by: Andreas Naumann <anaumann@ultratronik.de>
> Tested-by: Andreas Naumann <anaumann@ultratronik.de>
> [compile-time tested with wandboard_defconfig]
>
>
> >
> > diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
> > index 21f19db890..d7f2912ebc 100644
> > --- a/boot/uboot/Config.in
> > +++ b/boot/uboot/Config.in
> > @@ -506,6 +506,13 @@ config BR2_TARGET_UBOOT_SPL_NAME
> > and TPL name is tpl/u-boot-tpl.bin but not always. SPL name is
> > MLO on OMAP and SPL on i.MX6 for example.
> >
> > +config BR2_TARGET_UBOOT_INITIAL_ENV
> > + bool "Install u-boot-initial-env"
> > + help
> > + Install the U-Boot u-boot-initial-env on the target.
> > +
> > + This file is typically required by libubootenv.
> > +
> > config BR2_TARGET_UBOOT_ZYNQMP
> > bool "Boot on the Xilinx ZynqMP SoCs"
> > depends on BR2_aarch64
> > diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
> > index dda606a880..491f654cec 100644
> > --- a/boot/uboot/uboot.mk
> > +++ b/boot/uboot/uboot.mk
> > @@ -138,6 +138,14 @@ UBOOT_MAKE_TARGET += u-boot.stm32
> > endif
> > endif
> >
> > +ifeq ($(BR2_TARGET_UBOOT_INITIAL_ENV),y)
> > +UBOOT_MAKE_TARGET += u-boot-initial-env
> > +define UBOOT_INSTALL_UBOOT_INITIAL_ENV
> > + $(INSTALL) -D -m 0644 $(@D)/u-boot-initial-env $(TARGET_DIR)/etc/u-boot-initial-env
> > +endef
> > +UBOOT_POST_INSTALL_TARGET_HOOKS += UBOOT_INSTALL_UBOOT_INITIAL_ENV
> > +endif
> > +
> > ifeq ($(BR2_TARGET_UBOOT_FORMAT_CUSTOM),y)
> > UBOOT_BINS += $(call qstrip,$(BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME))
> > endif
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Buildroot] [PATCH 1/1] boot/uboot: add support for u-boot-initial-env install
2023-09-11 6:19 [Buildroot] [PATCH 1/1] boot/uboot: add support for u-boot-initial-env install James Hilliard
2024-03-15 10:38 ` Andreas Naumann
@ 2024-04-03 19:57 ` Thomas Petazzoni via buildroot
1 sibling, 0 replies; 4+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-04-03 19:57 UTC (permalink / raw)
To: James Hilliard; +Cc: buildroot
On Mon, 11 Sep 2023 00:19:40 -0600
James Hilliard <james.hilliard1@gmail.com> wrote:
> This file is needed by libubootenv for fw_printenv/fw_setenv and
> library API's to function when the environment is empty.
>
> See details:
> https://github.com/sbabic/libubootenv/tree/v0.3.4#replacement-old-tools
>
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> ---
> boot/uboot/Config.in | 7 +++++++
> boot/uboot/uboot.mk | 8 ++++++++
> 2 files changed, 15 insertions(+)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-04-03 19:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-11 6:19 [Buildroot] [PATCH 1/1] boot/uboot: add support for u-boot-initial-env install James Hilliard
2024-03-15 10:38 ` Andreas Naumann
2024-03-15 19:37 ` James Hilliard
2024-04-03 19:57 ` Thomas Petazzoni via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox