[PATCH v1 1/2] efi_loader: improve device path matching for partition lookup

Balaji Selvanathan balaji.selvanathan at oss.qualcomm.com
Fri Nov 21 10:24:27 CET 2025


Hi Ilias,
Sorry for the late reply.

If the boot option generation logic skips partitions, then the boot 
option points to whole disk.

But when capsule update calls device_is_present_and_system_part() → 
efi_dp_find_obj() → find_handle(), it tries to match this boot device 
path against the ESP partition handle which has path longer than boot 
device path.

The find_handle() logic at line 142 rejects the ESP handle because:
if (len_current > len)  // ESP path is longer than boot device path
     continue;           // Skip it!

So capsule update fails to find the ESP partition.
Based on this analysis, I believe the fix I proposed would help address 
this issue, but I'd appreciate your thoughts on whether this approach 
makes sense or if there's a better way to handle it.
Thanks for your guidance!

On 8/28/2025 5:53 PM, Ilias Apalodimas wrote:
> Yes it was. In fact the original patches were adding the file instead
> of the disk [1], but we had concerns on scanning all partitions wrt to
> boot time. I don't remember if anyone tested the boot time though.


More information about the U-Boot mailing list