mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
core/linux-firmware to 20230625.ee91452d-1
This commit is contained in:
parent
dbfda6f4fb
commit
1689201219
2 changed files with 7 additions and 134 deletions
|
@ -1,123 +0,0 @@
|
|||
From 7eec2b56f54c778d5bd6e7aea49ee03e3b76e769 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Fri, 22 Jan 2021 20:36:23 +0000
|
||||
Subject: [PATCH v2] Add support for compressing firmware in copy-firmware.sh
|
||||
|
||||
As of kernel 5.3 there's initial support for loading compressed firmware.
|
||||
At this stage the only supported compression methis is "xz -C crc32" but
|
||||
this option brings significant benefits.
|
||||
|
||||
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
|
||||
---
|
||||
|
||||
v2: quote filename for xz command
|
||||
|
||||
Makefile | 4 ++++
|
||||
copy-firmware.sh | 47 +++++++++++++++++++++++++++++++----------------
|
||||
2 files changed, 35 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index e1c362f..9a48471 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -11,3 +11,7 @@ check:
|
||||
install:
|
||||
mkdir -p $(DESTDIR)$(FIRMWAREDIR)
|
||||
./copy-firmware.sh $(DESTDIR)$(FIRMWAREDIR)
|
||||
+
|
||||
+installcompress:
|
||||
+ mkdir -p $(DESTDIR)$(FIRMWAREDIR)
|
||||
+ ./copy-firmware.sh -C $(DESTDIR)$(FIRMWAREDIR)
|
||||
diff --git a/copy-firmware.sh b/copy-firmware.sh
|
||||
index 9b46b63..0dd2e5c 100755
|
||||
--- a/copy-firmware.sh
|
||||
+++ b/copy-firmware.sh
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
verbose=:
|
||||
prune=no
|
||||
+compress=no
|
||||
|
||||
while test $# -gt 0; do
|
||||
case $1 in
|
||||
@@ -19,6 +20,11 @@ while test $# -gt 0; do
|
||||
shift
|
||||
;;
|
||||
|
||||
+ -C | --compress)
|
||||
+ compress=yes
|
||||
+ shift
|
||||
+ ;;
|
||||
+
|
||||
*)
|
||||
if test "x$destdir" != "x"; then
|
||||
echo "ERROR: unknown command-line options: $@"
|
||||
@@ -31,40 +37,49 @@ while test $# -gt 0; do
|
||||
esac
|
||||
done
|
||||
|
||||
+if test "x$compress" = "xyes"; then
|
||||
+ cmpxtn=.xz
|
||||
+ grep '^File:' WHENCE | sed -e's/^File: *//g' -e's/"//g' | while read f; do
|
||||
+ test -f "$f" || continue
|
||||
+ $verbose "compressing $f"
|
||||
+ xz -C crc32 "$f"
|
||||
+ done
|
||||
+fi
|
||||
+
|
||||
grep '^File:' WHENCE | sed -e's/^File: *//g' -e's/"//g' | while read f; do
|
||||
- test -f "$f" || continue
|
||||
- $verbose "copying file $f"
|
||||
- install -d $destdir/$(dirname "$f")
|
||||
- cp -d "$f" $destdir/"$f"
|
||||
+ test -f "$f$cmpxtn" || continue
|
||||
+ $verbose "copying file $f$cmpxtn"
|
||||
+ install -d $destdir/$(dirname "$f$cmpxtn")
|
||||
+ cp -d "$f$cmpxtn" $destdir/"$f$cmpxtn"
|
||||
done
|
||||
|
||||
grep -E '^Link:' WHENCE | sed -e's/^Link: *//g' -e's/-> //g' | while read f d; do
|
||||
- if test -L "$f"; then
|
||||
- test -f "$destdir/$f" && continue
|
||||
- $verbose "copying link $f"
|
||||
- install -d $destdir/$(dirname "$f")
|
||||
+ if test -L "$f$cmpxtn"; then
|
||||
+ test -f "$destdir/$f$cmpxtn" && continue
|
||||
+ $verbose "copying link $f$cmpxtn"
|
||||
+ install -d $destdir/$(dirname "$f$cmpxtn")
|
||||
cp -d "$f" $destdir/"$f"
|
||||
|
||||
if test "x$d" != "x"; then
|
||||
- target=`readlink "$f"`
|
||||
+ target=`readlink "$f$cmpxtn"`
|
||||
|
||||
if test "x$target" != "x$d"; then
|
||||
$verbose "WARNING: inconsistent symlink target: $target != $d"
|
||||
else
|
||||
if test "x$prune" != "xyes"; then
|
||||
- $verbose "WARNING: unneeded symlink detected: $f"
|
||||
+ $verbose "WARNING: unneeded symlink detected: $f$cmpxtn"
|
||||
else
|
||||
- $verbose "WARNING: pruning unneeded symlink $f"
|
||||
- rm -f "$f"
|
||||
+ $verbose "WARNING: pruning unneeded symlink $f$cmpxtn"
|
||||
+ rm -f "$f$cmpxtn"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
- $verbose "WARNING: missing target for symlink $f"
|
||||
+ $verbose "WARNING: missing target for symlink $f$cmpxtn"
|
||||
fi
|
||||
else
|
||||
- $verbose "creating link $f -> $d"
|
||||
- install -d $destdir/$(dirname "$f")
|
||||
- ln -sf "$d" "$destdir/$f"
|
||||
+ $verbose "creating link $f$cmpxtn -> $d$cmpxtn"
|
||||
+ install -d $destdir/$(dirname "$f$cmpxtn")
|
||||
+ ln -sf "$d$cmpxtn" "$destdir/$f$cmpxtn"
|
||||
fi
|
||||
done
|
||||
|
||||
--
|
||||
2.29.2
|
||||
|
|
@ -7,8 +7,8 @@ pkgbase=linux-firmware
|
|||
pkgname=(linux-firmware-whence linux-firmware amd-ucode
|
||||
linux-firmware-{nfp,mellanox,marvell,qcom,liquidio,qlogic,bnx2x}
|
||||
)
|
||||
_tag=20230404
|
||||
pkgver=20230404.2e92a49f
|
||||
_tag=20230625
|
||||
pkgver=20230625.ee91452d
|
||||
pkgrel=1
|
||||
pkgdesc="Firmware files for Linux"
|
||||
url="https://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git;a=summary"
|
||||
|
@ -16,10 +16,8 @@ license=('GPL2' 'GPL3' 'custom')
|
|||
arch=('any')
|
||||
makedepends=('git')
|
||||
options=(!strip)
|
||||
source=("git+https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git#tag=${_tag}?signed"
|
||||
0001-Add-support-for-compressing-firmware-in-copy-firmware.patch)
|
||||
sha256sums=('SKIP'
|
||||
'aa11b2eed9c0be42571b45eb7153908a43290f02a5fc715aefcaa81030a1832f')
|
||||
source=("git+https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git#tag=${_tag}?signed")
|
||||
sha256sums=('SKIP')
|
||||
validpgpkeys=('4CDE8575E547BF835FE15807A31B6BD72486CFD6') # Josh Boyer <jwboyer@fedoraproject.org>
|
||||
|
||||
_backports=(
|
||||
|
@ -33,9 +31,6 @@ prepare() {
|
|||
git log --oneline -1 "${_c}"
|
||||
git cherry-pick -n "${_c}"
|
||||
done
|
||||
|
||||
# add firmware compression support - patch taken from Fedora
|
||||
patch -Np1 -i ../0001-Add-support-for-compressing-firmware-in-copy-firmware.patch
|
||||
}
|
||||
|
||||
pkgver() {
|
||||
|
@ -83,9 +78,10 @@ package_linux-firmware() {
|
|||
|
||||
make DESTDIR="${pkgdir}" FIRMWAREDIR=/usr/lib/firmware install
|
||||
|
||||
# useless (FS#46591)
|
||||
# Trigger a microcode reload for configurations not using early updates
|
||||
echo 'w /sys/devices/system/cpu/microcode/reload - - - - 1' |
|
||||
install -Dm644 /dev/stdin "${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf"
|
||||
#echo 'w /sys/devices/system/cpu/microcode/reload - - - - 1' |
|
||||
# install -Dm644 /dev/stdin "${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf"
|
||||
|
||||
install -Dt "${pkgdir}/usr/share/licenses/${pkgname}" -m644 LICEN*
|
||||
|
||||
|
|
Loading…
Reference in a new issue