summaryrefslogtreecommitdiffstats
path: root/source/k/kernel-modules.SlackBuild
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2022-06-11 01:56:19 +0000
committer Eric Hameleers <alien@slackware.com>2022-06-11 07:00:11 +0200
commitfc0c0fd79b7d1b26b943062e3ed31327e01829cd (patch)
tree0d840f743d3d53e4492b4d4e0e0369a0c7ec4f98 /source/k/kernel-modules.SlackBuild
parent4932eebc956b5ec8edf05adfe2443d4671278b6f (diff)
downloadcurrent-fc0c0fd79b7d1b26b943062e3ed31327e01829cd.tar.gz
current-fc0c0fd79b7d1b26b943062e3ed31327e01829cd.tar.xz
Sat Jun 11 01:56:19 UTC 202220220611015619
a/kernel-firmware-20220610_7b71b75-noarch-1.txz: Upgraded. a/kernel-generic-5.18.3-x86_64-1.txz: Upgraded. a/kernel-huge-5.18.3-x86_64-1.txz: Upgraded. a/kernel-modules-5.18.3-x86_64-1.txz: Upgraded. d/gcc-12.1.0-x86_64-1.txz: Upgraded. d/gcc-brig-11.3.0-x86_64-1.txz: Removed. d/gcc-g++-12.1.0-x86_64-1.txz: Upgraded. d/gcc-gdc-12.1.0-x86_64-1.txz: Upgraded. d/gcc-gfortran-12.1.0-x86_64-1.txz: Upgraded. d/gcc-gnat-12.1.0-x86_64-1.txz: Upgraded. d/gcc-go-12.1.0-x86_64-1.txz: Upgraded. d/gcc-objc-12.1.0-x86_64-1.txz: Upgraded. d/kernel-headers-5.18.3-x86-1.txz: Upgraded. d/libtool-2.4.7-x86_64-2.txz: Rebuilt. Recompiled to update embedded GCC version number. k/kernel-source-5.18.3-noarch-1.txz: Upgraded. x/libX11-1.8.1-x86_64-1.txz: Upgraded. xap/blueman-2.2.5-x86_64-1.txz: Upgraded. isolinux/initrd.img: Rebuilt. kernels/*: Upgraded. usb-and-pxe-installers/usbboot.img: Rebuilt.
Diffstat (limited to 'source/k/kernel-modules.SlackBuild')
-rwxr-xr-xsource/k/kernel-modules.SlackBuild13
1 files changed, 12 insertions, 1 deletions
diff --git a/source/k/kernel-modules.SlackBuild b/source/k/kernel-modules.SlackBuild
index 8d0d48c4d..ff083c16a 100755
--- a/source/k/kernel-modules.SlackBuild
+++ b/source/k/kernel-modules.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2018, 2020 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2018, 2020, 2022 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -37,6 +37,13 @@ KERNEL_NAME=${KERNEL_NAME:-}
KERNEL_SOURCE=${KERNEL_SOURCE:-/usr/src/linux}
KERNEL_CONFIG=${KERNEL_CONFIG:-/usr/src/linux/.config}
BUILD=${BUILD:-1}
+
+# The CONFIG_DEBUG_INFO_BTF_MODULES option adds a huge amount of debugging
+# data to the modules which we don't actually need. We'll strip debugging
+# information from kernel modules by default. If you are building a debug
+# kernel and wish to retain this data, export the variable below set to "NO".
+STRIP_DEBUG=${STRIP_DEBUG:-YES}
+
if [ ! -r "${KERNEL_CONFIG}" ]; then
echo "Error: the KERNEL_CONFIG environment variable needs to be set to the"
echo ".config file to be used to build these modules. Example:"
@@ -109,6 +116,10 @@ fi
make $NUMJOBS modules || exit 1
echo "Installing kernel modules to $PKG..."
make INSTALL_MOD_PATH=$PKG modules_install || exit 1
+ if [ "$STRIP_DEBUG" = "YES" ]; then
+ echo "Stripping debug info from kernel modules..."
+ find $PKG -name "*.ko" -exec strip --strip-debug "{}" \;
+ fi
# Fix build and source symlinks if they are pointing into /tmp:
( cd $PKG/lib/modules/${VERSION}${LOCALVERSION}
for symlink in build source ; do