summaryrefslogtreecommitdiff
path: root/data/live-build-config
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-11-11 16:39:40 +0100
committerChristian Poessinger <christian@poessinger.com>2019-11-11 16:39:50 +0100
commit9986845896f64f6a3b5556519fb26b678b59d1be (patch)
tree301de29dd77239eb2751e7aba30e1c3856518b2b /data/live-build-config
parentbbf03fbde865234082637681c34f1904f980a32c (diff)
downloadvyos-build-9986845896f64f6a3b5556519fb26b678b59d1be.tar.gz
vyos-build-9986845896f64f6a3b5556519fb26b678b59d1be.zip
hooks: synchronize Linux Firmware with current branch
Imported from commit 2382c90dc7a30d17628a11f9ff41f8c63867887a
Diffstat (limited to 'data/live-build-config')
-rwxr-xr-xdata/live-build-config/hooks/live/40-linux-firmware.chroot21
1 files changed, 14 insertions, 7 deletions
diff --git a/data/live-build-config/hooks/live/40-linux-firmware.chroot b/data/live-build-config/hooks/live/40-linux-firmware.chroot
index cd944faf..d3f34dec 100755
--- a/data/live-build-config/hooks/live/40-linux-firmware.chroot
+++ b/data/live-build-config/hooks/live/40-linux-firmware.chroot
@@ -2,15 +2,22 @@
# To get the possibility of reproducible builds we pin to a specific commit
# of the linux-firmware repository
-COMMIT="7bc246451318b3536d9bfd3c4e46d541a9831b33"
+COMMIT="aa95e90b2c638f1ca6647d12b2d1b18284428f9c"
-echo I: Retrieving Linux Firmware - commit ${COMMIT}
+echo "I: Retrieving Linux Firmware - commit ${COMMIT}"
-curl -o /tmp/linux-firmware-${COMMIT}.tar.gz \
- https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/snapshot/linux-firmware-${COMMIT}.tar.gz
-tar xf /tmp/linux-firmware-${COMMIT}.tar.gz -C /lib
-mv /lib/linux-firmware-${COMMIT} /lib/firmware
-rm -f /tmp/linux-firmware-${COMMIT}.tar.gz
+ret=$(curl -w "%{http_code}" -o /tmp/linux-firmware-${COMMIT}.tar.gz \
+ https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/snapshot/linux-firmware-${COMMIT}.tar.gz)
+
+if [ "${ret}" != "200" ]; then
+ echo E: Received HTTP error code \"${ret}\" when downloading Linux Firmware ...
+ exit 1
+fi
+
+tar xf /tmp/linux-firmware-${COMMIT}.tar.gz -C /tmp
+mkdir -p /lib/firmware
+mv /tmp/linux-firmware-${COMMIT}/* /lib/firmware
+rm -rf /tmp/linux-firmware-${COMMIT}*
# We do not need all firmware blobs .. cleanup
RM_FIRMWARE=" \