# help with u-boot on RPI



## jrushford (Dec 13, 2022)

Greetings,

I'm trying to boot FreeBSD 13.1 on a raspberry pi but I'm dropped into a U-Boot> prompt.  At the prompt, I enter boot and it then completes booting into FreeBSD 13.1.  I prefer to boot into FreeBSD 13.1 without having to manually type in boot at the prompt.  Is this configurable somewhere?  I'm using the FreeBSD-13.1-RELEASE-arm64-aarch64-RPI.img image on an SD card and I've also tried using a USB stick, the results are the same.  Just before the U-Boot> prompt there is a notice, "Hit any key to stop autoboot: 0". Does this mean auto boot is disabled?  How do I enable auto boot?

thanks
John


----------



## Phishfry (Dec 13, 2022)

I have seen this on some recent Arm board encounters.

What happens if you boot without serial-UART cable attached?

Does it autoboot?


----------



## jrushford (Dec 13, 2022)

Phishfry said:


> ```
> setenv bootdelay 0
> saveenv
> ```
> ...


No change without a keyboard attached.  Still drops into the U-Boot prompt.  I read that if you set bootdelay=0 that it should auto boot but, I'm unable to set it to 0.  I try at the U-Boot prompt:

I tried this but the saveenv command fails with a write failure to flash

setenv bootdelay 0
saveenv


----------



## Phishfry (Dec 13, 2022)

jrushford said:


> No change without a keyboard attached. Still drops into the U-Boot prompt.


So you are using HDMI and keyboard than?



jrushford said:


> I'm trying to boot FreeBSD 13.1 on a raspberry pi


What is your version of Pi board?



jrushford said:


> I tried this but the saveenv command fails with a write failure to flash


Pi has its u-boot in a file on disk. It is different than others.

I use u-boot script to add delay time for SATA to be recognized.

Perhaps that would be a way around your problem?

u-boot scripts go in the /EFI directory on mmcsd0p1


----------



## Phishfry (Dec 13, 2022)

The standard aarch64 RPi Image for FreeBSD 13-1 works, so none of this should be needed.

Are you trying an offbeat installation method? Like boot off microSD and root on USB Disk?

On Rpi3B it works on microSD without intervention. I have not fooled with the uboot env.


----------



## jrushford (Dec 14, 2022)

I’m using a raspberry pi 4b with 8gb of memory.  All I’ve done is write the FreeBSD 13.1 RPI image to the sdcard.  Im dropped into the u-boot prompt.  I just have an hdmi monitor connected and a usb keyboard


----------



## Phishfry (Dec 14, 2022)

I don't have a Pi4 but I was hoping somebody would pipe in here that it works.....
Pi3B works with aarch Pi image.. I use a serial console or ssh.
My problem I mentioned was loader prompt needed 'boot' command.
But it was not a standard setup. It only happened when serial console connected.
Without I could ssh right in. autoboot was not working right.


----------



## George (Dec 14, 2022)

I haven't used uboot in a few years, but I believe it has a configuration file, probably /boot/config.txt

Uboot can read fat32 file systems I think.
You need to set the bootcmd, write it to that config file (not sure about the syntax).

I dont think saveenv in the uboot command prompt works (it didn't on my rpi3), might be a bug or a faulty installation script.. idk


----------

