blob: bb791347dcd3bb0ae7a3242ec7ae5735adaf0a9f [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "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 = "GPLv3"
12LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
13
Andrew Geissler635e0e42020-08-21 15:58:33 -050014CVE_PRODUCT = "grub2"
15
Andrew Geissler09036742021-06-25 14:25:14 -050016SRC_URI = "${GNU_MIRROR}/grub/grub-${PV}.tar.gz \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050017 file://0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050018 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 \
Andrew Geisslerd1e89492021-02-12 15:35:20 -060021 file://determinism.patch \
Andrew Geissler95ac1b82021-03-31 14:34:31 -050022 file://0001-RISC-V-Restore-the-typcast-to-long.patch \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050023"
Andrew Geissler95ac1b82021-03-31 14:34:31 -050024
Andrew Geissler09036742021-06-25 14:25:14 -050025SRC_URI[sha256sum] = "23b64b4c741569f9426ed2e3d0e6780796fca081bee4c99f62aa3f53ae803f5f"
William A. Kennington IIIac69b482021-06-02 12:28:27 -070026
27# Applies only to RHEL
28CVE_CHECK_WHITELIST += "CVE-2019-14865"
29
Brad Bishop08902b02019-08-20 09:16:51 -040030DEPENDS = "flex-native bison-native gettext-native"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050031
Andrew Geissler6ce62a22020-11-30 19:58:47 -060032COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|riscv.*)-(linux.*|freebsd.*)'
Patrick Williams213cb262021-08-07 19:21:33 -050033COMPATIBLE_HOST:armv7a = 'null'
34COMPATIBLE_HOST:armv7ve = 'null'
Patrick Williamsc124f4f2015-09-15 14:41:29 -050035
Brad Bishopd7bf8c12018-02-25 22:55:05 -050036# configure.ac has code to set this automagically from the target tuple
37# but the OE freeform one (core2-foo-bar-linux) don't work with that.
38
Patrick Williams213cb262021-08-07 19:21:33 -050039GRUBPLATFORM:arm = "efi"
40GRUBPLATFORM:aarch64 = "efi"
41GRUBPLATFORM:riscv32 = "efi"
42GRUBPLATFORM:riscv64 = "efi"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050043GRUBPLATFORM ??= "pc"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050044
Andrew Geissler82c905d2020-04-13 13:39:40 -050045inherit autotools gettext texinfo pkgconfig
Patrick Williamsc124f4f2015-09-15 14:41:29 -050046
Patrick Williams213cb262021-08-07 19:21:33 -050047CFLAGS:remove = "-O2"
William A. Kennington IIIac69b482021-06-02 12:28:27 -070048
Brad Bishopd7bf8c12018-02-25 22:55:05 -050049EXTRA_OECONF = "--with-platform=${GRUBPLATFORM} \
50 --disable-grub-mkfont \
51 --program-prefix="" \
52 --enable-liblzma=no \
53 --enable-libzfs=no \
54 --enable-largefile \
Brad Bishop08902b02019-08-20 09:16:51 -040055 --disable-werror \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050056"
57
Patrick Williamsc124f4f2015-09-15 14:41:29 -050058PACKAGECONFIG ??= ""
59PACKAGECONFIG[grub-mount] = "--enable-grub-mount,--disable-grub-mount,fuse"
Brad Bishop316dfdd2018-06-25 12:45:53 -040060PACKAGECONFIG[device-mapper] = "--enable-device-mapper,--disable-device-mapper,libdevmapper"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050061
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050062# grub2 creates its own set of -nostdinc / -isystem / -ffreestanding CFLAGS and
63# OE's default BUILD_CFLAGS (assigned to CFLAGS for native builds) etc, conflict
64# with that. Note that since BUILD_CFLAGS etc are not used by grub2 target
65# builds, it's safe to clear them unconditionally for both target and native.
66BUILD_CPPFLAGS = ""
67BUILD_CFLAGS = ""
68BUILD_CXXFLAGS = ""
69BUILD_LDFLAGS = ""
70
Brad Bishop96ff1982019-08-19 13:50:42 -040071export PYTHON = "python3"
72
Patrick Williams213cb262021-08-07 19:21:33 -050073do_configure:prepend() {
Andrew Geissler82c905d2020-04-13 13:39:40 -050074 cd ${S}
75 FROM_BOOTSTRAP=1 ${S}/autogen.sh
76 cd ${B}
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050077}