feat: parameterize the sysupgrade url source

This commit is contained in:
Martin Kennedy 2025-07-27 13:15:46 -04:00
parent b8df54eed1
commit ed3c514546
2 changed files with 10 additions and 2 deletions

View File

@ -1,11 +1,14 @@
.PHONY: run
# gluon-ffnm-0.6+exp20250617-extreme-networks-ws-ap3825i-sysupgrade.bin
# openwrt-mpc85xx-p1020-extreme-networks_ws-ap3825i-initramfs-kernel.bin
run0: ./ap3825i.expect
env \
LAN_PORT=lan14 \
SERIAL_PORT=/dev/ttyUSB0 \
MACHINE_ADDRESS=192.168.0.2 \
INITRAMFS_FILENAME=openwrt-mpc85xx-p1020-extreme-networks_ws-ap3825i-initramfs-kernel.bin \
SYSUPGRADE_URL=https://downloads.laboratoryb.org/nwm/gluon/gluon-ffnm-0.6+exp20250617-extreme-networks-ws-ap3825i-sysupgrade.bin \
OUTPUT_LOG_FILE=$(shell date +%Y-%m-%d_%H-%M-%S).date.log \
./ap3825i.expect
@ -15,6 +18,7 @@ run1: ./ap3825i.expect
SERIAL_PORT=/dev/ttyUSB1 \
MACHINE_ADDRESS=192.168.0.3 \
INITRAMFS_FILENAME=openwrt-mpc85xx-p1020-extreme-networks_ws-ap3825i-initramfs-kernel.bin \
SYSUPGRADE_URL=https://downloads.laboratoryb.org/nwm/gluon/gluon-ffnm-0.6+exp20250617-extreme-networks-ws-ap3825i-sysupgrade.bin \
OUTPUT_LOG_FILE=$(shell date +%Y-%m-%d_%H-%M-%S).date.log \
./ap3825i.expect
@ -24,6 +28,7 @@ run2: ./ap3825i.expect
SERIAL_PORT=/dev/ttyUSB2 \
MACHINE_ADDRESS=192.168.0.4 \
INITRAMFS_FILENAME=openwrt-mpc85xx-p1020-extreme-networks_ws-ap3825i-initramfs-kernel.bin \
SYSUPGRADE_URL=https://downloads.laboratoryb.org/nwm/gluon/gluon-ffnm-0.6+exp20250617-extreme-networks-ws-ap3825i-sysupgrade.bin \
OUTPUT_LOG_FILE=$(shell date +%Y-%m-%d_%H-%M-%S).date.log \
./ap3825i.expect
@ -33,6 +38,7 @@ run3: ./ap3825i.expect
SERIAL_PORT=/dev/ttyUSB3 \
MACHINE_ADDRESS=192.168.0.5 \
INITRAMFS_FILENAME=openwrt-mpc85xx-p1020-extreme-networks_ws-ap3825i-initramfs-kernel.bin \
SYSUPGRADE_URL=https://downloads.laboratoryb.org/nwm/gluon/gluon-ffnm-0.6+exp20250617-extreme-networks-ws-ap3825i-sysupgrade.bin \
OUTPUT_LOG_FILE=$(shell date +%Y-%m-%d_%H-%M-%S).date.log \
./ap3825i.expect

View File

@ -76,8 +76,10 @@ expect {
"Please press Enter to activate this console." {
send "\n"
sleep 5
reliable_send {while true; do sysupgrade https://downloads.openwrt.org/releases/23.05.2/targets/mpc85xx/p1020/openwrt-23.05.2-mpc85xx-p1020-extreme-networks_ws-ap3825i-squashfs-sysupgrade.bin; done
}
reliable_send {while true; do sysupgrade }
reliable_send "$env(SYSUPGRADE_URL)"
reliable_send {; done}
reliable_send "\n"
}
}