Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
distribution kernel - change file names
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
vwegert
n00b
n00b


Joined: 12 Mar 2005
Posts: 31
Location: Germany

PostPosted: Thu Aug 11, 2022 9:39 am    Post subject: distribution kernel - change file names Reply with quote

Hi all,

For a new system, I'm currently trying distribution kernels instead of genkernel. In my genkernel setup, I'm using KERNEL_FILENAME and KERNEL_SYMLINK_FILENAME (a "production" and a "maintenance" installation sharing the same boot partition - this is used to keep the files separated). Is there a similar facility when using distribution kernels? I've not been able to find anything so far...

Thanks
Volker
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 4001
Location: Rasi, Finland

PostPosted: Thu Aug 11, 2022 10:05 am    Post subject: Reply with quote

I don't think there is such feature implemented.

I'd use it too. Especially with /etc/kernel/config.d way of altering kernel config.

My preferred way would be /etc/kernel/config.d/<kernel name suffix>/.
Config file "patches" at the root of /etc/kernel/config.d would be used by all builds.
This should be possible by altering the ebuild only. Maybe this is a place to raise a FEATURE bug against distribution kernel ebuilds..?
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
vwegert
n00b
n00b


Joined: 12 Mar 2005
Posts: 31
Location: Germany

PostPosted: Thu Aug 11, 2022 11:00 am    Post subject: Reply with quote

I've created https://bugs.gentoo.org/864897 for this...
Back to top
View user's profile Send private message
vwegert
n00b
n00b


Joined: 12 Mar 2005
Posts: 31
Location: Germany

PostPosted: Sun Dec 08, 2024 4:32 pm    Post subject: Reply with quote

The bug has been closed as WONTFIX with the following comment:

Quote:
Two ways this could be done:
- A hook for sys-kernel/installkernel as sam suggested, this could recognize the KERNEL_FILENAME and KERNEL_SYMLINK_FILENAME environment variables and rename the just-installed kernel accordingly, or
- Compiling two different kernels with a different value for CONFIG_LOCALVERSION, the LOCALVERSION is appended to the regular kernel version and is respected by sys-kernel/installkernel.

IMO this level of customization does not need an ebuild/eclass solution and it is already possible to do this. So I feel this is a WONTFIX.


I'll have to read into the installkernel logic for this, unless someone happens to have a working example...
Back to top
View user's profile Send private message
Nowa
Developer
Developer


Joined: 25 Jun 2014
Posts: 478
Location: Nijmegen

PostPosted: Sun Dec 08, 2024 9:09 pm    Post subject: Reply with quote

vwegert wrote:
I'll have to read into the installkernel logic for this, unless someone happens to have a working example...


The working example *is* the installkernel scripts from sys-kernel/installkernel:
For OpenRC systems: https://github.com/projg2/installkernel-gentoo/blob/master/installkernel (installed as /sbin/installkernel, calls postinst hooks from /etc/kernel/postinst.d)
For systemd systems: https://github.com/projg2/installkernel-gentoo/blob/master/hooks/systemd/90-compat.install (installed in /usr/lib/kernel/install.d, fork it into /etc/kernel/install.d)

Change the kernel names as desired and maybe add some loops and that's it.
_________________
OS: Gentoo 6.10.12-gentoo-dist, ~amd64, 23.0/desktop/plasma/systemd
MB: MSI Z370-A PRO
CPU: Intel Core i9-9900KS
GPU: Intel Arc A770 16GB & Intel UHD Graphics 630
SSD: Samsung 970 EVO Plus 2 TB
RAM: Crucial Ballistix 32GB DDR4-2400
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