From patchwork Tue Mar 29 09:48:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 5409 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4KSPsl1NzVz3wf7 for ; Tue, 29 Mar 2022 09:49:15 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4KSPsd43BZz4Wl; Tue, 29 Mar 2022 09:49:09 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4KSPsc18hsz302L; Tue, 29 Mar 2022 09:49:08 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4KSPsb1f11z2ynV for ; Tue, 29 Mar 2022 09:49:07 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4KSPsb1M9JzmV; Tue, 29 Mar 2022 09:49:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1648547347; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YTdAgnhSMpLllmipZQcrilGPS+eigcv7EkAek1xNuqw=; b=rcivN6E54QjVxfqrZO8ZaLDf5W475v52OgOdDXUVEFquns5N4dt0HDEbpchlGL/HCOMN8f N/mdWYcyRVcg9/xJPwPTY9FSSsciIST9eVr263bJH99TAicDGhMVRQxxl/22rGKWN0NaI8 KvBVQ5YsHoNEvklxV+jSYyXq6GFdkyIgk4u9/5jfSjYh9PUp7yiSvxw0vFLmD1EMkdgIOl Z1pRuWY3q89z7WeDZyfMwE7rtVCM4B3kscN5oC6M0Y4hJD1nNq1xMaEafZ37ZWTUNn2rKD Ics6sbC/Xp/vrRs/bIVDp5yKMh5uk+OHm2v2TQc0mYPZ3w4W0B8R7PiDR9bTuA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1648547347; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YTdAgnhSMpLllmipZQcrilGPS+eigcv7EkAek1xNuqw=; b=U3mNLIe4hrF6cHhPe6HBdV/6eJF7oFgdFY1dIntxwkhQ28nuDHc7YpRcgvy/mmgJP/ym7d Df3LDZwF7UbnmXDg== From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 5/5] linux-firmware: Hardlink any identical firmware files Date: Tue, 29 Mar 2022 09:48:56 +0000 Message-Id: <20220329094856.482837-5-michael.tremer@ipfire.org> In-Reply-To: <20220329094856.482837-1-michael.tremer@ipfire.org> References: <20220329094856.482837-1-michael.tremer@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Tremer Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Some files are identical which is why we don't need to ship them mutiple times. This will save about 13 MiB of disk space and presumably the same on the compressed distro image. Signed-off-by: Michael Tremer --- lfs/linux-firmware | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lfs/linux-firmware b/lfs/linux-firmware index b6268a318..244274126 100644 --- a/lfs/linux-firmware +++ b/lfs/linux-firmware @@ -78,5 +78,8 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) mv "$${file}" "$${file// /_}" || exit 1; \ done < <(find /lib/firmware -name "* *") + # Hardlink any identical files + hardlink -c -vv /lib/firmware + @rm -rf $(DIR_APP) @$(POSTBUILD)