diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2019-02-21 20:05:08 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2019-02-21 20:05:08 +0000 |
commit | be41538f0061b406a374564a0043a363efcb0293 (patch) | |
tree | 67d1d1b25058a12be1054f3e80ceabbd8f48d6bc | |
parent | cabb87e13f0df475add5192c8e43e1d68120bf10 (diff) | |
download | aports-be41538f0061b406a374564a0043a363efcb0293.tar.bz2 aports-be41538f0061b406a374564a0043a363efcb0293.tar.xz |
main/alpine-conf: backport support for modloopfw option
-rw-r--r-- | main/alpine-conf/0001-update-kernel-add-modloopfw-option.patch | 103 | ||||
-rw-r--r-- | main/alpine-conf/APKBUILD | 6 |
2 files changed, 107 insertions, 2 deletions
diff --git a/main/alpine-conf/0001-update-kernel-add-modloopfw-option.patch b/main/alpine-conf/0001-update-kernel-add-modloopfw-option.patch new file mode 100644 index 0000000000..b1cb849887 --- /dev/null +++ b/main/alpine-conf/0001-update-kernel-add-modloopfw-option.patch @@ -0,0 +1,103 @@ +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 + diff --git a/main/alpine-conf/APKBUILD b/main/alpine-conf/APKBUILD index 774ef818e7..bcd29be24c 100644 --- a/main/alpine-conf/APKBUILD +++ b/main/alpine-conf/APKBUILD @@ -1,7 +1,7 @@ # 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" |