summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libre/grub/0005-Allow_GRUB_to_mount_ext234_filesystems_that_have_the_encryption_feature.patch140
-rw-r--r--libre/grub/0006-tsc-Change-default-tsc-calibration-method-to-pmtimer-on-EFI-systems.patch31
-rw-r--r--libre/grub/0007-grub-mkconfig_10_linux_Support_multiple_early_initrd_images.patch177
-rw-r--r--libre/grub/0008-Fix-packed-not-aligned-error-on-GCC-8.patch72
-rw-r--r--libre/grub/0009-xfs-Accept-filesystem-with-sparse-inodes.patch60
-rw-r--r--libre/grub/0010-relocation.patch65
-rw-r--r--libre/grub/PKGBUILD258
-rw-r--r--libre/grub/grub.default8
8 files changed, 132 insertions, 679 deletions
diff --git a/libre/grub/0005-Allow_GRUB_to_mount_ext234_filesystems_that_have_the_encryption_feature.patch b/libre/grub/0005-Allow_GRUB_to_mount_ext234_filesystems_that_have_the_encryption_feature.patch
deleted file mode 100644
index 22d62926f..000000000
--- a/libre/grub/0005-Allow_GRUB_to_mount_ext234_filesystems_that_have_the_encryption_feature.patch
+++ /dev/null
@@ -1,140 +0,0 @@
-From 734668238fcc0ef691a080839e04f33854fa133a Mon Sep 17 00:00:00 2001
-From: Eric Biggers <ebiggers@google.com>
-Date: Thu, 29 Jun 2017 13:27:49 +0000
-Subject: Allow GRUB to mount ext2/3/4 filesystems that have the encryption
- feature.
-
-On such a filesystem, inodes may have EXT4_ENCRYPT_FLAG set.
-For a regular file, this means its contents are encrypted; for a
-directory, this means the filenames in its directory entries are
-encrypted; and for a symlink, this means its target is encrypted. Since
-GRUB cannot decrypt encrypted contents or filenames, just issue an error
-if it would need to do so. This is sufficient to allow unencrypted boot
-files to co-exist with encrypted files elsewhere on the filesystem.
-
-(Note that encrypted regular files and symlinks will not normally be
-encountered outside an encrypted directory; however, it's possible via
-hard links, so they still need to be handled.)
-
-Tested by booting from an ext4 /boot partition on which I had run
-'tune2fs -O encrypt'. I also verified that the expected error messages
-are printed when trying to access encrypted directories, files, and
-symlinks from the GRUB command line. Also ran 'sudo ./grub-fs-tester
-ext4_encrypt'; note that this requires e2fsprogs v1.43+ and Linux v4.1+.
-
-Signed-off-by: Eric Biggers <ebiggers@google.com>
----
- grub-core/fs/ext2.c | 23 ++++++++++++++++++++++-
- tests/ext234_test.in | 1 +
- tests/util/grub-fs-tester.in | 10 ++++++++++
- 3 files changed, 33 insertions(+), 1 deletion(-)
-
-diff --git a/grub-core/fs/ext2.c b/grub-core/fs/ext2.c
-index cdce63b..b8ad75a 100644
---- a/grub-core/fs/ext2.c
-+++ b/grub-core/fs/ext2.c
-@@ -102,6 +102,7 @@ GRUB_MOD_LICENSE ("GPLv3+");
- #define EXT4_FEATURE_INCOMPAT_64BIT 0x0080
- #define EXT4_FEATURE_INCOMPAT_MMP 0x0100
- #define EXT4_FEATURE_INCOMPAT_FLEX_BG 0x0200
-+#define EXT4_FEATURE_INCOMPAT_ENCRYPT 0x10000
-
- /* The set of back-incompatible features this driver DOES support. Add (OR)
- * flags here as the related features are implemented into the driver. */
-@@ -109,7 +110,8 @@ GRUB_MOD_LICENSE ("GPLv3+");
- | EXT4_FEATURE_INCOMPAT_EXTENTS \
- | EXT4_FEATURE_INCOMPAT_FLEX_BG \
- | EXT2_FEATURE_INCOMPAT_META_BG \
-- | EXT4_FEATURE_INCOMPAT_64BIT)
-+ | EXT4_FEATURE_INCOMPAT_64BIT \
-+ | EXT4_FEATURE_INCOMPAT_ENCRYPT)
- /* List of rationales for the ignored "incompatible" features:
- * needs_recovery: Not really back-incompatible - was added as such to forbid
- * ext2 drivers from mounting an ext3 volume with a dirty
-@@ -138,6 +140,7 @@ GRUB_MOD_LICENSE ("GPLv3+");
- #define EXT3_JOURNAL_FLAG_DELETED 4
- #define EXT3_JOURNAL_FLAG_LAST_TAG 8
-
-+#define EXT4_ENCRYPT_FLAG 0x800
- #define EXT4_EXTENTS_FLAG 0x80000
-
- /* The ext2 superblock. */
-@@ -706,6 +709,12 @@ grub_ext2_read_symlink (grub_fshelp_node_t node)
- grub_ext2_read_inode (diro->data, diro->ino, &diro->inode);
- if (grub_errno)
- return 0;
-+
-+ if (diro->inode.flags & grub_cpu_to_le32_compile_time (EXT4_ENCRYPT_FLAG))
-+ {
-+ grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET, "symlink is encrypted");
-+ return 0;
-+ }
- }
-
- symlink = grub_malloc (grub_le_to_cpu32 (diro->inode.size) + 1);
-@@ -749,6 +758,12 @@ grub_ext2_iterate_dir (grub_fshelp_node_t dir,
- return 0;
- }
-
-+ if (diro->inode.flags & grub_cpu_to_le32_compile_time (EXT4_ENCRYPT_FLAG))
-+ {
-+ grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET, "directory is encrypted");
-+ return 0;
-+ }
-+
- /* Search the file. */
- while (fpos < grub_le_to_cpu32 (diro->inode.size))
- {
-@@ -859,6 +874,12 @@ grub_ext2_open (struct grub_file *file, const char *name)
- goto fail;
- }
-
-+ if (fdiro->inode.flags & grub_cpu_to_le32_compile_time (EXT4_ENCRYPT_FLAG))
-+ {
-+ err = grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET, "file is encrypted");
-+ goto fail;
-+ }
-+
- grub_memcpy (data->inode, &fdiro->inode, sizeof (struct grub_ext2_inode));
- grub_free (fdiro);
-
-diff --git a/tests/ext234_test.in b/tests/ext234_test.in
-index 892b99c..4f1eb52 100644
---- a/tests/ext234_test.in
-+++ b/tests/ext234_test.in
-@@ -30,3 +30,4 @@ fi
- "@builddir@/grub-fs-tester" ext3
- "@builddir@/grub-fs-tester" ext4
- "@builddir@/grub-fs-tester" ext4_metabg
-+"@builddir@/grub-fs-tester" ext4_encrypt
-diff --git a/tests/util/grub-fs-tester.in b/tests/util/grub-fs-tester.in
-index 88cbe73..fd7e0f1 100644
---- a/tests/util/grub-fs-tester.in
-+++ b/tests/util/grub-fs-tester.in
-@@ -156,6 +156,12 @@ for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE" 1); do
- # Could go further but what's the point?
- MAXBLKSIZE=$((65536*1024))
- ;;
-+ xext4_encrypt)
-+ # OS LIMITATION: Linux currently only allows the 'encrypt' feature
-+ # in combination with block_size = PAGE_SIZE (4096 bytes on x86).
-+ MINBLKSIZE=$(getconf PAGE_SIZE)
-+ MAXBLKSIZE=$MINBLKSIZE
-+ ;;
- xext*)
- MINBLKSIZE=1024
- if [ $MINBLKSIZE -lt $SECSIZE ]; then
-@@ -796,6 +802,10 @@ for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE" 1); do
- MKE2FS_DEVICE_SECTSIZE=$SECSIZE "mkfs.ext4" -O meta_bg,^resize_inode -b $BLKSIZE -L "$FSLABEL" -q "${MOUNTDEVICE}"
- MOUNTFS=ext4
- ;;
-+ xext4_encrypt)
-+ MKE2FS_DEVICE_SECTSIZE=$SECSIZE "mkfs.ext4" -O encrypt -b $BLKSIZE -L "$FSLABEL" -q "${MOUNTDEVICE}"
-+ MOUNTFS=ext4
-+ ;;
- xext*)
- MKE2FS_DEVICE_SECTSIZE=$SECSIZE "mkfs.$fs" -b $BLKSIZE -L "$FSLABEL" -q "${MOUNTDEVICE}" ;;
- xxfs)
---
-cgit v1.0-41-gc330
-
diff --git a/libre/grub/0006-tsc-Change-default-tsc-calibration-method-to-pmtimer-on-EFI-systems.patch b/libre/grub/0006-tsc-Change-default-tsc-calibration-method-to-pmtimer-on-EFI-systems.patch
deleted file mode 100644
index 38dcddad6..000000000
--- a/libre/grub/0006-tsc-Change-default-tsc-calibration-method-to-pmtimer-on-EFI-systems.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 446794de8da4329ea532cbee4ca877bcafd0e534 Mon Sep 17 00:00:00 2001
-From: "David E. Box" <david.e.box@linux.intel.com>
-Date: Fri, 15 Sep 2017 15:37:05 -0700
-Subject: tsc: Change default tsc calibration method to pmtimer on EFI systems
-
-On efi systems, make pmtimer based tsc calibration the default over the
-pit. This prevents Grub from hanging on Intel SoC systems that power gate
-the pit.
-
-Signed-off-by: David E. Box <david.e.box@linux.intel.com>
-Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
----
- grub-core/kern/i386/tsc.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/grub-core/kern/i386/tsc.c b/grub-core/kern/i386/tsc.c
-index 2e85289d8..f266eb131 100644
---- a/grub-core/kern/i386/tsc.c
-+++ b/grub-core/kern/i386/tsc.c
-@@ -68,7 +68,7 @@ grub_tsc_init (void)
- #ifdef GRUB_MACHINE_XEN
- (void) (grub_tsc_calibrate_from_xen () || calibrate_tsc_hardcode());
- #elif defined (GRUB_MACHINE_EFI)
-- (void) (grub_tsc_calibrate_from_pit () || grub_tsc_calibrate_from_pmtimer () || grub_tsc_calibrate_from_efi() || calibrate_tsc_hardcode());
-+ (void) (grub_tsc_calibrate_from_pmtimer () || grub_tsc_calibrate_from_pit () || grub_tsc_calibrate_from_efi() || calibrate_tsc_hardcode());
- #elif defined (GRUB_MACHINE_COREBOOT)
- (void) (grub_tsc_calibrate_from_pmtimer () || grub_tsc_calibrate_from_pit () || calibrate_tsc_hardcode());
- #else
---
-cgit v1.1-26-g67d0
-
diff --git a/libre/grub/0007-grub-mkconfig_10_linux_Support_multiple_early_initrd_images.patch b/libre/grub/0007-grub-mkconfig_10_linux_Support_multiple_early_initrd_images.patch
deleted file mode 100644
index a0c5cbc09..000000000
--- a/libre/grub/0007-grub-mkconfig_10_linux_Support_multiple_early_initrd_images.patch
+++ /dev/null
@@ -1,177 +0,0 @@
-From a698240df0c43278b2d1d7259c8e7a6926c63112 Mon Sep 17 00:00:00 2001
-From: "Matthew S. Turnbull" <sparky@bluefang-logic.com>
-Date: Sat, 24 Feb 2018 17:44:58 -0500
-Subject: grub-mkconfig/10_linux: Support multiple early initrd images
-
-Add support for multiple, shared, early initrd images. These early
-images will be loaded in the order declared, and all will be loaded
-before the initrd image.
-
-While many classes of data can be provided by early images, the
-immediate use case would be for distributions to provide CPU
-microcode to mitigate the Meltdown and Spectre vulnerabilities.
-
-There are two environment variables provided for declaring the early
-images.
-
-* GRUB_EARLY_INITRD_LINUX_STOCK is for the distribution declare
- images that are provided by the distribution or installed packages.
- If undeclared, this will default to a set of common microcode image
- names.
-
-* GRUB_EARLY_INITRD_LINUX_CUSTOM is for user created images. User
- images will be loaded after the stock images.
-
-These separate configurations allow the distribution and user to
-declare different image sets without clobbering each other.
-
-This also makes a minor update to ensure that UUID partition labels
-stay disabled when no initrd image is found, even if early images are
-present.
-
-This is a continuation of a previous patch published by Christian
-Hesse in 2016:
-http://lists.gnu.org/archive/html/grub-devel/2016-02/msg00025.html
-
-Down stream Gentoo bug:
-https://bugs.gentoo.org/645088
-
-Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-Signed-off-by: Matthew S. Turnbull <sparky@bluefang-logic.com>
-Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
----
- docs/grub.texi | 19 +++++++++++++++++++
- util/grub-mkconfig.in | 8 ++++++++
- util/grub.d/10_linux.in | 33 +++++++++++++++++++++++++++------
- 3 files changed, 54 insertions(+), 6 deletions(-)
-
-diff --git a/docs/grub.texi b/docs/grub.texi
-index 137b894fa..65b4bbeda 100644
---- a/docs/grub.texi
-+++ b/docs/grub.texi
-@@ -1398,6 +1398,25 @@ for all respectively normal entries.
- The values of these options replace the values of @samp{GRUB_CMDLINE_LINUX}
- and @samp{GRUB_CMDLINE_LINUX_DEFAULT} for Linux and Xen menu entries.
-
-+@item GRUB_EARLY_INITRD_LINUX_CUSTOM
-+@itemx GRUB_EARLY_INITRD_LINUX_STOCK
-+List of space-separated early initrd images to be loaded from @samp{/boot}.
-+This is for loading things like CPU microcode, firmware, ACPI tables, crypto
-+keys, and so on. These early images will be loaded in the order declared,
-+and all will be loaded before the actual functional initrd image.
-+
-+@samp{GRUB_EARLY_INITRD_LINUX_STOCK} is for your distribution to declare
-+images that are provided by the distribution. It should not be modified
-+without understanding the consequences. They will be loaded first.
-+
-+@samp{GRUB_EARLY_INITRD_LINUX_CUSTOM} is for your custom created images.
-+
-+The default stock images are as follows, though they may be overridden by
-+your distribution:
-+@example
-+intel-uc.img intel-ucode.img amd-uc.img amd-ucode.img early_ucode.cpio microcode.cpio
-+@end example
-+
- @item GRUB_DISABLE_LINUX_UUID
- Normally, @command{grub-mkconfig} will generate menu entries that use
- universally-unique identifiers (UUIDs) to identify the root filesystem to
-diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
-index f8496d28b..35ef583b0 100644
---- a/util/grub-mkconfig.in
-+++ b/util/grub-mkconfig.in
-@@ -147,6 +147,12 @@ if [ x"$GRUB_FS" = xunknown ]; then
- GRUB_FS="$(stat -f --printf=%T / || echo unknown)"
- fi
-
-+# Provide a default set of stock linux early initrd images.
-+# Define here so the list can be modified in the sourced config file.
-+if [ "x${GRUB_EARLY_INITRD_LINUX_STOCK}" = "x" ]; then
-+ GRUB_EARLY_INITRD_LINUX_STOCK="intel-uc.img intel-ucode.img amd-uc.img amd-ucode.img early_ucode.cpio microcode.cpio"
-+fi
-+
- if test -f ${sysconfdir}/default/grub ; then
- . ${sysconfdir}/default/grub
- fi
-@@ -211,6 +217,8 @@ export GRUB_DEFAULT \
- GRUB_CMDLINE_NETBSD \
- GRUB_CMDLINE_NETBSD_DEFAULT \
- GRUB_CMDLINE_GNUMACH \
-+ GRUB_EARLY_INITRD_LINUX_CUSTOM \
-+ GRUB_EARLY_INITRD_LINUX_STOCK \
- GRUB_TERMINAL_INPUT \
- GRUB_TERMINAL_OUTPUT \
- GRUB_SERIAL_COMMAND \
-diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
-index de9044c7f..faedf74e1 100644
---- a/util/grub.d/10_linux.in
-+++ b/util/grub.d/10_linux.in
-@@ -136,9 +136,13 @@ EOF
- if test -n "${initrd}" ; then
- # TRANSLATORS: ramdisk isn't identifier. Should be translated.
- message="$(gettext_printf "Loading initial ramdisk ...")"
-+ initrd_path=
-+ for i in ${initrd}; do
-+ initrd_path="${initrd_path} ${rel_dirname}/${i}"
-+ done
- sed "s/^/$submenu_indentation/" << EOF
- echo '$(echo "$message" | grub_quote)'
-- initrd ${rel_dirname}/${initrd}
-+ initrd $(echo $initrd_path)
- EOF
- fi
- sed "s/^/$submenu_indentation/" << EOF
-@@ -188,7 +192,15 @@ while [ "x$list" != "x" ] ; do
- alt_version=`echo $version | sed -e "s,\.old$,,g"`
- linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"
-
-- initrd=
-+ initrd_early=
-+ for i in ${GRUB_EARLY_INITRD_LINUX_STOCK} \
-+ ${GRUB_EARLY_INITRD_LINUX_CUSTOM}; do
-+ if test -e "${dirname}/${i}" ; then
-+ initrd_early="${initrd_early} ${i}"
-+ fi
-+ done
-+
-+ initrd_real=
- for i in "initrd.img-${version}" "initrd-${version}.img" "initrd-${version}.gz" \
- "initrd-${version}" "initramfs-${version}.img" \
- "initrd.img-${alt_version}" "initrd-${alt_version}.img" \
-@@ -198,11 +210,22 @@ while [ "x$list" != "x" ] ; do
- "initramfs-genkernel-${GENKERNEL_ARCH}-${version}" \
- "initramfs-genkernel-${GENKERNEL_ARCH}-${alt_version}"; do
- if test -e "${dirname}/${i}" ; then
-- initrd="$i"
-+ initrd_real="${i}"
- break
- fi
- done
-
-+ initrd=
-+ if test -n "${initrd_early}" || test -n "${initrd_real}"; then
-+ initrd="${initrd_early} ${initrd_real}"
-+
-+ initrd_display=
-+ for i in ${initrd}; do
-+ initrd_display="${initrd_display} ${dirname}/${i}"
-+ done
-+ gettext_printf "Found initrd image: %s\n" "$(echo $initrd_display)" >&2
-+ fi
-+
- config=
- for i in "${dirname}/config-${version}" "${dirname}/config-${alt_version}" "/etc/kernels/kernel-config-${version}" ; do
- if test -e "${i}" ; then
-@@ -216,9 +239,7 @@ 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
-- elif test -z "${initramfs}" ; then
-+ if test -z "${initramfs}" && test -z "${initrd_real}" ; then
- # "UUID=" and "ZFS=" magic is parsed by initrd or initramfs. Since there's
- # no initrd or builtin initramfs, it can't work here.
- linux_root_device_thisversion=${GRUB_DEVICE}
---
-cgit v1.1-33-g03f6
-
diff --git a/libre/grub/0008-Fix-packed-not-aligned-error-on-GCC-8.patch b/libre/grub/0008-Fix-packed-not-aligned-error-on-GCC-8.patch
deleted file mode 100644
index 2d09149f7..000000000
--- a/libre/grub/0008-Fix-packed-not-aligned-error-on-GCC-8.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From 563b1da6e6ae7af46cc8354cadb5dab416989f0a Mon Sep 17 00:00:00 2001
-From: Michael Chang <mchang@suse.com>
-Date: Mon, 26 Mar 2018 16:52:34 +0800
-Subject: Fix packed-not-aligned error on GCC 8
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-When building with GCC 8, there are several errors regarding packed-not-aligned.
-
-./include/grub/gpt_partition.h:79:1: error: alignment 1 of ‘struct grub_gpt_partentry’ is less than 8 [-Werror=packed-not-aligned]
-
-This patch fixes the build error by cleaning up the ambiguity of placing
-aligned structure in a packed one. In "struct grub_btrfs_time" and "struct
-grub_gpt_part_type", the aligned attribute seems to be superfluous, and also
-has to be packed, to ensure the structure is bit-to-bit mapped to the format
-laid on disk. I think we could blame to copy and paste error here for the
-mistake. In "struct efi_variable", we have to use grub_efi_packed_guid_t, as
-the name suggests. :)
-
-Signed-off-by: Michael Chang <mchang@suse.com>
-Tested-by: Michael Chang <mchang@suse.com>
-Tested-by: Paul Menzel <paulepanter@users.sourceforge.net>
-Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
----
- grub-core/fs/btrfs.c | 2 +-
- include/grub/efiemu/runtime.h | 2 +-
- include/grub/gpt_partition.h | 2 +-
- 3 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c
-index 4849c1ceb..be195448d 100644
---- a/grub-core/fs/btrfs.c
-+++ b/grub-core/fs/btrfs.c
-@@ -175,7 +175,7 @@ struct grub_btrfs_time
- {
- grub_int64_t sec;
- grub_uint32_t nanosec;
--} __attribute__ ((aligned (4)));
-+} GRUB_PACKED;
-
- struct grub_btrfs_inode
- {
-diff --git a/include/grub/efiemu/runtime.h b/include/grub/efiemu/runtime.h
-index 9b6b729f4..36d2dedf4 100644
---- a/include/grub/efiemu/runtime.h
-+++ b/include/grub/efiemu/runtime.h
-@@ -29,7 +29,7 @@ struct grub_efiemu_ptv_rel
-
- struct efi_variable
- {
-- grub_efi_guid_t guid;
-+ grub_efi_packed_guid_t guid;
- grub_uint32_t namelen;
- grub_uint32_t size;
- grub_efi_uint32_t attributes;
-diff --git a/include/grub/gpt_partition.h b/include/grub/gpt_partition.h
-index 1b32f6725..9668a68c3 100644
---- a/include/grub/gpt_partition.h
-+++ b/include/grub/gpt_partition.h
-@@ -28,7 +28,7 @@ struct grub_gpt_part_type
- grub_uint16_t data2;
- grub_uint16_t data3;
- grub_uint8_t data4[8];
--} __attribute__ ((aligned(8)));
-+} GRUB_PACKED;
- typedef struct grub_gpt_part_type grub_gpt_part_type_t;
-
- #define GRUB_GPT_PARTITION_TYPE_EMPTY \
---
-cgit v1.1-33-g03f6
-
diff --git a/libre/grub/0009-xfs-Accept-filesystem-with-sparse-inodes.patch b/libre/grub/0009-xfs-Accept-filesystem-with-sparse-inodes.patch
deleted file mode 100644
index 6c6a750b4..000000000
--- a/libre/grub/0009-xfs-Accept-filesystem-with-sparse-inodes.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From cda0a857dd7a27cd5d621747464bfe71e8727fff Mon Sep 17 00:00:00 2001
-From: Daniel Kiper <daniel.kiper@oracle.com>
-Date: Tue, 29 May 2018 16:16:02 +0200
-Subject: xfs: Accept filesystem with sparse inodes
-
-The sparse inode metadata format became a mkfs.xfs default in
-xfsprogs-4.16.0, and such filesystems are now rejected by grub as
-containing an incompatible feature.
-
-In essence, this feature allows xfs to allocate inodes into fragmented
-freespace. (Without this feature, if xfs could not allocate contiguous
-space for 64 new inodes, inode creation would fail.)
-
-In practice, the disk format change is restricted to the inode btree,
-which as far as I can tell is not used by grub. If all you're doing
-today is parsing a directory, reading an inode number, and converting
-that inode number to a disk location, then ignoring this feature
-should be fine, so I've added it to XFS_SB_FEAT_INCOMPAT_SUPPORTED
-
-I did some brief testing of this patch by hacking up the regression
-tests to completely fragment freespace on the test xfs filesystem, and
-then write a large-ish number of inodes to consume any existing
-contiguous 64-inode chunk. This way any files the grub tests add and
-traverse would be in such a fragmented inode allocation. Tests passed,
-but I'm not sure how to cleanly integrate that into the test harness.
-
-Signed-off-by: Eric Sandeen <sandeen@redhat.com>
-Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
-Tested-by: Chris Murphy <lists@colorremedies.com>
----
- grub-core/fs/xfs.c | 11 ++++++++++-
- 1 file changed, 10 insertions(+), 1 deletion(-)
-
-diff --git a/grub-core/fs/xfs.c b/grub-core/fs/xfs.c
-index c6031bd..3b00c74 100644
---- a/grub-core/fs/xfs.c
-+++ b/grub-core/fs/xfs.c
-@@ -79,9 +79,18 @@ GRUB_MOD_LICENSE ("GPLv3+");
- #define XFS_SB_FEAT_INCOMPAT_SPINODES (1 << 1) /* sparse inode chunks */
- #define XFS_SB_FEAT_INCOMPAT_META_UUID (1 << 2) /* metadata UUID */
-
--/* We do not currently verify metadata UUID so it is safe to read such filesystem */
-+/*
-+ * Directory entries with ftype are explicitly handled by GRUB code.
-+ *
-+ * We do not currently read the inode btrees, so it is safe to read filesystems
-+ * with the XFS_SB_FEAT_INCOMPAT_SPINODES feature.
-+ *
-+ * We do not currently verify metadata UUID, so it is safe to read filesystems
-+ * with the XFS_SB_FEAT_INCOMPAT_META_UUID feature.
-+ */
- #define XFS_SB_FEAT_INCOMPAT_SUPPORTED \
- (XFS_SB_FEAT_INCOMPAT_FTYPE | \
-+ XFS_SB_FEAT_INCOMPAT_SPINODES | \
- XFS_SB_FEAT_INCOMPAT_META_UUID)
-
- struct grub_xfs_sblock
---
-cgit v1.0-41-gc330
-
diff --git a/libre/grub/0010-relocation.patch b/libre/grub/0010-relocation.patch
deleted file mode 100644
index 1aeae6849..000000000
--- a/libre/grub/0010-relocation.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-commit 842c390469e2c2e10b5aa36700324cd3bde25875
-Author: H.J. Lu <hjl.tools@gmail.com>
-Date: Sat Feb 17 06:47:28 2018 -0800
-
- x86-64: Treat R_X86_64_PLT32 as R_X86_64_PC32
-
- Starting from binutils commit bd7ab16b4537788ad53521c45469a1bdae84ad4a:
-
- https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=bd7ab16b4537788ad53521c45469a1bdae84ad4a
-
- x86-64 assembler generates R_X86_64_PLT32, instead of R_X86_64_PC32, for
- 32-bit PC-relative branches. Grub2 should treat R_X86_64_PLT32 as
- R_X86_64_PC32.
-
- Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
- Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
-
-diff --git a/grub-core/efiemu/i386/loadcore64.c b/grub-core/efiemu/i386/loadcore64.c
-index e49d0b6ff..18facf47f 100644
---- a/grub-core/efiemu/i386/loadcore64.c
-+++ b/grub-core/efiemu/i386/loadcore64.c
-@@ -98,6 +98,7 @@ grub_arch_efiemu_relocate_symbols64 (grub_efiemu_segment_t segs,
- break;
-
- case R_X86_64_PC32:
-+ case R_X86_64_PLT32:
- err = grub_efiemu_write_value (addr,
- *addr32 + rel->r_addend
- + sym.off
-diff --git a/grub-core/kern/x86_64/dl.c b/grub-core/kern/x86_64/dl.c
-index 440690673..3a73e6e6c 100644
---- a/grub-core/kern/x86_64/dl.c
-+++ b/grub-core/kern/x86_64/dl.c
-@@ -70,6 +70,7 @@ grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr,
- break;
-
- case R_X86_64_PC32:
-+ case R_X86_64_PLT32:
- {
- grub_int64_t value;
- value = ((grub_int32_t) *addr32) + rel->r_addend + sym->st_value -
-diff --git a/util/grub-mkimagexx.c b/util/grub-mkimagexx.c
-index a2bb05439..39d7efb91 100644
---- a/util/grub-mkimagexx.c
-+++ b/util/grub-mkimagexx.c
-@@ -841,6 +841,7 @@ SUFFIX (relocate_addresses) (Elf_Ehdr *e, Elf_Shdr *sections,
- break;
-
- case R_X86_64_PC32:
-+ case R_X86_64_PLT32:
- {
- grub_uint32_t *t32 = (grub_uint32_t *) target;
- *t32 = grub_host_to_target64 (grub_target_to_host32 (*t32)
-diff --git a/util/grub-module-verifier.c b/util/grub-module-verifier.c
-index 9179285a5..a79271f66 100644
---- a/util/grub-module-verifier.c
-+++ b/util/grub-module-verifier.c
-@@ -19,6 +19,7 @@ struct grub_module_verifier_arch archs[] = {
- -1
- }, (int[]){
- R_X86_64_PC32,
-+ R_X86_64_PLT32,
- -1
- }
- },
diff --git a/libre/grub/PKGBUILD b/libre/grub/PKGBUILD
index c87d49a0a..4e90e1524 100644
--- a/libre/grub/PKGBUILD
+++ b/libre/grub/PKGBUILD
@@ -18,51 +18,54 @@ _IA32_XEN_IN_ARCH_X64='1'
## '1' to enable EMU build (x86_64 and i686 only), "0" to disable
_GRUB_EMU_BUILD='0'
-_GRUB_EXTRAS_COMMIT=f2a079441939eee7251bf141986cdd78946e1d20
+_GRUB_EXTRAS_COMMIT="136763a4cc9ca3a4f59d05b79eede2159d6f441e"
+_GNULIB_COMMIT="9ce9be2ef0cb1180e35dfe9dfbbe90d774b374bd"
+_UNIFONT_VER="12.1.02"
-_UNIFONT_VER='11.0.02'
+[[ "${CARCH}" = "armv7h" ]] && _EFI_ARCH="arm"
+[[ "${CARCH}" = "x86_64" ]] && _EFI_ARCH="x86_64"
+[[ "${CARCH}" = "i686" ]] && _EFI_ARCH="i386"
-[[ "${CARCH}" = 'armv7h' ]] && _EFI_ARCH='arm'
-[[ "${CARCH}" = 'x86_64' ]] && _EFI_ARCH='x86_64'
-[[ "${CARCH}" = 'i686' ]] && _EFI_ARCH='i386'
+[[ "${CARCH}" = "x86_64" ]] && _XEN_ARCH="x86_64"
+[[ "${CARCH}" = "i686" ]] && _XEN_ARCH="i386"
-[[ "${CARCH}" = 'x86_64' ]] && _XEN_ARCH='x86_64'
-[[ "${CARCH}" = 'i686' ]] && _XEN_ARCH='i386'
-
-[[ "${CARCH}" = 'armv7h' ]] && _EMU_ARCH='arm'
-[[ "${CARCH}" = 'x86_64' ]] && _EMU_ARCH='x86_64'
-[[ "${CARCH}" = 'i686' ]] && _EMU_ARCH='i386'
+[[ "${CARCH}" = "armv7h" ]] && _EMU_ARCH="arm"
+[[ "${CARCH}" = "x86_64" ]] && _EMU_ARCH="x86_64"
+[[ "${CARCH}" = "i686" ]] && _EMU_ARCH="i386"
pkgbase='grub'
pkgname=('grub')
[[ $CARCH = armv7h ]] && pkgname+=('grub-am335x_bone' 'grub-udoo' 'grub-omap3_beagle'
'grub-omap3_beagle_xm' 'grub-omap3_beagle_xm_ab')
pkgdesc='GNU GRand Unified Bootloader (2), (Parabola rebranded)'
-pkgver='2.02'
-pkgrel='8.par1'
-epoch='2'
+_pkgver=2.04
+pkgver=${_pkgver/-/}
+pkgrel=2
+pkgrel+=.par1
+epoch=2
url='https://www.gnu.org/software/grub/'
-arch=('x86_64' 'i686' 'armv7h')
+arch=('x86_64')
+arch+=('i686' 'armv7h')
license=('GPL3')
backup=('etc/default/grub'
'etc/grub.d/40_custom')
install="${pkgname}.install"
options=('!makeflags')
-depends=('sh' 'xz' 'gettext' 'device-mapper')
+
makedepends=('git' 'rsync' 'xz' 'freetype2' 'ttf-dejavu' 'python' 'autogen'
'texinfo' 'help2man' 'gettext' 'device-mapper' 'fuse')
+depends=('sh' 'xz' 'gettext' 'device-mapper')
+optdepends=('freetype2: For grub-mkfont usage'
+ 'fuse: For grub-mount usage')
if [[ "${CARCH}" = 'x86_64' ]] && [[ "${_XEN}" = '1' ]]; then
makedepends+=('xen')
fi
-if [[ "${_GRUB_EMU_BUILD}" = '1' ]]; then
+if [[ "${_GRUB_EMU_BUILD}" = "1" ]]; then
makedepends+=('libusbx' 'sdl')
fi
-optdepends=('freetype2: For grub-mkfont usage'
- 'fuse: For grub-mount usage')
-
if [[ "${CARCH}" = 'x86_64' ]] || [[ "${CARCH}" = 'i686' ]]; then
provides=('grub-common' 'grub-bios' 'grub-emu' "grub-efi-${_EFI_ARCH}")
conflicts=('grub-common' 'grub-bios' 'grub-emu' "grub-efi-${_EFI_ARCH}" 'grub-legacy' 'grub-parabola')
@@ -73,17 +76,16 @@ elif [[ "${CARCH}" = 'armv7h' ]]; then
replaces=('grub-common' 'grub-emu' "grub-efi-${_EFI_ARCH}")
fi
-source=("https://ftp.gnu.org/gnu/${pkgname}/${pkgname}-${pkgver}.tar.xz"{,.sig}
- "https://git.savannah.nongnu.org/cgit/grub-extras.git/snapshot/grub-extras-${_GRUB_EXTRAS_COMMIT}.tar.gz"
+validpgpkeys=('E53D497F3FA42AD8C9B4D1E835A93B74E82E4209' # Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
+ 'BE5C23209ACDDACEB20DB0A28C8189F1988C2166' # Daniel Kiper <dkiper@net-space.pl>
+ '95D2E9AB8740D8046387FD151A09227B1F435A33') #Paul Hardy
+
+source=("git+https://git.savannah.gnu.org/git/grub.git#tag=grub-${_pkgver}?signed"
+ "git+https://git.savannah.gnu.org/git/grub-extras.git#commit=${_GRUB_EXTRAS_COMMIT}"
+ "git+https://git.savannah.gnu.org/git/gnulib.git#commit=${_GNULIB_COMMIT}"
"https://ftp.gnu.org/gnu/unifont/unifont-${_UNIFONT_VER}/unifont-${_UNIFONT_VER}.bdf.gz"{,.sig}
'0003-10_linux-20_linux_xen-detect-parabola-initramfs.patch'
'0004-add-GRUB_COLOR_variables.patch'
- '0005-Allow_GRUB_to_mount_ext234_filesystems_that_have_the_encryption_feature.patch'
- '0006-tsc-Change-default-tsc-calibration-method-to-pmtimer-on-EFI-systems.patch'
- '0007-grub-mkconfig_10_linux_Support_multiple_early_initrd_images.patch'
- '0008-Fix-packed-not-aligned-error-on-GCC-8.patch'
- '0009-xfs-Accept-filesystem-with-sparse-inodes.patch'
- '0010-relocation.patch'
'grub.default'
'0003-10_linux-20_linux_xen-detect-am335x_bone+am335x_boneblack-devicetree-file.patch'
'0003-10_linux-20_linux_xen-detect-omap3_beagle-devicetree-file.patch'
@@ -92,20 +94,14 @@ source=("https://ftp.gnu.org/gnu/${pkgname}/${pkgname}-${pkgver}.tar.xz"{,.sig}
'0003-10_linux-20_linux_xen-detect-udoo-devicetree-file.patch'
'0003-10_linux-20_linux_xen-rebrand-free-distros.patch')
-sha256sums=('810b3798d316394f94096ec2797909dbf23c858e48f7b3830826b8daa06b7b0f'
+sha256sums=('SKIP'
+ 'SKIP'
'SKIP'
- '2844601914cea6b1231eca0104853a93c4d67a5209933a0766f1475953300646'
- 'a7ea9ca4f6dcb59377d978194835ede669457069256184f86d46ab5b863c56e6'
+ '04d652be1e28a6d464965c75c71ac84633085cd0960c2687466651c34c94bd89'
'SKIP'
'3f68a78ecba0284b9d39af60431236cb2ebc8547d3dc1fb26a1ac7a6b9afbbc7'
'a5198267ceb04dceb6d2ea7800281a42b3f91fd02da55d2cc9ea20d47273ca29'
- '535422c510a050d41efe7720dbe54de29e04bdb8f86fd5aea5feb0b24f7abe46'
- 'c38f2b2caae33008b35a37d8293d8bf13bf6fd779a4504925da1837fd007aeb5'
- 'e43566c4fe3b1b87e677167323d4716b82ac0810410a9d8dc7fbf415c8db2b8a'
- 'e84b8de569c7e6b73263758c35cf95c6516fde85d4ed451991427864f6a4e5a8'
- 'fcd5a626d4af33665d041ce42df813f1f198d8230ea186481b155a5b676f3b87'
- '51562fa1016c54567dbf42a86c0cfc902372ab579bbee17879a81aff09b76b99'
- '959f3d8d65d9504df798924554c3de0e92dfcd39e087b099a5f5e0a9b7885102'
+ 'c700a3a2e0bdb47620a78b454aaa4bbf52989102eb47b08672240192e91b2a57'
'9ece1db537a989ce4dc55ece471883e19b8ab16902f8c4feb68436c3b5700f71'
'de71452b9b0fbfb08ea742e9fa217ab34fddf6312452f155fb9d82ebf1c024a5'
'222da944b4af43a1d86be0e3d91f2e1a82324fa51c7ad36cc25246ffa3739ab1'
@@ -113,8 +109,8 @@ sha256sums=('810b3798d316394f94096ec2797909dbf23c858e48f7b3830826b8daa06b7b0f'
'6584a0dda9dbf6d70dbdfba619abbb628b1a092bd61d6d05e462d6771354223b'
'7374137d183957ec8834ce749163c9fa98ff8ee61bbb74b0b38e29daf93857a4')
-validpgpkeys=('E53D497F3FA42AD8C9B4D1E835A93B74E82E4209' # Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
- '95D2E9AB8740D8046387FD151A09227B1F435A33') #Paul Hardy
+_backports=(
+)
_configure_options=(
FREETYPE="pkg-config freetype2"
@@ -139,63 +135,52 @@ _configure_options=(
)
prepare() {
- cd "${srcdir}/grub-${pkgver}/"
+ cd "${srcdir}/grub/"
- echo 'Patch to detect of Parabola GNU/Linux-libre initramfs images by grub-mkconfig...'
+ echo "Apply backports..."
+ local _c
+ for _c in "${_backports[@]}"; do
+ git log --oneline -1 "${_c}"
+ git cherry-pick -n "${_c}"
+ done
+
+ echo "Patch to detect of Parabola GNU/Linux-libre initramfs images by grub-mkconfig..."
patch -Np1 -i "${srcdir}/0003-10_linux-20_linux_xen-detect-parabola-initramfs.patch"
- echo 'Patch to enable GRUB_COLOR_* variables in grub-mkconfig...'
+ echo "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}/0004-add-GRUB_COLOR_variables.patch"
- echo "Patch to allow GRUB to mount ext2/3/4 filesystems that have the encryption feature..."
- patch -Np1 -i "${srcdir}/0005-Allow_GRUB_to_mount_ext234_filesystems_that_have_the_encryption_feature.patch"
-
- echo "Patch to change default tsc calibration method to pmtimer on EFI systems..."
- patch -Np1 -i "${srcdir}/0006-tsc-Change-default-tsc-calibration-method-to-pmtimer-on-EFI-systems.patch"
-
- echo "Patch to Support multiple early initrd images..."
- patch -Np1 -i "${srcdir}/0007-grub-mkconfig_10_linux_Support_multiple_early_initrd_images.patch"
-
- echo "Patch to fix packed-not-aligned error on GCC 8..."
- patch -Np1 -i "${srcdir}/0008-Fix-packed-not-aligned-error-on-GCC-8.patch"
-
- echo "Patch xfs: Accept filesystem with sparse inodes..."
- patch -Np1 -i "${srcdir}/0009-xfs-Accept-filesystem-with-sparse-inodes.patch"
-
- echo "Patch x86-64: Treat R_X86_64_PLT32 as R_X86_64_PC32..."
- patch -Np1 -i "${srcdir}/0010-relocation.patch"
-
- echo 'Fix DejaVuSans.ttf location so that grub-mkfont can create *.pf2 files for starfield theme...'
+ echo "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 "configure.ac"
- echo 'Rebranding for some free distros...'
+ echo "Rebranding for some free distros..."
patch -Np1 -i "${srcdir}/0003-10_linux-20_linux_xen-rebrand-free-distros.patch"
echo "Fix mkinitcpio 'rw' FS#36275..."
sed 's| ro | rw |g' -i "util/grub.d/10_linux.in"
- echo 'Pull in latest language files...'
+ echo "Pull in latest language files..."
./linguas.sh
- echo 'Remove not working langs which need LC_ALL=C.UTF-8...'
+ echo "Remove not working langs which need LC_ALL=C.UTF-8..."
sed -e 's#en@cyrillic en@greek##g' -i "po/LINGUAS"
echo "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" "unifont.bdf"
+ gzip -cd "${srcdir}/unifont-${_UNIFONT_VER}.bdf.gz" > "unifont.bdf"
echo "Add the grub-extra sources for BIOS build..."
install -d "grub-extras"
- cp -r "${srcdir}/grub-extras-${_GRUB_EXTRAS_COMMIT}/915resolution" \
+ cp -r "${srcdir}/grub-extras/915resolution" \
"grub-extras/915resolution"
- export GRUB_CONTRIB="${srcdir}/grub-${pkgver}/grub-extras/"
+ export GRUB_CONTRIB="${srcdir}/grub/grub-extras/"
}
_build_grub-efi() {
echo "Copy the source for building the ${_EFI_ARCH} EFI part..."
- cp -r "${srcdir}/grub-${pkgver}" "${srcdir}/grub-${pkgver}-efi-${_EFI_ARCH}"
- cd "${srcdir}/grub-${pkgver}-efi-${_EFI_ARCH}"
+ cp -r "${srcdir}/grub/" "${srcdir}/grub-efi-${_EFI_ARCH}/"
+ cd "${srcdir}/grub-efi-${_EFI_ARCH}/"
echo "Unset all compiler FLAGS for ${_EFI_ARCH} EFI build..."
unset CFLAGS
@@ -204,8 +189,10 @@ _build_grub-efi() {
unset LDFLAGS
unset MAKEFLAGS
- echo "Run autogen.sh for ${_EFI_ARCH} EFI build..."
- ./autogen.sh
+ echo "Run bootstrap for ${_EFI_ARCH} EFI build..."
+ ./bootstrap \
+ --gnulib-srcdir="${srcdir}/gnulib/" \
+ --no-git
echo "Run ./configure for ${_EFI_ARCH} EFI build..."
./configure \
@@ -221,8 +208,8 @@ _build_grub-efi() {
_build_grub-xen() {
echo "Copy the source for building the ${_XEN_ARCH} XEN part..."
- cp -r "${srcdir}/grub-${pkgver}" "${srcdir}/grub-${pkgver}-xen-${_XEN_ARCH}"
- cd "${srcdir}/grub-${pkgver}-xen-${_XEN_ARCH}"
+ cp -r "${srcdir}/grub/" "${srcdir}/grub-xen-${_XEN_ARCH}/"
+ cd "${srcdir}/grub-xen-${_XEN_ARCH}/"
echo "Unset all compiler FLAGS for ${_XEN_ARCH} XEN build..."
unset CFLAGS
@@ -231,8 +218,10 @@ _build_grub-xen() {
unset LDFLAGS
unset MAKEFLAGS
- echo "Run autogen.sh for ${_XEN_ARCH} XEN build..."
- ./autogen.sh
+ echo "Run bootstrap for ${_XEN_ARCH} XEN build..."
+ ./bootstrap \
+ --gnulib-srcdir="${srcdir}/gnulib/" \
+ --no-git
echo "Run ./configure for ${_XEN_ARCH} XEN build..."
./configure \
@@ -255,8 +244,8 @@ _build_grub-bios() {
fi
echo 'Copy the source for building the BIOS part...'
- cp -r "${srcdir}/grub-${pkgver}" "${srcdir}/grub-${pkgver}-bios"
- cd "${srcdir}/grub-${pkgver}-bios"
+ cp -r "${srcdir}/grub/" "${srcdir}/grub-bios/"
+ cd "${srcdir}/grub-bios/"
echo 'Unset all compiler FLAGS for BIOS build...'
unset CFLAGS
@@ -265,8 +254,10 @@ _build_grub-bios() {
unset LDFLAGS
unset MAKEFLAGS
- echo 'Run autogen.sh for BIOS build...'
- ./autogen.sh
+ echo 'Run bootstrap for BIOS build...'
+ ./bootstrap \
+ --gnulib-srcdir="${srcdir}/gnulib/" \
+ --no-git
echo 'Run ./configure for BIOS build...'
./configure \
@@ -282,8 +273,8 @@ _build_grub-bios() {
_build_grub-qemu() {
echo 'Copy the source for building the QEMU part...'
- cp -r "${srcdir}/grub-${pkgver}" "${srcdir}/grub-${pkgver}-qemu"
- cd "${srcdir}/grub-${pkgver}-qemu"
+ cp -r "${srcdir}/grub/" "${srcdir}/grub-qemu/"
+ cd "${srcdir}/grub-qemu/"
echo 'Unset all compiler FLAGS for QEMU build...'
unset CFLAGS
@@ -292,8 +283,10 @@ _build_grub-qemu() {
unset LDFLAGS
unset MAKEFLAGS
- echo 'Run autogen.sh for QEMU build...'
- ./autogen.sh
+ echo 'Run bootstrap for QEMU build...'
+ ./bootstrap \
+ --gnulib-srcdir="${srcdir}/gnulib/" \
+ --no-git
echo 'Run ./configure for QEMU build...'
./configure \
@@ -310,8 +303,8 @@ _build_grub-qemu() {
_build_grub-ieee1275() {
echo 'Copy the source for building the IEEE1275 (OpenFirmware) part...'
- cp -r "${srcdir}/grub-${pkgver}" "${srcdir}/grub-${pkgver}-ieee1275"
- cd "${srcdir}/grub-${pkgver}-ieee1275"
+ cp -r "${srcdir}/grub/" "${srcdir}/grub-ieee1275/"
+ cd "${srcdir}/grub-ieee1275/"
echo 'Unset all compiler FLAGS for IEEE1275 (OpenFirmware) build...'
unset CFLAGS
@@ -320,8 +313,10 @@ _build_grub-ieee1275() {
unset LDFLAGS
unset MAKEFLAGS
- echo 'Run autogen.sh for IEEE1275 (OpenFirmware) build...'
- ./autogen.sh
+ echo 'Run bootstrap for IEEE1275 (OpenFirmware) build...'
+ ./bootstrap \
+ --gnulib-srcdir="${srcdir}/gnulib/" \
+ --no-git
echo 'Run ./configure for IEEE1275 (OpenFirmware) build...'
./configure \
@@ -337,8 +332,8 @@ _build_grub-ieee1275() {
_build_grub-libreboot() {
echo 'Copy the source for building the Libreboot part...'
- cp -r "${srcdir}/grub-${pkgver}" "${srcdir}/grub-${pkgver}-libreboot"
- cd "${srcdir}/grub-${pkgver}-libreboot"
+ cp -r "${srcdir}/grub/" "${srcdir}/grub-libreboot/"
+ cd "${srcdir}/grub-libreboot/"
echo 'Unset all compiler FLAGS for Libreboot build...'
unset CFLAGS
@@ -347,8 +342,10 @@ _build_grub-libreboot() {
unset LDFLAGS
unset MAKEFLAGS
- echo 'Run autogen.sh for Libreboot build...'
- ./autogen.sh
+ echo 'Run bootstrap for Libreboot build...'
+ ./bootstrap \
+ --gnulib-srcdir="${srcdir}/gnulib/" \
+ --no-git
echo 'Run ./configure for Libreboot build...'
./configure \
@@ -365,8 +362,8 @@ _build_grub-libreboot() {
_build_grub-multiboot() {
echo 'Copy the source for building the Multiboot part...'
- cp -r "${srcdir}/grub-${pkgver}" "${srcdir}/grub-${pkgver}-multiboot"
- cd "${srcdir}/grub-${pkgver}-multiboot"
+ cp -r "${srcdir}/grub/" "${srcdir}/grub-multiboot/"
+ cd "${srcdir}/grub-multiboot/"
echo 'Unset all compiler FLAGS for Multiboot build...'
unset CFLAGS
@@ -375,8 +372,10 @@ _build_grub-multiboot() {
unset LDFLAGS
unset MAKEFLAGS
- echo 'Run autogen.sh for Multiboot build...'
- ./autogen.sh
+ echo 'Run bootstrap for Multiboot build...'
+ ./bootstrap \
+ --gnulib-srcdir="${srcdir}/gnulib/" \
+ --no-git
echo 'Run ./configure for Multiboot build...'
./configure \
@@ -392,8 +391,8 @@ _build_grub-multiboot() {
_build_grub-emu() {
echo 'Copy the source for building the emu part...'
- cp -r "${srcdir}/grub-${pkgver}/" "${srcdir}/grub-${pkgver}-emu/"
- cd "${srcdir}/grub-${pkgver}-emu"
+ cp -r "${srcdir}/grub/" "${srcdir}/grub-emu/"
+ cd "${srcdir}/grub-emu/"
echo 'Unset all compiler FLAGS for emu build...'
unset CFLAGS
@@ -402,8 +401,10 @@ _build_grub-emu() {
unset LDFLAGS
unset MAKEFLAGS
- echo 'Run autogen.sh for emu build...'
- ./autogen.sh
+ echo 'Run bootstrap for emu build...'
+ ./bootstrap \
+ --gnulib-srcdir="${srcdir}/gnulib/" \
+ --no-git
echo 'Run ./configure for emu build...'
./configure \
@@ -420,8 +421,8 @@ _build_grub-emu() {
_build_grub-uboot() {
echo "Copy the source for building the U-Boot part..."
- cp -r "${srcdir}/grub-${pkgver}" "${srcdir}/grub-${pkgver}-uboot"
- cd "${srcdir}/grub-${pkgver}-uboot"
+ cp -r "${srcdir}/grub/" "${srcdir}/grub-uboot/"
+ cd "${srcdir}/grub-uboot/"
echo 'Unset all compiler FLAGS for U-Boot build...'
unset CFLAGS
@@ -433,8 +434,10 @@ _build_grub-uboot() {
#sed -i '\|grub_arm_disable_caches_mmu|,+4 d
# ' grub-core/loader/arm/linux.c
- echo 'Run autogen.sh for U-Boot build...'
- ./autogen.sh
+ echo 'Run bootstrap for U-Boot build...'
+ ./bootstrap \
+ --gnulib-srcdir="${srcdir}/gnulib/" \
+ --no-git
echo 'Run ./configure for U-Boot build...'
./configure \
@@ -449,7 +452,7 @@ _build_grub-uboot() {
}
build() {
- cd "${srcdir}/grub-${pkgver}/"
+ cd "${srcdir}/grub/"
if [[ "${CARCH}" = 'x86_64' ]] || [[ "${CARCH}" = 'i686' ]] || [[ "${CARCH}" = 'armv7h' ]]; then
echo "Build grub ${_EFI_ARCH} EFI stuff..."
@@ -498,7 +501,7 @@ build() {
}
_package_grub-efi() {
- cd "${srcdir}/grub-${pkgver}-efi-${_EFI_ARCH}/"
+ cd "${srcdir}/grub-efi-${_EFI_ARCH}/"
echo "Run make install for ${_EFI_ARCH} EFI build..."
make DESTDIR="${pkgdir}/" bashcompletiondir="/usr/share/bash-completion/completions" install
@@ -510,7 +513,7 @@ _package_grub-efi() {
}
_package_grub-xen() {
- cd "${srcdir}/grub-${pkgver}-xen-${_XEN_ARCH}/"
+ cd "${srcdir}/grub-xen-${_XEN_ARCH}/"
echo "Run make install for ${_XEN_ARCH} XEN build..."
make DESTDIR="${pkgdir}/" bashcompletiondir="/usr/share/bash-completion/completions" install
@@ -522,7 +525,7 @@ _package_grub-xen() {
}
_package_grub-bios() {
- cd "${srcdir}/grub-${pkgver}-bios/"
+ cd "${srcdir}/grub-bios/"
echo 'Run make install for BIOS build...'
make DESTDIR="${pkgdir}/" bashcompletiondir="/usr/share/bash-completion/completions" install
@@ -534,7 +537,7 @@ _package_grub-bios() {
}
_package_grub-qemu() {
- cd "${srcdir}/grub-${pkgver}-qemu/"
+ cd "${srcdir}/grub-qemu/"
echo 'Run make install for QEMU build...'
make DESTDIR="${pkgdir}/" bashcompletiondir="/usr/share/bash-completion/completions" install
@@ -546,7 +549,7 @@ _package_grub-qemu() {
}
_package_grub-ieee1275() {
- cd "${srcdir}/grub-${pkgver}-ieee1275/"
+ cd "${srcdir}/grub-ieee1275/"
echo 'Run make install for IEEE1275 (OpenFirmware) build...'
make DESTDIR="${pkgdir}/" bashcompletiondir="/usr/share/bash-completion/completions" install
@@ -558,7 +561,7 @@ _package_grub-ieee1275() {
}
_package_grub-libreboot() {
- cd "${srcdir}/grub-${pkgver}-libreboot/"
+ cd "${srcdir}/grub-libreboot/"
echo 'Run make install for Libreboot build...'
make DESTDIR="${pkgdir}/" bashcompletiondir="/usr/share/bash-completion/completions" install
@@ -570,7 +573,7 @@ _package_grub-libreboot() {
}
_package_grub-multiboot() {
- cd "${srcdir}/grub-${pkgver}-multiboot/"
+ cd "${srcdir}/grub-multiboot/"
echo 'Run make install for Multiboot build...'
make DESTDIR="${pkgdir}/" bashcompletiondir="/usr/share/bash-completion/completions" install
@@ -582,7 +585,7 @@ _package_grub-multiboot() {
}
_package_grub-emu() {
- cd "${srcdir}/grub-${pkgver}-emu/"
+ cd "${srcdir}/grub-emu/"
echo 'Run make install for emu build...'
make DESTDIR="${pkgdir}/" bashcompletiondir="/usr/share/bash-completion/completions" install
@@ -594,7 +597,7 @@ _package_grub-emu() {
}
_package_grub-uboot() {
- cd "${srcdir}/grub-${pkgver}-uboot/"
+ cd "${srcdir}/grub-uboot/"
echo 'Run make install for U-Boot build...'
make DESTDIR="${pkgdir}/" bashcompletiondir="/usr/share/bash-completion/completions" install
@@ -617,7 +620,7 @@ package_grub() {
'sdl: For grub-emu SDL support')
fi
- cd "${srcdir}/grub-${pkgver}/"
+ cd "${srcdir}/grub/"
if [[ "${CARCH}" = 'x86_64' ]] || [[ "${CARCH}" = 'i686' ]] || [[ "${CARCH}" = 'armv7h' ]]; then
echo "Package grub ${_EFI_ARCH} EFI stuff..."
@@ -675,9 +678,8 @@ package_grub-am335x_bone() {
'mtools: For grub-mkrescue FAT FS support')
echo "Copy the source for packaging the U-Boot (am335x-bone) part..."
- cp -r "${srcdir}/grub-${pkgver}-uboot" "${srcdir}/grub-${pkgver}-uboot_am335x-bone"
-
- cd "${srcdir}/grub-${pkgver}-uboot_am335x-bone/"
+ cp -r "${srcdir}/grub-uboot/" "${srcdir}/grub-uboot_am335x-bone/"
+ cd "${srcdir}/grub-uboot_am335x-bone/"
echo 'Patch to detect am335x-bone device tree blob file (dtb)...'
patch -Np1 -i "${srcdir}/0003-10_linux-20_linux_xen-detect-am335x_bone+am335x_boneblack-devicetree-file.patch"
@@ -709,9 +711,8 @@ package_grub-omap3_beagle() {
'mtools: For grub-mkrescue FAT FS support')
echo "Copy the source for packaging the U-Boot (omap3_beagle) part..."
- cp -r "${srcdir}/grub-${pkgver}-uboot" "${srcdir}/grub-${pkgver}-uboot_omap3_beagle"
-
- cd "${srcdir}/grub-${pkgver}-uboot_omap3_beagle/"
+ cp -r "${srcdir}/grub-uboot/" "${srcdir}/grub-uboot_omap3_beagle/"
+ cd "${srcdir}/grub-uboot_omap3_beagle/"
echo 'Patch to detect omap3_beagle device tree blob file (dtb)...'
patch -Np1 -i "${srcdir}/0003-10_linux-20_linux_xen-detect-omap3_beagle-devicetree-file.patch"
@@ -743,9 +744,8 @@ package_grub-omap3_beagle_xm() {
'mtools: For grub-mkrescue FAT FS support')
echo "Copy the source for packaging the U-Boot (omap3_beagle_xm) part..."
- cp -r "${srcdir}/grub-${pkgver}-uboot" "${srcdir}/grub-${pkgver}-uboot_omap3_beagle_xm"
-
- cd "${srcdir}/grub-${pkgver}-uboot_omap3_beagle_xm/"
+ cp -r "${srcdir}/grub-uboot/" "${srcdir}/grub-uboot_omap3_beagle_xm/"
+ cd "${srcdir}/grub-uboot_omap3_beagle_xm/"
echo 'Patch to detect omap3_beagle_xm device tree blob file (dtb)...'
patch -Np1 -i "${srcdir}/0003-10_linux-20_linux_xen-detect-omap3_beagle_xm-devicetree-file.patch"
@@ -777,9 +777,8 @@ package_grub-omap3_beagle_xm_ab() {
'mtools: For grub-mkrescue FAT FS support')
echo "Copy the source for packaging the U-Boot (omap3_beagle_xm_ab) part..."
- cp -r "${srcdir}/grub-${pkgver}-uboot" "${srcdir}/grub-${pkgver}-uboot_omap3_beagle_xm_ab"
-
- cd "${srcdir}/grub-${pkgver}-uboot_omap3_beagle_xm_ab/"
+ cp -r "${srcdir}/grub-uboot/" "${srcdir}/grub-uboot_omap3_beagle_xm_ab/"
+ cd "${srcdir}/grub-uboot_omap3_beagle_xm_ab/"
echo 'Patch to detect omap3_beagle_xm_ab device tree blob file (dtb)...'
patch -Np1 -i "${srcdir}/0003-10_linux-20_linux_xen-detect-omap3_beagle_xm_ab-devicetree-file.patch"
@@ -810,9 +809,8 @@ package_grub-udoo() {
'mtools: For grub-mkrescue FAT FS support')
echo "Copy the source for packaging the U-Boot (udoo) part..."
- cp -r "${srcdir}/grub-${pkgver}-uboot" "${srcdir}/grub-${pkgver}-uboot_udoo"
-
- cd "${srcdir}/grub-${pkgver}-uboot_udoo/"
+ cp -r "${srcdir}/grub-uboot/" "${srcdir}/grub-uboot_udoo/"
+ cd "${srcdir}/grub-uboot_udoo/"
echo 'Patch to detect udoo device tree blob file (dtb)...'
patch -Np1 -i "${srcdir}/0003-10_linux-20_linux_xen-detect-udoo-devicetree-file.patch"
diff --git a/libre/grub/grub.default b/libre/grub/grub.default
index af9d70ca9..c3e010419 100644
--- a/libre/grub/grub.default
+++ b/libre/grub/grub.default
@@ -3,7 +3,7 @@
GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="Parabola"
-GRUB_CMDLINE_LINUX_DEFAULT="quiet"
+GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 quiet"
GRUB_CMDLINE_LINUX=""
# Preload both GPT and MBR modules so that they are not missed
@@ -12,9 +12,9 @@ GRUB_PRELOAD_MODULES="part_gpt part_msdos"
# Uncomment to enable booting from LUKS encrypted devices
#GRUB_ENABLE_CRYPTODISK=y
-# Uncomment to enable Hidden Menu, and optionally hide the timeout count
-#GRUB_HIDDEN_TIMEOUT=5
-#GRUB_HIDDEN_TIMEOUT_QUIET=true
+# Set to 'countdown' or 'hidden' to change timeout behavior,
+# press ESC key to display menu.
+GRUB_TIMEOUT_STYLE=menu
# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console