LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   kernel compilation-From where it should be started for already compiled kernel (https://www.linuxquestions.org/questions/linux-newbie-8/kernel-compilation-from-where-it-should-be-started-for-already-compiled-kernel-353771/)

b0nd 08-16-2005 07:06 AM

kernel compilation-From where it should be started for already compiled kernel
 
Hello all,
I compiled Redhat 9.
Being a newbie i made small changes only.
Since it has been compiled perfectly...so i would like to move a step further.
When i was compiling for the first time, i reloaded the old
Code:

/boot/config-2.4.20-8
i gave the name to new kernel as kernel-2.4.2016.
but i'm not getting any file with the name /boot/.....( path to the folder in which all relevent files are..../config-2.4.2016

so what should i reload now ????
reloading config-2.4.20-8 will roll back the newly compiled kernel to the original one ( i suppose ).

regards

b0nd 08-16-2005 07:14 AM

or should it be this one
/usr/scr/linux( my extracted folder of the source )/.config

Vgui 08-16-2005 11:20 AM

Instead of using make menuconfig (or xconfig if you are a GUI person), you can do make oldconfig which will work from your previous .config file (if it is in the correct location).

masand 08-16-2005 01:04 PM

for each compilation save ur configuratin with a different name and if that works fine u can start with the last saved configuration and make changes to that

regards

b0nd 08-16-2005 01:23 PM

hi there,
Ya i'm saving the confiugration with new name.
But how should i start with the last saved configurtion????
Which file should i reload after doing
make xconfig

regards

masand 08-16-2005 01:57 PM

if u r satisfied with ur last kenrel and want to move ahaead and make changes in that
then load that file else u can choose any config file, load that settings and start working on it

regards

b0nd 08-16-2005 11:48 PM

Quote:

Taken from the article of DrOzz

----------------------------
Now Comes The Fun Part~!
----------------------------
make mrproper
**"this removes the current .config and other files"**

cp /usr/src/linux-2.4.x/.config /usr/src/linux
***this is if you want to use your old config***
But there is no ".config" file in my sysytem inside the quoted directories

what should i do now...???

regards

b0nd 08-17-2005 12:00 AM

HI,
just searched this article on google........

Quote:

I'm assuming here that the reader is capable of the basics in kernel
compiling, and is using something fairly compatible with my RedHat 2.4.3
kernel. Also, the ability to use X on the machine will help.

1) First step: make xconfig and once it's up, "Store Configuration
To File". Trust me, you want to do this, because your next step will
(or has in my experiences) wipe out your configuration settings, and
this will stop you from having to go back through and completely redo
your config. Quit make xconfig.
2) "make mrproper". Some of us (and I'd suspect, many of us) tend
to skip this step, possibly with the logic "I haven't changed much, so I
should just be able to start make dep ... " etc. Well, depending on
what you change, skipping this can cause your kernel compile to fail.
Near as I can tell (and I'm no expert), this is pretty much like a "make
very_clean".
3) Go back into "make xconfig" and then reload your stored
configuration ... unless you really want to go back through the entire
xconfig and redo it by hand.
Hope it will solve my problem......

regards

masand 08-17-2005 02:56 AM

Quote:

Originally posted by ruudra
But there is no ".config" file in my sysytem inside the quoted directories

what should i do now...???

regards

that is because ur trying to compile a 2.6 kenel with help from a doc for 2.4 kernel


regards

b0nd 08-17-2005 03:19 AM

not at all man !!!
Right from the starting i'm quoting that i'm trying to compile kernel 2.4, and following steps for it only.
I don't know the reason why it wasn't there
But now my problem has been solved.........i found the way of proceeding ahead with keeping the latest compiled files intact for new compilation...........and ya now ".config" file is there.
Any ways thanks to all concerned guys!!!

regards

masand 08-17-2005 12:25 PM

sorry for my mistake!!

just slipped out of my mind while posting that

sundialsvcs 08-17-2005 01:08 PM

A little potential problem with make oldconfig is that, if you happen to be compiling to remove "everything but the kitchen sink," the old config obviously still has them.

What I like to do is to (after carefully saving the existing .config in a completely different directory, and no longer as a hidden-file) run:
  • make mrproper (to clean the world...)
  • make defconfig (to build a "default" configuration that's actually somewhat smart)
  • make xconfig (to bring up the GUI and let me choose what I want).
  • Safely file a backup copy of the new configuration.
There's a lot of stuff you know you can safely remove, like dozens upon dozens of device drivers for cards that you don't have and never will. But otherwise it's a good idea to move slowly, changing only a few things at a time. Make frequent backup copies of your configurations as you go.


All times are GMT -5. The time now is 05:42 PM.