Ubuntu on the VisionFive and the Nezha boards

Below you will find the instructions for installing the Nezha and the VisionFive 22.04.1 Ubuntu images.

Prerequisites

1. Setup RISC-V Ubuntu Team PPA

This PPA contains the very last version of the packages we are working on and the packages for the boards that are experimental.

Use the following commands to add the PPA:

$ sudo add-apt-repository ppa:ubuntu-risc-v-team/release
$ sudo apt update

2. Cloud-init and SSH keys

At the very first boot of the following images, the default login/password (“ubuntu/ubuntu”) may not work: this is because cloud-init is generating SSH keys in the background, and we must wait for this generation to finish before being able to login, it generally takes a few minutes.

VisionFive

In order to boot Ubuntu on the VisionFive board, the factory u-boot firmware must be installed. In case you modified the firmware, here is the link to flash it back.

1. Flash the Ubuntu image on the sdcard

Download the Ubuntu image and flash it on your sdcard using:

$ xz -d jammy-preinstalled-server-riscv64+visionfive.img.xz
$ dd if=jammy-preinstalled-server-riscv64+visionfive.img of=/dev/YOUR_SDCARD_BLOCK_DEVICE

Insert the sdcard and then enjoy using Ubuntu on the VisionFive :slight_smile:

2. Bluetooth

The VisionFive board needs a specific firmware for the Bluetooth chipset and we failed to find its origin, so instead of adding it in the archive, we provide it through the RISC-V PPA in the linux-firmware-starfive package. In addition to this package, another piece of software must be used to load this firmware and was packaged into a package called brcm-patchram-plus-starfive.

So to use the Bluetooth on the VisionFive board, you’ll need to enable the RISC-V PPA (refer to the “Setup RISC-V Ubuntu Team PPA“ section on how to enable this PPA) and do the following:

$ apt install linux-firmware-starfive brcm-patchram-plus-starfive

Note that for some unknown reasons, the Bluetooth interface might fail to appear at first: the service installed by the brcm-patchram-plus-starfive package handles this and retries until it actually works.

3. Known issues

  • Shutdown fails: this is a board limitation.

  • The default xfce4 desktop environment is very slow, we looked into this and found a workaround to this issue: we’ll keep digging and try to provide a better alternative. At the moment though, one should use the following commands:

    $ sudo rm /usr/lib/riscv64-linux-gnu/dri/kms_swrast_dri.so
    $ sudo apt install openbox
    $ DISPLAY=:0 openbox –replace

Nezha

1. Flash the Ubuntu image on the sdcard

Download the Ubuntu image and flash it on your sdcard using:

$ xz -d jammy-preinstalled-server-riscv64+nezha.img.xz
$ dd if=jammy-preinstalled-server-riscv64+nezha.img  of=/dev/YOUR_SDCARD_BLOCK_DEVICE

Insert the sdcard and then enjoy using Ubuntu on the Nezha :slight_smile:

2. Known issues

  • Wifi/BT not working: the Wifi driver is only available on the 5.4.61 kernel.
  • Ethernet MAC address changes at every boot: this “feature” is described here https://linux-sunxi.org/Ethernet along with the solutions to fix this in section “Setting the MAC address”
    Shutdown fails
1 Like