On 13 April 2017 at 03:52, Patrick Delaunay <patrick.delau...@st.com> wrote: > the value for partition_entry_lba of secondary GPT (last usable lba + 1) > is not correct with MTD support as last usable LBA need to be erase size > aligned > > The correct location of partition entry is always recomputed with > the formula : > partition_entry_lba = > alternate_lba - > num_pte * sizeof_partition_entry / lba_size > > Signed-off-by: Patrick Delaunay <patrick.delau...@st.com> > Reviewed-by: Christophe KERELLO <christophe.kere...@st.com> > --- > the device mapping is > > 1/ for block case: > > last_usable_lba -> partition_entry_lba - 1 > partition_entry_lba -> PTE table (num * sizeof(PTE)) > alternate_lba -> secondary GPT > -> end of device > > 2/ for MTD case : end of the last good block > > ------------- > > last_usable_lba -> last good erase block - 1 > -------------erase BLOCK aligned > XXXXXXXXXXXXXXXXXX -> skipped LBA for MTD case > partition_entry_lba -> PTE table (num * sizeof(PTE)) > alternate_lba -> secondary GPT > -------------erase BLOCK aligned > xxxxx skipping bad block > ->end of device > > Changes in v5: None > Changes in v4: None > Changes in v3: None > Changes in v2: None > > disk/part_efi.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-)
Reviewed-by: Simon Glass <s...@chromium.org> _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot