aboutsummaryrefslogtreecommitdiffstats
path: root/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-helper-native_1.0.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-helper-native_1.0.bb')
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-helper-native_1.0.bb32
1 files changed, 21 insertions, 11 deletions
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-helper-native_1.0.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-helper-native_1.0.bb
index efd23d50..eb14c0c1 100644
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-helper-native_1.0.bb
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-helper-native_1.0.bb
@@ -1,18 +1,22 @@
-
-python () {
- if d.getVar("PREFERRED_PROVIDER_qemu-helper-native") != d.getVar("PN"):
- raise bb.parse.SkipRecipe("Set qemu-helper-native provider to use this recipe")
-}
-
-# TODO: improve this, since it is very hacky that this recipe need to build tunctl.
-# include the existing qemu-helper-native
-require recipes-devtools/qemu/qemu-helper-native_1.0.bb
-# get the path to tunctl.c (from oe-core!)
FILESEXTRAPATHS:prepend := "${COREBASE}/meta/recipes-devtools/qemu/qemu-helper:"
# provide it, to replace the existing
-PROVIDES += "qemu-helper-native"
+PROVIDES = "qemu-helper-native"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://${WORKDIR}/tunctl.c;endline=4;md5=ff3a09996bc5fff6bc5d4e0b4c28f999"
+
+SRC_URI = "\
+ file://tunctl.c \
+ "
+
+S = "${WORKDIR}"
+inherit native
+
+do_compile() {
+ ${CC} ${CFLAGS} ${LDFLAGS} -Wall tunctl.c -o tunctl
+}
# replace qemu with qemu-xilinx
DEPENDS:remove = "qemu-system-native"
DEPENDS:append = " \
@@ -22,3 +26,9 @@ DEPENDS:append = " \
RDEPENDS:${PN}:remove = "qemu-system-native"
RDEPENDS:${PN}:append = " qemu-xilinx-system-native"
+
+do_install() {
+ install -d ${STAGING_BINDIR_NATIVE}
+ install tunctl ${STAGING_BINDIR_NATIVE}
+
+}