1 |
In linux.gentoo.user, you wrote: |
2 |
> |
3 |
> I've been using Gentoo for quite a long time, and today I decided to try |
4 |
> compiling the kernel myself, Thing I've never done before. I want a smaller |
5 |
> kernel, a faster boot (without initramfs) and, of course, some fun :). |
6 |
|
7 |
Good for you. I've rolled my own kernels for around 15 years, but I |
8 |
still use genkernel to build me an initramfs. I require the initramfs |
9 |
because: |
10 |
|
11 |
a) I've got my root filesystem on an LVM partition. |
12 |
|
13 |
b) I've got my /usr directory on a separate partition. This is not a |
14 |
problem, yet, but the udev update is coming! |
15 |
|
16 |
c) I like a fancy boot splash screen during early boot. |
17 |
|
18 |
I'm not that fond of using genkernel to build my initramfs, but it |
19 |
works. I'll probably switch to dracut when it becomes more stable. |
20 |
|
21 |
> I'm still reading the oficial documentation, but I don't think it will be |
22 |
> enough, so, if anyone of you know some documentation more detailed, I'd |
23 |
> appreciate reading it. |
24 |
|
25 |
What do you mean by "official documentation"? Do you include the |
26 |
information in the Documentation directory in your latest kernel? |
27 |
|
28 |
Have you tried: |
29 |
|
30 |
$make menuconfig |
31 |
|
32 |
This gives you a good interface for configuring your kernel. If you hit |
33 |
"/" you'll get a search function and there are "help" options for just |
34 |
about every feature you want to include in your new kernel. |
35 |
|
36 |
> I've just ran 'make xconfig', and I noticed that the configuration is the |
37 |
> same from genkernel (genkernel --menuconfig). Is it good? Should I get an |
38 |
> original .conf, with less garbage, or this is just the 'normal default' |
39 |
> instead of 'genkernel default' as I'm guessing? |
40 |
|
41 |
I usually start from scratch with a new machine, but in your case you |
42 |
should be able to use your old genkernel .config file and then pare it |
43 |
down to what you require ie what works. |
44 |
|
45 |
> Is there any tool that can scan my pc and help me out with the .conf or |
46 |
> even generate one? I guess not. There are lots of options that I have no |
47 |
> idea what they are for. I think this will be the fun part, but I think I |
48 |
> can't get a running kernel before I optimize it, so I can do it gradually. |
49 |
|
50 |
I have had reasonable success with "lshw" (sys-apps/lshw). It generates |
51 |
a list of the hardware on your machine. Unfortanately it won't produce a |
52 |
.config file for you. |
53 |
|
54 |
One option that makes subsequent kernels easier to produce is: |
55 |
|
56 |
CONFIG_IKCONFIG |
57 |
|
58 |
Kernel .config support |
59 |
|
60 |
This feature provides copy of your current Kernel's .config file at |
61 |
/proc/config.gz which you can then extract and use on your new kernel by |
62 |
doing: |
63 |
|
64 |
$ zcat /proc/config.gz > <new-kernel-directory>/.config |
65 |
$ cd <new-kernel-directory> |
66 |
$ make oldconfig |
67 |
|
68 |
> Just for curiosity, what is the size of your kernel? Mine is 3.4 MB. |
69 |
|
70 |
3.7MB |
71 |
|
72 |
Yep.. it's bigger than your genkernel generated kernel... 8-) |
73 |
|
74 |
Remember, the first kernel you produce on your own will take a bit of |
75 |
effort, but subsequent kernels are easy. |
76 |
|
77 |
-- |
78 |
Regards, |
79 |
Gregory. |