wok-current annotate amd-microcode/receipt @ rev 25554
Up fakeroot (1.31)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Apr 12 20:31:24 2023 +0000 (20 months ago) |
parents | 86d79cfc8e5e |
children |
rev | line source |
---|---|
pascal@20231 | 1 # SliTaz package receipt. |
pascal@20231 | 2 |
pascal@20231 | 3 PACKAGE="amd-microcode" |
pascal@25554 | 4 VERSION="20210910" |
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@25553 | 9 WEB_SITE="https://linuxfromscratch.org/blfs/view/svn/postlfs/firmware.html#amd-microcode" |
pascal@20231 | 10 # See also: https://wiki.gentoo.org/wiki/AMD_microcode |
pascal@20231 | 11 |
pascal@20231 | 12 DEPENDS="linux" |
pascal@20231 | 13 |
pascal@25553 | 14 # What is the latest version available today? |
pascal@25553 | 15 current_version() |
pascal@25553 | 16 { |
pascal@25553 | 17 wget -O - https://wiki.gentoo.org/wiki/AMD_microcode 2>/dev/null | \ |
pascal@25554 | 18 sed '/signed-off/!d;s|.*off, ||;s|).*||;s| |-|g' | tail -n1 | xargs date +%Y%m%d -d |
pascal@25553 | 19 } |
pascal@25553 | 20 |
pascal@25553 | 21 # Rules to configure and make the package. |
pascal@20231 | 22 compile_rules() { |
pascal@25553 | 23 mkdir -p $install/lib/firmware/amd-ucode $install/lib/firmware/amd |
pascal@20231 | 24 |
pascal@25553 | 25 for i in amd-ucode/microcode_amd.bin amd-ucode/microcode_amd_fam15h.bin \ |
pascal@25553 | 26 amd-ucode/microcode_amd_fam16h.bin amd-ucode/microcode_amd_fam17h.bin \ |
pascal@25553 | 27 amd-ucode/microcode_amd_fam19h.bin amd/amd_sev_fam17h_model0xh.sbin \ |
pascal@25553 | 28 amd/amd_sev_fam17h_model3xh.sbin amd/amd_sev_fam19h_model0xh.sbin ; do |
pascal@25553 | 29 [ -f "$SRC/${i#*/}" ] || |
pascal@25553 | 30 wget -O "$SRC/${i#*/}" http://anduin.linuxfromscratch.org/BLFS/linux-firmware/$i |
pascal@25553 | 31 if [ ! -f "$SRC/${i#*/}" ]; then |
pascal@20231 | 32 echo "ERROR: can't get $i" |
pascal@20231 | 33 return 1 |
pascal@20231 | 34 fi |
pascal@25553 | 35 cp "$SRC/${i#*/}" $install/lib/firmware/$i |
pascal@20231 | 36 done |
pascal@20231 | 37 } |
pascal@20231 | 38 |
pascal@25553 | 39 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@20231 | 40 genpkg_rules() { |
pascal@20231 | 41 cp -r $install/* $fs |
pascal@20231 | 42 } |
pascal@20231 | 43 |
pascal@25553 | 44 # Pre and post install commands for Tazpkg. |
pascal@20231 | 45 post_install() { |
pascal@20231 | 46 if [ -z "$1" -a -e /sys/devices/system/cpu/microcode/reload ]; then |
pascal@20231 | 47 echo 1 > /sys/devices/system/cpu/microcode/reload |
pascal@20231 | 48 fi |
pascal@20231 | 49 } |