mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
intel_microcode: copy the current cpu microcode in non-packaged
the boot loader can then pick and load the microcode on the next boot
This commit is contained in:
8
sys-firmware/intel-microcode/additional-files/intel_copy_microcode.sh
Executable file
8
sys-firmware/intel-microcode/additional-files/intel_copy_microcode.sh
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
dataDir=`finddir B_SYSTEM_DATA_DIRECTORY`/firmware/intel-ucode
|
||||
targetDir=`finddir B_SYSTEM_NONPACKAGED_DATA_DIRECTORY`/firmware/intel-ucode
|
||||
mkdir -p $targetDir
|
||||
cpuinfo=$(sysinfo -cpu | grep -oE 'family [[:digit:]]+, model [[:digit:]]+, stepping [[:digit:]]+' | uniq | sed -e 's/[^0-9]\+/ /g' -e 's/^ //')
|
||||
microcodeFile=$(printf '%02x-%02x-%02x\n' $cpuinfo)
|
||||
cp -p $dataDir/$microcodeFile $targetDir
|
||||
true
|
||||
@@ -7,14 +7,17 @@ using the system BIOS, but for a subset of Intel's processors this can be done\
|
||||
HOMEPAGE="https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files/"
|
||||
COPYRIGHT="2018-2024 Intel Corporation"
|
||||
LICENSE="Intel CPU Microcode"
|
||||
REVISION="1"
|
||||
REVISION="2"
|
||||
SOURCE_URI="https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files/archive/microcode-$portVersion.tar.gz"
|
||||
SOURCE_DIR="Intel-Linux-Processor-Microcode-Data-Files-microcode-$portVersion"
|
||||
CHECKSUM_SHA256="9575c6d74491058bbf998c359d7f25f23655d97a31663a8ed6a98def2b0aaf2b"
|
||||
ADDITIONAL_FILES="intel_copy_microcode.sh"
|
||||
|
||||
ARCHITECTURES="any"
|
||||
DISABLE_SOURCE_PACKAGE="yes"
|
||||
|
||||
POST_INSTALL_SCRIPTS="$relativePostInstallDir/intel_copy_microcode.sh"
|
||||
|
||||
PROVIDES="
|
||||
intel_microcode = $portVersion
|
||||
"
|
||||
@@ -23,4 +26,8 @@ INSTALL()
|
||||
{
|
||||
mkdir -p $dataDir/firmware/intel-ucode
|
||||
cp intel-ucode{,-with-caveats}/* $dataDir/firmware/intel-ucode/
|
||||
|
||||
# install postinstallscript
|
||||
mkdir -p $postInstallDir
|
||||
install -t $postInstallDir $portDir/additional-files/intel_copy_microcode.sh
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user