# stuck in u-boot during freeBSD 13 install on raspberry pi 400



## ktuluu (Apr 19, 2021)

hi everybody,

I downloaded the RPI image here, uncompressed it and copied it on a SD card with the *dd* command :

`dd if=FreeBSD-13.0-RELEASE-arm64-aarch64-RPI.img of=/dev/XXX bs=1M conv=sync`

the installer started with u-boot booting but ending with an error "serverip is not set". the real issue is this line which is prompted before:



> no partition table - mmc 0 **



according to this video on youtube, freeBSD 13 on the raspberry pi 400 just works fine. what am I missing? what did I do wrong?


----------



## T-Daemon (Apr 19, 2021)

ktuluu said:


> ... RPI image ... copied it on a SD card ...



In the video FreeBSD is booting from a USB flash drive, not SD card:


 

I'm not familiar with raspberry PI's, if nobody else here on forums can give an advice maybe someone on freebsd-arm@freebsd.org mailing list can be of help.


----------



## ktuluu (Apr 19, 2021)

so I will try with a dongle.

otherwise the author of the video added in response to a comment



> I tested this earlier and it does boot from the sdcard just fine



so I guess a sd card should be fine too

I have some more info with these commands:

`mmc list`
It returns:

```
device 0: unknown device
```
`mmc part`
it returns:

```
unknown partition table type 0
```
`mmc info`
I have several lines, one of them detects the size of the partition (I suppose it is where the installer has been copied)

```
Capacity: 119.1 GiB
```

u-boot is new for me. I guess something is wrong in the raspberry 400 default configuration (something I bought a week ago, not an old one)


----------



## TTKDroid (Apr 21, 2021)

I've raised a ticket as it seems that there is a problem with the U-BOOT build. You can use a MicroSD to USB adapter and boot it from USB port though, but ideally it should come from MicroSD slot.


----------



## dbdemon (Apr 21, 2021)

So after I accidentally corrupted my FreeBSD VM while trying to increase the storage space with VirtualBox' media manager because I ran out of space on the host file system, I'm now trying to install FreeBSD on my new Raspberry Pi 400.

I've verified that the Raspberry Pi OS boots and seems to work.

I've installed FreeBSD-13.0-RELEASE-arm64-aarch64-RPI.img.xz on a 32G micro SD card. I've tried both the rpi-imager and Fedora Media Writer (mediawriter) to write the image to the micro SD.
I get what appears to be normal boot messages until I see:


```
mmc0 is current device
** No partition table - mmc 0 **

Device 0: unknown device
ethernet@7d580000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
bcmgenet: PHY startup failed: -110
missing environment variable: pxeuuid
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/01-e4-5f-01-1f-b1-98
```
I get several more of those timeouts for different files, and then I'm dropped into U-Boot ...

Any ideas as to what could be wrong and how to fix it? I thought "No partition table" sounded particularly wrong ...!


----------



## dbdemon (Apr 21, 2021)

TTKDroid said:


> I've raised a ticket as it seems that there is a problem with the U-BOOT build. You can use a MicroSD to USB adapter and boot it from USB port though, but ideally it should come from MicroSD slot.


Thank you for that. Could you possibly post the link to the ticket?


----------



## SirDice (Apr 21, 2021)

dbdemon said:


> I should have searched for existing threads, sorry. This one can probably be closed now.


I've merged your posts into the existing thread.


----------



## T-Daemon (Apr 21, 2021)

dbdemon said:


> Any ideas as to what could be wrong and how to fix it?





dbdemon said:


> Could you possibly post the link to the ticket?


The most recent PR regarding U-Boot is PR 255080, which comes with a workaround to fix  [1] the problem, booting from SD card on a PI 4. The workaround most likely applies to the PI 400 [2] also since it's based on a PI 4.

[1] Comment # 15 and # 28
[2] listed in Comment # 13 from GitHub Raspberry PI documentation, revision-codes/README.md


----------



## dbdemon (Apr 21, 2021)

T-Daemon said:


> The workaround most likely applies to the PI 400 [2] also since it's based on a PI 4.


Yes, I can confirm that this works - I used the workaround in comment #15.

Thank you for pointing me to the solution!


----------



## ktuluu (Apr 24, 2021)

so I tested both with a micro sd adapter and on an usb key: both work and boot fine. I will test directly on the micro sd with the workaround


----------



## eternal_noob (Aug 30, 2021)

Note that it is no longer necessary to download the u-boot.bin file from Sourceforge. Just `pkg install u-boot-rpi-arm64` and copy the file to the boot partition of the Raspberry Pi 400.

(File is located in /usr/local/share/u-boot/u-boot-rpi-arm64/u-boot.bin after installation)

Be sure to get at least version _2021.04_, earlier versions don't work.


----------



## tux2bsd (Apr 10, 2022)

It booted off the SD card.  Rebooted then locked up completely during boot


> Security policy loaded: MAC/ntpd (_mac_ntpd_)


with no more information than that

I also notice during boot there's a 10 second count down (press enter to boot) that takes about 4 seconds per "second".

I was hoping to migrate services to from rpi 3 to 4 (400), without much drama.  Fail.  (yes, distinct SD cards per device)


----------



## mark_j (Apr 10, 2022)

Do you have any USB devices attached at boot time?


----------



## tux2bsd (Apr 11, 2022)

mark_j said:


> Do you have any USB devices attached at boot time?


Just the SD card, ethernet and HDMI.  I should have tried without ethernet now that I think about it, just to see if it made a difference.  I've since splashed the SD card back to Raspberry Pi OS (basically Debian with firmware).


----------



## mark_j (Apr 12, 2022)

Fair enough. Whatever gets the job done.


----------



## Phishfry (Apr 12, 2022)

tux2bsd said:


> I should have tried without ethernet now that I think about it, just to see if it made a difference.


Are you talking PXE booting?
HDMI is real spotty on Arm too. Use UART console first to get it running then try HDMI.


----------

