Skip to content

Commit

Permalink
Merge pull request #173 from firesim/dev
Browse files Browse the repository at this point in the history
Release 1.10.0
  • Loading branch information
NathanTP committed Oct 8, 2020
2 parents 6c6a08f + f4975d5 commit 45aebac
Show file tree
Hide file tree
Showing 84 changed files with 1,426 additions and 546 deletions.
9 changes: 6 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
[submodule "riscv-linux"]
path = riscv-linux
path = boards/default/linux
url = https://github.com/firesim/linux.git
[submodule "riscv-pk"]
path = riscv-pk
url = https://github.com/firesim/riscv-pk.git
path = boards/default/firmware/riscv-pk
url = https://github.com/riscv/riscv-pk.git
[submodule "opensbi"]
path = boards/default/firmware/opensbi
url = https://github.com/riscv/opensbi.git
[submodule "br/buildroot"]
path = wlutil/br/buildroot
url = https://github.com/buildroot/buildroot.git
Expand Down
51 changes: 50 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,56 @@
This changelog follows the format defined here: https://keepachangelog.com/en/1.0.0/
Versioning follows semantic versioning as described here: https://semver.org/spec/v2.0.0.html

## [1.9.0] - 2021-05-21
## [1.10.0] - 2020-10-05
The biggest change in this release is the introduction of OpenSBI as the
default firmware. BBL is still supported, but no longer the default. Other
changes include a number of performance improvements, better support for
user-provided kernel modules, and various bug fixes.

### Added
* PR #165 adds the ability to include user-provided kernel modules. These are
automatically built and loaded as opposed to the 'post-bin' option which is
more flexible but can't load in the early boot and is more work. This also
unifies all linux-related options into their own 'linux' option. The old
'linux-src' 'linux-config' options are still supported but deprecated, users
should now specify those in the 'linux' option.
* Firmware Improvements, OpenSBI support
* PR #152 adds support for OpenSBI as the default firmware. BBL is still
supported, but is no longer the default (use the "use-bbl" option).
* PR #172 Adds 'opensbi-build-args' and 'bbl-build-args' options. It also
introduces the new 'firmware' option group (deprecating the 'pk-src'
option and grouping all firmware-relevant options into one place).

### Changed
* PR #156 patches the default kernel to enable RoCC instructions by default.
This is a common need and has minimal risk to non-RoCC platforms.
* Performance Improvements
* PR #159 moves submodule status checking to only run for the workload
being built (rather than every workload in the workload search path).
Before this, if you had many workloads in your project, marshal could spend a
lot of time checking the same modules over and over.
* PR #166 Copies the parent's binary instead of rebuilding for every child
if none of the binary-related options changed. This is a big performance
improvement for applications with many child workloads.
* PR #162 overhauls the unit testing framework. Previous versions were hard to
maintain and had various bugs that could mask failures from time to time.
There is now a standard way to write complex tests and all unit tests were
confirmed to pass.

### Fixed
* Better support for files generated by host-init
* PR #158 correctly detects changes in files/overlay generated in host-init
(bug #157).
* PR #167 Handles kernel modules generated in host-init
* PR #160 broadens the scope of up to date criteria to include file metadata.
For example, adding execute permissions to a file in file/overlay previously
failed to trigger a rebuilt (bug #145)
* PR #162 ignores symlinks in overlays which often won't work if the symlink
points to files in the rootfs rather than the overlay.
* PR #164 fixes bug #163. A sufficiently large initramfs could overwrite kernel
memory. This tended to break Fedora --no-disk builds.

## [1.9.0] - 2020-05-21
This is largely a maintenance release with a few minor features and a bunch of
bug fixes. The most significant change is a bump to Linux 5.7rc3. The new
'firesim-dir' configuration option is also signficant because it enables more
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,17 @@ pip3 install -r python-requirements.txt

## RISC-V Tools
In addition to standard libraries, you will need a RISC-V compatible toolchain,
the RISC-V isa simulator (spike), and Qemu.
the RISC-V isa simulator (spike).

See the [Chipyard documentation](https://chipyard.readthedocs.io/en/latest/Chipyard-Basics/Initial-Repo-Setup.html#building-a-toolchain)
for help setting up a known-good toolchain and environment.

## Qemu
Qemu is the default simulator used by firemarshal. We require version v5.0.0 or
greater. If you aren't using chipyard, you can get it from:

https://github.com/qemu/qemu/tree/v5.0.0

# Basic Usage
If you only want to build bare-metal workloads, you can skip updating
submodules. Otherwise, you should update the required submodules by running:
Expand Down
3 changes: 3 additions & 0 deletions boards/default/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
This board contains reasonable defaults for a generic system. You probably
don't want to use it directly, other boards typically symlink defaults from
here if they don't need to change anything.
1 change: 1 addition & 0 deletions boards/default/firmware/opensbi
Submodule opensbi added at a98258
1 change: 1 addition & 0 deletions boards/default/firmware/riscv-pk
Submodule riscv-pk added at 5d9ed2
14 changes: 13 additions & 1 deletion boards/firechip/base-workloads/br-base.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,19 @@
"name" : "br-base",
"base" : "br",
"overlay" : "overlay",
"linux-config" : "linux-config",
"linux" : {
"source" : "../../linux",
"config" : "linux-config",
"modules" : {
"icenet" : "../../drivers/icenet-driver",
"iceblk" : "../../drivers/iceblk-driver"
}
},
"firmware" : {
"use-bbl" : false,
"bbl-src" : "../../firmware/riscv-pk",
"opensbi-src" : "../../firmware/opensbi"
},
"host-init" : "host-init.sh",
"files" : [
[ "trigger/start", "/usr/bin/firesim-start-trigger"],
Expand Down
14 changes: 13 additions & 1 deletion boards/firechip/base-workloads/fedora-base.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,17 @@
"name" : "fedora-base",
"base" : "fedora",
"overlay" : "overlay",
"linux-config" : "linux-config"
"linux" : {
"source" : "../../linux",
"config" : "linux-config",
"modules" : {
"icenet" : "../../drivers/icenet-driver",
"iceblk" : "../../drivers/iceblk-driver"
}
},
"firmware" : {
"use-bbl" : false,
"bbl-src" : "../../firmware/riscv-pk",
"opensbi-src" : "../../firmware/opensbi"
}
}
1 change: 1 addition & 0 deletions boards/firechip/firmware
1 change: 1 addition & 0 deletions boards/firechip/linux
85 changes: 71 additions & 14 deletions docs/source/workloadConfig.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,25 @@ instructions or hardware models. Defaults to the version of spike on your PATH.

.. _workload-linux-src:

linux-src
^^^^^^^^^^^^^^^^
Path to riscv-linux source directory to use when building the boot-binary for
this workload. Defaults to the riscv-linux source submoduled at
``riscv-linux/``.
linux-src (Deprecated)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
See the 'linux/source' option for the new equivalent.

linux-config
^^^^^^^^^^^^^^^^
linux-config (Deprecated)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
See the 'linux/config' option for the new equivalent.

linux
^^^^^^^^^^^^^^^^^
Specification for linux customization.

source
+++++++++++++++++
Path to linux source directory to use when building the boot-binary for
this workload. Will default to your board's linux source.

config
++++++++++++++++++
Linux configuration fragment to use. This file has the same format as linux
configuration files but only contains the options required by this workload.
Marshal will include a few options on top of the RISC-V default configuration,
Expand All @@ -91,10 +102,56 @@ platform drivers.
Inheritance happens by merging the current workload's linux-config with all
parent configs, with more recent options taking precedence of earlier options.

pk-src
^^^^^^^^^^^^^^
modules
+++++++++++++++++++
A dictionary of the form {MODULE_NAME : PATH_TO_MODULE_SRC, ...}

Kernel modules to compile and load automatically in your workload. Modules will
be loaded in the initramfs before loading the main user root. Modules are
identified by the .ko file name (the name listed by lsmod). Workload-defined
modules with the same name as an inherited module will take precidence,
allowing you to override system default drivers. If you need to manually load a
module (it shouldn't be automatically loaded), you should manually compile it in a
post-bin script instead.

The specified module directory must contain a Makefile that can be invoked as:

make LINUXSRC=PATH/TO/LINUX

It outputs one or more .ko files to be loaded. See test/kmod/ for an example.

pk-src (Deprecated)
^^^^^^^^^^^^^^^^^^^^
See the ‘firmware/bbl-src’ option for the new equivalent.

firmware
^^^^^^^^^^^^^^^^^^^
Firmware-related options

opensbi-src
+++++++++++++++++++++
Path to alternative opensbi source directory. Defaults to the board-provided
opensbi.

opensbi-build-args
+++++++++++++++++++++
Additional command line arguments to the 'make' command used to build opensbi.

bbl-src
++++++++++++++++++
Path to riscv-pk source directory to use for this workload. This provides the
bootloader (bbl). Defaults to the riscv-pk submodule included at ``riscv-pk/``.
bootloader (bbl). Defaults to the riscv-pk source included with the board.

bbl-build-args
++++++++++++++++++
Additional arguments to be passed to the configure script for bbl. Arguments
will be appended to any system defaults.

use-bbl
++++++++++++++++++
Use BBL as the firmware rather than the default OpenSBI. If you specified
'bbl-src', that will be used, otherwise the default implementation from the
board will be used.

host-init
^^^^^^^^^^^^^^
Expand Down Expand Up @@ -289,29 +346,29 @@ the following options (only ``refDir`` is required):
*Non-heritable*

refDir
^^^^^^^^^^^^^^^
++++++++++++++++
Path to a directory containing reference outputs for this workload. Directory
structures are compared directly (same folders, same file names). Regular files
are compared exactly. Serial outputs (uartlog) need only match a subset of
outputs; the entire reference uartlog contents must exist somewhere
(contiguously) in the test uartlog.

buildTimeout
^^^^^^^^^^^^^^^^^^^
+++++++++++++++++++++
Maximum time (in seconds) that the workload should take to build. The test will
fail if building takes longer than this. Defaults to infinite.

.. Note:: workloads with many jobs and guest-init scripts, could take a very
long time to build.

runTimeout
^^^^^^^^^^^^^^^^^^
+++++++++++++++++
Maximum time (in seconds) that any particular job should take to run and exit.
The test will fail if a job runs for longer than this before exiting. Defaults
to infinite.

strip
^^^^^^^^^^^^^^^^
+++++++++++++++
Attempt to clean up the uartlog output before comparing against the reference.
This will remove all lines not generated by a run script or command, as well as
stripping out any extra characters that might be added by the run-system (e.g.
Expand Down
5 changes: 3 additions & 2 deletions init-submodules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
# You do not need to call this script if you only intend to build bare-metal workloads.

git submodule update --init \
riscv-linux \
riscv-pk \
boards/default/linux \
boards/default/firmware/riscv-pk \
boards/default/firmware/opensbi \
wlutil/busybox \
wlutil/br/buildroot \
boards/firechip/drivers/*
2 changes: 2 additions & 0 deletions marshal
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ def main():

ctx = wlutil.getCtx()

wlutil.initLogging(args.verbose)

# Load all the configs from the workload directories
# Order matters here, duplicate workload files found in later search paths
# will overwrite files found in earlier search paths.
Expand Down
1 change: 0 additions & 1 deletion riscv-pk
Submodule riscv-pk deleted from cad3de
2 changes: 1 addition & 1 deletion scripts/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
test_logs/
testLogs/
Loading

0 comments on commit 45aebac

Please sign in to comment.