aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-bsp
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-bsp')
-rw-r--r--meta-amd-bsp/recipes-bsp/formfactor/formfactor/e3000/machconfig (renamed from meta-amd-bsp/recipes-bsp/formfactor/formfactor/amdx86/machconfig)0
-rw-r--r--meta-amd-bsp/recipes-bsp/formfactor/formfactor/ethanolx/machconfig3
-rw-r--r--meta-amd-bsp/recipes-bsp/formfactor/formfactor/v1000/machconfig3
-rw-r--r--meta-amd-bsp/recipes-bsp/grub/files/0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch46
-rw-r--r--meta-amd-bsp/recipes-bsp/grub/files/0001-Unset-need_charset_alias-when-building-for-musl.patch30
-rw-r--r--meta-amd-bsp/recipes-bsp/grub/files/0001-grub-setup-Debug-message-cleanup.patch34
-rw-r--r--meta-amd-bsp/recipes-bsp/grub/files/0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch56
-rw-r--r--meta-amd-bsp/recipes-bsp/grub/files/0001-x86-64-Treat-R_X86_64_PLT32-as-R_X86_64_PC32.patch76
-rw-r--r--meta-amd-bsp/recipes-bsp/grub/files/0001-x86_64-amd-avoid-SSE-register-return-with-SSE-disabl.patch39
-rw-r--r--meta-amd-bsp/recipes-bsp/grub/files/autogen.sh-exclude-pc.patch34
-rw-r--r--meta-amd-bsp/recipes-bsp/grub/files/cast-fprintf.patch36
-rw-r--r--meta-amd-bsp/recipes-bsp/grub/files/cfg2
-rw-r--r--meta-amd-bsp/recipes-bsp/grub/files/disable-address-of-packed-member.patch262
-rw-r--r--meta-amd-bsp/recipes-bsp/grub/files/fix.build.with.gcc-7.patch39
-rw-r--r--meta-amd-bsp/recipes-bsp/grub/files/fix.build.with.squashfs.patch24
-rw-r--r--meta-amd-bsp/recipes-bsp/grub/files/gcc8.patch74
-rw-r--r--meta-amd-bsp/recipes-bsp/grub/files/grub-module-explicitly-keeps-symbole-.module_license.patch58
-rw-r--r--meta-amd-bsp/recipes-bsp/grub/grub-efi_%.bbappend (renamed from meta-amd-bsp/recipes-bsp/grub/grub-efi_2.02.bbappend)3
-rw-r--r--meta-amd-bsp/recipes-bsp/grub/grub-efi_2.02.bb112
-rw-r--r--meta-amd-bsp/recipes-bsp/grub/grub-fixes.inc5
-rw-r--r--meta-amd-bsp/recipes-bsp/grub/grub2.inc76
-rw-r--r--meta-amd-bsp/recipes-bsp/grub/grub_%.bbappend1
-rw-r--r--meta-amd-bsp/recipes-bsp/grub/grub_2.02.bb29
-rw-r--r--meta-amd-bsp/recipes-bsp/grub/grub_2.02.bbappend1
24 files changed, 53 insertions, 990 deletions
diff --git a/meta-amd-bsp/recipes-bsp/formfactor/formfactor/amdx86/machconfig b/meta-amd-bsp/recipes-bsp/formfactor/formfactor/e3000/machconfig
index 28ca080e..28ca080e 100644
--- a/meta-amd-bsp/recipes-bsp/formfactor/formfactor/amdx86/machconfig
+++ b/meta-amd-bsp/recipes-bsp/formfactor/formfactor/e3000/machconfig
diff --git a/meta-amd-bsp/recipes-bsp/formfactor/formfactor/ethanolx/machconfig b/meta-amd-bsp/recipes-bsp/formfactor/formfactor/ethanolx/machconfig
new file mode 100644
index 00000000..28ca080e
--- /dev/null
+++ b/meta-amd-bsp/recipes-bsp/formfactor/formfactor/ethanolx/machconfig
@@ -0,0 +1,3 @@
+# Assume a USB mouse and keyboard are connected
+HAVE_TOUCHSCREEN=n
+HAVE_KEYBOARD=y
diff --git a/meta-amd-bsp/recipes-bsp/formfactor/formfactor/v1000/machconfig b/meta-amd-bsp/recipes-bsp/formfactor/formfactor/v1000/machconfig
new file mode 100644
index 00000000..28ca080e
--- /dev/null
+++ b/meta-amd-bsp/recipes-bsp/formfactor/formfactor/v1000/machconfig
@@ -0,0 +1,3 @@
+# Assume a USB mouse and keyboard are connected
+HAVE_TOUCHSCREEN=n
+HAVE_KEYBOARD=y
diff --git a/meta-amd-bsp/recipes-bsp/grub/files/0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch b/meta-amd-bsp/recipes-bsp/grub/files/0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch
deleted file mode 100644
index ce3238f3..00000000
--- a/meta-amd-bsp/recipes-bsp/grub/files/0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From fb7b827a56b1f92f882d0f5ef130acc968b23293 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 13 Jan 2016 19:17:31 +0000
-Subject: [PATCH] Disable -mfpmath=sse as well when SSE is disabled
-
-Fixes
-
-configure:20574: i586-poky-linux-gcc -m32 -march=core2 -msse3
--mtune=generic -mfpmath=sse
---sysroot=/usr/local/dev/yocto/grubtest2/build/tmp/sysroots/emenlow -o
-conftest -O2 -pipe -g -feliminate-unused-debug-types -Wall -W -Wshadow
--Wpointer-arith -Wmissing-prototypes -Wundef -Wstrict-prototypes -g
--falign-jumps=1 -falign-loops=1 -falign-functions=1 -mno-mmx -mno-sse
--mno-sse2 -mno-3dnow -fno-dwarf2-cfi-asm -m32 -fno-stack-protector
--mno-stack-arg-probe -Werror -nostdlib -Wl,--defsym,___main=0x8100
--Wall -W -I$(top_srcdir)/include -I$(top_builddir)/include
--DGRUB_MACHINE_PCBIOS=1 -DGRUB_MACHINE=I386_PC -Wl,-O1
--Wl,--hash-style=gnu -Wl,--as-needed conftest.c >&5
-conftest.c:1:0: error: SSE instruction set disabled, using 387
-arithmetics [-Werror]
-cc1: all warnings being treated as errors
-
-Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 26d2f33..9ce56de 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -783,7 +783,7 @@ fi
- if ( test "x$target_cpu" = xi386 || test "x$target_cpu" = xx86_64 ) && test "x$platform" != xemu; then
- # Some toolchains enable these features by default, but they need
- # registers that aren't set up properly in GRUB.
-- TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-3dnow"
-+ TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-3dnow -mfpmath=387"
- fi
-
- # GRUB doesn't use float or doubles at all. Yet some toolchains may decide
---
-2.7.0
-
diff --git a/meta-amd-bsp/recipes-bsp/grub/files/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta-amd-bsp/recipes-bsp/grub/files/0001-Unset-need_charset_alias-when-building-for-musl.patch
deleted file mode 100644
index 67dc1154..00000000
--- a/meta-amd-bsp/recipes-bsp/grub/files/0001-Unset-need_charset_alias-when-building-for-musl.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 13 Apr 2015 17:02:13 -0700
-Subject: [PATCH] Unset need_charset_alias when building for musl
-
-localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4
-which actually shoudl be fixed in gnulib and then all downstream
-projects will get it eventually. For now we apply the fix to
-coreutils
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- lib/gnulib.mk | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: grub-2.00/grub-core/gnulib/Makefile.am
-===================================================================
---- grub-2.00.orig/grub-core/gnulib/Makefile.am
-+++ grub-2.00/grub-core/gnulib/Makefile.am
-@@ -410,7 +410,7 @@ install-exec-localcharset: all-local
- case '$(host_os)' in \
- darwin[56]*) \
- need_charset_alias=true ;; \
-- darwin* | cygwin* | mingw* | pw32* | cegcc*) \
-+ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \
- need_charset_alias=false ;; \
- *) \
- need_charset_alias=true ;; \
diff --git a/meta-amd-bsp/recipes-bsp/grub/files/0001-grub-setup-Debug-message-cleanup.patch b/meta-amd-bsp/recipes-bsp/grub/files/0001-grub-setup-Debug-message-cleanup.patch
deleted file mode 100644
index e01fcdff..00000000
--- a/meta-amd-bsp/recipes-bsp/grub/files/0001-grub-setup-Debug-message-cleanup.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 4e9d9358e0cda6d01020005eb6343e3b69f7201a Mon Sep 17 00:00:00 2001
-From: Cao jin <caoj.fnst@cn.fujitsu.com>
-Date: Tue, 3 Jul 2018 18:51:13 +0800
-Subject: [PATCH] grub-setup: Debug message cleanup
-
-Variable "root" is initialized after root device probing and is null in
-current place, so, drop it.
-
-Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
-Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
----
-Upstream-Status: Backport [http://git.savannah.gnu.org/cgit/grub.git/commit/?id=4e9d9358e0cda6d01020005eb6343e3b69f7201a]
-
- util/setup.c | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/util/setup.c b/util/setup.c
-index 80363075d..9c1e1b7da 100644
---- a/util/setup.c
-+++ b/util/setup.c
-@@ -305,9 +305,8 @@ SETUP (const char *dir,
- bl.first_block = (struct grub_boot_blocklist *) (core_img
- + GRUB_DISK_SECTOR_SIZE
- - sizeof (*bl.block));
-- grub_util_info ("root is `%s', dest is `%s'", root, dest);
-
-- grub_util_info ("Opening dest");
-+ grub_util_info ("Opening dest `%s'", dest);
- dest_dev = grub_device_open (dest);
- if (! dest_dev)
- grub_util_error ("%s", grub_errmsg);
---
-2.17.2 (Apple Git-113)
-
diff --git a/meta-amd-bsp/recipes-bsp/grub/files/0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch b/meta-amd-bsp/recipes-bsp/grub/files/0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch
deleted file mode 100644
index d5bfaa17..00000000
--- a/meta-amd-bsp/recipes-bsp/grub/files/0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From b512c77222a8b133d7dd71a0dcef081a921d97d4 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 13 Jan 2016 19:28:00 +0000
-Subject: [PATCH] grub.d/10_linux.in: add oe's kernel name
-
-Our kernel's name is bzImage, we need add it to grub.d/10_linux.in so
-that the grub-mkconfig and grub-install can work correctly.
-
-We only need add the bzImage to util/grub.d/10_linux.in, but also add it
-to util/grub.d/20_linux_xen.in to keep compatibility.
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Inappropriate [OE specific]
-
- util/grub.d/10_linux.in | 6 +++---
- util/grub.d/20_linux_xen.in | 2 +-
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
-index 859b608..946be5d 100644
---- a/util/grub.d/10_linux.in
-+++ b/util/grub.d/10_linux.in
-@@ -148,12 +148,12 @@ machine=`uname -m`
- case "x$machine" in
- xi?86 | xx86_64)
- list=
-- for i in /boot/vmlinuz-* /vmlinuz-* /boot/kernel-* ; do
-+ for i in /boot/bzImage-* /bzImage-* /boot/vmlinuz-* /vmlinuz-* /boot/kernel-* ; do
- if grub_file_is_not_garbage "$i" ; then list="$list $i" ; fi
- done ;;
-- *)
-+ *)
- list=
-- for i in /boot/vmlinuz-* /boot/vmlinux-* /vmlinuz-* /vmlinux-* /boot/kernel-* ; do
-+ for i in /boot/bzImage-* /boot/vmlinuz-* /boot/vmlinux-* /bzImage-* /vmlinuz-* /vmlinux-* /boot/kernel-* ; do
- if grub_file_is_not_garbage "$i" ; then list="$list $i" ; fi
- done ;;
- esac
-diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
-index f532fb9..1994244 100644
---- a/util/grub.d/20_linux_xen.in
-+++ b/util/grub.d/20_linux_xen.in
-@@ -138,7 +138,7 @@ EOF
- }
-
- linux_list=
--for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* /boot/kernel-*; do
-+for i in /boot/bzImage[xz]-* /bzImage[xz]-* /boot/vmlinu[xz]-* /vmlinu[xz]-* /boot/kernel-*; do
- if grub_file_is_not_garbage "$i"; then
- basename=$(basename $i)
- version=$(echo $basename | sed -e "s,^[^0-9]*-,,g")
---
-2.7.0
-
diff --git a/meta-amd-bsp/recipes-bsp/grub/files/0001-x86-64-Treat-R_X86_64_PLT32-as-R_X86_64_PC32.patch b/meta-amd-bsp/recipes-bsp/grub/files/0001-x86-64-Treat-R_X86_64_PLT32-as-R_X86_64_PC32.patch
deleted file mode 100644
index 61d58c40..00000000
--- a/meta-amd-bsp/recipes-bsp/grub/files/0001-x86-64-Treat-R_X86_64_PLT32-as-R_X86_64_PC32.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-From 842c390469e2c2e10b5aa36700324cd3bde25875 Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Sat, 17 Feb 2018 06:47:28 -0800
-Subject: [PATCH] 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>
----
- grub-core/efiemu/i386/loadcore64.c | 1 +
- grub-core/kern/x86_64/dl.c | 1 +
- util/grub-mkimagexx.c | 1 +
- util/grub-module-verifier.c | 1 +
- 4 files changed, 4 insertions(+)
-
-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
- }
- },
---
-2.11.0
-
diff --git a/meta-amd-bsp/recipes-bsp/grub/files/0001-x86_64-amd-avoid-SSE-register-return-with-SSE-disabl.patch b/meta-amd-bsp/recipes-bsp/grub/files/0001-x86_64-amd-avoid-SSE-register-return-with-SSE-disabl.patch
new file mode 100644
index 00000000..69d62e64
--- /dev/null
+++ b/meta-amd-bsp/recipes-bsp/grub/files/0001-x86_64-amd-avoid-SSE-register-return-with-SSE-disabl.patch
@@ -0,0 +1,39 @@
+From d80b85dd61db9261b6cfd0d43a2f1c035627310b Mon Sep 17 00:00:00 2001
+From: "Arsalan H. Awan" <Arsalan_Awan@mentor.com>
+Date: Tue, 6 Apr 2021 15:01:41 +0500
+Subject: [PATCH] x86_64/amd: avoid SSE register return with SSE disabled
+
+When GRUB is compiled with -march=znver1 or -march=znver2 using the GCC
+v9.3 and above, the compilation fails with the following error:
+
+recipe-sysroot-native/usr/lib/x86_64-amd-linux/gcc/x86_64-amd-linux/
+ 10.2.0/include/shaintrin.h:40:1:
+ error: SSE register return with SSE disabled
+
+What's interesting, is that -march=skylake also implies -mbmi which
+defines __BMI__ but compilation succeeds.
+
+It is probably due to different BMI implementations on AMD and INTEL
+processors and the way compiler uses related instructions.
+
+Signed-off-by: Arsalan H. Awan <Arsalan_Awan@mentor.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 0b1bc48..dbe7a71 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -833,7 +833,7 @@ fi
+ if ( test "x$target_cpu" = xi386 || test "x$target_cpu" = xx86_64 ) && test "x$platform" != xemu; then
+ # Some toolchains enable these features by default, but they need
+ # registers that aren't set up properly in GRUB.
+- TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-3dnow -mfpmath=387"
++ TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-3dnow -mfpmath=387 -mno-bmi"
+ fi
+
+ # GRUB doesn't use float or doubles at all. Yet some toolchains may decide
+--
+2.25.1
+
diff --git a/meta-amd-bsp/recipes-bsp/grub/files/autogen.sh-exclude-pc.patch b/meta-amd-bsp/recipes-bsp/grub/files/autogen.sh-exclude-pc.patch
deleted file mode 100644
index fc5aa4e3..00000000
--- a/meta-amd-bsp/recipes-bsp/grub/files/autogen.sh-exclude-pc.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From ff8f68cc48fd3c30d55e1d570d51f2e0952c968e Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Sat, 25 Jan 2014 23:49:44 -0500
-Subject: [PATCH] autogen.sh: exclude .pc from po/POTFILES.in
-
-Exclude the .pc from po/POTFILES.in since quilt uses "patch --backup",
-which will create the backup file under .pc, this may cause unexpected
-errors, for example, on CentOS 5.x, if the backup file is null
-(newfile), it's mode will be 000, then we will get errors when xgettext
-try to read it.
-
-Upstream-Status: Inappropriate [OE specific]
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- autogen.sh | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/autogen.sh b/autogen.sh
-index 7424428..843619e 100755
---- a/autogen.sh
-+++ b/autogen.sh
-@@ -5,7 +5,7 @@ set -e
- export LC_COLLATE=C
- unset LC_ALL
-
--find . -iname '*.[ch]' ! -ipath './grub-core/lib/libgcrypt-grub/*' ! -ipath './build-aux/*' ! -ipath './grub-core/lib/libgcrypt/src/misc.c' ! -ipath './grub-core/lib/libgcrypt/src/global.c' ! -ipath './grub-core/lib/libgcrypt/src/secmem.c' ! -ipath './util/grub-gen-widthspec.c' ! -ipath './util/grub-gen-asciih.c' |sort > po/POTFILES.in
-+find . -iname '*.[ch]' ! -ipath './grub-core/lib/libgcrypt-grub/*' ! -ipath './build-aux/*' ! -ipath './grub-core/lib/libgcrypt/src/misc.c' ! -ipath './grub-core/lib/libgcrypt/src/global.c' ! -ipath './grub-core/lib/libgcrypt/src/secmem.c' ! -ipath './util/grub-gen-widthspec.c' ! -ipath './util/grub-gen-asciih.c' ! -path './.pc/*' | sort > po/POTFILES.in
- find util -iname '*.in' ! -name Makefile.in |sort > po/POTFILES-shell.in
-
- echo "Importing unicode..."
---
-1.7.10.4
-
diff --git a/meta-amd-bsp/recipes-bsp/grub/files/cast-fprintf.patch b/meta-amd-bsp/recipes-bsp/grub/files/cast-fprintf.patch
deleted file mode 100644
index b340d557..00000000
--- a/meta-amd-bsp/recipes-bsp/grub/files/cast-fprintf.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-grub_script.yy.c: In function 'yy_fatal_error':
-grub_script.yy.c:18:22: error: statement with no effect [-Werror=unused-value]
-
- ^
-grub_script.yy.c:2366:2: note: in expansion of macro 'fprintf'
- (void)yyg;
- ^~~~~~~
-
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-From c36c2a86404f373100775305f532c09d46f3c6ce Mon Sep 17 00:00:00 2001
-From: Vladimir Serbinenko <phcoder@gmail.com>
-Date: Mon, 14 Aug 2017 14:11:43 +0200
-Subject: yylex: Explicilty cast fprintf to void.
-
-It's needed to avoid warning on recent GCC.
----
- grub-core/script/yylex.l | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/grub-core/script/yylex.l b/grub-core/script/yylex.l
-index 95b2191..7b44c37 100644
---- a/grub-core/script/yylex.l
-+++ b/grub-core/script/yylex.l
-@@ -91,7 +91,7 @@ typedef size_t yy_size_t;
- #define stdin 0
- #define stdout 0
-
--#define fprintf(...) 0
-+#define fprintf(...) (void)0
- #define exit(...) grub_fatal("fatal error in lexer")
- #endif
-
---
-cgit v1.0-41-gc330
diff --git a/meta-amd-bsp/recipes-bsp/grub/files/cfg b/meta-amd-bsp/recipes-bsp/grub/files/cfg
deleted file mode 100644
index 8ca53d24..00000000
--- a/meta-amd-bsp/recipes-bsp/grub/files/cfg
+++ /dev/null
@@ -1,2 +0,0 @@
-search.file ($cmdpath)/EFI/BOOT/grub.cfg root
-set prefix=($root)/EFI/BOOT
diff --git a/meta-amd-bsp/recipes-bsp/grub/files/disable-address-of-packed-member.patch b/meta-amd-bsp/recipes-bsp/grub/files/disable-address-of-packed-member.patch
deleted file mode 100644
index 415f52eb..00000000
--- a/meta-amd-bsp/recipes-bsp/grub/files/disable-address-of-packed-member.patch
+++ /dev/null
@@ -1,262 +0,0 @@
-Disable address-of-packed-member warnings with gcc9
-
-gcc9 has turned this warning into error when -Werror is used, lets paper
-it over by turning it into a warning for now
-
-Fixes
- error: taking address of packed member of 'struct head' may result in an unaligned pointer value [-Werror=address-of-packed-member]
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
---- a/grub-core/commands/lsacpi.c
-+++ b/grub-core/commands/lsacpi.c
-@@ -26,6 +26,9 @@
- #include <grub/dl.h>
-
- #pragma GCC diagnostic ignored "-Wcast-align"
-+#if __GNUC__ >= 9
-+#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
-+#endif
-
- GRUB_MOD_LICENSE ("GPLv3+");
-
---- a/grub-core/commands/lspci.c
-+++ b/grub-core/commands/lspci.c
-@@ -26,6 +26,9 @@
-
- GRUB_MOD_LICENSE ("GPLv3+");
-
-+#if __GNUC__ >= 9
-+#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
-+#endif
- struct grub_pci_classname
- {
- int class;
-@@ -171,7 +174,7 @@ grub_lspci_iter (grub_pci_device_t dev,
-
- if (space == 0)
- continue;
--
-+
- switch (space & GRUB_PCI_ADDR_SPACE_MASK)
- {
- case GRUB_PCI_ADDR_SPACE_IO:
-@@ -195,13 +198,13 @@ grub_lspci_iter (grub_pci_device_t dev,
- (space & GRUB_PCI_ADDR_MEM_MASK),
- space & GRUB_PCI_ADDR_MEM_PREFETCH
- ? "prefetchable" : "non-prefetchable");
--
-+
- }
- else
- grub_printf ("\t32-bit memory space %d at 0x%016llx [%s]\n",
- (unsigned) ((reg - GRUB_PCI_REG_ADDRESSES)
- / sizeof (grub_uint32_t)) - 1,
-- (unsigned long long)
-+ (unsigned long long)
- (space & GRUB_PCI_ADDR_MEM_MASK),
- space & GRUB_PCI_ADDR_MEM_PREFETCH
- ? "prefetchable" : "non-prefetchable");
---- a/grub-core/fs/cpio_common.c
-+++ b/grub-core/fs/cpio_common.c
-@@ -26,7 +26,9 @@
- #include <grub/archelp.h>
-
- GRUB_MOD_LICENSE ("GPLv3+");
--
-+#if __GNUC__ >= 9
-+#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
-+#endif
- struct grub_archelp_data
- {
- grub_disk_t disk;
-@@ -108,7 +110,7 @@ grub_cpio_get_link_target (struct grub_a
- if (!ret)
- return NULL;
-
-- err = grub_disk_read (data->disk, 0, data->dofs, data->size,
-+ err = grub_disk_read (data->disk, 0, data->dofs, data->size,
- ret);
- if (err)
- {
---- a/grub-core/fs/hfs.c
-+++ b/grub-core/fs/hfs.c
-@@ -32,6 +32,9 @@
- #include <grub/fshelp.h>
-
- GRUB_MOD_LICENSE ("GPLv3+");
-+#if __GNUC__ >= 9
-+#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
-+#endif
-
- #define GRUB_HFS_SBLOCK 2
- #define GRUB_HFS_EMBED_HFSPLUS_SIG 0x482B
-@@ -882,7 +885,7 @@ grub_hfs_iterate_dir_it_dir (struct grub
- {
- struct grub_hfs_catalog_key *ckey = rec->key;
- struct grub_hfs_iterate_dir_node_found_ctx *ctx = hook_arg;
--
-+
- /* Stop when the entries do not match anymore. */
- if (ckey->parent_dir != ctx->dir_be)
- return 1;
-@@ -1076,7 +1079,7 @@ macroman_to_utf8 (char *to, const grub_u
- {
- *optr++ = ':';
- continue;
-- }
-+ }
- if (!(*iptr & 0x80))
- {
- *optr++ = *iptr;
-@@ -1093,7 +1096,7 @@ utf8_to_macroman (grub_uint8_t *to, cons
- grub_uint8_t *end = to + 31;
- grub_uint8_t *optr = to;
- const char *iptr = from;
--
-+
- while (*iptr && optr < end)
- {
- int i, clen;
-@@ -1103,7 +1106,7 @@ utf8_to_macroman (grub_uint8_t *to, cons
- *optr++ = '/';
- iptr++;
- continue;
-- }
-+ }
- if (!(*iptr & 0x80))
- {
- *optr++ = *iptr++;
-@@ -1164,7 +1167,7 @@ lookup_file (grub_fshelp_node_t dir,
- *foundnode = grub_malloc (sizeof (struct grub_fshelp_node));
- if (!*foundnode)
- return grub_errno;
--
-+
- (*foundnode)->inode = grub_be_to_cpu32 (fdrec.dir.dirid);
- (*foundnode)->fdrec = fdrec;
- (*foundnode)->data = dir->data;
-@@ -1265,7 +1268,7 @@ grub_hfs_dir (grub_device_t device, cons
- .hook_data = hook_data
- };
- grub_fshelp_node_t found = NULL;
--
-+
- grub_dl_ref (my_mod);
-
- data = grub_hfs_mount (device->disk);
-@@ -1294,7 +1297,7 @@ grub_hfs_open (struct grub_file *file, c
- {
- struct grub_hfs_data *data;
- grub_fshelp_node_t found = NULL;
--
-+
- grub_dl_ref (my_mod);
-
- data = grub_hfs_mount (file->device->disk);
---- a/grub-core/fs/hfsplus.c
-+++ b/grub-core/fs/hfsplus.c
-@@ -19,7 +19,7 @@
-
- /* HFS+ is documented at http://developer.apple.com/technotes/tn/tn1150.html */
-
--#define grub_fshelp_node grub_hfsplus_file
-+#define grub_fshelp_node grub_hfsplus_file
- #include <grub/err.h>
- #include <grub/file.h>
- #include <grub/mm.h>
-@@ -34,6 +34,9 @@
-
- GRUB_MOD_LICENSE ("GPLv3+");
-
-+#if __GNUC__ >= 9
-+#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
-+#endif
- /* The type of node. */
- enum grub_hfsplus_btnode_type
- {
-@@ -145,7 +148,7 @@ grub_hfsplus_read_block (grub_fshelp_nod
- {
- struct grub_hfsplus_btnode *nnode = 0;
- grub_disk_addr_t blksleft = fileblock;
-- struct grub_hfsplus_extent *extents = node->compressed
-+ struct grub_hfsplus_extent *extents = node->compressed
- ? &node->resource_extents[0] : &node->extents[0];
-
- while (1)
-@@ -461,7 +464,7 @@ grub_hfsplus_cmp_extkey (struct grub_hfs
-
- if (extkey_a->type < extkey_b->type)
- return -1;
--
-+
- akey = grub_be_to_cpu32 (extkey_a->start);
- if (akey > extkey_b->start)
- return 1;
-@@ -548,7 +551,7 @@ grub_hfsplus_btree_search (struct grub_h
- struct grub_hfsplus_key_internal *key,
- int (*compare_keys) (struct grub_hfsplus_key *keya,
- struct grub_hfsplus_key_internal *keyb),
-- struct grub_hfsplus_btnode **matchnode,
-+ struct grub_hfsplus_btnode **matchnode,
- grub_off_t *keyoffset)
- {
- grub_uint64_t currnode;
---- a/grub-core/fs/jfs.c
-+++ b/grub-core/fs/jfs.c
-@@ -28,6 +28,9 @@
- #include <grub/i18n.h>
-
- GRUB_MOD_LICENSE ("GPLv3+");
-+#if __GNUC__ >= 9
-+#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
-+#endif
-
- #define GRUB_JFS_MAX_SYMLNK_CNT 8
- #define GRUB_JFS_FILETYPE_MASK 0170000
---- a/grub-core/kern/efi/efi.c
-+++ b/grub-core/kern/efi/efi.c
-@@ -29,6 +29,9 @@
- #include <grub/mm.h>
- #include <grub/loader.h>
-
-+#if __GNUC__ >= 9
-+#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
-+#endif
- /* The handle of GRUB itself. Filled in by the startup code. */
- grub_efi_handle_t grub_efi_image_handle;
-
-@@ -201,7 +204,7 @@ grub_efi_set_variable(const char *var, c
-
- r = grub_efi_system_table->runtime_services;
-
-- status = efi_call_5 (r->set_variable, var16, guid,
-+ status = efi_call_5 (r->set_variable, var16, guid,
- (GRUB_EFI_VARIABLE_NON_VOLATILE
- | GRUB_EFI_VARIABLE_BOOTSERVICE_ACCESS
- | GRUB_EFI_VARIABLE_RUNTIME_ACCESS),
---- a/grub-core/loader/efi/chainloader.c
-+++ b/grub-core/loader/efi/chainloader.c
-@@ -41,6 +41,9 @@
- #endif
-
- GRUB_MOD_LICENSE ("GPLv3+");
-+#if __GNUC__ >= 9
-+#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
-+#endif
-
- static grub_dl_t my_mod;
-
---- a/grub-core/commands/usbtest.c
-+++ b/grub-core/commands/usbtest.c
-@@ -63,6 +63,10 @@ static const char *usb_devspeed[] =
- "High"
- };
-
-+#if __GNUC__ >= 9
-+#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
-+#endif
-+
- static grub_usb_err_t
- grub_usb_get_string (grub_usb_device_t dev, grub_uint8_t index, int langid,
- char **string)
diff --git a/meta-amd-bsp/recipes-bsp/grub/files/fix.build.with.gcc-7.patch b/meta-amd-bsp/recipes-bsp/grub/files/fix.build.with.gcc-7.patch
deleted file mode 100644
index f35df97b..00000000
--- a/meta-amd-bsp/recipes-bsp/grub/files/fix.build.with.gcc-7.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-* e.g. with gentoo gcc-7.1 they define _FORTIFY_SOURCE by default with:
- https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo/src/patchsets/gcc/7.1.0/gentoo/10_all_default-fortify-source.patch?view=markup
- which results in following error while building grub-efi-native:
- ./config-util.h:1504:48: error: this use of "defined" may not be portable [-Werror=expansion-to-defined]
- || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \
- ^~~~~~~~~~~~~~~
- this part comes from gnulib and it's used only for Apple and BSD,
- so we can ignore it, but we cannot add -Wno-error=expansion-to-defined
- because this warning was introduced only in gcc-7 and older gcc
- will fail with:
- cc1: error: -Werror=expansion-to-defined: no option -Wexpansion-to-defined
- use #pragma to work around this
-
-Upstream-Status: Pending (should be fixed in gnulib which is then rarely updated in grub)
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-
-diff -uNr grub-2.02.old/m4/extern-inline.m4 grub-2.02/m4/extern-inline.m4
---- grub-2.02.old/m4/extern-inline.m4 2016-02-28 15:22:21.000000000 +0100
-+++ grub-2.02/m4/extern-inline.m4 2017-08-22 19:26:45.213637276 +0200
-@@ -39,6 +39,10 @@
- OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and
- for clang but remains for g++; see <http://trac.macports.org/ticket/41033>.
- Assume DragonFly and FreeBSD will be similar. */
-+#pragma GCC diagnostic push
-+#if __GNUC__ >= 7
-+#pragma GCC diagnostic ignored "-Wexpansion-to-defined"
-+#endif
- #if (((defined __APPLE__ && defined __MACH__) \
- || defined __DragonFly__ || defined __FreeBSD__) \
- && (defined __header_inline \
-@@ -50,6 +52,7 @@
- && defined __GNUC__ && ! defined __cplusplus))))
- # define _GL_EXTERN_INLINE_STDHEADER_BUG
- #endif
-+#pragma GCC diagnostic pop
- #if ((__GNUC__ \
- ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
- : (199901L <= __STDC_VERSION__ \
diff --git a/meta-amd-bsp/recipes-bsp/grub/files/fix.build.with.squashfs.patch b/meta-amd-bsp/recipes-bsp/grub/files/fix.build.with.squashfs.patch
deleted file mode 100644
index 2c2d2ea0..00000000
--- a/meta-amd-bsp/recipes-bsp/grub/files/fix.build.with.squashfs.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-When squashfs support is enabled, the build fails with:
-
-../grub-2.02/grub-core/fs/squash4.c: In function 'direct_read':
-../grub-2.02/grub-core/fs/squash4.c:868:10: error: 'err' may be used uninitialized in this function [-Werror=maybe-uninitialized]
- if (err)
- ^
-cc1: all warnings being treated as errors
-Makefile:7272: recipe for target 'grub-core/fs/libgrubmods_a-squash4.o' failed
-
-Upstream-Status: Pending (should be fixed in gnulib which is then rarely updated in grub)
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-
---- grub-2.02/grub-core/fs/squash4.c 2019-03-10 20:00:14.070468728 +0000
-+++ grub-2.02.fixed/grub-core/fs/squash4.c 2019-03-10 19:58:31.382477818 +0000
-@@ -746,7 +746,7 @@
- struct grub_squash_cache_inode *ino,
- grub_off_t off, char *buf, grub_size_t len)
- {
-- grub_err_t err;
-+ grub_err_t err = 0;
- grub_off_t cumulated_uncompressed_size = 0;
- grub_uint64_t a = 0;
- grub_size_t i;
diff --git a/meta-amd-bsp/recipes-bsp/grub/files/gcc8.patch b/meta-amd-bsp/recipes-bsp/grub/files/gcc8.patch
deleted file mode 100644
index fa7331f1..00000000
--- a/meta-amd-bsp/recipes-bsp/grub/files/gcc8.patch
+++ /dev/null
@@ -1,74 +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>
-
-Upstream-Status: Backport http://git.savannah.gnu.org/cgit/grub.git/commit/?id=563b1da6e6ae7af46cc8354cadb5dab416989f0a
----
- 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 4849c1c..be19544 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 9b6b729..36d2ded 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 1b32f67..9668a68 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.0-41-gc330
-
diff --git a/meta-amd-bsp/recipes-bsp/grub/files/grub-module-explicitly-keeps-symbole-.module_license.patch b/meta-amd-bsp/recipes-bsp/grub/files/grub-module-explicitly-keeps-symbole-.module_license.patch
deleted file mode 100644
index ffc2d40d..00000000
--- a/meta-amd-bsp/recipes-bsp/grub/files/grub-module-explicitly-keeps-symbole-.module_license.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 7461a3de38b66edbe2f5593f9bdab9f2704d32bc Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Wed, 17 Aug 2016 04:06:34 -0400
-Subject: [PATCH] grub module explicitly keeps symbole .module_license
-
-While using oe-core toolchain to strip grub module 'all_video.mod',
-it stripped symbol table:
---------------
-root@localhost:~# objdump -t all_video.mod
-
-all_video.mod: file format elf64-x86-64
-
-SYMBOL TABLE:
-no symbols
---------------
-
-It caused grub to load module all_video failed.
---------------
-grub> insmod all_video
-error: no symbol table.
---------------
-
-Tweak strip option to keep symbol .module_license could workaround
-the issue.
---------------
-root@localhost:~# objdump -t all_video.mod
-
-all_video.mod: file format elf64-x86-64
-
-SYMBOL TABLE:
-0000000000000000 l d .text 0000000000000000 .text
-0000000000000000 l d .data 0000000000000000 .data
-0000000000000000 l d .module_license 0000000000000000 .module_license
-0000000000000000 l d .bss 0000000000000000 .bss
-0000000000000000 l d .moddeps 0000000000000000 .moddeps
-0000000000000000 l d .modname 0000000000000000 .modname
---------------
-
-Upstream-Status: Pending
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- grub-core/genmod.sh.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: grub-2.02/grub-core/genmod.sh.in
-===================================================================
---- grub-2.02.orig/grub-core/genmod.sh.in
-+++ grub-2.02/grub-core/genmod.sh.in
-@@ -56,7 +56,7 @@ if test x@TARGET_APPLE_LINKER@ != x1; th
- if test x@platform@ != xemu; then
- @TARGET_STRIP@ --strip-unneeded \
- -K grub_mod_init -K grub_mod_fini \
-- -K _grub_mod_init -K _grub_mod_fini \
-+ -K _grub_mod_init -K _grub_mod_fini -K .module_license \
- -R .note.gnu.gold-version -R .note.GNU-stack \
- -R .note -R .comment -R .ARM.exidx $tmpfile || exit 1
- fi
diff --git a/meta-amd-bsp/recipes-bsp/grub/grub-efi_2.02.bbappend b/meta-amd-bsp/recipes-bsp/grub/grub-efi_%.bbappend
index 018c1513..26a77e9b 100644
--- a/meta-amd-bsp/recipes-bsp/grub/grub-efi_2.02.bbappend
+++ b/meta-amd-bsp/recipes-bsp/grub/grub-efi_%.bbappend
@@ -1,2 +1,3 @@
+require grub-fixes.inc
+
RDEPENDS_${PN}_class-target_append = " efibootmgr"
-export PYTHON
diff --git a/meta-amd-bsp/recipes-bsp/grub/grub-efi_2.02.bb b/meta-amd-bsp/recipes-bsp/grub/grub-efi_2.02.bb
deleted file mode 100644
index 14fce97f..00000000
--- a/meta-amd-bsp/recipes-bsp/grub/grub-efi_2.02.bb
+++ /dev/null
@@ -1,112 +0,0 @@
-require grub2.inc
-
-GRUBPLATFORM = "efi"
-
-DEPENDS_append_class-target = " grub-efi-native"
-RDEPENDS_${PN}_class-target = "diffutils freetype grub-common virtual/grub-bootconf"
-
-SRC_URI += " \
- file://cfg \
- "
-
-S = "${WORKDIR}/grub-${PV}"
-
-# Determine the target arch for the grub modules
-python __anonymous () {
- import re
- target = d.getVar('TARGET_ARCH')
- prefix = "" if d.getVar('EFI_PROVIDER') == "grub-efi" else "grub-efi-"
- if target == "x86_64":
- grubtarget = 'x86_64'
- grubimage = prefix + "bootx64.efi"
- elif re.match('i.86', target):
- grubtarget = 'i386'
- grubimage = prefix + "bootia32.efi"
- elif re.match('aarch64', target):
- grubtarget = 'arm64'
- grubimage = prefix + "bootaa64.efi"
- elif re.match('arm', target):
- grubtarget = 'arm'
- grubimage = prefix + "bootarm.efi"
- else:
- raise bb.parse.SkipRecipe("grub-efi is incompatible with target %s" % target)
- d.setVar("GRUB_TARGET", grubtarget)
- d.setVar("GRUB_IMAGE", grubimage)
- prefix = "grub-efi-" if prefix == "" else ""
- d.setVar("GRUB_IMAGE_PREFIX", prefix)
-}
-
-inherit deploy
-
-CACHED_CONFIGUREVARS += "ac_cv_path_HELP2MAN="
-EXTRA_OECONF += "--enable-efiemu=no"
-
-# ldm.c:114:7: error: trampoline generated for nested function 'hook' [-Werror=trampolines]
-# and many other places in the grub code when compiled with some native gcc compilers (specifically, gentoo)
-CFLAGS_append_class-native = " -Wno-error=trampolines"
-
-do_mkimage() {
- cd ${B}
- # Search for the grub.cfg on the local boot media by using the
- # built in cfg file provided via this recipe
- grub-mkimage -c ../cfg -p /EFI/BOOT -d ./grub-core/ \
- -O ${GRUB_TARGET}-efi -o ./${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} \
- ${GRUB_BUILDIN}
-}
-
-addtask mkimage before do_install after do_compile
-
-do_mkimage_class-native() {
- :
-}
-
-do_install_append_class-target() {
- install -d ${D}/boot
- install -d ${D}/boot/EFI
- install -d ${D}/boot/EFI/BOOT
- install -m 644 ${B}/${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} ${D}/boot/EFI/BOOT/${GRUB_IMAGE}
-}
-
-do_install_class-native() {
- install -d ${D}${bindir}
- install -m 755 grub-mkimage ${D}${bindir}
-}
-
-do_install_class-target() {
- oe_runmake 'DESTDIR=${D}' -C grub-core install
-
- # Remove build host references...
- find "${D}" -name modinfo.sh -type f -exec \
- sed -i \
- -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
- -e 's|${DEBUG_PREFIX_MAP}||g' \
- -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
- {} +
-}
-
-GRUB_BUILDIN ?= "boot linux ext2 fat serial part_msdos part_gpt normal \
- efi_gop iso9660 configfile search loadenv test"
-
-do_deploy() {
- install -m 644 ${B}/${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} ${DEPLOYDIR}
-}
-
-do_deploy_class-native() {
- :
-}
-
-addtask deploy after do_install before do_build
-
-FILES_${PN} = "${libdir}/grub/${GRUB_TARGET}-efi \
- ${datadir}/grub \
- /boot/EFI/BOOT/${GRUB_IMAGE} \
- "
-
-
-# 64-bit binaries are expected for the bootloader with an x32 userland
-INSANE_SKIP_${PN}_append_linux-gnux32 = " arch"
-INSANE_SKIP_${PN}-dbg_append_linux-gnux32 = " arch"
-INSANE_SKIP_${PN}_append_linux-muslx32 = " arch"
-INSANE_SKIP_${PN}-dbg_append_linux-muslx32 = " arch"
-
-BBCLASSEXTEND = "native"
diff --git a/meta-amd-bsp/recipes-bsp/grub/grub-fixes.inc b/meta-amd-bsp/recipes-bsp/grub/grub-fixes.inc
new file mode 100644
index 00000000..2d425c09
--- /dev/null
+++ b/meta-amd-bsp/recipes-bsp/grub/grub-fixes.inc
@@ -0,0 +1,5 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+export PYTHON
+
+SRC_URI += "file://0001-x86_64-amd-avoid-SSE-register-return-with-SSE-disabl.patch"
diff --git a/meta-amd-bsp/recipes-bsp/grub/grub2.inc b/meta-amd-bsp/recipes-bsp/grub/grub2.inc
deleted file mode 100644
index fdff6784..00000000
--- a/meta-amd-bsp/recipes-bsp/grub/grub2.inc
+++ /dev/null
@@ -1,76 +0,0 @@
-SUMMARY = "GRUB2 is the next-generation GRand Unified Bootloader"
-
-DESCRIPTION = "GRUB2 is the next generaion of a GPLed bootloader \
-intended to unify bootloading across x86 operating systems. In \
-addition to loading the Linux kernel, it implements the Multiboot \
-standard, which allows for flexible loading of multiple boot images."
-
-HOMEPAGE = "http://www.gnu.org/software/grub/"
-SECTION = "bootloaders"
-
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-SRC_URI = "https://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
- file://0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch \
- file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
- file://autogen.sh-exclude-pc.patch \
- file://grub-module-explicitly-keeps-symbole-.module_license.patch \
- file://0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch \
- file://fix.build.with.gcc-7.patch \
- file://gcc8.patch \
- file://0001-x86-64-Treat-R_X86_64_PLT32-as-R_X86_64_PC32.patch \
- file://0001-grub-setup-Debug-message-cleanup.patch \
- file://disable-address-of-packed-member.patch \
- file://fix.build.with.squashfs.patch \
- file://cast-fprintf.patch \
-"
-SRC_URI[md5sum] = "1116d1f60c840e6dbd67abbc99acb45d"
-SRC_URI[sha256sum] = "660ee136fbcee08858516ed4de2ad87068bfe1b6b8b37896ce3529ff054a726d"
-
-DEPENDS = "flex-native bison-native"
-
-COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*)-(linux.*|freebsd.*)'
-COMPATIBLE_HOST_armv7a = 'null'
-COMPATIBLE_HOST_armv7ve = 'null'
-
-# configure.ac has code to set this automagically from the target tuple
-# but the OE freeform one (core2-foo-bar-linux) don't work with that.
-
-GRUBPLATFORM_arm = "efi"
-GRUBPLATFORM_aarch64 = "efi"
-GRUBPLATFORM ??= "pc"
-
-inherit autotools gettext texinfo
-
-EXTRA_OECONF = "--with-platform=${GRUBPLATFORM} \
- --disable-grub-mkfont \
- --program-prefix="" \
- --enable-liblzma=no \
- --enable-libzfs=no \
- --enable-largefile \
-"
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[grub-mount] = "--enable-grub-mount,--disable-grub-mount,fuse"
-PACKAGECONFIG[device-mapper] = "--enable-device-mapper,--disable-device-mapper,libdevmapper"
-
-# grub2 creates its own set of -nostdinc / -isystem / -ffreestanding CFLAGS and
-# OE's default BUILD_CFLAGS (assigned to CFLAGS for native builds) etc, conflict
-# with that. Note that since BUILD_CFLAGS etc are not used by grub2 target
-# builds, it's safe to clear them unconditionally for both target and native.
-BUILD_CPPFLAGS = ""
-BUILD_CFLAGS = ""
-BUILD_CXXFLAGS = ""
-BUILD_LDFLAGS = ""
-
-do_configure_prepend() {
- # The grub2 configure script uses variables such as TARGET_CFLAGS etc
- # for its own purposes. Remove the OE versions from the environment to
- # avoid conflicts.
- unset TARGET_CPPFLAGS TARGET_CFLAGS TARGET_CXXFLAGS TARGET_LDFLAGS
- ( cd ${S}
- ${S}/autogen.sh )
-}
-
-RDEPENDS_${PN}_class-native = ""
diff --git a/meta-amd-bsp/recipes-bsp/grub/grub_%.bbappend b/meta-amd-bsp/recipes-bsp/grub/grub_%.bbappend
new file mode 100644
index 00000000..501f81fc
--- /dev/null
+++ b/meta-amd-bsp/recipes-bsp/grub/grub_%.bbappend
@@ -0,0 +1 @@
+require grub-fixes.inc
diff --git a/meta-amd-bsp/recipes-bsp/grub/grub_2.02.bb b/meta-amd-bsp/recipes-bsp/grub/grub_2.02.bb
deleted file mode 100644
index e0973759..00000000
--- a/meta-amd-bsp/recipes-bsp/grub/grub_2.02.bb
+++ /dev/null
@@ -1,29 +0,0 @@
-require grub2.inc
-
-RDEPENDS_${PN}-common += "${PN}-editenv"
-RDEPENDS_${PN} += "diffutils freetype ${PN}-common"
-
-RPROVIDES_${PN}-editenv += "${PN}-efi-editenv"
-
-PACKAGES =+ "${PN}-editenv ${PN}-common"
-FILES_${PN}-editenv = "${bindir}/grub-editenv"
-FILES_${PN}-common = " \
- ${bindir} \
- ${sysconfdir} \
- ${sbindir} \
- ${datadir}/grub \
-"
-
-do_install_append () {
- install -d ${D}${sysconfdir}/grub.d
- # Remove build host references...
- find "${D}" -name modinfo.sh -type f -exec \
- sed -i \
- -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
- -e 's|${DEBUG_PREFIX_MAP}||g' \
- -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
- {} +
-}
-
-INSANE_SKIP_${PN} = "arch"
-INSANE_SKIP_${PN}-dbg = "arch"
diff --git a/meta-amd-bsp/recipes-bsp/grub/grub_2.02.bbappend b/meta-amd-bsp/recipes-bsp/grub/grub_2.02.bbappend
deleted file mode 100644
index e91aab49..00000000
--- a/meta-amd-bsp/recipes-bsp/grub/grub_2.02.bbappend
+++ /dev/null
@@ -1 +0,0 @@
-export PYTHON