From patchwork Sat Nov 8 13:13:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 408342 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 431B71400DD for ; Sun, 9 Nov 2014 00:13:42 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 4F5F9338CF; Sat, 8 Nov 2014 13:13:41 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9AnWStLvHrls; Sat, 8 Nov 2014 13:13:39 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id BC9DD334E3; Sat, 8 Nov 2014 13:13:39 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 3562B1C2995 for ; Sat, 8 Nov 2014 13:13:39 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 2F16E334E3 for ; Sat, 8 Nov 2014 13:13:39 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id K31BsKRPPvyk for ; Sat, 8 Nov 2014 13:13:38 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by silver.osuosl.org (Postfix) with ESMTPS id 1E50C2F968 for ; Sat, 8 Nov 2014 13:13:37 +0000 (UTC) Received: by mail-wg0-f50.google.com with SMTP id z12so5509391wgg.23 for ; Sat, 08 Nov 2014 05:13:35 -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; bh=8VMtXoMG12F2eWABpbXPYbmcS3flZnh3A+ddeZqzB48=; b=QDaIwFCXMrlZ26Lh8gaPbQoIXQmgoUl1jSYbkdLsZxawAQR2nTg8v2c8DU9M/YEuQm eW85LRe+WfY7ze5iKeEbsRNtgmBJUuOXokaOhXM7R4E9UxdbJVW9s3H+DoHuEX4Mj7FN UPO5FvcAR/JjAk1sYTllFqwkJTyDn4dihJtTp60zj/jBDJOgypk0T6OdA3lWNMcMOnKy EKeeYBylNrxv9fKxc/edMFelWJtO3z5QkD7b5HTIA++TX8qUPznVHWCYzGIjVAnI3eoA H38xmdMnZfKU82GWJPgr8iTz5B19Y3MT8hUzi+Opm969BHpVJBZIE3h08gY4z7HknytA CUYw== X-Received: by 10.180.87.33 with SMTP id u1mr13974353wiz.20.1415452415645; Sat, 08 Nov 2014 05:13:35 -0800 (PST) Received: from gourin.bzh.lan (ks3095497.kimsufi.com. [94.23.60.27]) by mx.google.com with ESMTPSA id f1sm5668452wiy.17.2014.11.08.05.13.33 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 08 Nov 2014 05:13:34 -0800 (PST) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Sat, 8 Nov 2014 14:13:29 +0100 Message-Id: <1415452409-1500-1-git-send-email-yann.morin.1998@free.fr> X-Mailer: git-send-email 1.9.1 Cc: Peter Korsgaard , "Yann E. MORIN" Subject: [Buildroot] [PATCH] package/qemu: fix specifying custom target sub-set X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 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" The logic was wrong. Even though it was working for previous versions of QEMU, it changed in later versions, and thus now breaks on the version we currently package. Signed-off-by: "Yann E. MORIN" --- Note: I did not notice so far because I always enabled a full-blown configure with all emulations enabled. --- package/qemu/qemu.mk | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/package/qemu/qemu.mk b/package/qemu/qemu.mk index 8182697..fe65a87 100644 --- a/package/qemu/qemu.mk +++ b/package/qemu/qemu.mk @@ -99,6 +99,18 @@ QEMU_VARS = \ PYTHON=$(HOST_DIR)/usr/bin/python2 \ PYTHONPATH=$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages +# If we want to specify only a subset of targets, we must still enable all +# of them, so that QEMU properly builds its list of default targets, from +# which it then checks if the specified sub-set is valid. That's what we +# do in the first part of the if-clause. +# Otherwise, if we do not want to pass a sub-set of targets, we then need +# to either enable or disable -user and/or -system emulation appropriately. +# That's what we do in the else-clause. +ifneq ($(call qstrip,$(BR2_PACKAGE_QEMU_CUSTOM_TARGETS)),) +QEMU_OPTS += --enable-system --enable-linux-user +QEMU_OPTS += --target-list="$(call qstrip,$(BR2_PACKAGE_QEMU_CUSTOM_TARGETS))" +else + ifeq ($(BR2_PACKAGE_QEMU_SYSTEM),y) QEMU_OPTS += --enable-system else @@ -111,8 +123,6 @@ else QEMU_OPTS += --disable-linux-user endif -ifneq ($(call qstrip,$(BR2_PACKAGE_QEMU_CUSTOM_TARGETS)),) -QEMU_OPTS += --target-list="$(call qstrip,$(BR2_PACKAGE_QEMU_CUSTOM_TARGETS))" endif ifeq ($(BR2_PACKAGE_QEMU_SDL),y)