From patchwork Thu Jan 9 15:08:22 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 8388 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 (secp384r1) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "R11" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4YTSpl08lsz3x5M for ; Thu, 9 Jan 2025 15:08:31 +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 RSA-PSS (4096 bits) client-signature ECDSA (secp384r1)) (Client CN "mail02.haj.ipfire.org", Issuer "E5" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4YTSph5JdDz1FV; Thu, 9 Jan 2025 15:08:28 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4YTSph2cHkz33GG; Thu, 9 Jan 2025 15:08:28 +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 (secp384r1) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "R11" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4YTSpf3X33z2yWL for ; Thu, 9 Jan 2025 15:08:26 +0000 (UTC) Received: from michael.haj.ipfire.org (michael.haj.ipfire.org [172.28.1.242]) (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 client-signature ECDSA (secp384r1) client-digest SHA384) (Client CN "michael.haj.ipfire.org", Issuer "E5" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4YTSpd5W5HzJD; Thu, 9 Jan 2025 15:08:25 +0000 (UTC) Received: by michael.haj.ipfire.org (Postfix, from userid 0) id 4YTSpd4DJnzTkCl; Thu, 9 Jan 2025 15:08:25 +0000 (UTC) From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH] kernel: Strip modules Date: Thu, 9 Jan 2025 15:08:22 +0000 Message-Id: <20250109150822.3111295-1-michael.tremer@ipfire.org> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 Message-ID-Hash: T5EMPIKPNULT5XW5XQ4EFFUUR5TOSJDF X-Message-ID-Hash: T5EMPIKPNULT5XW5XQ4EFFUUR5TOSJDF X-MailFrom: root@michael.haj.ipfire.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Michael Tremer X-Mailman-Version: 3.3.8 Precedence: list List-Id: IPFire development talk Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The kernel does not strip modules by default. This can be enabled by passing INSTALL_MOD_STRIP=1 when installing the modules. Since we are not actually building the kernel with debuginfo and we are comressing the modules afterwards, there is not a huge saving on disk space, but there is a small saving of memory when loading the modules. Signed-off-by: Michael Tremer --- lfs/linux | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lfs/linux b/lfs/linux index c081e89bf..88a04f90e 100644 --- a/lfs/linux +++ b/lfs/linux @@ -168,7 +168,7 @@ else cd $(DIR_APP) && cp -v arch/$(KERNEL_ARCH)/boot/$(KERNEL_TARGET) /boot/vmlinuz-$(KVER) cd $(DIR_APP) && cp -v System.map /boot/System.map-$(KVER) cd $(DIR_APP) && cp -v .config /boot/config-$(KVER) - cd $(DIR_APP) && make $(MAKETUNING) modules_install + cd $(DIR_APP) && make $(MAKETUNING) modules_install INSTALL_MOD_STRIP=1 ifneq "$(BUILD_PLATFORM)" "x86" cd $(DIR_APP) && make $(MAKETUNING) dtbs