From patchwork Tue Jan 29 22:43:47 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 216687 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 7404F2C0096 for ; Wed, 30 Jan 2013 09:45:01 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 76115A026D; Tue, 29 Jan 2013 22:45:02 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8pRPbv2U4IB1; Tue, 29 Jan 2013 22:44:55 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id C9847A0246; Tue, 29 Jan 2013 22:44:38 +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 A61078F753 for ; Tue, 29 Jan 2013 22:44:36 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 5CF3B8C72F for ; Tue, 29 Jan 2013 22:44:29 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zUxW+n71aayo for ; Tue, 29 Jan 2013 22:44:28 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-we0-f170.google.com (mail-we0-f170.google.com [74.125.82.170]) by whitealder.osuosl.org (Postfix) with ESMTPS id 271708C720 for ; Tue, 29 Jan 2013 22:44:27 +0000 (UTC) Received: by mail-we0-f170.google.com with SMTP id z53so743923wey.29 for ; Tue, 29 Jan 2013 14:44:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:in-reply-to:references; bh=xqh1UXSgUSND6wTIFugjApSmNW5B17FALxpAOTwUAZA=; b=SUtkItDn81rHGJklZOh9fmPvwyTiY+eIHZMnV7EM8E6fELvGR0qpgbpaCf6W+188iE ePMqDna0MzWjtH9yzPX37kzbjypbE29Yhq1f4j47ovQIKL1TCActvwQrqfhZfBMgOMZN Iopegsmlzkpowy751atWjPrgyupAkYMl/502oM6AYZ3w3lxWJkRDZhYLjRxmOrfYzzqV 7yVxFNO9wdvLmdTVsZWX1snTxhdWWou3TNzKE1WOy9ycfZGq+08Pv5Ws07529uuL2f5M n1UbJlUgftKbEz2VTB6eiInMemPjLmUo7zddiheumkK4RqTNc1Go8fqE3OLufRSypOf/ OCLQ== X-Received: by 10.194.122.98 with SMTP id lr2mr5319120wjb.7.1359499466485; Tue, 29 Jan 2013 14:44:26 -0800 (PST) Received: from localhost.localdomain (ARennes-256-1-39-23.w90-32.abo.wanadoo.fr. [90.32.22.23]) by mx.google.com with ESMTPS id ge2sm5826459wib.4.2013.01.29.14.44.25 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 29 Jan 2013 14:44:25 -0800 (PST) From: "Yann E. MORIN" To: buildroot@busybox.net Date: Tue, 29 Jan 2013 23:43:47 +0100 Message-Id: <333827ac19a2c39c08f387b846078441478d87af.1359498903.git.yann.morin.1998@free.fr> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: References: In-Reply-To: References: Cc: "Yann E. MORIN" Subject: [Buildroot] [PATCH 03/29] 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 b0ed279..9bfe37d 100644 --- a/package/qemu/Config.in +++ b/package/qemu/Config.in @@ -24,3 +24,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 6dfcdd9..c2302fa 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 @@ -118,8 +130,6 @@ define QEMU_CONFIGURE_CMDS --enable-nptl \ --enable-attr \ --enable-vhost-net \ - --enable-system \ - --enable-linux-user \ --disable-bsd-user \ --disable-xen \ --disable-slirp \