# How do you compile ubldr?



## escape (Jan 20, 2020)

How do you compile ubldr?

e


----------



## balanga (Jan 20, 2020)

What are you hoping to run ubldr on?


----------



## escape (Jan 20, 2020)

Arm64.


----------



## balanga (Jan 20, 2020)

I'd check https://wiki.freebsd.org/arm64 for starters...


----------



## acheron (Jan 23, 2020)

ubldr is not officially available on aarch64, boards are supposed to boot with EFI.


----------



## escape (Jan 24, 2020)

The board I'm trying has preinstalled uboot. The loader.efi won't boot. It looks like it don't read the UEFI environment variables from uboot or because of some other reason. How do I set these variables in uboot correctly, are the environment variables UEFI environment variables? It wasn't the FreeBSD version of uboot. In short, how do I use ubldr instead to load loader from the uboot?

Next question would be, which installation media would have ubldr in it? The RPI3 image had: u-boot.bin PCX ver. 2.5. It did not boot. How do I compile ubldr?


----------



## balanga (Jan 25, 2020)

Can you get serial access to the board?  It may give you some idea as to how the system wants to boot...

See https://www.denx.de/wiki/view/DULG/SystemSetup


----------



## acheron (Jan 25, 2020)

escape said:


> The board I'm trying has preinstalled uboot. The loader.efi won't boot. It looks like it don't read the UEFI environment variables from uboot or because of some other reason. How do I set these variables in uboot correctly, are the environment variables UEFI environment variables? It wasn't the FreeBSD version of uboot. In short, how do I use ubldr instead to load loader from the uboot?
> 
> Next question would be, which installation media would have ubldr in it? The RPI3 image had: u-boot.bin PCX ver. 2.5. It did not boot. How do I compile ubldr?


There is this old patch to get ubldr on arm64 but you'll need a uboot compiled with the uboot API.
You can also try to boot your board with booti (you'll need a recent -CURRENT) and a kernel compiled with LINUX_BOOT_ABI.
Only armv6/7 used to use ubldr, but I think we switched to EFI recently and don't use ubldr anymore.
What is the u-boot version of your board?


----------



## escape (Jan 28, 2020)

Yes, the uboot version was too old. After it was updated the loader found more partitions and then jammed. It went further. This time maby the memory addresses were not correct. Progress. Yes, serial connection was found, `cu` with baud rate 115200 worked in`/dev/ttyU0`.


----------



## escape (Feb 7, 2020)

What patch, where is it? Some instructions to compile 'ubldr' is at URL https://www.bidouilliste.com/blog/2015/11/27/Porting-FreeBSD-to-a-new-ARM-Board-Part-1/ I have not tried. It should work in DOS format? For example the makefile 'buildenvvars' option. Thanks for the help. 

e


----------

