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.
|
|
04-29-2008, 12:37 PM
|
#1
|
Member
Registered: Feb 2008
Posts: 201
Rep:
|
Recompiling kernel in Slackware, any special commands?
If I need to edit my .config file in my kernel, all I need to do is
Code:
make xconfig
#patch kernel, reconfigure parts, etc.
make
make modules_install
make install
Correct?
Make takes over 15 minutes to do, is there any way to speed it up?
Do I need to run mkinitrd each time I recompile my kernel?
Thank you for answering my questions.
~Romanus
|
|
|
04-29-2008, 12:38 PM
|
#2
|
Member
Registered: Aug 2003
Location: Somewhere
Distribution: Gentoo (for now)
Posts: 364
Rep:
|
you cant wait 15mins ? - only way to speed it up it to remove what you don't need
|
|
|
04-29-2008, 12:57 PM
|
#3
|
Senior Member
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,639
Rep:
|
Quote:
Originally Posted by Romanus81
If I need to edit my .config file in my kernel, all I need to do is
Code:
make xconfig
#patch kernel, reconfigure parts, etc.
make
make modules_install
make install
Correct?
Make takes over 15 minutes to do, is there any way to speed it up?
Do I need to run mkinitrd each time I recompile my kernel?
Thank you for answering my questions.
~Romanus
|
You will need to rerun lilo and mkinitrd. Personally I do not "make install", but manually copy the new image into /boot and edit lilo.conf. Don't blow away your working kernel until you've tested your new one. Notice that mkinitrd allows you change the name of the initrd.img so, again, you don't over-write your working configuration until you've tested your new one.
Brian
|
|
|
04-29-2008, 01:55 PM
|
#4
|
Member
Registered: Sep 2004
Location: UK, Europe
Distribution: Slackware64
Posts: 761
Rep:
|
If you build in the drivers for stuff you need to boot the system into your custom kernel (e.g. file systems, drive controllers, etc) you can bypass the need for the initrd as well.
|
|
|
04-30-2008, 06:20 PM
|
#5
|
Senior Member
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,367
|
The best (or one of the best) kernel building guides for Slackware is available here, provided by Alien Bob: http://alien.slackbook.org/dokuwiki/...kernelbuilding
I prefer manually copying over the (very few) files needed instead of running `make install` just so I know exactly what I did and so it's basically impossible to screw anything up at all (the only possible system-wide screw-up is `make modules_install`, but as long as you're not compiling an identical kernel version as an already installed kernel, or if you changed the EXTRAVERSION option to prevent overwriting a directory in /lib/modules/, you should be fine). As a side note, if you build the kernel in your user's home directory (or even better a directory within your user's home directory... ) then the ONLY commands needed to be run as root are `make modules_install` and when copying stuff over to /boot.
If you compile the filesystem used on your root partition (/) into the kernel, then you shouldn't need an initrd except in special cases. Otherwise, yes, you will need an initrd.
|
|
|
05-02-2008, 09:51 PM
|
#6
|
Senior Member
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482
|
Quote:
Make takes over 15 minutes to do, is there any way to speed it up?
|
In those immortal words: Patience Grasshopper!
When I compiled my new kernel on my old 350 MHz PII, I needed 3-1/4 hours or so. With my new 2.3 GHz BE-2400 dual core AM2 and 2 GB of RAM (been 10 years since I bought a new box!) --- using the make -j4 option, I now compile the kernel in about 15 minutes. I'm like a pig in mud having to now "wait" a whopping 15 minutes.
|
|
|
05-03-2008, 05:49 AM
|
#7
|
Member
Registered: Apr 2008
Location: Berlin, Germany
Distribution: Slackware, Debian, NetBSD
Posts: 80
Rep:
|
*) You don't need to rebuild your initrd.gz if the kernel version is the same.
*) If you don't do 'make clean' in the kernel source tree, the second build should be much faster if you just change a few things.
|
|
|
05-03-2008, 07:41 AM
|
#8
|
Senior Member
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810
|
Quote:
Make takes over 15 minutes to do, is there any way to speed it up?
|
Took me 6 hours first time I did it. Fifteen minutes is just time for a coffee !
|
|
|
05-03-2008, 01:08 PM
|
#9
|
Senior Member
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,367
|
Quote:
Originally Posted by Rupa
If you don't do 'make clean' in the kernel source tree, the second build should be much faster if you just change a few things.
|
Although that approach may offer instant gratification (a quicker compile) I'd be wary of using it. Depending on what you changed in the kernel, it can be fine -- but if you don't know what you're doing it may do strange things. I always make sure to run `make mrproper` (or `make clean`) before compiling -- even immediately after untarring the sources (they're not always perfect when you download them).
|
|
|
All times are GMT -5. The time now is 10:30 PM.
|
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
|
|