Merge branch 'main' into firmware_loader

This commit is contained in:
Miguel Fuertes committed 2025-09-20 09:39:08 +02:00
commit e7320fbf12
4 files changed
+37 -40

No files matched your search

+20 -28
View File
@@ -11,9 +11,16 @@ on:
options:
- 'main'
- 'openwrt-24.10'
diffconfig:
description: 'Configuration to use'
required: true
default: 'diffconfig'
type: choice
options:
- 'diffconfig'
- 'diffconfig_tailscale'
env:
CONFIG_FILE: diffconfig
UPLOAD_BIN_DIR: true
UPLOAD_FIRMWARE: true
UPLOAD_RELEASE: false
@@ -38,20 +45,16 @@ jobs:
sudo -E apt-get -qq autoremove --purge
sudo -E apt-get -qq clean
sudo timedatectl set-timezone "$TZ"
sudo mkdir -p /workdir
sudo chown $USER:$GROUPS /workdir
- name: Clone source code
working-directory: /workdir
- name: "Clone source code - Branch: ${{ inputs.openwrt_version }}"
run: |
df -hT $PWD
echo "Cloning OpenWrt version: ${{ inputs.openwrt_version }}"
git clone --depth=1 --branch "${{ inputs.openwrt_version }}" https://git.openwrt.org/openwrt/openwrt.git openwrt
ln -sf /workdir/openwrt $GITHUB_WORKSPACE/openwrt
- name: Load msm89xx target and uz801 packages
run: |
git apply --unsafe-paths --directory=/workdir enable_wcn36xx_mac80211.patch
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
@@ -65,9 +68,9 @@ jobs:
./scripts/feeds update -a
./scripts/feeds install -a
- name: Load config
- name: "Load config - Using: ${{inputs.diffconfig}}"
run: |
[ -f $CONFIG_FILE ] && mv $CONFIG_FILE openwrt/.config
[ -f ${{inputs.diffconfig}} ] && mv ${{inputs.diffconfig}} openwrt/.config
- name: Download package
id: package
@@ -89,17 +92,6 @@ jobs:
[ -s DEVICE_NAME ] && echo "DEVICE_NAME=$(cat DEVICE_NAME)" >> $GITHUB_ENV
echo "FILE_DATE=$(date +"%Y%m%d%H%M")" >> $GITHUB_ENV
- name: Check space usage
if: (!cancelled())
run: df -hT
- name: Upload bin directory
uses: actions/upload-artifact@v4
if: steps.compile.outputs.status == 'success' && env.UPLOAD_BIN_DIR == 'true'
with:
name: openwrt_bin_${{ env.DEVICE_NAME }}_${{ env.FILE_DATE }}
path: openwrt/bin
- name: Organize files
id: organize
if: env.UPLOAD_FIRMWARE == 'true' && !cancelled()
@@ -108,6 +100,7 @@ jobs:
rm -rf packages
echo "FIRMWARE=$PWD" >> $GITHUB_ENV
echo "status=success" >> $GITHUB_OUTPUT
echo "imagebuilder=$(ls -l *imagebuilder* | wc -l)" >> $GITHUB_OUTPUT
- name: Upload firmware
uses: actions/upload-artifact@v4
@@ -119,11 +112,10 @@ jobs:
${{ env.FIRMWARE }}/openwrt-msm89xx-msm8916-yiming-uz801v3-ext4-system.img
${{ env.FIRMWARE }}/openwrt-msm89xx-msm8916-yiming-uz801v3.manifest
# - name: Upload image builder
# uses: actions/upload-artifact@v4
# if: steps.organize.outputs.status == 'success' && !cancelled()
# with:
# name: openwrt_imagebuilder_${{ env.DEVICE_NAME }}_${{ env.FILE_DATE }}
# path: |
# ${{ env.FIRMWARE }}/openwrt-msm89xx-msm8916-yiming-uz801v3-ext4-boot.img
# ${{ env.FIRMWARE }}/openwrt-msm89xx-msm8916-yiming-uz801v3-ext4-system.img
- name: Upload image builder
uses: actions/upload-artifact@v4
if: steps.organize.outputs.imagebuilder != '0' && !cancelled()
with:
name: openwrt_imagebuilder_${{ env.DEVICE_NAME }}_${{ env.FILE_DATE }}
path: |
${{ env.FIRMWARE }}/openwrt-imagebuilder-msm89xx-msm8916.Linux-x86_64.tar.zst
+1 -2
View File
@@ -20,5 +20,4 @@ uci add_list firewall.@zone[1].network='modem'
uci commit
/etc/init.d/network restart
apk del uz801-tweaks
exit 0
+13 -8
View File
@@ -1,18 +1,23 @@
#!/bin/sh
# /etc/hotplug.d/ieee80211/99-wifi-led
logger -t smart-leds-wifi "IEEE80211 Event: ACTION=$ACTION DEVICENAME=$DEVICENAME"
case "$ACTION" in
add)
sleep 3
if ip link show phy0-ap0 2>/dev/null | grep -q "UP"; then
logger -t smart-leds "WiFi device added and UP, enabling blue LED"
echo 1 > /sys/class/leds/blue:wan/brightness
if [ "$DEVICENAME" = "phy0" ]; then
sleep 5
if ip link show phy0-ap0 2>/dev/null >/dev/null; then
echo 1 > /sys/class/leds/blue:wan/brightness
logger -t wifi-led "phy0-ap0 exists, blue LED ON"
else
echo 0 > /sys/class/leds/blue:wan/brightness
logger -t wifi-led "phy0-ap0 missing, blue LED OFF"
fi
fi
;;
remove)
logger -t smart-leds "WiFi device removed, disabling blue LED"
echo 0 > /sys/class/leds/blue:wan/brightness
if [ "$DEVICENAME" = "phy0" ]; then
echo 0 > /sys/class/leds/blue:wan/brightness
logger -t wifi-led "phy0 removed, blue LED OFF"
fi
;;
esac
+3 -2
View File
@@ -19,7 +19,7 @@ Modern version of OpenWrt working on UZ801v3:
- TUN installed
- Wireguard Installed
- GRE Protocol Installed
- `init.d` script to manage leds, only on/off if iface, no blinking:
- `hotplug.d` scripts to manage leds, only on/off if iface, no blinking:
- Wifi Led: [packages/uz801-tweaks/files/wifi-led.hotplug](packages/uz801-tweaks/files/wifi-led.hotplug)
- Modem Led: [packages/uz801-tweaks/files/modem-led.hotplug](packages/uz801-tweaks/files/modem-led.hotplug)
@@ -39,11 +39,12 @@ The base partitions are in a folder called `base_partitions` on this repo:
- Put the device in `edl` mode: https://wiki.postmarketos.org/wiki/Zhihe_series_LTE_dongles_(generic-zhihe)#How_to_enter_flash_mode
- Run `cd base_partitions && ./flash.sh`. The script will backup the important partitions specific for your device, will flash everything and will restore de previously saved partitions. During the execution, the script will halt and ask you to drag the boot and rootfs (system) partitions.
After the succesfull flash if you:
After the succesful flash if you:
- Want to enter `fastboot`, just insert the device with the button pressed.
- Want to enter `edl`, boot into fastboot and execute: `fastboot oem reboot-edl`.
### Future:
- GHA/Local build with `imagebuilder`
- Custom package server for msm89xx/msm8916
- Any target specific module not present might require to be built from sources. This repo can be used to do that, run `make menuconfig` before `make -j$(nproc)` and select it from the menu.
- `msm-firmware-loader`, to mount firmware instead of bundle to free up almost 40mb from rootfs.