aboutsummaryrefslogtreecommitdiffstats
path: root/main/linux-firmware
diff options
context:
space:
mode:
Diffstat (limited to 'main/linux-firmware')
-rw-r--r--main/linux-firmware/APKBUILD20
1 files changed, 18 insertions, 2 deletions
diff --git a/main/linux-firmware/APKBUILD b/main/linux-firmware/APKBUILD
index 1179ad505b..963734834d 100644
--- a/main/linux-firmware/APKBUILD
+++ b/main/linux-firmware/APKBUILD
@@ -2,13 +2,13 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=linux-firmware
pkgver=20200519
-pkgrel=1
+pkgrel=2
pkgdesc="firmware files for linux"
#url="https://git.kernel.org/?p=linux/kernel/git/dwmw2/linux-firmware.git;a=summary"
url="http://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git;a=summary"
arch="all"
license="custom:multiple"
-makedepends=
+makedepends="libarchive-tools"
install=""
provides="linux-firmware-any"
provider_priority=1
@@ -44,6 +44,7 @@ for i in $_folders; do
subpackages="$pkgname-$i:_folder:noarch $subpackages"
depends="$pkgname-$i=$pkgver-r$pkgrel $depends"
done
+subpackages="amd-ucode::noarch $subpackages"
snapshot() {
local _date=$(date +%Y%m%d)
@@ -143,6 +144,21 @@ none() {
mkdir -p "$subpkgdir"
}
+ucode() {
+ pkgdesc="Microcode update files for AMD CPUs"
+ provider_priority=
+ provides=
+ depends=
+
+ # build ported from Arch Linux's PKGBUILD
+ mkdir -p "$subpkgdir"/boot
+ mkdir -p "$builddir"/kernel/x86/microcode
+ cat "$pkgdir"/lib/firmware/amd-ucode/microcode_amd*.bin > "$builddir"/kernel/x86/microcode/AuthenticAMD.bin
+ [ -n "$SOURCE_DATE_EPOCH" ] && touch -d @$SOURCE_DATE_EPOCH "$builddir"/kernel/x86/microcode/AuthenticAMD.bin
+ cd "$builddir" && echo kernel/x86/microcode/AuthenticAMD.bin |
+ bsdtar --uid 0 --gid 0 -cnf - -T - |
+ bsdtar --null -cf - --format=newc @- > "$subpkgdir"/boot/amd-ucode.img
+}
sha512sums="9724cf3d1aea73f264d53564ef160a62e90bb35766f3300bbbeaf7c7c6a356ef50c7d17bfa01197e8e991ff72b1aeef002bb78f5dc78243b2792cafbf1139dff linux-firmware-20200519.tar.gz
d3d976799f43b3b344305959b10d220709f6881cec102dfe391347869748f76d517d1b0d31076e2baa9759cb6a622eb5fc6f4fe45d6d3151974725e254255afa cypress-fmac-v5.4.18-2020_0402.zip