summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Dmitriyev2019-01-26 23:14:12 +0300
committerVictor Dmitriyev2019-01-26 23:14:12 +0300
commitd55ecefce627d716c333810411d1f45d1cddfdee (patch)
treef4bf98a84960dfe3a3a2297e04033e1d842542ba
parent0f45f583905252e4abef7c8fc6fef33e0d0e9fd0 (diff)
downloadaur-d55ecefce627d716c333810411d1f45d1cddfdee.tar.gz
upgpkg: linux-firmware-git 20190118.a8b75ca-1
copied pkgver() added amd-ucode-git from official PKGBUILD
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD51
2 files changed, 46 insertions, 20 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e5ed721c9b78..cb5e9d7926ea 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,18 +1,25 @@
+# Generated by mksrcinfo v8
+# Sat Jan 26 20:14:12 UTC 2019
pkgbase = linux-firmware-git
pkgdesc = Firmware files for Linux
- pkgver = 20150924.f88e5c2
- pkgrel = 2
+ pkgver = 20190118.a8b75ca
+ pkgrel = 1
url = http://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git;a=summary
arch = any
license = GPL2
license = GPL3
license = custom
makedepends = git
- provides = linux-firmware=20150924.f88e5c2
- conflicts = linux-firmware
options = !strip
source = linux-firmware-git::git+https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
md5sums = SKIP
pkgname = linux-firmware-git
+ provides = linux-firmware=20190118.a8b75ca
+ conflicts = linux-firmware
+
+pkgname = amd-ucode-git
+ pkgdesc = Microcode update files for AMD CPUs
+ provides = amd-ucode=20190118.a8b75ca
+ conflicts = amd-ucode
diff --git a/PKGBUILD b/PKGBUILD
index 38a288c53ede..768439bad1c6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,33 +1,41 @@
-# Based on linux-firmware by Thomas Bächler <thomas@archlinux.org>
+# Mostly a copy of linux-firmware PKGBUILD by Thomas Bächler <thomas@archlinux.org>
# Maintainer: Victor Dmitriyev <mrvvitek@gmail.com>
# Contributor: xduugu
-pkgname=linux-firmware-git
-pkgrel=2
+pkgbase=linux-firmware-git
+pkgname=(linux-firmware-git amd-ucode-git)
+pkgver=20190118.a8b75ca
+pkgrel=1
pkgdesc="Firmware files for Linux"
makedepends=('git')
arch=('any')
url="http://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git;a=summary"
license=('GPL2' 'GPL3' 'custom')
-conflicts=('linux-firmware')
-pkgver=20150924.f88e5c2
-provides=("linux-firmware=$pkgver")
options=(!strip)
-source=("$pkgname::git+https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git")
+#branch=master
+source=("${pkgbase}::git+https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git")
md5sums=('SKIP')
pkgver() {
- # Mimics ABS pkgver described like this:
- # Commit date + git rev-parse --short origin/master
- cd "${srcdir}/${pkgname}"
- (
- git show --format='%cI' -q master | sed 's/T.*//g;s/-//g'
- echo .
- git rev-parse --short master
- ) | tr -d '\n'
+ cd "${srcdir}/${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)
}
-package() {
+build() {
+ cd "${srcdir}"
+ mkdir -p kernel/x86/microcode
+ cat "${pkgbase}/amd-ucode/microcode_amd"*.bin > kernel/x86/microcode/AuthenticAMD.bin
+ # Make the .bin reproducible
+ [ ! -z $SOURCE_DATE_EPOCH ] && touch -d @$SOURCE_DATE_EPOCH kernel/x86/microcode/AuthenticAMD.bin
+ echo kernel/x86/microcode/AuthenticAMD.bin | bsdcpio -o -H newc -R 0:0 > amd-ucode.img
+}
+
+package_linux-firmware-git() {
+ conflicts=('linux-firmware')
+ provides=("linux-firmware=$pkgver")
+
cd "${srcdir}/${pkgname}"
make DESTDIR="${pkgdir}" FIRMWAREDIR=/usr/lib/firmware install
@@ -41,4 +49,15 @@ package() {
echo 'w /sys/devices/system/cpu/microcode/reload - - - - 1' \
>"${pkgdir}/usr/lib/tmpfiles.d/linux-firmware.conf"
}
+
+package_amd-ucode-git() {
+ conflicts=('amd-ucode')
+ provides=("amd-ucode=$pkgver")
+ pkgdesc='Microcode update files for AMD CPUs'
+
+ cd "${srcdir}"
+ install -D -m0644 amd-ucode.img "${pkgdir}/boot/amd-ucode.img"
+ install -D -m0644 "${srcdir}/${pkgbase}/LICENSE.amd-ucode" "${pkgdir}/usr/share/licenses/amd-ucode/LICENSE"
+}
+
# vim:set ts=2 sw=2 et: