Magic incantation for Pine64 UEFI/PXE boot

Emmanuel Vadot manu at bidouilliste.com
Sat Mar 17 06:54:53 UTC 2018


On Fri, 16 Mar 2018 17:40:22 -0400
Ed Maste <emaste at freebsd.org> wrote:

> This seems to be somewhat under-documented, so for anyone else trying
> to PXE boot a Pine64: after some trial and error I found "dhcp"
> followed by "bootefi ${fileaddr} ${fdtcontroladdr}" works.
> 
> I used the most recent FreeBSD SD-card image (to provide U-boot), and
> used standard configuration on the PXE boot host.
> 
> => dhcp
> BOOTP broadcast 1
> DHCP client bound to address 10.0.0.101 (4 ms)
> Using ethernet at 01c30000 device
> TFTP from server 10.0.0.1; our IP address is 10.0.0.101
> Filename 'arm64/boot/loader.efi'.
> Load address: 0x42000000
> Loading: *^H####################################
>          840.8 KiB/s
> done
> Bytes transferred = 517120 (7e400 hex)
> => bootefi ${fileaddr} ${fdtcontroladdr}
> ## Starting EFI application at 42000000 ...
> ...

 (Better answer now that I have a real keyboard)

 U-Boot is compiled with distroboot_cmd stuff.
 This mean that it will take the values present in the boot_targets
variable (defaults to mmc0 mmc1 (if present) usb dhcp) and for each
targets will do the following :

 - Check if a uboot.scr (u-boot script) exists and load/execute it,
this will be the default for armv6/armv7 after I update u-boot to
2018.01 (or .03 since it's out now)
 - Check if a extlinux.conf or extlinux/extlinux.conf file exists and
load/execute it (I wanted to use that as you can make menu with it but
since we are not using an ELF binary for ubldr it makes things harder.
 - Check is efi/boot/boot<arch>.efi exist (in case of an local storage
boot) or if the file provided by tftp is an efi executable. In that case
u-boot will always use a DTB. The default DTB is loaded and available
in $fdtcontroladdr, if the file set by the variable $fdtfile exist this
will override it (usefull for testing newer dtb etc ...) but a user
should always use the u-boot provided dtb.

 What you've done work but u-boot will do that (and more) for you
without intervention.

 P.S.: I don't remember if the order I gave is the right one, I only
remember that efi is done last.

-- 
Emmanuel Vadot <manu at bidouilliste.com> <manu at freebsd.org>


More information about the freebsd-arm mailing list