[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#751704: sunxi MMC boot SPL vs. GPT partition (Re: Bug#751704: partman-base 173: partman overwrites parts of u-boot)



On Wed, Jun 18, 2014 at 11:18:57AM +0100, Ian Campbell wrote:
> Do you therefore disagree with my analysis that there is no such thing
> as a >2TB MMC card and therefore no reason to use GPT on such a thing?

There probably isn't yet, but I suspect at some point there will be.

I am mainly complaining about it to get the CPU makers to start thinking
about it now so their future designs won't be so stupid about the
placement of boot code.

As far as I am concerned:

1) If you assume there will be a dos MBR partition table with a boot flagged
partition, then you are doing it wrong.

2) If you assume you can reserve some space in the first 64 sectors of the
device (and sectors might not be 512 bytes), then you are doing it wrong.

3) If you assume there will be a FAT partition to read boot files from,
then you are doing it wrong (since that pretty much assumes 1).

Doing it right would be to use the first 400 or so bytes that are already
reserved for boot code on x86 machines before the legacy partition table
to store the location of the actual boot code.  That makes it easy to
place things however is convinient and allows working around other
partition formats.  TI almost did that by putting some data structure
there with some initial settings, and then botched it by putting the
load address and SPL starting at byte 512 rather than putting the address
of the SPL in that data structure they already put at the start (and
which is way smaller than the space available).

-- 
Len Sorensen


Reply to: