mirror of
https://github.com/revyos/th1520-vendor-uboot.git
synced 2026-06-21 09:02:25 +02:00
121 lines
5.4 KiB
YAML
121 lines
5.4 KiB
YAML
name: th1520-vendor-uboot-build
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- '*'
|
|
branches:
|
|
- '*'
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
mainline_toolchain: https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2024.04.12
|
|
mainline_toolchain_file_name: riscv64-glibc-ubuntu-22.04-gcc-nightly-2024.04.12-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-
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-22.04
|
|
|
|
steps:
|
|
- name: Install software
|
|
run: |
|
|
sudo apt update && \
|
|
sudo apt install -y gdisk dosfstools g++-12-riscv64-linux-gnu build-essential \
|
|
libncurses-dev gawk flex bison openssl libssl-dev tree \
|
|
dkms libelf-dev libudev-dev libpci-dev libiberty-dev autoconf device-tree-compiler
|
|
|
|
- name: Checkout uboot
|
|
uses: actions/checkout@v6
|
|
|
|
- name: uboot compile
|
|
run: |
|
|
mkdir output
|
|
${wget_alias} ${mainline_toolchain}/${mainline_toolchain_file_name}
|
|
tar -xvf ${mainline_toolchain_file_name} -C /opt
|
|
export PATH="/opt/riscv/bin:$PATH"
|
|
${CROSS_COMPILE}gcc -v
|
|
|
|
pushd $PWD
|
|
make light_lpi4a_16g_defconfig
|
|
make -j$(nproc)
|
|
find . -name "u-boot-with-spl.bin" | xargs -I{} cp -av {} ${GITHUB_WORKSPACE}/output/u-boot-with-spl-lpi4a-16g.bin
|
|
make clean
|
|
make light_lpi4a_defconfig
|
|
make -j$(nproc)
|
|
find . -name "u-boot-with-spl.bin" | xargs -I{} cp -av {} ${GITHUB_WORKSPACE}/output/u-boot-with-spl-lpi4a.bin
|
|
make clean
|
|
make light_lpi4a_console_defconfig
|
|
make -j$(nproc)
|
|
find . -name "u-boot-with-spl.bin" | xargs -I{} cp -av {} ${GITHUB_WORKSPACE}/output/u-boot-with-spl-lcon4a.bin
|
|
make clean
|
|
make light_lpi4a_console_16g_defconfig
|
|
make -j$(nproc)
|
|
find . -name "u-boot-with-spl.bin" | xargs -I{} cp -av {} ${GITHUB_WORKSPACE}/output/u-boot-with-spl-lcon4a-16g.bin
|
|
make clean
|
|
make light_lpi4a_plastic_defconfig
|
|
make -j$(nproc)
|
|
find . -name "u-boot-with-spl.bin" | xargs -I{} cp -av {} ${GITHUB_WORKSPACE}/output/u-boot-with-spl-laptop4a.bin
|
|
make clean
|
|
make light_lpi4a_plastic_16g_defconfig
|
|
make -j$(nproc)
|
|
find . -name "u-boot-with-spl.bin" | xargs -I{} cp -av {} ${GITHUB_WORKSPACE}/output/u-boot-with-spl-laptop4a-16g.bin
|
|
make clean
|
|
make light_lpi4a_pocket_defconfig
|
|
make -j$(nproc)
|
|
find . -name "u-boot-with-spl.bin" | xargs -I{} cp -av {} ${GITHUB_WORKSPACE}/output/u-boot-with-spl-pocket4a.bin
|
|
make clean
|
|
make light_lpi4a_cluster_defconfig
|
|
make -j$(nproc)
|
|
find . -name "u-boot-with-spl.bin" | xargs -I{} cp -av {} ${GITHUB_WORKSPACE}/output/u-boot-with-spl-lc4a.bin
|
|
make clean
|
|
make light_lpi4a_cluster_16g_defconfig
|
|
make -j$(nproc)
|
|
find . -name "u-boot-with-spl.bin" | xargs -I{} cp -av {} ${GITHUB_WORKSPACE}/output/u-boot-with-spl-lc4a-16g.bin
|
|
make clean
|
|
make light_beagle_defconfig
|
|
make -j$(nproc)
|
|
find . -name "u-boot-with-spl.bin" | xargs -I{} cp -av {} ${GITHUB_WORKSPACE}/output/u-boot-with-spl-beagle.bin
|
|
make clean
|
|
make light_a_val_defconfig
|
|
make -j$(nproc)
|
|
find . -name "u-boot-with-spl.bin" | xargs -I{} cp -av {} ${GITHUB_WORKSPACE}/output/u-boot-with-spl-vala.bin
|
|
make clean
|
|
make light_milkv_meles_16g_defconfig
|
|
make -j$(nproc)
|
|
find . -name "u-boot-with-spl.bin" | xargs -I{} cp -av {} ${GITHUB_WORKSPACE}/output/u-boot-with-spl-meles-16g.bin
|
|
make clean
|
|
make light_milkv_meles_dualrank_defconfig
|
|
make -j$(nproc)
|
|
find . -name "u-boot-with-spl.bin" | xargs -I{} cp -av {} ${GITHUB_WORKSPACE}/output/u-boot-with-spl-meles.bin
|
|
make clean
|
|
make light_milkv_meles_singlerank_defconfig
|
|
make -j$(nproc)
|
|
find . -name "u-boot-with-spl.bin" | xargs -I{} cp -av {} ${GITHUB_WORKSPACE}/output/u-boot-with-spl-meles-4g.bin
|
|
|
|
# 8g emmc support
|
|
sed -i 's/name=swap,size=4096MiB,type=swap/name=swap,size=2MiB,type=swap/' include/configs/light-c910.h
|
|
make clean
|
|
make light_lpi4a_defconfig
|
|
make -j$(nproc)
|
|
find . -name "u-boot-with-spl.bin" | xargs -I{} cp -av {} ${GITHUB_WORKSPACE}/output/u-boot-with-spl-lpi4a_8gemmc.bin
|
|
popd
|
|
tree ${GITHUB_WORKSPACE}/output
|
|
|
|
- name: 'Upload Artifact'
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: th1520-uboot
|
|
path: output/*.bin
|
|
retention-days: 30
|
|
|
|
- name: 'Create release by tag'
|
|
uses: softprops/action-gh-release@v3
|
|
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
|
with:
|
|
files: output/*.bin
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|