From 4768ba36156f605cf45a4d67a2326b783b639acd Mon Sep 17 00:00:00 2001 From: Miguel Fuertes Date: Sat, 21 Feb 2026 17:05:29 +0100 Subject: [PATCH 1/4] Update workflows and configuration to clone OpenWrt repository without depth and checkout specific commit; add zram support packages. --- .github/workflows/m9s.yml | 3 ++- .github/workflows/mf68e.yml | 3 ++- .github/workflows/uf02.yml | 3 ++- .github/workflows/uz801.yml | 3 ++- devenv/Dockerfile | 3 ++- diffconfig | 2 ++ diffconfig_m9s | 2 ++ diffconfig_mf68e | 2 ++ diffconfig_uf02 | 2 ++ enable_wcn36xx_mac80211.patch | 51 ++++++++++++++++++++--------------- 10 files changed, 47 insertions(+), 27 deletions(-) diff --git a/.github/workflows/m9s.yml b/.github/workflows/m9s.yml index c847315..46ee276 100644 --- a/.github/workflows/m9s.yml +++ b/.github/workflows/m9s.yml @@ -32,7 +32,8 @@ jobs: - name: "Clone OpenWrt source code" run: | df -hT $PWD - git clone --depth=1 --branch "main" https://git.openwrt.org/openwrt/openwrt.git openwrt + git clone https://git.openwrt.org/openwrt/openwrt.git openwrt + git -C openwrt checkout 00ceb1ed1763f7479df6edf92ffada948f0e7d45 - name: Load msm89xx target and packages run: | diff --git a/.github/workflows/mf68e.yml b/.github/workflows/mf68e.yml index 8b06705..c38f97a 100644 --- a/.github/workflows/mf68e.yml +++ b/.github/workflows/mf68e.yml @@ -32,7 +32,8 @@ jobs: - name: "Clone OpenWrt source code" run: | df -hT $PWD - git clone --depth=1 --branch "main" https://git.openwrt.org/openwrt/openwrt.git openwrt + git clone https://git.openwrt.org/openwrt/openwrt.git openwrt + git -C openwrt checkout 00ceb1ed1763f7479df6edf92ffada948f0e7d45 - name: Load msm89xx target and packages run: | diff --git a/.github/workflows/uf02.yml b/.github/workflows/uf02.yml index 45d268e..94177ad 100644 --- a/.github/workflows/uf02.yml +++ b/.github/workflows/uf02.yml @@ -32,7 +32,8 @@ jobs: - name: "Clone OpenWrt source code" run: | df -hT $PWD - git clone --depth=1 --branch "main" https://git.openwrt.org/openwrt/openwrt.git openwrt + git clone https://git.openwrt.org/openwrt/openwrt.git openwrt + git -C openwrt checkout 00ceb1ed1763f7479df6edf92ffada948f0e7d45 - name: Load msm89xx target and packages run: | diff --git a/.github/workflows/uz801.yml b/.github/workflows/uz801.yml index 49e3a87..2a77034 100644 --- a/.github/workflows/uz801.yml +++ b/.github/workflows/uz801.yml @@ -32,7 +32,8 @@ jobs: - name: "Clone OpenWrt source code" run: | df -hT $PWD - git clone --depth=1 --branch "main" https://git.openwrt.org/openwrt/openwrt.git openwrt + git clone https://git.openwrt.org/openwrt/openwrt.git openwrt + git -C openwrt checkout 00ceb1ed1763f7479df6edf92ffada948f0e7d45 - name: Load msm89xx target and packages run: | diff --git a/devenv/Dockerfile b/devenv/Dockerfile index f232ad2..fe26bcc 100644 --- a/devenv/Dockerfile +++ b/devenv/Dockerfile @@ -20,7 +20,8 @@ FROM base AS openwrt ENV BRANCH=main # Clone OpenWrt repository -RUN git clone --depth=1 -b ${BRANCH} https://git.openwrt.org/openwrt/openwrt.git openwrt +RUN git clone https://git.openwrt.org/openwrt/openwrt.git openwrt && \ + git -C openwrt checkout 00ceb1ed1763f7479df6edf92ffada948f0e7d45 # Apply patch inside openwrt directory COPY enable_wcn36xx_mac80211.patch . diff --git a/diffconfig b/diffconfig index 973cd4a..2fd4394 100644 --- a/diffconfig +++ b/diffconfig @@ -89,4 +89,6 @@ CONFIG_PACKAGE_ucode-mod-math=y CONFIG_PACKAGE_uhttpd=y CONFIG_PACKAGE_uhttpd-mod-ubus=y CONFIG_PACKAGE_wireguard-tools=y +CONFIG_PACKAGE_kmod-zram=y +CONFIG_PACKAGE_zram-swap=y # CONFIG_TARGET_ROOTFS_EXT4FS is not set diff --git a/diffconfig_m9s b/diffconfig_m9s index 3664dda..16da736 100644 --- a/diffconfig_m9s +++ b/diffconfig_m9s @@ -91,4 +91,6 @@ CONFIG_PACKAGE_ucode-mod-math=y CONFIG_PACKAGE_uhttpd=y CONFIG_PACKAGE_uhttpd-mod-ubus=y CONFIG_PACKAGE_wireguard-tools=y +CONFIG_PACKAGE_kmod-zram=y +CONFIG_PACKAGE_zram-swap=y # CONFIG_TARGET_ROOTFS_EXT4FS is not set diff --git a/diffconfig_mf68e b/diffconfig_mf68e index 3210102..afe5360 100644 --- a/diffconfig_mf68e +++ b/diffconfig_mf68e @@ -91,4 +91,6 @@ CONFIG_PACKAGE_ucode-mod-math=y CONFIG_PACKAGE_uhttpd=y CONFIG_PACKAGE_uhttpd-mod-ubus=y CONFIG_PACKAGE_wireguard-tools=y +CONFIG_PACKAGE_kmod-zram=y +CONFIG_PACKAGE_zram-swap=y # CONFIG_TARGET_ROOTFS_EXT4FS is not set diff --git a/diffconfig_uf02 b/diffconfig_uf02 index c22f17f..fd15b58 100644 --- a/diffconfig_uf02 +++ b/diffconfig_uf02 @@ -92,4 +92,6 @@ CONFIG_PACKAGE_ucode-mod-math=y CONFIG_PACKAGE_uhttpd=y CONFIG_PACKAGE_uhttpd-mod-ubus=y CONFIG_PACKAGE_wireguard-tools=y +CONFIG_PACKAGE_kmod-zram=y +CONFIG_PACKAGE_zram-swap=y # CONFIG_TARGET_ROOTFS_EXT4FS is not set diff --git a/enable_wcn36xx_mac80211.patch b/enable_wcn36xx_mac80211.patch index e3ab51f..c05d307 100644 --- a/enable_wcn36xx_mac80211.patch +++ b/enable_wcn36xx_mac80211.patch @@ -1,18 +1,16 @@ -diff --git a/oopenwrt/package/kernel/mac80211/ath.mk b/openwrt/package/kernel/mac80211/ath.mk -index 5b13b6a..f8c5edf 100644 +diff --git a/openwrt/package/kernel/mac80211/ath.mk b/openwrt/package/kernel/mac80211/ath.mk --- a/openwrt/package/kernel/mac80211/ath.mk +++ b/openwrt/package/kernel/mac80211/ath.mk -@@ -1,6 +1,7 @@ +@@ -1,6 +1,6 @@ PKG_DRIVERS += \ - ath ath5k ath6kl ath6kl-sdio ath6kl-usb ath9k ath9k-common ath9k-htc ath10k ath10k-smallbuffers \ - ath11k ath11k-ahb ath11k-pci ath12k carl9170 owl-loader ar5523 wil6210 qcom-qmi-helpers + ath ath5k ath6kl ath6kl-sdio ath6kl-usb ath9k ath9k-common ath9k-htc ath10k ath10k-sdio ath10k-smallbuffers \ + ath11k ath11k-ahb ath11k-pci ath12k carl9170 owl-loader ar5523 wil6210 wcn36xx qcom-qmi-helpers -+ - + PKG_CONFIG_DEPENDS += \ CONFIG_PACKAGE_ATH_DEBUG \ -@@ -25,7 +26,8 @@ ifdef CONFIG_PACKAGE_MAC80211_DEBUGFS +@@ -25,7 +25,8 @@ CARL9170_DEBUGFS \ ATH5K_DEBUG \ ATH6KL_DEBUG \ @@ -20,18 +18,18 @@ index 5b13b6a..f8c5edf 100644 + WIL6210_DEBUGFS \ + WCN36XX_DEBUGFS endif - + ifdef CONFIG_PACKAGE_MAC80211_TRACING -@@ -40,7 +42,7 @@ ifdef CONFIG_PACKAGE_MAC80211_TRACING +@@ -40,7 +41,7 @@ endif - + config-$(call config_package,qcom-qmi-helpers) += QCOM_QMI_HELPERS -config-$(call config_package,ath,regular smallbuffers) += ATH_CARDS ATH_COMMON +config-$(call config_package,ath,regular sdio smallbuffers) += ATH_CARDS ATH_COMMON config-$(CONFIG_PACKAGE_ATH_DEBUG) += ATH_DEBUG ATH10K_DEBUG ATH11K_DEBUG ATH12K_DEBUG ATH9K_STATION_STATISTICS config-$(CONFIG_PACKAGE_ATH_DFS) += ATH9K_DFS_CERTIFIED ATH10K_DFS_CERTIFIED config-$(CONFIG_PACKAGE_ATH_SPECTRAL) += ATH9K_COMMON_SPECTRAL ATH10K_SPECTRAL ATH11K_SPECTRAL -@@ -50,6 +52,7 @@ config-$(call config_package,ath9k-common) += ATH9K_COMMON +@@ -50,6 +51,7 @@ config-$(call config_package,owl-loader) += ATH9K_PCI_NO_EEPROM config-$(CONFIG_TARGET_ath79) += ATH9K_AHB config-$(CONFIG_TARGET_ipq40xx) += ATH10K_AHB @@ -39,15 +37,15 @@ index 5b13b6a..f8c5edf 100644 config-$(CONFIG_PCI) += ATH9K_PCI config-$(CONFIG_ATH_USER_REGD) += ATH_USER_REGD ATH_REG_DYNAMIC_USER_REG_HINTS config-$(CONFIG_ATH9K_HWRNG) += ATH9K_HWRNG -@@ -62,6 +65,7 @@ config-$(CONFIG_ATH11K_THERMAL) += ATH11K_THERMAL - +@@ -62,6 +64,7 @@ + config-$(call config_package,ath9k-htc) += ATH9K_HTC config-$(call config_package,ath10k,regular) += ATH10K ATH10K_PCI +config-$(call config_package,ath10k-sdio,sdio) += ATH10K ATH10K_SDIO config-$(call config_package,ath10k-smallbuffers,smallbuffers) += ATH10K ATH10K_PCI ATH10K_SMALLBUFFERS config-$(call config_package,ath11k) += ATH11K config-$(call config_package,ath11k-ahb) += ATH11K_AHB -@@ -140,7 +144,7 @@ endef +@@ -140,7 +143,7 @@ define KernelPackage/ath $(call KernelPackage/mac80211/Default) TITLE:=Atheros common driver part @@ -56,16 +54,25 @@ index 5b13b6a..f8c5edf 100644 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath.ko MENU:=1 endef -@@ -294,10 +298,30 @@ define KernelPackage/ath10k/config - +@@ -295,11 +298,12 @@ + config ATH10K_LEDS + bool "Enable LED support" + default y +- depends on PACKAGE_kmod-ath10k || PACKAGE_kmod-ath10k-smallbuffers ++ depends on PACKAGE_kmod-ath10k || PACKAGE_kmod-ath10k-sdio || PACKAGE_kmod-ath10k-smallbuffers + config ATH10K_THERMAL bool "Enable thermal sensors and throttling support" - depends on PACKAGE_kmod-ath10k || PACKAGE_kmod-ath10k-smallbuffers + default y + depends on PACKAGE_kmod-ath10k || PACKAGE_kmod-ath10k-sdio || PACKAGE_kmod-ath10k-smallbuffers - + endef - + +@@ -310,6 +314,25 @@ + PROVIDES:=@kmod-ath10k-any + endef + +define KernelPackage/ath10k-sdio + $(call KernelPackage/mac80211/Default) + TITLE:=Atheros 802.11ac SDIO wireless cards support @@ -85,13 +92,13 @@ index 5b13b6a..f8c5edf 100644 +Atheros IEEE 802.11ac family of chipsets with SDIO bus. +endef + - define KernelPackage/ath10k-smallbuffers - $(call KernelPackage/ath10k) - TITLE+= (small buffers for low-RAM devices) -@@ -356,6 +380,20 @@ This module adds support for Qualcomm Technologies 802.11ax family of + define KernelPackage/ath11k + $(call KernelPackage/mac80211/Default) + TITLE:=Qualcomm 802.11ax wireless chipset support (common code) +@@ -362,6 +385,20 @@ chipsets with PCI bus. endef - + +define KernelPackage/wcn36xx + $(call KernelPackage/mac80211/Default) + TITLE:=Qualcomm Atheros WCN3660/3680 support From 659dc261b8637a8d5fa0b51790680eff1d906db9 Mon Sep 17 00:00:00 2001 From: Miguel Fuertes Date: Sat, 21 Feb 2026 17:08:35 +0100 Subject: [PATCH 2/4] Add build workflow for OpenWrt with device selection and configuration --- .github/workflows/{m9s.yml => build.yml} | 39 ++++++---- .github/workflows/mf68e.yml | 98 ------------------------ .github/workflows/uf02.yml | 98 ------------------------ .github/workflows/uz801.yml | 98 ------------------------ 4 files changed, 24 insertions(+), 309 deletions(-) rename .github/workflows/{m9s.yml => build.yml} (69%) delete mode 100644 .github/workflows/mf68e.yml delete mode 100644 .github/workflows/uf02.yml delete mode 100644 .github/workflows/uz801.yml diff --git a/.github/workflows/m9s.yml b/.github/workflows/build.yml similarity index 69% rename from .github/workflows/m9s.yml rename to .github/workflows/build.yml index 46ee276..1fc134f 100644 --- a/.github/workflows/m9s.yml +++ b/.github/workflows/build.yml @@ -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 diff --git a/.github/workflows/mf68e.yml b/.github/workflows/mf68e.yml deleted file mode 100644 index c38f97a..0000000 --- a/.github/workflows/mf68e.yml +++ /dev/null @@ -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 diff --git a/.github/workflows/uf02.yml b/.github/workflows/uf02.yml deleted file mode 100644 index 94177ad..0000000 --- a/.github/workflows/uf02.yml +++ /dev/null @@ -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 diff --git a/.github/workflows/uz801.yml b/.github/workflows/uz801.yml deleted file mode 100644 index 2a77034..0000000 --- a/.github/workflows/uz801.yml +++ /dev/null @@ -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 From 3f9966b61b321d44cd82fa10a2f9cb0a313f2343 Mon Sep 17 00:00:00 2001 From: Miguel Fuertes Date: Sat, 21 Feb 2026 18:07:10 +0100 Subject: [PATCH 3/4] Add zram support and update build workflow for OpenWrt --- .github/workflows/build-all.yml | 101 ++++++++++++++++++++++++++++++++ readme.md | 2 +- 2 files changed, 102 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build-all.yml diff --git a/.github/workflows/build-all.yml b/.github/workflows/build-all.yml new file mode 100644 index 0000000..494f196 --- /dev/null +++ b/.github/workflows/build-all.yml @@ -0,0 +1,101 @@ +name: OpenWrt Builder (All Devices) + +on: + repository_dispatch: + workflow_dispatch: + +env: + UPLOAD_FIRMWARE: true + TZ: Europe/Madrid + +jobs: + build: + runs-on: ubuntu-22.04 + + strategy: + fail-fast: false + matrix: + device: [uz801, m9s, mf68e, uf02] + + 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 + + - name: Update and install feeds + run: | + cd openwrt + rm -rf tmp + ./scripts/feeds update -a + ./scripts/feeds install -a + + - name: Load diffconfig + run: | + DEVICE="${{ matrix.device }}" + DIFFCONFIG=$([ "$DEVICE" = "uz801" ] && echo "diffconfig" || echo "diffconfig_${DEVICE}") + [ -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-${{ 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 diff --git a/readme.md b/readme.md index c7dca3a..4bc4651 100644 --- a/readme.md +++ b/readme.md @@ -215,7 +215,7 @@ The modem requires region-specific MCFG configuration files. - Note: Target-specific modules may require building from source via `make menuconfig` - Removed feed: `https://downloads.openwrt.org/snapshots/targets/msm89xx/msm8916/packages/packages.adb` - [ ] Investigate `lpac` for eSIM support -- [ ] Memory expansion: swap/zram configuration +- [x] Memory expansion: `kmod-zram` + `zram-swap` enabled on all devices ## Credits From 97b1d8bc2d68b30800f7bef62a254e9f093d7823 Mon Sep 17 00:00:00 2001 From: Miguel Fuertes Date: Sat, 21 Feb 2026 18:08:38 +0100 Subject: [PATCH 4/4] Add pr_description.md to .gitignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index c5e82d7..728d19a 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -bin \ No newline at end of file +bin +pr_description.md