From patchwork Sat Jul 31 20:38:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Nosthoff X-Patchwork-Id: 1511957 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.133; helo=smtp2.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=heine.tech header.i=@heine.tech header.a=rsa-sha256 header.s=dkim header.b=b9nRCfA2; dkim-atps=neutral Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (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 ozlabs.org (Postfix) with ESMTPS id 4Gcbjf20bRz9sS8 for ; Sun, 1 Aug 2021 06:39:50 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id EC778400C3; Sat, 31 Jul 2021 20:39:47 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9yfgZ6FdsMJx; Sat, 31 Jul 2021 20:39:46 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id CF0F8400F1; Sat, 31 Jul 2021 20:39:45 +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 02D201BF34F for ; Sat, 31 Jul 2021 20:39:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id E6DA583267 for ; Sat, 31 Jul 2021 20:39:34 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp1.osuosl.org (amavisd-new); dkim=pass (1024-bit key) header.d=heine.tech 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 KqeJSHUXQlhA for ; Sat, 31 Jul 2021 20:39:34 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0 Received: from mail.heine.tech (mail.heine.tech [195.201.24.99]) by smtp1.osuosl.org (Postfix) with ESMTPS id 3A16D831C1 for ; Sat, 31 Jul 2021 20:39:34 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 09F921827C5; Sat, 31 Jul 2021 22:39:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heine.tech; s=dkim; t=1627763970; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=SRa8FhQ2GnEHkS+Qa76ebtZKzcsDugO9VetdMJVsPjI=; b=b9nRCfA2MYD8Pd4HKWNiydHLxGPifq4c4Rweh2TUaxfgr0tEuORtouDbKBu6yz0JL7OgB7 gZ8mN5TPqWoJjnnErLmH/fJjm/KgaNob/yXWrS+b9YJmowqUgCFD9MmI6LIC2WM5/8Wfk1 ImfZMXpfLxvPo+W4DXjYv5u6SD9POkM= To: buildroot@buildroot.org Date: Sat, 31 Jul 2021 22:38:03 +0200 Message-Id: <20210731203814.68125-2-buildroot@heine.tech> In-Reply-To: <20210731203814.68125-1-buildroot@heine.tech> References: <20210731203814.68125-1-buildroot@heine.tech> MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.2 Subject: [Buildroot] [PATCH 01/10] package/bluez5_utils: make tools optional 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: , From: Michael Nosthoff via buildroot Reply-To: Michael Nosthoff Cc: Michael Nosthoff , "Yann E . MORIN" , Thomas Petazzoni , Marcin Bis Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" The tools are currently always build and installed. In many cases those tools are not needed in a production system. So make this step optional. This saves up to 2MB on the target. Further tweak the deprecated option. It has effects when the --enable-tools is set as well as when --enable-client is set. So explain this in the options description and update the install step for gatttool to only be added when client is enabled. Signed-off-by: Michael Nosthoff --- package/bluez5_utils/Config.in | 16 +++++++++++++--- package/bluez5_utils/bluez5_utils.mk | 13 +++++++++++-- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/package/bluez5_utils/Config.in b/package/bluez5_utils/Config.in index 40973e13cd..30e70fa03f 100644 --- a/package/bluez5_utils/Config.in +++ b/package/bluez5_utils/Config.in @@ -43,13 +43,23 @@ config BR2_PACKAGE_BLUEZ5_UTILS_MONITOR help Build monitor utility btmon. +config BR2_PACKAGE_BLUEZ5_UTILS_TOOLS + bool "build tools" + help + Build tools like bluemoon, btattach, hex2hcd, l2test, + l2ping, mpris-proxy, rctest. + config BR2_PACKAGE_BLUEZ5_UTILS_DEPRECATED bool "install deprecated tools" - depends on BR2_PACKAGE_BLUEZ5_UTILS_CLIENT + depends on BR2_PACKAGE_BLUEZ5_UTILS_CLIENT || BR2_PACKAGE_BLUEZ5_UTILS_TOOLS help - Build deprecated tools. These currently include: + Build deprecated tools. + + When "build tools" is selected these tools are installed: hciattach, hciconfig, hcitool, hcidump, rfcomm, sdptool, - ciptool, gatttool. + ciptool. + + When CLI client is enabled "gatttool" is installed. config BR2_PACKAGE_BLUEZ5_UTILS_EXPERIMENTAL bool "build experimental tools" diff --git a/package/bluez5_utils/bluez5_utils.mk b/package/bluez5_utils/bluez5_utils.mk index 3551b14a69..5f5a7f44c9 100644 --- a/package/bluez5_utils/bluez5_utils.mk +++ b/package/bluez5_utils/bluez5_utils.mk @@ -20,7 +20,6 @@ BLUEZ5_UTILS_DEPENDENCIES = \ libglib2 BLUEZ5_UTILS_CONF_OPTS = \ - --enable-tools \ --enable-library \ --disable-cups \ --disable-manpages \ @@ -46,6 +45,12 @@ else BLUEZ5_UTILS_CONF_OPTS += --disable-monitor endif +ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_TOOLS),y) +BLUEZ5_UTILS_CONF_OPTS += --enable-tools +else +BLUEZ5_UTILS_CONF_OPTS += --disable-tools +endif + # experimental plugins ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_EXPERIMENTAL),y) BLUEZ5_UTILS_CONF_OPTS += --enable-experimental @@ -125,12 +130,16 @@ else BLUEZ5_UTILS_CONF_OPTS += --disable-sixaxis endif -# install gatttool (For some reason upstream choose not to do it by default) ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_DEPRECATED),y) +# install gatttool (For some reason upstream choose not to do it by default) +# gattool depends on the client for readline +ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_CLIENT),y) define BLUEZ5_UTILS_INSTALL_GATTTOOL $(INSTALL) -D -m 0755 $(@D)/attrib/gatttool $(TARGET_DIR)/usr/bin/gatttool endef BLUEZ5_UTILS_POST_INSTALL_TARGET_HOOKS += BLUEZ5_UTILS_INSTALL_GATTTOOL +endif + # hciattach_bcm43xx defines default firmware path in `/etc/firmware`, but # Broadcom firmware blobs are usually located in `/lib/firmware`. BLUEZ5_UTILS_CONF_ENV += \