blob: ecc965216bc13e730794212fee0724b078afd0fb [file] [log] [blame]
Brad Bishop286d45c2018-10-02 15:21:57 -04001
2python () {
3 if d.getVar("PREFERRED_PROVIDER_qemu-helper-native") != d.getVar("PN"):
4 raise bb.parse.SkipRecipe("Set qemu-helper-native provider to use this recipe")
5}
6
7def get_filespath_extra(d, subpath):
8 metaroot = next((p for p in d.getVar('BBPATH').split(':') if os.path.basename(p) == 'meta'), None)
9 if metaroot:
10 return os.path.join(metaroot, subpath) + ":"
11 return ""
12
13# TODO: improve this, since it is very hacky that this recipe need to build tunctl.
14# include the existing qemu-helper-native
15require recipes-devtools/qemu/qemu-helper-native_1.0.bb
16# get the path to tunctl.c
17FILESEXTRAPATHS_prepend := "${@get_filespath_extra(d, 'recipes-devtools/qemu/qemu-helper')}"
18
19# provide it, to replace the existing
20PROVIDES += "qemu-helper-native"
21
22# replace qemu with qemu-xilinx
Brad Bishopeb610d62019-09-09 14:57:03 -040023DEPENDS_remove = "qemu-system-native"
Brad Bishop286d45c2018-10-02 15:21:57 -040024DEPENDS_append = " \
Brad Bishopeb610d62019-09-09 14:57:03 -040025 qemu-xilinx-system-native \
Brad Bishop286d45c2018-10-02 15:21:57 -040026 qemu-xilinx-multiarch-helper-native \
27 "
28
Brad Bishopeb610d62019-09-09 14:57:03 -040029RDEPENDS_${PN}_remove = "qemu-system-native"
30RDEPENDS_${PN}_append = " qemu-xilinx-system-native"