blob: a8f335e1f88abbc44bb477b6899d477238f38729 [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 \
20 file://fix.build.with.gcc-7.patch \
Brad Bishop316dfdd2018-06-25 12:45:53 -040021 file://gcc8.patch \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050022"
23SRC_URI[md5sum] = "1116d1f60c840e6dbd67abbc99acb45d"
24SRC_URI[sha256sum] = "660ee136fbcee08858516ed4de2ad87068bfe1b6b8b37896ce3529ff054a726d"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050025
Brad Bishopd7bf8c12018-02-25 22:55:05 -050026DEPENDS = "flex-native bison-native"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050027
Brad Bishopd7bf8c12018-02-25 22:55:05 -050028COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*)-(linux.*|freebsd.*)'
29COMPATIBLE_HOST_armv7a = 'null'
30COMPATIBLE_HOST_armv7ve = 'null'
Patrick Williamsc124f4f2015-09-15 14:41:29 -050031
Brad Bishopd7bf8c12018-02-25 22:55:05 -050032# configure.ac has code to set this automagically from the target tuple
33# but the OE freeform one (core2-foo-bar-linux) don't work with that.
34
35GRUBPLATFORM_arm = "uboot"
36GRUBPLATFORM_aarch64 = "efi"
37GRUBPLATFORM ??= "pc"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050038
39inherit autotools gettext texinfo
40
Brad Bishopd7bf8c12018-02-25 22:55:05 -050041EXTRA_OECONF = "--with-platform=${GRUBPLATFORM} \
42 --disable-grub-mkfont \
43 --program-prefix="" \
44 --enable-liblzma=no \
45 --enable-libzfs=no \
46 --enable-largefile \
47"
48
Patrick Williamsc124f4f2015-09-15 14:41:29 -050049PACKAGECONFIG ??= ""
50PACKAGECONFIG[grub-mount] = "--enable-grub-mount,--disable-grub-mount,fuse"
Brad Bishop316dfdd2018-06-25 12:45:53 -040051PACKAGECONFIG[device-mapper] = "--enable-device-mapper,--disable-device-mapper,libdevmapper"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050052
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050053# grub2 creates its own set of -nostdinc / -isystem / -ffreestanding CFLAGS and
54# OE's default BUILD_CFLAGS (assigned to CFLAGS for native builds) etc, conflict
55# with that. Note that since BUILD_CFLAGS etc are not used by grub2 target
56# builds, it's safe to clear them unconditionally for both target and native.
57BUILD_CPPFLAGS = ""
58BUILD_CFLAGS = ""
59BUILD_CXXFLAGS = ""
60BUILD_LDFLAGS = ""
61
62do_configure_prepend() {
63 # The grub2 configure script uses variables such as TARGET_CFLAGS etc
64 # for its own purposes. Remove the OE versions from the environment to
65 # avoid conflicts.
66 unset TARGET_CPPFLAGS TARGET_CFLAGS TARGET_CXXFLAGS TARGET_LDFLAGS
Patrick Williamsc0f7c042017-02-23 20:41:17 -060067 ( cd ${S}
68 ${S}/autogen.sh )
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050069}
70
Brad Bishopd7bf8c12018-02-25 22:55:05 -050071RDEPENDS_${PN}_class-native = ""