From patchwork Tue Mar 9 18:25:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Ziegler X-Patchwork-Id: 1450119 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=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (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 4Dw3Y65HbZz9sRR for ; Wed, 10 Mar 2021 05:25:27 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 5FB0346A5D; Tue, 9 Mar 2021 18:25:24 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id H9hQhURKKC8h; Tue, 9 Mar 2021 18:25:23 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id 86B7046B64; Tue, 9 Mar 2021 18:25:22 +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 13C0B1BF4D7 for ; Tue, 9 Mar 2021 18:25:21 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 031BF83E04 for ; Tue, 9 Mar 2021 18:25:21 +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 5RrLIJJaCkt1 for ; Tue, 9 Mar 2021 18:25:19 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0 Received: from serv15.avernis.de (serv15.avernis.de [176.9.89.163]) by smtp1.osuosl.org (Postfix) with ESMTPS id 9E96483DF7 for ; Tue, 9 Mar 2021 18:25:19 +0000 (UTC) Received: from webmail.serv15.avernis.de (ip6-localhost [IPv6:::1]) by serv15.avernis.de (Postfix) with ESMTPSA id 28B16C3C6D2A for ; Tue, 9 Mar 2021 19:25:17 +0100 (CET) MIME-Version: 1.0 Date: Tue, 09 Mar 2021 18:25:17 +0000 From: Andreas Ziegler To: buildroot@busybox.net User-Agent: Roundcube Webmail/1.4.11 Message-ID: <539abc1b8ea48daa694b45242cab63d0@umbiko.net> X-Sender: br015@umbiko.net X-Virus-Scanned: clamav-milter 0.102.4 at serv15.avernis.de X-Virus-Status: Clean Subject: [Buildroot] [PATCH 1/1] package/linux-firmware: fix build failure when no firmware item selected 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: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" The latest change in Linux firmware handling breaks the build if no specific firmware item is selected below BR2_PACKAGE_LINUX_FIRMWARE. The firmware archive is only created if at least one firmware sub-category is selected; the installation step wants to unpack the archive unconditionally. Use the same condition to control install command definition as in the build step. Signed-off-by: Andreas Ziegler mkdir -p $(1) $(TAR) xf $(@D)/br-firmware.tar -C $(1) @@ -695,5 +696,6 @@ endef define LINUX_FIRMWARE_INSTALL_IMAGES_CMDS $(call LINUX_FIRMWARE_INSTALL_FW, $(BINARIES_DIR)) endef +endif # LINUX_FIRMWARE_FILES || LINUX_FIRMWARE_DIRS $(eval $(generic-package)) diff --git a/package/linux-firmware/linux-firmware.mk b/package/linux-firmware/linux-firmware.mk index 5e92b0446e..5dfc4a657d 100644 --- a/package/linux-firmware/linux-firmware.mk +++ b/package/linux-firmware/linux-firmware.mk @@ -675,6 +675,7 @@ endif # sure we canonicalize the pointed-to file, to cover the symlinks of the form # a/foo -> ../b/foo where a/ (the directory where to put the symlink) does # not yet exist. +ifneq ($(LINUX_FIRMWARE_FILES)$(LINUX_FIRMWARE_DIRS),) define LINUX_FIRMWARE_INSTALL_FW