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 | |
Andrew Geissler | 635e0e4 | 2020-08-21 15:58:33 -0500 | [diff] [blame] | 14 | CVE_PRODUCT = "grub2" |
| 15 | |
Andrew Geissler | 95ac1b8 | 2021-03-31 14:34:31 -0500 | [diff] [blame] | 16 | SRC_URI = "https://alpha.gnu.org/gnu/grub/grub-${REALPV}.tar.xz \ |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 17 | file://0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch \ |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 18 | 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 Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 21 | file://determinism.patch \ |
Andrew Geissler | 95ac1b8 | 2021-03-31 14:34:31 -0500 | [diff] [blame] | 22 | file://0001-RISC-V-Restore-the-typcast-to-long.patch \ |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 23 | " |
Andrew Geissler | 95ac1b8 | 2021-03-31 14:34:31 -0500 | [diff] [blame] | 24 | |
| 25 | SRC_URI[sha256sum] = "2c87f1f21e2ab50043e6cd9163c08f1b6c3a6171556bf23ff9ed65b074145484" |
| 26 | |
| 27 | REALPV = "2.06~rc1" |
| 28 | PV = "2.04+${REALPV}" |
| 29 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 30 | # Fixed in 2.06~rc1, can be removed for 2.06 final |
| 31 | CVE_CHECK_WHITELIST += "\ |
| 32 | CVE-2020-14308 CVE-2020-14309 CVE-2020-14310 CVE-2020-14311 CVE-2020-10713 \ |
| 33 | CVE-2020-14372 CVE-2020-15705 CVE-2020-15706 CVE-2020-15707 \ |
| 34 | CVE-2020-25632 CVE-2020-25647 CVE-2020-27749 CVE-2020-27779 \ |
| 35 | CVE-2021-3418 CVE-2021-20225 CVE-2021-20233" |
| 36 | |
| 37 | # Applies only to RHEL |
| 38 | CVE_CHECK_WHITELIST += "CVE-2019-14865" |
| 39 | |
Andrew Geissler | 95ac1b8 | 2021-03-31 14:34:31 -0500 | [diff] [blame] | 40 | S = "${WORKDIR}/grub-${REALPV}" |
| 41 | |
| 42 | UPSTREAM_CHECK_URI = "${GNU_MIRROR}/grub" |
| 43 | UPSTREAM_CHECK_REGEX = "grub-(?P<pver>\d+(\.\d+)+)\.tar\.(gz|xz)" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 44 | |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 45 | DEPENDS = "flex-native bison-native gettext-native" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 46 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 47 | COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|riscv.*)-(linux.*|freebsd.*)' |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 48 | COMPATIBLE_HOST_armv7a = 'null' |
| 49 | COMPATIBLE_HOST_armv7ve = 'null' |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 50 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 51 | # configure.ac has code to set this automagically from the target tuple |
| 52 | # but the OE freeform one (core2-foo-bar-linux) don't work with that. |
| 53 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 54 | GRUBPLATFORM_arm = "efi" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 55 | GRUBPLATFORM_aarch64 = "efi" |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 56 | GRUBPLATFORM_riscv32 = "efi" |
| 57 | GRUBPLATFORM_riscv64 = "efi" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 58 | GRUBPLATFORM ??= "pc" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 59 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 60 | inherit autotools gettext texinfo pkgconfig |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 61 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 62 | CFLAGS_remove = "-O2" |
| 63 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 64 | EXTRA_OECONF = "--with-platform=${GRUBPLATFORM} \ |
| 65 | --disable-grub-mkfont \ |
| 66 | --program-prefix="" \ |
| 67 | --enable-liblzma=no \ |
| 68 | --enable-libzfs=no \ |
| 69 | --enable-largefile \ |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 70 | --disable-werror \ |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 71 | " |
| 72 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 73 | PACKAGECONFIG ??= "" |
| 74 | PACKAGECONFIG[grub-mount] = "--enable-grub-mount,--disable-grub-mount,fuse" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 75 | PACKAGECONFIG[device-mapper] = "--enable-device-mapper,--disable-device-mapper,libdevmapper" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 76 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 77 | # grub2 creates its own set of -nostdinc / -isystem / -ffreestanding CFLAGS and |
| 78 | # OE's default BUILD_CFLAGS (assigned to CFLAGS for native builds) etc, conflict |
| 79 | # with that. Note that since BUILD_CFLAGS etc are not used by grub2 target |
| 80 | # builds, it's safe to clear them unconditionally for both target and native. |
| 81 | BUILD_CPPFLAGS = "" |
| 82 | BUILD_CFLAGS = "" |
| 83 | BUILD_CXXFLAGS = "" |
| 84 | BUILD_LDFLAGS = "" |
| 85 | |
Brad Bishop | 96ff198 | 2019-08-19 13:50:42 -0400 | [diff] [blame] | 86 | export PYTHON = "python3" |
| 87 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 88 | do_configure_prepend() { |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 89 | cd ${S} |
| 90 | FROM_BOOTSTRAP=1 ${S}/autogen.sh |
| 91 | cd ${B} |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 92 | } |