mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Alexander Dahl <ada@thorsis.com>
To: Sebastian Muxel <sebastian.muxel@entner-electronics.com>
Cc: christian.melki@t2data.com, ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH] u-boot: Allow specification of padding byte for custom env images
Date: Thu, 15 Feb 2024 11:03:32 +0100	[thread overview]
Message-ID: <20240215-support-broiling-d6d2720bfcfd@thorsis.com> (raw)
In-Reply-To: <3zf2idbmoykcvgqcjdd25hq3q43uui2teou6naqpwxqgxhogn2@lbpoiotzoupu>

Hello Sebastian,

regarding your patch itself, please check indentation in Kconfig help.
Maybe run `ptxdist lint` before submitting, IIRC that problem is
checked by the linter.  The indentation is strange there with tabs
first and two spaces then.

(more comments below)

Am Mon, Feb 05, 2024 at 09:49:16PM +0100 schrieb Sebastian Muxel:
> Hello
> 
> > 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?
> 
> I had to tweak it to 0x00 after noticing that the env image generated by
> our vendor supplied SDK has specified it in it's make process. Keeping
> it at 0xFF wouldn't allow me to generate a firmware image. It could likely
> be that it's a hard requirement of their image generation/flashing tool?

Interesting.  So this env image does not stay standalone, but will be
integrated in some other packaging?  I'm pretty sure U-Boot itself
does not care about those padding bytes at runtime.  Maybe it's a
thing the flashing tool checks?

> I honestly haven't put much further thought into it and assumed it's due
> to the way NAND erasure works

Probably not.  If you let a raw NAND flash chip erase itself with the
proper command, you get all 0xFF afterwards.  An intelligent flash
tool would recognize larger blocks of 0xFF in an image and then just
not touch the flash in that areas.  Writing 0xFF on already erased
blocks gains nothing.  Writing non 0xFF padding is just useless write
operations and will only decrease the lifetime of the flash.

Greets
Alex



  parent reply	other threads:[~2024-02-15 10:03 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
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 [this message]
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=20240215-support-broiling-d6d2720bfcfd@thorsis.com \
    --to=ada@thorsis.com \
    --cc=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