blob: f870d41f6a57cb4cfb36481a7c5633336a1514b8 [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
Brad Bishop08902b02019-08-20 09:16:51 -040016SRC_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 Geissler4c19ea12020-10-27 13:52:24 -050021 file://CVE-2020-10713.patch \
Andrew Geissler6ce62a22020-11-30 19:58:47 -060022 file://calloc-Make-sure-we-always-have-an-overflow-checking.patch \
23 file://lvm-Add-LVM-cache-logical-volume-handling.patch \
24 file://CVE-2020-14308-calloc-Use-calloc-at-most-places.patch \
25 file://safemath-Add-some-arithmetic-primitives-that-check-f.patch \
26 file://CVE-2020-14309-CVE-2020-14310-CVE-2020-14311-malloc-Use-overflow-checking-primitives-where-we-do-.patch \
27 file://script-Remove-unused-fields-from-grub_script_functio.patch \
28 file://CVE-2020-15706-script-Avoid-a-use-after-free-when-redefining-a-func.patch \
29 file://CVE-2020-15707-linux-Fix-integer-overflows-in-initrd-size-handling.patch \
Andrew Geisslerd1e89492021-02-12 15:35:20 -060030 file://6643507ce30f775008e093580f0c9499dfb2c485.patch \
31 file://determinism.patch \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050032"
Brad Bishop08902b02019-08-20 09:16:51 -040033SRC_URI[md5sum] = "5ce674ca6b2612d8939b9e6abed32934"
34SRC_URI[sha256sum] = "f10c85ae3e204dbaec39ae22fa3c5e99f0665417e91c2cb49b7e5031658ba6ea"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050035
Brad Bishop08902b02019-08-20 09:16:51 -040036DEPENDS = "flex-native bison-native gettext-native"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050037
Andrew Geissler6ce62a22020-11-30 19:58:47 -060038COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|riscv.*)-(linux.*|freebsd.*)'
Brad Bishopd7bf8c12018-02-25 22:55:05 -050039COMPATIBLE_HOST_armv7a = 'null'
40COMPATIBLE_HOST_armv7ve = 'null'
Patrick Williamsc124f4f2015-09-15 14:41:29 -050041
Brad Bishopd7bf8c12018-02-25 22:55:05 -050042# configure.ac has code to set this automagically from the target tuple
43# but the OE freeform one (core2-foo-bar-linux) don't work with that.
44
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080045GRUBPLATFORM_arm = "efi"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050046GRUBPLATFORM_aarch64 = "efi"
Andrew Geissler6ce62a22020-11-30 19:58:47 -060047GRUBPLATFORM_riscv32 = "efi"
48GRUBPLATFORM_riscv64 = "efi"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050049GRUBPLATFORM ??= "pc"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050050
Andrew Geissler82c905d2020-04-13 13:39:40 -050051inherit autotools gettext texinfo pkgconfig
Patrick Williamsc124f4f2015-09-15 14:41:29 -050052
Brad Bishopd7bf8c12018-02-25 22:55:05 -050053EXTRA_OECONF = "--with-platform=${GRUBPLATFORM} \
54 --disable-grub-mkfont \
55 --program-prefix="" \
56 --enable-liblzma=no \
57 --enable-libzfs=no \
58 --enable-largefile \
Brad Bishop08902b02019-08-20 09:16:51 -040059 --disable-werror \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050060"
61
Patrick Williamsc124f4f2015-09-15 14:41:29 -050062PACKAGECONFIG ??= ""
63PACKAGECONFIG[grub-mount] = "--enable-grub-mount,--disable-grub-mount,fuse"
Brad Bishop316dfdd2018-06-25 12:45:53 -040064PACKAGECONFIG[device-mapper] = "--enable-device-mapper,--disable-device-mapper,libdevmapper"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050065
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050066# 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
Brad Bishop96ff1982019-08-19 13:50:42 -040075export PYTHON = "python3"
76
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050077do_configure_prepend() {
Andrew Geissler82c905d2020-04-13 13:39:40 -050078 cd ${S}
79 FROM_BOOTSTRAP=1 ${S}/autogen.sh
80 cd ${B}
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050081}