Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] directly nvidia-driver kernel signing
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
luna80
Veteran
Veteran


Joined: 01 Feb 2004
Posts: 1546
Location: switzerland

PostPosted: Tue Dec 05, 2023 8:38 am    Post subject: [solved] directly nvidia-driver kernel signing Reply with quote

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
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2720

PostPosted: Tue Dec 05, 2023 8:54 am    Post subject: Reply with quote

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
View user's profile Send private message
luna80
Veteran
Veteran


Joined: 01 Feb 2004
Posts: 1546
Location: switzerland

PostPosted: Tue Dec 05, 2023 5:54 pm    Post subject: Reply with quote

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
View user's profile Send private message
luna80
Veteran
Veteran


Joined: 01 Feb 2004
Posts: 1546
Location: switzerland

PostPosted: Sun Dec 10, 2023 6:26 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum