From patchwork Fri May 10 08:35:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcin Niestroj X-Patchwork-Id: 1097899 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.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=grinn-global.com Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 450k7F522Nz9sMM for ; Fri, 10 May 2019 18:35:37 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id AC93D86885; Fri, 10 May 2019 08:35:34 +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 3gVuF6_zmrx0; Fri, 10 May 2019 08:35:32 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 83578869AC; Fri, 10 May 2019 08:35:32 +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 A758D1BF4E7 for ; Fri, 10 May 2019 08:35:31 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id A4CC122B7A for ; Fri, 10 May 2019 08:35:31 +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 JlPw70E+6yaH for ; Fri, 10 May 2019 08:35:30 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from smtp.megiteam.pl (smtp.megiteam.pl [31.186.83.105]) by silver.osuosl.org (Postfix) with ESMTPS id EC851228E8 for ; Fri, 10 May 2019 08:35:29 +0000 (UTC) Received: from [95.143.241.142] (helo=localhost.localdomain) by smtp.megiteam.pl with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hP102-00017B-Je; Fri, 10 May 2019 10:35:27 +0200 From: Marcin Niestroj To: buildroot@buildroot.org Date: Fri, 10 May 2019 10:35:05 +0200 Message-Id: <20190510083505.1341-3-m.niestroj@grinn-global.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190510083505.1341-1-m.niestroj@grinn-global.com> References: <20190510083505.1341-1-m.niestroj@grinn-global.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v3 2/2] package/murata-cyw-fw: download NVRAM and BT_PATCH only when needed 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: Marcin Niestroj Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Do not download NVRAM and BT_PATCH repositories when selected modules do not require files from them. One of the example module is CYW4359, which has neither NVRAM nor BT_PATCH files. There is also drawback of this approach: NVRAM and BT_PATCH are not downloaded when package is being rebuilt with changed set selected modules, so the whole build fails because of missing files. Signed-off-by: Marcin Niestroj --- Changes v2 -> v3: add this patch package/murata-cyw-fw/murata-cyw-fw.mk | 29 ++++++++++++++++---------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/package/murata-cyw-fw/murata-cyw-fw.mk b/package/murata-cyw-fw/murata-cyw-fw.mk index 0196b47821..c0ada217af 100644 --- a/package/murata-cyw-fw/murata-cyw-fw.mk +++ b/package/murata-cyw-fw/murata-cyw-fw.mk @@ -8,21 +8,10 @@ MURATA_CYW_FW_VERSION = 8d87950bfad28c65926695b7357bd8995b60016a MURATA_CYW_FW_VERSION_NVRAM = d27f1bf105fa1e5b828e355793b88d4b66188411 MURATA_CYW_FW_VERSION_BT_PATCH = 748462f0b02ec4aeb500bedd60780ac51c37be31 MURATA_CYW_FW_SITE = $(call github,murata-wireless,cyw-fmac-fw,$(MURATA_CYW_FW_VERSION)) -MURATA_CYW_FW_EXTRA_DOWNLOADS = \ - $(call github,murata-wireless,cyw-fmac-nvram,$(MURATA_CYW_FW_VERSION_NVRAM))/cyw-fmac-nvram-$(MURATA_CYW_FW_VERSION_NVRAM).tar.gz \ - $(call github,murata-wireless,cyw-bt-patch,$(MURATA_CYW_FW_VERSION_BT_PATCH))/cyw-bt-patch-$(MURATA_CYW_FW_VERSION_BT_PATCH).tar.gz MURATA_CYW_FW_LICENSE = PROPRIETARY MURATA_CYW_FW_LICENSE_FILES = LICENCE.cypress MURATA_CYW_FW_REDISTRIBUTE = NO -define MURATA_CYW_FW_EXTRACT_NVRAM_PATCH - $(foreach tar, $(notdir $(MURATA_CYW_FW_EXTRA_DOWNLOADS)), \ - $(call suitable-extractor,$(tar)) $(MURATA_CYW_FW_DL_DIR)/$(tar) | \ - $(TAR) --strip-components=1 -C $(@D) $(TAR_OPTIONS) -$(sep) \ - ) -endef -MURATA_CYW_FW_POST_EXTRACT_HOOKS += MURATA_CYW_FW_EXTRACT_NVRAM_PATCH - MURATA_CYW_FW_FILES_$(BR2_PACKAGE_MURATA_CYW_FW_CYW43012) += \ brcmfmac43012-sdio.bin \ brcmfmac43012-sdio.1LV.clm_blob \ @@ -80,6 +69,24 @@ MURATA_CYW_FW_FILES_$(BR2_PACKAGE_MURATA_CYW_FW_CYW4359) += \ brcmfmac4359-pcie.bin \ brcmfmac4359-pcie.1FD.clm_blob +ifneq ($(findstring .txt,$(MURATA_CYW_FW_FILES_y)),) +MURATA_CYW_FW_EXTRA_DOWNLOADS += \ + $(call github,murata-wireless,cyw-fmac-nvram,$(MURATA_CYW_FW_VERSION_NVRAM))/cyw-fmac-nvram-$(MURATA_CYW_FW_VERSION_NVRAM).tar.gz +endif + +ifneq ($(findstring .hcd,$(MURATA_CYW_FW_FILES_y)),) +MURATA_CYW_FW_EXTRA_DOWNLOADS += \ + $(call github,murata-wireless,cyw-bt-patch,$(MURATA_CYW_FW_VERSION_BT_PATCH))/cyw-bt-patch-$(MURATA_CYW_FW_VERSION_BT_PATCH).tar.gz +endif + +define MURATA_CYW_FW_EXTRACT_NVRAM_PATCH + $(foreach tar, $(notdir $(MURATA_CYW_FW_EXTRA_DOWNLOADS)), \ + $(call suitable-extractor,$(tar)) $(MURATA_CYW_FW_DL_DIR)/$(tar) | \ + $(TAR) --strip-components=1 -C $(@D) $(TAR_OPTIONS) -$(sep) \ + ) +endef +MURATA_CYW_FW_POST_EXTRACT_HOOKS += MURATA_CYW_FW_EXTRACT_NVRAM_PATCH + # Helper that assumes filename with model has two dots (CHIP.MODEL.EXT), # but filename without model has only single dot (CHIP.EXT). murata-cyw-fw-strip-model = $(shell echo -n $(1) | sed 's/\..*\./\./')