[U-Boot] GPT overlap on i.MX6

Jagan Teki jagan at amarulasolutions.com
Wed Nov 27 08:17:11 UTC 2019


Hi,

I have created GPT table start from 8MB for kernel, roots etc.  something like

Part    Start LBA       End LBA         Name
        Attributes
        Type GUID
        Partition GUID
  1     0x00004000      0x00023fff      "boota"
        attrs:  0x0000000000000004
        type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
        guid:   c12a7328-f81f-11d2-ba4b-00a0c93ec93b
  2     0x00024000      0x00043fff      "bootb"
        attrs:  0x0000000000000004
        type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
        guid:   21686148-6449-6e6f-744e-656564454649
  3     0x00044000      0x00243fff      "rootfsa"
        attrs:  0x0000000000000000
        type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
        guid:   b921b045-1df0-41c3-af44-4c6f280d3fae
  4     0x00244000      0x00443fff      "rootfsb"
        attrs:  0x0000000000000000
        type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
        guid:   8da63339-0007-60c0-c436-083ac8230908
  5     0x00444000      0x0070bfde      "data"
        attrs:  0x0000000000000000
        type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
        guid:   4f72ab70-69be-5948-81ff-4fc3daf24faa

I have not included SPL, U-Boot to the partition list since it start
from 0x400 in i.MX6. So
I'm writing SPL separately using fastboot(with offset) or ums.

But by doing this, the partition header seems overlapped so the output looks

GUID Partition Table Entry Array CRC is wrong: 0x6a1aba0a != 0x8e4fd548
find_valid_gpt: *** ERROR: Invalid GPT ***
find_valid_gpt: ***        Using Backup GPT ***
Part    Start LBA       End LBA         Name
        Attributes
        Type GUID
        Partition GUID
  1     0x00004000      0x00023fff      "boota"
        attrs:  0x0000000000000004
        type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
        guid:   c12a7328-f81f-11d2-ba4b-00a0c93ec93b
  2     0x00024000      0x00043fff      "bootb"
        attrs:  0x0000000000000004
        type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
        guid:   21686148-6449-6e6f-744e-656564454649
  3     0x00044000      0x00243fff      "rootfsa"
        attrs:  0x0000000000000000
        type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
        guid:   b921b045-1df0-41c3-af44-4c6f280d3fae
  4     0x00244000      0x00443fff      "rootfsb"
        attrs:  0x0000000000000000
        type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
        guid:   8da63339-0007-60c0-c436-083ac8230908
  5     0x00444000      0x0070bfde      "data"
        attrs:  0x0000000000000000
        type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
        guid:   4f72ab70-69be-5948-81ff-4fc3daf24faa

So, what I understand is If I create the GPT first and then write the
SPL, the SPL writing process will destroy the GPT Table and if I write
SPL first and then create GPT, the GPT creation process will destroy
the SPL.

Is there any way to fix this? I remember we can prevent this overlap
by preserving GPT Table som other or boot partition instead of having
them at the beginning by default.

Any inputs?

Jagan.


More information about the U-Boot mailing list