Browse Source

README: Update the README to include more detailed instructions

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Alistair Francis 4 years ago
parent
commit
b19692e67d
1 changed files with 61 additions and 19 deletions
  1. 61 19
      README.md

+ 61 - 19
README.md

@@ -1,4 +1,3 @@
-
 # meta-riscv
 RISC-V Architecture Layer for OpenEmbedded/Yocto
 
@@ -16,7 +15,7 @@ OpenEmbedded/Yocto distributions and layer stacks, such as:
 
 * Distro-less (only with OE-Core).
 * Angstrom.
-* Yocto/Poky (main focus of testing).
+* Yocto/Poky.
 
 ## Dependencies
 
@@ -31,18 +30,18 @@ This layer depends on:
 
 ## Quick Start
 
-Note: You only need this if you do not have an existing Yocto Project build environment.
+**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](https://source.android.com/setup/downloading#installing-repo) first. 
 
-## Create workspace
+### Create workspace
 ```text
 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
+### Update existing workspace
 
 In order to bring all layers uptodate with upstream
 
@@ -52,49 +51,92 @@ repo sync
 repo rebase
 ```
 
-## Setup Build Environment
+### Setup Build Environment
 ```text
 . ./meta-riscv/setup.sh
 ```
-## Build Image
 
-A console-only image
+## 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
 ```text
-bitbake core-image-full-cmdline
+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
+a standalone (on device) SDK for the 32-bit QEMU machine
+
+```text
+MACHINE=qemuriscv32 bitbake core-image-lsb-sdk
+```
+
+To build an image to run on the HiFive Unleased using Wayland run the following
+
+```text
+MACHINE=freedom-u540 bitbake core-image-wayland
+```
+
+To build a full GUI equipped image running Plasma Mobile see the in [tree documentation here](https://github.com/riscv/meta-riscv/blob/master/docs/Plasma-Mobile-on-Unleashed.md).
+
+## Running in QEMU
+
+Run the 64-bit machine in QEMU using the following command:
 
+```text
+MACHINE=qemuriscv64 runqemu nographic
 ```
-bitbake core-image-lsb-sdk
+
+Run the 32-bit machine in QEMU using the following command:
+
+```text
+MACHINE=qemuriscv32 runqemu nographic
 ```
 
-## Run in QEMU
+## 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.
+
 ```text
-runqemu nographic
+TFTP_SERVER_IP = "127.0.0.1"
 ```
 
-## Running wic.gz image on hardware
+### Running with the Microsemi Expansion board
 
-The output of the build will be a ```<image>.wic.gz``` file. You can write this file to an sd card using:
+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:
 
 ```text
-$ zcat <image>-<machine>.wic.gz | sudo dd of=/dev/sdX bs=4M iflag=fullblock oflag=direct conv=fsync status=progress
+RISCV_SBI_FDT_freedom-u540 = "hifive-unleashed-a00-microsemi.dtb"
 ```
 
-## Sparse Image Creation
+### 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:
 
 ```text
 $ 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/sdd
+$ 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:
+
+```text
+$ 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>`
-