Skip to content

Commit 854b756

Browse files
authored
Merge pull request #553 from hermit-os/opensbi-ubuntu
ci: install OpenSBI from Ubuntu
2 parents dbb3f7e + 1e3166b commit 854b756

File tree

3 files changed

+4
-16
lines changed

3 files changed

+4
-16
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
- arch: aarch64_be
5353
packages: qemu-system-arm ipxe-qemu u-boot-qemu u-boot-tools
5454
- arch: riscv64
55-
packages: qemu-system-misc
55+
packages: qemu-system-misc opensbi
5656
runs-on: ${{ (matrix.arch == 'aarch64' || matrix.arch == 'aarch64_be') && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}
5757
steps:
5858
- name: Install Packages
@@ -83,11 +83,6 @@ jobs:
8383
with:
8484
toolchain: ${{ matrix.arch == 'aarch64_be' && 'nightly' || 'stable' }}
8585
components: ${{ matrix.arch == 'aarch64_be' && 'rust-src' || '' }}
86-
- name: Dowload OpenSBI
87-
if: matrix.arch == 'riscv64'
88-
run: |
89-
gh release download v1.7 --repo riscv-software-src/opensbi --pattern 'opensbi-*-rv-bin.tar.xz'
90-
tar -xvf opensbi-*-rv-bin.tar.xz opensbi-1.7-rv-bin/share/opensbi/lp64/generic/firmware/fw_jump.bin
9186
- run: cargo xtask ci qemu ${{ matrix.flags }} --target ${{ matrix.arch }}-elf
9287
if: matrix.arch == 'aarch64' || matrix.arch == 'aarch64_be'
9388
- run: cargo xtask ci qemu ${{ matrix.flags }} --target ${{ matrix.arch }}-elf --release

README.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -104,16 +104,9 @@ qemu-system-aarch64 \
104104

105105
### 64-bit RISC-V
106106

107-
For 64-bit RISC-V, we need a recent version of [OpenSBI].
108-
To download the release asset with [GitHub CLI] and extract the correct binary, run:
109-
110-
```bash
111-
gh release download v1.7 --repo riscv-software-src/opensbi --pattern 'opensbi-*-rv-bin.tar.xz'
112-
tar -xvf opensbi-*-rv-bin.tar.xz opensbi-1.7-rv-bin/share/opensbi/lp64/generic/firmware/fw_jump.bin
113-
```
107+
For 64-bit RISC-V, we need a recent version of [OpenSBI] (lp64 `fw_jump.bin`).
114108

115109
[OpenSBI]: https://github.com/riscv-software-src/opensbi
116-
[GitHub CLI]: https://cli.github.com/
117110

118111
The QEMU base command is as follows:
119112

@@ -124,7 +117,7 @@ qemu-system-riscv64 \
124117
-smp 1 \
125118
-m 128M \
126119
-display none -serial stdio \
127-
-bios opensbi-1.7-rv-bin/share/opensbi/lp64/generic/firmware/fw_jump.bin
120+
-bios share/opensbi/lp64/generic/firmware/fw_jump.bin
128121
-kernel <LOADER>
129122
-initrd <APP>
130123
```

xtask/src/ci/qemu.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ impl Qemu {
139139
"-machine".to_string(),
140140
"virt".to_string(),
141141
"-bios".to_string(),
142-
"opensbi-1.7-rv-bin/share/opensbi/lp64/generic/firmware/fw_jump.bin".to_string(),
142+
"/usr/lib/riscv64-linux-gnu/opensbi/generic/fw_jump.bin".to_string(),
143143
]
144144
} else {
145145
vec![]

0 commit comments

Comments
 (0)