RockPi4 boot from USB

Is booting OS from currently supported on the RockPi4 image?

The internal bootloader (BROM) in the rk3399 SoC (present in RockPi4 boards) does not support booting from USB. It only supports booting from SPI -> eMMC -> SD, in that order.

But if you have uboot on either, SPI, eMMC or SD, then you can boot the rest from USB.

Hi. I want to boot from a pendrive on my rockpi4b, but I can’t, I think because uboot is not in the latest version. my uboot is on spi. can it be updated directly from manjaro? how?

You need to flash the uboot to the USB (however you did it the first time).

I’m not certain how or if it fits, since we only do it on the drives.

Ok, thanks, I remember that when I updated manjaro for the first time, I got a warning that I had an old version of uboot, and it gave me a way to do it. I’m going to flash armbian to a microsd and try to update from there., But I think I should first check the radxa forum … greetings

Does the Armbian uboot have USB boot support?

USB boot support can be found if present,
However you get uboot image, (if neccessary dd bs=1M skip=8 count=2, from media)
strings uboot|grep _target

Yes, armbian config tool does that.

My context is a multiboot boot with multiple systems. Each one has / boot and marking the flag it starts from that system, both from nvme and microsd. My goal is to also be able to boot from pendrive, but I think you have to have the latest version of uboot.

Maybe you don’t understand how it works, as I understand…
The bootrom searches, in boot order for uboot (actually idbloader)
The 1st found is the one used, all others are ignored.
then uboot searches, in its target order, for extlinux/boot.scr
1st found is one executed
To multi-boot, either on swapable SD, or something serial??(to chose)
samueldr has a forked uboot with display, but only for pbp (I think)
(the display, I mean)
Sorry about long quote, be aware of this, it may be a factor

The USB (at least the USB UHCI) needs a frame list (4k), transfer
descripor and queue headers which are all located in the main memory.
The UHCI allocates every milisecond the PCI bus and reads the current
frame pointer. This may cause to crash the OS during boot. So the USB
MUST be stopped during OS boot. This is the reason, why the USB is
NOT automatically started during start-up. If someone needs the USB
he has to start it and should therefore be aware that he had to stop
it before booting the OS.

For USB keyboards this can be done by a script which is automatically
started after the U-Boot is up and running. To boot an OS with a an
USB keyboard another script is necessary, which first disables the
USB and then executes the boot command. If the boot command fails,
the script can reenable the USB kbd.

Ok, gracias. Siempre pensé que era un problema de uboot antiguo. Puedo vivir sin arrancar desde USB, pero definitivamente me gustaría tener la última versión de uboot en spi flash. Es lo que estoy trabajando ahora. Acabo de arrancar desde debían en uSd, y al actualizar el sistema también actualizo uboot en spi flash. Pero no estoy seguro que haya sido a la versión más nueva, la guía de radxa es un tanto confusa, y no me queda claro si tengo que volver a realizar el procedimiento de actualizar uboot spi flash, como describe en
https://wiki.radxa.com/Rockpi4/install/NVME#uboot-trust-spi-20190816_1128.img

will running manjaro-arm-installer on the microsd do the trick? im on RockPi 4A

The device can boot from SD just fine. Not sure what you mean by running manjaro-arm-installer on the SD card. If you mean target the SD card with the installer then yes. It will work.

PS: We don’t really support the Rock Pi 4A though.

I want to boot from emmc. Do you know how I can flash Manjaro on RockPi 4A?

As I said, we don’t support the 4A.

But you can flash a 4B install via the manjaro arm installer running from SD and just change the .dtb file in /boot/extlinux/extlinux.conf on the eMMC to be rock-pi-4a.dtb instead of rock-pi-4b.dtb instead and it should work.

1 Like

Since the A is just the B without WiFi I assumed it would work. This would be a one-time change and not needed every time I update etc?

I’m not sure.

Currently the extlinux.conf file is part of a package, which gets updated from time to time.
But the device might just boot fine with the 4B dtb. So you don’t need to change anything.
You just have to try it.

We don’t have a Rock Pi 4A, so we can’t test for you. :slight_smile:

Do I need an adapter for the eMMC or do I just stick the SD in the RockPi and flash the eMMC from there?

You can flash directly from an SD card to the eMMC card in the device. You just need to actually boot from SD. :slight_smile: And make sure nothing on eMMC is mounted on the running SD system (Manjaro’s boot partition does this from time to time).

No need for an adapter then? How do I boot directly from SD? :slight_smile: