Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 1 | require grub2.inc |
| 2 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 3 | RDEPENDS:${PN}-common += "${PN}-editenv" |
| 4 | RDEPENDS:${PN} += "${PN}-common" |
| 5 | RDEPENDS:${PN}:class-native = "" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 6 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 7 | RPROVIDES:${PN}-editenv += "${PN}-efi-editenv" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 8 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 9 | PROVIDES:append:class-native = " grub-efi-native" |
Andrew Geissler | d25ed32 | 2020-06-27 00:28:28 -0500 | [diff] [blame] | 10 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 11 | PACKAGES =+ "${PN}-editenv ${PN}-common" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 12 | FILES:${PN}-editenv = "${bindir}/grub-editenv" |
| 13 | FILES:${PN}-common = " \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 14 | ${bindir} \ |
| 15 | ${sysconfdir} \ |
| 16 | ${sbindir} \ |
| 17 | ${datadir}/grub \ |
| 18 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 19 | ALLOW_EMPTY:${PN} = "1" |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 20 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 21 | do_install:append () { |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 22 | # Avoid conflicts with the EFI package for systems such as arm64 where we |
| 23 | # need to build grub and grub-efi but only EFI is supported by removing EFI |
| 24 | # from this package. |
| 25 | rm -rf ${D}${libdir}/grub/*-efi/ |
| 26 | rmdir --ignore-fail-on-non-empty ${D}${libdir}/grub ${D}${libdir} |
| 27 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 28 | install -d ${D}${sysconfdir}/grub.d |
| 29 | # Remove build host references... |
| 30 | find "${D}" -name modinfo.sh -type f -exec \ |
| 31 | sed -i \ |
| 32 | -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \ |
| 33 | -e 's|${DEBUG_PREFIX_MAP}||g' \ |
| 34 | -e 's:${RECIPE_SYSROOT_NATIVE}::g' \ |
| 35 | {} + |
| 36 | } |
| 37 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 38 | INSANE_SKIP:${PN} = "arch" |
| 39 | INSANE_SKIP:${PN}-dbg = "arch" |
Andrew Geissler | d25ed32 | 2020-06-27 00:28:28 -0500 | [diff] [blame] | 40 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 41 | BBCLASSEXTEND = "native nativesdk" |