Skip to content

Commit

Permalink
Merge pull request #1139 from mkroening/opensbi-upgrade
Browse files Browse the repository at this point in the history
ci: upgrade OpenSBI to version 1.4
  • Loading branch information
mkroening authored Apr 16, 2024
2 parents de32867 + bd35d6e commit bc0efb4
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 18 deletions.
37 changes: 21 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,42 +176,47 @@ jobs:
kernel/hermit-builtins
- name: Download loader
run: gh release download --repo hermit-os/loader --pattern hermit-loader-${{ matrix.arch }}
- name: Dowload OpenSBI
if: matrix.arch == '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: Install virtiofsd
run: cargo install --locked virtiofsd
if: ${{ matrix.arch == 'x86_64' }}
if: matrix.arch == 'x86_64'
- run: cargo xtask ci qemu --arch ${{ matrix.arch }} --profile ${{ matrix.profile }} ${{ matrix.flags }} --package hello_world
- run: cargo xtask ci qemu --arch ${{ matrix.arch }} --profile ${{ matrix.profile }} ${{ matrix.flags }} --package hello_world --no-default-features --microvm
if: ${{ matrix.arch == 'x86_64' }}
if: matrix.arch == 'x86_64'
- run: cargo xtask ci qemu --arch ${{ matrix.arch }} --profile ${{ matrix.profile }} ${{ matrix.flags }} --package rusty_demo --virtiofsd
if: ${{ matrix.arch == 'x86_64' }}
if: matrix.arch == 'x86_64'
- run: cargo xtask ci qemu --arch ${{ matrix.arch }} --profile ${{ matrix.profile }} ${{ matrix.flags }} --package rusty_demo --smp 4 --virtiofsd
if: ${{ matrix.arch == 'x86_64' }}
if: matrix.arch == 'x86_64'
- run: cargo xtask ci qemu --arch ${{ matrix.arch }} --profile ${{ matrix.profile }} ${{ matrix.flags }} --package rusty_demo
- run: cargo xtask ci qemu --arch ${{ matrix.arch }} --profile ${{ matrix.profile }} ${{ matrix.flags }} --package rusty_demo --smp 4
# https://github.com/hermit-os/kernel/issues/737
if: ${{ matrix.arch != 'aarch64' }}
if: matrix.arch != 'aarch64'
- run: cargo xtask ci qemu --arch ${{ matrix.arch }} --profile ${{ matrix.profile }} ${{ matrix.flags }} --package rftrace-example --virtiofsd
if: ${{ matrix.arch == 'x86_64' }}
if: matrix.arch == 'x86_64'
- run: cargo xtask ci qemu --arch ${{ matrix.arch }} --profile ${{ matrix.profile }} ${{ matrix.flags }} --package httpd --features ci,hermit/dhcpv4 --netdev virtio-net-pci
if: ${{ matrix.arch != 'riscv64' }}
if: matrix.arch != 'riscv64'
- run: cargo xtask ci qemu --arch ${{ matrix.arch }} --profile ${{ matrix.profile }} ${{ matrix.flags }} --package httpd --features ci,hermit/dhcpv4 --netdev rtl8139 --features hermit/rtl8139
if: ${{ matrix.arch == 'x86_64' }}
if: matrix.arch == 'x86_64'
- run: cargo xtask ci qemu --arch ${{ matrix.arch }} --profile ${{ matrix.profile }} ${{ matrix.flags }} --package testudp --features hermit/udp,hermit/dhcpv4 --netdev virtio-net-pci
if: ${{ matrix.arch != 'riscv64' }}
if: matrix.arch != 'riscv64'
- run: cargo xtask ci qemu --arch ${{ matrix.arch }} --profile ${{ matrix.profile }} ${{ matrix.flags }} --package testudp --features hermit/udp,hermit/dhcpv4 --netdev rtl8139 --features hermit/rtl8139
if: ${{ matrix.arch == 'x86_64' }}
if: matrix.arch == 'x86_64'
- run: cargo xtask ci qemu --arch ${{ matrix.arch }} --profile ${{ matrix.profile }} ${{ matrix.flags }} --package miotcp --features hermit/dhcpv4 --netdev virtio-net-pci
if: ${{ matrix.arch != 'riscv64' }}
if: matrix.arch != 'riscv64'
- run: cargo xtask ci qemu --arch ${{ matrix.arch }} --profile ${{ matrix.profile }} ${{ matrix.flags }} --package miotcp --features hermit/dhcpv4 --netdev rtl8139 --features hermit/rtl8139
if: ${{ matrix.arch == 'x86_64' }}
if: matrix.arch == 'x86_64'
- run: cargo xtask ci qemu --arch ${{ matrix.arch }} --profile ${{ matrix.profile }} ${{ matrix.flags }} --package poll --features hermit/dhcpv4 --netdev virtio-net-pci
if: ${{ matrix.arch != 'riscv64' }}
if: matrix.arch != 'riscv64'
- run: cargo xtask ci qemu --arch ${{ matrix.arch }} --profile ${{ matrix.profile }} ${{ matrix.flags }} --package poll --features hermit/dhcpv4 --netdev rtl8139 --features hermit/rtl8139
if: ${{ matrix.arch == 'x86_64' }}
if: matrix.arch == 'x86_64'
- run: cargo xtask ci qemu --arch ${{ matrix.arch }} --profile ${{ matrix.profile }} ${{ matrix.flags }} --package mioudp --features hermit/udp,hermit/dhcpv4 --netdev virtio-net-pci
if: ${{ matrix.arch != 'riscv64' }}
if: matrix.arch != 'riscv64'
- run: cargo xtask ci qemu --arch ${{ matrix.arch }} --profile ${{ matrix.profile }} ${{ matrix.flags }} --package mioudp --features hermit/udp,hermit/dhcpv4 --netdev rtl8139 --features hermit/rtl8139
if: ${{ matrix.arch == 'x86_64' }}
if: matrix.arch == 'x86_64'

run-x86_64-kvm:
name: Run (x86_64, kvm)
Expand Down
9 changes: 7 additions & 2 deletions xtask/src/ci/qemu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,12 @@ impl Qemu {
} else if self.build.cargo_build.artifact.arch == Arch::Aarch64 {
vec!["-machine".to_string(), "virt,gic-version=3".to_string()]
} else if self.build.cargo_build.artifact.arch == Arch::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 @@ -203,7 +208,7 @@ impl Qemu {
fn memory(&self) -> usize {
let mut memory = 32usize;
if self.build.cargo_build.artifact.arch == Arch::Riscv64 {
memory *= 2;
memory *= 4;
}
if self.build.cargo_build.artifact.profile() == "dev" {
memory *= 4;
Expand Down

0 comments on commit bc0efb4

Please sign in to comment.