[PATCH v2 1/1] spl: allow loading via partition type GUID

Heinrich Schuchardt heinrich.schuchardt at canonical.com
Thu Feb 16 18:19:11 CET 2023



On 2/16/23 18:01, Tom Rini wrote:
> On Thu, Feb 16, 2023 at 04:29:56PM +0100, Heinrich Schuchardt wrote:
> 
>> Some boards provide main U-Boot as a dedicated partition to SPL.
>> Currently we can define either a fixed partition number or an MBR
>> partition type to define which partition is to be used.
>>
>> Partition numbers tend to conflict with established partitioning schemes
>> of Linux distros. MBR partitioning is more and more replaced by GPT
>> partitioning.
>>
>> Allow defining a partition type GUID identifying the partition to load
>> main U-Boot from.
>>
>> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
> [snip]
>> +config SYS_MMCSD_RAW_MODE_U_BOOT_GPT_PARTITION_TYPE
>> +	string "GPT Partition Type on the MMC to load U-Boot from"
>> +	depends on SYS_MMCSD_RAW_MODE_U_BOOT_USE_GPT_PARTITION_TYPE
>> +	default d2f002f8-e4e7-4269-b8ac-3bb6fabeaff6
> 
> Is there a reason to use any other GUID value here? If not, just define,
> or use it directly with a comment.  If there is a reason for other
> values to be used:

Board vendors already differ in the partition GUIDs they use, e.g.

SiFive:
SPL: 5B193300-FC78-40CD-8002-E86C45580B47
Main U-Boot: 2E54B353-1271-4842-806F-E436D6AF6985

StarFive
SPL: 2E54B353-1271-4842-806F-E436D6AF6985 (sic)

Microchip Icicle Board:
SPL: 21686148-6449-6E6F-744E-656564454649

Using unique IDs per board allow to create SD card images where U-Boot 
for multiple boards is installed in parallel:

The boot ROM will select the board specific SPL via a unique ID and then 
SPL will use another unique ID to load the matching main U-Boot.

I only added a default value here to provide a formatting sample.

Best regards

Heinrich

> 
> Reviewed-by: Tom Rini <trini at konsulko.com>
> 


More information about the U-Boot mailing list