aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/qemu.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/qemu.bbclass')
-rw-r--r--meta/classes/qemu.bbclass15
1 files changed, 15 insertions, 0 deletions
diff --git a/meta/classes/qemu.bbclass b/meta/classes/qemu.bbclass
new file mode 100644
index 0000000000..66dfb2b0d2
--- /dev/null
+++ b/meta/classes/qemu.bbclass
@@ -0,0 +1,15 @@
+#
+# This class contains functions for recipes that need QEMU or test for its
+# existance.
+#
+
+def qemu_target_binary(data):
+ import bb
+
+ target_arch = bb.data.getVar("TARGET_ARCH", data, 1)
+ if target_arch in ("i486", "i586", "i686"):
+ target_arch = "i386"
+ elif target_arch == "powerpc":
+ target_arch = "ppc"
+
+ return "qemu-" + target_arch