blob: ba0596c93830b5b31b00d7731e5317af293544e5 [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
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000011LICENSE = "GPL-3.0-only"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050012LIC_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 \
Andrew Geissler595f6302022-01-24 19:11:47 +000023 file://CVE-2021-3981-grub-mkconfig-Restore-umask-for-the-grub.cfg.patch \
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000024 file://0001-configure.ac-Use-_zicsr_zifencei-extentions-on-riscv.patch \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050025"
Andrew Geissler95ac1b82021-03-31 14:34:31 -050026
Andrew Geissler09036742021-06-25 14:25:14 -050027SRC_URI[sha256sum] = "23b64b4c741569f9426ed2e3d0e6780796fca081bee4c99f62aa3f53ae803f5f"
William A. Kennington IIIac69b482021-06-02 12:28:27 -070028
29# Applies only to RHEL
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000030CVE_CHECK_IGNORE += "CVE-2019-14865"
William A. Kennington IIIac69b482021-06-02 12:28:27 -070031
Brad Bishop08902b02019-08-20 09:16:51 -040032DEPENDS = "flex-native bison-native gettext-native"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050033
Andrew Geissler6ce62a22020-11-30 19:58:47 -060034COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|riscv.*)-(linux.*|freebsd.*)'
Patrick Williams213cb262021-08-07 19:21:33 -050035COMPATIBLE_HOST:armv7a = 'null'
36COMPATIBLE_HOST:armv7ve = 'null'
Patrick Williamsc124f4f2015-09-15 14:41:29 -050037
Brad Bishopd7bf8c12018-02-25 22:55:05 -050038# configure.ac has code to set this automagically from the target tuple
39# but the OE freeform one (core2-foo-bar-linux) don't work with that.
40
Patrick Williams213cb262021-08-07 19:21:33 -050041GRUBPLATFORM:arm = "efi"
42GRUBPLATFORM:aarch64 = "efi"
43GRUBPLATFORM:riscv32 = "efi"
44GRUBPLATFORM:riscv64 = "efi"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050045GRUBPLATFORM ??= "pc"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050046
Andrew Geissler82c905d2020-04-13 13:39:40 -050047inherit autotools gettext texinfo pkgconfig
Patrick Williamsc124f4f2015-09-15 14:41:29 -050048
Patrick Williams213cb262021-08-07 19:21:33 -050049CFLAGS:remove = "-O2"
William A. Kennington IIIac69b482021-06-02 12:28:27 -070050
Brad Bishopd7bf8c12018-02-25 22:55:05 -050051EXTRA_OECONF = "--with-platform=${GRUBPLATFORM} \
52 --disable-grub-mkfont \
53 --program-prefix="" \
54 --enable-liblzma=no \
55 --enable-libzfs=no \
56 --enable-largefile \
Brad Bishop08902b02019-08-20 09:16:51 -040057 --disable-werror \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050058"
59
Patrick Williamsc124f4f2015-09-15 14:41:29 -050060PACKAGECONFIG ??= ""
61PACKAGECONFIG[grub-mount] = "--enable-grub-mount,--disable-grub-mount,fuse"
Brad Bishop316dfdd2018-06-25 12:45:53 -040062PACKAGECONFIG[device-mapper] = "--enable-device-mapper,--disable-device-mapper,libdevmapper"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050063
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050064# grub2 creates its own set of -nostdinc / -isystem / -ffreestanding CFLAGS and
65# OE's default BUILD_CFLAGS (assigned to CFLAGS for native builds) etc, conflict
66# with that. Note that since BUILD_CFLAGS etc are not used by grub2 target
67# builds, it's safe to clear them unconditionally for both target and native.
68BUILD_CPPFLAGS = ""
69BUILD_CFLAGS = ""
70BUILD_CXXFLAGS = ""
71BUILD_LDFLAGS = ""
72
Brad Bishop96ff1982019-08-19 13:50:42 -040073export PYTHON = "python3"
74
Patrick Williams213cb262021-08-07 19:21:33 -050075do_configure:prepend() {
Andrew Geissler82c905d2020-04-13 13:39:40 -050076 cd ${S}
77 FROM_BOOTSTRAP=1 ${S}/autogen.sh
78 cd ${B}
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050079}