Skip to content

Commit

Permalink
ci: add prebuild opensbi for booting kernel
Browse files Browse the repository at this point in the history
Signed-off-by: Qinghao Shi <[email protected]>
  • Loading branch information
jamesbeyond committed May 22, 2024
1 parent 91bfac1 commit 27565a1
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 27565a1

Please sign in to comment.