diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7d123a37..1f0577f3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -70,6 +70,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) diff --git a/xtask/src/ci/qemu.rs b/xtask/src/ci/qemu.rs index 4b87496c..dd68d92c 100644 --- a/xtask/src/ci/qemu.rs +++ b/xtask/src/ci/qemu.rs @@ -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![] } @@ -208,6 +213,9 @@ impl Qemu { Target::Aarch64 => { memory = memory.max(256); } + Target::Riscv64 => { + memory = memory.max(128); + } _ => {} } memory