mirror of
https://github.com/riptidewave93/UNVR-NAS.git
synced 2025-03-09 15:40:13 +00:00
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:
parent
6f01afd72b
commit
d1aaa4bccd
4 changed files with 19 additions and 7 deletions
14
scripts/docker/extract_firmware.sh
Executable file
14
scripts/docker/extract_firmware.sh
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
scripts_path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"
|
||||
. ${scripts_path}/vars.sh
|
||||
|
||||
# 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
|
||||
if ! [ -d "${build_path}/fw-extract/${BOARD}-rootfs" ]; then
|
||||
echo "Extracting unifi rootfs as root..."
|
||||
unsquashfs -f -d "${build_path}/fw-extract/${BOARD}-rootfs" "${build_path}/fw-extract/${firmware_filename%.bin}/rootfs.bin"
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue