summaryrefslogtreecommitdiffstats
path: root/recipes-devtools
diff options
context:
space:
mode:
authorNathan Rossi <nathan@nathanrossi.com>2017-04-14 00:05:20 +1000
committerNathan Rossi <nathan@nathanrossi.com>2017-04-28 00:22:19 +1000
commit3119a03a3db979541a5a20884e393c3b0868f9b5 (patch)
treefc381dbc0a395875e3aa4542bd71fce9abea1ef4 /recipes-devtools
parenta765a5bdbf0da72704bbe88171571ecc82668a0a (diff)
downloadmeta-xilinx-3119a03a3db979541a5a20884e393c3b0868f9b5.tar.gz
qemuboot-xilinx.bbclass: Rework qemu-xilinx setup
This change reworks how the meta-xilinx layer enables and provides the custom version of QEMU based on Xilinx's fork of QEMU. The existing implementation relied on the single sysroot which was changed in oe-core such that now recipes have their own sysroots (RSS support). Additionally oe-core now provides the QEMU binaries to the runqemu script via the 'qemu-helper-native' recipes sysroot as opposed to the image sysroot. These rework changes allow for a single machine to select the targeted QEMU version as well as to provide the qemuboot config specific to the targeted QEMU version. The selection of QEMU version is now handled by PREFERRED_PROVIDER mechanics with the meta-xilinx layer providing an additional recipe that is equivalent to qemu-helper-native and which also provides said target allowing for the machine to select via the use of PREFERRED_PROVIDER_qemu-helper-native. This recipe (qemu-xilinx-helper-native) however instead provides the sysroot populated with qemu-xilinx instead of qemu. Additionally the XILINX_QEMUBOOT variable is replaced with the qemuboot-xilinx.bbclass, this provides the overrides for setting up qemu-xilinx specific QB_* args. Additionally this bbclass points runqemu at the qemu-xilinx-helper-native sysroot for QEMU binaries. These changes also work towards making the meta-xilinx layer better handle multiple qemuboot.conf variants as well as handling different QEMU versions. This change also removes the 'qemu-system-xilinx' MACHINE_FEATURES, this is due to MACHINE_FEATURES no longer being available for native recipes. Additionally there is no longer any logic that needs to know this any way. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Diffstat (limited to 'recipes-devtools')
-rw-r--r--recipes-devtools/qemu/qemu-xilinx-helper-native_1.0.bb20
1 files changed, 20 insertions, 0 deletions
diff --git a/recipes-devtools/qemu/qemu-xilinx-helper-native_1.0.bb b/recipes-devtools/qemu/qemu-xilinx-helper-native_1.0.bb
new file mode 100644
index 00000000..f04be960
--- /dev/null
+++ b/recipes-devtools/qemu/qemu-xilinx-helper-native_1.0.bb
@@ -0,0 +1,20 @@
1
2def get_filespath_extra(d, subpath):
3 metaroot = next((p for p in d.getVar('BBPATH').split(':') if os.path.basename(p) == 'meta'), None)
4 if metaroot:
5 return os.path.join(metaroot, subpath) + ":"
6 return ""
7
8# TODO: improve this, since it is very hacky that this recipe need to build tunctl.
9# include the existing qemu-helper-native
10require recipes-devtools/qemu/qemu-helper-native_1.0.bb
11# get the path to tunctl.c
12FILESEXTRAPATHS_prepend := "${@get_filespath_extra(d, 'recipes-devtools/qemu/qemu-helper')}"
13
14# provide it, to replace the existing
15PROVIDES += "qemu-helper-native"
16
17# replace qemu with qemu-xilinx
18DEPENDS_remove = "qemu-native"
19DEPENDS_append = " qemu-xilinx-native"
20