Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci add linux 5.10 build support #30

Merged
merged 1 commit into from
May 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading