LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Files needed for recompile and missing Makefile (https://www.linuxquestions.org/questions/linux-newbie-8/files-needed-for-recompile-and-missing-makefile-77479/)

Juniper34 07-30-2003 08:34 PM

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.

Azmeen 07-30-2003 09:11 PM

Check out the first thread in the Slackware Forum.

Juniper34 07-30-2003 10:04 PM

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

Azmeen 07-31-2003 02:05 AM

You got to download the kernel source from http://kernel.org first.

Juniper34 07-31-2003 08:23 AM

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 :)

Azmeen 07-31-2003 11:32 AM

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 :)

Juniper34 07-31-2003 03:26 PM

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

Azmeen 07-31-2003 07:09 PM

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.

Juniper34 08-04-2003 05:39 PM

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.

Azmeen 08-04-2003 07:18 PM

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.

Juniper34 08-05-2003 12:23 AM

.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

Azmeen 08-05-2003 12:42 AM

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 :p

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.


All times are GMT -5. The time now is 01:20 AM.