blob: 05d462785c15261b58696d363cc1b3f1163c4f2c [file] [log] [blame]
Brad Bishopd7bf8c12018-02-25 22:55:05 -05001require grub2.inc
2
Patrick Williams213cb262021-08-07 19:21:33 -05003RDEPENDS:${PN}-common += "${PN}-editenv"
4RDEPENDS:${PN} += "${PN}-common"
5RDEPENDS:${PN}:class-native = ""
Brad Bishop316dfdd2018-06-25 12:45:53 -04006
Patrick Williams213cb262021-08-07 19:21:33 -05007RPROVIDES:${PN}-editenv += "${PN}-efi-editenv"
Brad Bishop316dfdd2018-06-25 12:45:53 -04008
Patrick Williams213cb262021-08-07 19:21:33 -05009PROVIDES:append:class-native = " grub-efi-native"
Andrew Geisslerd25ed322020-06-27 00:28:28 -050010
Brad Bishop316dfdd2018-06-25 12:45:53 -040011PACKAGES =+ "${PN}-editenv ${PN}-common"
Patrick Williams213cb262021-08-07 19:21:33 -050012FILES:${PN}-editenv = "${bindir}/grub-editenv"
13FILES:${PN}-common = " \
Brad Bishop316dfdd2018-06-25 12:45:53 -040014 ${bindir} \
15 ${sysconfdir} \
16 ${sbindir} \
17 ${datadir}/grub \
18"
Patrick Williams213cb262021-08-07 19:21:33 -050019ALLOW_EMPTY:${PN} = "1"
Brad Bishop08902b02019-08-20 09:16:51 -040020
Patrick Williams213cb262021-08-07 19:21:33 -050021do_install:append () {
Andrew Geissler90fd73c2021-03-05 15:25:55 -060022 # 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 Bishopd7bf8c12018-02-25 22:55:05 -050028 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 Williams213cb262021-08-07 19:21:33 -050038INSANE_SKIP:${PN} = "arch"
39INSANE_SKIP:${PN}-dbg = "arch"
Andrew Geisslerd25ed322020-06-27 00:28:28 -050040
Andrew Geissler6ce62a22020-11-30 19:58:47 -060041BBCLASSEXTEND = "native nativesdk"