Pavel Popov
Chief troubleshooting officer, software ninjaneer and digital migrant 🥷

Installing Armbian on Rock Pi 4B with NVMe SSD

In this blog post, we’ll walk you through the process of installing the latest version of Armbian on a Rock Pi 4B device. Our goal is to install the system on an NVMe SSD, which requires U-Boot firmware. Currently, newer versions of Armbian do not have a maintainer for Rock Pi 4B, leading to some issues with the U-Boot firmware. To work around this, we’ll use U-Boot from an older version of Armbian.

What You’ll Need

  • Rock Pi 4B
  • Micro SD card
  • NVMe SSD
  • USB adapter for Micro SD
  • USB adapter for NVMe SSD
  • Balena Etcher software (for writing the image)

Preparing Your Micro SD Card

We’ll start by installing an older version of Armbian on the Micro SD card because newer versions have issues with U-Boot. This older version will be used solely to install the older U-Boot firmware.

Pro Tip: You can also directly install this version on NVMe using nand-sata-install, selecting “Boot from SPI - system on SATA, USB or NVMe,” and then flashing the SPI bootloader.

  1. Download the image Armbian 21.08.1 “Focal”.
  2. Connect the Micro SD card to your computer using a USB adapter.
  3. Open Balena Etcher.
  4. Select the downloaded image.
  5. Choose the Micro SD card as the target device.
  6. Click “Flash!” and wait for the process to complete.

Writing the Image to NVMe SSD

Next, we’ll write the Armbian image to the NVMe SSD.

  1. Download the latest Armbian image.
  2. Connect the NVMe SSD to your computer using a USB adapter.
  3. Open Balena Etcher.
  4. Select the downloaded image.
  5. Choose the NVMe SSD as the target device.
  6. Click “Flash!” and wait for the process to complete.

Handling Pre-installed U-Boot

If U-Boot is already installed in the SPI Flash, follow these steps:

  1. Short pins 23 and 25 on the Rock Pi 4B to boot Armbian from the Micro SD card.
  2. Add the following lines to /boot/armbianEnv.txt:

    overlays=spi-jedec-nor
    param_spinor_spi_bus=1
    
  3. Reboot the device.
  4. Once the device has fully booted, disconnect pins 23 and 25.
  5. Enable spi-nor by running the following command as root:

    echo spi1.0 > /sys/bus/spi/drivers/spi-nor/bind
    
  6. Verify that the SPI mtd interface is enabled by running:

    ls /dev/mtdblock0
    

Note: If the last command does not display any files, something went wrong between steps 2 and 4.

Flashing SPI to Work with Armbian on NVMe

Finally, we’ll update the bootloader on the SPI Flash to ensure Armbian works seamlessly with the NVMe SSD.

  1. Run nand-sata-install.
  2. Select the option: “Install/Update the bootloader on SPI Flash”.
  3. Confirm that you want to flash it by selecting “Yes”.
  4. Wait about 60 seconds for the writing to complete.
  5. Select “Exit”.
  6. Power off the device, remove the Micro SD card, and reboot.
  7. Enjoy booting Armbian using SPI and NVMe.

By following these steps, you should have a fully functional Armbian system running on your Rock Pi 4B with an NVMe SSD. Happy computing!