Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "GRUB2 is the next-generation GRand Unified Bootloader" |
| 2 | |
| 3 | DESCRIPTION = "GRUB2 is the next generaion of a GPLed bootloader \ |
| 4 | intended to unify bootloading across x86 operating systems. In \ |
| 5 | addition to loading the Linux kernel, it implements the Multiboot \ |
| 6 | standard, which allows for flexible loading of multiple boot images." |
| 7 | |
| 8 | HOMEPAGE = "http://www.gnu.org/software/grub/" |
| 9 | SECTION = "bootloaders" |
| 10 | |
| 11 | LICENSE = "GPLv3" |
| 12 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" |
| 13 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 14 | SRC_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 Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 16 | file://0001-Unset-need_charset_alias-when-building-for-musl.patch \ |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 17 | 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 Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 20 | file://fix.build.with.gcc-7.patch \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 21 | file://gcc8.patch \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 22 | file://0001-x86-64-Treat-R_X86_64_PLT32-as-R_X86_64_PC32.patch \ |
Brad Bishop | 977dc1a | 2019-02-06 16:01:43 -0500 | [diff] [blame] | 23 | file://0001-grub-setup-Debug-message-cleanup.patch \ |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 24 | " |
| 25 | SRC_URI[md5sum] = "1116d1f60c840e6dbd67abbc99acb45d" |
| 26 | SRC_URI[sha256sum] = "660ee136fbcee08858516ed4de2ad87068bfe1b6b8b37896ce3529ff054a726d" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 27 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 28 | DEPENDS = "flex-native bison-native" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 29 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 30 | COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*)-(linux.*|freebsd.*)' |
| 31 | COMPATIBLE_HOST_armv7a = 'null' |
| 32 | COMPATIBLE_HOST_armv7ve = 'null' |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 33 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 34 | # configure.ac has code to set this automagically from the target tuple |
| 35 | # but the OE freeform one (core2-foo-bar-linux) don't work with that. |
| 36 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 37 | GRUBPLATFORM_arm = "efi" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 38 | GRUBPLATFORM_aarch64 = "efi" |
| 39 | GRUBPLATFORM ??= "pc" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 40 | |
| 41 | inherit autotools gettext texinfo |
| 42 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 43 | EXTRA_OECONF = "--with-platform=${GRUBPLATFORM} \ |
| 44 | --disable-grub-mkfont \ |
| 45 | --program-prefix="" \ |
| 46 | --enable-liblzma=no \ |
| 47 | --enable-libzfs=no \ |
| 48 | --enable-largefile \ |
| 49 | " |
| 50 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 51 | PACKAGECONFIG ??= "" |
| 52 | PACKAGECONFIG[grub-mount] = "--enable-grub-mount,--disable-grub-mount,fuse" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 53 | PACKAGECONFIG[device-mapper] = "--enable-device-mapper,--disable-device-mapper,libdevmapper" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 54 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 55 | # grub2 creates its own set of -nostdinc / -isystem / -ffreestanding CFLAGS and |
| 56 | # OE's default BUILD_CFLAGS (assigned to CFLAGS for native builds) etc, conflict |
| 57 | # with that. Note that since BUILD_CFLAGS etc are not used by grub2 target |
| 58 | # builds, it's safe to clear them unconditionally for both target and native. |
| 59 | BUILD_CPPFLAGS = "" |
| 60 | BUILD_CFLAGS = "" |
| 61 | BUILD_CXXFLAGS = "" |
| 62 | BUILD_LDFLAGS = "" |
| 63 | |
| 64 | do_configure_prepend() { |
| 65 | # The grub2 configure script uses variables such as TARGET_CFLAGS etc |
| 66 | # for its own purposes. Remove the OE versions from the environment to |
| 67 | # avoid conflicts. |
| 68 | unset TARGET_CPPFLAGS TARGET_CFLAGS TARGET_CXXFLAGS TARGET_LDFLAGS |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 69 | ( cd ${S} |
| 70 | ${S}/autogen.sh ) |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 71 | } |
| 72 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 73 | RDEPENDS_${PN}_class-native = "" |