Visit the LQ Articles and Editorials section
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


LinkBack Search this Thread
Old 12-22-2009, 05:21 AM   #31
Senior Member
Registered: Jul 2008
Location: /dev/null
Posts: 1,173
Blog Entries: 12

Rep: Reputation: 129Reputation: 129

I never do those steps separately. I also do: make -j3 or j5 depending on which machine I'm using, and then make modules_install. That's it.

Last edited by ~sHyLoCk~; 12-22-2009 at 06:17 AM.
Old 12-22-2009, 06:16 AM   #32
Senior Member
Registered: May 2008
Posts: 3,231

Rep: Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828
A "make -j3 bzImage modules" which is what I normally do, takes approx 15 minutes on my dual core2 E7400 (2.8ghz). 'top' shows my system as ~ 4-8% idle during the build process.
Old 08-22-2010, 07:51 AM   #33
LQ Newbie
Registered: Jul 2010
Posts: 4

Rep: Reputation: 1
The announcement of several new make scripts in the 2.6.32 release notes is very exciting.

1.8. Easy local kernel configuration

Most people uses the kernel shipped by distros - and that's good. But some people like to compile their own kernels from, or maybe they like following the Linux development and want to try it. Configuring your own kernel, however, has become a very difficult and tedious task - there're too many options, and some times userspace software will stop working if you don't enable some key option. You can use a standard distro .config file, but it takes too many time to compile all the options it enables.

To make easier the process of configuration, a new build target has been added: make localmodconfig. It runs "lsmod" to find all the modules loaded on the current running system. It will read all the Makefiles to map which CONFIG enables a module. It will read the Kconfig files to find the dependencies and selects that may be needed to support a CONFIG. Finally, it reads the .config file and removes any module "=m" that is not needed to enable the currently loaded modules. With this tool, you can strip a distro .config of all the unuseful drivers that are not needed in our machine, and it will take much less time to build the kernel. There's an additional "make localyesconfig" target, in case you don't want to use modules and/or initrds.
localmodconfig - Update current config disabling modules not loaded
localyesconfig - Update current config converting local mods to core

So if I run them in that order, first the 'make localmodconfig' should only enable modules that I have currently loaded then the 'make localyesconfig' should switch them from modules to compiled into the kernel when I build it -- this is isn't the case for me.

$ extract linux-2.6.35.tar.bz2 && cd linux-2.6.35
$ make mrproper
$ zcat /proc/config.gz > .config
$ make localmodconfig
$ make menuconfig
After running the the "make localmodconfig" script, have TONS of options that don't apply to my system flagged as modules when I inspect it via a "make menuconfig." For example:

Device Drivers>Graphics support>Direct Rendering Manager
<M> ATI Radeon[*] Enable modesetting on radeon by default
<M> Intel 830M, 845G, 852M, 855GM, 865G
<M> i915 driver
My system does not have ATI anything on board, nor does it have that those Intel chips.

Here is another representation that there are many extra module options:

My distro's kernel config I'm using as a starting point:
$ cat .config | grep =m | wc -l

The kernel config after I run the make localmodconfig:
cat .config-make | grep =m | wc -l
According to /proc/modules I only have 76 modules currently loaded:
$ cat /proc/modules | wc -l
What am I doing wrong?

Last edited by graysky1; 08-23-2010 at 03:41 AM.
Old 09-19-2010, 05:38 PM   #34
LQ Newbie
Registered: Jul 2010
Posts: 4

Rep: Reputation: 1
Solved. Tomk in this thread reported that for some reason, calling the script from the Makefile fails to give the advertised behavior. Running it yourself however, does!

# chmod +x ./scripts/kconfig/ && ./scripts/kconfig/ > config_strip
# mv config_strip .config
# make oldconfig
1 members found this post helpful.
Old 09-20-2010, 01:06 AM   #35
Registered: Apr 2004
Distribution: slack what ever
Posts: 776

Rep: Reputation: 88
Originally Posted by Jeebizz View Post

Does this also mean it will make sure that framebuffer options is also compiled? Seeing how one of the most common mistakes with a recompiled kernel is the forgetting to compile that feature, resulting in a blank screen at boot up.
can't happen the frame buffer is a graphic add on to the console
you would at least have text mode with limited color and you could still have graphics with svgalib
Old 10-05-2010, 07:10 AM   #36
Registered: Apr 2006
Location: Athens, Greece
Distribution: slack(64|32)_v(13.37|14.0), debian6, ubuntu
Posts: 629

Rep: Reputation: 36
Hello everyone!

Forgive me if this is a stupid question but looking around in kernel forums and in this thread I didn't see anyone mentioning exactly what will happen with unnecessary modules that are (by accident or mistakenly) compiled IN the kernel..

will localmodconfig remove these too?
Old 10-05-2010, 07:29 AM   #37
Didier Spaier
Senior Member
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware-14.0 on a Lenovo T61 6457-4XG
Posts: 3,638

Original Poster
Rep: Reputation: 827Reputation: 827Reputation: 827Reputation: 827Reputation: 827Reputation: 827Reputation: 827
make help says: "localmodconfig - Update current config disabling modules not loaded".

In my understanding localmodconfig preserve all previous configurations options *but* the modularized drivers' ones.

Thus if a driver was built-in in the previous kernel configuration, it will stay so.
1 members found this post helpful.
Old 10-05-2010, 10:16 AM   #38
Registered: Aug 2004
Location: near Marion, Ill
Distribution: Slackware 13.37
Posts: 216

Rep: Reputation: 17
If I do this on my system will I need to edit Lilo, or will it compile with the same name?
Old 10-05-2010, 12:20 PM   #39
Didier Spaier
Senior Member
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware-14.0 on a Lenovo T61 6457-4XG
Posts: 3,638

Original Poster
Rep: Reputation: 827Reputation: 827Reputation: 827Reputation: 827Reputation: 827Reputation: 827Reputation: 827
Whenever you update your kernel configuration, for the new kernel to be build and used you need to:
- compile the kernel, compile and install the modules,
- install the new kernel (usually in the /boot directory),
- update /etc/lilo.conf accordingly,
- then then run lilo

To be able to go back to the previous situation easily:
1) while configuring the kernel, go to "General setup" and input a "local version" character string which will be appended to the kernel release number. This way you will keep your old kernel and kernel modules "just in case". And instead of updating the old kernel name in /etc/lilo.conf, keep the old entry and add one for the new kernel.
2) run 'lilo -t -v" to check thet everything goes well before running "lilo".
1 members found this post helpful.



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
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
what am I missing in my kernel configuration, kernel panic Kristian2 Slackware 16 10-05-2009 07:01 PM
Hosed my kernel - LUKS partition is not making it easier king111 Linux - General 1 11-23-2008 02:24 PM
[SOLVED] Diff between Kernel Compilation and Kernel Configuration ?? vikas027 Linux - Enterprise 8 09-20-2008 01:01 AM
New FAQ topic: Should I edit my kernel configuration?/Should I build a custom kernel? chort *BSD 10 09-10-2004 11:15 PM
Windows route configuration easier than Linux??? hdalle Linux - Networking 5 08-25-2004 06:14 AM

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

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration