[arch-commits] Commit in linux-firmware/repos (testing-any testing-any/PKGBUILD)

Laurent Carlier lcarlier at archlinux.org
Fri Apr 24 15:00:48 UTC 2020


    Date: Friday, April 24, 2020 @ 15:00:47
  Author: lcarlier
Revision: 381497

archrelease: copy trunk to testing-any

Added:
  linux-firmware/repos/testing-any/
  linux-firmware/repos/testing-any/PKGBUILD
    (from rev 381496, linux-firmware/trunk/PKGBUILD)

----------+
 PKGBUILD |   87 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 87 insertions(+)

Copied: linux-firmware/repos/testing-any/PKGBUILD (from rev 381496, linux-firmware/trunk/PKGBUILD)
===================================================================
--- testing-any/PKGBUILD	                        (rev 0)
+++ testing-any/PKGBUILD	2020-04-24 15:00:47 UTC (rev 381497)
@@ -0,0 +1,87 @@
+# Maintainer: Thomas Bächler <thomas at archlinux.org>
+
+pkgbase=linux-firmware
+pkgname=(linux-firmware amd-ucode)
+_commit=78c0348458c035cf1de6093555db5431cc8c1268  # master
+pkgver=20200421.78c0348
+pkgrel=1
+pkgdesc="Firmware files for Linux"
+makedepends=('git')
+arch=('any')
+url="https://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git;a=summary"
+license=('GPL2' 'GPL3' 'custom')
+options=(!strip)
+source=("git+https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git#commit=${_commit}?signed")
+sha256sums=('SKIP')
+validpgpkeys=('4CDE8575E547BF835FE15807A31B6BD72486CFD6') # Josh Boyer <jwboyer at fedoraproject.org>
+
+prepare() {
+  cd ${pkgname}
+}
+
+pkgver() {
+  cd ${pkgname}
+
+  # 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
+}
+
+package_linux-firmware() {
+  conflicts=('linux-firmware-git'
+             'kernel26-firmware'
+             'ar9170-fw'
+             'iwlwifi-1000-ucode'
+             'iwlwifi-3945-ucode'
+             'iwlwifi-4965-ucode'
+             'iwlwifi-5000-ucode'
+             'iwlwifi-5150-ucode'
+             'iwlwifi-6000-ucode'
+             'rt2870usb-fw'
+             'rt2x00-rt61-fw'
+             'rt2x00-rt71w-fw')
+  replaces=('kernel26-firmware'
+            'ar9170-fw'
+            'iwlwifi-1000-ucode'
+            'iwlwifi-3945-ucode'
+            'iwlwifi-4965-ucode'
+            'iwlwifi-5000-ucode'
+            'iwlwifi-5150-ucode'
+            'iwlwifi-6000-ucode'
+            'rt2870usb-fw'
+            'rt2x00-rt61-fw'
+            'rt2x00-rt71w-fw')
+
+  cd ${pkgname}
+
+  make DESTDIR="${pkgdir}" FIRMWAREDIR=/usr/lib/firmware install
+
+  install -Dt "${pkgdir}/usr/share/licenses/${pkgname}" -m644 LICEN* WHENCE
+
+  # 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"
+}
+
+package_amd-ucode() {
+  pkgdesc='Microcode update files for AMD CPUs'
+
+  install -Dt "${pkgdir}/boot" -m644 amd-ucode.img
+  install -Dm644 ${pkgbase}/LICENSE.amd-ucode "${pkgdir}/usr/share/licenses/$pkgname/LICENSE"
+}
+
+# vim:set ts=2 sw=2 et:



More information about the arch-commits mailing list