Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
What does localyesconfig do exactly? It sounds too good.
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
C1REX
l33t
l33t


Joined: 02 Jan 2004
Posts: 774
Location: Poland/UK

PostPosted: Sun Mar 08, 2020 1:45 am    Post subject: What does localyesconfig do exactly? It sounds too good. Reply with quote

What does localyesconfig do exactly? It sounds too good to be true.

Does it automatically detect all hardware and set everything as built in in menuconfig while removing everything not detected?
It just sounds freaking amazing if I want to built just the bare minimum kernel for max performance/boot time. I spent so much time manually removing everything by hand and trying if system is still booting.



Can anybody confirm? Why this is not a default recommended option for kernel config?
_________________
CLICK HERE to help move gentoo up on distrowatch.

If you like Gentoo you can thank devs here - https://www.gentoo.org/donate/
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6342

PostPosted: Sun Mar 08, 2020 2:09 am    Post subject: Reply with quote

It compiles in all the currently loaded modules by changing them from M to Y. If something hasn't loaded them yet they aren't included. Nothing else is removed.
Back to top
View user's profile Send private message
C1REX
l33t
l33t


Joined: 02 Jan 2004
Posts: 774
Location: Poland/UK

PostPosted: Sun Mar 08, 2020 2:25 am    Post subject: Reply with quote

What if I remove the config and start from a clear one? Will it detect my hardware and add the bare minimum and make it a working kernel?
_________________
CLICK HERE to help move gentoo up on distrowatch.

If you like Gentoo you can thank devs here - https://www.gentoo.org/donate/
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6342

PostPosted: Sun Mar 08, 2020 3:21 am    Post subject: Reply with quote

That depends on if the sum of defconfig + loaded modules would result in a bootable kernel.

The kernel config scripts do not detect hardware. That's udev's job.
Back to top
View user's profile Send private message
Goverp
l33t
l33t


Joined: 07 Mar 2007
Posts: 804

PostPosted: Sun Mar 08, 2020 9:23 am    Post subject: Reply with quote

Last time I built a config from scratch, I started with a recent bootable linux disk, possibly the Gentoo Minimal Install, booted it, and used "make localmodconfig" to get all and only the modules I need. Before the boot, I plugged as many USB and other things of that ilk in, so their modules would be needed. Then I spent some time tweaking the bits with "make nconfig", making some modules built-in, and other stuff.

localmodconfig and localyesconfig are pretty good, they save an awful lot of faffing about with ethernet and multimedia drivers, for example, but not perfect. (a) You need a working config to start with, of course, and (b) they only configure the modules in use at the time you make, so if you have optional hardware that wasn't plugged in, it won't be there, and (c) if you have something exciting like a big video card, you may end up with some level of framebuffer driver that at least works, but not necessarily the custom drivers, depending on what your running system had chosen.
_________________
Greybeard
Back to top
View user's profile Send private message
C1REX
l33t
l33t


Joined: 02 Jan 2004
Posts: 774
Location: Poland/UK

PostPosted: Sun Mar 08, 2020 10:53 am    Post subject: Reply with quote

Goverp - thank you for your answer. This is what I hoped to hear.
_________________
CLICK HERE to help move gentoo up on distrowatch.

If you like Gentoo you can thank devs here - https://www.gentoo.org/donate/
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7368

PostPosted: Sun Mar 08, 2020 10:58 am    Post subject: Reply with quote

C1REX wrote:
What if I remove the config and start from a clear one? Will it detect my hardware and add the bare minimum and make it a working kernel?

it doesn't detect any hardware, only detect what is build as module and what is loaded
as example:
configs: Echo the kernel .config file used to build the kernel ; it's the module to enable /proc/config.gz
if your kernel is build with this as module and you load that module it will be set to Y
and i took this example because it has nothing to do with hardware, it's just the module to have /proc/config.gz or not
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