From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Mon, 05 Feb 2024 21:19:17 +0100 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rX5Qy-004hGQ-0L for lore@lore.pengutronix.de; Mon, 05 Feb 2024 21:19:17 +0100 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1rX5Qy-0003hT-QK; Mon, 05 Feb 2024 21:19:16 +0100 Received: from mout39.gn-server.de ([87.238.197.45]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rX5Qn-0003gW-6c for ptxdist@pengutronix.de; Mon, 05 Feb 2024 21:19:07 +0100 Received: from mout17.gn-server.de ([87.238.194.244]) by mout39.gn-server.de with esmtp (Exim 4.92) (envelope-from ) id 1rX5Qm-0003kV-Jc for ptxdist@pengutronix.de; Mon, 05 Feb 2024 20:19:04 +0000 Received: from pp2.greatnet.de ([178.254.50.206]) by mout17.gn-server.de with esmtp (Exim 4.92) (envelope-from ) id 1rX5Qm-0000Pd-AJ for ptxdist@pengutronix.de; Mon, 05 Feb 2024 20:19:04 +0000 Received: from localhost (089144195134.atnat0004.highway.a1.net [89.144.195.134]) by pp2.greatnet.de (Postfix) with ESMTPSA id 6A03541C140F; Mon, 5 Feb 2024 21:19:01 +0100 (CET) Authentication-Results: pp2.greatnet.de; spf=pass (sender IP is 89.144.195.134) smtp.mailfrom=sebastian.muxel@entner-electronics.com smtp.helo=localhost Received-SPF: pass (pp2.greatnet.de: connection is authenticated) From: Sebastian Muxel To: ptxdist@pengutronix.de Date: Mon, 5 Feb 2024 21:16:19 +0100 Message-ID: <20240205201844.65771-2-sebastian.muxel@entner-electronics.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-PPP-Message-ID: <20240205201903.5224.11352@pp2.greatnet.de> X-PPP-Vhost: entner-electronics.com X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.whiteo.stw.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=4.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Subject: [ptxdist] [PATCH] u-boot: Allow specification of padding byte for custom env images X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: Sebastian Muxel Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false 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 --- 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