Discussion:
[U-Boot] boot a bios/uefi with x86_64, without grub
Thierry Gayet
2018-07-31 10:18:06 UTC
Permalink
Hi,

I am working with a board called "up board" (
http://www.aaeon.com/en/p/up-board-computer-board-for-professional-makers)
from aaeon.

This card is as tiny as a credit card or a raspberry pi running with a
x86_64 processor.

It buildin an UEFI BIOS and a MMC memory (no sdcard, no ssd, no sata, no
rom).

I know this is not really adapt to an embedded usage but i would like to
let my u-boot bootloader loading my gnu/linux kernel (using the bootefi
command) then my linux rootfs (generated by yocto) :

(UEFI / BIOS) -> (uboot uefi) -> (GNU/Linux kernel) --> (linux rootfs)

I do not want to use grub or grub uefi if possible.

My idea is to make a uefi partition on the eMMC memory.

I am looking for an uboot configuration i can use to compile my bootloader.

I have make tests with the u-boot-app.efi that i have compiled and set into
an efi paritiion ; i am booting into an usb key first. This is not working
and always stop at the uefi shell...

Maybe my u-boot-app.efi need to be signed ?

Is there a documentation that describe all steps required ?

Any help welcome in order to solve my use case. Thanks in advance.

Regards

Thierry
Bin Meng
2018-07-31 14:56:25 UTC
Permalink
Hi Thierry,

On Tue, Jul 31, 2018 at 6:18 PM, Thierry Gayet
Post by Thierry Gayet
Hi,
I am working with a board called "up board" (
http://www.aaeon.com/en/p/up-board-computer-board-for-professional-makers)
from aaeon.
This card is as tiny as a credit card or a raspberry pi running with a
x86_64 processor.
It buildin an UEFI BIOS and a MMC memory (no sdcard, no ssd, no sata, no
rom).
I know this is not really adapt to an embedded usage but i would like to
let my u-boot bootloader loading my gnu/linux kernel (using the bootefi
(UEFI / BIOS) -> (uboot uefi) -> (GNU/Linux kernel) --> (linux rootfs)
I do not want to use grub or grub uefi if possible.
My idea is to make a uefi partition on the eMMC memory.
I am looking for an uboot configuration i can use to compile my bootloader.
I have make tests with the u-boot-app.efi that i have compiled and set into
an efi paritiion ; i am booting into an usb key first. This is not working
and always stop at the uefi shell...
Maybe my u-boot-app.efi need to be signed ?
No. Since you mentioned the x86 processor is 64-bit, it's hightly
possible that you have a 64-bit EFI BIOS. That means you cannot use
u-boot-app.efi with this EFI BIOS since u-boot-app.efi is 32-bit.
Post by Thierry Gayet
Is there a documentation that describe all steps required ?
Any help welcome in order to solve my use case. Thanks in advance.
You will need try efi-x86_payload64, and boot from there. Note
currently there are issues to boot Linux kernel from the U-Boot
payload.

Regards,
Bin
Bin Meng
2018-08-01 00:57:22 UTC
Permalink
hi bin,
Thanks for your reply.
Yes, you are totaly right because my uboot efi app didn't start due to my
architecture x86_64.
Then i have try with a uboot efi payload (x86_64) and it start from efi
shell.
I have tested with an usbkey using an EFI vfat partition formated as a vfat.
After that i have copyied my several filles from uboot efi payload x86_64
and it start manually, not automatically. I don't know how to let it start
automaticaly ? any idea ?
I don't quite understand what you were doing. Please include some details.
Do you know what kind of issue there is on the uboot efi payload version ?
Thanks in advance of you're reply.
Regards,
Bin
Thierry Gayet
2018-08-01 06:43:01 UTC
Permalink
hi,

Well, all i want it to launch my u-boot-efi (payload mode) directly by the
bios/uefi.

For now, for my tests, i have used an usbkey that have a partition with a
"EFI FAT 12/16/32" type. Inside, i have copying my uboot app efi inside
this directory.

This is the way i am using for creating an UEFI bootable usbkey :-) My
u-boot doesn't start automatically but it stop with the efi shell. Inside
this efi shell i can start the uboot efi manually from the cli and it work
fine.

Now that i have an uboot that can start, i am trying how to start it
directly on boot.

Maybe i need to change its name ? or something else like this ?

You was talking about some issues for the payload version ; do you have
more detail about that ?

BR

Thierry
Post by Bin Meng
hi bin,
Thanks for your reply.
Yes, you are totaly right because my uboot efi app didn't start due to my
architecture x86_64.
Then i have try with a uboot efi payload (x86_64) and it start from efi
shell.
I have tested with an usbkey using an EFI vfat partition formated as a
vfat.
After that i have copyied my several filles from uboot efi payload x86_64
and it start manually, not automatically. I don't know how to let it
start
automaticaly ? any idea ?
I don't quite understand what you were doing. Please include some details.
Do you know what kind of issue there is on the uboot efi payload version
?
Thanks in advance of you're reply.
Regards,
Bin
Thierry Gayet
2018-08-01 06:56:57 UTC
Permalink
forget my last question 'cos i have found the solution by adding a
Startup.nsh juste beside the efi boot app :

echo -off
if exist .\u-boot-payload.efi then
goto FOUNDTOOL
endif
if exist fs0:\u-boot-payload.efi then
fs0:
goto FOUNDTOOL
endif
if exist fs1:\u-boot-payload.efi then
fs1:
goto FOUNDTOOL
endif
if exist fs2:\u-boot-payload.efi then
fs2:
goto FOUNDTOOL
endif
echo u-boot-payload.efi.efi not found!
goto END
:FOUNDTOOL
u-boot-payload.efi
if NOT %lasterror% == 0 then
echo Running u-boot for the upboard : NOK
goto END
endif
echo Running u-boot for the upboard : OK
:END
Post by Thierry Gayet
hi,
Well, all i want it to launch my u-boot-efi (payload mode) directly by the
bios/uefi.
For now, for my tests, i have used an usbkey that have a partition with a
"EFI FAT 12/16/32" type. Inside, i have copying my uboot app efi inside
this directory.
This is the way i am using for creating an UEFI bootable usbkey :-) My
u-boot doesn't start automatically but it stop with the efi shell. Inside
this efi shell i can start the uboot efi manually from the cli and it work
fine.
Now that i have an uboot that can start, i am trying how to start it
directly on boot.
Maybe i need to change its name ? or something else like this ?
You was talking about some issues for the payload version ; do you have
more detail about that ?
BR
Thierry
Post by Thierry Gayet
hi bin,
Thanks for your reply.
Yes, you are totaly right because my uboot efi app didn't start due to
my
architecture x86_64.
Then i have try with a uboot efi payload (x86_64) and it start from efi
shell.
I have tested with an usbkey using an EFI vfat partition formated as a
vfat.
After that i have copyied my several filles from uboot efi payload
x86_64
and it start manually, not automatically. I don't know how to let it
start
automaticaly ? any idea ?
I don't quite understand what you were doing. Please include some details.
Do you know what kind of issue there is on the uboot efi payload
version ?
Thanks in advance of you're reply.
Regards,
Bin
Loading...