blob: 7d8c280b3f4bde73c4207277871d03b5dae25be3 [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 Bishopd7bf8c12018-02-25 22:55:05 -050014SRC_URI = "https://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
15 file://0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050016 file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050017 file://autogen.sh-exclude-pc.patch \
18 file://grub-module-explicitly-keeps-symbole-.module_license.patch \
19 file://0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch \
Brad Bishop316dfdd2018-06-25 12:45:53 -040020 file://gcc8.patch \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080021 file://0001-x86-64-Treat-R_X86_64_PLT32-as-R_X86_64_PC32.patch \
Brad Bishop977dc1a2019-02-06 16:01:43 -050022 file://0001-grub-setup-Debug-message-cleanup.patch \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050023"
24SRC_URI[md5sum] = "1116d1f60c840e6dbd67abbc99acb45d"
25SRC_URI[sha256sum] = "660ee136fbcee08858516ed4de2ad87068bfe1b6b8b37896ce3529ff054a726d"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050026
Brad Bishopd7bf8c12018-02-25 22:55:05 -050027DEPENDS = "flex-native bison-native"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050028
Brad Bishopd7bf8c12018-02-25 22:55:05 -050029COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*)-(linux.*|freebsd.*)'
30COMPATIBLE_HOST_armv7a = 'null'
31COMPATIBLE_HOST_armv7ve = 'null'
Patrick Williamsc124f4f2015-09-15 14:41:29 -050032
Brad Bishopd7bf8c12018-02-25 22:55:05 -050033# configure.ac has code to set this automagically from the target tuple
34# but the OE freeform one (core2-foo-bar-linux) don't work with that.
35
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080036GRUBPLATFORM_arm = "efi"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050037GRUBPLATFORM_aarch64 = "efi"
38GRUBPLATFORM ??= "pc"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050039
40inherit autotools gettext texinfo
41
Brad Bishopd7bf8c12018-02-25 22:55:05 -050042EXTRA_OECONF = "--with-platform=${GRUBPLATFORM} \
43 --disable-grub-mkfont \
44 --program-prefix="" \
45 --enable-liblzma=no \
46 --enable-libzfs=no \
47 --enable-largefile \
48"
49
Patrick Williamsc124f4f2015-09-15 14:41:29 -050050PACKAGECONFIG ??= ""
51PACKAGECONFIG[grub-mount] = "--enable-grub-mount,--disable-grub-mount,fuse"
Brad Bishop316dfdd2018-06-25 12:45:53 -040052PACKAGECONFIG[device-mapper] = "--enable-device-mapper,--disable-device-mapper,libdevmapper"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050053
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050054# grub2 creates its own set of -nostdinc / -isystem / -ffreestanding CFLAGS and
55# OE's default BUILD_CFLAGS (assigned to CFLAGS for native builds) etc, conflict
56# with that. Note that since BUILD_CFLAGS etc are not used by grub2 target
57# builds, it's safe to clear them unconditionally for both target and native.
58BUILD_CPPFLAGS = ""
59BUILD_CFLAGS = ""
60BUILD_CXXFLAGS = ""
61BUILD_LDFLAGS = ""
62
Brad Bishopc342db32019-05-15 21:57:59 -040063CFLAGS_append = "-Wno-error"
64
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050065do_configure_prepend() {
66 # The grub2 configure script uses variables such as TARGET_CFLAGS etc
67 # for its own purposes. Remove the OE versions from the environment to
68 # avoid conflicts.
69 unset TARGET_CPPFLAGS TARGET_CFLAGS TARGET_CXXFLAGS TARGET_LDFLAGS
Patrick Williamsc0f7c042017-02-23 20:41:17 -060070 ( cd ${S}
71 ${S}/autogen.sh )
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050072}
73
Brad Bishopd7bf8c12018-02-25 22:55:05 -050074RDEPENDS_${PN}_class-native = ""