summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-04-01 18:24:02 +0200
committerChristian Poessinger <christian@poessinger.com>2019-04-04 08:45:46 +0200
commitdce9b82bd1bfa778572ad712ddeab3a7b06d3545 (patch)
treebe1485eabd2aa9ffca65132e49ee5f01f124106b /data
parent1f0b53aa5c6c23610379870c40c57516334dc57e (diff)
downloadvyos-build-dce9b82bd1bfa778572ad712ddeab3a7b06d3545.tar.gz
vyos-build-dce9b82bd1bfa778572ad712ddeab3a7b06d3545.zip
T929: T1274: embed linux firmware through ISO build process
As of now Linux Firmware was installed via vyos-firmware Debian package which just wrapped the Git repositories content. As this just made things harder - install the firmware files via build hook (as the used to be installed like this in the good old days - before the have been removed via 3f7186f69b)
Diffstat (limited to 'data')
-rwxr-xr-xdata/live-build-config/hooks/live/40-linux-firmware.chroot40
1 files changed, 40 insertions, 0 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
new file mode 100755
index 00000000..5f826884
--- /dev/null
+++ b/data/live-build-config/hooks/live/40-linux-firmware.chroot
@@ -0,0 +1,40 @@
+#!/bin/sh
+
+# To get the possibility of reproducible builds we pin to a specific commit
+# of the linux-firmware repository
+COMMIT="7bc246451318b3536d9bfd3c4e46d541a9831b33"
+
+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
+
+# We do not need all firmware blobs .. cleanup
+RM_FIRMWARE=" \
+ v4l-cx* \
+ s5p-mfc* \
+ nvidia \
+ amdgpu \
+ i915 \
+ radeon \
+ matrox \
+ mediatek \
+ qed \
+ sb16 \
+ ti-connectivity \
+ ueagle-atm \
+ dvb-* \
+ v4l-* \
+ i915 \
+ qcom \
+ ctfw-* \
+ ct2fw-* \
+ "
+
+for dir in ${RM_FIRMWARE}
+do
+ rm -rf /lib/firmware/${dir}
+done