View previous topic :: View next topic |
Author |
Message |
setan n00b
Joined: 21 Feb 2024 Posts: 65
|
Posted: Tue Mar 12, 2024 2:03 pm Post subject: Naming a custom kernel |
|
|
Hi everyone!
i have managed to build my own kernel! (I was trying in https://forums.gentoo.org/viewtopic-t-1167661.html previously).
I have given my kernel a custom name, but i only get
Code: | $ uname -r
6.6.21-gentoo-gentoo-sources
|
this weird naming.
I think i got the CONFIG_LOCALVERSION="-r3" right, but I do not now what to with CONFIG_DEFAULT_HOSTNAME. Is it just the default file for /etc/hostname?
How can I remove double "gentoo" from my config and customize the name? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54258 Location: 56N 3W
|
Posted: Tue Mar 12, 2024 2:54 pm Post subject: |
|
|
setan,
I think we touched o the double gentoo is you previous topic.
The Makefile provides
Code: | # SPDX-License-Identifier: GPL-2.0
VERSION = 6
PATCHLEVEL = 7
SUBLEVEL = 6
EXTRAVERSION = -gentoo
NAME = Hurr durr I'ma ninja sloth |
That's 6.7 from Linus SUBLEVEL =6 from Greg/Sasha, for 6.7.6 and -gentoo from Gentoo.
That's gets you 6.7.6-gentoo.
You will have set CONFIG_LOCALVERSION="gentoo-sources" in the kernel configuration file, so in all concatenated together for the final kernel name. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
CaptainBlood Advocate
Joined: 24 Jan 2010 Posts: 3628
|
Posted: Tue Mar 12, 2024 3:42 pm Post subject: |
|
|
As a example: Code: | amd64 /usr/src/linux-6.8.0-gentoo-std # uname -r
6.8.0-gentoo-std
amd64 /usr/src/linux-6.8.0-gentoo-std # head -6 Makefile
# SPDX-License-Identifier: GPL-2.0
VERSION = 6
PATCHLEVEL = 8
SUBLEVEL = 0
EXTRAVERSION = -gentoo
NAME = Hurr durr I'ma ninja sloth
amd64 /usr/src/linux-6.8.0-gentoo-std # grep "\-std" .config
CONFIG_LOCALVERSION="-std" | Thks 4 ur attention, interest & support. _________________ USE="-* ..." in /etc/portage/make.conf here.
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. " |
|
Back to top |
|
|
setan n00b
Joined: 21 Feb 2024 Posts: 65
|
Posted: Tue Mar 12, 2024 5:44 pm Post subject: |
|
|
@NeddySeagoon,
> I think we touched o the double gentoo is you previous topic.
That's true. I did not think that this would be in the makefile...
Thank you both, this explains this in detail.
Now, do you think that having multiple custom kernels (like linux-zen and normal linux)?
Is it even doable? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54258 Location: 56N 3W
|
Posted: Tue Mar 12, 2024 5:52 pm Post subject: |
|
|
setan,
Yes. They will have different names. If they don't CONFIG_LOCALVERSION is yours to play with when you configure the kernel.
You can edit the names in the Makefile if you wish but you need to do that every version bump, so that should be avoided.
The kernel knows its own modules by the full name. Look in /lib/modules.
You will have a 6.6.21-gentoo-gentoo-sources/ dir there. Well, you will if you have any kernel modules. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
CaptainBlood Advocate
Joined: 24 Jan 2010 Posts: 3628
|
Posted: Tue Mar 12, 2024 6:23 pm Post subject: |
|
|
Doing it on a regular basis: Code: | amd64 /usr/src # ls
total 344
lrwxr-xr-x 1 root root 22 mars 12 15:06 linux -> linux-6.8.0-gentoo-std
drwxr-xr-x 25 root root 4096 sept. 17 08:25 linux-4.14.320-gentoo
drwxr-xr-x 3 root root 4096 juil. 7 2023 linux-4.14.320-gentoo-classic
drwxr-xr-x 6 root root 4096 août 22 2023 linux-4.14.320-gentoo-rt
drwxr-xr-x 26 root root 4096 août 27 2023 linux-4.19.292-gentoo
drwxr-xr-x 3 root root 4096 août 27 2023 linux-4.19.292-gentoo-classic
drwxr-xr-x 3 root root 4096 août 27 2023 linux-4.19.292-gentoo-rt
drwxr-xr-x 27 root root 4096 déc. 1 19:34 linux-4.19.294-gentoo
drwxr-xr-x 25 root root 4096 oct. 18 2022 linux-4.4.302-gentoo
drwxr-xr-x 25 root root 4096 oct. 18 2022 linux-4.9.319-gentoo
drwxr-xr-x 26 root root 4096 mars 2 11:24 linux-5.10.210-gentoo
drwxr-xr-x 3 root root 4096 mars 2 10:42 linux-5.10.210-gentoo-classic
drwxr-xr-x 3 root root 4096 mars 2 10:59 linux-5.10.210-gentoo-iptables
drwxr-xr-x 3 root root 4096 mars 2 11:23 linux-5.10.210-gentoo-rt
-rw-r--r-- 1 root root 136636 sept. 17 15:50 linux-5.15.102-gentoo
drwxr-xr-x 3 root root 4096 sept. 17 15:50 linux-5.15.102-gentoo-isoipwire
drwxr-xr-x 26 root root 4096 nov. 9 17:54 linux-5.15.137_p78-clear
drwxr-xr-x 26 root root 4096 déc. 24 17:20 linux-5.15.144_p85-clear
drwxr-xr-x 26 root root 4096 févr. 28 20:22 linux-5.15.147-gentoo
drwxr-xr-x 3 root root 4096 janv. 22 06:32 linux-5.15.147-gentoo-classic
drwxr-xr-x 3 root root 4096 janv. 22 07:18 linux-5.15.147-gentoo-iptables
drwxr-xr-x 3 root root 4096 févr. 28 20:16 linux-5.15.147-gentoo-kpatch
drwxr-xr-x 3 root root 4096 févr. 28 20:08 linux-5.15.147-gentoo-r8168
drwxr-xr-x 3 root root 4096 janv. 22 05:47 linux-5.15.147-gentoo-rt
drwxr-xr-x 26 root root 4096 févr. 20 20:35 linux-5.15.148-gentoo
drwxr-xr-x 25 root root 4096 déc. 6 15:29 linux-5.4.257-gentoo
drwxr-xr-x 3 root root 4096 déc. 6 03:16 linux-5.4.257-gentoo-classic
drwxr-xr-x 3 root root 4096 déc. 6 04:01 linux-5.4.257-gentoo-iptables
drwxr-xr-x 3 root root 4096 déc. 6 14:59 linux-5.4.257-gentoo-rt
drwxr-xr-x 24 root root 4096 oct. 15 2022 linux-5.8.0
drwxr-xr-x 25 root root 4096 oct. 3 2021 linux-5.8.0-gentoo
drwxr-xr-x 24 root root 4096 juil. 8 2020 linux-5.8.0-lto
drwxr-xr-x 24 root root 4096 oct. 7 2021 linux-5.8.0-lto-experimental
drwxr-xr-x 25 root root 4096 mai 4 2022 linux-5.8.0-lto-experimental-classic
drwxr-xr-x 27 root root 4096 févr. 11 14:25 linux-6.1.77-gentoo
drwxr-xr-x 3 root root 4096 févr. 11 13:33 linux-6.1.77-gentoo-classic
drwxr-xr-x 3 root root 4096 févr. 11 13:51 linux-6.1.77-gentoo-iptables
drwxr-xr-x 3 root root 4096 févr. 11 14:24 linux-6.1.77-gentoo-rt
drwxr-xr-x 3 root root 4096 févr. 11 14:09 linux-6.1.77-gentoo-rv
drwxr-xr-x 27 root root 4096 mars 8 20:14 linux-6.6.18-gentoo
drwxr-xr-x 3 root root 4096 févr. 28 12:52 linux-6.6.18-gentoo-rt
drwxr-xr-x 3 root root 4096 févr. 28 17:01 linux-6.6.18-gentoo-rv
drwxr-xr-x 3 root root 4096 mars 8 20:12 linux-6.6.18-gentoo-std
drwxr-xr-x 27 root root 4096 mars 12 15:10 linux-6.7.9-gentoo
drwxr-xr-x 3 root root 4096 mars 7 14:27 linux-6.7.9-gentoo-kpatch
drwxr-xr-x 3 root root 4096 mars 9 03:10 linux-6.7.9-gentoo-r8169
drwxr-xr-x 3 root root 4096 mars 7 13:50 linux-6.7.9-gentoo-rv
drwxr-xr-x 3 root root 4096 mars 12 15:10 linux-6.7.9-gentoo-std
drwxr-xr-x 27 root root 4096 mars 12 02:45 linux-6.8.0-gentoo
drwxr-xr-x 3 root root 4096 mars 11 13:52 linux-6.8.0-gentoo-kpatch
drwxr-xr-x 3 root root 4096 mars 11 04:13 linux-6.8.0-gentoo-r8169
drwxr-xr-x 3 root root 4096 mars 12 01:09 linux-6.8.0-gentoo-rt
drwxr-xr-x 3 root root 4096 mars 11 13:33 linux-6.8.0-gentoo-rv
drwxr-xr-x 3 root root 4096 mars 11 17:46 linux-6.8.0-gentoo-std |
Directories ending with gentoo are untouched ebuilds.
gentoo-xxx are just directories for .config with CONFIG_LOCALVERSION="-xxx" set & a few other files.
Using home brewed scripts to bring .config to the matching gentoo-sources directory to do whatever I need.
home brewed script to also migrate existing gentoo-xxxx/.config ro new genoo-yyyy/.config, make & install
Mainly gentoo-sources here. But this is not required once scripts are well set.
As modules are concerned, linux-6.8.0-gentoo-std modules will be in /lib/modules/6.8.0-gentoo-std because of CONFIG_LOCALVERSION="-std"
Thks 4 ur attention, interest & support. _________________ USE="-* ..." in /etc/portage/make.conf here.
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. " |
|
Back to top |
|
|
|