Matthew, 

I don't know how to do that quickly given the current code.  When you change 
the HD node of the device path, the whole thing changes.  

The consistent name is designed to accommodate adding or removing devices and 
not l losing the names of the other devices in the system.  This is not really 
designed to handle moving all the devices at one time.

I have a vague memory that we use the sortlib to sort the device paths.  Maybe 
the compare device path function should be optimized to do more detailed 
analysis of the actual nodes?

I wonder if we use alphabetical sorting, but that should catch the numbers and 
sort the same in both your cases...

-Jaben

Sent from my iPad.

> On Mar 1, 2016, at 8:11 AM, Laszlo Ersek <[email protected]> wrote:
> 
>> On 03/01/16 16:55, Foster, Matthew I wrote:
>> Is there an easy to way to force the shell to map certain partitions to FS0: 
>> and FS1: respectively? For example, I have an EMMC device that has 2 EFI 
>> partitions(GPT). When I setup the device with these 2 EFI partitions using 
>> partition number 2 and 9, they map how I need it, in order of partition 
>> numbering. Partition 2 maps to FS0: and Partition 9 maps to FS1: as seen 
>> below:
>> 
>>      FS0: Alias(s):HD31c:;BLK8:
>>          
>> PciRoot(0x0)/Pci(0x10,0x0)/Ctrl(0x0)/HD(2,GPT,148C6307-DAEC-4037-B963-62098BF01CB1,0x200,0x4800)
>>      FS1: Alias(s):HD31j:;BLK14:
>>          
>> PciRoot(0x0)/Pci(0x10,0x0)/Ctrl(0x0)/HD(9,GPT,A753B509-D2CF-49D0-BCC9-59045E9E9338,0x34D00,0x4800)
>> 
>> But if I change the partitions numbers to 4 and 10 respectively, they now 
>> appear as seen below, 4 mapped to FS1: and 10 mapped to FS0:
>> 
>>      FS1: Alias(s):HD31e:;BLK9:
>>          
>> PciRoot(0x0)/Pci(0x10,0x0)/Ctrl(0x0)/HD(4,GPT,EE7E022C-082E-4B95-87EC-482ABFEE6EDE,0x200,0x4800)
>>      FS0: Alias(s):HD31k:;BLK1:
>>          
>> PciRoot(0x0)/Pci(0x10,0x0)/Ctrl(0x0)/HD(10,GPT,EA0E4904-BC5D-4583-9219-5021E5F6207C,0x34B00,0x4800)
>> 
>> Wondering if there is a way to force this mapping a certain way, (in my 
>> case, lower number partition mapped to FS0 and the higher partition number 
>> mapped to FS1:)  without changing the shell code.
> 
> See the MAP command in the UEFI shell spec.
> 
> It supports "consistent mapping", but in the above you are changing
> hardware configuration, so I think it won't apply.
> 
> You can still use "map -sfo", parse the output, and locate the mapped
> name based on the textually formatted device path (third column).
> 
> Thanks
> Laszlo
> 
> _______________________________________________
> edk2-devel mailing list
> [email protected]
> https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to