Skip to content

Commit

Permalink
manually sign kernel modules
Browse files Browse the repository at this point in the history
  • Loading branch information
itsManjeet committed Jul 30, 2024
1 parent 6259d03 commit a0b80c2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions elements/components/nvidia.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ script: |-
make KERNEL_UNAME=$KERNEL_VERSION modules
make -j1 modules_install INSTALL_MOD_PATH=%{install-root}%{prefix} KERNEL_UNAME=$KERNEL_VERSION
openssl x509 -inform PEM -outform DER -in linux-module-cert.crt -out linux-module-cert.cer
find '%{install-root}%{libdir}/modules' -type f -name "*.ko" -exec sign-file sha512 linux-module-cert.key linux-module-cert.cer {} ';' -exec xz --lzma2=dict=2MiB {} ';'
openssl x509 -inform PEM -outform DER -in %{build-root}/linux-module-cert.crt -out linux-module-cert.cer
find '%{install-root}%{libdir}/modules' -type f -name "*.ko" -exec %{libdir}/modules/${KERNEL_VERSION}/source/scripts/sign-file sha512 %{build-root}/linux-module-cert.key linux-module-cert.cer {} ';' -exec xz --lzma2=dict=2MiB {} ';'
cd ..
tar -xf nvidia-persistenced-init.tar.bz2
Expand Down
4 changes: 3 additions & 1 deletion elements/kernel/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8522,14 +8522,16 @@ script: |-
# end of Kernel hacking
make olddefconfig
make ${MAKEFLAGS}
make -j1 INSTALL_MOD_PATH='%{install-root}/%{prefix}' DEPMOD=/bin/true modules_install
release=$(make -s kernelrelease)
image_name=$(make -s image_name)
openssl x509 -inform PEM -outform DER -in linux-module-cert.crt -out linux-module-cert.cer
find '%{install-root}%{libdir}/modules' -type f -name "*.ko" -exec sign-file sha512 linux-module-cert.key linux-module-cert.cer {} ';' -exec xz --lzma2=dict=2MiB {} ';'
find '%{install-root}%{libdir}/modules' -type f -name "*.ko" -exec ./scripts/sign-file sha512 linux-module-cert.key linux-module-cert.cer {} ';' -exec xz --lzma2=dict=2MiB {} ';'
install -Dm644 -t %{install-root}/%{libdir}/modules/${release} ${image_name}
install -Dm644 -t %{install-root}/%{libdir}/modules/${release} System.map
Expand Down

0 comments on commit a0b80c2

Please sign in to comment.