Skip to content

Commit

Permalink
ci: add kernel 5.10 and opensbi 0.9 build support
Browse files Browse the repository at this point in the history
Signed-off-by: Qinghao Shi <shiqinghao.sqh@alibaba-inc.com>
  • Loading branch information
jamesbeyond authored and guoren83 committed May 19, 2024
1 parent 0349e2d commit 85d33a8
Showing 1 changed file with 42 additions and 1 deletion.
43 changes: 42 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,14 @@ jobs:
toolchain_tripe: riscv64-unknown-linux-gnu-
- name: linux-64ilp32
toolchain_tripe: riscv64-unknown-elf-
- name: linux-5.10-64lp64
toolchain_tripe: riscv64-unknown-linux-gnu-
- name: opensbi-64lp64
toolchain_tripe: riscv64-unknown-linux-gnu-
- name: opensbi-32ilp32
toolchain_tripe: riscv32-unknown-linux-gnu-
- name: opensbi-0.9-64lp64
toolchain_tripe: riscv64-unknown-linux-gnu-

runs-on: ubuntu-22.04
env:
Expand Down Expand Up @@ -87,6 +91,12 @@ jobs:
tar -xvf ${rv64ilp32_toolchain_file_name} -C /opt
rm -v ${rv64ilp32_toolchain_file_name}
fi
if [ x"${{ matrix.name }}" = x"linux-5.10-64lp64" ]; then
wget ${xt64_toolchain}/${xt64_toolchain_file_name}
tar -xvf ${xt64_toolchain_file_name} -C /opt
mv /opt/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.6.2 /opt/riscv
rm -v ${xt64_toolchain_file_name}
fi
if [ x"${{ matrix.name }}" = x"opensbi-64lp64" ]; then
wget ${rv64_toolchain}/${rv64_toolchain_file_name}
tar -xvf ${rv64_toolchain_file_name} -C /opt
Expand All @@ -97,6 +107,12 @@ jobs:
tar -xvf ${rv32_toolchain_file_name} -C /opt
rm -v ${rv32_toolchain_file_name}
fi
if [ x"${{ matrix.name }}" = x"opensbi-0.9-64lp64" ]; then
wget ${xt64_toolchain}/${xt64_toolchain_file_name}
tar -xvf ${xt64_toolchain_file_name} -C /opt
mv /opt/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.6.2 /opt/riscv
rm -v ${xt64_toolchain_file_name}
fi
- name: Compile
run: |
Expand Down Expand Up @@ -165,6 +181,20 @@ jobs:
cd -
tar czvf ${{ matrix.name }}.tar.gz Image vmlinux git.log modules_install headers_install gdbmacros.txt
fi
if [ x"${{ matrix.name }}" = x"linux-5.10-64lp64" ]; then
export PATH="/opt/riscv/bin:$PATH"
git clone https://github.com/c-sky/csky-linux.git linux
cd linux
git checkout 5daa9f6723047b48a7f07c9e1c9969593e7e9829
echo CONFIG_STD_SVPBMT=y >> arch/riscv/configs/defconfig
make ARCH=riscv EXTRA_CFLAGS+=-g defconfig all INSTALL_MOD_PATH=../modules_install modules_install INSTALL_HDR_PATH=../headers_install headers_install -j$(nproc)
mv arch/riscv/boot/Image ../
mv vmlinux ../
cp Documentation/admin-guide/kdump/gdbmacros.txt ../
git log --oneline -500 > ../git.log
cd -
tar czvf ${{ matrix.name }}.tar.gz Image vmlinux git.log modules_install headers_install gdbmacros.txt
fi
if [ x"${{ matrix.name }}" = x"opensbi-64lp64" ]; then
export PATH="/opt/riscv/bin:$PATH"
git clone https://github.com/riscv-software-src/opensbi.git
Expand All @@ -189,7 +219,18 @@ jobs:
cd -
tar czvf ${{ matrix.name }}.tar.gz fw_dynamic.elf fw_dynamic.bin git.log
fi
if [ x"${{ matrix.name }}" = x"opensbi-0.9-64lp64" ]; then
export PATH="/opt/riscv/bin:$PATH"
git clone https://github.com/c-sky/opensbi.git
cd opensbi
git checkout 89182b257c8798e15e4c685c1af0c2862d528d2a
make PLATFORM=generic -j
mv build/platform/generic/firmware/fw_dynamic.bin ../
mv build/platform/generic/firmware/fw_dynamic.elf ../
git log --oneline -500 > ../git.log
cd -
tar czvf ${{ matrix.name }}.tar.gz fw_dynamic.elf fw_dynamic.bin git.log
fi
- name: 'Upload Artifact'
uses: actions/upload-artifact@v4
with:
Expand Down

0 comments on commit 85d33a8

Please sign in to comment.