From e193fe4bdb75654145ffffc5a1ee5efe339d2fd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kr=C3=B6ning?= Date: Tue, 16 Apr 2024 17:15:23 +0200 Subject: [PATCH 1/2] ci: make if expressions implicit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Kröning --- .github/workflows/ci.yml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3c4b828ec8..cdb3a93c4a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -178,40 +178,40 @@ jobs: run: gh release download --repo hermit-os/loader --pattern hermit-loader-${{ matrix.arch }} - 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) From bd35d6e085bb7f89d165a7a669940323880bb464 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kr=C3=B6ning?= Date: Tue, 16 Apr 2024 17:16:44 +0200 Subject: [PATCH 2/2] ci: upgrade OpenSBI to version 1.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Kröning --- .github/workflows/ci.yml | 5 +++++ xtask/src/ci/qemu.rs | 9 +++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cdb3a93c4a..9986e0e42a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -176,6 +176,11 @@ 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' diff --git a/xtask/src/ci/qemu.rs b/xtask/src/ci/qemu.rs index 5cb343b9b4..aefc56c0da 100644 --- a/xtask/src/ci/qemu.rs +++ b/xtask/src/ci/qemu.rs @@ -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![] } @@ -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;