LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Gentoo (https://www.linuxquestions.org/questions/gentoo-87/)
-   -   Building kernel and recompile? (https://www.linuxquestions.org/questions/gentoo-87/building-kernel-and-recompile-4175654803/)

drillsar 05-29-2019 04:01 PM

Building kernel and recompile?
 
I understand how to build a kernel but lets say you forgot something in kernel that you need.

Best approach?

I was thinking of
make mrproper
cp /boot/config-version /usr/src/linux/.config

or this not necessary?

is this correct approach? what about modules? lets say you want to remove a module from kernel, do you need to delete it from /lib/modules/kernel-version first?

sevendogsbsd 05-30-2019 12:49 PM

To be honest, you are probably going to get a faster answer on the Gentoo forums. Not a lot of Gentoo users here. Just my observation.

hosler 06-10-2019 07:31 PM

you can just edit the existing config (via menuconfig or other) and then run make, make modules, make install, and make modules_install. it should only recompile the stuff that needs recompiling and not compile the whole kernel again. no need to start from scratch.

MaitreyaG 06-14-2019 08:45 AM

If you are already booting a working kernel, have the CONFIG_IKCONFIG_PROC option set and don't want to change anything, you can:
cd /usr/src/linux
zcat /proc/config > .config
make oldconfig
etc

finalturismo 04-02-2021 12:15 AM

Here is a really good video on how to update the Linux kernel. This is a good universal method for both new and old-comers
https://www.youtube.com/watch?v=Tn8U...channel=FIXAPC


All times are GMT -5. The time now is 06:10 PM.