LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 10-31-2004, 07:34 AM   #1
jtp51
Member
 
Registered: Dec 2002
Location: Omaha, Nebraska
Distribution: Ubuntu 8.10
Posts: 79

Rep: Reputation: 15
How do I make a change to a current kernel? Would 'make oldconfig' work...


Question:

How do I make a change to a current kernel?

Summary:

I am on kernel 2.6.7 and I would like to make a change to the kernel. Would 'make oldconfig' work?

For example:

  • cd into /usr/src/linux-2.6.7
  • make oldconfig
  • select your changes and save the .config file


Afterwards, would I just run the normal commands in order:

  • make dep
  • make clean
  • make bzImage
  • cp bzImage -> /boot/vmlinuz-2.6.7 (...thus replacing the old image)
  • make
  • make install
  • make modules
  • make modules_install


In a nutshell:

What are the proper steps to just make a change to the kernel and keep everything else.


Thank you for reading this post.
 
Old 10-31-2004, 08:17 AM   #2
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 52
hi,

make sure you have the config file of your current kernel in /usr/src/linux-2.6.7.(as .config )
cd to that dir. . and type " make xconfig " ( that's the one i always use )
make your changes and save the new config-file.
then , if you didn't add any modules, you only need to do " make bzImage ".
this will buid a new kernel named /usr/src/linux-2.6.7/arch/i386/boot/bzImage
copy that to your /boot dir., renaming it as the name you want.

egag
 
Old 10-31-2004, 08:23 AM   #3
vegpl
LQ Newbie
 
Registered: Jan 2004
Location: ~
Posts: 28

Rep: Reputation: 15
You can do a make xconfig and load your current configuration or like you said just do make oldconfig. When you're done just follow the steps you listed but don't do a make clean.
 
Old 10-31-2004, 08:29 AM   #4
rotvogel
Member
 
Registered: Oct 2003
Posts: 534

Rep: Reputation: 30
If you want to change an already running kernel make oldconfig is not the right thing to do I think.
Code:
cd /usr/src/your-kernel-dir
# one of the following:
make menuconfig | xconfig | gconfig
# save your changes  
make clean
make
make modules_install
cp arch/i386/boot/bzImage /boot/vmlinuz-2.6.7-<version>
cp System.map /boot/System.map-2.6.7-<version>
cp .config /boot/config-2.6.7-<version>
# edit lilo.conf to reflect changes
lilo
This is the way I should do it. Make dep is not necessary in 2.6.x kernels.
See make help in the kernel source dir for more information and the README file as well
 
Old 10-31-2004, 08:39 AM   #5
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 52
if you only made a change in the kernel, there's no need to compile and install the modules again.
( just save's some time making only a bzImage )

egag
 
Old 10-31-2004, 07:34 PM   #6
jtp51
Member
 
Registered: Dec 2002
Location: Omaha, Nebraska
Distribution: Ubuntu 8.10
Posts: 79

Original Poster
Rep: Reputation: 15
Thank you for all of the posts.

Hmmm... one says do a 'make clean' and another member says not too. Interesting.

I believe I will try to only make the bzImage as egag suggested.

I will post my results on this topic after I am done this evening.

Thanks again!
 
Old 11-01-2004, 11:20 AM   #7
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 52
well... i don't see no reason why NOT to do a " make clean " ?
if anyone does, plz. post it...

egag
 
Old 11-01-2004, 02:46 PM   #8
mcd
Member
 
Registered: Aug 2003
Location: Boulder, CO
Distribution: Slackware, RHEL, CentOS
Posts: 825

Rep: Reputation: 33
just a quick note, i had to recompile several times over the weekend because i made small errors and needed 1 more option or whatever. i noticed that xconfig will load your current .config file, so you can make your single change, save and get out very quickly. also, make bzImage ran much, much, much faster after 1 change than it did the first time round. on my old POS make bzImage (after xconfig from scratch, lots of changes) took 25-35 minutes. when i made one change and ran make bzImage again, it was done in about 2 minutes. and as egag suggested, if you're only changing options that are being compiled into the kernel (if you're not changing anything marked 'm') then you don't need to rebuild your modules.
 
Old 11-01-2004, 03:00 PM   #9
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 242Reputation: 242Reputation: 242
egag> when you do a make clean, you delete all compiled code object files (*.o), so the next
compile come from "scratch", however if you don't, gcc won't compile these files as they are
already compiled and that save a lot of time, I think that's why vegpl suggested to not do it.
 
Old 11-01-2004, 03:21 PM   #10
nick_th_fury
Member
 
Registered: Jun 2003
Location: Texas
Distribution: Slackware, NetBSD
Posts: 150

Rep: Reputation: 23
Quote:
Originally posted by egag
well... i don't see no reason why NOT to do a " make clean " ?
if anyone does, plz. post it...

egag

Cause it makes your compile take alot longer.
If I'm just making a few changes to what I already have, I usually don't.
That way the time I wasted before is not wasted again.

I just 'make menuconfig', make my changes, save, & go right into 'make bzImage'.

Last edited by nick_th_fury; 11-01-2004 at 03:23 PM.
 
Old 11-01-2004, 05:25 PM   #11
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 52
well, MCD, Cedrik & nick_th_fury,
thanks for clearing my head on this.
( and i was writing about saving time ...... ( tsk..tsk..tsk.. ) )

egag
 
Old 11-01-2004, 11:02 PM   #12
jtp51
Member
 
Registered: Dec 2002
Location: Omaha, Nebraska
Distribution: Ubuntu 8.10
Posts: 79

Original Poster
Rep: Reputation: 15
Everything seems to have worked just fine with everyone's notes.

Everything seems to have worked just fine with everyone's notes.

As a test, the steps I used were to remove the rivafb support that was <*> compiled in the 2.4.26 kernel. Once I did that, I installed the Nvidia drivers and I didn't get the 'rivafb' warning message and everything works great.

Steps used:

1. make menuconfig'
2. make my changes
3. save .config file
4. 'make bzImage'
5. mv the current vmlinuz to vmlinuz.old
6. cp the bzImage to /boot/vmlinuz


Thank you for everyone's help.

Last edited by jtp51; 11-01-2004 at 11:03 PM.
 
  


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
change kernel configurations when use "make oldconfig" Gijet Red Hat 4 10-09-2006 07:23 PM
Help with make oldconfig/menuconfig fiasco beebelo Ubuntu 3 11-09-2005 11:15 AM
make oldconfig itzfritz Linux - General 4 10-26-2004 06:58 AM
'make' and 'make install' commands dont work on my system? ginda Linux - Newbie 9 04-18-2004 11:17 AM
What is the difference between 'make oldconfig' and 'make xconfig' davidas Linux - Newbie 2 04-07-2004 03:49 AM


All times are GMT -5. The time now is 04:47 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration