diff --git a/build-notes.txt b/build-notes.txt index 2b80b53..ccc6524 100644 --- a/build-notes.txt +++ b/build-notes.txt @@ -5,7 +5,7 @@ rpmbuild -ba grub2.spec --define "_sourcedir $PWD" --define "_topdir $PWD/rpmbui unpack everything -grub2-mkimage -v -C auto -O i386-pc --prefix '(,msdos1)/efi/grub' -o EFI/grub/i386-pc/core.img 'fat' 'part_msdos' 'biosdisk' 'xzio' 'gcry_crc' +grub2-mkimage -v -C auto -O i386-pc --prefix '(,msdos1)/efi/grub' -o EFI/grub/i386-pc/core.img 'iso9660' 'fat' 'part_msdos' 'part_gpt' 'part_apple' 'biosdisk' 'xzio' 'gcry_crc' fallocate -l 501M uefi-insecureboot-minimal.img fdisk uefi-insecureboot-minimal.img diff --git a/grub-patches/9003-Split-linux-and-linuxefi.patch b/grub-patches/9003-Split-linux-and-linuxefi.patch new file mode 100644 index 0000000..5216674 --- /dev/null +++ b/grub-patches/9003-Split-linux-and-linuxefi.patch @@ -0,0 +1,81 @@ +From d154160e518ca93ba2d39ff5d2ca8d986b7ee8b2 Mon Sep 17 00:00:00 2001 +From: ValdikSS +Date: Tue, 5 Mar 2019 00:51:47 +0300 +Subject: [PATCH] Split linux and linuxefi + +--- + grub-core/Makefile.core.def | 11 ++++++++--- + grub-core/loader/i386/efi/linux.c | 13 ++----------- + 2 files changed, 10 insertions(+), 14 deletions(-) + +diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def +index 1bf666b..297ccaf 100644 +--- a/grub-core/Makefile.core.def ++++ b/grub-core/Makefile.core.def +@@ -1711,9 +1711,7 @@ module = { + + module = { + name = linux; +- i386_pc = loader/i386/pc/linux.c; +- x86_64_efi = loader/i386/efi/linux.c; +- i386_efi = loader/i386/efi/linux.c; ++ x86 = loader/i386/linux.c; + xen = loader/i386/xen.c; + i386_pc = lib/i386/pc/vesa_modes_table.c; + mips = loader/mips/linux.c; +@@ -1728,8 +1726,15 @@ module = { + + common = loader/linux.c; + common = lib/cmdline.c; ++}; + ++module = { ++ name = linuxefi; ++ efi = loader/i386/efi/linux.c; + efi = loader/efi/linux.c; ++ /* efi = lib/cmdline.c; */ ++ enable = i386_efi; ++ enable = x86_64_efi; + }; + + module = { +diff --git a/grub-core/loader/i386/efi/linux.c b/grub-core/loader/i386/efi/linux.c +index 851bce7..918b662 100644 +--- a/grub-core/loader/i386/efi/linux.c ++++ b/grub-core/loader/i386/efi/linux.c +@@ -375,30 +375,21 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)), + return grub_errno; + } + +-static grub_command_t cmd_linux, cmd_initrd; + static grub_command_t cmd_linuxefi, cmd_initrdefi; + +-GRUB_MOD_INIT(linux) ++GRUB_MOD_INIT(linuxefi) + { +- cmd_linux = +- grub_register_command ("linux", grub_cmd_linux, +- 0, N_("Load Linux.")); + cmd_linuxefi = + grub_register_command ("linuxefi", grub_cmd_linux, + 0, N_("Load Linux.")); +- cmd_initrd = +- grub_register_command ("initrd", grub_cmd_initrd, +- 0, N_("Load initrd.")); + cmd_initrdefi = + grub_register_command ("initrdefi", grub_cmd_initrd, + 0, N_("Load initrd.")); + my_mod = mod; + } + +-GRUB_MOD_FINI(linux) ++GRUB_MOD_FINI(linuxefi) + { +- grub_unregister_command (cmd_linux); + grub_unregister_command (cmd_linuxefi); +- grub_unregister_command (cmd_initrd); + grub_unregister_command (cmd_initrdefi); + } +-- +2.20.1 + diff --git a/grub-patches/9004-Enable-locale-copying-is-that-a-bug.patch b/grub-patches/9004-Enable-locale-copying-is-that-a-bug.patch new file mode 100644 index 0000000..04184f3 --- /dev/null +++ b/grub-patches/9004-Enable-locale-copying-is-that-a-bug.patch @@ -0,0 +1,34 @@ +From 22f59cc94b59c99aa0f259fb2f6b43ee4c52e3c2 Mon Sep 17 00:00:00 2001 +From: ValdikSS +Date: Mon, 4 Mar 2019 19:55:38 +0300 +Subject: [PATCH] Enable locale copying (is that a bug?) + +--- + util/grub-install-common.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/util/grub-install-common.c b/util/grub-install-common.c +index 0a2e24a..cf3fd2e 100644 +--- a/util/grub-install-common.c ++++ b/util/grub-install-common.c +@@ -592,7 +592,7 @@ copy_all (const char *srcd, + grub_util_fd_closedir (d); + } + +-#if !(defined (GRUB_UTIL) && defined(ENABLE_NLS) && ENABLE_NLS) ++#if (defined (GRUB_UTIL) && defined(ENABLE_NLS) && ENABLE_NLS) + static const char * + get_localedir (void) + { +@@ -653,7 +653,7 @@ static void + grub_install_copy_nls(const char *src __attribute__ ((unused)), + const char *dst __attribute__ ((unused))) + { +-#if !(defined (GRUB_UTIL) && defined(ENABLE_NLS) && ENABLE_NLS) ++#if (defined (GRUB_UTIL) && defined(ENABLE_NLS) && ENABLE_NLS) + char *dst_locale; + + dst_locale = grub_util_path_concat (2, dst, "locale"); +-- +2.20.1 +