From patchwork Sun Dec 9 16:34:56 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 204725 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 30E592C0199 for ; Mon, 10 Dec 2012 03:38:30 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id C9D69A02CB; Sun, 9 Dec 2012 16:38:28 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FjLnmjbEDVkD; Sun, 9 Dec 2012 16:38:22 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id D1D4EA0131; Sun, 9 Dec 2012 16:36:43 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 1F8D18F74B for ; Sun, 9 Dec 2012 16:36:06 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 06B5B884E1 for ; Sun, 9 Dec 2012 16:36:01 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8BR2Ss5AcsMk for ; Sun, 9 Dec 2012 16:35:59 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-we0-f171.google.com (mail-we0-f171.google.com [74.125.82.171]) by whitealder.osuosl.org (Postfix) with ESMTPS id 9409D81BA8 for ; Sun, 9 Dec 2012 16:35:59 +0000 (UTC) Received: by mail-we0-f171.google.com with SMTP id u3so1081279wey.16 for ; Sun, 09 Dec 2012 08:35:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=3YtoLj3p2O+bNF2ecFHomW08bIeRGcpzJz8PSfuR8Bk=; b=0Z1Muzwe7TAUpzw62bIJZGvciC8/qeUKDLdmmxj43QraMSiqm7V21CIY+1bhmbKV0X fQ+9UJQCxJ7hLfcdrgk++fdgHGPtxVOzf4Hv/O7W9R0HzBrM9MD0upiA2eeJ+y2ShvfP vhwb2a6y1HVlV0Oq8kA/+gYEBZn1nqMLrBoHToDShPmZgjHjBbkfvaR1cjzEfMv8s0+y S1daFpv5CebW8z7/zZR/NGEFcFYgYVeYh6+rEezcEncsMaXh4HrbMiULwa59ImdWAci/ 8qm7H3eXnTH9ttIwPGBPX8W8wc6U+a0m//qMiXqiavpUaEJRJxMjZ4XV06PRiKAGi2p2 e5nQ== Received: by 10.216.211.84 with SMTP id v62mr4375309weo.158.1355070959026; Sun, 09 Dec 2012 08:35:59 -0800 (PST) Received: from localhost.localdomain (ARennes-256-1-76-30.w90-32.abo.wanadoo.fr. [90.32.155.30]) by mx.google.com with ESMTPS id fv2sm6587947wib.4.2012.12.09.08.35.57 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 09 Dec 2012 08:35:58 -0800 (PST) From: "Yann E. MORIN" To: buildroot@busybox.net Date: Sun, 9 Dec 2012 17:34:56 +0100 Message-Id: <1355070924-8009-24-git-send-email-yann.morin.1998@free.fr> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1355070924-8009-1-git-send-email-yann.morin.1998@free.fr> References: <1355070924-8009-1-git-send-email-yann.morin.1998@free.fr> Cc: "Yann E. MORIN" Subject: [Buildroot] [PATCH 23/51] package/qemu: build for the target (i386 or x86_64 only) X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Untested for other architectures, so only enabled for known-working ones. We explicitly disable all features that depends on other packages, for now. Such features will be added one by one in the next patches. Features that do not rely on external packages are explicitly enabled to catch the dependencies on toolchain features early. Signed-off-by: "Yann E. MORIN" --- package/Config.in | 1 + package/qemu/Config.in | 28 ++++++++++++++++++ package/qemu/qemu.mk | 73 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 102 insertions(+), 0 deletions(-) create mode 100644 package/qemu/Config.in diff --git a/package/Config.in b/package/Config.in index 2646695..dd4cbda 100644 --- a/package/Config.in +++ b/package/Config.in @@ -566,6 +566,7 @@ source "package/collectd/Config.in" source "package/empty/Config.in" source "package/googlefontdirectory/Config.in" source "package/mobile-broadband-provider-info/Config.in" +source "package/qemu/Config.in" source "package/shared-mime-info/Config.in" source "package/snowball-init/Config.in" source "package/sound-theme-borealis/Config.in" diff --git a/package/qemu/Config.in b/package/qemu/Config.in new file mode 100644 index 0000000..85b939a --- /dev/null +++ b/package/qemu/Config.in @@ -0,0 +1,28 @@ +config BR2_PACKAGE_QEMU_AVAILABLE + def_bool y + depends on BR2_i386 || BR2_x86_64 + depends on BR2_TOOLCHAIN_HAS_THREADS + +comment "QEMU requires a toolchain with threads" + depends on !BR2_PACKAGE_QEMU_AVAILABLE + +config BR2_PACKAGE_QEMU + bool "QEMU" + depends on BR2_PACKAGE_QEMU_AVAILABLE + select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_LIBGLIB2 + help + QEMU is a generic and open source machine emulator and virtualizer. + + When used as a machine emulator, QEMU can run OSes and programs made + for one machine (e.g. an ARM board) on a different machine (e.g. + your own PC). By using dynamic translation, it achieves very good + performance. + + When used as a virtualizer, QEMU achieves near native performances + by executing the guest code directly on the host CPU. QEMU supports + virtualization when executing under the Xen hypervisor or using the + KVM kernel module in Linux. When using KVM, QEMU can virtualize x86, + server and embedded PowerPC, and S390 guests. + + http://qemu.org/ diff --git a/package/qemu/qemu.mk b/package/qemu/qemu.mk index 2fdf2ae..17c4c74 100644 --- a/package/qemu/qemu.mk +++ b/package/qemu/qemu.mk @@ -81,3 +81,76 @@ $(eval $(host-autotools-package)) # variable used by other packages QEMU_USER = $(HOST_DIR)/usr/bin/qemu-$(QEMU_ARCH) + +#------------------------------------------------------------- +# Target-qemu + +QEMU_DEPENDENCIES = host-pkgconf zlib libglib2 host-python + +# Need the LIBS variable because librt and libm are +# not automatically pulled. :-( +QEMU_LIBS = -lrt -lm + +QEMU_OPTS = + +QEMU_VARS = \ + PYTHON=$(HOST_DIR)/usr/bin/python \ + PYTHONPATH=$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \ + +# Note: although QEMU uses a ./configure script, it is not compatible with +# the traditional autotools options (eg. --target et al.), so we have +# to override the default provided by the autotools-package infra, and +# provide our own. Sigh... :-/ + +define QEMU_CONFIGURE_CMDS + ( cd $(@D); \ + LIBS='$(QEMU_LIBS)' \ + $(TARGET_CONFIGURE_OPTS) \ + $(TARGET_CONFIGURE_ARGS) \ + $(QEMU_VARS) \ + ./configure \ + --prefix=/usr \ + --cross-prefix=$(TARGET_CROSS) \ + --audio-drv-list= \ + --audio-card-list= \ + --enable-kvm \ + --enable-nptl \ + --enable-attr \ + --enable-vhost-net \ + --enable-system \ + --enable-linux-user \ + --disable-bsd-user \ + --disable-xen \ + --disable-slirp \ + --disable-sdl \ + --disable-vnc \ + --disable-virtfs \ + --disable-brlapi \ + --disable-curses \ + --disable-curl \ + --disable-fdt \ + --disable-bluez \ + --disable-guest-base \ + --disable-uuid \ + --disable-vde \ + --disable-linux-aio \ + --disable-cap-ng \ + --disable-docs \ + --disable-spice \ + --disable-rbd \ + --disable-libiscsi \ + --disable-usb-redir \ + --disable-smartcard \ + --disable-strip \ + --disable-seccomp \ + --disable-sparse \ + $(QEMU_OPTS) \ + ) +endef + +# Need the LIBS_QGA because it does not 'inherit' the LIBS_TOOLS +# we set at configure time, and there is no conrresponding LIBS_QGA +# at configure time +QEMU_MAKE_ENV += LIBS_TOOLS="$(QEMU_LIBS)" LIBS_QGA="$(QEMU_LIBS)" LIBS="$(QEMU_LIBS)" + +$(eval $(autotools-package))