mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] u-boot: Allow specification of padding byte for custom env images
@ 2024-02-05 20:16 Sebastian Muxel
  2024-02-05 20:30 ` Christian Melki
  0 siblings, 1 reply; 7+ messages in thread
From: Sebastian Muxel @ 2024-02-05 20:16 UTC (permalink / raw)
  To: ptxdist; +Cc: Sebastian Muxel

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




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-02-15 10:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-05 20:16 [ptxdist] [PATCH] u-boot: Allow specification of padding byte for custom env images Sebastian Muxel
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox