Skip to content

Commit c4e64ba

Browse files
committed
CI: Add support for ppc64le
For now only using clang. Adds -vga none to the qemu command for all targets. But AFAICS that's safe as both x86 and arm use serial consoles already. Uses RUST_OPT_LEVEL_SIMILAR_AS_CHOSEN_FOR_C, not RUST_OPT_LEVEL_0 like other configs. In order to avoid crashes like: Rust Example (init) Am I built-in? true Parameters: my_bool: true my_i32: 123321 my_str: 🦀mod my_usize: 42 my_array: [0, 1] Value: 10 Value: 10 Large array has length: 514 Kernel panic - not syncing: corrupted stack end detected inside scheduler CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.12.0-rc3+ #1 Signed-off-by: Michael Ellerman <[email protected]>
1 parent 659f7bd commit c4e64ba

File tree

2 files changed

+1590
-0
lines changed

2 files changed

+1590
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@ jobs:
4848
install: standalone
4949
sysroot: custom
5050

51+
- arch: ppc64le
52+
toolchain: clang
53+
config: debug
54+
rustc: 2021-02-20
55+
output: src
56+
install: rustup
57+
sysroot: common
58+
5159
steps:
5260
# Setup: checkout
5361
- uses: actions/checkout@v2
@@ -68,6 +76,14 @@ jobs:
6876
echo 'QEMU_ARCH=aarch64' >> $GITHUB_ENV
6977
echo 'QEMU_MACHINE=virt' >> $GITHUB_ENV
7078
echo 'QEMU_CPU=cortex-a72' >> $GITHUB_ENV
79+
- if: matrix.arch == 'ppc64le'
80+
run: |
81+
echo 'MAKE_ARCH=ARCH=powerpc' >> $GITHUB_ENV
82+
echo 'MAKE_CROSS_COMPILE=CROSS_COMPILE=powerpc64le-linux-gnu-' >> $GITHUB_ENV
83+
echo 'IMAGE_PATH=vmlinux' >> $GITHUB_ENV
84+
echo 'QEMU_ARCH=ppc64' >> $GITHUB_ENV
85+
echo 'QEMU_MACHINE=pseries' >> $GITHUB_ENV
86+
echo 'QEMU_CPU=POWER9' >> $GITHUB_ENV
7187
7288
- if: matrix.toolchain == 'clang'
7389
run: echo 'MAKE_TOOLCHAIN=CC=clang-11' >> $GITHUB_ENV
@@ -94,6 +110,8 @@ jobs:
94110
# Setup: GCC
95111
- if: matrix.arch == 'arm64'
96112
run: sudo apt-get install -y gcc-aarch64-linux-gnu
113+
- if: matrix.arch == 'ppc64le'
114+
run: sudo apt-get install -y gcc-powerpc64le-linux-gnu
97115

98116
# Setup: libelf
99117
- run: sudo apt-get install -y libelf-dev
@@ -103,6 +121,8 @@ jobs:
103121
run: sudo apt-get install -y qemu-system-x86
104122
- if: matrix.arch == 'arm64'
105123
run: sudo apt-get install -y qemu-system-arm
124+
- if: matrix.arch == 'ppc64le'
125+
run: sudo apt-get install -y qemu-system-ppc64
106126

107127
# Setup: rustc
108128
- if: matrix.install == 'rustup'
@@ -164,6 +184,7 @@ jobs:
164184
-cpu ${{ env.QEMU_CPU }} \
165185
-smp 2 \
166186
-nographic \
187+
-vga none \
167188
-no-reboot \
168189
-append '${{ env.QEMU_APPEND }} \
169190
rust_example.my_i32=123321 \

0 commit comments

Comments
 (0)