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 | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 16 | SRC_URI = "${GNU_MIRROR}/grub/grub-${PV}.tar.gz \ |
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 \ |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 23 | file://CVE-2021-3981-grub-mkconfig-Restore-umask-for-the-grub.cfg.patch \ |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 24 | " |
Andrew Geissler | 95ac1b8 | 2021-03-31 14:34:31 -0500 | [diff] [blame] | 25 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 26 | SRC_URI[sha256sum] = "23b64b4c741569f9426ed2e3d0e6780796fca081bee4c99f62aa3f53ae803f5f" |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 27 | |
| 28 | # Applies only to RHEL |
| 29 | CVE_CHECK_WHITELIST += "CVE-2019-14865" |
| 30 | |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 31 | DEPENDS = "flex-native bison-native gettext-native" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 32 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 33 | COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|riscv.*)-(linux.*|freebsd.*)' |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 34 | COMPATIBLE_HOST:armv7a = 'null' |
| 35 | COMPATIBLE_HOST:armv7ve = 'null' |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 36 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 37 | # configure.ac has code to set this automagically from the target tuple |
| 38 | # but the OE freeform one (core2-foo-bar-linux) don't work with that. |
| 39 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 40 | GRUBPLATFORM:arm = "efi" |
| 41 | GRUBPLATFORM:aarch64 = "efi" |
| 42 | GRUBPLATFORM:riscv32 = "efi" |
| 43 | GRUBPLATFORM:riscv64 = "efi" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 44 | GRUBPLATFORM ??= "pc" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 45 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 46 | inherit autotools gettext texinfo pkgconfig |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 47 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 48 | CFLAGS:remove = "-O2" |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 49 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 50 | EXTRA_OECONF = "--with-platform=${GRUBPLATFORM} \ |
| 51 | --disable-grub-mkfont \ |
| 52 | --program-prefix="" \ |
| 53 | --enable-liblzma=no \ |
| 54 | --enable-libzfs=no \ |
| 55 | --enable-largefile \ |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 56 | --disable-werror \ |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 57 | " |
| 58 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 59 | PACKAGECONFIG ??= "" |
| 60 | PACKAGECONFIG[grub-mount] = "--enable-grub-mount,--disable-grub-mount,fuse" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 61 | PACKAGECONFIG[device-mapper] = "--enable-device-mapper,--disable-device-mapper,libdevmapper" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 62 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 63 | # grub2 creates its own set of -nostdinc / -isystem / -ffreestanding CFLAGS and |
| 64 | # OE's default BUILD_CFLAGS (assigned to CFLAGS for native builds) etc, conflict |
| 65 | # with that. Note that since BUILD_CFLAGS etc are not used by grub2 target |
| 66 | # builds, it's safe to clear them unconditionally for both target and native. |
| 67 | BUILD_CPPFLAGS = "" |
| 68 | BUILD_CFLAGS = "" |
| 69 | BUILD_CXXFLAGS = "" |
| 70 | BUILD_LDFLAGS = "" |
| 71 | |
Brad Bishop | 96ff198 | 2019-08-19 13:50:42 -0400 | [diff] [blame] | 72 | export PYTHON = "python3" |
| 73 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 74 | do_configure:prepend() { |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 75 | cd ${S} |
| 76 | FROM_BOOTSTRAP=1 ${S}/autogen.sh |
| 77 | cd ${B} |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 78 | } |