From 945861f11162ce30fc3561004eb65fd3e85dbb12 Mon Sep 17 00:00:00 2001 From: Qinghao Shi Date: Tue, 21 May 2024 16:23:25 +0800 Subject: [PATCH] ci: add prebuild opensbi for booting kernel Signed-off-by: Qinghao Shi --- .github/workflows/ci.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2ddaa67741678..ec63ed957a03c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -226,15 +226,17 @@ jobs: with: name: ${{ matrix.kernel }}.tar.gz - - name: Download rootfs and unpack artifacts + - name: Download rootfs opensbi and unpack artifacts run: | wget -qc https://github.com/c-sky/buildroot/releases/download/v1.0.11/rootfs_rv64.ext2.tar.gz tar -xvf rootfs_rv64.ext2.tar.gz + wget -qc https://github.com/c-sky/zero_stage_boot/releases/download/v1.2/opensbi-1.3-64lp64.tar.gz + tar -xvf opensbi-1.3-64lp64.tar.gz tar -xvf ${{ matrix.kernel }}.tar.gz - name: Run Qemu run: | - qemu-system-riscv64 -cpu ${{ matrix.cpu }} -nographic -smp ${{ matrix.core_count }} -M virt -kernel ./Image -append 'rootwait root=/dev/vda ro' -drive file=./rootfs_rv64.ext2,format=raw,id=hd0 -device virtio-blk-device,drive=hd0 -monitor none -monitor none -serial telnet:localhost:5678,server & + qemu-system-riscv64 -cpu ${{ matrix.cpu }} -nographic -smp ${{ matrix.core_count }} -M virt -bios ./fw_dynamic.bin -kernel ./Image -append 'rootwait root=/dev/vda ro' -drive file=./rootfs_rv64.ext2,format=raw,id=hd0 -device virtio-blk-device,drive=hd0 -monitor none -monitor none -serial telnet:localhost:5678,server & - name: Check Qemu Booting Kernel run: .github/ci_scripts/check_qemu.exp 'cat /proc/version' 180 @@ -267,14 +269,16 @@ jobs: with: name: ${{ matrix.kernel }}.tar.gz - - name: Download rootfs and unpack artifacts + - name: Download rootfs opensbi and unpack artifacts run: | wget -qc https://github.com/c-sky/buildroot/releases/download/v1.0.11/rootfs_rv32.ext2.tar.gz tar -xvf rootfs_rv32.ext2.tar.gz + wget -qc https://github.com/c-sky/zero_stage_boot/releases/download/v1.2/opensbi-1.3-32ilp32.tar.gz + tar -xvf opensbi-1.3-32ilp32.tar.gz tar -xvf ${{ matrix.kernel }}.tar.gz - name: Run Qemu - run: qemu-system-riscv32 -cpu ${{ matrix.cpu }} -nographic -smp 4 -M virt -kernel ./Image -append 'rootwait root=/dev/vda ro' -drive file=./rootfs_rv32.ext2,format=raw,id=hd0 -device virtio-blk-device,drive=hd0 -monitor none -serial telnet:localhost:5678,server & + run: qemu-system-riscv32 -cpu ${{ matrix.cpu }} -nographic -smp 4 -M virt -bios ./fw_dynamic.bin -kernel ./Image -append 'rootwait root=/dev/vda ro' -drive file=./rootfs_rv32.ext2,format=raw,id=hd0 -device virtio-blk-device,drive=hd0 -monitor none -serial telnet:localhost:5678,server & - name: Check Qemu Booting Kernel run: .github/ci_scripts/check_qemu.exp 'cat /proc/version' 180