From b3027b4cb1133cfff5ce6e629ddad6f7533ae1ab Mon Sep 17 00:00:00 2001 From: Lluis Campos Date: Tue, 7 Jan 2025 14:27:03 +0100 Subject: [PATCH 1/2] chore: Remove unused patches They are unused since d57ed54 and survived the clean-up from 35fdb3c. Signed-off-by: Lluis Campos --- ...-wrong-detection-headeris-in-warrior.patch | 78 ------------------- .../recipes-bsp/grub/patches/gcc8.patch | 74 ------------------ 2 files changed, 152 deletions(-) delete mode 100644 meta-mender-core/recipes-bsp/grub/patches/0001-workaround-wrong-detection-headeris-in-warrior.patch delete mode 100644 meta-mender-core/recipes-bsp/grub/patches/gcc8.patch diff --git a/meta-mender-core/recipes-bsp/grub/patches/0001-workaround-wrong-detection-headeris-in-warrior.patch b/meta-mender-core/recipes-bsp/grub/patches/0001-workaround-wrong-detection-headeris-in-warrior.patch deleted file mode 100644 index 9b93ca3e7..000000000 --- a/meta-mender-core/recipes-bsp/grub/patches/0001-workaround-wrong-detection-headeris-in-warrior.patch +++ /dev/null @@ -1,78 +0,0 @@ -From 469bf02510cda9d7bb3d3f3521a221845054786a Mon Sep 17 00:00:00 2001 -From: Lluis Campos -Date: Fri, 13 Sep 2019 17:10:43 +0200 -Subject: [PATCH] Workaround wrong detection headeris in warrior - -For some uknown reason, in Yocto warrior the grub configure script is -not able to find two header files: wchar.h and sysmacros.h, which -triggers the build to abort with compile errors. - -The header files are actually there for glibc and probably most of libc -versions used for native compile. As we are interested in grub-editenv, -and not compiling grub itself, it should be safe to assume tha the -headers are present in the sysroot for the toolchain. - -Upstream-Status: Inappropriate [Mender specific] - -Signed-off-by: Lluis Campos ---- - grub-core/gnulib/wchar.in.h | 5 +++-- - grub-core/osdep/linux/getroot.c | 7 +++---- - grub-core/osdep/unix/getroot.c | 7 +++---- - 3 files changed, 9 insertions(+), 10 deletions(-) - -diff --git a/grub-core/gnulib/wchar.in.h b/grub-core/gnulib/wchar.in.h -index b6e4362..6de02fd 100644 ---- a/grub-core/gnulib/wchar.in.h -+++ b/grub-core/gnulib/wchar.in.h -@@ -74,9 +74,10 @@ - /* Include the original if it exists. - Some builds of uClibc lack it. */ - /* The include_next requires a split double-inclusion guard. */ --#if @HAVE_WCHAR_H@ -+/* Assume the header file exists. For some strange reason, -+ * configure resolves the header to no exist when building -+ * on Yocto warrior branch */ - # @INCLUDE_NEXT@ @NEXT_WCHAR_H@ --#endif - - #undef _GL_ALREADY_INCLUDING_WCHAR_H - -diff --git a/grub-core/osdep/linux/getroot.c b/grub-core/osdep/linux/getroot.c -index 90d92d3..00fd6e2 100644 ---- a/grub-core/osdep/linux/getroot.c -+++ b/grub-core/osdep/linux/getroot.c -@@ -35,11 +35,10 @@ - #include - #endif - --#if defined(MAJOR_IN_MKDEV) --#include --#elif defined(MAJOR_IN_SYSMACROS) -+/* Assume the header file exists. For some strange reason, -+ * configure resolves the header to no exist when building -+ * on Yocto warrior branch */ - #include --#endif - - #include - #include /* ioctl */ -diff --git a/grub-core/osdep/unix/getroot.c b/grub-core/osdep/unix/getroot.c -index 4bf37b0..18ae6b9 100644 ---- a/grub-core/osdep/unix/getroot.c -+++ b/grub-core/osdep/unix/getroot.c -@@ -51,11 +51,10 @@ - #endif - - #include --#if defined(MAJOR_IN_MKDEV) --#include --#elif defined(MAJOR_IN_SYSMACROS) -+/* Assume the header file exists. For some strange reason, -+ * configure resolves the header to no exist when building -+ * on Yocto warrior branch */ - #include --#endif - - #if defined(HAVE_LIBZFS) && defined(HAVE_LIBNVPAIR) - # include diff --git a/meta-mender-core/recipes-bsp/grub/patches/gcc8.patch b/meta-mender-core/recipes-bsp/grub/patches/gcc8.patch deleted file mode 100644 index fa7331f1b..000000000 --- a/meta-mender-core/recipes-bsp/grub/patches/gcc8.patch +++ /dev/null @@ -1,74 +0,0 @@ -From 563b1da6e6ae7af46cc8354cadb5dab416989f0a Mon Sep 17 00:00:00 2001 -From: Michael Chang -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 -Tested-by: Michael Chang -Tested-by: Paul Menzel -Reviewed-by: Daniel Kiper - -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 - From 7419f2a3eca92d47e1965e2b1fcd6eb651fa7306 Mon Sep 17 00:00:00 2001 From: Lluis Campos Date: Tue, 7 Jan 2025 14:28:44 +0100 Subject: [PATCH 2/2] chore: Remove recipe for `grub-efi-precompiled` for GRUB v2.04 In master (and for next release) it is enough with keeping the latest recipe. Changelog: Title Signed-off-by: Lluis Campos --- .../grub/grub-efi-mender-precompiled_2.04.bb | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 meta-mender-core/recipes-bsp/grub/grub-efi-mender-precompiled_2.04.bb diff --git a/meta-mender-core/recipes-bsp/grub/grub-efi-mender-precompiled_2.04.bb b/meta-mender-core/recipes-bsp/grub/grub-efi-mender-precompiled_2.04.bb deleted file mode 100644 index 5874c712e..000000000 --- a/meta-mender-core/recipes-bsp/grub/grub-efi-mender-precompiled_2.04.bb +++ /dev/null @@ -1,10 +0,0 @@ -require grub-efi-mender-precompiled.inc - -# Grub version 2.04 -GRUB_MENDER_GRUBENV_REV = "eeb7ebd9e6558cf6bbe661b4f2e4e45d52efa305" - -SRC_URI = " \ - ${GRUB_MENDER_GRUBENV_SRC_URI} \ - ${URL_BASE}/${PV}-grub-mender-grubenv-${GRUB_MENDER_GRUBENV_REV}/${HOST_ARCH}/grub-efi-${EFI_BOOT_IMAGE};md5sum=63c8f8570b763b59dd2a26f372e03155 \ - ${URL_BASE}/${PV}-grub-mender-grubenv-${GRUB_MENDER_GRUBENV_REV}/${HOST_ARCH}/grub-editenv;md5sum=2c5e943a0acc4a6bd385a9d3f72b637b \ -"