From patchwork Fri Oct 25 05:35:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angelo Compagnucci X-Patchwork-Id: 1183773 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="S+2VnGGs"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46zt9g52Dpz9sPL for ; Fri, 25 Oct 2019 16:35:19 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 1716420362; Fri, 25 Oct 2019 05:35:16 +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 iYkf+1HRImtc; Fri, 25 Oct 2019 05:35:14 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id A687520380; Fri, 25 Oct 2019 05:35:14 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id B68DB1BF857 for ; Fri, 25 Oct 2019 05:35:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 9ED5020380 for ; Fri, 25 Oct 2019 05:35:12 +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 rv9sL+Rhj6Et for ; Fri, 25 Oct 2019 05:35:11 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by silver.osuosl.org (Postfix) with ESMTPS id ECFDC20362 for ; Fri, 25 Oct 2019 05:35:10 +0000 (UTC) Received: by mail-wm1-f67.google.com with SMTP id p21so638243wmg.2 for ; Thu, 24 Oct 2019 22:35:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=GpnJEGs+Xmoh+RlUCFOFXixqzzXlA8YvPcKtLaVon9Q=; b=S+2VnGGsDhUkfKxvtYITz23x3HO2Cd0JjPlxDZ2ZNZEyRWSOUyKRGWBMDkEEBDsTuA Q3oFv70iwRstr7674kV2rt71Qd3TtXHLaipI9HqkGdPtrbtDHBP9/UPmuP4tInoLW0cu NqNRPNtHQfCcL7W+8v807HtByguCfIpBf5dpT/V2M7mGg9jTNre0ZA9HKf4E2dCpFfoo T+Qp57uZ0sCLRiiGnIImvMzwv3yPBcYTKWqeWhw7+m88t7YKtNmpYC32bgMRQmug8Z7S b+5IHk+Mz4dYthKTeLlodD7c3cDZJp0W7qSfFEWd3ERSdGBxKYhgacBL6urVPtMrAFQd 58uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=GpnJEGs+Xmoh+RlUCFOFXixqzzXlA8YvPcKtLaVon9Q=; b=jR7Y/OoWh7Le/D0D2yWBLf/LeW/N01JTyzDOV7IbmG1IaSoBK/i7bzQk06YbzUVfFG UEznhfndPjPIaVz3t97tF1tX7rpK3JXNrhwwxiSfLUSHiStFwSEoT5OtqqyTJDwbFMkW E8CN0niNf/8AXnNuJAD96jMCzfSwGjQ+IzwsZV8KUtxjrOuq8CFPPoxG7J5KOGWWoZ6E Q5dyfYVHD9m7pg4Ubbqqwr4KGIBMMJyzut+7o6zMJwZeQ4gaz2XSuxHGXtksrJTaQph4 1OVG0HTHQYcYIl+nnicECADEsmf5r8+j5cQYL+wNj6GAWkISmnWLqXnwoOFmUORSRq// tdBA== X-Gm-Message-State: APjAAAWsiODdwjionO0/NnEU7cBTSebkGzIOJunGfriVyGodgbLmbW3p afRHW0zqJCCTYtvR43JYXbpakKvT9zY= X-Google-Smtp-Source: APXvYqyuuCER9LwmLR3qhl76435t97wVeToR7jexF07tXxH1bnIe4eUjcWEZC3LFZh02ic50HaIIFQ== X-Received: by 2002:a1c:4c02:: with SMTP id z2mr1705935wmf.78.1571981708844; Thu, 24 Oct 2019 22:35:08 -0700 (PDT) Received: from localhost.localdomain ([37.161.79.39]) by smtp.gmail.com with ESMTPSA id g17sm1012772wrq.58.2019.10.24.22.35.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Oct 2019 22:35:08 -0700 (PDT) From: Angelo Compagnucci X-Google-Original-From: Angelo Compagnucci To: buildroot@buildroot.org Date: Fri, 25 Oct 2019 07:35:04 +0200 Message-Id: <20191025053504.19829-1-angelo@amarulasolutions.com> X-Mailer: git-send-email 2.17.1 Subject: [Buildroot] [PATCH v2] package/qemu: enable usb passthrough on host variant X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Angelo Compagnucci MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Usb passthrough is a useful feature while using qemu for debugging purpose. Signed-off-by: Angelo Compagnucci --- package/qemu/Config.in.host | 5 +++++ package/qemu/qemu.mk | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/package/qemu/Config.in.host b/package/qemu/Config.in.host index 9eceba5021..e74bbafc26 100644 --- a/package/qemu/Config.in.host +++ b/package/qemu/Config.in.host @@ -83,4 +83,9 @@ config BR2_PACKAGE_HOST_QEMU_VIRTFS Enables support for virtual filesystem in Qemu allowing shared filesystem between Qemu and its emulated target. +config BR2_PACKAGE_HOST_QEMU_USB + bool "USB passthrough support" + help + Enables usb passthrough from guest to host. + endif diff --git a/package/qemu/qemu.mk b/package/qemu/qemu.mk index 1d3759a850..7e2faf8a54 100644 --- a/package/qemu/qemu.mk +++ b/package/qemu/qemu.mk @@ -264,6 +264,11 @@ else HOST_QEMU_OPTS += --disable-virtfs endif +ifeq ($(BR2_PACKAGE_HOST_QEMU_USB),y) +HOST_QEMU_OPTS += --enable-libusb +HOST_QEMU_DEPENDENCIES += host-libusb +endif + # Override CPP, as it expects to be able to call it like it'd # call the compiler. define HOST_QEMU_CONFIGURE_CMDS