mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Sebastian Muxel <sebastian.muxel@entner-electronics.com>
To: ptxdist@pengutronix.de
Cc: Sebastian Muxel <sebastian.muxel@entner-electronics.com>
Subject: [ptxdist] [PATCH] u-boot: Allow specification of padding byte for custom env images
Date: Mon,  5 Feb 2024 21:16:19 +0100	[thread overview]
Message-ID: <20240205201844.65771-2-sebastian.muxel@entner-electronics.com> (raw)

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.

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




             reply	other threads:[~2024-02-05 20:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-05 20:16 Sebastian Muxel [this message]
2024-02-05 20:30 ` Christian Melki
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=20240205201844.65771-2-sebastian.muxel@entner-electronics.com \
    --to=sebastian.muxel@entner-electronics.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