[U-Boot] [PATCH 14/16] efi_loader: Add distro boot script for removable media

Alexander Graf agraf at suse.de
Wed Feb 3 16:53:51 CET 2016



> Am 03.02.2016 um 12:36 schrieb Leif Lindholm <leif.lindholm at linaro.org>:
> 
>> On Tue, Feb 02, 2016 at 03:45:12AM +0100, Alexander Graf wrote:
>> UEFI defines a simple boot protocol for removable media. There we should look
>> at the EFI (first GPT FAT) partition and search for /efi/boot/bootXXX.efi with
>> XXX being different between different platforms (x86, x64, arm, aa64, ...).
>> 
>> This patch implements a simple version of that protocol for the default distro
>> boot script. With this we can automatically boot from valid UEFI enabled
>> removable media.
>> 
>> Because from all I could see U-Boot by default doesn't deliver device tree
>> blobs with its firmware, we also need to load the dtb from somewhere. Traverse
>> the same EFI partition for an fdt file that fits our current board so that
>> an OS receives a valid device tree when booted automatically.
>> 
>> Signed-off-by: Alexander Graf <agraf at suse.de>
>> Reviewed-by: Simon Glass <sjg at chromium.org>
>> ---
>> include/config_distro_bootcmd.h | 47 ++++++++++++++++++++++++++++++++++++++++-
>> 1 file changed, 46 insertions(+), 1 deletion(-)
>> 
>> diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
>> index 37c6b43..c19f1b0 100644
>> --- a/include/config_distro_bootcmd.h
>> +++ b/include/config_distro_bootcmd.h
>> @@ -90,6 +90,48 @@
>>    BOOT_TARGET_DEVICES_references_UBIFS_without_CONFIG_CMD_UBIFS
>> #endif
>> 
>> +#ifdef CONFIG_EFI_LOADER
>> +#if defined(CONFIG_ARM64)
>> +#define BOOTEFI_NAME "bootaa64.efi"
>> +#elif defined(CONFIG_ARM)
>> +#define BOOTEFI_NAME "bootarm.efi"
>> +#endif
>> +#endif
> 
> Actually, since Simon is testing this series also on Minnowboard
> (at least MAX), maybe add bootx64.efi and/or bootia32.efi as well?

We need more to support a new architecture - relocations for pe and u-boot for example. So adding the bootia32.efi bits in an x86 enable patch set makes the most sense imho.


> 
> I presume U-Boot for ia64 is not a thing? ;)

s/U-Boot for // :). Don't ride dead horses.


Alex



More information about the U-Boot mailing list