From: Alexander Dahl <ada@thorsis.com>
To: ptxdist@pengutronix.de
Cc: Bruno Thomsen <bruno.thomsen@gmail.com>, bth@kamstrup.com
Subject: Re: [ptxdist] [PATCH] u-boot: generate default environment image
Date: Mon, 04 Nov 2019 11:27:38 +0100 [thread overview]
Message-ID: <1720794.SrYVmd4mfg@ada> (raw)
In-Reply-To: <20191031172852.20544-1-bruno.thomsen@gmail.com>
Hei hei,
did not review carefully, but …
Am Donnerstag, 31. Oktober 2019, 18:28:52 CET schrieb Bruno Thomsen:
> Can be used during manufacturing to avoid bootloader
> console usage and speed up first boot.
>
> Signed-off-by: Bruno Thomsen <bruno.thomsen@gmail.com>
> ---
> platforms/u-boot.in | 28 ++++++++++++++++++++++++++++
> rules/u-boot.make | 11 +++++++++++
> 2 files changed, 39 insertions(+)
>
> diff --git a/platforms/u-boot.in b/platforms/u-boot.in
> index 9bac4a758..d9195d7cd 100644
> --- a/platforms/u-boot.in
> +++ b/platforms/u-boot.in
> @@ -2,6 +2,7 @@
>
> menuconfig U_BOOT
> select BOOTLOADER
> + select HOST_U_BOOT_TOOLS if U_BOOT_DEFAULT_ENV_IMAGE
> prompt "U-Boot "
> bool
>
> @@ -71,6 +72,33 @@ config U_BOOT_CONFIG
>
> endif
>
> +config U_BOOT_DEFAULT_ENV_IMAGE
> + prompt "Generate U-Boot default environment image"
> + bool
> + help
> + Use U-Boot's mkenvimage to compile a U-Boot default environment
> + image for use in device manufacturing.
> +
> +if U_BOOT_DEFAULT_ENV_IMAGE
> +
> +config U_BOOT_DEFAULT_ENV_IMAGE_SIZE
> + prompt "Default environment image size"
> + string
> + default "0x2000"
> + help
> + Enter the U-Boot environment size for generation of manufacturing
> + image. Size can be prefixed with 0x for hexadecimal values.
> + Must match size defined in target config and "/etc/fw_env.config".
> +
> +config U_BOOT_DEFAULT_ENV_IMAGE_REDUNDANT
> + prompt "Default environment image with redundant copy"
> + bool
> + help
> + Use to generate a redundant environment in the default image.
> + Must match target config and "/etc/fw_env.config".
> +
> +endif
> +
> config U_BOOT_BOOT_SCRIPT
> prompt "Compile U-Boot boot script"
> bool
> diff --git a/rules/u-boot.make b/rules/u-boot.make
> index 8f9290ea7..b6e65a95a 100644
> --- a/rules/u-boot.make
> +++ b/rules/u-boot.make
> @@ -94,6 +94,13 @@ ifdef PTXCONF_U_BOOT_BOOT_SCRIPT
> @$(U_BOOT_DIR)/tools/mkimage -T script -C none \
> -d $(U_BOOT_BOOT_SCRIPT_TXT) \
> $(U_BOOT_DIR)/boot.scr.uimg
> +endif
> +ifdef PTXCONF_U_BOOT_DEFAULT_ENV_IMAGE
> + $(U_BOOT_MAKE_ENV) $(U_BOOT_DIR)/scripts/get_default_envs.sh | \
> + $(PTXDIST_SYSROOT_HOST)/bin/mkenvimage -p 0x0 \
> + $(call ptx/ifdef,PTXCONF_U_BOOT_DEFAULT_ENV_IMAGE_REDUNDANT,-r,) \
> + -s $(PTXCONF_U_BOOT_DEFAULT_ENV_IMAGE_SIZE) \
> + -o $(U_BOOT_DIR)/u-boot-env.img -
> endif
> @$(call touch)
>
> @@ -141,6 +148,10 @@ ifdef PTXCONF_U_BOOT_INSTALL_U_BOOT_WITH_SPL_PBL
> @install -v -D -m644 $(U_BOOT_DIR)/u-boot-with-spl-pbl.bin \
> $(IMAGEDIR)/u-boot-with-spl-pbl.bin
> endif
> +ifdef PTXCONF_U_BOOT_DEFAULT_ENV_IMAGE
> + @install -v -D -m644 $(U_BOOT_DIR)/u-boot-env.img \
> + $(IMAGEDIR)/u-boot-env.img
> +endif
>
> ifdef PTXCONF_U_BOOT_BOOT_SCRIPT
> @$(call install_init, u-boot)
Tested-by: Alexander Dahl <ada@thorsis.com>
Image looks fine, as far as I can tell.
Greets
Alex
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
next prev parent reply other threads:[~2019-11-04 10:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-31 17:28 Bruno Thomsen
2019-11-04 10:27 ` Alexander Dahl [this message]
2019-11-06 14:12 ` Denis OSTERLAND
2019-11-08 17:47 ` Michael Olbrich
2019-11-12 13:20 ` Bruno Thomsen
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=1720794.SrYVmd4mfg@ada \
--to=ada@thorsis.com \
--cc=bruno.thomsen@gmail.com \
--cc=bth@kamstrup.com \
--cc=ptxdist@pengutronix.de \
/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