summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLlewelyn Trahaearn2017-02-11 09:32:41 -0800
committerLlewelyn Trahaearn2017-02-11 09:32:41 -0800
commit2802c4d0e34ee08c04f9ac98639d8ade4a1aa337 (patch)
treed53ad5b3c507e4e512fc33ad729531b88981979a
parent37703ae85d9773fdc3f3d8ddcb773ad71c59e09c (diff)
downloadaur-2802c4d0e34ee08c04f9ac98639d8ade4a1aa337.tar.gz
Rebase on latest PKBUILD from [Core].
-rw-r--r--.SRCINFO56
-rw-r--r--.gitignore7
-rw-r--r--10_linux-detect-archlinux-initramfs.patch (renamed from grub-10_linux-detect-archlinux-initramfs.patch)32
-rw-r--r--60_memtest86+42
-rw-r--r--PKGBUILD233
-rw-r--r--add-GRUB_COLOR_variables.patch (renamed from grub-add-GRUB_COLOR_variables.patch)6
-rw-r--r--grub-git.install15
-rw-r--r--grub.cfg4
-rw-r--r--grub.default3
-rw-r--r--intel-ucode.patch52
10 files changed, 213 insertions, 237 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f25a9ba5109..b3d0d1bda63 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,11 @@
+# Generated by mksrcinfo v8
+# Sat Feb 11 17:30:54 UTC 2017
pkgbase = grub-git
- pkgdesc = GNU GRand Unified Bootloader (2) - GIT Version
- pkgver = 2.02.beta2.428.g697ecef
+ pkgdesc = GNU GRand Unified Bootloader (2)
+ pkgver = grub.2.02.rc1.r3.g529818738
pkgrel = 1
url = https://www.gnu.org/software/grub/
- install = grub.install
+ install = grub-git.install
arch = x86_64
arch = i686
license = GPL3
@@ -18,53 +20,51 @@ pkgbase = grub-git
makedepends = help2man
makedepends = gettext
makedepends = device-mapper
- makedepends = fuse
+ makedepends = fuse2
depends = sh
depends = xz
depends = gettext
depends = device-mapper
optdepends = freetype2: For grub-mkfont usage
- optdepends = fuse: For grub-mount usage
+ optdepends = fuse2: For grub-mount usage
optdepends = dosfstools: For grub-mkrescue FAT FS and EFI support
optdepends = efibootmgr: For grub-install EFI support
optdepends = libisoburn: Provides xorriso for generating grub rescue iso using grub-mkrescue
optdepends = os-prober: To detect other OSes when generating grub.cfg in BIOS systems
optdepends = mtools: For grub-mkrescue FAT FS support
- provides = grub=2.02.beta2.428.g697ecef
- provides = grub-common=2.02.beta2.428.g697ecef
- provides = grub-bios=2.02.beta2.428.g697ecef
- provides = grub-efi-=2.02.beta2.428.g697ecef
- provides = grub-emu=2.02.beta2.428.g697ecef
- provides = grub-bzr=2.02.beta2.428.g697ecef
+ provides = grub
+ provides = grub-common
+ provides = grub-bios
+ provides = grub-emu
+ provides = grub-efi-
conflicts = grub
conflicts = grub-common
conflicts = grub-bios
- conflicts = grub-efi-
conflicts = grub-emu
- conflicts = grub-bzr
+ conflicts = grub-efi-
conflicts = grub-legacy
options = !makeflags
backup = boot/grub/grub.cfg
backup = etc/default/grub
backup = etc/grub.d/40_custom
source = grub::git+git://git.sv.gnu.org/grub.git#branch=master
- source = grub-extras::git+git://git.sv.gnu.org/grub-extras.git#branch=master
- source = http://ftp.gnu.org/gnu/unifont/unifont-6.3.20131217/unifont-6.3.20131217.bdf.gz
- source = http://ftp.gnu.org/gnu/unifont/unifont-6.3.20131217/unifont-6.3.20131217.bdf.gz.sig
- source = grub-10_linux-detect-archlinux-initramfs.patch
- source = grub-add-GRUB_COLOR_variables.patch
- source = 60_memtest86+
+ source = grub-extras::git+git://git.sv.gnu.org/grub-extras.git#commit=branch=master
+ source = https://ftp.gnu.org/gnu/unifont/unifont-9.0.06/unifont-9.0.06.bdf.gz
+ source = https://ftp.gnu.org/gnu/unifont/unifont-9.0.06/unifont-9.0.06.bdf.gz.sig
+ source = intel-ucode.patch
+ source = 10_linux-detect-archlinux-initramfs.patch
+ source = add-GRUB_COLOR_variables.patch
source = grub.default
source = grub.cfg
- sha1sums = SKIP
- sha1sums = SKIP
- sha1sums = 30797ba7a86fc32213b9ae994c9fa45f37d01170
- sha1sums = SKIP
- sha1sums = 7ffd63c38d74f969f72e38fea3500345c5b968b2
- sha1sums = c03d2ea83aa6a44dc383fbf67c29c20469e57f1b
- sha1sums = 10e30eb68fb95c86301112ac95c5b7515413152a
- sha1sums = 55cf103b60f405bd37d44dd24357dedfff0214ee
- sha1sums = 5b7fcb0718a23035c039eb2fda9e088bb13ae611
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = 4246c4773ed70f78a7e27ff1118fd257a280d1102200265ad5d58bb2011195ef
+ sha256sums = SKIP
+ sha256sums = 37adb95049f6cdcbdbf60ed6b6440c5be99a4cd307a0f96c3c3837b6c2e07f3c
+ sha256sums = b41e4438319136b5e74e0abdfcb64ae115393e4e15207490272c425f54026dd3
+ sha256sums = a5198267ceb04dceb6d2ea7800281a42b3f91fd02da55d2cc9ea20d47273ca29
+ sha256sums = df764fbd876947dea973017f95371e53833bf878458140b09f0b70d900235676
+ sha256sums = c5e4f3836130c6885e9273c21f057263eba53f4b7c0e2f111f6e5f2e487a47ad
pkgname = grub-git
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index 1992d178912..00000000000
--- a/.gitignore
+++ /dev/null
@@ -1,7 +0,0 @@
-src/
-pkg/
-*.pkg.tar*
-*.tar.xz
-*.tar.gz
-*.sig
-*.log*
diff --git a/grub-10_linux-detect-archlinux-initramfs.patch b/10_linux-detect-archlinux-initramfs.patch
index 18d9d520c48..5cbd19f51ca 100644
--- a/grub-10_linux-detect-archlinux-initramfs.patch
+++ b/10_linux-detect-archlinux-initramfs.patch
@@ -1,18 +1,8 @@
-From b470ffd22e43acc7c11231180187a720efd88de1 Mon Sep 17 00:00:00 2001
-From: Keshav Amburay <the.ridikulus.rat@gmail.com>
-Date: Sat, 5 Apr 2014 20:40:51 -0400
-Subject: [PATCH] 10_linux: Detect Arch Linux main and fallback initramfs
- images
-
----
- util/grub.d/10_linux.in | 16 +++++++++++++++-
- 1 file changed, 15 insertions(+), 1 deletion(-)
-
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
-index 00d1931..7d4086b 100644
+index f5d3e78..ef59c8c 100644
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
-@@ -81,6 +81,8 @@ linux_entry ()
+@@ -83,6 +83,8 @@ linux_entry ()
case $type in
recovery)
title="$(gettext_printf "%s, with Linux %s (recovery mode)" "${os}" "${version}")" ;;
@@ -21,7 +11,7 @@ index 00d1931..7d4086b 100644
*)
title="$(gettext_printf "%s, with Linux %s" "${os}" "${version}")" ;;
esac
-@@ -180,7 +182,7 @@ while [ "x$list" != "x" ] ; do
+@@ -186,7 +188,7 @@ while [ "x$list" != "x" ] ; do
basename=`basename $linux`
dirname=`dirname $linux`
rel_dirname=`make_system_path_relative_to_its_root $dirname`
@@ -30,25 +20,25 @@ index 00d1931..7d4086b 100644
alt_version=`echo $version | sed -e "s,\.old$,,g"`
linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"
-@@ -236,6 +238,18 @@ while [ "x$list" != "x" ] ; do
+@@ -248,6 +250,18 @@ while [ "x$list" != "x" ] ; do
linux_entry "${OS}" "${version}" advanced \
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
-+
++
+ if test -e "${dirname}/initramfs-${version}-fallback.img" ; then
+ initrd="initramfs-${version}-fallback.img"
-+
++
+ if test -n "${initrd}" ; then
-+ gettext_printf "Found fallback initramfs image: %s\n" "${dirname}/${initrd}" >&2
++ gettext_printf "Found fallback initrd image(s) in %s:%s\n" "${dirname}" "${initrd_extra} ${initrd}" >&2
+ fi
-+
++
+ linux_entry "${OS}" "${version}" fallback \
-+ "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
++ "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
+ fi
-+
++
if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then
linux_entry "${OS}" "${version}" recovery \
"single ${GRUB_CMDLINE_LINUX}"
--
-1.9.1
+2.9.2
diff --git a/60_memtest86+ b/60_memtest86+
deleted file mode 100644
index 7f63e0e045c..00000000000
--- a/60_memtest86+
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/usr/bin/env bash
-########################################################
-# This script generates a memtest86+ entry on grub.cfg #
-# if memtest is installed on the system. #
-########################################################
-
-prefix="/usr"
-exec_prefix="${prefix}"
-datarootdir="/usr/share"
-datadir="${datarootdir}"
-sysconfdir="/etc"
-
-. "${datadir}/grub/grub-mkconfig_lib"
-
-. "${sysconfdir}/default/grub"
-
-MEMTEST86_IMAGE="/boot/memtest86+/memtest.bin"
-CLASS="--class memtest86 --class gnu --class tool"
-
-[[ -z "${GRUB_PLATFORM}" ]] && GRUB_PLATFORM="x86"
-
-check="--is-${GRUB_PLATFORM}-linux"
-
-# MEMTEST86_IMAGE="$(if grub_file_is_not_garbage "${MEMTEST86_IMAGE}" && "${grub_file}" ${check} "${MEMTEST86_IMAGE}" ; then echo -n "${MEMTEST86_IMAGE} " ; fi)"
-
-if [[ "${GRUB_PLATFORM}" == "x86" ]]; then
- if [[ -e "${MEMTEST86_IMAGE}" ]] && is_path_readable_by_grub "${MEMTEST86_IMAGE}" ; then
- ## image exists, create menu entry
- echo "Found memtest86+ image: ${MEMTEST86_IMAGE}" >&2
- _GRUB_MEMTEST_HINTS_STRING="$(${grub_probe} --target=hints_string ${MEMTEST86_IMAGE})"
- _GRUB_MEMTEST_FS_UUID="$(${grub_probe} --target=fs_uuid ${MEMTEST86_IMAGE})"
- _GRUB_MEMTEST_REL_PATH="$(make_system_path_relative_to_its_root ${MEMTEST86_IMAGE})"
- cat << EOF
-if [ x\$grub_platform = xpc ]; then
- menuentry "Memory Tester (memtest86+)" ${CLASS} {
- search --fs-uuid --no-floppy --set=root ${_GRUB_MEMTEST_HINTS_STRING} ${_GRUB_MEMTEST_FS_UUID}
- linux16 ${_GRUB_MEMTEST_REL_PATH} ${GRUB_CMDLINE_MEMTEST86}
- }
-fi
-EOF
- fi
-fi
diff --git a/PKGBUILD b/PKGBUILD
index 4cd9372be36..b177c68afe9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,15 +1,15 @@
-# Maintainer : Keshav Amburay <(the ddoott ridikulus ddoott rat) (aatt) (gemmaeiil) (ddoott) (ccoomm)>
-# Contributor: Zack Buhman
-# Contributor: Tobias Powalowski <tpowa@archlinux.org>
-# Contributor: Ronald van Haren <ronald.archlinux.org>
+# Maintainer: Llewelyn Trahaearn <WoefulDerelict [at] GMail [dot] com>
+# Contributor : Tobias Powalowski <tpowa [at] archlinux [dot] org>
+# Contributor : Ronald van Haren <ronald [at] archlinux [dot] org>
+# Contributor: Keshav Amburay <(the ddoott ridikulus ddoott rat) (aatt) (gemmaeiil) (ddoott) (ccoomm)>
## "1" to enable IA32-EFI build in Arch x86_64, "0" to disable
-_GRUB_IA32_EFI_ARCH_X64="1"
+_IA32_EFI_IN_ARCH_X64="1"
## "1" to enable EMU build, "0" to disable
_GRUB_EMU_BUILD="0"
-_UNIFONT_VER="6.3.20131217"
+_UNIFONT_VER="9.0.06"
[[ "${CARCH}" == "x86_64" ]] && _EFI_ARCH="x86_64"
[[ "${CARCH}" == "i686" ]] && _EFI_ARCH="i386"
@@ -17,28 +17,19 @@ _UNIFONT_VER="6.3.20131217"
[[ "${CARCH}" == "x86_64" ]] && _EMU_ARCH="x86_64"
[[ "${CARCH}" == "i686" ]] && _EMU_ARCH="i386"
-_pkgname="grub"
-pkgname="${_pkgname}-git"
-
-pkgdesc="GNU GRand Unified Bootloader (2) - GIT Version"
-pkgver=2.02.beta2.428.g697ecef
+pkgname="grub-git"
+pkgver=grub.2.02.rc1.r3.g529818738
pkgrel=1
-url="https://www.gnu.org/software/grub/"
+pkgdesc="GNU GRand Unified Bootloader (2)"
arch=('x86_64' 'i686')
+url="https://www.gnu.org/software/grub/"
license=('GPL3')
-backup=('boot/grub/grub.cfg' 'etc/default/grub' 'etc/grub.d/40_custom')
-install="${_pkgname}.install"
-options=('!makeflags')
-
-conflicts=('grub' 'grub-common' 'grub-bios' "grub-efi-${_EFI_ARCH}" 'grub-emu' 'grub-bzr' 'grub-legacy')
-provides=("grub=${pkgver}" "grub-common=${pkgver}" "grub-bios=${pkgver}" "grub-efi-${_EFI_ARCH}=${pkgver}" "grub-emu=${pkgver}" "grub-bzr=${pkgver}")
-
-makedepends=('git' 'rsync' 'xz' 'freetype2' 'ttf-dejavu' 'python' 'autogen'
- 'texinfo' 'help2man' 'gettext' 'device-mapper' 'fuse')
depends=('sh' 'xz' 'gettext' 'device-mapper')
+makedepends=('git' 'rsync' 'xz' 'freetype2' 'ttf-dejavu' 'python' 'autogen'
+ 'texinfo' 'help2man' 'gettext' 'device-mapper' 'fuse2')
optdepends=('freetype2: For grub-mkfont usage'
- 'fuse: For grub-mount usage'
- 'dosfstools: For grub-mkrescue FAT FS and EFI support'
+ 'fuse2: For grub-mount usage'
+ 'dosfstools: For grub-mkrescue FAT FS and EFI support'
'efibootmgr: For grub-install EFI support'
'libisoburn: Provides xorriso for generating grub rescue iso using grub-mkrescue'
'os-prober: To detect other OSes when generating grub.cfg in BIOS systems'
@@ -50,101 +41,106 @@ if [[ "${_GRUB_EMU_BUILD}" == "1" ]]; then
'sdl: For grub-emu SDL support')
fi
+provides=("${pkgname%-*}" 'grub-common' 'grub-bios' 'grub-emu' "grub-efi-${_EFI_ARCH}")
+conflicts=("${pkgname%-*}" 'grub-common' 'grub-bios' 'grub-emu' "grub-efi-${_EFI_ARCH}" 'grub-legacy')
+backup=('boot/grub/grub.cfg' 'etc/default/grub' 'etc/grub.d/40_custom')
+options=('!makeflags')
+install="${pkgname}.install"
source=("grub::git+git://git.sv.gnu.org/grub.git#branch=master"
- "grub-extras::git+git://git.sv.gnu.org/grub-extras.git#branch=master"
- "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-add-GRUB_COLOR_variables.patch'
- '60_memtest86+'
+ "grub-extras::git+git://git.sv.gnu.org/grub-extras.git#commit=branch=master"
+ "https://ftp.gnu.org/gnu/unifont/unifont-${_UNIFONT_VER}/unifont-${_UNIFONT_VER}.bdf.gz"
+ "https://ftp.gnu.org/gnu/unifont/unifont-${_UNIFONT_VER}/unifont-${_UNIFONT_VER}.bdf.gz.sig"
+ 'intel-ucode.patch'
+ '10_linux-detect-archlinux-initramfs.patch'
+ 'add-GRUB_COLOR_variables.patch'
'grub.default'
'grub.cfg')
+sha256sums=('SKIP'
+ 'SKIP'
+ '4246c4773ed70f78a7e27ff1118fd257a280d1102200265ad5d58bb2011195ef'
+ 'SKIP'
+ '37adb95049f6cdcbdbf60ed6b6440c5be99a4cd307a0f96c3c3837b6c2e07f3c'
+ 'b41e4438319136b5e74e0abdfcb64ae115393e4e15207490272c425f54026dd3'
+ 'a5198267ceb04dceb6d2ea7800281a42b3f91fd02da55d2cc9ea20d47273ca29'
+ 'df764fbd876947dea973017f95371e53833bf878458140b09f0b70d900235676'
+ 'c5e4f3836130c6885e9273c21f057263eba53f4b7c0e2f111f6e5f2e487a47ad')
+validpgpkeys=('95D2E9AB8740D8046387FD151A09227B1F435A33') # Paul Hardy <unifoundry@unifoundry.com>
-sha1sums=('SKIP'
- 'SKIP'
- '30797ba7a86fc32213b9ae994c9fa45f37d01170'
- 'SKIP'
- '7ffd63c38d74f969f72e38fea3500345c5b968b2'
- 'c03d2ea83aa6a44dc383fbf67c29c20469e57f1b'
- '10e30eb68fb95c86301112ac95c5b7515413152a'
- '55cf103b60f405bd37d44dd24357dedfff0214ee'
- '5b7fcb0718a23035c039eb2fda9e088bb13ae611')
-
-validpgpkeys=('95D2E9AB8740D8046387FD151A09227B1F435A33') ## Paul Hardy - for unifont
+prepare() {
+ cd grub
-pkgver() {
- cd "${srcdir}/grub/"
- echo "$(git describe --tags)" | sed -e 's|grub.||g' -e 's|-|\.|g'
-}
+ msg "Patch to load Intel microcode"
+ patch -Np1 -i "${srcdir}/intel-ucode.patch"
+ echo
-prepare() {
-
- cd "${srcdir}/grub/"
-
msg "Patch to detect of Arch Linux initramfs images by grub-mkconfig"
- patch -Np1 -i "${srcdir}/grub-10_linux-detect-archlinux-initramfs.patch"
+ patch -Np1 -i "${srcdir}/10_linux-detect-archlinux-initramfs.patch"
echo
-
+
msg "Patch to enable GRUB_COLOR_* variables in grub-mkconfig"
## Based on http://lists.gnu.org/archive/html/grub-devel/2012-02/msg00021.html
- patch -Np1 -i "${srcdir}/grub-add-GRUB_COLOR_variables.patch"
+ patch -Np1 -i "${srcdir}/add-GRUB_COLOR_variables.patch"
echo
-
+
msg "Fix DejaVuSans.ttf location so that grub-mkfont can create *.pf2 files for starfield theme"
sed 's|/usr/share/fonts/dejavu|/usr/share/fonts/dejavu /usr/share/fonts/TTF|g' -i "${srcdir}/grub/configure.ac"
-
+
msg "Fix mkinitcpio 'rw' FS#36275"
sed 's| ro | rw |g' -i "${srcdir}/grub/util/grub.d/10_linux.in"
-
+
msg "Fix OS naming FS#33393"
sed 's|GNU/Linux|Linux|' -i "${srcdir}/grub/util/grub.d/10_linux.in"
-
- # msg "Requires python2"
- # sed 's|python |python2 |g' -i "${srcdir}/grub/autogen.sh"
-
+
+ # msg "autogen.sh requires python (2/3). since bzr is in makedepends, use python2 and no need to pull python3"
+ # sed 's|python |python2 |g' -i "${srcdir}/grub-${_pkgver}/autogen.sh"
+
msg "Pull in latest language files"
./linguas.sh
echo
-
+
msg "Remove not working langs which need LC_ALL=C.UTF-8"
sed -e 's#en@cyrillic en@greek##g' -i "${srcdir}/grub/po/LINGUAS"
-
+
msg "Avoid problem with unifont during compile of grub, http://savannah.gnu.org/bugs/?40330 and https://bugs.archlinux.org/task/37847"
cp "${srcdir}/unifont-${_UNIFONT_VER}.bdf" "${srcdir}/grub/unifont.bdf"
-
+}
+
+pkgver() {
+ cd grub
+ ( set -o pipefail
+ git describe --long --tags 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ )
}
_build_grub-common_and_bios() {
-
msg "Set ARCH dependent variables for bios build"
if [[ "${CARCH}" == 'x86_64' ]]; then
_EFIEMU="--enable-efiemu"
else
_EFIEMU="--disable-efiemu"
fi
-
+
msg "Copy the source for building the bios part"
cp -r "${srcdir}/grub" "${srcdir}/grub-bios"
- cd "${srcdir}/grub-bios/"
-
msg "Add the grub-extra sources for bios build"
install -d "${srcdir}/grub-bios/grub-extras"
- # cp -r "${srcdir}/grub-extras/915resolution" "${srcdir}/grub-bios/grub-extras/915resolution"
- export GRUB_CONTRIB="${srcdir}/grub-bios/grub-extras/"
-
+ cp -r "${srcdir}/grub-extras/915resolution" "${srcdir}/grub-bios/grub-extras/915resolution"
+ export GRUB_CONTRIB="${srcdir}/grub-bios/grub-extras"
+
msg "Unset all compiler FLAGS for bios build"
unset CFLAGS
unset CPPFLAGS
unset CXXFLAGS
unset LDFLAGS
unset MAKEFLAGS
-
- cd "${srcdir}/grub-bios/"
-
+
+ cd "${srcdir}/grub-bios"
+
msg "Run autogen.sh for bios build"
./autogen.sh
echo
-
+
msg "Run ./configure for bios build"
./configure \
--with-platform="pc" \
@@ -170,31 +166,29 @@ _build_grub-common_and_bios() {
--disable-silent-rules \
--disable-werror
echo
-
+
msg "Run make for bios build"
make
echo
}
_build_grub-efi() {
-
msg "Copy the source for building the ${_EFI_ARCH} efi part"
cp -r "${srcdir}/grub" "${srcdir}/grub-efi-${_EFI_ARCH}"
- cd "${srcdir}/grub-efi-${_EFI_ARCH}/"
-
+
msg "Unset all compiler FLAGS for ${_EFI_ARCH} efi build"
unset CFLAGS
unset CPPFLAGS
unset CXXFLAGS
unset LDFLAGS
unset MAKEFLAGS
-
- cd "${srcdir}/grub-efi-${_EFI_ARCH}/"
-
+
+ cd "${srcdir}/grub-efi-${_EFI_ARCH}"
+
msg "Run autogen.sh for ${_EFI_ARCH} efi build"
./autogen.sh
echo
-
+
msg "Run ./configure for ${_EFI_ARCH} efi build"
./configure \
--with-platform="efi" \
@@ -220,32 +214,29 @@ _build_grub-efi() {
--disable-silent-rules \
--disable-werror
echo
-
+
msg "Run make for ${_EFI_ARCH} efi build"
make
echo
-
}
_build_grub-emu() {
-
msg "Copy the source for building the emu part"
cp -r "${srcdir}/grub" "${srcdir}/grub-emu"
- cd "${srcdir}/grub-emu/"
-
+
msg "Unset all compiler FLAGS for emu build"
unset CFLAGS
unset CPPFLAGS
unset CXXFLAGS
unset LDFLAGS
unset MAKEFLAGS
-
- cd "${srcdir}/grub-emu/"
-
+
+ cd "${srcdir}/grub-emu"
+
msg "Run autogen.sh for emu build"
./autogen.sh
echo
-
+
msg "Run ./configure for emu build"
./configure \
--with-platform="emu" \
@@ -272,115 +263,95 @@ _build_grub-emu() {
--disable-silent-rules \
--disable-werror
echo
-
+
msg "Run make for emu build"
make
echo
-
}
build() {
-
- cd "${srcdir}/grub/"
-
msg "Build grub bios stuff"
_build_grub-common_and_bios
echo
-
+
msg "Build grub ${_EFI_ARCH} efi stuff"
_build_grub-efi
echo
-
- if [[ "${CARCH}" == "x86_64" ]] && [[ "${_GRUB_IA32_EFI_ARCH_X64}" == "1" ]]; then
+
+ if [[ "${CARCH}" == "x86_64" ]] && [[ "${_IA32_EFI_IN_ARCH_X64}" == "1" ]]; then
msg "Build grub i386 efi stuff"
_EFI_ARCH="i386" _build_grub-efi
echo
fi
-
+
if [[ "${_GRUB_EMU_BUILD}" == "1" ]]; then
msg "Build grub emu stuff"
_build_grub-emu
echo
fi
-
}
_package_grub-common_and_bios() {
-
cd "${srcdir}/grub-bios/"
-
+
msg "Run make install for bios build"
make DESTDIR="${pkgdir}/" bashcompletiondir="/usr/share/bash-completion/completions" install
echo
-
+
msg "Remove gdb debugging related files for bios build"
rm -f "${pkgdir}/usr/lib/grub/i386-pc"/*.module || true
rm -f "${pkgdir}/usr/lib/grub/i386-pc"/*.image || true
rm -f "${pkgdir}/usr/lib/grub/i386-pc"/{kernel.exec,gdb_grub,gmodule.pl} || true
-
- msg "Install extra /etc/grub.d/ files"
- install -D -m0755 "${srcdir}/60_memtest86+" "${pkgdir}/etc/grub.d/60_memtest86+"
-
+
msg "Install /etc/default/grub (used by grub-mkconfig)"
install -D -m0644 "${srcdir}/grub.default" "${pkgdir}/etc/default/grub"
-
+
msg "Install grub.cfg for backup array"
install -D -m0644 "${srcdir}/grub.cfg" "${pkgdir}/boot/grub/grub.cfg"
-
}
_package_grub-efi() {
-
cd "${srcdir}/grub-efi-${_EFI_ARCH}/"
-
+
msg "Run make install for ${_EFI_ARCH} efi build"
make DESTDIR="${pkgdir}/" bashcompletiondir="/usr/share/bash-completion/completions" install
echo
-
+
msg "Remove gdb debugging related files for ${_EFI_ARCH} efi build"
rm -f "${pkgdir}/usr/lib/grub/${_EFI_ARCH}-efi"/*.module || true
rm -f "${pkgdir}/usr/lib/grub/${_EFI_ARCH}-efi"/*.image || true
rm -f "${pkgdir}/usr/lib/grub/${_EFI_ARCH}-efi"/{kernel.exec,gdb_grub,gmodule.pl} || true
-
}
_package_grub-emu() {
-
cd "${srcdir}/grub-emu/"
-
+
msg "Run make install for emu build"
make DESTDIR="${pkgdir}/" bashcompletiondir="/usr/share/bash-completion/completions" install
echo
-
+
msg "Remove gdb debugging related files for emu build"
rm -f "${pkgdir}/usr/lib/grub/${_EMU_ARCH}-emu"/*.module || true
rm -f "${pkgdir}/usr/lib/grub/${_EMU_ARCH}-emu"/*.image || true
rm -f "${pkgdir}/usr/lib/grub/${_EMU_ARCH}-emu"/{kernel.exec,gdb_grub,gmodule.pl} || true
-
}
package() {
-
- cd "${srcdir}/grub/"
-
- if [[ "${_GRUB_EMU_BUILD}" == "1" ]]; then
- msg "Package grub emu stuff"
- _package_grub-emu
- echo
- fi
-
msg "Package grub ${_EFI_ARCH} efi stuff"
_package_grub-efi
- echo
-
- if [[ "${CARCH}" == "x86_64" ]] && [[ "${_GRUB_IA32_EFI_ARCH_X64}" == "1" ]]; then
+
+ if [[ "${CARCH}" == "x86_64" ]] && [[ "${_IA32_EFI_IN_ARCH_X64}" == "1" ]]; then
msg "Package grub i386 efi stuff"
_EFI_ARCH="i386" _package_grub-efi
echo
fi
-
+
+ if [[ "${_GRUB_EMU_BUILD}" == "1" ]]; then
+ msg "Package grub emu stuff"
+ _package_grub-emu
+ echo
+ fi
+
msg "Package grub bios stuff"
_package_grub-common_and_bios
- echo
-
}
diff --git a/grub-add-GRUB_COLOR_variables.patch b/add-GRUB_COLOR_variables.patch
index fdfbd8591e3..c113a81d575 100644
--- a/grub-add-GRUB_COLOR_variables.patch
+++ b/add-GRUB_COLOR_variables.patch
@@ -1,8 +1,8 @@
diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
-index ca040dd..b7090ed 100644
+index 3390ba9..c416489 100644
--- a/util/grub-mkconfig.in
+++ b/util/grub-mkconfig.in
-@@ -219,6 +219,8 @@ export GRUB_DEFAULT \
+@@ -218,6 +218,8 @@ export GRUB_DEFAULT \
GRUB_THEME \
GRUB_GFXPAYLOAD_LINUX \
GRUB_DISABLE_OS_PROBER \
@@ -12,7 +12,7 @@ index ca040dd..b7090ed 100644
GRUB_SAVEDEFAULT \
GRUB_ENABLE_CRYPTODISK \
diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in
-index ce2ec81..315fb8d 100644
+index d2e7252..8259f45 100644
--- a/util/grub.d/00_header.in
+++ b/util/grub.d/00_header.in
@@ -125,6 +125,14 @@ cat <<EOF
diff --git a/grub-git.install b/grub-git.install
new file mode 100644
index 00000000000..cf2e4b59535
--- /dev/null
+++ b/grub-git.install
@@ -0,0 +1,15 @@
+post_install() {
+ if [ -f /boot/grub/grub.cfg.pacsave ]; then
+ echo "Copying /boot/grub/grub.cfg.pacsave to /boot/grub/grub.cfg"
+ install -D -m0644 /boot/grub/grub.cfg.pacsave /boot/grub/grub.cfg
+ fi
+
+ cat << 'EOM'
+Generating grub.cfg.example config file...
+This may fail on some machines running a custom kernel.
+EOM
+
+ grub-mkconfig -o /boot/grub/grub.cfg.example 2> /dev/null
+ echo "done."
+}
+
diff --git a/grub.cfg b/grub.cfg
index d0db5306cb6..9d9144f870d 100644
--- a/grub.cfg
+++ b/grub.cfg
@@ -91,7 +91,7 @@ menuentry 'Arch Linux, with Linux core repo kernel' --class arch --class gnu-lin
search --no-floppy --fs-uuid --set=root ad4103fa-d940-47ca-8506-301d8071d467
fi
echo 'Loading Linux core repo kernel ...'
- linux /boot/vmlinuz-linux root=UUID=ad4103fa-d940-47ca-8506-301d8071d467 ro quiet
+ linux /boot/vmlinuz-linux root=UUID=ad4103fa-d940-47ca-8506-301d8071d467 rw quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-linux.img
}
@@ -108,7 +108,7 @@ menuentry 'Arch Linux, with Linux core repo kernel (Fallback initramfs)' --class
search --no-floppy --fs-uuid --set=root ad4103fa-d940-47ca-8506-301d8071d467
fi
echo 'Loading Linux core repo kernel ...'
- linux /boot/vmlinuz-linux root=UUID=ad4103fa-d940-47ca-8506-301d8071d467 ro quiet
+ linux /boot/vmlinuz-linux root=UUID=ad4103fa-d940-47ca-8506-301d8071d467 rw quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-linux-fallback.img
}
diff --git a/grub.default b/grub.default
index 8cf2824e4f4..fdd1fc381e4 100644
--- a/grub.default
+++ b/grub.default
@@ -4,9 +4,6 @@ GRUB_DISTRIBUTOR="Arch"
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX=""
-# Disable Sub-menu
-GRUB_DISABLE_SUBMENU=y
-
# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"
diff --git a/intel-ucode.patch b/intel-ucode.patch
new file mode 100644
index 00000000000..98d8de82d0c
--- /dev/null
+++ b/intel-ucode.patch
@@ -0,0 +1,52 @@
+diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
+index de9044c..f5d3e78 100644
+--- a/util/grub.d/10_linux.in
++++ b/util/grub.d/10_linux.in
+@@ -133,13 +133,15 @@ linux_entry ()
+ echo '$(echo "$message" | grub_quote)'
+ linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
+ EOF
+- if test -n "${initrd}" ; then
++ if test -n "${initrd}" -o -n "${initrd_extra}" ; then
+ # TRANSLATORS: ramdisk isn't identifier. Should be translated.
+ message="$(gettext_printf "Loading initial ramdisk ...")"
+- sed "s/^/$submenu_indentation/" << EOF
+- echo '$(echo "$message" | grub_quote)'
+- initrd ${rel_dirname}/${initrd}
+-EOF
++ printf ' %s\n' "echo '$(echo "$message" | grub_quote)'" | sed "s/^/$submenu_indentation/"
++ printf ' %s ' 'initrd' | sed "s/^/$submenu_indentation/"
++ for i in ${initrd_extra} ${initrd}; do
++ printf ' %s/%s' "${rel_dirname}" "${i}"
++ done
++ printf '\n'
+ fi
+ sed "s/^/$submenu_indentation/" << EOF
+ }
+@@ -202,6 +204,12 @@ while [ "x$list" != "x" ] ; do
+ break
+ fi
+ done
++ initrd_extra=
++ for i in intel-ucode.img; do
++ if test -e "${dirname}/${i}" ; then
++ initrd_extra="${initrd_extra} ${i}"
++ fi
++ done
+
+ config=
+ for i in "${dirname}/config-${version}" "${dirname}/config-${alt_version}" "/etc/kernels/kernel-config-${version}" ; do
+@@ -216,8 +224,8 @@ while [ "x$list" != "x" ] ; do
+ initramfs=`grep CONFIG_INITRAMFS_SOURCE= "${config}" | cut -f2 -d= | tr -d \"`
+ fi
+
+- if test -n "${initrd}" ; then
+- gettext_printf "Found initrd image: %s\n" "${dirname}/${initrd}" >&2
++ if test -n "${initrd}" -o -n "${initrd_extra}" ; then
++ gettext_printf "Found initrd image(s) in %s:%s\n" "${dirname}" "${initrd_extra} ${initrd}" >&2
+ elif test -z "${initramfs}" ; then
+ # "UUID=" and "ZFS=" magic is parsed by initrd or initramfs. Since there's
+ # no initrd or builtin initramfs, it can't work here.
+--
+2.9.2
+