Skip to content

Commit 0b9fc04

Browse files
committed
Finish RISC-V support
Completes Rust-for-Linux#225. There were several problems: - No console output. This was due to missing `CONFIG_SOC_VIRT` and `CONFIG_SERIAL_OF_PLATFORM`. - Hanging QEMU. This was due to missing `CONFIG_SOC_VIRT` plus reboot not working in older QEMU versions for RISC-V. We provide a custom build of the latest QEMU (6.0.0, recently released) in https://github.com/Rust-for-Linux/ci-bin. - Broken boot for debug builds. Some debugging options under `Kernel hacking` do not seem to work for RISC-V (in our branched kernel version, that is). Also take the chance to clean up the `.config`s a bit more. Signed-off-by: Miguel Ojeda <[email protected]>
1 parent 81fea68 commit 0b9fc04

File tree

3 files changed

+214
-440
lines changed

3 files changed

+214
-440
lines changed

.github/workflows/ci.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010

1111
strategy:
1212
matrix:
13-
arch: [arm, arm64, ppc64le, x86_64]
13+
arch: [arm, arm64, ppc64le, riscv64, x86_64]
1414
toolchain: [gcc, clang, llvm]
1515
config: [debug, release]
1616
rustc: [2021-02-20]
@@ -119,6 +119,11 @@ jobs:
119119
echo 'RUSTC_SYSROOT=--sysroot=$HOME/sysroot' >> $GITHUB_ENV
120120
echo "MAKE_SYSROOT=KRUSTCFLAGS=--sysroot=$HOME/sysroot" >> $GITHUB_ENV
121121
122+
# Setup: custom pre-built binaries folder
123+
- run: |
124+
mkdir bin
125+
echo $(pwd)/bin >> $GITHUB_PATH
126+
122127
# Setup: LLVM
123128
- run: curl https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
124129
- run: sudo add-apt-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-11 main'
@@ -151,7 +156,9 @@ jobs:
151156
- if: matrix.arch == 'ppc64le'
152157
run: sudo apt-get install -y qemu-system-ppc
153158
- if: matrix.arch == 'riscv64'
154-
run: sudo apt-get install -y qemu-system-misc
159+
run: |
160+
curl -o bin/qemu-system-riscv64 https://raw.githubusercontent.com/Rust-for-Linux/ci-bin/master/qemu-6.0.0/bin/qemu-system-riscv64
161+
chmod u+x bin/qemu-system-riscv64
155162
156163
# Setup: rustc
157164
- if: matrix.install == 'rustup'

0 commit comments

Comments
 (0)