Skip to content

Commit

Permalink
fix: strip kernel modules when installing
Browse files Browse the repository at this point in the history
See siderolabs/talos#6931

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
  • Loading branch information
smira committed Mar 23, 2023
1 parent c26b0b5 commit 5d77814
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion drbd/pkg.yaml
Expand Up @@ -24,7 +24,7 @@ steps:
cp /src/modules.builtin /rootfs/lib/modules/$(cat /src/include/config/kernel.release)/
cp /src/modules.builtin.modinfo /rootfs/lib/modules/$(cat /src/include/config/kernel.release)/
make -j $(nproc) -C /src M=$(pwd)/drbd modules_install DESTDIR=/rootfs INSTALL_MOD_PATH=/rootfs INSTALL_MOD_DIR=extras CONFIG_MODULE_SIG_ALL=y
make -j $(nproc) -C /src M=$(pwd)/drbd modules_install DESTDIR=/rootfs INSTALL_MOD_PATH=/rootfs INSTALL_MOD_DIR=extras INSTALL_MOD_STRIP=1 CONFIG_MODULE_SIG_ALL=y
test:
- |
# https://www.kernel.org/doc/html/v4.15/admin-guide/module-signing.html#signed-modules-and-stripping
Expand Down
2 changes: 1 addition & 1 deletion gasket-driver/pkg.yaml
Expand Up @@ -27,7 +27,7 @@ steps:
cp /src/modules.builtin /rootfs/lib/modules/$(cat /src/include/config/kernel.release)/
cp /src/modules.builtin.modinfo /rootfs/lib/modules/$(cat /src/include/config/kernel.release)/
make -C /src M=$(pwd)/src modules_install INSTALL_MOD_PATH=/rootfs INSTALL_MOD_DIR=extras
make -C /src M=$(pwd)/src modules_install INSTALL_MOD_PATH=/rootfs INSTALL_MOD_DIR=extras INSTALL_MOD_STRIP=1
test:
- |
# https://www.kernel.org/doc/html/v4.15/admin-guide/module-signing.html#signed-modules-and-stripping
Expand Down
2 changes: 1 addition & 1 deletion kernel/kernel/pkg.yaml
Expand Up @@ -33,7 +33,7 @@ steps:
esac
export KERNELRELEASE=$(cat include/config/kernel.release)
make -j $(nproc) modules_install DEPMOD=/toolchain/bin/depmod INSTALL_MOD_PATH=/rootfs
make -j $(nproc) modules_install DEPMOD=/toolchain/bin/depmod INSTALL_MOD_PATH=/rootfs INSTALL_MOD_STRIP=1
depmod -b /rootfs $KERNELRELEASE
unlink /rootfs/lib/modules/$KERNELRELEASE/build
unlink /rootfs/lib/modules/$KERNELRELEASE/source
Expand Down
2 changes: 1 addition & 1 deletion nonfree/kmod-nvidia/pkg.yaml
Expand Up @@ -41,7 +41,7 @@ steps:
cp /src/modules.builtin /rootfs/lib/modules/$(cat /src/include/config/kernel.release)/
cp /src/modules.builtin.modinfo /rootfs/lib/modules/$(cat /src/include/config/kernel.release)/
make -j $(nproc) modules_install SYSSRC=/src DEPMOD=/toolchain/bin/depmod INSTALL_MOD_PATH=/rootfs INSTALL_MOD_DIR=extras
make -j $(nproc) modules_install SYSSRC=/src DEPMOD=/toolchain/bin/depmod INSTALL_MOD_PATH=/rootfs INSTALL_MOD_DIR=extras INSTALL_MOD_STRIP=1
finalize:
- from: /rootfs
to: /
2 changes: 1 addition & 1 deletion nvidia-open-gpu-kernel-modules/pkg.yaml
Expand Up @@ -30,7 +30,7 @@ steps:
cp /src/modules.builtin /rootfs/lib/modules/$(cat /src/include/config/kernel.release)/
cp /src/modules.builtin.modinfo /rootfs/lib/modules/$(cat /src/include/config/kernel.release)/
make -j $(nproc) modules_install SYSSRC=/src DEPMOD=/toolchain/bin/depmod INSTALL_MOD_PATH=/rootfs
make -j $(nproc) modules_install SYSSRC=/src DEPMOD=/toolchain/bin/depmod INSTALL_MOD_PATH=/rootfs INSTALL_MOD_STRIP=1
test:
- |
# https://www.kernel.org/doc/html/v4.15/admin-guide/module-signing.html#signed-modules-and-stripping
Expand Down

0 comments on commit 5d77814

Please sign in to comment.