Commit aa669e63 authored by Natanael Copa's avatar Natanael Copa

main/alpine-conf: backport support for modloopfw option

(cherry picked from commit be41538f)
parent b1b0cf4b
From cf789724141b2a16387328ff336fe9b4aee93485 Mon Sep 17 00:00:00 2001
From: Carlo Landmeter <clandmeter@alpinelinux.org>
Date: Fri, 1 Feb 2019 16:31:14 +0000
Subject: [PATCH] update-kernel: add modloopfw option
modloopfw will add additional firmware to the modloop image
to work around not beeing detected by modinfo.
---
update-kernel.in | 44 +++++++++++++++++++++++++++++++-------------
1 file 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
--
2.20.1
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=alpine-conf
pkgver=3.8.1
pkgrel=2
pkgrel=3
pkgdesc="Alpine configuration management scripts"
url=http://git.alpinelinux.org/cgit/$pkgname
arch="all"
......@@ -10,6 +10,7 @@ depends="openrc>=0.24.1-r6 busybox>=1.26.1-r3"
source="https://dev.alpinelinux.org/archive/alpine-conf/alpine-conf-$pkgver.tar.xz
0001-setup-alpine-setup-ntp-before-repos.patch
0001-update-kernel-include-regulatory-database.patch
0001-update-kernel-add-modloopfw-option.patch
"
builddir="$srcdir"/$pkgname-$pkgver
......@@ -28,4 +29,5 @@ package() {
sha512sums="6aa0f0eaab6ee1ff8f9259d5c4e4634bf6d736a2cb52efb3cbabfdfcdd5dcd81b9fe05073ac16f964e7b74b5006b5f4219b33ab4ff5f984273b3bb48982afd6a alpine-conf-3.8.1.tar.xz
4b1b88b66a0771720e1991534c0d55b17293d0d9c3e4064d4210c2edd2fcbe8f6691bf5336b5492312df6160aad8f17b4bb4f9174efd4bad342472b3ad2a16bc 0001-setup-alpine-setup-ntp-before-repos.patch
544498b30bd57c84521a4fd5fbd45791b9307dcd29532278f45b61fb14d6405b5454e98fb535fd31331793b806ef897e208c3c6f8bc772dbd55ae2c61abcb402 0001-update-kernel-include-regulatory-database.patch"
544498b30bd57c84521a4fd5fbd45791b9307dcd29532278f45b61fb14d6405b5454e98fb535fd31331793b806ef897e208c3c6f8bc772dbd55ae2c61abcb402 0001-update-kernel-include-regulatory-database.patch
65f6f79a841ab661ab5fdd41c5e78f4bb74bbc4b1d252291d64cb9d5afa6853133d562c2069bf138b39407c8a0ecc37697b5d17534ded7b8dab8490be6a13698 0001-update-kernel-add-modloopfw-option.patch"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment