fix: move firmware extraction to docker

This should fix https://github.com/riptidewave93/UNVR-NAS/issues/13 and make building easier across different systems.
This commit is contained in:
Chris Blake 2024-06-19 15:12:13 -05:00
parent 6f01afd72b
commit d1aaa4bccd
4 changed files with 19 additions and 7 deletions

View file

@ -14,13 +14,6 @@ else
mkdir ${build_path}
fi
# Extract the goodies
${scripts_path}/ubnt-fw-parse.py "${root_path}/unifi-firmware/${firmware_filename}" "${build_path}/fw-extract/${firmware_filename%.bin}"
# Extract the squashfs rootfs
echo "Extracting unifi rootfs as root..."
sudo unsquashfs -f -d "${build_path}/fw-extract/${BOARD}-rootfs" "${build_path}/fw-extract/${firmware_filename%.bin}/rootfs.bin"
# Always build to pickup changes/updates/improvements
debug_msg "Building ${docker_tag}"
docker build -t ${docker_tag} ${root_path}