Add build workflow for OpenWrt with device selection and configuration
This commit is contained in:
1 parent
4768ba3615
commit
659dc261b8
4 files changed
+24
-309
No files matched your search
@@ -1,12 +1,22 @@
|
||||
name: OpenWrt Builder (M9S)
|
||||
name: OpenWrt Builder
|
||||
|
||||
on:
|
||||
repository_dispatch:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
device:
|
||||
description: 'Target device'
|
||||
required: true
|
||||
type: choice
|
||||
default: uz801
|
||||
options:
|
||||
- uz801
|
||||
- m9s
|
||||
- mf68e
|
||||
- uf02
|
||||
|
||||
env:
|
||||
UPLOAD_BIN_DIR: true
|
||||
UPLOAD_FIRMWARE: true
|
||||
UPLOAD_RELEASE: false
|
||||
TZ: Europe/Madrid
|
||||
|
||||
jobs:
|
||||
@@ -29,7 +39,7 @@ jobs:
|
||||
sudo -E apt-get -qq clean
|
||||
sudo timedatectl set-timezone "$TZ"
|
||||
|
||||
- name: "Clone OpenWrt source code"
|
||||
- name: Clone OpenWrt source code
|
||||
run: |
|
||||
df -hT $PWD
|
||||
git clone https://git.openwrt.org/openwrt/openwrt.git openwrt
|
||||
@@ -40,9 +50,6 @@ jobs:
|
||||
git apply --unsafe-paths enable_wcn36xx_mac80211.patch
|
||||
mv msm89xx openwrt/target/linux/msm89xx
|
||||
mv packages openwrt/package/uz801
|
||||
if [ "${{ inputs.openwrt_version }}" == "openwrt-24.10" ]; then
|
||||
sed -i '/^KERNEL_PATCHVER/c\KERNEL_PATCHVER:=6.6' openwrt/target/linux/msm89xx/Makefile
|
||||
fi
|
||||
|
||||
- name: Update and install feeds
|
||||
run: |
|
||||
@@ -51,9 +58,11 @@ jobs:
|
||||
./scripts/feeds update -a
|
||||
./scripts/feeds install -a
|
||||
|
||||
- name: "Load diffconfig"
|
||||
- name: Load diffconfig
|
||||
run: |
|
||||
[ -f diffconfig_m9s ] && mv diffconfig_m9s openwrt/.config
|
||||
DEVICE="${{ inputs.device || 'uz801' }}"
|
||||
DIFFCONFIG=$([ "$DEVICE" = "uz801" ] && echo "diffconfig" || echo "diffconfig_${DEVICE}")
|
||||
[ -f "$DIFFCONFIG" ] && mv "$DIFFCONFIG" openwrt/.config
|
||||
|
||||
- name: Download package
|
||||
id: package
|
||||
@@ -90,9 +99,9 @@ jobs:
|
||||
with:
|
||||
name: openwrt_firmware_${{ env.DEVICE_NAME }}_${{ env.FILE_DATE }}
|
||||
path: |
|
||||
${{ env.FIRMWARE }}/openwrt-msm89xx-msm8916-generic-m9s-squashfs-gpt_both0.bin
|
||||
${{ env.FIRMWARE }}/openwrt-msm89xx-msm8916-generic-m9s-squashfs-boot.img
|
||||
${{ env.FIRMWARE }}/openwrt-msm89xx-msm8916-generic-m9s-squashfs-system.img
|
||||
${{ env.FIRMWARE }}/openwrt-msm89xx-msm8916-generic-m9s.manifest
|
||||
${{ env.FIRMWARE }}/openwrt-msm89xx-msm8916-generic-m9s-flash.sh
|
||||
${{ env.FIRMWARE }}/openwrt-msm89xx-msm8916-generic-m9s-firmware.zip
|
||||
${{ env.FIRMWARE }}/openwrt-msm89xx-msm8916-${{ env.DEVICE_NAME }}-squashfs-gpt_both0.bin
|
||||
${{ env.FIRMWARE }}/openwrt-msm89xx-msm8916-${{ env.DEVICE_NAME }}-squashfs-boot.img
|
||||
${{ env.FIRMWARE }}/openwrt-msm89xx-msm8916-${{ env.DEVICE_NAME }}-squashfs-system.img
|
||||
${{ env.FIRMWARE }}/openwrt-msm89xx-msm8916-${{ env.DEVICE_NAME }}.manifest
|
||||
${{ env.FIRMWARE }}/openwrt-msm89xx-msm8916-${{ env.DEVICE_NAME }}-flash.sh
|
||||
${{ env.FIRMWARE }}/openwrt-msm89xx-msm8916-${{ env.DEVICE_NAME }}-firmware.zip
|
||||
@@ -1,98 +0,0 @@
|
||||
name: OpenWrt Builder (MF68E)
|
||||
on:
|
||||
repository_dispatch:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
UPLOAD_BIN_DIR: true
|
||||
UPLOAD_FIRMWARE: true
|
||||
UPLOAD_RELEASE: false
|
||||
TZ: Europe/Madrid
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Initialization environment
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
run: |
|
||||
sudo rm -rf /etc/apt/sources.list.d/* /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL
|
||||
sudo docker image prune --all --force
|
||||
sudo -E apt-get -qq update
|
||||
sudo -E ./devenv/dependencies.sh
|
||||
sudo -E apt-get -qq autoremove --purge
|
||||
sudo -E apt-get -qq clean
|
||||
sudo timedatectl set-timezone "$TZ"
|
||||
|
||||
- name: "Clone OpenWrt source code"
|
||||
run: |
|
||||
df -hT $PWD
|
||||
git clone https://git.openwrt.org/openwrt/openwrt.git openwrt
|
||||
git -C openwrt checkout 00ceb1ed1763f7479df6edf92ffada948f0e7d45
|
||||
|
||||
- name: Load msm89xx target and packages
|
||||
run: |
|
||||
git apply --unsafe-paths enable_wcn36xx_mac80211.patch
|
||||
mv msm89xx openwrt/target/linux/msm89xx
|
||||
mv packages openwrt/package/uz801
|
||||
if [ "${{ inputs.openwrt_version }}" == "openwrt-24.10" ]; then
|
||||
sed -i '/^KERNEL_PATCHVER/c\KERNEL_PATCHVER:=6.6' openwrt/target/linux/msm89xx/Makefile
|
||||
fi
|
||||
|
||||
- name: Update and install feeds
|
||||
run: |
|
||||
cd openwrt
|
||||
rm -rf tmp
|
||||
./scripts/feeds update -a
|
||||
./scripts/feeds install -a
|
||||
|
||||
- name: "Load diffconfig"
|
||||
run: |
|
||||
[ -f diffconfig_mf68e ] && mv diffconfig_mf68e openwrt/.config
|
||||
|
||||
- name: Download package
|
||||
id: package
|
||||
run: |
|
||||
cd openwrt
|
||||
make defconfig
|
||||
make download -j8
|
||||
find dl -size -1024c -exec ls -l {} \; || true
|
||||
find dl -size -1024c -exec rm -f {} \; || true
|
||||
|
||||
- name: Compile the firmware
|
||||
id: compile
|
||||
run: |
|
||||
cd openwrt
|
||||
echo -e "$(nproc) thread compile"
|
||||
make -j$(nproc) || make -j1 || make -j1 V=s
|
||||
echo "status=success" >> $GITHUB_OUTPUT
|
||||
grep '^CONFIG_TARGET.*DEVICE.*=y' .config | sed -r 's/.*DEVICE_(.*)=y/\1/' > DEVICE_NAME
|
||||
[ -s DEVICE_NAME ] && echo "DEVICE_NAME=$(cat DEVICE_NAME)" >> $GITHUB_ENV
|
||||
echo "FILE_DATE=$(date +"%Y%m%d%H%M")" >> $GITHUB_ENV
|
||||
|
||||
- name: Organize files
|
||||
id: organize
|
||||
if: env.UPLOAD_FIRMWARE == 'true' && !cancelled()
|
||||
run: |
|
||||
cd openwrt/bin/targets/*/*
|
||||
rm -rf packages
|
||||
echo "FIRMWARE=$PWD" >> $GITHUB_ENV
|
||||
echo "status=success" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Upload firmware
|
||||
uses: actions/upload-artifact@v4
|
||||
if: steps.organize.outputs.status == 'success' && !cancelled()
|
||||
with:
|
||||
name: openwrt_firmware_${{ env.DEVICE_NAME }}_${{ env.FILE_DATE }}
|
||||
path: |
|
||||
${{ env.FIRMWARE }}/openwrt-msm89xx-msm8916-generic-mf68e-squashfs-gpt_both0.bin
|
||||
${{ env.FIRMWARE }}/openwrt-msm89xx-msm8916-generic-mf68e-squashfs-boot.img
|
||||
${{ env.FIRMWARE }}/openwrt-msm89xx-msm8916-generic-mf68e-squashfs-system.img
|
||||
${{ env.FIRMWARE }}/openwrt-msm89xx-msm8916-generic-mf68e.manifest
|
||||
${{ env.FIRMWARE }}/openwrt-msm89xx-msm8916-generic-mf68e-flash.sh
|
||||
${{ env.FIRMWARE }}/openwrt-msm89xx-msm8916-generic-mf68e-firmware.zip
|
||||
@@ -1,98 +0,0 @@
|
||||
name: OpenWrt Builder (UF02)
|
||||
on:
|
||||
repository_dispatch:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
UPLOAD_BIN_DIR: true
|
||||
UPLOAD_FIRMWARE: true
|
||||
UPLOAD_RELEASE: false
|
||||
TZ: Europe/Madrid
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Initialization environment
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
run: |
|
||||
sudo rm -rf /etc/apt/sources.list.d/* /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL
|
||||
sudo docker image prune --all --force
|
||||
sudo -E apt-get -qq update
|
||||
sudo -E ./devenv/dependencies.sh
|
||||
sudo -E apt-get -qq autoremove --purge
|
||||
sudo -E apt-get -qq clean
|
||||
sudo timedatectl set-timezone "$TZ"
|
||||
|
||||
- name: "Clone OpenWrt source code"
|
||||
run: |
|
||||
df -hT $PWD
|
||||
git clone https://git.openwrt.org/openwrt/openwrt.git openwrt
|
||||
git -C openwrt checkout 00ceb1ed1763f7479df6edf92ffada948f0e7d45
|
||||
|
||||
- name: Load msm89xx target and packages
|
||||
run: |
|
||||
git apply --unsafe-paths enable_wcn36xx_mac80211.patch
|
||||
mv msm89xx openwrt/target/linux/msm89xx
|
||||
mv packages openwrt/package/uz801
|
||||
if [ "${{ inputs.openwrt_version }}" == "openwrt-24.10" ]; then
|
||||
sed -i '/^KERNEL_PATCHVER/c\KERNEL_PATCHVER:=6.6' openwrt/target/linux/msm89xx/Makefile
|
||||
fi
|
||||
|
||||
- name: Update and install feeds
|
||||
run: |
|
||||
cd openwrt
|
||||
rm -rf tmp
|
||||
./scripts/feeds update -a
|
||||
./scripts/feeds install -a
|
||||
|
||||
- name: "Load diffconfig"
|
||||
run: |
|
||||
[ -f diffconfig_uf02 ] && mv diffconfig_uf02 openwrt/.config
|
||||
|
||||
- name: Download package
|
||||
id: package
|
||||
run: |
|
||||
cd openwrt
|
||||
make defconfig
|
||||
make download -j8
|
||||
find dl -size -1024c -exec ls -l {} \; || true
|
||||
find dl -size -1024c -exec rm -f {} \; || true
|
||||
|
||||
- name: Compile the firmware
|
||||
id: compile
|
||||
run: |
|
||||
cd openwrt
|
||||
echo -e "$(nproc) thread compile"
|
||||
make -j$(nproc) || make -j1 || make -j1 V=s
|
||||
echo "status=success" >> $GITHUB_OUTPUT
|
||||
grep '^CONFIG_TARGET.*DEVICE.*=y' .config | sed -r 's/.*DEVICE_(.*)=y/\1/' > DEVICE_NAME
|
||||
[ -s DEVICE_NAME ] && echo "DEVICE_NAME=$(cat DEVICE_NAME)" >> $GITHUB_ENV
|
||||
echo "FILE_DATE=$(date +"%Y%m%d%H%M")" >> $GITHUB_ENV
|
||||
|
||||
- name: Organize files
|
||||
id: organize
|
||||
if: env.UPLOAD_FIRMWARE == 'true' && !cancelled()
|
||||
run: |
|
||||
cd openwrt/bin/targets/*/*
|
||||
rm -rf packages
|
||||
echo "FIRMWARE=$PWD" >> $GITHUB_ENV
|
||||
echo "status=success" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Upload firmware
|
||||
uses: actions/upload-artifact@v4
|
||||
if: steps.organize.outputs.status == 'success' && !cancelled()
|
||||
with:
|
||||
name: openwrt_firmware_${{ env.DEVICE_NAME }}_${{ env.FILE_DATE }}
|
||||
path: |
|
||||
${{ env.FIRMWARE }}/openwrt-msm89xx-msm8916-generic-uf02-squashfs-gpt_both0.bin
|
||||
${{ env.FIRMWARE }}/openwrt-msm89xx-msm8916-generic-uf02-squashfs-boot.img
|
||||
${{ env.FIRMWARE }}/openwrt-msm89xx-msm8916-generic-uf02-squashfs-system.img
|
||||
${{ env.FIRMWARE }}/openwrt-msm89xx-msm8916-generic-uf02.manifest
|
||||
${{ env.FIRMWARE }}/openwrt-msm89xx-msm8916-generic-uf02-flash.sh
|
||||
${{ env.FIRMWARE }}/openwrt-msm89xx-msm8916-generic-uf02-firmware.zip
|
||||
@@ -1,98 +0,0 @@
|
||||
name: OpenWrt Builder (UZ801)
|
||||
on:
|
||||
repository_dispatch:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
UPLOAD_BIN_DIR: true
|
||||
UPLOAD_FIRMWARE: true
|
||||
UPLOAD_RELEASE: false
|
||||
TZ: Europe/Madrid
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Initialization environment
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
run: |
|
||||
sudo rm -rf /etc/apt/sources.list.d/* /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL
|
||||
sudo docker image prune --all --force
|
||||
sudo -E apt-get -qq update
|
||||
sudo -E ./devenv/dependencies.sh
|
||||
sudo -E apt-get -qq autoremove --purge
|
||||
sudo -E apt-get -qq clean
|
||||
sudo timedatectl set-timezone "$TZ"
|
||||
|
||||
- name: "Clone OpenWrt source code"
|
||||
run: |
|
||||
df -hT $PWD
|
||||
git clone https://git.openwrt.org/openwrt/openwrt.git openwrt
|
||||
git -C openwrt checkout 00ceb1ed1763f7479df6edf92ffada948f0e7d45
|
||||
|
||||
- name: Load msm89xx target and packages
|
||||
run: |
|
||||
git apply --unsafe-paths enable_wcn36xx_mac80211.patch
|
||||
mv msm89xx openwrt/target/linux/msm89xx
|
||||
mv packages openwrt/package/uz801
|
||||
if [ "${{ inputs.openwrt_version }}" == "openwrt-24.10" ]; then
|
||||
sed -i '/^KERNEL_PATCHVER/c\KERNEL_PATCHVER:=6.6' openwrt/target/linux/msm89xx/Makefile
|
||||
fi
|
||||
|
||||
- name: Update and install feeds
|
||||
run: |
|
||||
cd openwrt
|
||||
rm -rf tmp
|
||||
./scripts/feeds update -a
|
||||
./scripts/feeds install -a
|
||||
|
||||
- name: "Load diffconfig"
|
||||
run: |
|
||||
[ -f diffconfig ] && mv diffconfig openwrt/.config
|
||||
|
||||
- name: Download package
|
||||
id: package
|
||||
run: |
|
||||
cd openwrt
|
||||
make defconfig
|
||||
make download -j8
|
||||
find dl -size -1024c -exec ls -l {} \; || true
|
||||
find dl -size -1024c -exec rm -f {} \; || true
|
||||
|
||||
- name: Compile the firmware
|
||||
id: compile
|
||||
run: |
|
||||
cd openwrt
|
||||
echo -e "$(nproc) thread compile"
|
||||
make -j$(nproc) || make -j1 || make -j1 V=s
|
||||
echo "status=success" >> $GITHUB_OUTPUT
|
||||
grep '^CONFIG_TARGET.*DEVICE.*=y' .config | sed -r 's/.*DEVICE_(.*)=y/\1/' > DEVICE_NAME
|
||||
[ -s DEVICE_NAME ] && echo "DEVICE_NAME=$(cat DEVICE_NAME)" >> $GITHUB_ENV
|
||||
echo "FILE_DATE=$(date +"%Y%m%d%H%M")" >> $GITHUB_ENV
|
||||
|
||||
- name: Organize files
|
||||
id: organize
|
||||
if: env.UPLOAD_FIRMWARE == 'true' && !cancelled()
|
||||
run: |
|
||||
cd openwrt/bin/targets/*/*
|
||||
rm -rf packages
|
||||
echo "FIRMWARE=$PWD" >> $GITHUB_ENV
|
||||
echo "status=success" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Upload firmware
|
||||
uses: actions/upload-artifact@v4
|
||||
if: steps.organize.outputs.status == 'success' && !cancelled()
|
||||
with:
|
||||
name: openwrt_firmware_${{ env.DEVICE_NAME }}_${{ env.FILE_DATE }}
|
||||
path: |
|
||||
${{ env.FIRMWARE }}/openwrt-msm89xx-msm8916-yiming-uz801v3-squashfs-gpt_both0.bin
|
||||
${{ env.FIRMWARE }}/openwrt-msm89xx-msm8916-yiming-uz801v3-squashfs-boot.img
|
||||
${{ env.FIRMWARE }}/openwrt-msm89xx-msm8916-yiming-uz801v3-squashfs-system.img
|
||||
${{ env.FIRMWARE }}/openwrt-msm89xx-msm8916-yiming-uz801v3.manifest
|
||||
${{ env.FIRMWARE }}/openwrt-msm89xx-msm8916-yiming-uz801v3-flash.sh
|
||||
${{ env.FIRMWARE }}/openwrt-msm89xx-msm8916-yiming-uz801v3-firmware.zip
|
||||
Reference in new issue
Block a user