How do I make a change to a current kernel? Would 'make oldconfig' work...
SlackwareThis 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.
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.
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.
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.
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
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.
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.
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.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.