mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 03:30: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
|
||||
Reference in New Issue
Block a user