From b009f5e62f37b07a4e7c3d2a55e8b2eed4ae62a3 Mon Sep 17 00:00:00 2001 From: Bernhard Walle Date: Sun, 10 Jun 2012 17:09:20 +0200 Subject: 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 --- configs/arm-qemu-2011.11.0/run | 2 +- configs/i586-qemu-2011.11.0/run | 8 +------- configs/ptxconfig | 1 + rules/host-qemu.in | 8 ++++++++ rules/host-qemu.make | 38 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 49 insertions(+), 8 deletions(-) create mode 100644 rules/host-qemu.in create mode 100644 rules/host-qemu.make 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 +# +# 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 -- cgit v1.2.3