23 Aug
2018
23 Aug
'18
9:22 a.m.
Christian Hesse <list@eworm.de> on Thu, 2018/08/23 11:20: > Christian Hesse <list@eworm.de> on Wed, 2018/08/22 11:24: > > Gerardo Exequiel Pozzi via arch-releng <arch-releng@archlinux.org> on Sat, > > 2018/08/18 23:29: > > > +# Prepare amd_ucode > > > +make_amd_ucode_img() { > > > + mkdir -p ${work_dir}/amd-ucode/kernel/x86/microcode > > > + cat > > > ${work_dir}/x86_64/airootfs/lib/firmware/amd-ucode/microcode_amd*.bin > > > > ${work_dir}/amd-ucode/kernel/x86/microcode/AuthenticAMD.bin > > > + pushd ${work_dir}/amd-ucode > /dev/null > > > + echo kernel/x86/microcode/AuthenticAMD.bin | bsdcpio -o -H newc -R > > > 0:0 > > > > amd-ucode.img > > > + popd > /dev/null > > > + cp ${work_dir}/amd-ucode/amd-ucode.img > > > ${work_dir}/x86_64/airootfs/boot/amd-ucode.img +} > > > > Wondering if we should put this into a package... Could be a split package > > of linux-firmware. Any opinion on this? > > [ Added Laurent to CC as he maintains the linux-firmware package. ] > > I've attached a proposal patch to add a split package amd-ucode-early to > linux-firmware. Any objections? Is the name ok or do we prefer just > 'amd-ucode'? > > And another note... Did anybody test if microcode is updated properly if > both, intel-ucode.img and amd-ucode, are loaded? Oh, attachments are stripped, so adding inline... Index: PKGBUILD =================================================================== --- PKGBUILD (revision 332849) +++ PKGBUILD (working copy) @@ -1,40 +1,16 @@ # $Id$ # Maintainer: Thomas Bächler <thomas@archlinux.org> -pkgname=linux-firmware +pkgbase=linux-firmware +pkgname=(linux-firmware amd-ucode-early) _commit=f1b95fe5a51830bb8c1712082de4279a042376b6 # master pkgver=20180815.f1b95fe -pkgrel=1 +pkgrel=2 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-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' - 'amd-ucode') -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' - 'amd-ucode') options=(!strip) source=("git+https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git#commit=${_commit}") md5sums=('SKIP') @@ -50,7 +26,39 @@ echo $(TZ=UTC git show -s --pretty=%cd --date=format-local:%Y%m%d HEAD).$(git rev-parse --short HEAD) } -package() { +build() { + mkdir -p kernel/x86/microcode + cat ${pkgbase}/amd-ucode/microcode_amd*.bin > kernel/x86/microcode/AuthenticAMD.bin + echo kernel/x86/microcode/AuthenticAMD.bin | bsdcpio -o -H newc -R 0:0 > 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' + 'amd-ucode') + 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' + 'amd-ucode') + cd "${srcdir}/${pkgname}" make DESTDIR="${pkgdir}" FIRMWAREDIR=/usr/lib/firmware install @@ -64,4 +72,11 @@ echo 'w /sys/devices/system/cpu/microcode/reload - - - - 1' \ >"${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf" } + +package_amd-ucode-early() { + description='Early microcode update files for AMD CPUs' + + install -D -m0644 amd-ucode.img "${pkgdir}"/boot/amd-ucode.img +} + # vim:set ts=2 sw=2 et: -- main(a){char*c=/* Schoene Gruesse */"B?IJj;MEH" "CX:;",b;for(a/* Best regards my address: */=0;b=c[a++];) putchar(b-1/(/* Chris cc -ox -xc - && ./x */b/42*2-3)*42);}