wok view amd-microcode/receipt @ rev 25553

Up amd-microcode (2021.Sep.10), intel-microcode (20230214)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Apr 09 14:47:24 2023 +0000 (13 months ago)
parents 8ea0030e77cb
children 943e4e95214c
line source
1 # SliTaz package receipt.
3 PACKAGE="amd-microcode"
4 VERSION="2021.Sep.10"
5 CATEGORY="kernel"
6 SHORT_DESC="AMD processor microcode update for Linux"
7 MAINTAINER="al.bobylev@gmail.com"
8 LICENSE="unknown"
9 WEB_SITE="https://linuxfromscratch.org/blfs/view/svn/postlfs/firmware.html#amd-microcode"
10 # See also: https://wiki.gentoo.org/wiki/AMD_microcode
12 DEPENDS="linux"
14 # What is the latest version available today?
15 current_version()
16 {
17 wget -O - https://wiki.gentoo.org/wiki/AMD_microcode 2>/dev/null | \
18 sed '/signed-off/!d;s|.*off, ||;s|).*||;s|\(.*\) \(.*\) \(.*\)|\3.\2.\1|' | tail -n1
19 }
21 # Rules to configure and make the package.
22 compile_rules() {
23 mkdir -p $install/lib/firmware/amd-ucode $install/lib/firmware/amd
25 for i in amd-ucode/microcode_amd.bin amd-ucode/microcode_amd_fam15h.bin \
26 amd-ucode/microcode_amd_fam16h.bin amd-ucode/microcode_amd_fam17h.bin \
27 amd-ucode/microcode_amd_fam19h.bin amd/amd_sev_fam17h_model0xh.sbin \
28 amd/amd_sev_fam17h_model3xh.sbin amd/amd_sev_fam19h_model0xh.sbin ; do
29 [ -f "$SRC/${i#*/}" ] ||
30 wget -O "$SRC/${i#*/}" http://anduin.linuxfromscratch.org/BLFS/linux-firmware/$i
31 if [ ! -f "$SRC/${i#*/}" ]; then
32 echo "ERROR: can't get $i"
33 return 1
34 fi
35 cp "$SRC/${i#*/}" $install/lib/firmware/$i
36 done
37 }
39 # Rules to gen a SliTaz package suitable for Tazpkg.
40 genpkg_rules() {
41 cp -r $install/* $fs
42 }
44 # Pre and post install commands for Tazpkg.
45 post_install() {
46 if [ -z "$1" -a -e /sys/devices/system/cpu/microcode/reload ]; then
47 echo 1 > /sys/devices/system/cpu/microcode/reload
48 fi
49 }