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 | |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [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 | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 21 | file://CVE-2020-10713.patch \ |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 22 | file://calloc-Make-sure-we-always-have-an-overflow-checking.patch \ |
| 23 | file://lvm-Add-LVM-cache-logical-volume-handling.patch \ |
| 24 | file://CVE-2020-14308-calloc-Use-calloc-at-most-places.patch \ |
| 25 | file://safemath-Add-some-arithmetic-primitives-that-check-f.patch \ |
| 26 | file://CVE-2020-14309-CVE-2020-14310-CVE-2020-14311-malloc-Use-overflow-checking-primitives-where-we-do-.patch \ |
| 27 | file://script-Remove-unused-fields-from-grub_script_functio.patch \ |
| 28 | file://CVE-2020-15706-script-Avoid-a-use-after-free-when-redefining-a-func.patch \ |
| 29 | file://CVE-2020-15707-linux-Fix-integer-overflows-in-initrd-size-handling.patch \ |
Andrew Geissler | c723b72 | 2021-01-08 16:14:09 -0600 | [diff] [blame] | 30 | file://determinism.patch \ |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 31 | " |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 32 | SRC_URI[md5sum] = "5ce674ca6b2612d8939b9e6abed32934" |
| 33 | SRC_URI[sha256sum] = "f10c85ae3e204dbaec39ae22fa3c5e99f0665417e91c2cb49b7e5031658ba6ea" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 34 | |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 35 | DEPENDS = "flex-native bison-native gettext-native" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 36 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 37 | COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|riscv.*)-(linux.*|freebsd.*)' |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 38 | COMPATIBLE_HOST_armv7a = 'null' |
| 39 | COMPATIBLE_HOST_armv7ve = 'null' |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 40 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 41 | # configure.ac has code to set this automagically from the target tuple |
| 42 | # but the OE freeform one (core2-foo-bar-linux) don't work with that. |
| 43 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 44 | GRUBPLATFORM_arm = "efi" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 45 | GRUBPLATFORM_aarch64 = "efi" |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 46 | GRUBPLATFORM_riscv32 = "efi" |
| 47 | GRUBPLATFORM_riscv64 = "efi" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 48 | GRUBPLATFORM ??= "pc" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 49 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 50 | inherit autotools gettext texinfo pkgconfig |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 51 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 52 | EXTRA_OECONF = "--with-platform=${GRUBPLATFORM} \ |
| 53 | --disable-grub-mkfont \ |
| 54 | --program-prefix="" \ |
| 55 | --enable-liblzma=no \ |
| 56 | --enable-libzfs=no \ |
| 57 | --enable-largefile \ |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 58 | --disable-werror \ |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 59 | " |
| 60 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 61 | PACKAGECONFIG ??= "" |
| 62 | PACKAGECONFIG[grub-mount] = "--enable-grub-mount,--disable-grub-mount,fuse" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 63 | PACKAGECONFIG[device-mapper] = "--enable-device-mapper,--disable-device-mapper,libdevmapper" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 64 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 65 | # grub2 creates its own set of -nostdinc / -isystem / -ffreestanding CFLAGS and |
| 66 | # OE's default BUILD_CFLAGS (assigned to CFLAGS for native builds) etc, conflict |
| 67 | # with that. Note that since BUILD_CFLAGS etc are not used by grub2 target |
| 68 | # builds, it's safe to clear them unconditionally for both target and native. |
| 69 | BUILD_CPPFLAGS = "" |
| 70 | BUILD_CFLAGS = "" |
| 71 | BUILD_CXXFLAGS = "" |
| 72 | BUILD_LDFLAGS = "" |
| 73 | |
Brad Bishop | 96ff198 | 2019-08-19 13:50:42 -0400 | [diff] [blame] | 74 | export PYTHON = "python3" |
| 75 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 76 | do_configure_prepend() { |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 77 | cd ${S} |
| 78 | FROM_BOOTSTRAP=1 ${S}/autogen.sh |
| 79 | cd ${B} |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 80 | } |