SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "amd-microcode"

# SliTaz package receipt.

PACKAGE="amd-microcode"
VERSION="20210910"
CATEGORY="kernel"
SHORT_DESC="AMD processor microcode update for Linux"
MAINTAINER="al.bobylev@gmail.com"
LICENSE="unknown"
WEB_SITE="https://linuxfromscratch.org/blfs/view/svn/postlfs/firmware.html#amd-microcode"
# See also: https://wiki.gentoo.org/wiki/AMD_microcode

DEPENDS="linux"

# What is the latest version available today?
current_version()
{
    wget -O - https://wiki.gentoo.org/wiki/AMD_microcode 2>/dev/null | \
    sed '/signed-off/!d;s|.*off, ||;s|).*||;s| |-|g' | tail -n1 | xargs date +%Y%m%d -d
}

# Rules to configure and make the package.
compile_rules() {
    mkdir -p $install/lib/firmware/amd-ucode $install/lib/firmware/amd

    for i in  amd-ucode/microcode_amd.bin amd-ucode/microcode_amd_fam15h.bin \
          amd-ucode/microcode_amd_fam16h.bin amd-ucode/microcode_amd_fam17h.bin \
          amd-ucode/microcode_amd_fam19h.bin amd/amd_sev_fam17h_model0xh.sbin \
          amd/amd_sev_fam17h_model3xh.sbin amd/amd_sev_fam19h_model0xh.sbin ; do
        [ -f "$SRC/${i#*/}" ] ||
        wget -O "$SRC/${i#*/}" http://anduin.linuxfromscratch.org/BLFS/linux-firmware/$i
        if [ ! -f "$SRC/${i#*/}" ]; then
            echo "ERROR: can't get $i"
            return 1
        fi
        cp "$SRC/${i#*/}" $install/lib/firmware/$i
    done
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules() {
    cp -r $install/* $fs
}

# Pre and post install commands for Tazpkg.
post_install() {
    if [ -z "$1" -a -e /sys/devices/system/cpu/microcode/reload ]; then
        echo 1 > /sys/devices/system/cpu/microcode/reload
    fi
}
6047 packages and 209931 files in current database (Mon Jul 1 15:25:36 2024)