[U-Boot] [PATCH v4 00/21] sandbox: efi_loader support
Alexander Graf
agraf at suse.de
Fri Jun 22 09:44:52 UTC 2018
On 06/21/2018 09:45 PM, Simon Glass wrote:
> Hi Alex,
>
> On 21 June 2018 at 03:47, Alexander Graf <agraf at suse.de> wrote:
>> On 06/21/2018 04:44 AM, Simon Glass wrote:
>>> Hi Alex,
>>>
>>> On 18 June 2018 at 09:53, Alexander Graf <agraf at suse.de> wrote:
>>>> On 06/18/2018 05:22 PM, Alexander Graf wrote:
>>>>> This patch set augments Simon's patch set for efi_loader support
>>>>> in sandbox[1], but cuts off the memory allocation scheme at a different
>>>>> point.
>>>>>
>>>>> According to the UEFI spec, efi_allocate_pages() takes a uint64_t *
>>>>> argument. Via this argument, we get a physical address as input, but
>>>>> emit a pointer as output.
>>>>>
>>>>> With this patch set in place, I can successfully run the selftest suite
>>>>> as well as an aarch64 grub.efi binary. X86_64 grub.efi doesn't work
>>>>> because that one requires inl instructions to work.
>>>>
>>>> I've assembled a quick grub.efi that does work in sandbox as it no longer
>>>> accesses I/O ports directly. Patch for it is below.
>>>>
>>>> http://csgraf.de/tmp2/grub.efi
>>>>
>>>> When building your own, make sure to exclude coreboot (cb*) modules -
>>>> they
>>>> seem to do something dirty and segfault for me. The other modules seem to
>>>> work fine for me so far.
>>> OK thanks for that. The binary says this for me:
>>>
>>> efi_load_pe: Invalid DOS signature
>>>
>>> I'm running on x86_64.
>>
>> Are you using my patch set or yours? In mine this should be fixed.
> I'm using the series at u-boot-dm/efi-working - am I missing something else?
>
>>> I tried the patch below but it still crashes, presumably because of
>>> the coreboot modules. How do I actually exclude them? I cannot see
>>> anything in ./configure --help
>>
>> When you call grub-mkimage you explicitly pass a list of modules to include.
>> In that list, just omit any module that starts with cb :)
> In my case I am not specifying a list. I'll see if I can do that. I'm
> worried there are a lot of modules to find and specify. I cannot find
> documentation on what they are.
./grub-mkimage -O x86_64-efi -o grub.efi $(cd grub-core; ls *mod | cut
-d . -f 1)
is what I usually do to get all modules. In this case you have to |
egrep -v '^cb' as well.
Alex
More information about the U-Boot
mailing list