[U-Boot] [PATCH v4 00/16] efi: Enable basic sandbox support for EFI loader

Simon Glass sjg at chromium.org
Tue Jun 12 05:27:20 UTC 2018


Hi Heinrich,

On 16 May 2018 at 23:31, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
> On 05/16/2018 07:13 PM, Heinrich Schuchardt wrote:
>> On 05/16/2018 05:42 PM, Simon Glass wrote:
>>> A limitation of the EFI loader at present is that it does not build with
>>> sandbox. This makes it hard to write tests, since sandbox is used for most
>>> testing in U-Boot.
>>>
>>> This series enables the EFI loader feature. It allows sandbox to build and
>>> run a trivial function which calls the EFI API to output a message.
>>>
>>> This series is at u-boot-dm/efi-working
>>
>> I applied you patch series
>>
>> make sandbox_defconfig
>> CONFIG_CMD_BOOTEFI_SELFTEST=y
>> make -j6
>>
>> results in:
>>
>> ld.bfd: read in flex scanner failed
>> scripts/Makefile.lib:407: recipe for target
>> 'lib/efi_selftest/efi_selftest_miniapp_exit_efi.so' failed
>> make[2]: *** [lib/efi_selftest/efi_selftest_miniapp_exit_efi.so] Error 1
>> rm lib/efi_selftest/efi_selftest_miniapp_exit.o
>> lib/efi_selftest/efi_selftest_miniapp_return.o
>> scripts/Makefile.build:423: recipe for target 'lib/efi_selftest' failed
>> make[1]: *** [lib/efi_selftest] Error 2
>> make[1]: *** Waiting for unfinished jobs....
>>
>> Please, change /lib/efi_selftest/Makefile
>> -ifeq ($(CONFIG_X86_64),)
>> +ifeq ($(CONFIG_X86_64)$(CONFIG_SANDBOX),)
>
> A better solution would be to define EFI_LDS, EFI_CRT0, and EFI_RELOC in
> file arch/sandbox/config.mk in accordance with the host architecture.

I think we should get the patches in so that these tests can run, and
worry about CONFIG_CMD_BOOTEFI_SELFTEST later.

This work has been outstanding for a long time and it has been painful
to rebase on a tree that is changing quite regularly.

After all, the point of this series is to enable running the code from
EFI app directly within sandbox, not to run the .efi app itself.

I suspect you are right that with more work on the linker flags this
can be made to work. But it is not the subject of this series.

For now I'll add a patch to explicitly disable that option for
sandbox, so people know it is not supported.

Regards,
Simon


More information about the U-Boot mailing list