load intel microcode in 10_linux

This commit is contained in:
Ronald van Haren 2014-10-27 20:22:52 +00:00
parent 2aeab9aea1
commit c7e84b63f3
2 changed files with 33 additions and 1 deletions

View File

@ -22,7 +22,7 @@ _UNIFONT_VER="6.3.20131217"
pkgname="grub"
pkgdesc="GNU GRand Unified Bootloader (2)"
pkgver=2.02.beta2
pkgrel=4
pkgrel=5
epoch="1"
url="https://www.gnu.org/software/grub/"
arch=('x86_64' 'i686')
@ -57,6 +57,7 @@ source=("grub-${_pkgver}::git+git://git.sv.gnu.org/grub.git#tag=${_GRUB_GIT_TAG}
"http://ftp.gnu.org/gnu/unifont/unifont-${_UNIFONT_VER}/unifont-${_UNIFONT_VER}.bdf.gz"
"http://ftp.gnu.org/gnu/unifont/unifont-${_UNIFONT_VER}/unifont-${_UNIFONT_VER}.bdf.gz.sig"
'grub-10_linux-detect-archlinux-initramfs.patch'
'grub-intel-ucode.patch'
'grub-add-GRUB_COLOR_variables.patch'
'60_memtest86+'
'grub.default'
@ -67,6 +68,7 @@ md5sums=('SKIP'
'728b7439ac733a7c0d56049adec364c7'
'SKIP'
'945527e0de8d384166a4cf23439ae9ee'
'a678629bc82c4e70c48d28242036d1d7'
'e506ae4a9f9f7d1b765febfa84e10d48'
'be55eabc102f2c60b38ed35c203686d6'
'a03ffd56324520393bf574cefccb893d'
@ -81,6 +83,10 @@ prepare() {
cd "${srcdir}/grub-${_pkgver}/"
msg "Patch to load Intel microcode"
patch -Np1 -i "${srcdir}/grub-intel-ucode.patch"
echo
msg "Patch to detect of Arch Linux initramfs images by grub-mkconfig"
patch -Np1 -i "${srcdir}/grub-10_linux-detect-archlinux-initramfs.patch"
echo

26
grub-intel-ucode.patch Normal file
View File

@ -0,0 +1,26 @@
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
index d2e2a8f..f67e50f 100644
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
@@ -65,6 +65,12 @@ case x"$GRUB_FS" in
;;
esac
+intel_ucode=
+if test -e "/boot/intel-ucode.img" ; then
+ gettext_printf "Found Intel Microcode image\n" >&2
+ intel_ucode="$(make_system_path_relative_to_its_root /boot/intel-ucode.img)"
+fi
+
title_correction_code=
linux_entry ()
@@ -136,7 +142,7 @@ EOF
message="$(gettext_printf "Loading initial ramdisk ...")"
sed "s/^/$submenu_indentation/" << EOF
echo '$(echo "$message" | grub_quote)'
- initrd ${rel_dirname}/${initrd}
+ initrd ${intel_ucode} ${rel_dirname}/${initrd}
EOF
fi
sed "s/^/$submenu_indentation/" << EOF