* [gentoo-user] genkernel 2 manual
@ 2012-10-23 22:02 João Matos
2012-10-23 22:49 ` Andrés Becerra Sandoval
` (6 more replies)
0 siblings, 7 replies; 14+ messages in thread
From: João Matos @ 2012-10-23 22:02 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1108 bytes --]
Hi list.
I've been using Gentoo for quite a long time, and today I decided to try
compiling the kernel myself, Thing I've never done before. I want a smaller
kernel, a faster boot (without initramfs) and, of course, some fun :).
I'm still reading the oficial documentation, but I don't think it will be
enough, so, if anyone of you know some documentation more detailed, I'd
appreciate reading it.
I've just ran 'make xconfig', and I noticed that the configuration is the
same from genkernel (genkernel --menuconfig). Is it good? Should I get an
original .conf, with less garbage, or this is just the 'normal default'
instead of 'genkernel default' as I'm guessing?
Is there any tool that can scan my pc and help me out with the .conf or
even generate one? I guess not. There are lots of options that I have no
idea what they are for. I think this will be the fun part, but I think I
can't get a running kernel before I optimize it, so I can do it gradually.
Just for curiosity, what is the size of your kernel? Mine is 3.4 MB.
Thank you,
--
João de Matos
Linux User #461527
[-- Attachment #2: Type: text/html, Size: 1216 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] genkernel 2 manual
2012-10-23 22:02 [gentoo-user] genkernel 2 manual João Matos
@ 2012-10-23 22:49 ` Andrés Becerra Sandoval
2012-10-23 22:50 ` Redcap
` (5 subsequent siblings)
6 siblings, 0 replies; 14+ messages in thread
From: Andrés Becerra Sandoval @ 2012-10-23 22:49 UTC (permalink / raw
To: gentoo-user
On Tue, Oct 23, 2012 at 5:02 PM, João Matos <jaoneto@gmail.com> wrote:
> Hi list.
>
> I've been using Gentoo for quite a long time, and today I decided to try
> compiling the kernel myself, Thing I've never done before. I want a smaller
> kernel, a faster boot (without initramfs) and, of course, some fun :).
>
> I'm still reading the oficial documentation, but I don't think it will be
> enough, so, if anyone of you know some documentation more detailed, I'd
> appreciate reading it.
>
> I've just ran 'make xconfig', and I noticed that the configuration is the
> same from genkernel (genkernel --menuconfig). Is it good? Should I get an
> original .conf, with less garbage, or this is just the 'normal default'
> instead of 'genkernel default' as I'm guessing?
>
> Is there any tool that can scan my pc and help me out with the .conf or even
> generate one? I guess not. There are lots of options that I have no idea
> what they are for. I think this will be the fun part, but I think I can't
> get a running kernel before I optimize it, so I can do it gradually.
>
> Just for curiosity, what is the size of your kernel? Mine is 3.4 MB.
>
> Thank you,
> --
> João de Matos
> Linux User #461527
>
A small tip:
- Do lsmod in your genkernel kernel
- Write down the list
- For any module loaded find the corresponding option in the kernel
configuration
- Read briefly the description for the option
- Do a crosscheck with the output of lspci and lsusb
Have fun!
--
Andrés Becerra Sandoval
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] genkernel 2 manual
2012-10-23 22:02 [gentoo-user] genkernel 2 manual João Matos
2012-10-23 22:49 ` Andrés Becerra Sandoval
@ 2012-10-23 22:50 ` Redcap
2012-10-23 23:22 ` Dale
` (4 subsequent siblings)
6 siblings, 0 replies; 14+ messages in thread
From: Redcap @ 2012-10-23 22:50 UTC (permalink / raw
To: gentoo-user
Hi there,
I'd definitely advise to you use one of Pappy's Kernel seed. Those are config
files that provide you with a good starting point to configure your own kernel.
You'll find the Kernel seeds at
http://kernel-seeds.org/
The website also has instructions on how to find out which Kernel options
you'll need to have your hardware supported.
Cheers...
On Tuesday 23 October 2012 20:02:52 João Matos wrote:
> Hi list.
>
> I've been using Gentoo for quite a long time, and today I decided to try
> compiling the kernel myself, Thing I've never done before. I want a smaller
> kernel, a faster boot (without initramfs) and, of course, some fun :).
>
> I'm still reading the oficial documentation, but I don't think it will be
> enough, so, if anyone of you know some documentation more detailed, I'd
> appreciate reading it.
>
> I've just ran 'make xconfig', and I noticed that the configuration is the
> same from genkernel (genkernel --menuconfig). Is it good? Should I get an
> original .conf, with less garbage, or this is just the 'normal default'
> instead of 'genkernel default' as I'm guessing?
>
> Is there any tool that can scan my pc and help me out with the .conf or
> even generate one? I guess not. There are lots of options that I have no
> idea what they are for. I think this will be the fun part, but I think I
> can't get a running kernel before I optimize it, so I can do it gradually.
>
> Just for curiosity, what is the size of your kernel? Mine is 3.4 MB.
>
> Thank you,
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] genkernel 2 manual
2012-10-23 22:02 [gentoo-user] genkernel 2 manual João Matos
2012-10-23 22:49 ` Andrés Becerra Sandoval
2012-10-23 22:50 ` Redcap
@ 2012-10-23 23:22 ` Dale
2012-10-23 23:25 ` [gentoo-user] " João Matos
` (3 subsequent siblings)
6 siblings, 0 replies; 14+ messages in thread
From: Dale @ 2012-10-23 23:22 UTC (permalink / raw
To: gentoo-user
João Matos wrote:
> Hi list.
>
> I've been using Gentoo for quite a long time, and today I decided to
> try compiling the kernel myself, Thing I've never done before. I want
> a smaller kernel, a faster boot (without initramfs) and, of course,
> some fun :).
>
> I'm still reading the oficial documentation, but I don't think it will
> be enough, so, if anyone of you know some documentation more detailed,
> I'd appreciate reading it.
>
> I've just ran 'make xconfig', and I noticed that the configuration is
> the same from genkernel (genkernel --menuconfig). Is it good? Should I
> get an original .conf, with less garbage, or this is just the 'normal
> default' instead of 'genkernel default' as I'm guessing?
>
> Is there any tool that can scan my pc and help me out with the .conf
> or even generate one? I guess not. There are lots of options that I
> have no idea what they are for. I think this will be the fun part, but
> I think I can't get a running kernel before I optimize it, so I can do
> it gradually.
>
> Just for curiosity, what is the size of your kernel? Mine is 3.4 MB.
>
> Thank you,
> --
> João de Matos
> Linux User #461527
>
I would add lspci -k since it lists not only modules but built in
drivers as well. Generally, if you have all those included, then you
are doing fine hardware wise. In menuconfig, just hit the / key and
search for the driver. Also, on the results of the search, it shows the
path to the page the driver is on too. Some of them hide pretty good at
times.
Also, don't forget that some things have to be built in and not as
modules. Things like file system that root is on, drive controller so
that the drives can be seen and maybe even mouse/keyboard stuff.
Some say not to but I just build everything into my kernel. The only
modules I have is nvidia for my video drivers. Everything else is built
in. Should work either way as long as the must haves are built in.
One more thing, keep a couple known good kernels laying around just in
case you really mess up. At least you can boot a old one to fix the new
one. ;-) Don't ask how I learned this sort of thing. :/
Dale
:-) :-)
--
I am only responsible for what I said ... Not for what you understood or how you interpreted my words!
^ permalink raw reply [flat|nested] 14+ messages in thread
* [gentoo-user] Re: genkernel 2 manual
2012-10-23 22:02 [gentoo-user] genkernel 2 manual João Matos
` (2 preceding siblings ...)
2012-10-23 23:22 ` Dale
@ 2012-10-23 23:25 ` João Matos
2012-10-24 7:54 ` Neil Bothwick
2012-10-24 2:40 ` [gentoo-user] " Bruce Hill
` (2 subsequent siblings)
6 siblings, 1 reply; 14+ messages in thread
From: João Matos @ 2012-10-23 23:25 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1524 bytes --]
Well, It is being easy than I thought. I've compilled it and the boot is
faster since initramfs is not needed anymore :).
I'll now remove the hundreds of unneeded drivers.
2012/10/23 João Matos <jaoneto@gmail.com>
> Hi list.
>
> I've been using Gentoo for quite a long time, and today I decided to try
> compiling the kernel myself, Thing I've never done before. I want a smaller
> kernel, a faster boot (without initramfs) and, of course, some fun :).
>
> I'm still reading the oficial documentation, but I don't think it will be
> enough, so, if anyone of you know some documentation more detailed, I'd
> appreciate reading it.
>
> I've just ran 'make xconfig', and I noticed that the configuration is the
> same from genkernel (genkernel --menuconfig). Is it good? Should I get an
> original .conf, with less garbage, or this is just the 'normal default'
> instead of 'genkernel default' as I'm guessing?
>
> Is there any tool that can scan my pc and help me out with the .conf or
> even generate one? I guess not. There are lots of options that I have no
> idea what they are for. I think this will be the fun part, but I think I
> can't get a running kernel before I optimize it, so I can do it gradually.
>
> Just for curiosity, what is the size of your kernel? Mine is 3.4 MB.
>
> Thank you,
> --
> João de Matos
> Linux User #461527
>
>
--
João de Matos
Linux User #461527
Graduando em Engenharia de Computação 2005.1
UEFS - Universidade Estadual de Feira de Santana
[-- Attachment #2: Type: text/html, Size: 1925 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] genkernel 2 manual
2012-10-23 22:02 [gentoo-user] genkernel 2 manual João Matos
` (3 preceding siblings ...)
2012-10-23 23:25 ` [gentoo-user] " João Matos
@ 2012-10-24 2:40 ` Bruce Hill
2012-10-24 11:16 ` Michael Hampicke
2012-10-25 9:16 ` Jackson
6 siblings, 0 replies; 14+ messages in thread
From: Bruce Hill @ 2012-10-24 2:40 UTC (permalink / raw
To: gentoo-user
On Tue, Oct 23, 2012 at 08:02:52PM -0200, João Matos wrote:
> Hi list.
>
> I'm still reading the oficial documentation, but I don't think it will be
> enough, so, if anyone of you know some documentation more detailed, I'd
> appreciate reading it.
emerge -av app-doc/linux-kernel-in-a-nutshell
--
Bruce
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] Re: genkernel 2 manual
2012-10-23 23:25 ` [gentoo-user] " João Matos
@ 2012-10-24 7:54 ` Neil Bothwick
0 siblings, 0 replies; 14+ messages in thread
From: Neil Bothwick @ 2012-10-24 7:54 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 546 bytes --]
On Tue, 23 Oct 2012 21:25:04 -0200, João Matos wrote:
> Well, It is being easy than I thought. I've compilled it and the boot
> is faster since initramfs is not needed anymore :).
Whether or not you use an initramfs shouldn't make any real difference.
However the genkernel initramfs has to do a load of general hardware
recognition stuff, and that is what takes the time. The part of the boot
is run from the initramfs, but that is incidental.
--
Neil Bothwick
TEXAS VIRUS: Makes sure that it's bigger than any other file.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] genkernel 2 manual
2012-10-23 22:02 [gentoo-user] genkernel 2 manual João Matos
` (4 preceding siblings ...)
2012-10-24 2:40 ` [gentoo-user] " Bruce Hill
@ 2012-10-24 11:16 ` Michael Hampicke
2012-10-24 13:24 ` Michael Hampicke
2012-10-24 13:47 ` João Matos
2012-10-25 9:16 ` Jackson
6 siblings, 2 replies; 14+ messages in thread
From: Michael Hampicke @ 2012-10-24 11:16 UTC (permalink / raw
To: gentoo-user
> Is there any tool that can scan my pc and help me out with the .conf or
> even generate one? I guess not. There are lots of options that I have no
> idea what they are for. I think this will be the fun part, but I think I
> can't get a running kernel before I optimize it, so I can do it gradually.
Well good starting points have already been provided, I usually check
for modules with lspci -k
> Just for curiosity, what is the size of your kernel? Mine is 3.4 MB.
3.0M, initramfs 2.2M
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] genkernel 2 manual
2012-10-24 11:16 ` Michael Hampicke
@ 2012-10-24 13:24 ` Michael Hampicke
2012-10-25 22:09 ` João Matos
2012-10-24 13:47 ` João Matos
1 sibling, 1 reply; 14+ messages in thread
From: Michael Hampicke @ 2012-10-24 13:24 UTC (permalink / raw
To: gentoo-user
Am 24.10.2012 13:16, schrieb Michael Hampicke:
>> Is there any tool that can scan my pc and help me out with the .conf or
>> even generate one? I guess not. There are lots of options that I have no
>> idea what they are for. I think this will be the fun part, but I think I
>> can't get a running kernel before I optimize it, so I can do it gradually.
>
> Well good starting points have already been provided, I usually check
> for modules with lspci -k
>
>> Just for curiosity, what is the size of your kernel? Mine is 3.4 MB.
>
> 3.0M, initramfs 2.2M
>
Damn, totaly forgot what I would write :) You may also have a loog at #
make localmodconfig
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] genkernel 2 manual
2012-10-24 11:16 ` Michael Hampicke
2012-10-24 13:24 ` Michael Hampicke
@ 2012-10-24 13:47 ` João Matos
2012-10-24 13:58 ` Dale
2012-10-24 14:36 ` Neil Bothwick
1 sibling, 2 replies; 14+ messages in thread
From: João Matos @ 2012-10-24 13:47 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1357 bytes --]
Well, thank you for your help.
I had some problems, like no bootable system or no network, but I could
solve it and things are working pretty well pretty.
The compilation time is really small after I removed these modules, but I
think it should be smaller: apparently the 'make && make modules install'
command don't use my '-j3' option. How do I configure it?
The size is almost the same (3.3 MB), and I believe this is why my work
until now was to remove non used hardware modules - the easy part. Now,
I'll slow down a bit, bcz I need to learn about the other options before
turning them off.
Thant you all,
2012/10/24 Michael Hampicke <gentoo-user@hadt.biz>
> > Is there any tool that can scan my pc and help me out with the .conf or
> > even generate one? I guess not. There are lots of options that I have no
> > idea what they are for. I think this will be the fun part, but I think I
> > can't get a running kernel before I optimize it, so I can do it
> gradually.
>
> Well good starting points have already been provided, I usually check
> for modules with lspci -k
>
> > Just for curiosity, what is the size of your kernel? Mine is 3.4 MB.
>
> 3.0M, initramfs 2.2M
>
>
--
João de Matos
Linux User #461527
Graduando em Engenharia de Computação 2005.1
UEFS - Universidade Estadual de Feira de Santana
[-- Attachment #2: Type: text/html, Size: 1747 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] genkernel 2 manual
2012-10-24 13:47 ` João Matos
@ 2012-10-24 13:58 ` Dale
2012-10-24 14:36 ` Neil Bothwick
1 sibling, 0 replies; 14+ messages in thread
From: Dale @ 2012-10-24 13:58 UTC (permalink / raw
To: gentoo-user
João Matos wrote:
> Well, thank you for your help.
>
> I had some problems, like no bootable system or no network, but I
> could solve it and things are working pretty well pretty.
>
> The compilation time is really small after I removed these modules,
> but I think it should be smaller: apparently the 'make && make modules
> install' command don't use my '-j3' option. How do I configure it?
>
> The size is almost the same (3.3 MB), and I believe this is why my
> work until now was to remove non used hardware modules - the easy
> part. Now, I'll slow down a bit, bcz I need to learn about the other
> options before turning them off.
>
> Thant you all,
>
make -j 3 all && make modules_install
I guess you can add -j 3 to the modules part to but since I have only
the forced SCSI ones, it takes only a second or two. If you use a lot
of modules, try adding that option.
Dale
:-) :-)
--
I am only responsible for what I said ... Not for what you understood or how you interpreted my words!
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] genkernel 2 manual
2012-10-24 13:47 ` João Matos
2012-10-24 13:58 ` Dale
@ 2012-10-24 14:36 ` Neil Bothwick
1 sibling, 0 replies; 14+ messages in thread
From: Neil Bothwick @ 2012-10-24 14:36 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 528 bytes --]
On Wed, 24 Oct 2012 11:47:55 -0200, João Matos wrote:
> The size is almost the same (3.3 MB), and I believe this is why my work
> until now was to remove non used hardware modules - the easy part.
Modules don't significantly affect the size of the kernel, only builtins.
A hand-prepared kernel may actually be larger than a genkernel one
because the latter builds almost everything as modules whereas without an
initramfs, you need some modules as builtins.
--
Neil Bothwick
It's not a bug, it's tradition!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] genkernel 2 manual
2012-10-23 22:02 [gentoo-user] genkernel 2 manual João Matos
` (5 preceding siblings ...)
2012-10-24 11:16 ` Michael Hampicke
@ 2012-10-25 9:16 ` Jackson
6 siblings, 0 replies; 14+ messages in thread
From: Jackson @ 2012-10-25 9:16 UTC (permalink / raw
To: gentoo-user
On 10/23/2012 10:02 PM, João Matos wrote:
> Hi list.
>
>
> Just for curiosity, what is the size of your kernel? Mine is 3.4 MB.
>
> Thank you,
> --
> João de Matos
> Linux User #461527
>
2.7 MB ,initramfs 1.5 MB
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] genkernel 2 manual
2012-10-24 13:24 ` Michael Hampicke
@ 2012-10-25 22:09 ` João Matos
0 siblings, 0 replies; 14+ messages in thread
From: João Matos @ 2012-10-25 22:09 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 488 bytes --]
> Damn, totaly forgot what I would write :) You may also have a loog at #
> make localmodconfig
>
Great tool. Should be added to handbook. :)
I think my work is almost done. The kernel has 2.7MB, and I've removed all
obvious unnecessary choices, just reading the 'help' from 'make
menuconfig'. It was necessary to recompile nvidia-drivers a couple times, I
don't know why, but now everything is working pretty fine.
Thank you all,
--
João de Matos
Linux User #461527
[-- Attachment #2: Type: text/html, Size: 699 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2012-10-25 22:11 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-23 22:02 [gentoo-user] genkernel 2 manual João Matos
2012-10-23 22:49 ` Andrés Becerra Sandoval
2012-10-23 22:50 ` Redcap
2012-10-23 23:22 ` Dale
2012-10-23 23:25 ` [gentoo-user] " João Matos
2012-10-24 7:54 ` Neil Bothwick
2012-10-24 2:40 ` [gentoo-user] " Bruce Hill
2012-10-24 11:16 ` Michael Hampicke
2012-10-24 13:24 ` Michael Hampicke
2012-10-25 22:09 ` João Matos
2012-10-24 13:47 ` João Matos
2012-10-24 13:58 ` Dale
2012-10-24 14:36 ` Neil Bothwick
2012-10-25 9:16 ` Jackson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox