Compare commits

...

2 Commits

@ -5214,7 +5214,7 @@
"linux-firmware": {
"url": "gitea@gitea.artixlinux.org:packagesL/linux-firmware.git",
"branch": "master",
"revision": "4d82c4d27ed7be5bba9d834ad6f41623a177e6c5"
"revision": "33aa0dc8bcb264fe4b3631099ae6ab561ab072f7"
},
"linux-hardened": {
"url": "gitea@gitea.artixlinux.org:packagesL/linux-hardened.git",

@ -6,7 +6,7 @@ pkgname=(linux-firmware-whence linux-firmware amd-ucode
)
_tag=20221109
pkgver=20221109.60310c2
pkgrel=1
pkgrel=2
pkgdesc="Firmware files for Linux"
url="https://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git;a=summary"
license=('GPL2' 'GPL3' 'custom')
@ -135,8 +135,10 @@ package_linux-firmware-mellanox() {
package_linux-firmware-marvell() {
pkgdesc+=" - marvell / Firmware for Marvell devices"
depends=('linux-firmware-whence')
mv -v linux-firmware-marvell/* "${pkgdir}"
# remove arm64 firmware #76583
rm "${pkgdir}"/usr/lib/firmware/mrvl/prestera/mvsw_prestera_fw_arm64-v4.1.img.xz
}
package_linux-firmware-qcom() {

@ -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:
+ 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

@ -0,0 +1,172 @@
# Maintainer: artoo <artoo@artixlinux.org>
pkgbase=linux-firmware
pkgname=(linux-firmware-whence linux-firmware amd-ucode
linux-firmware-{nfp,mellanox,marvell,qcom,liquidio,qlogic,bnx2x}
)
_tag=20221109
pkgver=20221109.60310c2
pkgrel=2
pkgdesc="Firmware files for Linux"
url="https://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git;a=summary"
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')
validpgpkeys=('4CDE8575E547BF835FE15807A31B6BD72486CFD6') # Josh Boyer <jwboyer@fedoraproject.org>
_backports=(
)
prepare() {
cd ${pkgbase}
local _c
for _c in "${_backports[@]}"; do
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() {
cd ${pkgbase}
# Commit date + short rev
echo $(TZ=UTC git show -s --pretty=%cd --date=format-local:%Y%m%d HEAD).$(git rev-parse --short HEAD)
}
build() {
mkdir -p kernel/x86/microcode
cat ${pkgbase}/amd-ucode/microcode_amd*.bin > kernel/x86/microcode/AuthenticAMD.bin
# Reproducibility: set the timestamp on the bin file
if [[ -n ${SOURCE_DATE_EPOCH} ]]; then
touch -d @${SOURCE_DATE_EPOCH} kernel/x86/microcode/AuthenticAMD.bin
fi
# Reproducibility: strip the inode and device numbers from the cpio archive
echo kernel/x86/microcode/AuthenticAMD.bin |
bsdtar --uid 0 --gid 0 -cnf - -T - |
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() {
pkgdesc+=" - contains the WHENCE license file which documents the vendor license details"
install -Dt "${pkgdir}/usr/share/licenses/${pkgname}" -m644 ${pkgbase}/WHENCE
}
package_linux-firmware() {
depends=('linux-firmware-whence')
cd ${pkgbase}
make DESTDIR="${pkgdir}" FIRMWAREDIR=/usr/lib/firmware installcompress
# 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"
install -Dt "${pkgdir}/usr/share/licenses/${pkgname}" -m644 LICEN*
# split
cd "${pkgdir}"
_pick linux-firmware-nfp usr/lib/firmware/netronome
_pick linux-firmware-nfp usr/share/licenses/${pkgname}/LICENCE.Netronome
_pick linux-firmware-mellanox usr/lib/firmware/mellanox
_pick linux-firmware-marvell usr/lib/firmware/{libertas,mwl8k,mwlwifi,mrvl}
_pick linux-firmware-marvell usr/share/licenses/${pkgname}/LICENCE.{Marvell,NXP}
_pick linux-firmware-qcom usr/lib/firmware/{qcom,a300_*}
_pick linux-firmware-qcom usr/share/licenses/${pkgname}/LICENSE.qcom
_pick linux-firmware-liquidio usr/lib/firmware/liquidio
_pick linux-firmware-liquidio usr/share/licenses/${pkgname}/LICENCE.cavium_liquidio
_pick linux-firmware-qlogic usr/lib/firmware/{qlogic,qed,ql2???_*,c{b,t,t2}fw-*}
_pick linux-firmware-qlogic usr/share/licenses/${pkgname}/LICENCE.{qla1280,qla2xxx}
_pick linux-firmware-bnx2x usr/lib/firmware/bnx2x*
}
package_amd-ucode() {
pkgdesc="Microcode update image for AMD CPUs"
license=(custom)
install -Dt "${pkgdir}/boot" -m644 amd-ucode.img
install -Dt "${pkgdir}/usr/share/licenses/${pkgname}" -m644 ${pkgbase}/LICENSE.amd-ucode
}
package_linux-firmware-nfp() {
pkgdesc+=" - nfp / Firmware for Netronome Flow Processors"
depends=('linux-firmware-whence')
mv -v linux-firmware-nfp/* "${pkgdir}"
}
package_linux-firmware-mellanox() {
pkgdesc+=" - mellanox / Firmware for Mellanox Spectrum switches"
depends=('linux-firmware-whence')
mv -v linux-firmware-mellanox/* "${pkgdir}"
}
package_linux-firmware-marvell() {
pkgdesc+=" - marvell / Firmware for Marvell devices"
depends=('linux-firmware-whence')
mv -v linux-firmware-marvell/* "${pkgdir}"
# remove arm64 firmware #76583
rm "${pkgdir}"/usr/lib/firmware/mrvl/prestera/mvsw_prestera_fw_arm64-v4.1.img.xz
}
package_linux-firmware-qcom() {
pkgdesc+=" - qcom / Firmware for Qualcomm SoCs"
depends=('linux-firmware-whence')
mv -v linux-firmware-qcom/* "${pkgdir}"
}
package_linux-firmware-liquidio() {
pkgdesc+=" - liquidio / Firmware for Cavium LiquidIO server adapters"
depends=('linux-firmware-whence')
mv -v linux-firmware-liquidio/* "${pkgdir}"
}
package_linux-firmware-qlogic() {
pkgdesc+=" - qlogic / Firmware for QLogic devices"
depends=('linux-firmware-whence')
mv -v linux-firmware-qlogic/* "${pkgdir}"
}
package_linux-firmware-bnx2x() {
pkgdesc+=" - bnx2x / Firmware for Broadcom NetXtreme II 10Gb ethernet adapters"
depends=('linux-firmware-wh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