k230d default boot nuttex and linux #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: k230d-build | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
env: | |
xt64_toolchain: https://occ-oss-prod.oss-cn-hangzhou.aliyuncs.com/resource//1721095219235 | |
xt64_toolchain_file_name: Xuantie-900-gcc-linux-6.6.0-glibc-x86_64-V2.10.1-20240712.tar.gz | |
rv64ilp32_toolchain: https://github.com/ruyisdk/riscv-gnu-toolchain-rv64ilp32/releases/download/2024.06.25 | |
rv64ilp32_toolchain_file_name: riscv64ilp32-elf-ubuntu-22.04-gcc-nightly-2024.06.25-nightly.tar.gz | |
ARCH: riscv | |
jobs: | |
build: | |
name: Build Image | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
conf: [k230d_canmv_ilp32_defconfig, k230d_canmv_lp64_defconfig] | |
steps: | |
- name: Install software | |
run: | | |
sudo apt update && \ | |
sudo apt-get install -y git sed make binutils build-essential diffutils gcc g++ bash patch gzip \ | |
bzip2 perl tar cpio unzip rsync file bc findutils wget libncurses-dev python3 \ | |
libssl-dev gawk cmake bison flex bash-completion | |
- name: Checkout source | |
uses: actions/checkout@v4 | |
- name: Configure toolchains | |
run: | | |
mkdir -p /opt/toolchain | |
wget ${xt64_toolchain}/${xt64_toolchain_file_name} | |
tar -xvf ${xt64_toolchain_file_name} -C /opt/toolchain | |
rm -v ${xt64_toolchain_file_name} | |
if [ x"${{ matrix.conf }}" = x"k230d_canmv_ilp32_defconfig" ]; then | |
mkdir -p /opt/toolchain/riscv64ilp32-elf-ubuntu-22.04-gcc-nightly-2024.06.25 | |
wget ${rv64ilp32_toolchain}/${rv64ilp32_toolchain_file_name} | |
tar -xvf ${rv64ilp32_toolchain_file_name} -C /opt/toolchain/riscv64ilp32-elf-ubuntu-22.04-gcc-nightly-2024.06.25 | |
rm -v ${rv64ilp32_toolchain_file_name} | |
fi | |
- name: Compile | |
run: make CONF=${{ matrix.conf }} | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.conf }}.img.gz | |
path: output/${{ matrix.conf }}/images/sysimage-sdcard.img.gz | |
retention-days: 90 |