x86: add intel microcode entries to grub config
[openwrt/staging/jogo.git] / target / linux / x86 / base-files / lib / preinit / 02_load_x86_ucode
1 #!/bin/sh
2 # Copyright (C) 2018 OpenWrt.org
3
4 do_load_x86_ucode() {
5 if grep -q AuthenticAMD /proc/cpuinfo; then
6 if [ -e "/sys/devices/system/cpu/microcode/reload" ]; then
7 echo 1 > /sys/devices/system/cpu/microcode/reload
8 fi
9 fi
10 }
11
12 boot_hook_add preinit_main do_load_x86_ucode