[PATCH v2] cmd: mmc: allow use of hardware partition names for mmc partconf

Dragan Simic dsimic at manjaro.org
Sat Apr 27 09:25:44 CEST 2024


Hello Tim and Marek,

On 2024-04-26 19:36, Tim Harvey wrote:
> On Fri, Apr 26, 2024 at 10:25 AM Marek Vasut <marex at denx.de> wrote:
>> On 4/26/24 7:12 PM, Tim Harvey wrote:
>> > +static const char *mmc_partnames[] = {
>> > +     "user",
>> > +     "boot0",
>> > +     "boot1",
>> > +     "gp1",
>> > +     "gp2",
>> > +     "gp3",
>> > +     "gp4",
>> 
>> Uh, maybe gp%d are indexed from zero too ?
>> 
>> (sorry for the confusion)
> 
> but 'mmc hwpartition' does not list them 0 based:
> u-boot=> mmc hwpartition
> switch to partitions #0, OK
> mmc2(part 0) is current device
> Partition configuration:
>         No enhanced user data area
>         No GP1 partition
>         No GP2 partition
>         No GP3 partition
>         No GP4 partition
> 
> I'm ok with either, I'm just not sure what is more understandable and 
> standard.

I can confirm that JEDEC also starts the numbering of the GP
partitions from one in some of its documents.

Though, it's a bit intriguing why the numbering of the boot
partitions starts from zero.  Perhaps there's some good reason
for that difference.


More information about the U-Boot mailing list