Click to See Complete Forum and Search --> : recompile kernel with current config ?


anton
10-10-2001, 10:29 PM
Hello,

I want to recompile kernel, and only thing to change there is from i386 to Athlon ...

but when I did that, everything was ok, but after I restarted, like half of the devices failed to initialize :( ... I think I configured it wrongly, good thing I had my old kernel as a back-up ...

so, r there any ways to upgrade kernel with current configs, but different cpu type ?

thx

slacker_x
10-10-2001, 10:39 PM
If you used the same kernel source to build the old kernel, then when you do make-xconfig, the old configuration should load by default....

bigrigdriver
10-11-2001, 12:41 AM
Here's a more detailed answer:
Use your file manager to get to /usr/src/linux_your_distro. Look for a file called .config, or some such thing. Note that,s dot config. If you don't see dot files, check 'view/hidden files' in your file manager to see them. Open that file and examine it: it should show you all the options you selected when you recompiled. Ignore the warning not to edit. Go ahead and edit, change the selections you want to change, and save it. Then, copy it to the next higher directory (/usr/src).
Start your recompile with the usual:
make clean, to clean up previous work.
Then
make xconfig (or your favorite configuration command).
Go through the configuration up to the part in which you select your cpu options, then save and exit. Reopen the .config file and look it over. If anything changed from the earlier file, reopen the earlier file (the one you copied to /usr/src) and edit it to show your cpu selections. Then save it and copy it back to /usr/src/linux_your_distro. That way, you've only changed the cpu options. (You may also edit the original configuration from the installation: in my distro it's /usr/src/linux_my_distro/.defconf, the configuration from the distro CD. Just edit the WHOLE THING[it's big], then copy it to a higher directory. Resume these instructions afer make xconfig). It'll work, no matter which method you use).
Thereafter, it's straightforward.
make dep
make zImage (or make bzImage)
make zdisk (or make bzdisk), your boot rescue disk.
make modules
make modules_install
/sbin/depmod -a

If this doesn't work (it's worked for me, all the times I've trashed my box), then email me. I won't shoot myself, but I might feel motivated to shoot someone else.

[ 11 October 2001: Message edited by: bigrigdriver ]

[ 11 October 2001: Message edited by: bigrigdriver ]

m3rlin
10-11-2001, 10:38 AM
aton, when i compiled my kernel to athlon i still use the i386 i just select other cpu, to intel to amd, and it worked. what's your architecture that you are trying to use?

anton
10-11-2001, 01:53 PM
oh .. wait... I'm stupid... I thought I could change the architecture :)

yes, it's i386 now ...

I wanted to change the cpu type then ... to Athlon ... would it make a lot of difference ? and how do I find for what it's compiled right now ?