Skip to content

Commit

Permalink
ci: upgrade OpenSBI to version 1.4
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Kröning <[email protected]>
  • Loading branch information
mkroening committed Mar 15, 2024
1 parent c5657b4 commit 2798616
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
merge_group:

env:
GH_TOKEN: ${{ github.token }}
RUSTFLAGS: -Dwarnings
RUSTDOCFLAGS: -Dwarnings

Expand Down Expand Up @@ -70,6 +71,11 @@ jobs:
lfs: true
- name: Install stable Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Dowload OpenSBI
if: matrix.target == 'riscv64'
run: |
gh release download v1.4 --repo riscv-software-src/opensbi --pattern 'opensbi-*-rv-bin.tar.xz'
tar -xvf opensbi-*-rv-bin.tar.xz opensbi-1.4-rv-bin/share/opensbi/lp64/generic/firmware/fw_jump.bin
- name: Run VM (hello_world, dev)
run: cargo xtask ci qemu --target ${{ matrix.target }}
- name: Run VM (hello_world, release)
Expand Down
10 changes: 9 additions & 1 deletion xtask/src/ci/qemu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,12 @@ impl Qemu {
} else if self.build.target() == Target::Aarch64 {
vec!["-machine".to_string(), "virt,gic-version=3".to_string()]
} else if self.build.target() == Target::Riscv64 {
vec!["-machine".to_string(), "virt".to_string()]
vec![
"-machine".to_string(),
"virt".to_string(),
"-bios".to_string(),
"opensbi-1.4-rv-bin/share/opensbi/lp64/generic/firmware/fw_jump.bin".to_string(),
]
} else {
vec![]
}
Expand Down Expand Up @@ -208,6 +213,9 @@ impl Qemu {
Target::Aarch64 => {
memory = memory.max(256);
}
Target::Riscv64 => {
memory = memory.max(128);
}
_ => {}
}
memory
Expand Down

0 comments on commit 2798616

Please sign in to comment.