From patchwork Mon Dec 10 23:44:45 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: 205078 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 21D9E2C0322 for ; Tue, 11 Dec 2012 10:48:54 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id F2CABA01A6; Mon, 10 Dec 2012 23:48:51 +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 0sAZH6am-RX5; Mon, 10 Dec 2012 23:48:44 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 5EA07A0170; Mon, 10 Dec 2012 23:47:40 +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 29D4C8F74B for ; Mon, 10 Dec 2012 23:46:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 5685C8A224 for ; Mon, 10 Dec 2012 23:46:29 +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 IGXHRB3u5PCs for ; Mon, 10 Dec 2012 23:46:13 +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 289128AB34 for ; Mon, 10 Dec 2012 23:45:45 +0000 (UTC) Received: by mail-we0-f171.google.com with SMTP id u3so1789665wey.16 for ; Mon, 10 Dec 2012 15:45:45 -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=7HBKtqWlJGE7yiaqCSBZB4GIljGk3rpPk4uuqMTJOks=; b=ZoKfk1Ddqiu9jB/D41qQMkPJ9CqmGLSCvZpunBevjm2gfaPRE1AICj4fCfnSWDgT4/ cGmP94SZu/i4aCa+0j+3z00RENuHi/8uTkeEYzP+9OqKOJEhbogWzOuoYE5gzS5MYJQf J1SH4Zyrs2qqszhD2o7I76e2yh55oGeTfbfxMamACfVy0b08VUQwvtWRW5B53++SOy1d e9SPhXzASIMWMPrCTNUMicEN+fsRT3KWyr3MnfAUGtCLmpM2Px+fjvb3yZXAyNF18w1w GJ75D9JeJqO171VIfDH/dxIDAFZPqlr+NMoK4s9QCPUORIstuoJIqkYj+NKNtstxr+Xo KAXQ== Received: by 10.194.9.4 with SMTP id v4mr241502wja.50.1355183145676; Mon, 10 Dec 2012 15:45:45 -0800 (PST) Received: from localhost.localdomain (ARennes-256-1-41-119.w90-32.abo.wanadoo.fr. [90.32.24.119]) by mx.google.com with ESMTPS id bz12sm13895257wib.5.2012.12.10.15.45.44 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 10 Dec 2012 15:45:45 -0800 (PST) From: "Yann E. MORIN" To: buildroot@busybox.net Date: Tue, 11 Dec 2012 00:44:45 +0100 Message-Id: <1355183112-10735-26-git-send-email-yann.morin.1998@free.fr> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1355183112-10735-1-git-send-email-yann.morin.1998@free.fr> References: <1355183112-10735-1-git-send-email-yann.morin.1998@free.fr> Cc: "Yann E. MORIN" Subject: [Buildroot] [PATCH 25/52] 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 4b05e3d..ddf3665 100644 --- a/package/qemu/Config.in +++ b/package/qemu/Config.in @@ -23,3 +23,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 4c7be50..0085abd 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 \