summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernhard Walle <bernhard@bwalle.de>2012-06-10 17:09:20 +0200
committerJuergen Beisert <jbe@pengutronix.de>2012-06-10 21:12:27 +0200
commitb009f5e62f37b07a4e7c3d2a55e8b2eed4ae62a3 (patch)
tree43395cd5c9e9cf7d895030056d9b8c044bb2c2b8
parentc1ab82fb7e5f63523451ee3141251f4c6162f4b3 (diff)
downloadOSELAS.BSP-Pengutronix-Generic-b009f5e62f37b07a4e7c3d2a55e8b2eed4ae62a3.tar.gz
Add QEMU as host tool
Build QEMU as part of the BSP and use our own QEMU in the startup scripts. Tested on Mac OS 10.7 and Ubuntu Linux. Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
-rwxr-xr-xconfigs/arm-qemu-2011.11.0/run2
-rwxr-xr-xconfigs/i586-qemu-2011.11.0/run8
-rw-r--r--configs/ptxconfig1
-rw-r--r--rules/host-qemu.in8
-rw-r--r--rules/host-qemu.make38
5 files changed, 49 insertions, 8 deletions
diff --git a/configs/arm-qemu-2011.11.0/run b/configs/arm-qemu-2011.11.0/run
index a653ee4..d643e17 100755
--- a/configs/arm-qemu-2011.11.0/run
+++ b/configs/arm-qemu-2011.11.0/run
@@ -31,7 +31,7 @@ if [ ! -e "${PTXDIST_PLATFORMDIR}/images/hd.img" ]; then
fi
# the emulator to run
-QEMU_EXEC=qemu-system-${PTXCONF_ARCH_STRING}
+QEMU_EXEC=${PTXDIST_PLATFORMDIR}/sysroot-host/bin/qemu-system-${PTXCONF_ARCH_STRING}
# disable this, if you want to have some graphics output
QEMU_NOGRAPHIC=--nographic
diff --git a/configs/i586-qemu-2011.11.0/run b/configs/i586-qemu-2011.11.0/run
index 6ef0ef8..5036d77 100755
--- a/configs/i586-qemu-2011.11.0/run
+++ b/configs/i586-qemu-2011.11.0/run
@@ -30,13 +30,7 @@ if [ ! -e "${PTXDIST_PLATFORMDIR}/images/hd.img" ]; then
fi
# the emulator to run
-if test "${PTXCONF_ARCH_STRING}" = "i386"; then
- ARCH_STRING="x86_64"
-else
- ARCH_STRING="${PTXCONF_ARCH_STRING}"
-fi
-
-QEMU_EXEC=qemu-system-${ARCH_STRING}
+QEMU_EXEC=${PTXDIST_PLATFORMDIR}/sysroot-host/bin/emu-system-${PTXCONF_ARCH_STRING}
# disable this, if you want to have some graphics output
QEMU_NOGRAPHIC=--nographic
diff --git a/configs/ptxconfig b/configs/ptxconfig
index 6df0cdf..7234364 100644
--- a/configs/ptxconfig
+++ b/configs/ptxconfig
@@ -54,6 +54,7 @@ PTXCONF_FIX_PERMISSIONS=y
# PTXCONF_HOST_PACKAGE_MANAGEMENT_IPKG is not set
PTXCONF_HOST_PACKAGE_MANAGEMENT_OPKG=y
PTXCONF_HOST_PACKAGE_MANAGEMENT="opkg"
+PTXCONF_HOST_QEMU=y
# PTXCONF_HOST_TESTFRAMEWORK is not set
# PTXCONF_HOST_ACL is not set
# PTXCONF_HOST_APACHE2 is not set
diff --git a/rules/host-qemu.in b/rules/host-qemu.in
new file mode 100644
index 0000000..7be0310
--- /dev/null
+++ b/rules/host-qemu.in
@@ -0,0 +1,8 @@
+## SECTION=hosttools
+
+config HOST_QEMU
+ tristate
+ prompt "qemu"
+ select HOST_GLIB
+ help
+ CPU/System emulator
diff --git a/rules/host-qemu.make b/rules/host-qemu.make
new file mode 100644
index 0000000..6fd8133
--- /dev/null
+++ b/rules/host-qemu.make
@@ -0,0 +1,38 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2012 by Bernhard Walle <bernhard@bwalle.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+HOST_PACKAGES-$(PTXCONF_HOST_QEMU) += host-qemu
+
+#
+# Paths and names
+#
+HOST_QEMU_VERSION := 1.1.0-1
+HOST_QEMU_MD5 := f5c85c229b780bc39268845b6f365fc1
+HOST_QEMU := qemu-$(HOST_QEMU_VERSION)
+HOST_QEMU_SUFFIX := tar.bz2
+HOST_QEMU_URL := http://wiki.qemu.org/download/$(HOST_QEMU).$(HOST_QEMU_SUFFIX)
+HOST_QEMU_SOURCE := $(SRCDIR)/$(HOST_QEMU).$(HOST_QEMU_SUFFIX)
+HOST_QEMU_DIR := $(HOST_BUILDDIR)/$(HOST_QEMU)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+#
+# autoconf
+#
+HOST_QEMU_CONF_TOOL := autoconf
+HOST_QEMU_CONF_OPT := $(HOST_AUTOCONF) \
+ --target-list=arm-softmmu,i386-softmmu
+
+# vim: syntax=make