Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
10-31-2004, 07:34 AM
|
#1
|
Member
Registered: Dec 2002
Location: Omaha, Nebraska
Distribution: Ubuntu 8.10
Posts: 79
Rep:
|
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.
|
|
|
10-31-2004, 08:17 AM
|
#2
|
Senior Member
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721
Rep:
|
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
|
|
|
10-31-2004, 08:23 AM
|
#3
|
LQ Newbie
Registered: Jan 2004
Location: ~
Posts: 28
Rep:
|
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.
|
|
|
10-31-2004, 08:29 AM
|
#4
|
Member
Registered: Oct 2003
Posts: 534
Rep:
|
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 
|
|
|
10-31-2004, 08:39 AM
|
#5
|
Senior Member
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721
Rep:
|
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
|
|
|
10-31-2004, 07:34 PM
|
#6
|
Member
Registered: Dec 2002
Location: Omaha, Nebraska
Distribution: Ubuntu 8.10
Posts: 79
Original Poster
Rep:
|
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!
|
|
|
11-01-2004, 11:20 AM
|
#7
|
Senior Member
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721
Rep:
|
well... i don't see no reason why NOT to do a " make clean " ?
if anyone does, plz. post it...
egag
|
|
|
11-01-2004, 02:46 PM
|
#8
|
Member
Registered: Aug 2003
Location: Denver, CO
Distribution: CentOS, Debian
Posts: 825
Rep:
|
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.
|
|
|
11-01-2004, 03:00 PM
|
#9
|
Senior Member
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140
|
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.
|
|
|
11-01-2004, 03:21 PM
|
#10
|
Member
Registered: Jun 2003
Location: Texas
Distribution: Slackware, NetBSD
Posts: 151
Rep:
|
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.
|
|
|
11-01-2004, 05:25 PM
|
#11
|
Senior Member
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721
Rep:
|
well, MCD, Cedrik & nick_th_fury,
thanks for clearing my head on this.
( and i was writing about saving time ...... ( tsk..tsk..tsk..  ) )
egag
|
|
|
11-01-2004, 11:02 PM
|
#12
|
Member
Registered: Dec 2002
Location: Omaha, Nebraska
Distribution: Ubuntu 8.10
Posts: 79
Original Poster
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 07:30 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|