View previous topic :: View next topic |
Author |
Message |
user7719 n00b
Joined: 19 Feb 2021 Posts: 73
|
|
Back to top |
|
|
eschwartz Developer
Joined: 29 Oct 2023 Posts: 214
|
Posted: Fri Aug 09, 2024 4:25 pm Post subject: |
|
|
Yes, it really and truly is that simple. |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5091 Location: Bavaria
|
Posted: Fri Aug 09, 2024 9:12 pm Post subject: |
|
|
user7719,
Enabling (or disabling) configuration options for the kernel configuration is not as easy as you think, because many options depends on other options. I strongly recommend to do:
1. emerge gentoo-sources (No, you dont must use this; it is only for checking of parameters)
2. cd into /usr/src/linux-X-Y-Z-gentoo
3. make menuconfig
4. Hit the / key
5. Search for I8K (a leading CONFIG_ is not necessary)
6. Check the output - especially lines which begins with "Selects:" and "Depends on:"
=>
I have gotten this on my machine:
Code: | Depends on: HWMON [=y] && SENSORS_DELL_SMM [=n] && PROC_FS [=y] |
If you WOULD configure your kernel completely in "make menuconfig" you WOULD NOT be able to enable I8K BEFORE you enable SENSORS_DELL_SMM - you will find in:
> Device Drivers
-> Hardware Monitoring support (HWMON [=y])
-> Dell laptop SMM BIOS hwmon driver (SENSORS_DELL_SMM [=n])
So you must first enable this, and then you would be able to enable I8K:
-> Device Drivers
-> Hardware Monitoring support (HWMON [=y])
-> Dell laptop SMM BIOS hwmon driver (SENSORS_DELL_SMM [=n])
-> Legacy /proc/i8k interface of Dell laptop SMM BIOS hwmon driver (I8K [=n])
No comes the bad news: If you want configure your kernel BY EDITING the .config you MUST ensure that all dependencies are configured correctly !!
Ask why our best experts always advise never to configure the kernel by editing the .config file:
https://forums.gentoo.org/viewtopic-p-8686380.html#8686380
So: You must check your current kernel configuration IF all 3 options are enabled by default ... and IF NOT then you must alos enable the missing options ... AND NOW ... you must check if there are dependencies for these 3 missing options ... yes, this can go many rounds ...
. _________________ https://wiki.gentoo.org/wiki/User:Pietinger |
|
Back to top |
|
|
user7719 n00b
Joined: 19 Feb 2021 Posts: 73
|
Posted: Sat Aug 10, 2024 8:40 pm Post subject: |
|
|
pietinger wrote: | user7719,
Enabling (or disabling) configuration options for the kernel configuration is not as easy as you think, because many options depends on other options. I strongly recommend to do:
1. emerge gentoo-sources (No, you dont must use this; it is only for checking of parameters)
2. cd into /usr/src/linux-X-Y-Z-gentoo
3. make menuconfig
4. Hit the / key
5. Search for I8K (a leading CONFIG_ is not necessary)
6. Check the output - especially lines which begins with "Selects:" and "Depends on:"
=>
I have gotten this on my machine:
Code: | Depends on: HWMON [=y] && SENSORS_DELL_SMM [=n] && PROC_FS [=y] |
If you WOULD configure your kernel completely in "make menuconfig" you WOULD NOT be able to enable I8K BEFORE you enable SENSORS_DELL_SMM - you will find in:
> Device Drivers
-> Hardware Monitoring support (HWMON [=y])
-> Dell laptop SMM BIOS hwmon driver (SENSORS_DELL_SMM [=n])
So you must first enable this, and then you would be able to enable I8K:
-> Device Drivers
-> Hardware Monitoring support (HWMON [=y])
-> Dell laptop SMM BIOS hwmon driver (SENSORS_DELL_SMM [=n])
-> Legacy /proc/i8k interface of Dell laptop SMM BIOS hwmon driver (I8K [=n])
No comes the bad news: If you want configure your kernel BY EDITING the .config you MUST ensure that all dependencies are configured correctly !!
Ask why our best experts always advise never to configure the kernel by editing the .config file:
https://forums.gentoo.org/viewtopic-p-8686380.html#8686380
So: You must check your current kernel configuration IF all 3 options are enabled by default ... and IF NOT then you must alos enable the missing options ... AND NOW ... you must check if there are dependencies for these 3 missing options ... yes, this can go many rounds ...
. |
OK sounds like it would be safest to switch to building and installing a kernel from the gentoo sources.
Where can I find the distribution kernels .config as a starting point?
I'm currently running 6.6.41-gentoo-dist but the latest gentoo sources are linux-6.6.38-gentoo. So will I have to install the 6.6.41-gentoo sources, which are currently testing, so the copied .config isn't newer that the one in the gentoo sources? |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5091 Location: Bavaria
|
|
Back to top |
|
|
sublogic Apprentice
Joined: 21 Mar 2022 Posts: 269 Location: Pennsylvania, USA
|
Posted: Sat Aug 10, 2024 10:20 pm Post subject: |
|
|
If you start with the distribution kernel's .config as pietinger showed, you may have to change Code: | CONFIG_MODULE_SIG_KEY="certs/signing_key.pem" | That value is special-cased in the certs/Makefile to generate a key if none exists.
(Later you're supposed to move the signing_key.pem to removable media and update MODULE_SIG_KEY, so an attacker can't sign malware modules without said removable media.) |
|
Back to top |
|
|
eschwartz Developer
Joined: 29 Oct 2023 Posts: 214
|
Posted: Sun Aug 11, 2024 5:06 am Post subject: |
|
|
pietinger wrote: | user7719,
Enabling (or disabling) configuration options for the kernel configuration is not as easy as you think, because many options depends on other options. I strongly recommend to do:
[...]
No comes the bad news: If you want configure your kernel BY EDITING the .config you MUST ensure that all dependencies are configured correctly !!
Ask why our best experts always advise never to configure the kernel by editing the .config file:
https://forums.gentoo.org/viewtopic-p-8686380.html#8686380
So: You must check your current kernel configuration IF all 3 options are enabled by default ... and IF NOT then you must alos enable the missing options ... AND NOW ... you must check if there are dependencies for these 3 missing options ... yes, this can go many rounds ...
. |
IMO this feels a bit blown out of proportion. You have to be careful when editing a .config file by hand because if you don't do anything to resolve it to a valid config, it can be totally broken... but the /etc/kernel/config.d tooling DOES in fact run a thing to generate a valid config. It uses the kernel's inbuilt tooling for merging config snippets.
This is actually the same thing that the kernel ebuilds use to merge config snippets for the gentoo base options on top of the fedora example config. Also, how gentoo overlays debug, hardened, big-endian, and secureboot snippets on top of the combination of fedora + gentoo-base.
It's perfectly safe in your snippets will be merged in, and then dependencies will be resolved and maybe your snippets can't be satisfied but at least the kernel itself will then back out those changes.
Of course, to successfully apply any given change to your kernel, you MIGHT need to also set dependent options inside that snippet, but this isn't a real challenge IMO. |
|
Back to top |
|
|
Zucca Moderator
Joined: 14 Jun 2007 Posts: 3687 Location: Rasi, Finland
|
Posted: Sun Aug 11, 2024 1:57 pm Post subject: |
|
|
eschwartz wrote: | IMO this feels a bit blown out of proportion. You have to be careful when editing a .config file by hand because if you don't do anything to resolve it to a valid config, it can be totally broken... but the /etc/kernel/config.d tooling DOES in fact run a thing to generate a valid config. It uses the kernel's inbuilt tooling for merging config snippets. | This was something I just assumed.
I've been using config snippets practically from day-1 when gentoo-kernel ebuilds were available*. I've encountered zero problems so far.
*) I switched to gentoo-kernel from gentoo-sources, because- more automated kernel updates, yay
- I can still run make menuconfig and use diffconfig to create a config snippet
_________________ ..: Zucca :..
My gentoo installs: | init=/sbin/openrc-init
-systemd -logind -elogind seatd |
Quote: | I am NaN! I am a man! |
|
|
Back to top |
|
|
|