diff options
author | Tomasz Maciej Nowak <tomek_n@o2.pl> | 2018-11-20 17:20:43 +0100 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2018-11-26 12:05:44 +0100 |
commit | 546fced2a23557e95dd34246744c3aa6cad92fe6 (patch) | |
tree | b74e0145b0ae6db0f770da2acae64eb6d2a34143 /target/linux/x86/image | |
parent | ad83fde30de5d154bf723d0fd07f945a8cdb6510 (diff) | |
download | upstream-546fced2a23557e95dd34246744c3aa6cad92fe6.tar.gz upstream-546fced2a23557e95dd34246744c3aa6cad92fe6.tar.bz2 upstream-546fced2a23557e95dd34246744c3aa6cad92fe6.zip |
x86: add intel microcode entries to grub config
Create initrd enries for x86 images, that'll load intel microcode as
early as possible. To achieve that the test module for grub is enabled
which provides shell-like conditionals. Also restrict the late load of
microcode to AMD processors.
Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
Diffstat (limited to 'target/linux/x86/image')
-rw-r--r-- | target/linux/x86/image/Makefile | 4 | ||||
-rw-r--r-- | target/linux/x86/image/grub-iso.cfg | 3 | ||||
-rw-r--r-- | target/linux/x86/image/grub.cfg | 3 |
3 files changed, 8 insertions, 2 deletions
diff --git a/target/linux/x86/image/Makefile b/target/linux/x86/image/Makefile index dbf8a8594b..f8c3700d32 100644 --- a/target/linux/x86/image/Makefile +++ b/target/linux/x86/image/Makefile @@ -9,8 +9,8 @@ include $(INCLUDE_DIR)/image.mk export PATH=$(TARGET_PATH):/sbin -GRUB2_MODULES = biosdisk boot chain configfile ext2 linux ls part_msdos reboot serial vga -GRUB2_MODULES_ISO = biosdisk boot chain configfile iso9660 linux ls part_msdos reboot serial vga +GRUB2_MODULES = biosdisk boot chain configfile ext2 linux ls part_msdos reboot serial test vga +GRUB2_MODULES_ISO = biosdisk boot chain configfile iso9660 linux ls part_msdos reboot serial test vga GRUB_TERMINALS = GRUB_SERIAL_CONFIG = GRUB_TERMINAL_CONFIG = diff --git a/target/linux/x86/image/grub-iso.cfg b/target/linux/x86/image/grub-iso.cfg index 9c59bdf6d4..5d128aa3aa 100644 --- a/target/linux/x86/image/grub-iso.cfg +++ b/target/linux/x86/image/grub-iso.cfg @@ -7,4 +7,7 @@ set root='(cd)' menuentry "@TITLE@" { linux /boot/vmlinuz @CMDLINE@ noinitrd + if [ -s /boot/intel-ucode.img ]; then + initrd /boot/intel-ucode.img + fi } diff --git a/target/linux/x86/image/grub.cfg b/target/linux/x86/image/grub.cfg index dedfa0a636..a665686863 100644 --- a/target/linux/x86/image/grub.cfg +++ b/target/linux/x86/image/grub.cfg @@ -7,6 +7,9 @@ set root='(@ROOT@)' menuentry "@TITLE@" { linux /boot/vmlinuz @CMDLINE@ noinitrd + if [ -s /boot/intel-ucode.img ]; then + initrd /boot/intel-ucode.img + fi } menuentry "@TITLE@ (failsafe)" { linux /boot/vmlinuz failsafe=true @CMDLINE@ noinitrd |