[U-Boot] [PATCH 1/1] efi_loader: use built-in device tree in bootefi command

Heinrich Schuchardt xypron.glpk at gmx.de
Mon Jan 22 18:43:02 UTC 2018



On 01/22/2018 02:59 PM, Alexander Graf wrote:
> On 01/20/2018 01:56 PM, Heinrich Schuchardt wrote:
>> The bootefi command has two parameters: the address of the executable and
>> the address of the flattened device tree.
>>
>> When executing the devicetree command in grub this command can only
>> replace an existing device tree. So we always want to pass a device tree.
>>
>> With the patch the device tree defaults to the internal one. But of cause
>> the user still can supply his one via the second parameter.
>>
>> One use case is booting via iPXE from an iSCSI drive. As we may be able
>> to choose between different operating systems in the iPXE menu we cannot
>> know the correct device tree when invoking bootefi. The dtb might not 
>> even
>> be installed on a local device.
>>
>> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> 
> All of this logic is already implemented in the distro boot script, so 
> if you load your iPXE EFI binary via dhcp boot, from a block device or 
> something similar, it will by default already get $fdtcontroladdr passed 
> in. I'm not sure I'm terribly happy to have additional magic in the 
> bootefi command. If you want to spawn an EFI binary without device tree 
> table, you should be able to do so IMHO.

Booting via DHCP is most insecure. Neither the client nor the server are 
authenticated.

My understanding is that ftd address is not set by:

load mmc 0:1 0x13000000 snp.efi
bootefi 0x13000000

Where would an fdtadress be determined without loading a dtb?

But giving it a further thought I have to better analyze why Grub fails 
to correctly execute 'devicetable' if no fdt has been passed to bootefi. 
Let's keep back the patch until the problem is properly understood.

Regards

Heinrich

> 
> How do you invoke iPXE?
> 
> 
> Alex
> 
> 


More information about the U-Boot mailing list