[U-Boot] [PATCH v6 00/18] GPT over MTD

Maxime Ripard maxime.ripard at free-electrons.com
Thu May 11 14:46:26 UTC 2017


On Thu, May 11, 2017 at 09:19:16AM +0000, Patrick DELAUNAY wrote:
> Hi Maxime,
> 
> > From: Maxime Ripard [mailto:maxime.ripard at free-electrons.com]
> > Sent: jeudi 11 mai 2017 10:20
> > 
> > Hi,
> > 
> > On Thu, May 11, 2017 at 09:51:50AM +0200, Patrick Delaunay wrote:
> > > I have a request to support GPT over MTD to have the MTD informations
> > > without U-Boot environment(CONFIG_ENV_IS_NOWHERE is a other
> > > requirement of my project to manage several board configuration with
> > > the same defconfig; boot from NAND or NOR or SDCARD).
> > 
> > What would happen if you have a bad block in the middle of the primary or
> > secondary GPT headers (or both)?
> > 
> > Maxime
> > 
> 
> All Bad block are skipped....
> => primary GPT header is located at the beginning of first good block
> => backup GPT header is located at the end the of last good block
> 
> And gpt create will failed if the erase block command (for primary or backup GPT) 
> produce a new bad block.

Right, but what happens if your block becomes bad or too corrupted
after it's been written.

You mention in your Drawbacks section that if you erase the block and
is now detected to be bad, u-boot will have to act upon it. But that
can happen outside of U-Boot as well, or not directly to this block,
by reads or writes disturb... In this case, your GPT header is gone,
and you have no way to recover from it.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170511/e0bc7cb6/attachment.sig>


More information about the U-Boot mailing list