All of lore.kernel.org
 help / color / mirror / Atom feed
* .config
@ 2020-02-21 23:41 Enzo Desiage
  2020-02-22  0:15 ` .config Valdis Klētnieks
  0 siblings, 1 reply; 9+ messages in thread
From: Enzo Desiage @ 2020-02-21 23:41 UTC (permalink / raw)
  To: kernelnewbies


[-- Attachment #1.1: Type: text/plain, Size: 930 bytes --]

Hi all,

<https://twitter.com/enzo_dancing>
I have just finished reading most of "The Linux Kernel in a Nutshell".
1. I wish I knew about this book two weeks ago
2. I'm currently recompiling my kernel in a VM, by having copied the base
.config file from /boot as it's been recompiling, for now, more than an
hour, I started having questions and carried on reading the book hoping to
find answers.
Turns out I don't need every modules and driver that Ubuntu has in its
initial .config file for my VM. Having understood that and found all the
modules I actually need (thanks find_all_modules.sh). I'm trying to devise
a strategy to take the output of that script and make a brand new minimal
.config file. However, the only solution I've found is doing it manually
via make menuconfig. This seems to be a rather long process, which I
wouldn't mind doing if there aren't any other alternatives.
Is there any other way?

Thanks,
Enzo

[-- Attachment #1.2: Type: text/html, Size: 4669 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: .config
  2020-02-21 23:41 .config Enzo Desiage
@ 2020-02-22  0:15 ` Valdis Klētnieks
  2020-02-22 17:39   ` .config Enzo Desiage
  0 siblings, 1 reply; 9+ messages in thread
From: Valdis Klētnieks @ 2020-02-22  0:15 UTC (permalink / raw)
  To: Enzo Desiage; +Cc: kernelnewbies


[-- Attachment #1.1: Type: text/plain, Size: 817 bytes --]

On Fri, 21 Feb 2020 23:41:10 +0000, Enzo Desiage said:

> modules I actually need (thanks find_all_modules.sh). I'm trying to devise
> a strategy to take the output of that script and make a brand new minimal
> .config file. However, the only solution I've found is doing it manually
> via make menuconfig. This seems to be a rather long process, which I
> wouldn't mind doing if there aren't any other alternatives.
> Is there any other way?

Step 1:  Plug in all your USB widgets and storage and other hot-pluggables
long enough for the kernel to load each device's drivers.

Step 2: 'make localmodconfig'.  This will create a .config that only has those
modules that were actually loaded at the time (there's also an option to take
the output of an 'lsmod', in case you're doing the builds on a different machine)

[-- Attachment #1.2: Type: application/pgp-signature, Size: 832 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: .config
  2020-02-22  0:15 ` .config Valdis Klētnieks
@ 2020-02-22 17:39   ` Enzo Desiage
  2020-02-22 22:47     ` .config Valdis Klētnieks
                       ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Enzo Desiage @ 2020-02-22 17:39 UTC (permalink / raw)
  To: Valdis Klētnieks; +Cc: kernelnewbies


[-- Attachment #1.1: Type: text/plain, Size: 193 bytes --]

Thanks, it worked!
I had a look back at the book and couldn't find the command
'make localmodconfig' in "The Linux Kernel  in a Nutshell" book,
why is that? Was it introduced  in recent years?

[-- Attachment #1.2: Type: text/html, Size: 357 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: .config
  2020-02-22 17:39   ` .config Enzo Desiage
@ 2020-02-22 22:47     ` Valdis Klētnieks
  2020-02-23  3:54     ` .config Aruna Hewapathirane
  2020-02-23  7:31     ` .config Greg KH
  2 siblings, 0 replies; 9+ messages in thread
From: Valdis Klētnieks @ 2020-02-22 22:47 UTC (permalink / raw)
  To: Enzo Desiage; +Cc: kernelnewbies


[-- Attachment #1.1: Type: text/plain, Size: 1048 bytes --]

On Sat, 22 Feb 2020 17:39:03 +0000, Enzo Desiage said:

> I had a look back at the book and couldn't find the command
> 'make localmodconfig' in "The Linux Kernel  in a Nutshell" book,
> why is that? Was it introduced  in recent years?

Depends what you call "recent". Looks like v2.6.30-ish.

commit 03fa25da8335a942161a8070b3298cfd4edf9b6a
Author: Steven Rostedt <srostedt@redhat.com>
Date:   Wed Apr 29 22:52:22 2009 -0400

    kconfig: make localmodconfig to run streamline_config.pl
    
    Running the streamline_config.pl script manually can still be confusing
    for some users. This patch adds the localmodconfig option. This will
    automatically run streamline_config.pl on the current .config and
    then run "make silentoldconfig" to fix any wholes that might have been
    created.
    
     $ make localmodconfig
    
    This will remove any module configurations in .config that are not needed
    to compile the modules that are loaded.
    
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>


[-- Attachment #1.2: Type: application/pgp-signature, Size: 832 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: .config
  2020-02-22 17:39   ` .config Enzo Desiage
  2020-02-22 22:47     ` .config Valdis Klētnieks
@ 2020-02-23  3:54     ` Aruna Hewapathirane
  2020-02-23  6:47       ` .config Pratyush Das
  2020-02-23  7:31     ` .config Greg KH
  2 siblings, 1 reply; 9+ messages in thread
From: Aruna Hewapathirane @ 2020-02-23  3:54 UTC (permalink / raw)
  To: Enzo Desiage; +Cc: Valdis Klētnieks, kernelnewbies


[-- Attachment #1.1: Type: text/plain, Size: 250 bytes --]

>> On Sat, Feb 22, 2020 at 12:39 PM Enzo Desiage <enzo@desiage.org> wrote
>> Thanks, it worked!

Next time try make -j<number of cpu cores + 1 ) , that is lets say you have
two cores ?

make -j3

usually will cut down compile time in half :-)

Aruna

[-- Attachment #1.2: Type: text/html, Size: 499 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: .config
  2020-02-23  3:54     ` .config Aruna Hewapathirane
@ 2020-02-23  6:47       ` Pratyush Das
  2020-02-23 12:18         ` .config Bjørn Mork
  0 siblings, 1 reply; 9+ messages in thread
From: Pratyush Das @ 2020-02-23  6:47 UTC (permalink / raw)
  To: Aruna Hewapathirane; +Cc: Enzo Desiage, Valdis Klētnieks, kernelnewbies


[-- Attachment #1.1: Type: text/plain, Size: 781 bytes --]

>
> Next time try make -j<number of cpu cores + 1 )


I thought it was limited by the number of processor threads? In this case,
if each CPU core has just one thread, the +1 does not really serve a
purpose?

Cheers,

On Sun, 23 Feb 2020 at 09:26, Aruna Hewapathirane <
aruna.hewapathirane@gmail.com> wrote:

> >> On Sat, Feb 22, 2020 at 12:39 PM Enzo Desiage <enzo@desiage.org> wrote
> >> Thanks, it worked!
>
> Next time try make -j<number of cpu cores + 1 ) , that is lets say you
> have two cores ?
>
> make -j3
>
> usually will cut down compile time in half :-)
>
> Aruna
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>


-- 
Pratyush Das(Reik)

[-- Attachment #1.2: Type: text/html, Size: 1832 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: .config
  2020-02-22 17:39   ` .config Enzo Desiage
  2020-02-22 22:47     ` .config Valdis Klētnieks
  2020-02-23  3:54     ` .config Aruna Hewapathirane
@ 2020-02-23  7:31     ` Greg KH
  2020-02-23 16:29       ` .config Enzo Desiage
  2 siblings, 1 reply; 9+ messages in thread
From: Greg KH @ 2020-02-23  7:31 UTC (permalink / raw)
  To: Enzo Desiage; +Cc: Valdis Klētnieks, kernelnewbies

On Sat, Feb 22, 2020 at 05:39:03PM +0000, Enzo Desiage wrote:
> Thanks, it worked!
> I had a look back at the book and couldn't find the command
> 'make localmodconfig' in "The Linux Kernel  in a Nutshell" book,
> why is that? Was it introduced  in recent years?

localmodconfig came right after I finished writing that book.  It would
have made it much easier to write had it been there at the time :)

greg k-h

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: .config
  2020-02-23  6:47       ` .config Pratyush Das
@ 2020-02-23 12:18         ` Bjørn Mork
  0 siblings, 0 replies; 9+ messages in thread
From: Bjørn Mork @ 2020-02-23 12:18 UTC (permalink / raw)
  To: Pratyush Das
  Cc: Valdis Klētnieks, Enzo Desiage, Aruna Hewapathirane, kernelnewbies

Pratyush Das <reikdas@gmail.com> writes:

>>
>> Next time try make -j<number of cpu cores + 1 )
>
>
> I thought it was limited by the number of processor threads? In this case,
> if each CPU core has just one thread, the +1 does not really serve a
> purpose?

It's not limited.  And the processes will compete for more than just CPU
resources, so it can make sense to run a few more than you have CPU
cores.  This gives the scheduler something to work with when some of the
make processes are blocking on IO.

Personally I often use twice the number of cores, including the
hyperthreaded ones.  So I run 'make -j16' on a 4 core CPU with HT.

You won't see much improvement by overcommitting like this, but it
doesn't harm either.


Bjørn

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: .config
  2020-02-23  7:31     ` .config Greg KH
@ 2020-02-23 16:29       ` Enzo Desiage
  0 siblings, 0 replies; 9+ messages in thread
From: Enzo Desiage @ 2020-02-23 16:29 UTC (permalink / raw)
  To: Greg KH; +Cc: Valdis Klētnieks, kernelnewbies


[-- Attachment #1.1: Type: text/plain, Size: 532 bytes --]

Thanks, it makes more sense now!

On Sun, Feb 23, 2020 at 7:31 AM Greg KH <greg@kroah.com> wrote:

> On Sat, Feb 22, 2020 at 05:39:03PM +0000, Enzo Desiage wrote:
> > Thanks, it worked!
> > I had a look back at the book and couldn't find the command
> > 'make localmodconfig' in "The Linux Kernel  in a Nutshell" book,
> > why is that? Was it introduced  in recent years?
>
> localmodconfig came right after I finished writing that book.  It would
> have made it much easier to write had it been there at the time :)
>
> greg k-h
>

[-- Attachment #1.2: Type: text/html, Size: 878 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-02-23 16:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-21 23:41 .config Enzo Desiage
2020-02-22  0:15 ` .config Valdis Klētnieks
2020-02-22 17:39   ` .config Enzo Desiage
2020-02-22 22:47     ` .config Valdis Klētnieks
2020-02-23  3:54     ` .config Aruna Hewapathirane
2020-02-23  6:47       ` .config Pratyush Das
2020-02-23 12:18         ` .config Bjørn Mork
2020-02-23  7:31     ` .config Greg KH
2020-02-23 16:29       ` .config Enzo Desiage

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.