thead_admin d296c2345f Linux_SDK_V1.1.2 1 year ago
..
.github c78af21817 Linux_SDK_V0.9.5 1 year ago
classes-recipe d296c2345f Linux_SDK_V1.1.2 1 year ago
conf d296c2345f Linux_SDK_V1.1.2 1 year ago
doc 2edf75388a Linux_SDK_V1.0.3 1 year ago
dynamic-layers d296c2345f Linux_SDK_V1.1.2 1 year ago
recipes-ai d296c2345f Linux_SDK_V1.1.2 1 year ago
recipes-benchmark d296c2345f Linux_SDK_V1.1.2 1 year ago
recipes-bsp d296c2345f Linux_SDK_V1.1.2 1 year ago
recipes-connectivity d296c2345f Linux_SDK_V1.1.2 1 year ago
recipes-core d296c2345f Linux_SDK_V1.1.2 1 year ago
recipes-devtools d296c2345f Linux_SDK_V1.1.2 1 year ago
recipes-extended d296c2345f Linux_SDK_V1.1.2 1 year ago
recipes-gnome d296c2345f Linux_SDK_V1.1.2 1 year ago
recipes-graphics d296c2345f Linux_SDK_V1.1.2 1 year ago
recipes-kernel d296c2345f Linux_SDK_V1.1.2 1 year ago
recipes-multimedia d296c2345f Linux_SDK_V1.1.2 1 year ago
recipes-security d296c2345f Linux_SDK_V1.1.2 1 year ago
recipes-support d296c2345f Linux_SDK_V1.1.2 1 year ago
tools 2edf75388a Linux_SDK_V1.0.3 1 year ago
wic c78af21817 Linux_SDK_V0.9.5 1 year ago
.travis.yml c78af21817 Linux_SDK_V0.9.5 1 year ago
CONTRIBUTORS c78af21817 Linux_SDK_V0.9.5 1 year ago
LICENSE c78af21817 Linux_SDK_V0.9.5 1 year ago
README.md c78af21817 Linux_SDK_V0.9.5 1 year ago
setup.sh d296c2345f Linux_SDK_V1.1.2 1 year ago

README.md

meta-riscv

RISC-V Architecture Layer for OpenEmbedded/Yocto

license Build Status

Description

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

More information can be found at: https://riscv.org/ (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.

Dependencies

This layer depends on:

  • URI: git://github.com/openembedded/openembedded-core
    • branch: master
    • revision: HEAD
  • URI: git://github.com/openembedded/bitbake
    • 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://github.com/riscv/meta-riscv  -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/setup.sh

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 127.0.0.1 to the IP address of your TFTP server and copy the uImage to the server.

TFTP_SERVER_IP = "127.0.0.1"

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 ./freedom-u540-opensbi-201812181337-mmcblk.direct > image.bmap
$ sudo bmaptool copy --bmap image.bmap ./freedom-u540-opensbi-201812181337-mmcblk.direct /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

Maintainer(s)

  • Khem Raj <raj dot khem at gmail.com>