We're hiring!
*

Booting on Radxa's Rock-5B without any media used

Eugen Hristev avatar

Eugen Hristev
July 31, 2023

Share this post:

Reading time:

I have been working on getting U-boot upstream up to speed for the Radxa Rock-5B Rockchip RK3588 board.

One of the cool features that I recently published upstream is the ability to boot the board without any kind of non-volatile media (NVM) used.

Rockchip provides a way to boot the second stage using a proprietary protocol called rockusb. When you boot the board into maskrom mode (by holding a button pressed), the bootrom inside the SoC will start the USB into gadget mode and listen to rockusb commands. Then you can basically upload the next stage (in our case the U-boot SPL) via USB directly to the memory and boot it, using rockusb tools like the opensource rockusbrs.

So far, the SPL could only boot from an NVM like eMMC, SD-Card, or SPI flash. What is new with the patches that I sent is the fact that the SPL can now also probe the USB into gadget mode and then try to download the next stage.

For this I selected the DFU (Device Firmware Upgrade) protocol to get the U-boot proper into the memory. SPL will detect that it was booted via rockusb, and then it will wait for DFU commands. Once the board is ready, one can use a tool like dfu-util and just upload the U-boot proper file from the host computer to the board, and SPL will boot it.

Once U-boot proper boots, one can use any network protocol like TFTP to get the kernel, and boot with a file system from e.g. NFS.

In the end, the board boots without the use of any media, which was the goal of this exercise.

This summary is short, with a lot of specific terms, so if you have any questions about DFU, U-boot, SPL, USB, rockusb, or any other thing that may appear new or you want to know more about, feel free to comment or reach out to me!

Comments (2)

  1. bosinski:
    Sep 01, 2023 at 03:10 PM

    Any chances for NVMe boot support for 5b? I've built your u-boot using those instructions: https://gitlab.collabora.com/hardware-enablement/rockchip-3588/notes-for-rockchip-3588/-/blob/main/upstream_uboot.md

    I had to manually enable NVMe related options (CONFIG_CMD_NVME, CONFIG_NVME, CONFIG_NVME_PCI, CONFIG_PHY_ROCKCHIP_PCIE etc.) in 5b's defconfig, but even after that it cannot find inserted drive. It's weird, since official Rockchip's SPI binary handles this without any issues. I've tried tweaking around with it myself, but gave up, since DTS differences between your version and https://github.com/radxa/u-boot are too significant to even notice what's lacking. Any hints?

    Reply to this comment

    Reply to this comment

    1. Eugen Hristev:
      Sep 04, 2023 at 08:06 PM

      Hi,

      I saw someone from RADXA sent a patch for Rock-5B to enable NVMe here
      https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

      Can you try this patch, and let me know if it works?

      And if it does, you can even reply to the original patch e-mail with a Tested-by tag with your name.

      Eugen

      Reply to this comment

      Reply to this comment


Add a Comment






Allowed tags: <b><i><br>Add a new comment:


Search the newsroom

Latest Blog Posts

What if C++ had decades to learn?

21/05/2025

In this second article of a three-part series, I look at how Matt Godbolt uses modern C++ features to try to protect against misusing an…

Unleashing gst-python-ml: Python-powered ML analytics for GStreamer pipelines

12/05/2025

Powerful video analytics pipelines are easy to make when you're well-equipped. Combining GStreamer and Machine Learning frameworks are the…

Matt Godbolt sold me on Rust (by showing me C++)

06/05/2025

Gustavo Noronha helps break down C++ and shows how that knowledge can open up new possibilities with Rust.

Customizing WirePlumber's configuration for embedded systems

29/04/2025

Configuring WirePlumber on embedded Linux systems can be somewhat confusing. We take a moment to demystify this process for a particular…

Evolving hardware, evolving demo: Collabora's Embedded World Board Farm

24/04/2025

Collabora's Board Farm demo, showcasing our recent hardware enablement and continuous integration efforts, has undergone serious development…

Implementing Bluetooth on embedded Linux: Open source BlueZ vs proprietary stacks

27/02/2025

If you are considering deploying BlueZ on your embedded Linux device, the benefits in terms of flexibility, community support, and long-term…

Open Since 2005 logo

Our website only uses a strictly necessary session cookie provided by our CMS system. To find out more please follow this link.

Collabora Limited © 2005-2025. All rights reserved. Privacy Notice. Sitemap.

OSZAR »