boot/uboot: add support for u-boot-initial-env install
PATCH 1/1 boot/uboot: add support for u-boot-initial-env install
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
--- boot/uboot/Config.in | 7 +++++++ boot/uboot/uboot.mk | 8 ++++++++ 2 files changed, 15 insertions(+)
boot/uboot/Config.in +7 -0
@@ -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
boot/uboot/uboot.mk +8 -0
@@ -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
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hi James, all,
Am 11.09.23 um 08:19 schrieb James Hilliard:
Quoted 11 lines
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-toolsSigned-off-by James Hilliard <[email protected]>--- 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.
Quoted 28 lines
boot/uboot/Config.in +7
-0@@ -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_aarch64boot/uboot/uboot.mk +1
-0@@ -138,6 +138,14 @@ UBOOT_MAKE_TARGET += u-boot.stm32 endif endif +ifeq ($(BR2_TARGET_UBOOT_INITIAL_ENV),y)
boot/uboot/uboot.mk UBOOT_MAKE_TARGET += u-boot.stm32 · line 151
Quoted 10 lines
boot/uboot/uboot.mk +7
-0+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
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 17 lines · Andreas Naumann
Hi James, all,
Am 11.09.23 um 08:19 schrieb James Hilliard:
Quoted 11 lines
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-toolsSigned-off-by James Hilliard <[email protected]>--- boot/uboot/Config.in | 7 +++++++ boot/uboot/uboot.mk | 8 ++++++++ 2 files changed, 15 insertions(+)
Quoted 4 lines
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.
Quoted 33 lines
Reviewed-by Andreas Naumann <[email protected]>Tested-by Andreas Naumann <[email protected]>[compile-time tested with wandboard_defconfig]Quoted 27 lines
boot/uboot/Config.in +7
-0@@ -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_aarch64boot/uboot/uboot.mk +0
-0@@ -138,6 +138,14 @@ UBOOT_MAKE_TARGET += u-boot.stm32 endif endif
Quoted 11 lines
boot/uboot/uboot.mk UBOOT_MAKE_TARGET += u-boot.stm32 · line 151
Quoted 11 lines
boot/uboot/uboot.mk +8
-0+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
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Thomas Petazzoni via buildroot
AppliedQuoted 11 lines · On Mon, 11 Sep 2023 00:19:40 -0600 James Hilliard <[email protected]>…
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-toolsSigned-off-by James Hilliard <[email protected]>--- boot/uboot/Config.in | 7 +++++++ boot/uboot/uboot.mk | 8 ++++++++ 2 files changed, 15 insertions(+)
Applied to master, thanks.
Thomas
Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot