summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp/grub/grub2.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-bsp/grub/grub2.inc')
-rw-r--r--meta/recipes-bsp/grub/grub2.inc47
1 files changed, 28 insertions, 19 deletions
diff --git a/meta/recipes-bsp/grub/grub2.inc b/meta/recipes-bsp/grub/grub2.inc
index 590deb8d92..bb9aacb478 100644
--- a/meta/recipes-bsp/grub/grub2.inc
+++ b/meta/recipes-bsp/grub/grub2.inc
@@ -8,47 +8,51 @@ standard, which allows for flexible loading of multiple boot images."
HOMEPAGE = "http://www.gnu.org/software/grub/"
SECTION = "bootloaders"
-LICENSE = "GPLv3"
+LICENSE = "GPL-3.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
CVE_PRODUCT = "grub2"
-SRC_URI = "https://alpha.gnu.org/gnu/grub/grub-${REALPV}.tar.xz \
+SRC_URI = "${GNU_MIRROR}/grub/grub-${PV}.tar.gz \
file://0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.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://determinism.patch \
file://0001-RISC-V-Restore-the-typcast-to-long.patch \
"
-SRC_URI[sha256sum] = "2c87f1f21e2ab50043e6cd9163c08f1b6c3a6171556bf23ff9ed65b074145484"
+SRC_URI[sha256sum] = "b30919fa5be280417c17ac561bb1650f60cfb80cc6237fa1e2b6f56154cb9c91"
-REALPV = "2.06~rc1"
-PV = "2.04+${REALPV}"
-
-S = "${WORKDIR}/grub-${REALPV}"
-
-UPSTREAM_CHECK_URI = "${GNU_MIRROR}/grub"
-UPSTREAM_CHECK_REGEX = "grub-(?P<pver>\d+(\.\d+)+)\.tar\.(gz|xz)"
+CVE_STATUS[CVE-2019-14865] = "not-applicable-platform: applies only to RHEL"
+CVE_STATUS[CVE-2021-46705] = "not-applicable-platform: Applies only to SUSE"
+CVE_STATUS[CVE-2023-4001] = "not-applicable-platform: Applies only to RHEL/Fedora"
+CVE_STATUS[CVE-2024-1048] = "not-applicable-platform: Applies only to RHEL/Fedora"
+CVE_STATUS[CVE-2023-4692] = "cpe-incorrect: Fixed in version 2.12 already"
+CVE_STATUS[CVE-2023-4693] = "cpe-incorrect: Fixed in version 2.12 already"
DEPENDS = "flex-native bison-native gettext-native"
-COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|riscv.*)-(linux.*|freebsd.*)'
-COMPATIBLE_HOST_armv7a = 'null'
-COMPATIBLE_HOST_armv7ve = 'null'
+GRUB_COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|riscv.*)-(linux.*|freebsd.*)'
+COMPATIBLE_HOST = "${GRUB_COMPATIBLE_HOST}"
+# Grub doesn't support hard float toolchain and won't be able to forcefully
+# disable it on some of the target CPUs. See 'configure.ac' for
+# supported/unsupported CPUs in hardfp.
+COMPATIBLE_HOST:armv7a = "${@'null' if bb.utils.contains('TUNE_CCARGS_MFLOAT', 'hard', True, False, d) else d.getVar('GRUB_COMPATIBLE_HOST')}"
+COMPATIBLE_HOST:armv7ve = "${@'null' if bb.utils.contains('TUNE_CCARGS_MFLOAT', 'hard', True, False, d) else d.getVar('GRUB_COMPATIBLE_HOST')}"
# 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_riscv32 = "efi"
-GRUBPLATFORM_riscv64 = "efi"
+GRUBPLATFORM:arm = "efi"
+GRUBPLATFORM:aarch64 = "efi"
+GRUBPLATFORM:riscv32 = "efi"
+GRUBPLATFORM:riscv64 = "efi"
GRUBPLATFORM ??= "pc"
inherit autotools gettext texinfo pkgconfig
+CFLAGS:remove = "-O2"
+
EXTRA_OECONF = "--with-platform=${GRUBPLATFORM} \
--disable-grub-mkfont \
--program-prefix="" \
@@ -73,8 +77,13 @@ BUILD_LDFLAGS = ""
export PYTHON = "python3"
-do_configure_prepend() {
+do_configure:prepend() {
cd ${S}
+
+ # Remove in next version.
+ # See: https://git.savannah.gnu.org/cgit/grub.git/commit/?id=b835601c7639ed1890f2d3db91900a8506011a8e
+ echo "depends bli part_gpt" > ${S}/grub-core/extra_deps.lst
+
FROM_BOOTSTRAP=1 ${S}/autogen.sh
cd ${B}
}