From patchwork Sun Dec 9 16:34:57 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: 204727 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 146542C01FB for ; Mon, 10 Dec 2012 03:38:43 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id C1CCBA0137; Sun, 9 Dec 2012 16:38:41 +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 Vf2feGRE68Zi; Sun, 9 Dec 2012 16:38:34 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id B4BBBA0161; Sun, 9 Dec 2012 16:36:48 +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 ED72C8F74B for ; Sun, 9 Dec 2012 16:36:08 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id D21E48875D for ; Sun, 9 Dec 2012 16:36:03 +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 k3h4LcoVNe5s for ; Sun, 9 Dec 2012 16:36:02 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com [209.85.212.169]) by whitealder.osuosl.org (Postfix) with ESMTPS id DA528884E1 for ; Sun, 9 Dec 2012 16:36:01 +0000 (UTC) Received: by mail-wi0-f169.google.com with SMTP id hq12so571621wib.4 for ; Sun, 09 Dec 2012 08:36:00 -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=ixAdZy+oCB7pJQmV2EXcJkccO9SETmV/pBPdqI8vVSg=; b=dgraP71sbQx/8p8CyyGayRSYh3wvQZU+svh0bV9gjW703FMHBXhNNfsuqsiD69UnZu vk/EvG+5rSTBbRSBrYrt+fPZy+1kiOVpZuEgWo0mVhbNYYeopUZWF8rNp/4GdBxQLXgP nFVeSx8h9yCNDVBYrQnh2b6gc455ccQci2kUEqFEr67t5YBzUjMOjd6TS6xaHOLIPHBN FGcnpayG4l1S4MMDU3Ig5b7r8cyk+hdYqb6zf8+rKF3gOFBrjPtbL9A/k4nJEPE5Hyzs 9/qFzLE7iaTcGt/B/rczeL26qu9nn2IOgjFaoA812tzExGPYFkAXO8HzxX6njwdOKL8O fEmA== Received: by 10.216.216.80 with SMTP id f58mr4232883wep.167.1355070960013; Sun, 09 Dec 2012 08:36:00 -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.59 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 09 Dec 2012 08:35:59 -0800 (PST) From: "Yann E. MORIN" To: buildroot@busybox.net Date: Sun, 9 Dec 2012 17:34:57 +0100 Message-Id: <1355070924-8009-25-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 24/51] package/qemu: add basic target selection 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 qemu-1.2.1 requires that at least one target emulation be enabled, so we use some kconfig-tricks to force at least the systems emulations to be enabled if user emulation is not selected. This limitation will be lifted in the upcoming qemu-1.3.x Signed-off-by: "Yann E. MORIN" --- package/qemu/Config.in | 32 ++++++++++++++++++++++++++++++++ package/qemu/qemu.mk | 14 ++++++++++++-- 2 files changed, 44 insertions(+), 2 deletions(-) diff --git a/package/qemu/Config.in b/package/qemu/Config.in index 85b939a..d88241a 100644 --- a/package/qemu/Config.in +++ b/package/qemu/Config.in @@ -26,3 +26,35 @@ config BR2_PACKAGE_QEMU server and embedded PowerPC, and S390 guests. http://qemu.org/ + +if BR2_PACKAGE_QEMU + +comment "Emulators selection" + +# QEMU 1.2.x requires that at least one target emulation be selected, so +# we use the following two symbols to force systems emulation if user +# emulation is not selected. This limitation will be lifted when qemu-1.3.0 +# is out. +config BR2_PACKAGE_QEMU_EMUL_SET + bool + +config BR2_PACKAGE_QEMU_FORCE_SYSTEM + bool + default n if BR2_PACKAGE_QEMU_EMUL_SET + default y if ! BR2_PACKAGE_QEMU_EMUL_SET + select BR2_PACKAGE_QEMU_SYSTEM + +config BR2_PACKAGE_QEMU_SYSTEM + bool "Enable all systems emulation" + help + Say 'y' to build all system emulators/virtualisers that QEMU supports. + +config BR2_PACKAGE_QEMU_LINUX_USER + bool "Enable all Linux user-land emulation" + select BR2_PACKAGE_QEMU_EMUL_SET + help + Say 'y' to build all Linux user-land emulators that QEMU supports. + +# Note: bsd-user can not be build on Linux + +endif # BR2_PACKAGE_QEMU diff --git a/package/qemu/qemu.mk b/package/qemu/qemu.mk index 17c4c74..b6f6c2e 100644 --- a/package/qemu/qemu.mk +++ b/package/qemu/qemu.mk @@ -97,6 +97,18 @@ QEMU_VARS = PYTHON=$(HOST_DIR)/usr/bin/python \ PYTHONPATH=$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \ +ifeq ($(BR2_PACKAGE_QEMU_SYSTEM),y) +QEMU_OPTS += --enable-system +else +QEMU_OPTS += --disable-system +endif + +ifeq ($(BR2_PACKAGE_QEMU_LINUX_USER),y) +QEMU_OPTS += --enable-linux-user +else +QEMU_OPTS += --disable-linux-user +endif + # 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 @@ -117,8 +129,6 @@ define QEMU_CONFIGURE_CMDS --enable-nptl \ --enable-attr \ --enable-vhost-net \ - --enable-system \ - --enable-linux-user \ --disable-bsd-user \ --disable-xen \ --disable-slirp \