blob: 590deb8d9262a6bd6ba982d8cac1182cc6db8acf [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 Geissler95ac1b82021-03-31 14:34:31 -050016SRC_URI = "https://alpha.gnu.org/gnu/grub/grub-${REALPV}.tar.xz \
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
25SRC_URI[sha256sum] = "2c87f1f21e2ab50043e6cd9163c08f1b6c3a6171556bf23ff9ed65b074145484"
26
27REALPV = "2.06~rc1"
28PV = "2.04+${REALPV}"
29
30S = "${WORKDIR}/grub-${REALPV}"
31
32UPSTREAM_CHECK_URI = "${GNU_MIRROR}/grub"
33UPSTREAM_CHECK_REGEX = "grub-(?P<pver>\d+(\.\d+)+)\.tar\.(gz|xz)"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050034
Brad Bishop08902b02019-08-20 09:16:51 -040035DEPENDS = "flex-native bison-native gettext-native"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050036
Andrew Geissler6ce62a22020-11-30 19:58:47 -060037COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|riscv.*)-(linux.*|freebsd.*)'
Brad Bishopd7bf8c12018-02-25 22:55:05 -050038COMPATIBLE_HOST_armv7a = 'null'
39COMPATIBLE_HOST_armv7ve = 'null'
Patrick Williamsc124f4f2015-09-15 14:41:29 -050040
Brad Bishopd7bf8c12018-02-25 22:55:05 -050041# configure.ac has code to set this automagically from the target tuple
42# but the OE freeform one (core2-foo-bar-linux) don't work with that.
43
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080044GRUBPLATFORM_arm = "efi"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050045GRUBPLATFORM_aarch64 = "efi"
Andrew Geissler6ce62a22020-11-30 19:58:47 -060046GRUBPLATFORM_riscv32 = "efi"
47GRUBPLATFORM_riscv64 = "efi"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050048GRUBPLATFORM ??= "pc"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050049
Andrew Geissler82c905d2020-04-13 13:39:40 -050050inherit autotools gettext texinfo pkgconfig
Patrick Williamsc124f4f2015-09-15 14:41:29 -050051
Brad Bishopd7bf8c12018-02-25 22:55:05 -050052EXTRA_OECONF = "--with-platform=${GRUBPLATFORM} \
53 --disable-grub-mkfont \
54 --program-prefix="" \
55 --enable-liblzma=no \
56 --enable-libzfs=no \
57 --enable-largefile \
Brad Bishop08902b02019-08-20 09:16:51 -040058 --disable-werror \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050059"
60
Patrick Williamsc124f4f2015-09-15 14:41:29 -050061PACKAGECONFIG ??= ""
62PACKAGECONFIG[grub-mount] = "--enable-grub-mount,--disable-grub-mount,fuse"
Brad Bishop316dfdd2018-06-25 12:45:53 -040063PACKAGECONFIG[device-mapper] = "--enable-device-mapper,--disable-device-mapper,libdevmapper"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050064
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050065# grub2 creates its own set of -nostdinc / -isystem / -ffreestanding CFLAGS and
66# OE's default BUILD_CFLAGS (assigned to CFLAGS for native builds) etc, conflict
67# with that. Note that since BUILD_CFLAGS etc are not used by grub2 target
68# builds, it's safe to clear them unconditionally for both target and native.
69BUILD_CPPFLAGS = ""
70BUILD_CFLAGS = ""
71BUILD_CXXFLAGS = ""
72BUILD_LDFLAGS = ""
73
Brad Bishop96ff1982019-08-19 13:50:42 -040074export PYTHON = "python3"
75
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050076do_configure_prepend() {
Andrew Geissler82c905d2020-04-13 13:39:40 -050077 cd ${S}
78 FROM_BOOTSTRAP=1 ${S}/autogen.sh
79 cd ${B}
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050080}