OpenEmbedded/Yocto layer for RISC-V Architecture
Find a file
Ricardo Salveti fa8c8584c4 wic: add freedom-u540 wic for sota/ostree
Wic file to be used with sota/ostree (meta-updater), as the source for
root needs to be provided by the otaimage plugin.

It can be maintained outside this layer, but having it maintained at the
official meta-riscv layer makes it a lot easier for users experimenting
with meta-updater.

Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2019-07-25 00:55:26 -07:00
.github add templates for commits and issues 2018-07-27 07:49:52 -07:00
conf freedom-u540: set UBOOT_DTB_LOADADDRESS 2019-07-24 11:50:56 -07:00
docs Added a missing word to docs 2019-04-03 09:09:31 -07:00
dynamic-layers/qt5-layer/recipes-qt/qt5 qtbase,qtdeclarative: Add -pthread to linker flags 2019-03-12 21:44:07 -07:00
recipes-bsp/u-boot u-boot: change overrides to be specific to freedom-u540 2019-07-18 20:51:05 -07:00
recipes-core musl: Delete riscv patches as they are upstreamed in musl >= 1.1.23 2019-07-23 18:15:49 -07:00
recipes-devtools/riscv-tools gdb: Remove the RISC-V GDB 2019-05-21 09:29:33 -07:00
recipes-extended ltp: Fix build with musl 2019-03-08 05:51:32 -08:00
recipes-kernel/linux linux: freedom-u540: Enable support for an INITRD 2019-07-17 15:59:58 -07:00
recipes-support libunwind: Fix build for riscv64 2019-03-21 09:06:06 -07:00
tools/manifests switch to using OE-Core/bitbake instead of poky 2018-08-29 09:56:07 -07:00
wic wic: add freedom-u540 wic for sota/ostree 2019-07-25 00:55:26 -07:00
.travis.yml travis: Try to stop builds timing out 2019-07-08 09:10:35 -07:00
LICENSE Initial commit 2017-10-02 23:08:43 -07:00
README.md README: Update the README to include more detailed instructions 2019-07-10 09:43:38 -07:00
setup.sh Add meta-python before meta-multimedia 2019-07-11 09:57:14 -07:00

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).
  • Angstrom.
  • 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 layers uptodate with upstream

cd riscv-yocto
repo sync
repo rebase

Setup Build Environment

. ./meta-riscv/setup.sh

Avaliable 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 Unleased board

Build Images

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

MACHINE=qemuriscv64 bitbake core-image-full-cmdline

Basic image without X support suitable for Linux Standard Base (LSB) implementations. It includes the full meta-toolchain, plus development headers and libraries to form a standalone (on device) SDK for the 32-bit QEMU machine

MACHINE=qemuriscv32 bitbake core-image-lsb-sdk

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

MACHINE=freedom-u540 bitbake core-image-wayland

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>