aboutsummaryrefslogtreecommitdiffstats
path: root/main/alpine-conf/0001-update-kernel-add-additional-firmware-files.patch
blob: 45f0b321d1e5dc6fd98c6d55ecedee5d444864de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
From 96b29f5dd64111b9d063a327e24247ced02c1427 Mon Sep 17 00:00:00 2001
From: Carlo Landmeter <clandmeter@alpinelinux.org>
Date: Tue, 19 Jun 2018 15:32:51 +0000
Subject: [PATCH] update-kernel: add additional firmware files

---
 update-kernel.in | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/update-kernel.in b/update-kernel.in
index 0d20371..aaf1cff 100644
--- a/update-kernel.in
+++ b/update-kernel.in
@@ -251,8 +251,20 @@ mkdir -p $MODLOOP/modules/firmware
 find $ROOT/lib/modules -type f -name "*.ko" | xargs modinfo -F firmware | sort -u | while read FW; do
 	if [ -e "$ROOT/lib/firmware/$FW" ]; then
 		install -pD $ROOT/lib/firmware/$FW $MODLOOP/modules/firmware/$FW
+		# include nvram files if firmware is needed.
+		[ -e "$ROOT/lib/firmware/${FW%.*}.txt" ] && install -pD \
+		    $ROOT/lib/firmware/${FW%.*}.txt $MODLOOP/modules/firmware/${FW%.*}.txt
 	fi
 done
+
+# include bluetooth firmware in modloop
+if [ -d "$MODLOOP/modules/firmware/brcm" ]; then
+	for _btfw in "$ROOT"/lib/firmware/brcm/*.hcd; do
+		install -pD "$_btfw" \
+			"$MODLOOP"/modules/firmware/brcm/"${_btfw##*/}"
+	done
+fi
+
 mksquashfs $MODLOOP "$STAGING/$MODIMG" -comp xz -exit-on-error
 
 mkinitfs $MKINITFS_ARGS -q -b $ROOT -F "$features base squashfs" \
-- 
2.17.1