summaryrefslogtreecommitdiffstats
path: root/classes
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 /classes
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 'classes')
-rw-r--r--classes/qemuboot-xilinx.bbclass27
1 files changed, 27 insertions, 0 deletions
diff --git a/classes/qemuboot-xilinx.bbclass b/classes/qemuboot-xilinx.bbclass
new file mode 100644
index 00000000..024626cb
--- /dev/null
+++ b/classes/qemuboot-xilinx.bbclass
@@ -0,0 +1,27 @@
1
2# enable the overrides for the context of the conf only
3OVERRIDES .= ":qemuboot-xilinx"
4
5# setup the target binary
6QB_SYSTEM_NAME_prepend = "qemu-xilinx/"
7
8# Default machine targets for Xilinx QEMU (FDT Generic)
9QB_MACHINE_aarch64 = "-machine arm-generic-fdt"
10QB_MACHINE_arm = "-machine arm-generic-fdt-7series"
11QB_MACHINE_microblaze = "-machine microblaze-generic-fdt-plnx"
12
13# defaults
14QB_DEFAULT_KERNEL ?= "none"
15
16inherit qemuboot
17
18# rewrite the qemuboot with the custom sysroot bindir
19python do_write_qemuboot_conf_append() {
20 val = os.path.join(d.getVar('BASE_WORKDIR'), d.getVar('BUILD_SYS'), 'qemu-xilinx-helper-native/1.0-r1/recipe-sysroot-native/usr/bin/')
21 cf.set('config_bsp', 'STAGING_BINDIR_NATIVE', '%s' % val)
22
23 # write out the updated version from this append
24 with open(qemuboot, 'w') as f:
25 cf.write(f)
26}
27