View previous topic :: View next topic |
Author |
Message |
luna80 Veteran
Joined: 01 Feb 2004 Posts: 1546 Location: switzerland
|
Posted: Tue Dec 05, 2023 8:38 am Post subject: [solved] directly nvidia-driver kernel signing |
|
|
Hi,
I want to know if there is a way to automatically sign nvidia-drivers in the kernel...I try to explain me better.
Every time there is a kernel update (I use gentoo-sources) I have to sign nvidia-drivers with this little script I made and launch it manually when reboot in new kernel
Code: | #!/bin/bash
/usr/src/linux/scripts/sign-file sha512 /usr/src/linux/certs/signing_key.pem /usr/src/linux/certs/signing_key.x509 /lib/modules/$(uname -r)/video/nvidia.ko
/usr/src/linux/scripts/sign-file sha512 /usr/src/linux/certs/signing_key.pem /usr/src/linux/certs/signing_key.x509 /lib/modules/$(uname -r)/video/nvidia-drm.ko
/usr/src/linux/scripts/sign-file sha512 /usr/src/linux/certs/signing_key.pem /usr/src/linux/certs/signing_key.x509 /lib/modules/$(uname -r)/video/nvidia-modeset.ko
/usr/src/linux/scripts/sign-file sha512 /usr/src/linux/certs/signing_key.pem /usr/src/linux/certs/signing_key.x509 /lib/modules/$(uname -r)/video/nvidia-peermem.ko
/usr/src/linux/scripts/sign-file sha512 /usr/src/linux/certs/signing_key.pem /usr/src/linux/certs/signing_key.x509 /lib/modules/$(uname -r)/video/nvidia-uvm.ko |
There is other way to avoid to do that every kernel update?
Thanks a lot in advance! _________________ *** !f j00 c4n r34D tH15 tH3N j00 n33D t0 l0g Off ***
Last edited by luna80 on Sun Dec 10, 2023 6:26 am; edited 1 time in total |
|
Back to top |
|
|
Ionen Developer
Joined: 06 Dec 2018 Posts: 2720
|
Posted: Tue Dec 05, 2023 8:54 am Post subject: |
|
|
Have you tried USE=modules-sign on nvidia-drivers? (this is new'ish, was added in late May 2023 and is available on all out-of-tree modules packages that migrated to the new eclass)
On a kernel built using gentoo-sources with kernel signing defaults, enabling it should in theory just work without doing anything special. If not and you're doing more custom things, then you may want to look at linux-mod-r1.eclass' user variables. |
|
Back to top |
|
|
luna80 Veteran
Joined: 01 Feb 2004 Posts: 1546 Location: switzerland
|
Posted: Tue Dec 05, 2023 5:54 pm Post subject: |
|
|
Thanks a lot!
I'll try with the use flag modules-sign, I didn't know it. _________________ *** !f j00 c4n r34D tH15 tH3N j00 n33D t0 l0g Off *** |
|
Back to top |
|
|
luna80 Veteran
Joined: 01 Feb 2004 Posts: 1546 Location: switzerland
|
Posted: Sun Dec 10, 2023 6:26 am Post subject: |
|
|
I updated today the kernel and I can confirm that the use flag modules-sign on the package nvidia-drivers works perfeclty
Thanks a lot Ionen _________________ *** !f j00 c4n r34D tH15 tH3N j00 n33D t0 l0g Off *** |
|
Back to top |
|
|
|