mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-03 15:07:14 +08:00
grub: look for ucode
This commit is contained in:
parent
142c703e38
commit
c5d8b3fafe
@ -16,7 +16,7 @@ _EFI_ARCH="x86_64"
|
||||
pkgname="grub"
|
||||
pkgdesc="GNU GRand Unified Bootloader (2)"
|
||||
pkgver=2.02.beta2
|
||||
pkgrel=2
|
||||
pkgrel=3
|
||||
url="https://www.gnu.org/software/grub/"
|
||||
arch=('x86_64')
|
||||
license=('GPL3')
|
||||
@ -40,10 +40,11 @@ optdepends=('freetype2: For grub-mkfont usage'
|
||||
'mtools: For grub-mkrescue FAT FS support')
|
||||
|
||||
source=("grub-${_pkgver}::git+git://git.sv.gnu.org/grub.git#tag=${_GRUB_GIT_TAG}"
|
||||
"grub-extras::git+git://git.sv.gnu.org/grub-extras.git#branch=master"
|
||||
"grub-extras::git+git://git.sv.gnu.org/grub-extras.git#commit=5d12c95d58747592ac310fa370897ae25db0e58d"
|
||||
"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'
|
||||
'grub.default'
|
||||
'update-grub')
|
||||
@ -53,6 +54,7 @@ md5sums=('SKIP'
|
||||
'728b7439ac733a7c0d56049adec364c7'
|
||||
'SKIP'
|
||||
'945527e0de8d384166a4cf23439ae9ee'
|
||||
'a678629bc82c4e70c48d28242036d1d7'
|
||||
'e506ae4a9f9f7d1b765febfa84e10d48'
|
||||
'31e4c7414cef3db3fb26c40ac8da97f2'
|
||||
'9910bdfd42fa7d3e21e6961bfcc977f9')
|
||||
@ -65,7 +67,11 @@ _pkgver() {
|
||||
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 Chakra Linux initramfs images by grub-mkconfig (same as Arch)"
|
||||
patch -Np1 -i "${srcdir}/grub-10_linux-detect-archlinux-initramfs.patch"
|
||||
echo
|
||||
|
26
grub/grub-intel-ucode.patch
Normal file
26
grub/grub-intel-ucode.patch
Normal 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
|
Loading…
Reference in New Issue
Block a user