1
1
Files
zyxel-vmg8825_b50b-cfw/build.sh
T
2026-04-19 18:32:26 +02:00

28 lines
888 B
Bash
Executable File

#!/bin/bash
set -e
IMAGE_NAME="zyxel-openwrt-builder"
CONTAINER_NAME="openwrt-builder-container"
FIRMWARE_PATH="/home/builder/openwrt/bin/brcm963xx/zyxel/ras.bin"
echo "Building Docker image ${IMAGE_NAME}..."
docker build -t ${IMAGE_NAME} .
echo "Starting container..."
docker run --cpus="1" -it --name ${CONTAINER_NAME} \
-e TERM=vt100 \
${IMAGE_NAME} \
/bin/bash -c "cd /home/builder/openwrt && make -j1 V=sc"
docker cp ${CONTAINER_NAME}:.config ./.config-build
docker cp ${CONTAINER_NAME}:defconfig.log ./defconfig-build.log
docker cp ${CONTAINER_NAME}:${FIRMWARE_PATH} ./build/ras.bin 2>/dev/null || {
echo "ERROR: Firmware not found at ${FIRMWARE_PATH}"
echo "The build may have failed or the output path is not ${FIRMWARE_PATH}"
echo "You can inspect the container manually: docker start -ai ${CONTAINER_NAME}"
exit 1
}
echo "Firmware copied to ./build/ras.bin"