No Description

liqiangguo 063d0558e6 RISC-V:fix the source path of u-boot repository 2 years ago
.github 2cf991cc31 add templates for commits and issues 4 years ago
conf bda4f66f39 yocto uboot support for riscv 2 years ago
docs 98708e9065 Fix some minor typos in documentation 3 years ago
dynamic-layers ad99b75029 packagegroup-meta-multimedia: Ignore from world builds 2 years ago
recipes-bsp 063d0558e6 RISC-V:fix the source path of u-boot repository 2 years ago
recipes-connectivity 5092957c7a openssl: Make bbappend regexp relaxed for all openssl 1.1.1 versions 3 years ago
recipes-core e663a0b9e1 Add ice conf, add thead-image. 2 years ago
recipes-devtools d7e9da898a update sources.list 2 years ago
recipes-extended 11df9a2bc3 ltp: Make 64bit time_t futex patch generic 2 years ago
recipes-gnome 02a7d446b6 Fix gobject-introspection compile error. 2 years ago
recipes-graphics 9a75ffbb21 mesa: Remove bbappend 2 years ago
recipes-kernel 7a81b39f7f add compiler driver support for riscv 2 years ago
recipes-sato 7d22565122 Fix webkitgtk compile error. 2 years ago
recipes-support ca97886a1e boost: Drop bbappend 2 years ago
tools 34b2b81711 Add origin repo. 2 years ago
wic fa8c8584c4 wic: add freedom-u540 wic for sota/ostree 3 years ago
.travis.yml 5c38329a8a .travis.yml: Update the Ubuntu distro 3 years ago
CONTRIBUTORS 6472e4ca84 Add a CONTRIBUTORS file 2 years ago
LICENSE 6472e4ca84 Add a CONTRIBUTORS file 2 years ago 7ca3cc6df1 Document Yoe distro as supporting risc-v architecture 2 years ago e663a0b9e1 Add ice conf, add thead-image. 2 years ago


RISC-V Architecture Layer for OpenEmbedded/Yocto

license Build Status


This is the general hardware-specific BSP overlay for the RISC-V based devices.

More information can be found at: (Official Site)

The core BSP part of meta-riscv should work with different OpenEmbedded/Yocto distributions and layer stacks, such as:

  • Distro-less (only with OE-Core).
  • Yoe Distro.
  • Yocto/Poky.


This layer depends on:

  • URI: git://
    • branch: master
    • revision: HEAD
  • URI: git://
    • branch: master
    • revision: HEAD

Quick Start

Note: You only need this if you do not have an existing Yocto Project build environment.

Make sure to install the repo command by Google first.

Create workspace

mkdir riscv-yocto && cd riscv-yocto
repo init -u git://  -b master -m tools/manifests/riscv-yocto.xml
repo sync
repo start work --all

Update existing workspace

In order to bring all the layers up to date with upstream

cd riscv-yocto
repo sync
repo rebase

Setup Build Environment

. ./meta-riscv/

Available Machines

The three different machines you can build for are:

  • qemuriscv64: The 64-bit RISC-V machine
  • qemuriscv32: The 32-bit RISC-V machine
  • freedom-u540: The SiFive HiFive Unleashed board

Build Images

A console-only image for the 64-bit QEMU machine

MACHINE=qemuriscv64 bitbake core-image-full-cmdline

To build an image to run on the HiFive Unleashed using Wayland run the following

MACHINE=freedom-u540 bitbake core-image-weston

To build a full GUI equipped image running Plasma Mobile see the in-tree documentation here.

Running in QEMU

Run the 64-bit machine in QEMU using the following command:

MACHINE=qemuriscv64 runqemu nographic

Run the 32-bit machine in QEMU using the following command:

MACHINE=qemuriscv32 runqemu nographic

Running on hardware

Setting up a TFTP server

If you would like to boot the images from a TFTP server (optional) you should set your TFTP server address in your local.conf with the following line. Change to the IP address of your TFTP server and copy the uImage to the server.


Running with the Microsemi Expansion board

To use the Microsemi expansion board with your HiFive Unleased add the following line to your local.conf. This tells the Unleashed to use a device tree with the PCIe device described:

RISCV_SBI_FDT_freedom-u540 = "hifive-unleashed-a00-microsemi.dtb"

Sparse Image Creation

The output of the build can also be written to an SD card using bmaptool, the steps to do this are below:

$ MACHINE=freedom-u540 wic create freedom-u540-opensbi -e core-image-minimal
$ bmaptool create ./ > image.bmap
$ sudo bmaptool copy --bmap image.bmap ./ /dev/sdX

dding wic.gz

The output of a freedom-u540 build will be a <image>.wic.gz file. You can write this file to an sd card using:

$ zcat <image>-<machine>.wic.gz | sudo dd of=/dev/sdX bs=4M iflag=fullblock oflag=direct conv=fsync status=progress


  • Khem Raj <raj dot khem at>