On 2/5/24 21:16, Sebastian Muxel wrote:
> [Du får inte e-post ofta från [email protected]. 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 <[email protected]>
> ---
>  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 via email to