From patchwork Thu Dec 9 14:14:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gwenhael Goavec-Merou X-Patchwork-Id: 1565762 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=buildroot.org (client-ip=140.211.166.136; helo=smtp3.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4J8wyl3S4gz9sCD for ; Fri, 10 Dec 2021 01:14:39 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 4AC7C6115B; Thu, 9 Dec 2021 14:14:37 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eAc0KqXhwMe2; Thu, 9 Dec 2021 14:14:36 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 9162461159; Thu, 9 Dec 2021 14:14:35 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id A8B6A1BF391 for ; Thu, 9 Dec 2021 14:14:34 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id A403184FE1 for ; Thu, 9 Dec 2021 14:14:34 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WkycurKEkRng for ; Thu, 9 Dec 2021 14:14:33 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from smtp6-g21.free.fr (smtp6-g21.free.fr [212.27.42.6]) by smtp1.osuosl.org (Postfix) with ESMTPS id 9A78C84FB5 for ; Thu, 9 Dec 2021 14:14:33 +0000 (UTC) Received: from localhost.localdomain (unknown [78.252.129.8]) by smtp6-g21.free.fr (Postfix) with ESMTP id 45AB578039B; Thu, 9 Dec 2021 15:14:30 +0100 (CET) From: Gwenhael Goavec-Merou To: buildroot@buildroot.org Date: Thu, 9 Dec 2021 15:14:10 +0100 Message-Id: <20211209141410.694868-1-gwenj@trabucayre.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2] package/openfpgaloader: add cmsis-dap support option X-BeenThere: buildroot@buildroot.org 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: Gwenhael Goavec-Merou , Jean Burgat , Thomas Petazzoni Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" From: Gwenhael Goavec-Merou CMSIS-DAP support depends on hidapi, but this package has depends on udev so instead of adding this option by default, this let user decide. Signed-off-by: Gwenhael Goavec-Merou --- Changes v1 -> v2: - use select BR2_PACKAGE_HIDAPI and add depends on BR2_PACKAGE_HAS_UDEV (Thomas) --- package/openfpgaloader/Config.in | 14 ++++++++++++++ package/openfpgaloader/openfpgaloader.mk | 7 +++++++ 2 files changed, 21 insertions(+) diff --git a/package/openfpgaloader/Config.in b/package/openfpgaloader/Config.in index c998369bed..792ba918aa 100644 --- a/package/openfpgaloader/Config.in +++ b/package/openfpgaloader/Config.in @@ -10,6 +10,20 @@ config BR2_PACKAGE_OPENFPGALOADER https://github.com/trabucayre/openFPGALoader/ +if BR2_PACKAGE_OPENFPGALOADER + +config BR2_PACAKGE_OPENFPGALOADER_CMSIS + bool "CMSIS-DAP support" + depends on BR2_PACKAGE_HAS_UDEV + select BR2_PACKAGE_HIDAPI + help + openfpgaloader CMSIS-DAP support + +comment "openfpgaloader CMSIS-DAP needs udev /dev management" + depends on !BR2_PACKAGE_HAS_UDEV + +endif + comment "openfpgaloader needs a toolchain w/ threads, C++, gcc >= 4.9" depends on !BR2_TOOLCHAIN_HAS_THREADS || \ !BR2_INSTALL_LIBSTDCPP || \ diff --git a/package/openfpgaloader/openfpgaloader.mk b/package/openfpgaloader/openfpgaloader.mk index 73117cb994..0c39aad687 100644 --- a/package/openfpgaloader/openfpgaloader.mk +++ b/package/openfpgaloader/openfpgaloader.mk @@ -17,4 +17,11 @@ else OPENFPGALOADER_CONF_OPTS += -DENABLE_UDEV=OFF endif +ifeq ($(BR2_PACAKGE_OPENFPGALOADER_CMSIS),y) +OPENFPGALOADER_DEPENDENCIES += hidapi +OPENFPGALOADER_CONF_OPTS += -DENABLE_CMSISDAP=ON +else +OPENFPGALOADER_CONF_OPTS += -DENABLE_CMSISDAP=OFF +endif + $(eval $(cmake-package))