aboutsummaryrefslogblamecommitdiff
path: root/scripts/os/freebsd/80-microcode
blob: 0d2a910d9d619353dd59f793ae97335a10ff8577 (plain) (tree)
1
2
3
4
5
6
7
8
9








                                                   



                                                    
 



                                                         
#!/bin/sh

: ${microcode_name:='intel-ucode.bin'}

# Only run this file on baremetal hosts.
if [ "$BOXCONF_VIRTUALIZATION_TYPE" != none ]; then
  return
fi

if [ "${enable_microcode_updates:-}" = false ]; then
  set_loader_conf cpu_microcode_load=NO
else
  pkg install -y cpu-microcode

  set_loader_conf \
    cpu_microcode_load=YES \
    cpu_microcode_name="/boot/firmware/${microcode_name}"
fi