OpenEmbedded/Yocto layer for RISC-V Architecture
Find a file
Justin Hammond 650490e644 Fix VisionFive 2 boot and Add Star64 Board
Several issues with the current visionfive 2 support:
* JH7110 Support is only in OpenSBI Master branch, (upcoming 1.3 release).  So pin OpenSBI Revision to the commit that adds JH7110 Support otherwise reset etc does not work
* There are two variants of VisionFive2 and Star64 - 4Gb and 8Gb. StarFive's u-boot reads the eeprom on board to determine what variant you have, and modifies the loaded FDT it passes to the kernel with the correct Memory. Current U-boot scripts in meta-riscv do not do this, and thus all boards end up with the default 4Gb configuration. I've updated this for Star64, but needs testing on VF2

* Some of the addresses used in uboot for kernel/initramfs or fdt were different from upstream. Aligned the addresses with upstream StarFive.

As both Star64 and VisionFive2 are based on the same SOC, i've changed the machine configuration so we have a JH7110 SOC and VisionFive2 and Star64 inherit from this. Where appropriate in the recipies, I've changed to jh7110 instead of visionfive2

Finally, as the Star64 has different kernel/u-boot configs/dts files, i've pointed those at my repos for now, and will be upstreaming (assuming Starfive accept star64 related PRs). Once upstreamed, I'll submit a new PR here.

This also lays the groundwork for the new PineTab-V from pine64 which is due to be shipped in May.

Signed-Off-By: Justin Hammond <justin@dynam.ac>
2023-04-18 17:01:54 -07:00
.github add templates for commits and issues 2018-07-27 07:49:52 -07:00
conf Fix VisionFive 2 boot and Add Star64 Board 2023-04-18 17:01:54 -07:00
docs docs/AE350-AX45MP.md: Update kernel version 2022-11-07 20:39:05 -08:00
dynamic-layers python3-pyruvate: Port bbappend to work with 1.2.1 release 2023-04-09 23:39:40 -07:00
recipes-bsp Fix VisionFive 2 boot and Add Star64 Board 2023-04-18 17:01:54 -07:00
recipes-core busybox: Update bbappend to 1.36 2023-01-30 07:58:10 +10:00
recipes-devtools/riscv-tools python3-cryptography: Drop bbappend for >=38 release 2022-10-31 08:18:26 -07:00
recipes-graphics Fix VisionFive 2 boot and Add Star64 Board 2023-04-18 17:01:54 -07:00
recipes-kernel Fix VisionFive 2 boot and Add Star64 Board 2023-04-18 17:01:54 -07:00
recipes-multimedia Fix VisionFive 2 boot and Add Star64 Board 2023-04-18 17:01:54 -07:00
recipes-support layers: Bump to use kirkstone 2022-02-22 08:51:48 -08:00
tools/manifests Use https URLs to fetch repositories 2020-09-01 15:07:08 -07:00
wic wic: visionfive2: Fix root partition name 2023-04-17 15:30:42 -07:00
.travis.yml .travis.yml: Update the Ubuntu distro 2020-05-19 20:24:17 -07:00
ae350-ax45mp.yml ae350-ax45mp.yml: add kas-container YAML for building poky distro 2022-08-15 08:56:10 -07:00
beaglev.yml beaglev.yml: We can build with glibc now ! 2021-05-07 08:35:48 -07:00
CONTRIBUTORS Add a CONTRIBUTORS file 2020-07-20 20:32:07 -07:00
LICENSE Add a CONTRIBUTORS file 2020-07-20 20:32:07 -07:00
nezha.yml nezha.yml: add file used with kas-docker 2022-03-30 18:54:52 -07:00
README.md conf/machine: Add mangopi-mq-pro machine 2023-02-05 19:30:23 -08:00
setup.sh setup.sh: Drop setting largefile in DISTRO_FEATURES 2022-08-14 15:03:21 -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).
  • Yoe Distro.
  • Yocto/Poky.

Dependencies

This layer depends on:

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 https://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 different machines you can build for are:

  • freedom-u540: The SiFive HiFive Unleashed board
  • beaglev-starlight-jh7100: BeagleV - Based on Starlight JH7100 SOC
  • mangopi-mq-pro: MangoPi MQ Pro - Based on Allwinner D1 SOC

Note that this layer also provides improvements and features for the upstream qemuriscv32 and qemuriscv64 machines.

Additional beagleV notes on bringup are here

Build Images

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

MACHINE=qemuriscv64 bitbake core-image-full-cmdline
MACHINE=beaglev-starlight-jh7100 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 an image to run on the BeagleV using Wayland run the following

MACHINE=beaglev-starlight-jh7100 bitbake core-image-weston

To build an image to run on the MangoPi MQ Pro (console only has been tested so far) run the following:

MACHINE=mangopi-mq-pro bitbake core-image-base

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, beaglev-starlight-jh7100 or mangopi-mq-pro 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

Using bmaptoop to write the image

Instead of dding wic.gz image bmaptool (available in most Linux distributions and/or pip) can be used for more reliable and faster flashing. You can write this file to an sd card using:

$ sudo bmaptool copy <image>-<machine>.wic.gz /dev/sdX

Maintainer(s)

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