wok-current annotate amd-microcode/receipt @ rev 20580

go: force arch
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Dec 13 22:11:22 2018 +0100 (2018-12-13)
parents
children 8ea0030e77cb
rev   line source
pascal@20231 1 # SliTaz package receipt.
pascal@20231 2
pascal@20231 3 PACKAGE="amd-microcode"
pascal@20231 4 VERSION="20180125" # just date of creating the receipt
pascal@20231 5 CATEGORY="kernel"
pascal@20231 6 SHORT_DESC="AMD processor microcode update for Linux"
pascal@20231 7 MAINTAINER="al.bobylev@gmail.com"
pascal@20231 8 LICENSE="unknown"
pascal@20231 9 WEB_SITE="http://linuxfromscratch.org/blfs/view/svn/postlfs/firmware.html#and-microcode" # yes, "and" is typo
pascal@20231 10 # See also: https://wiki.gentoo.org/wiki/AMD_microcode
pascal@20231 11
pascal@20231 12 DEPENDS="linux"
pascal@20231 13
pascal@20231 14 compile_rules() {
pascal@20231 15 mkdir -p $install/lib/firmware/amd-ucode
pascal@20231 16
pascal@20231 17 for i in microcode_amd.bin microcode_amd_fam15h.bin microcode_amd_fam16h.bin; do
pascal@20231 18 [ -f "$SRC/$i" ] ||
pascal@20231 19 wget -O "$SRC/$i" http://anduin.linuxfromscratch.org/BLFS/linux-firmware/amd-ucode/$i
pascal@20231 20 if [ ! -f "$SRC/$i" ]; then
pascal@20231 21 echo "ERROR: can't get $i"
pascal@20231 22 return 1
pascal@20231 23 fi
pascal@20231 24 cp "$SRC/$i" $install/lib/firmware/amd-ucode/
pascal@20231 25 done
pascal@20231 26 }
pascal@20231 27
pascal@20231 28 genpkg_rules() {
pascal@20231 29 cp -r $install/* $fs
pascal@20231 30 }
pascal@20231 31
pascal@20231 32 post_install() {
pascal@20231 33 if [ -z "$1" -a -e /sys/devices/system/cpu/microcode/reload ]; then
pascal@20231 34 echo 1 > /sys/devices/system/cpu/microcode/reload
pascal@20231 35 fi
pascal@20231 36 }