1 |
Nikos Chantziaras <realnc@×××××.de> posted h1jqlc$o63$1@×××××××××.org, |
2 |
excerpted below, on Sun, 21 Jun 2009 02:17:02 +0300: |
3 |
|
4 |
> zcat /proc/config.gz > .config |
5 |
|
6 |
Note that /proc/config.gz depends on kernel config, so may not exist on |
7 |
all systems. From the help text for "Kernel .config support" under |
8 |
"General setup" in menuconfig: |
9 |
|
10 |
"""" |
11 |
CONFIG_IKCONFIG: |
12 |
|
13 |
This option enables the complete Linux kernel ".config" file contents to |
14 |
be saved in the kernel. It provides documentation of which kernel options |
15 |
are used in a running kernel or in an on-disk kernel. This information |
16 |
can be extracted from the kernel image file with the script scripts/ |
17 |
extract-ikconfig and used as input to rebuild the current kernel or to |
18 |
build another kernel. It can also be extracted from a running kernel by |
19 |
reading /proc/config.gz if enabled (below). |
20 |
"""" |
21 |
|
22 |
Then the dependent suboption: |
23 |
|
24 |
"""" |
25 |
CONFIG_IKCONFIG_PROC: |
26 |
|
27 |
This option enables access to the kernel configuration file through |
28 |
/proc/config.gz. |
29 |
"""" |
30 |
|
31 |
So depending on the kernel config /proc/config.gz may or may not exist. |
32 |
I don't have the first option enabled here so don't see the second, and |
33 |
don't have that proc file. |
34 |
|
35 |
However, you did say "try". If genkernel enables it by default, |
36 |
presumably those using genkernel would either have the file, or would |
37 |
know enough about kernel functionality to either fix the problem on their |
38 |
own or at least be able to translate your instructions into something |
39 |
approaching "copy your kernel config from wherever you put it to the |
40 |
kernel working dir". |
41 |
|
42 |
Talking about the kernel working dir, it's also worth noting that can be |
43 |
set as well, using the O=dir kernel make option (as mentioned in make |
44 |
help) or by setting and exporting the KBUILD_OUTPUT environmental |
45 |
variable appropriately. Setting that keeps the kernel sources pristine |
46 |
(save for the output-dir itself, if set to within the kernel tree as it |
47 |
will be if an absolute path is not used), with all output (including |
48 |
the .config file) directed to the output dir, thus making cleanup far |
49 |
easier as well as tracking a kernel git repository, for those who wish to |
50 |
do so. I've used "outputdir" as my build/working dir for some time, so |
51 |
have /usr/src/linux/outputdir/.config instead of /usr/src/linux/.config . |
52 |
|
53 |
Note that for purposes of building out-of-tree kernel modules such as |
54 |
the ati-drivers under discussion here, exporting KBUILD_OUTPUT is |
55 |
easiest, and setting it in make.conf should be all that's necessary for |
56 |
packages installed using portage. |
57 |
|
58 |
-- |
59 |
Duncan - List replies preferred. No HTML msgs. |
60 |
"Every nonfree program has a lord, a master -- |
61 |
and if you use the program, he is your master." Richard Stallman |