summaryrefslogtreecommitdiff
path: root/update-kernel.in
diff options
context:
space:
mode:
Diffstat (limited to 'update-kernel.in')
-rw-r--r--update-kernel.in44
1 files changed, 31 insertions, 13 deletions
diff --git a/update-kernel.in b/update-kernel.in
index ef38793..94458e1 100644
--- a/update-kernel.in
+++ b/update-kernel.in
@@ -8,6 +8,8 @@
# Copyright (c) 2014 Timo Teräs
# Copyright (c) 2014-2015 Kaarle Ritvanen
+PREFIX=
+. $PREFIX/lib/libalpine.sh
SCRIPT=update-kernel
VIRTUAL=.tmp-$SCRIPT
@@ -29,6 +31,7 @@ REPOSITORIES_FILE=/etc/apk/repositories
SIGNALS="HUP INT TERM"
TMPDIR=
features=
+modloopfw=
error() {
echo "$SCRIPT: $1" >&2
@@ -44,25 +47,26 @@ usage() {
$SCRIPT -f <flavor> $opts $dest_args
$SCRIPT -b <build_dir> $opts [$dest_args]
- Options: -a|--arch <arch> Install kernel for specified architecture
- -b|--build <build_dir> Install custom-built kernel
- -f|--flavor <flavor> Install kernel of specified flavor
- -F|--feature <feature> Enable initfs feature
- -p|--package <package> Additional module or firmware package
- -s|--modloopsign Sign modloop with abuild key
- -v|--verbose Verbose output
- -k|--apk-pubkey <key> Include given key in initramfs
- -K|--hostkeys Include host keys in initramfs
- -C|--compression Initramfs compression (see mkinitfs for options)
- -M|--media Boot media directory layout
- --repositories-file <f> apk repositories file
+ Options: -a|--arch <arch> Install kernel for specified architecture
+ -b|--build <build_dir> Install custom-built kernel
+ -e|--modloopfw <firmware> Install extra firmware in modloop
+ -f|--flavor <flavor> Install kernel of specified flavor
+ -F|--feature <feature> Enable initfs feature
+ -p|--package <package> Additional module or firmware package
+ -s|--modloopsign Sign modloop with abuild key
+ -v|--verbose Verbose output
+ -k|--apk-pubkey <key> Include given key in initramfs
+ -K|--hostkeys Include host keys in initramfs
+ -C|--compression Initramfs compression (see mkinitfs for options)
+ -M|--media Boot media directory layout
+ --repositories-file <f> apk repositories file
__EOF__
exit $1
}
QUIET_OPT="--quiet"
-OPTS=$(getopt -l arch:,build-dir:,flavor:,feature:,help,package:,modloopsign,verbose,apk-pubkey:,hostkeys,compression:,media,repositories-file: \
+OPTS=$(getopt -l arch:,build-dir:,flavor:,feature:,modloopfw:,help,package:,modloopsign,verbose,apk-pubkey:,hostkeys,compression:,media,repositories-file: \
-n $SCRIPT -o a:b:f:F:hp:svk:KC:M -- "$@") || usage 1
eval set -- "$OPTS"
@@ -84,6 +88,10 @@ while :; do
shift
features="$features $1"
;;
+ -e|--modloopfw)
+ shift
+ modloopfw="$modloopfw $1"
+ ;;
-h|--help)
echo "$SCRIPT @VERSION@" >&2
usage 0
@@ -277,6 +285,16 @@ find $ROOT/lib/modules -type f -name "*.ko" | xargs modinfo -F firmware | sort -
fi
done
+# install extra firmware files in modloop (i.e. not detected by modinfo)
+for _xfw in "$modloopfw"; do
+ if [ -f "$ROOT/lib/firmware/$_xfw" ]; then
+ install -pD "$ROOT/lib/firmware/$_xfw" \
+ "$MODLOOP"/modules/firmware/"$_xfw"
+ else
+ echo "Warning: extra firmware \"$_xfw\" not found!"
+ fi
+done
+
# include bluetooth firmware in modloop
if [ -d "$MODLOOP/modules/firmware/brcm" ]; then
for _btfw in "$ROOT"/lib/firmware/brcm/*.hcd; do