summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Dmitriev2022-06-02 00:40:39 +0300
committerVictor Dmitriev2022-06-02 00:40:39 +0300
commit681bb5505e0cce1bd7f793bc89788f1a275cbd4a (patch)
treed380347cb5dd00794ab016f98690d96b142a3597
parente0fbaa4b7704e39aea130275da27752ef760eb56 (diff)
downloadaur-681bb5505e0cce1bd7f793bc89788f1a275cbd4a.tar.gz
fixed the patch to keep up with upstream
-rw-r--r--.SRCINFO24
-rw-r--r--0001-Add-support-for-compressing-firmware-in-copy-firmware-modified.patch123
-rw-r--r--PKGBUILD37
3 files changed, 156 insertions, 28 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 0296b738113b..b3845bbb3fc0 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = linux-firmware-git
pkgdesc = Firmware files for Linux
- pkgver = 20220124.eb8ea1b
+ pkgver = 20220531.eaee2da
pkgrel = 1
url = https://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git;a=summary
arch = any
@@ -11,74 +11,76 @@ pkgbase = linux-firmware-git
options = !strip
source = linux-firmware-git::git+https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git?signed
source = 0001-Add-support-for-compressing-firmware-in-copy-firmware.patch
+ source = 0001-Add-support-for-compressing-firmware-in-copy-firmware-modified.patch
source = allow-inplace-rebuild.patch
validpgpkeys = 4CDE8575E547BF835FE15807A31B6BD72486CFD6
sha256sums = SKIP
sha256sums = 41c73f88ac68a3aef01fd406ce6cdb87555c65e4816dab12df10740875551aa7
+ sha256sums = 0e1840112f4c439da51860437181a5ec3673546744d41716238dc1b357fc2880
sha256sums = 33a486fc036ec2d2e99799550b61eab395e2dd27b0e02e52e0bd8b9f3810d003
pkgname = linux-firmware-whence-git
pkgdesc = Firmware files for Linux - contains the WHENCE license file which documents the vendor license details
- provides = linux-firmware-whence=20220124.eb8ea1b
+ provides = linux-firmware-whence=20220531.eaee2da
conflicts = linux-firmware-whence
conflicts = linux-firmware<=20211216.f682ecb
pkgname = linux-firmware-git
depends = linux-firmware-whence
- provides = linux-firmware=20220124.eb8ea1b
+ provides = linux-firmware=20220531.eaee2da
conflicts = linux-firmware
pkgname = amd-ucode-git
pkgdesc = Microcode update image for AMD CPUs
license = custom
- provides = amd-ucode=20220124.eb8ea1b
+ provides = amd-ucode=20220531.eaee2da
conflicts = amd-ucode
pkgname = linux-firmware-nfp-git
pkgdesc = Firmware files for Linux - nfp / Firmware for Netronome Flow Processors
depends = linux-firmware-whence
- provides = linux-firmware-nfp=20220124.eb8ea1b
+ provides = linux-firmware-nfp=20220531.eaee2da
conflicts = linux-firmware-nfp
conflicts = linux-firmware<=20211216.f682ecb
pkgname = linux-firmware-mellanox-git
pkgdesc = Firmware files for Linux - mellanox / Firmware for Mellanox Spectrum switches
depends = linux-firmware-whence
- provides = linux-firmware-mellanox=20220124.eb8ea1b
+ provides = linux-firmware-mellanox=20220531.eaee2da
conflicts = linux-firmware-mellanox
conflicts = linux-firmware<=20211216.f682ecb
pkgname = linux-firmware-marvell-git
pkgdesc = Firmware files for Linux - marvell / Firmware for Marvell devices
depends = linux-firmware-whence
- provides = linux-firmware-marvell=20220124.eb8ea1b
+ provides = linux-firmware-marvell=20220531.eaee2da
conflicts = linux-firmware-marvell
conflicts = linux-firmware<=20211216.f682ecb
pkgname = linux-firmware-qcom-git
pkgdesc = Firmware files for Linux - qcom / Firmware for Qualcomm SoCs
depends = linux-firmware-whence
- provides = linux-firmware-qcom=20220124.eb8ea1b
+ provides = linux-firmware-qcom=20220531.eaee2da
conflicts = linux-firmware-qcom
conflicts = linux-firmware<=20211216.f682ecb
pkgname = linux-firmware-liquidio-git
pkgdesc = Firmware files for Linux - liquidio / Firmware for Cavium LiquidIO server adapters
depends = linux-firmware-whence
- provides = linux-firmware-liquidio=20220124.eb8ea1b
+ provides = linux-firmware-liquidio=20220531.eaee2da
conflicts = linux-firmware-liquidio
conflicts = linux-firmware<=20211216.f682ecb
pkgname = linux-firmware-qlogic-git
pkgdesc = Firmware files for Linux - qlogic / Firmware for QLogic devices
depends = linux-firmware-whence
- provides = linux-firmware-qlogic=20220124.eb8ea1b
+ provides = linux-firmware-qlogic=20220531.eaee2da
conflicts = linux-firmware-qlogic
conflicts = linux-firmware<=20211216.f682ecb
pkgname = linux-firmware-bnx2x-git
pkgdesc = Firmware files for Linux - bnx2x / Firmware for Broadcom NetXtreme II 10Gb ethernet adapters
depends = linux-firmware-whence
- provides = linux-firmware-bnx2x=20220124.eb8ea1b
+ provides = linux-firmware-bnx2x=20220531.eaee2da
conflicts = linux-firmware-bnx2x
conflicts = linux-firmware<=20211216.f682ecb
diff --git a/0001-Add-support-for-compressing-firmware-in-copy-firmware-modified.patch b/0001-Add-support-for-compressing-firmware-in-copy-firmware-modified.patch
new file mode 100644
index 000000000000..ba24592903b2
--- /dev/null
+++ b/0001-Add-support-for-compressing-firmware-in-copy-firmware-modified.patch
@@ -0,0 +1,123 @@
+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:
++ install -d $(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
+
diff --git a/PKGBUILD b/PKGBUILD
index 5efb35e4e3b9..7d68733d1a08 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,13 +1,13 @@
# Mostly a copy of linux-firmware PKGBUILD by Thomas Bächler <thomas@archlinux.org>
-# Maintainer: Victor Dmitriyev <mrvvitek@gmail.com>
+# Maintainer: Victor Dmitriev <mrvvitek@gmail.com>
# Contributor: xduugu
pkgbase=linux-firmware-git
-pkgver=20220124.eb8ea1b
-pkgrel=1
pkgname=(linux-firmware-whence-git linux-firmware-git amd-ucode-git
linux-firmware-{nfp,mellanox,marvell,qcom,liquidio,qlogic,bnx2x}-git
)
+pkgver=20220531.eaee2da
+pkgrel=1
pkgdesc="Firmware files for Linux"
url="https://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git;a=summary"
license=('GPL2' 'GPL3' 'custom')
@@ -17,27 +17,19 @@ options=(!strip)
#branch=main
source=("${pkgbase}::git+https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git?signed"
0001-Add-support-for-compressing-firmware-in-copy-firmware.patch
+ 0001-Add-support-for-compressing-firmware-in-copy-firmware-modified.patch
allow-inplace-rebuild.patch)
sha256sums=('SKIP'
'41c73f88ac68a3aef01fd406ce6cdb87555c65e4816dab12df10740875551aa7'
+ '0e1840112f4c439da51860437181a5ec3673546744d41716238dc1b357fc2880'
'33a486fc036ec2d2e99799550b61eab395e2dd27b0e02e52e0bd8b9f3810d003')
validpgpkeys=('4CDE8575E547BF835FE15807A31B6BD72486CFD6') # Josh Boyer <jwboyer@fedoraproject.org>
-_pick() {
- local p="$1" f d; shift
- for f; do
- d="$srcdir/$p/${f#$pkgdir/}"
- mkdir -p "$(dirname "$d")"
- mv "$f" "$d"
- rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
- done
-}
-
prepare() {
cd ${pkgbase}
# add firmware compression support - patch taken from Fedora
- patch -Np1 -i ../0001-Add-support-for-compressing-firmware-in-copy-firmware.patch
+ patch -Np1 -i ../0001-Add-support-for-compressing-firmware-in-copy-firmware-modified.patch
patch -Np1 -i ../allow-inplace-rebuild.patch
}
@@ -63,12 +55,22 @@ build() {
bsdtar --null -cf - --format=newc @- > amd-ucode.img
}
+_pick() {
+ local p="$1" f d; shift
+ for f; do
+ d="$srcdir/$p/${f#$pkgdir/}"
+ mkdir -p "$(dirname "$d")"
+ mv "$f" "$d"
+ rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
+ done
+}
+
package_linux-firmware-whence-git() {
conflicts=("${pkgname%-git}" 'linux-firmware<=20211216.f682ecb')
provides=("${pkgname%-git}=$pkgver")
pkgdesc+=" - contains the WHENCE license file which documents the vendor license details"
- cd "$pkgbase"
- install -Dt "${pkgdir}/usr/share/licenses/${pkgname%-git}" -m644 WHENCE
+
+ install -Dt "${pkgdir}/usr/share/licenses/${pkgname}" -m644 "${pkgbase}/WHENCE"
}
package_linux-firmware-git() {
@@ -87,7 +89,8 @@ package_linux-firmware-git() {
install -Dt "${pkgdir}/usr/share/licenses/${pkgname%-git}" -m644 LICEN*
# split
- cd "$pkgdir"
+ cd "${pkgdir}"
+
_pick linux-firmware-nfp usr/lib/firmware/netronome
_pick linux-firmware-nfp usr/share/licenses/${pkgname%-git}/LICENCE.Netronome