View previous topic :: View next topic |
Author |
Message |
braver n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 29 Dec 2006 Posts: 28
|
Posted: Mon Jan 22, 2007 5:47 am Post subject: /etc/kernels missing? |
|
|
I'm emerging suspend2-sources, using the .config I crafted before, and the kernel guide describes how:
http://www.gentoo.org/doc/en/kernel-upgrade.xml
Code Listing 10.1: Reusing your old config
# cd /usr/src/linux-2.6.9-gentoo-r2
# cp ../linux-2.6.9-gentoo-r1/.config .
# make oldconfig
Code Listing 10.2: Reusing your old config with genkernel
# cd /etc/kernels
# cp kernel-config-x86-2.6.9-gentoo-r1 kernel-config-x86-2.6.9-gentoo-r2
# genkernel all
However, on 2006.1, I don't have /etc/kernels, only /etc/genkernel.conf.
When I do genkernel all, I see it copied config from /usr/share/genkernel/x86/kernel-config-x86, so I replaced it with my .config as a quick and dirty fix. What's the right way to do it nowadays? Also, what about eselect for symlink?
Cheers,
Alexy |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Akhouk Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/4730619104577bab5a7815.png)
Joined: 23 May 2003 Posts: 476 Location: The Two Niles, Africa
|
Posted: Mon Jan 22, 2007 6:48 am Post subject: |
|
|
Did you compile your original kernel with genkernel?
genkernel by default take the kernel config from the /usr/share/genkernel/ directories and uses that. It then stores the kernel config in /etc/kernels once it has finished so next time it will use it from there for rebuilding. It seems you don't have an /etc/kernels because you didn't use genkernel for building the kernel.
If you are in doubt about where your kernel config is you can always copy the existing config from /proc/config.gz (if you have it in your kernel), gunzip it and use genkernel with the --kernel-config flag to rebuild. _________________ AMD 64 3500+, 2Gb RAM DDR400, 2 x 180Gb SATA, 256Mb Nvidia |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
braver n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 29 Dec 2006 Posts: 28
|
Posted: Mon Jan 22, 2007 7:10 am Post subject: |
|
|
OK, will run genkernel to completion then... Is there any way to tell it to respect my separate build directory outside source? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Akhouk Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/4730619104577bab5a7815.png)
Joined: 23 May 2003 Posts: 476 Location: The Two Niles, Africa
|
Posted: Mon Jan 22, 2007 7:22 am Post subject: |
|
|
braver wrote: | OK, will run genkernel to completion then... Is there any way to tell it to respect my separate build directory outside source? |
Not sure what you mean. Do you mean to use compile from a different location other than from /usr/src ? If so you can use the --kerneldir= option to specify a different source location. _________________ AMD 64 3500+, 2Gb RAM DDR400, 2 x 180Gb SATA, 256Mb Nvidia |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
braver n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 29 Dec 2006 Posts: 28
|
Posted: Mon Jan 22, 2007 8:01 am Post subject: |
|
|
Actually, I mean the option
make O=/different/object/dir menuconfig
you can use in a kernel source dir, to keep it intact and pristine, compiling everything separately.
I found you can point --kerneldir at *that* build dir! Hurray! In a few minutes there'll hopefully be a gentoo-compiled object kernel directory separate from the kernel sources!
Why am I doing this? I share kernel source partition, mounting it from Gentoo, SuSE, or Arch on the same box. So the objects will be different as produced by slightly different gcc's, but the source can be the same! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
bLUEbYTE84 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/183171740846ef8aab80335.jpg)
Joined: 21 Jul 2006 Posts: 566 Location: universe.tar.gz, src/earth.h, struct homo_sapiens_table
|
Posted: Mon Jan 22, 2007 8:44 pm Post subject: |
|
|
There is another way of getting configuration file from a running kernel, provided that this support has been compiled:
Code: | make distclean
zcat /proc/config.gz > ./.config |
in the new kernel dir, and then make oldconfig.
distclean is optional |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|