blob: 55b35b53e54b2d04a259deecd4cbb69d78e1573e [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
23DEPENDS_remove = "qemu-native"
24DEPENDS_append = " \
25 qemu-xilinx-native \
26 qemu-xilinx-multiarch-helper-native \
27 "
28