Skip to content

Commit

Permalink
ci: Add 64ilp32 build
Browse files Browse the repository at this point in the history
Add 64ilp32 Linux for ci build.

Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
  • Loading branch information
guoren83 committed Feb 21, 2024
1 parent b190d9b commit 5317d95
Showing 1 changed file with 27 additions and 4 deletions.
31 changes: 27 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ on:
env:
xt64_toolchain: https://occ-oss-prod.oss-cn-hangzhou.aliyuncs.com/resource//1695643844189
xt64_toolchain_file_name: Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.6.2-20230916.tar.gz
rv32_toolchain: https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2023.12.20
rv32_toolchain_file_name: riscv32-glibc-ubuntu-22.04-gcc-nightly-2023.12.20-nightly.tar.gz
rv64_toolchain: https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2023.12.20
rv64_toolchain_file_name: riscv64-glibc-ubuntu-22.04-gcc-nightly-2023.12.20-nightly.tar.gz
rv32_toolchain: https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2024.02.02
rv32_toolchain_file_name: riscv32-glibc-ubuntu-22.04-gcc-nightly-2024.02.02-nightly.tar.gz
rv64_toolchain: https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2024.02.02
rv64_toolchain_file_name: riscv64-glibc-ubuntu-22.04-gcc-nightly-2024.02.02-nightly.tar.gz
rv64ilp32_toolchain: https://github.com/ruyisdk/riscv-gnu-toolchain-rv64ilp32/releases/download/2024.02.20
rv64ilp32_toolchain_file_name: riscv64ilp32-elf-ubuntu-22.04-gcc-nightly-2024.02.20-nightly.tar.gz

jobs:
kernel:
Expand All @@ -27,6 +29,8 @@ jobs:
toolchain_tripe: riscv64-unknown-linux-gnu-
- name: linux-64lp64-xt
toolchain_tripe: riscv64-unknown-linux-gnu-
- name: linux-64ilp32
toolchain_tripe: riscv64-unknown-linux-gnu-

runs-on: ubuntu-22.04
env:
Expand All @@ -53,6 +57,11 @@ jobs:
tar -xvf ${rv64_toolchain_file_name} -C /opt
rm -v ${rv64_toolchain_file_name}
fi
if [ x"${{ matrix.name }}" = x"linux-64ilp32" ]; then
wget ${rv64ilp32_toolchain}/${rv64ilp32_toolchain_file_name}
tar -xvf ${rv64ilp32_toolchain_file_name} -C /opt
rm -v ${rv64ilp32_toolchain_file_name}
fi
if [ x"${{ matrix.name }}" = x"linux-64lp64-xt" ]; then
wget ${xt64_toolchain}/${xt64_toolchain_file_name}
tar -xvf ${xt64_toolchain_file_name} -C /opt
Expand All @@ -75,6 +84,20 @@ jobs:
git log --oneline -500 > git.log
tar czvf ${{ matrix.name }}.tar.gz Image vmlinux git.log modules_install headers_install
fi
if [ x"${{ matrix.name }}" = x"linux-64ilp32" ]; then
export PATH="/opt/riscv/bin:$PATH"
echo CONFIG_MMU_SV32=y >> arch/riscv/configs/64ilp32.config
make ARCH=riscv EXTRA_CFLAGS+=-g rv64ilp32_defconfig all INSTALL_MOD_PATH=./modules_install modules_install INSTALL_HDR_PATH=./headers_install headers_install -j$(nproc)
mv arch/riscv/boot/Image ./Image_sv32xt
mv vmlinux vmlinux_sv32xt
mv headers_install headers_install_sv32xt
mv modules_install modules_install_sv32xt
git checkout arch/riscv/configs/64ilp32.config
make ARCH=riscv EXTRA_CFLAGS+=-g rv64ilp32_defconfig all INSTALL_MOD_PATH=./modules_install modules_install INSTALL_HDR_PATH=./headers_install headers_install -j$(nproc)
mv arch/riscv/boot/Image ./
git log --oneline -500 > git.log
tar czvf ${{ matrix.name }}.tar.gz Image vmlinux modules_install headers_install Image_sv32xt vmlinux_sv32xt modules_install_sv32xt headers_install_sv32xt git.log
fi
if [ x"${{ matrix.name }}" = x"linux-64lp64-xt" ]; then
export PATH="/opt/riscv/bin:$PATH"
make ARCH=riscv EXTRA_CFLAGS+=-g defconfig all INSTALL_MOD_PATH=./modules_install modules_install INSTALL_HDR_PATH=./headers_install headers_install -j$(nproc)
Expand Down

0 comments on commit 5317d95

Please sign in to comment.