Skip to content

Add DTC compiler to deps #5

Add DTC compiler to deps

Add DTC compiler to deps #5

Workflow file for this run

name: Build OpenWrt for Milk-V Vega
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
workflow_dispatch:
inputs:
openwrt_commit:
description: 'OpenWrt commit to build against (default: pinned)'
required: false
jobs:
build:
runs-on: ubuntu-22.04
timeout-minutes: 120
steps:
- name: Checkout port files
uses: actions/checkout@v4
with:
path: vega-port
- name: Free up disk space
run: |
# OpenWrt full build needs ~25 GB
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc \
/usr/local/share/boost /opt/hostedtoolcache/CodeQL
sudo apt-get clean
df -h
- name: Install OpenWrt build deps
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential clang flex bison g++ gawk gcc-multilib g++-multilib \
gettext git libncurses-dev libssl-dev python3-distutils rsync unzip \
zlib1g-dev file wget swig time device-tree-compiler
- name: Build OpenWrt + Milk-V Vega images
run: |
cd vega-port
if [ -n "${{ inputs.openwrt_commit }}" ]; then
export OPENWRT_COMMIT="${{ inputs.openwrt_commit }}"
fi
export JOBS="$(nproc)"
./build.sh
- name: Stage artifacts
run: |
mkdir -p artifacts
cp vega-port/openwrt/bin/targets/milkv_vega/milkv_vega/vega-spl.bin artifacts/
cp vega-port/openwrt/bin/targets/milkv_vega/milkv_vega/openwrt-milkv_vega-*-ubifs-kernel.bin artifacts/
cp vega-port/openwrt/bin/targets/milkv_vega/milkv_vega/openwrt-milkv_vega-*-ubifs-rootfs.ubi artifacts/
ls -la artifacts/
cd artifacts && sha256sum * > SHA256SUMS && cat SHA256SUMS
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: milkv-vega-firmware-${{ github.sha }}
path: artifacts/
retention-days: 30