From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] package/uboot-tools: fix env image help text
Date: Sun, 27 Jun 2021 12:44:20 +0200 [thread overview]
Message-ID: <20210627104420.GA2829@scaer> (raw)
In-Reply-To: <20210625091900.811972-1-mirza.kapetanovic@gmail.com>
Mirza, All,
On 2021-06-25 11:19 +0200, Mirza Kapetanovic spake thusly:
> BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_SOURCE is passed almost as is to mkenvimage
> which, looking at the help text and source code of the tool, doesn't seem to support
> mulitple files as input.
>
> I tried providing multiple files (space separated) and only the last file was included
> in the resulting environment image.
Can't we instead make that possible?
For example, this (totally untested) patch should be a step in that
direction, I think:
diff --git a/package/uboot-tools/uboot-tools.mk b/package/uboot-tools/uboot-tools.mk
index 8963d6182e..d4392e47bf 100644
--- a/package/uboot-tools/uboot-tools.mk
+++ b/package/uboot-tools/uboot-tools.mk
@@ -116,7 +116,7 @@ endif
ifeq ($(BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE),y)
-UBOOT_TOOLS_GENERATE_ENV_FILE = $(call qstrip,$(BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_SOURCE))
+UBOOT_TOOLS_ENV_FILE_SOURCES = $(call qstrip,$(BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_SOURCE))
# If BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_SOURCE is left empty, we
# will use the default environment provided in the U-Boot build
@@ -130,7 +130,7 @@ HOST_UBOOT_TOOLS_DEPENDENCIES += uboot
# Handle the case where BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_SOURCE
# is left empty, use the default U-Boot environment.
-ifeq ($(UBOOT_TOOLS_GENERATE_ENV_FILE),)
+ifeq ($(UBOOT_TOOLS_ENV_FILE_SOURCES),)
UBOOT_TOOLS_GENERATE_ENV_FILE = $(@D)/boot-env-defaults.txt
define HOST_UBOOT_TOOLS_GENERATE_ENV_DEFAULTS
CROSS_COMPILE="$(TARGET_CROSS)" \
@@ -138,7 +138,13 @@ define HOST_UBOOT_TOOLS_GENERATE_ENV_DEFAULTS
$(UBOOT_SRCDIR) \
> $(UBOOT_TOOLS_GENERATE_ENV_FILE)
endef
-endif # UBOOT_TOOLS_GENERATE_ENV_FILE
+else
+UBOOT_TOOLS_GENERATE_ENV_FILE = $(@D)/boot-env-buildroot.txt
+define HOST_UBOOT_TOOLS_GENERATE_ENV_DEFAULTS
+ cat $(UBOOT_TOOLS_ENV_FILE_SOURCES) \
+ > $(UBOOT_TOOLS_GENERATE_ENV_FILE)
+endef
+endif # UBOOT_TOOLS_ENV_FILE_SOURCE
endif # BR2_TARGET_UBOOT
ifeq ($(BR_BUILDING),y)
As I said: totally untested... I can already see that it is broken for
the case where uboot is not enabled, so this definitely needs a little
bit more of thinking...
Can you look into that, please?
Regards,
Yann E. MORIN.
> Signed-off-by: Mirza Kapetanovic <mirza.kapetanovic@gmail.com>
> ---
> package/uboot-tools/Config.in.host | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/package/uboot-tools/Config.in.host b/package/uboot-tools/Config.in.host
> index 431cc8631d..7e5c5084c0 100644
> --- a/package/uboot-tools/Config.in.host
> +++ b/package/uboot-tools/Config.in.host
> @@ -56,15 +56,13 @@ config BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE
> if BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE
>
> config BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_SOURCE
> - string "Source files for environment"
> + string "Source file for environment"
> default BR2_TARGET_UBOOT_ENVIMAGE_SOURCE if BR2_TARGET_UBOOT_ENVIMAGE_SOURCE != "" # legacy
> help
> - Text files describing the environment. Files should have
> + Text file describing the environment. File should have
> lines of the form var=value, one per line. Blank lines and
> lines starting with a # are ignored.
>
> - Multiple source files are concatenated in the order listed.
> -
> Leave empty to generate image from compiled-in env if a U-boot
> target build is configured (BR2_TARGET_UBOOT)
>
> --
> 2.25.1
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
next prev parent reply other threads:[~2021-06-27 10:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-25 9:19 [Buildroot] [PATCH 1/1] package/uboot-tools: fix env image help text Mirza Kapetanovic
2021-06-27 10:44 ` Yann E. MORIN [this message]
2021-07-05 12:29 ` Mirza Kapetanovic
2021-07-05 12:29 ` Mirza Kapetanovic
2021-07-05 12:19 ` [Buildroot] [PATCH 1/1] package/uboot-tools: concat files before passing to env image tool Mirza Kapetanovic
2021-07-06 11:55 ` [Buildroot] [External] " Weber, Matthew L Collins
2021-07-18 17:52 ` [Buildroot] " Thomas Petazzoni
2021-08-04 11:02 ` Peter Korsgaard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210627104420.GA2829@scaer \
--to=yann.morin.1998@free.fr \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox