blob: 2024e137827e3f765034b474fc2673ca0ed694af [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
Brad Bishop08902b02019-08-20 09:16:51 -040014SRC_URI = "${GNU_MIRROR}/grub/grub-${PV}.tar.gz \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050015 file://0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050016 file://autogen.sh-exclude-pc.patch \
17 file://grub-module-explicitly-keeps-symbole-.module_license.patch \
18 file://0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050019"
Brad Bishop08902b02019-08-20 09:16:51 -040020SRC_URI[md5sum] = "5ce674ca6b2612d8939b9e6abed32934"
21SRC_URI[sha256sum] = "f10c85ae3e204dbaec39ae22fa3c5e99f0665417e91c2cb49b7e5031658ba6ea"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050022
Brad Bishop08902b02019-08-20 09:16:51 -040023DEPENDS = "flex-native bison-native gettext-native"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050024
Brad Bishopd7bf8c12018-02-25 22:55:05 -050025COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*)-(linux.*|freebsd.*)'
26COMPATIBLE_HOST_armv7a = 'null'
27COMPATIBLE_HOST_armv7ve = 'null'
Patrick Williamsc124f4f2015-09-15 14:41:29 -050028
Brad Bishopd7bf8c12018-02-25 22:55:05 -050029# configure.ac has code to set this automagically from the target tuple
30# but the OE freeform one (core2-foo-bar-linux) don't work with that.
31
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080032GRUBPLATFORM_arm = "efi"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050033GRUBPLATFORM_aarch64 = "efi"
34GRUBPLATFORM ??= "pc"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050035
Andrew Geissler82c905d2020-04-13 13:39:40 -050036inherit autotools gettext texinfo pkgconfig
Patrick Williamsc124f4f2015-09-15 14:41:29 -050037
Brad Bishopd7bf8c12018-02-25 22:55:05 -050038EXTRA_OECONF = "--with-platform=${GRUBPLATFORM} \
39 --disable-grub-mkfont \
40 --program-prefix="" \
41 --enable-liblzma=no \
42 --enable-libzfs=no \
43 --enable-largefile \
Brad Bishop08902b02019-08-20 09:16:51 -040044 --disable-werror \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050045"
46
Patrick Williamsc124f4f2015-09-15 14:41:29 -050047PACKAGECONFIG ??= ""
48PACKAGECONFIG[grub-mount] = "--enable-grub-mount,--disable-grub-mount,fuse"
Brad Bishop316dfdd2018-06-25 12:45:53 -040049PACKAGECONFIG[device-mapper] = "--enable-device-mapper,--disable-device-mapper,libdevmapper"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050050
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050051# grub2 creates its own set of -nostdinc / -isystem / -ffreestanding CFLAGS and
52# OE's default BUILD_CFLAGS (assigned to CFLAGS for native builds) etc, conflict
53# with that. Note that since BUILD_CFLAGS etc are not used by grub2 target
54# builds, it's safe to clear them unconditionally for both target and native.
55BUILD_CPPFLAGS = ""
56BUILD_CFLAGS = ""
57BUILD_CXXFLAGS = ""
58BUILD_LDFLAGS = ""
59
Brad Bishop96ff1982019-08-19 13:50:42 -040060export PYTHON = "python3"
61
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050062do_configure_prepend() {
Andrew Geissler82c905d2020-04-13 13:39:40 -050063 cd ${S}
64 FROM_BOOTSTRAP=1 ${S}/autogen.sh
65 cd ${B}
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050066}