LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-30-2003, 08:34 PM   #1
Juniper34
LQ Newbie
 
Registered: Jul 2003
Distribution: Slackware 9.0, Mandrake 8.0
Posts: 26

Rep: Reputation: 15
Files needed for recompile and missing Makefile


I am recompiling the kernel to drop Watchdog support. Yet I did not use the K series option during the install. I reckon this is why I don't have the kernel images and have an empty /usr/src/ ( missing linux and whatever files it places in there )I have not recompiled before and want to know what files need to be present when I go thru the process. I was going to load the files from the /kernel/bare.i directory from the iso disc into my /usr/src/linux( that I would have to create ) directory and run the make bzImage there. Do I need the other two files System.map and the config? Also I was going to copy the contents of boot into another directory for safe keeping, and not run make mrproper so DaOne's method will allow me to use the old kernel should things go wrong. Right now there is the boot image, the System.map and the config along with links pointing to them. Would I just add new links to the System.map, vmlinuz, and config that work point to the new files created during the process; I would still put them in /boot though ( its not clear to me why the links are used in the first place since they sit in the same directory). And since I am doing this without a Makefile is there anything I else I would need to do. I need some way of making a unique kernel name at least. Thanks for any help you can give.
 
Old 07-30-2003, 09:11 PM   #2
Azmeen
Senior Member
 
Registered: May 2003
Location: Malaysia
Distribution: Slackware, LFS, CentOS
Posts: 1,307

Rep: Reputation: 47
Check out the first thread in the Slackware Forum.
 
Old 07-30-2003, 10:04 PM   #3
Juniper34
LQ Newbie
 
Registered: Jul 2003
Distribution: Slackware 9.0, Mandrake 8.0
Posts: 26

Original Poster
Rep: Reputation: 15
Missing Makefile

DaOne's post mentions the use of the Makefile. I do not have one in /usr/src/linux/. usr/src/ is actually empty. Is there something I missed in the install or do you know of some way to getting the contents of the linux directory?
thanks
 
Old 07-31-2003, 02:05 AM   #4
Azmeen
Senior Member
 
Registered: May 2003
Location: Malaysia
Distribution: Slackware, LFS, CentOS
Posts: 1,307

Rep: Reputation: 47
You got to download the kernel source from http://kernel.org first.
 
Old 07-31-2003, 08:23 AM   #5
Juniper34
LQ Newbie
 
Registered: Jul 2003
Distribution: Slackware 9.0, Mandrake 8.0
Posts: 26

Original Poster
Rep: Reputation: 15
missing Makefile

Thanks I was wondering where that came from. If i wanted to use kernel from the distrubtion cd could I get away with not running the make install command. Since what DaOne said here.

>Note: The 'make install' command is the one that most don't use
>but it works fine in slackware as long as you have prepared >lilo.conf and edited Makefile according to the instructions above.

And I guess along with that would I just be able to use the files found in the kernels/bare.i directory on the distribution cd to recompile.
thanks again for the help
 
Old 07-31-2003, 11:32 AM   #6
Azmeen
Senior Member
 
Registered: May 2003
Location: Malaysia
Distribution: Slackware, LFS, CentOS
Posts: 1,307

Rep: Reputation: 47
Make install is optional, sometimes even easily forgettable. To tell you frankly I never used it myself... ever! I'd rather prepare my lilo.conf by hand

No problem... you did most of the hard work yourself
 
Old 07-31-2003, 03:26 PM   #7
Juniper34
LQ Newbie
 
Registered: Jul 2003
Distribution: Slackware 9.0, Mandrake 8.0
Posts: 26

Original Poster
Rep: Reputation: 15
recompile without K series and kernel.org

Ok I took the files System.map.gz, bzImage, and config out of the kernels/bare.i directory and attempted to make menuconfig which resulted in

make: *** No rule to make target menuconfig. Stop

and make config gave

make: Nothing to be done for 'config'

I tried running a script from the kernels directory on the cd call compile_kern.sh, but this seemed to assume I had the K series installed.

Has any one been able to get what they need from the cd for the recompile? I know I can go to kernel.org but I should be able to get the kernels from the cd right? Otherwise I'll just reinstall and select the K series. thanks
 
Old 07-31-2003, 07:09 PM   #8
Azmeen
Senior Member
 
Registered: May 2003
Location: Malaysia
Distribution: Slackware, LFS, CentOS
Posts: 1,307

Rep: Reputation: 47
That's not the way to do it... I don't know about the CD, I downloaded and burnt my Slack9 ISO. And the kernel source/headers are not in that CD. You'll only get the kernel source from the box-set Slackware 9 if you purchased it.

Therefore in my case, I had to download the full kernel source from kernel.org and used that to recompile my kernel based on my existing .config file.
 
Old 08-04-2003, 05:39 PM   #9
Juniper34
LQ Newbie
 
Registered: Jul 2003
Distribution: Slackware 9.0, Mandrake 8.0
Posts: 26

Original Poster
Rep: Reputation: 15
recompile and keeping old modules, and placement of config

I've been messing around with the recompile and looking around at the different posts and files. If I want to keep the modules setup could I give a name to the EXTRAVERSION= name field which would make another directory /usr/src/linux-2.4.20name. Otherwise I wonder if I might run into problems with the other version of the kernel trying to find the missing modules in the the original /usr/src/linux-2.4.20. I imagine there's also the /lib/modules/ which will have two sets for the different kernels as well.

Also I wanted to know from where is the kernel reading the config or .config file when compiling. Is it the config from /boot? I read somewhere the the config in /boot is not the one the kernel necessarily reads from. Anything to help clear this up would be much appreciated.
 
Old 08-04-2003, 07:18 PM   #10
Azmeen
Senior Member
 
Registered: May 2003
Location: Malaysia
Distribution: Slackware, LFS, CentOS
Posts: 1,307

Rep: Reputation: 47
The .config should be placed in your kernel source dir. ie. The same place where you ran ./configure.

The reason many put the .config in /boot (under a different but descriptive filename like config-kernelversion) is that you can re-use this config file to recompile a newer kernel. If you've had to select one-by-one your kernel settings from scratch, you'd realize how much time will be saved by re-using a previous version's config.

Let's say you have a config-2.4.20 file from /boot. You can copy this file to /usr/src/linux and rename it as .config. However, only copy this file after you have ran make mrproper. When you run make menuconfig or make xconfig, you will see the default selections is mostly from your older config. You can then choose to apply new settings (marked by (NEW)) or change your previous settings.
 
Old 08-05-2003, 12:23 AM   #11
Juniper34
LQ Newbie
 
Registered: Jul 2003
Distribution: Slackware 9.0, Mandrake 8.0
Posts: 26

Original Poster
Rep: Reputation: 15
.config

I just went thru the make .config and wanted to change only a few options can I just manually edit it instead of going thru the whole list again?

And your explanation from before really helped, thanks
 
Old 08-05-2003, 12:42 AM   #12
Azmeen
Senior Member
 
Registered: May 2003
Location: Malaysia
Distribution: Slackware, LFS, CentOS
Posts: 1,307

Rep: Reputation: 47
Sure you can, there's no stopping you. For me, I'm just a gutless coward who prefers to see what the heck I'm doing in plain English

Glad I can help, just drop me any questions you have, I am subscribed to this thread and get notifications on it everytime there's a response.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
keyboard missing after recompile - HELP aftertaf Mandriva 1 12-23-2004 11:54 PM
missing needed files for k3b joel b Linux - Newbie 2 12-09-2004 03:56 PM
spamassassin: makefile missing separator Andreja Linux - Software 1 05-31-2004 10:39 AM
Makefile help needed for linksys WPC11 v.4 duziq Linux - Newbie 8 12-10-2003 11:26 AM
Kernel recompile for NVIDIA needed .h files? britishnemesis Linux - General 2 11-03-2003 01:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration