Skip to content

chore: use core-image-minimal instead of core-image-full-cmdline #32

chore: use core-image-minimal instead of core-image-full-cmdline

chore: use core-image-minimal instead of core-image-full-cmdline #32

Workflow file for this run

name: mkimg-k230-ci
on:
push:
tags:
- '*'
branches:
- '*'
pull_request:
workflow_dispatch:
env:
xuantie_toolchain: https://occ-oss-prod.oss-cn-hangzhou.aliyuncs.com/resource//1698113812618
toolchain_file_name: Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-20231018.tar.gz
mainline_toolchain: https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2023.10.18
mainline_toolchain_file_name: riscv64-glibc-ubuntu-22.04-gcc-nightly-2023.10.18-nightly.tar.gz
rv64ilp32_toolchain: https://github.com/ruyisdk/riscv-gnu-toolchain-rv64ilp32/releases/download/2024.02.25
rv64ilp32_toolchain_file_name: riscv64ilp32-elf-ubuntu-22.04-gcc-nightly-2024.02.25-nightly.tar.gz
wget_alias: 'wget --retry-connrefused --waitretry=1 --read-timeout=20 --timeout=15 -t 0'
ARCH: riscv
CROSS_COMPILE: riscv64-unknown-linux-gnu-
KBUILD_BUILD_USER: ruyisdk
KBUILD_BUILD_HOST: ruyisdk-riscv-builder
GIT_USER: ruyisdk
GIT_EMAIL: "[email protected]"
KDEB_COMPRESS: xz
KDEB_CHANGELOG_DIST: unstable
OUTPUT: output
RV64ILP32_TOOLCHAIN_HOME: /opt/rv64ilp32/
UBOOT_RV64_REVERT_COMMIT: "05c93ec8ffeeb5461f6c06b1f56b52607a699e19"
jobs:
mkrootfs:
strategy:
fail-fast: false
matrix:
model: [canmv, evb]
distro: [yocto_rv32, fedora_rv32]
abi: [rv64ilp32, rv64]
runs-on: ubuntu-22.04
env:
BOARD: ${{ matrix.model }}
DISTRO: ${{ matrix.distro }}
ABI: ${{ matrix.abi }}
steps:
- name: Install Software
run: |
sudo apt update && \
sudo apt install -y gdisk dosfstools build-essential autoconf automake autotools-dev ninja-build make \
libncurses-dev gawk flex bison openssl libssl-dev tree \
qemu-user-static binfmt-support mmdebstrap zstd libconfuse-dev mtools debian-keyring debian-archive-keyring
${wget_alias} ${mainline_toolchain}/${mainline_toolchain_file_name}
tar -xvf ${mainline_toolchain_file_name} -C /opt
rm -rf ${mainline_toolchain_file_name}
mkdir -p ${RV64ILP32_TOOLCHAIN_HOME}
${wget_alias} ${rv64ilp32_toolchain}/${rv64ilp32_toolchain_file_name}
tar -xvf ${rv64ilp32_toolchain_file_name} -C ${RV64ILP32_TOOLCHAIN_HOME}
rm -rf ${rv64ilp32_toolchain_file_name}
export PATH="/opt/riscv/bin:$PATH"
echo "PATH=${PATH}" >> $GITHUB_ENV
- name: Configure git global config
run: |
git config --global user.name ${GIT_USER}
git config --global user.email ${GIT_EMAIL}
- name: Checkout genimage
uses: actions/checkout@v4
with:
repository: pengutronix/genimage
path: genimage
ref: v17
- name: build genimage
run: |
pushd genimage
./autogen.sh
./configure
make -j$(nproc)
sudo make install
popd
- name: Checkout Repo
uses: actions/checkout@v4
with:
submodules: true
lfs: true
- name: Make Image
run: |
bash ./build.sh build all
- name: Make Checksum file & Compress files
run: |
pushd ${OUTPUT}
mv sysimage-sdcard*.img k230-sdcard-${{ env.DISTRO }}-${{ env.BOARD }}-${{ env.ABI }}.img
sha256sum k230-sdcard-${{ env.DISTRO }}-${{ env.BOARD }}-${{ env.ABI }}.img k230_${{ env.BOARD }}_${{ env.ABI }}.bin > SHA256SUMS
sha512sum k230-sdcard-${{ env.DISTRO }}-${{ env.BOARD }}-${{ env.ABI }}.img k230_${{ env.BOARD }}_${{ env.ABI }}.bin > SHA512SUMS
zstd k230-sdcard-${{ env.DISTRO }}-${{ env.BOARD }}-${{ env.ABI }}.img
popd
- name: 'Upload Artifact'
uses: actions/upload-artifact@v4
with:
retention-days: 30
name: k230-sdcard-${{ env.DISTRO }}-${{ env.BOARD }}-${{ env.ABI }}
path: |
${{ env.OUTPUT }}/k230-sdcard-${{ env.DISTRO }}-${{ env.BOARD }}-${{ env.ABI }}.img
${{ env.OUTPUT }}/k230_${{ env.BOARD }}_${{ env.ABI }}.bin
${{ env.OUTPUT }}/SHA256SUMS
${{ env.OUTPUT }}/SHA512SUMS
- name: 'Create release by tag'
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
${{ env.OUTPUT }}/*.img.zst
token: ${{ secrets.GITHUB_TOKEN }}