From patchwork Sun Apr 1 16:36:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 894028 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=bootlin.com Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40Dgwz6Vtzz9s1B for ; Mon, 2 Apr 2018 02:36:51 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 26F8588D8F; Sun, 1 Apr 2018 16:36:48 +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 XwAippm9VxoC; Sun, 1 Apr 2018 16:36:46 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id DA6E188D84; Sun, 1 Apr 2018 16:36:46 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 009F81C273C for ; Sun, 1 Apr 2018 16:36:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id F2740882F1 for ; Sun, 1 Apr 2018 16:36:42 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xiN3Ku0E2jbJ for ; Sun, 1 Apr 2018 16:36:40 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.bootlin.com (mail.bootlin.com [62.4.15.54]) by fraxinus.osuosl.org (Postfix) with ESMTP id 9C44B882EE for ; Sun, 1 Apr 2018 16:36:40 +0000 (UTC) Received: by mail.bootlin.com (Postfix, from userid 110) id 553FB2077B; Sun, 1 Apr 2018 18:36:39 +0200 (CEST) Received: from localhost (unknown [195.154.228.195]) by mail.bootlin.com (Postfix) with ESMTPSA id 332F820384; Sun, 1 Apr 2018 18:36:39 +0200 (CEST) From: Thomas Petazzoni To: Buildroot List , "Arnout Vandecappelle (Essensium/Mind)" , Adam Duskett Date: Sun, 1 Apr 2018 18:36:35 +0200 Message-Id: <20180401163636.4098-3-thomas.petazzoni@bootlin.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180401163636.4098-1-thomas.petazzoni@bootlin.com> References: <20180401163636.4098-1-thomas.petazzoni@bootlin.com> Subject: [Buildroot] [PATCH v2 2/3] qemu: introduce BR2_PACKAGE_HOST_QEMU_{SYSTEM, USER}_ARCH_SUPPORTS X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Petazzoni MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Not all architectures are supported by both the system emulation and user-mode emulation in Qemu, so a single BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS doesn't work very well. Therefore, this commit introduces the BR2_PACKAGE_HOST_QEMU_{SYSTEM,USER}_ARCH_SUPPORTS hidden options. We keep the BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS option for the (numerous) architectures supported by both system emulation and user-mode emulation. The 'select' logic to make sure that at least either system emulation or user-mode emulation is selected is reworked, and done carefully to avoid recursive Kconfig dependencies. For now BR2_PACKAGE_HOST_QEMU_SYSTEM_ARCH_SUPPORTS and BR2_PACKAGE_HOST_QEMU_USER_ARCH_SUPPORTS are the same, but they will become different in a follow-up commit. Signed-off-by: Thomas Petazzoni --- package/qemu/Config.in.host | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/package/qemu/Config.in.host b/package/qemu/Config.in.host index 160778c834..78ff052983 100644 --- a/package/qemu/Config.in.host +++ b/package/qemu/Config.in.host @@ -19,11 +19,21 @@ config BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS default y if BR2_x86_64 depends on !BR2_powerpc_620 && !BR2_powerpc_630 && !BR2_powerpc_970 +config BR2_PACKAGE_HOST_QEMU_SYSTEM_ARCH_SUPPORTS + bool + default y if BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS + +config BR2_PACKAGE_HOST_QEMU_USER_ARCH_SUPPORTS + bool + default y if BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS + config BR2_PACKAGE_HOST_QEMU bool "host qemu" - depends on BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS + depends on BR2_PACKAGE_HOST_QEMU_SYSTEM_ARCH_SUPPORTS || BR2_PACKAGE_HOST_QEMU_USER_ARCH_SUPPORTS select BR2_PACKAGE_HOST_QEMU_LINUX_USER_MODE \ - if !BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE + if !BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE && BR2_PACKAGE_HOST_QEMU_USER_ARCH_SUPPORTS + select BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE \ + if !BR2_PACKAGE_HOST_QEMU_USER_ARCH_SUPPORTS help QEMU is a generic and open source machine emulator and virtualizer. @@ -38,12 +48,14 @@ comment "Emulators selection" config BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE bool "Enable system emulation" + depends on BR2_PACKAGE_HOST_QEMU_SYSTEM_ARCH_SUPPORTS help Enables the build of the system emulator, which allows to boot an entire system in Qemu. config BR2_PACKAGE_HOST_QEMU_LINUX_USER_MODE bool "Enable Linux user-land emulation" + depends on BR2_PACKAGE_HOST_QEMU_USER_ARCH_SUPPORTS help Enables the build of the user-land emulator, which allows to run user-space applications.