1SUMMARY = "GRUB2 is the next-generation GRand Unified Bootloader" 2 3DESCRIPTION = "GRUB2 is the next generaion of a GPLed bootloader \ 4intended to unify bootloading across x86 operating systems. In \ 5addition to loading the Linux kernel, it implements the Multiboot \ 6standard, which allows for flexible loading of multiple boot images." 7 8HOMEPAGE = "http://www.gnu.org/software/grub/" 9SECTION = "bootloaders" 10 11LICENSE = "GPL-3.0-only" 12LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" 13 14CVE_PRODUCT = "grub2" 15 16SRC_URI = "${GNU_MIRROR}/grub/grub-${PV}.tar.gz \ 17 file://0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch \ 18 file://autogen.sh-exclude-pc.patch \ 19 file://grub-module-explicitly-keeps-symbole-.module_license.patch \ 20 file://0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch \ 21 file://determinism.patch \ 22 file://0001-RISC-V-Restore-the-typcast-to-long.patch \ 23 file://CVE-2021-3981-grub-mkconfig-Restore-umask-for-the-grub.cfg.patch \ 24 file://0001-configure.ac-Use-_zicsr_zifencei-extentions-on-riscv.patch \ 25" 26 27SRC_URI[sha256sum] = "23b64b4c741569f9426ed2e3d0e6780796fca081bee4c99f62aa3f53ae803f5f" 28 29# Applies only to RHEL 30CVE_CHECK_IGNORE += "CVE-2019-14865" 31# Applies only to SUSE 32CVE_CHECK_IGNORE += "CVE-2021-46705" 33 34DEPENDS = "flex-native bison-native gettext-native" 35 36COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|riscv.*)-(linux.*|freebsd.*)' 37COMPATIBLE_HOST:armv7a = 'null' 38COMPATIBLE_HOST:armv7ve = 'null' 39 40# configure.ac has code to set this automagically from the target tuple 41# but the OE freeform one (core2-foo-bar-linux) don't work with that. 42 43GRUBPLATFORM:arm = "efi" 44GRUBPLATFORM:aarch64 = "efi" 45GRUBPLATFORM:riscv32 = "efi" 46GRUBPLATFORM:riscv64 = "efi" 47GRUBPLATFORM ??= "pc" 48 49inherit autotools gettext texinfo pkgconfig 50 51CFLAGS:remove = "-O2" 52 53EXTRA_OECONF = "--with-platform=${GRUBPLATFORM} \ 54 --disable-grub-mkfont \ 55 --program-prefix="" \ 56 --enable-liblzma=no \ 57 --enable-libzfs=no \ 58 --enable-largefile \ 59 --disable-werror \ 60" 61 62PACKAGECONFIG ??= "" 63PACKAGECONFIG[grub-mount] = "--enable-grub-mount,--disable-grub-mount,fuse" 64PACKAGECONFIG[device-mapper] = "--enable-device-mapper,--disable-device-mapper,libdevmapper" 65 66# grub2 creates its own set of -nostdinc / -isystem / -ffreestanding CFLAGS and 67# OE's default BUILD_CFLAGS (assigned to CFLAGS for native builds) etc, conflict 68# with that. Note that since BUILD_CFLAGS etc are not used by grub2 target 69# builds, it's safe to clear them unconditionally for both target and native. 70BUILD_CPPFLAGS = "" 71BUILD_CFLAGS = "" 72BUILD_CXXFLAGS = "" 73BUILD_LDFLAGS = "" 74 75export PYTHON = "python3" 76 77do_configure:prepend() { 78 cd ${S} 79 FROM_BOOTSTRAP=1 ${S}/autogen.sh 80 cd ${B} 81} 82