Jump to content
Read the Funtoo Newsletter: Summer 2023 ×
  • 0

[Solved] How to customize kernel in Funtoo?


bluephoenix

Question

I have read an article about how to compile a kernel in Funtoo from its wiki. But I am still not clear at all.

I can only understand I can choose to compile the kernel based on different arch by using "config-extract" . 

But if I still want to do some fine-tune based on this arch, how should I do? Where is the config file should I edit and what command should I use to re-compile it and how to install the new kernel to "/boot"? There is no detail manual to refer.

Who can help me to give a hint? Thanks a lot!

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

After I read this article: https://www.funtoo.org/Funtoo_Linux_Kernels

I cannot understand this sentence: "It is necessary to name the kernel configuration file something other than ".config" to avoid errors with genkernel. After using config-extract, run make oldconfig and accept all default options by hitting Enter at all prompts."

Why should I rename the kernel rather than ".config"? What is the error with genkernel? If I follow gentoo's guide, like make && make install, grub-mkconfig -o /boot/grub/grub.cfg, what will happen?

Link to comment
Share on other sites

  • 0

Why should I rename the kernel config file something other than ".config"?

It seems that genkernel is an integrated tool for auto-excute "make, make install and etc". But if this is the only difference between genkernel and the seperated commands, so why do yo emphasize "rename the kernel config file something other than '.config'"? What is the fallback if I just overwrite the default ".config"?

Link to comment
Share on other sites

  • 0
5 hours ago, jhan said:

The only one stating that you should rename .config is the page you linked to. Which describes the process using genkernel and especially genkernel with debian-sources. And the rename is only necessary there because the tool config-extract would overwrite an existing .config file. But config-extract does only work with debian-sources:

I never renamed .config in any way and also never used genkernel, as I don't really see any benefit for me by using it. But you could probably use it for gentoo-sources as well.You could read up on the usage of genkernel at https://wiki.gentoo.org/wiki/Genkernel

Sorry, jhan,

I have to ask again about my confuse.

I am not so familiar with genkernel tool as I neither use it when I use gentoo (I only use make && make install in gentoo and get everything done). But now when I turn to funtoo, when I read its document, this tool is proposed. My understanding about genkernel is ONLY a combination of "make, make install and some other small pieces of function". But genkernel will still use .config relative with the specific source, like /usr/src/linux-debian-sources-4.14.12 and nothing else to be its configuration. So if I use config-extract without "-o" option to generate the default .config, that will be  just what I want. And then according to the guide, I could use 

genkernel --kernel-config=.config all

to get everything done and enjoy the new kernel.

So I still don't understand why I should AVOID to use the default .config when I generate config file by using config-extract command. Leaving the default .config file for what? Is there any other tool will use it for some other purpose? 

And I tried to use "make && make install" directly in the debian kernel folder and refreshed the Grub menu by using grub-mkconfig, like what I did to gentoo before. But I fail to reboot the new kernel. So I doubt this DEFAULT .config is not the one which is really used by funtoo. Am I wrong? 

Link to comment
Share on other sites

  • 0

I suddenly somehow understand why we should NOT use the default .config when we make our customized kernel.

It is because "emerge kernel" or "emerge  auvDN world" will overwrite the default .config file in which case we will lose our previous work of customization.

So I will close this topic session. Thanks everybody!

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...