From: Christian Melki <christian.melki@t2data.com>
To: Sebastian Muxel <sebastian.muxel@entner-electronics.com>
Cc: "ptxdist@pengutronix.de" <ptxdist@pengutronix.de>
Subject: Re: [ptxdist] [PATCH] u-boot: Allow specification of padding byte for custom env images
Date: Mon, 5 Feb 2024 21:30:38 +0100 [thread overview]
Message-ID: <fdfb4e6c-a265-4734-bca8-ffc2b42906aa@t2data.com> (raw)
In-Reply-To: <20240205201844.65771-2-sebastian.muxel@entner-electronics.com>
On 2/5/24 21:16, Sebastian Muxel wrote:
> [Du får inte e-post ofta från sebastian.muxel@entner-electronics.com. Läs om varför det här är viktigt på https://aka.ms/LearnAboutSenderIdentification ]
>
> The env image is currently always padded with the default bytes 0xFF.
> New configuration U_BOOT_ENV_IMAGE_CUSTOM_PADDING_BYTES is added
> to allow specification for custom env images.
>
Hi.
Just curious. In what situation would you need to alter the default
padding bytes? 0xff suits most (if not all) NVM types. Flash transition
layers usually just give an illusion of the traditional zero:ed block on
flash to block translation?
Regards,
Christian
> Signed-off-by: Sebastian Muxel <sebastian.muxel@entner-electronics.com>
> ---
> platforms/u-boot.in | 9 +++++++++
> rules/u-boot.make | 1 +
> 2 files changed, 10 insertions(+)
>
> diff --git a/platforms/u-boot.in b/platforms/u-boot.in
> index 769237081..bcabc8b27 100644
> --- a/platforms/u-boot.in
> +++ b/platforms/u-boot.in
> @@ -131,6 +131,15 @@ config U_BOOT_ENV_IMAGE_CUSTOM_SOURCE
> The file should have lines in the form var=value, one per line.
> Blank lines and lines starting with a # are ignored.
>
> +config U_BOOT_ENV_IMAGE_CUSTOM_PADDING_BYTES
> + prompt "Bytes used to pad environment image"
> + hex
> + default "0xFF"
> + depends on U_BOOT_ENV_IMAGE_CUSTOM
> + help
> + Enter the byte used for padding the image to the specified
> + U-Boot environment size.
> +
> if !U_BOOT_ENV_IMAGE_NONE
>
> config U_BOOT_ENV_IMAGE_SIZE
> diff --git a/rules/u-boot.make b/rules/u-boot.make
> index 4bc7f3f78..6ef657529 100644
> --- a/rules/u-boot.make
> +++ b/rules/u-boot.make
> @@ -123,6 +123,7 @@ ifdef PTXCONF_U_BOOT_ENV_IMAGE_CUSTOM
> $(call ptx/ifdef,PTXCONF_U_BOOT_ENV_IMAGE_REDUNDANT,-r,) \
> -s $(PTXCONF_U_BOOT_ENV_IMAGE_SIZE) \
> -o $(U_BOOT_BUILD_DIR)/u-boot-env.img \
> + -p $(PTXCONF_U_BOOT_ENV_IMAGE_CUSTOM_PADDING_BYTES) \
> $(U_BOOT_ENV_IMAGE_CUSTOM_SRC)
> endif
> @$(call touch)
> --
> 2.43.0
>
>
next prev parent reply other threads:[~2024-02-05 20:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-05 20:16 Sebastian Muxel
2024-02-05 20:30 ` Christian Melki [this message]
2024-02-05 20:49 ` Sebastian Muxel
2024-02-05 21:07 ` Christian Melki
2024-02-09 17:23 ` Sebastian Muxel
2024-02-15 10:03 ` Alexander Dahl
2024-02-15 10:35 ` [ptxdist] *****POSSIBLE SPAM***** " Sebastian Muxel
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=fdfb4e6c-a265-4734-bca8-ffc2b42906aa@t2data.com \
--to=christian.melki@t2data.com \
--cc=ptxdist@pengutronix.de \
--cc=sebastian.muxel@entner-electronics.com \
/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