New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

Which B3 U-Boot versions support GPT booting?

Discuss development on Bubba
Post Reply
sakaki
Posts: 172
Joined: 15 Aug 2014, 11:20

Which B3 U-Boot versions support GPT booting?

Post by sakaki »

Hi -

apologies if this is a dumb question, but does anyone know which U-Boot versions (for the B3) support booting from a GPT-partitioned drive? And also, how this relates to the >2TiB / 512->4096 byte-sector issue (e.g. per this post)?

thx

sakaki
Gordon
Posts: 1461
Joined: 10 Aug 2011, 03:18

Re: Which B3 U-Boot versions support GPT booting?

Post by Gordon »

The B3 installer sets up a GPT table. Also, as a fact I do own a B3 that has the ancient u-boot version and the 2TB disk that it came with does hold a GPT table. As a result I can confirm that every B3 *must* be able to support GPT. I'm unsure why the older u-boot version can't handle larger disks, but it's definitely not because it doesn't know GPT. Some quick calculation does however show that at 32 bit the limit is 2.2TB if you use a legacy page size of 512 bytes. My assumption is that the older u-boot simply does not accept the larger page size that GPT tells it to use for disks that exceed this 2.2TB limit and thus attempts to boot from an invalid physical disk sector.
sakaki
Posts: 172
Joined: 15 Aug 2014, 11:20

Re: Which B3 U-Boot versions support GPT booting?

Post by sakaki »

Ah, interesting. Is the 2TiB issue possibly related to the CONFIG_SYS_64BIT_LBA setting in U-Boot then? (See this patch, for example, and the doc for "LBA48 Support" here).

best

sakaki
Gordon
Posts: 1461
Joined: 10 Aug 2011, 03:18

Re: Which B3 U-Boot versions support GPT booting?

Post by Gordon »

That appears to match the issue indeed.

Don't really follow the fundamentals though. One would expect no issue for u-boot using a 32-bit location value to access e.g. LBA 64. Assuming little machine ordering even fetching the first value from the partition table (at LBA 1?) should give it the right block number. But I suppose that not initializing the high DWORD to zero would leave random stuff inside it on reused memory and cause the disk to be instructed to go all over the place.
Post Reply