blob: d4e09faa408e6a50bfa0259cf3bb012ee249cc64 [file] [log] [blame]
Brad Bishopd7bf8c12018-02-25 22:55:05 -05001require grub2.inc
2
Brad Bishop316dfdd2018-06-25 12:45:53 -04003RDEPENDS_${PN}-common += "${PN}-editenv"
Brad Bishopa34c0302019-09-23 22:34:48 -04004RDEPENDS_${PN} += "${PN}-common"
Andrew Geisslerd25ed322020-06-27 00:28:28 -05005RDEPENDS_${PN}_class-native = ""
Brad Bishop316dfdd2018-06-25 12:45:53 -04006
7RPROVIDES_${PN}-editenv += "${PN}-efi-editenv"
8
Andrew Geisslerd25ed322020-06-27 00:28:28 -05009PROVIDES_append_class-native = " grub-efi-native"
10
Brad Bishop316dfdd2018-06-25 12:45:53 -040011PACKAGES =+ "${PN}-editenv ${PN}-common"
12FILES_${PN}-editenv = "${bindir}/grub-editenv"
13FILES_${PN}-common = " \
14 ${bindir} \
15 ${sysconfdir} \
16 ${sbindir} \
17 ${datadir}/grub \
18"
Andrew Geissler90fd73c2021-03-05 15:25:55 -060019ALLOW_EMPTY_${PN} = "1"
Brad Bishop08902b02019-08-20 09:16:51 -040020
Brad Bishopd7bf8c12018-02-25 22:55:05 -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
38INSANE_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"