[U-Boot] [PATCH 01/11] imx: Add bootcmd to load and run UEFI from mmc
Trent Piepho
tpiepho at impinj.com
Tue Jul 17 17:24:24 UTC 2018
On Mon, 2018-07-16 at 23:56 +0000, Henry Beberman wrote:
> >
> > >
> > > I need to revise the commit message for this patch. The script is not fixed
> >
> > to the first partition of the selected MMC, it scans the disk for partitions
> > marked bootable, then checks each one of those until it finds the
> > imxboard_efi.fd binary.
> >
> > That is indeed very different from first FAT partition. Does bootable only
> > apply legacy MBR partition tables? I didn't think bootable was typically used
> > with GPT tables. There is a bit, but it's not used to mark EFI partitions.
> >
> > Which brings me back to the partition type. Isn't that the right way to find
> > the EFI?
>
> The is_bootable function in disk/part_efi.c marks a partition as bootable if the partition_type_guid on disk matches the EFI PARTITION_SYSTEM_GUID.
> The part command with the -bootable flag will return the EFI partition on both GPT and MBR partition schemes. This method is also used by config_distro_bootcmd.h
But it also finds any partitions with the legacy bios bootable flag set
in a GPT table or the active partition bit set in a MBR table, or any
future reason a partition might be considered bootable. Someone trying
to add a new type of bootable partition to distro bootcmd will be
forced to deal with your windows nt boot command as it tries to boot
any bootable partition, even ones it can't boot.
The distro boot command is designed to boot anything, so it searches
for partitions beyond EFI. But what you've done is just for EFI.
That's why it's different.
> > > We could switch over to using the generic load from
> >
> > CONFIG_CMD_FS_GENERIC if there's demand for non-FAT filesystems.
> > We're currently using fatload because the EFI partitions in our Windows
> > images are always FAT formatted.
> >
> > You're original search method required the partition be FAT.
>
> I'm happy to switch from the fatload command over to the load command if it will make CONFIG_UEFI_BOOT more widely useful.
My comment was addressing the incorrect commit message that indicated
boot partition selection was linked to the FAT filesystem. I don't
know if loading EFI from non-FAT partitions will be useful. I'm not
planning on using EFI but I like to avoid FAT in my products. If you
had linked the boot partition selection to FAT, it would cut off future
options.
More information about the U-Boot
mailing list