LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-03-2005, 09:12 AM   #1
speel
Member
 
Registered: Apr 2004
Location: queens , nyc
Distribution: Ubuntu MATE
Posts: 352

Rep: Reputation: 30
how could i compile a kernel using the old config


hey i would just like to know how to compile a 2.6 kern using the configure file that came with slack

thanks
 
Old 07-03-2005, 09:42 AM   #2
hamish
Member
 
Registered: Aug 2003
Location: Edinburgh
Distribution: Server: Gentoo2004; Desktop: Ubuntu
Posts: 720

Rep: Reputation: 30
I though that you could do:

cat /proc/config

but I just tried it and I don't have a config file is /proc/ . I was under the impression that /proc/ had a copy of the config file which was running in the current kernel. Maybe someone can tell you where it is.

Once you find it, you can cat /proc/config > /usr/src/linux/.config and then make the kernel.

hamish
 
Old 07-03-2005, 09:49 AM   #3
speel
Member
 
Registered: Apr 2004
Location: queens , nyc
Distribution: Ubuntu MATE
Posts: 352

Original Poster
Rep: Reputation: 30
hmm hey can i do make xconfig /usr/src/linux/.config?
 
Old 07-03-2005, 10:06 AM   #4
priller
Member
 
Registered: Jan 2004
Distribution: Debian etch
Posts: 202

Rep: Reputation: 30
You can probably copy /usr/src/linux/.config to where your new kernel is BUT is probably wont work if your building a 2.6 kernel.
 
Old 07-03-2005, 10:08 AM   #5
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,230

Rep: Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713
Why not just load the old config file from the menu,
if you use make xconfig ?
 
Old 07-03-2005, 12:20 PM   #6
maginotjr
Member
 
Registered: Aug 2004
Location: BR - Floripa
Distribution: Ubuntu 9.10 - 2.6.x.x
Posts: 661

Rep: Reputation: 34
#cp /boot/config /usr/src/linux/.config

or

#make oldconfig

or

#cp /usr/src/linux-2.(your old version)/.config /usr/src/linux/.config

or

#cp /usr/src/linux/arch/i386/defconfig /usr/src/linux/.config
(this will load the default configuration for your type of machine)

thats all.
 
Old 07-03-2005, 03:22 PM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977
the config module was changed to use a gzipped file, so /proc/config.gz would be the candidate these days IF there is one. and IF it is there, that's alwayd the very best way to use the current config, as as far as the actaul kernel image is concerned, it just plain can't be wrong.

Best way to actaully load a config is just goign to be to use the menu options within gconfig, xconfig, menuconfig etc...
 
Old 07-03-2005, 03:54 PM   #8
Slum
Member
 
Registered: May 2005
Location: Rhode Island, USA
Distribution: Slackware w/ bleeding edge kernel.
Posts: 37

Rep: Reputation: 15
You can't use a 2.4 config file for a 2.6 kernel. If Slackware came with 2.4, you'll get a boatload of errors trying to use that config file for the 2.6 kernel.
 
Old 07-04-2005, 06:42 AM   #9
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,230

Rep: Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713
Quote:
You can't use a 2.4 config file for a 2.6 kernel
True, the first time I configured a 2.6 kernel (2.6.0 or so)
I open 2 x terminals, one in the 2.4 sources tree and one
in the 2.6 sources tree, then I did make menuconfig on
both and set kernel 2.6 config accordingly to the 2.4 one

But the config scripts are smart though, so maybe it is
easier to load a 2.4 config in 2.6 menu config and then
correct the errors ?
 
Old 07-04-2005, 07:07 AM   #10
piete
Member
 
Registered: Apr 2005
Location: Havant, Hampshire, UK
Distribution: Slamd64, Slackware, PS2Linux
Posts: 465

Rep: Reputation: 44
Quote:
You can't use a 2.4 config file for a 2.6 kernel
Without changes you cannot. However, this has been accounted for, and as maginotjr has already pointed out, the command you want is:

Code:
prompt#  make oldconfig
This will take the .config file dumped into the tree and give you all the same options ticked in the new kernel source tree. Also, because it is clever, it will tell you what new options are available to you and give you the choice in y/n/M format per new option.

'Tis a cool command for "upgrading" kernels if you have a working kernel config for your machine already.

- Piete.
 
Old 07-04-2005, 01:41 PM   #11
maginotjr
Member
 
Registered: Aug 2004
Location: BR - Floripa
Distribution: Ubuntu 9.10 - 2.6.x.x
Posts: 661

Rep: Reputation: 34
Quote:
Quote:
You can't use a 2.4 config file for a 2.6 kernel


Without changes you cannot.
there is always a way, but always when compiling a new kernel its good (and recommended) to exploit all the options of the new kernel and choose what you really want and is best to your machine, so you can have a very bullet proof slackbox...

;D

you can always use some commands to help you finding the right chipsets and drivers:

#lspci
#lsmod
#cat /proc/pci
#dmesg

and a lot of more information in /proc, the time you lose selecting everything one by one it really worth.

regards

Last edited by maginotjr; 07-04-2005 at 01:45 PM.
 
Old 07-04-2005, 10:59 PM   #12
Slum
Member
 
Registered: May 2005
Location: Rhode Island, USA
Distribution: Slackware w/ bleeding edge kernel.
Posts: 37

Rep: Reputation: 15
Quote:
Originally posted by piete
Without changes you cannot. However, this has been accounted for, and as maginotjr has already pointed out, the command you want is:

Code:
prompt#  make oldconfig
This will take the .config file dumped into the tree and give you all the same options ticked in the new kernel source tree. Also, because it is clever, it will tell you what new options are available to you and give you the choice in y/n/M format per new option.

'Tis a cool command for "upgrading" kernels if you have a working kernel config for your machine already.

- Piete.
A "working kernel config" might also be highly bloated with tons of modules you don't need. Tis usually the norm with a default Slackware installation. As maginotjr points out, using those commands will help in selecting the *proper* drivers you need, rather than just compiling everything including stuff that's not even relevant to your architecture.
 
  


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
Kernel compile isn't reading my .config file...? R00ts Debian 4 03-21-2005 07:46 PM
How to run XFree86 config and kernal compile minm Linux - Software 4 07-23-2004 05:24 PM
Fedora2 kernel 2.6 compile. cant even make config (fixdep.c full of errors) qwijibow Linux - Software 4 06-20-2004 01:20 PM
Need a SIMPLE CONFIG file for Kernel compile bongski55 Linux - Newbie 1 09-02-2003 08:54 AM
kernel compile with spec. config Sammy2ooo Linux - Newbie 3 07-03-2003 01:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:58 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration