View previous topic :: View next topic |
Author |
Message |
lawilog n00b
Joined: 07 Sep 2007 Posts: 24
|
Posted: Sun Nov 29, 2009 4:14 pm Post subject: kernel 2.6.32 will support auto "current modules to con |
|
|
hi,
i have read that the new kernel 2.6.32 will support a new make target, which will enable exactly those modules in the kernel config, which are currently loaded. that's why i had the idea that during the gentoo installation (when many modules have been automaticcaly loaded from the boot cd) this could be used to create a basic configuration right before the user runs "make menuconfig" for the first time. what do you think about that?
Lars |
|
Back to top |
|
|
d2_racing Bodhisattva
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Sun Nov 29, 2009 4:37 pm Post subject: |
|
|
If the user doesn't compile his own kernel, then Genkernel handle it actually pretty well right now. |
|
Back to top |
|
|
lawilog n00b
Joined: 07 Sep 2007 Posts: 24
|
Posted: Sun Nov 29, 2009 4:56 pm Post subject: |
|
|
right, but most gentoo users i know do compile their own kernel. |
|
Back to top |
|
|
djdunn l33t
Joined: 26 Dec 2004 Posts: 810
|
Posted: Sun Nov 29, 2009 6:52 pm Post subject: |
|
|
it would save a lot of time cause your not trying to find stuff in the config _________________ “Music is a moral law. It gives a soul to the Universe, wings to the mind, flight to the imagination, a charm to sadness, gaiety and life to everything. It is the essence of order, and leads to all that is good and just and beautiful.”
― Plato |
|
Back to top |
|
|
luispa Guru
Joined: 17 Mar 2006 Posts: 359 Location: España
|
Posted: Sun Nov 29, 2009 6:56 pm Post subject: Re: kernel 2.6.32 will support auto "current modules to |
|
|
lawilog wrote: | what do you think about that?
Lars |
Very good idea
Luis |
|
Back to top |
|
|
costel78 Guru
Joined: 20 Apr 2007 Posts: 402
|
Posted: Sun Nov 29, 2009 9:46 pm Post subject: |
|
|
What is exactly the name of that target ? I'm unable to find nothing related.
Thank you.
Later: localmodconfig - it was my bad English. devfs 2.0 look impresive, also. _________________ Sorry for my English. I'm still learning this language. |
|
Back to top |
|
|
Randy Andy Veteran
Joined: 19 Jun 2007 Posts: 1148 Location: /dev/koelsch
|
Posted: Mon Dec 07, 2009 11:36 am Post subject: more details regarding localmodconfig |
|
|
Below some details for information only:
Quote: | Zitat:
From: Steven Rostedt <rostedt <at> goodmis.org>
Subject: [PATCH 00/15] [GIT PULL] kconfig: localmodconfig for v2.6.32
Newsgroups: gmane.linux.kbuild.devel, gmane.linux.kernel
Date: 2009-09-11 19:58:49 GMT (11 weeks, 5 days, 13 hours and 5 minutes ago)
Linus,
This is the patch set that creates localmodconfig and localyesconfig.
This will facilitate testers by removing the thousand modules that
distributions enable with only the ones that they have loaded.
Yes it may miss usb devices that you don't have plugged in, but it will
save a lot of time in compiling by only compiling the code that you
have loaded.
The usage is quite simple. Just download the latest kernel.org kernel
(with this changeset in), cd to that directory and then do:
make localmodconfig
It will search for a .config locally first, then will look for
/proc/config.gz, then it will search the /boot directory for configs
matching the local kernel (uname -r). If it still does not find one
It search for configurations in the local binarys (vmlinux, /lib/modules..,
kernel/configs.ko, etc).
Once it finds a config to use, it will then read all the Kconfigs
and Makefiles to find out what config compiles what module. Then lsmod
is used to see what modules are loaded, and it will keep enabled all
the configs (including dependencies) that those modules require to
build. It disables all modules not needed.
Note, it only disables it does not enable, because a lot of modules
can be enabled by more than one config, and I don't want to guess.
I could someday enable easy configs (1 to 1 matches of config to module).
It also does nothing with built in code (=y). It does not enable or
disable them.
I've been using this code (various versions of) since 2005, and
so have others. When I get a new box, the first thing I do is
boot up the distribution kernel, download kernel.org kernel, and run
this script to get the modules needed to boot the kernel.
** CONFLICTS **
linux-next has proven that there is a conflict between these patches
and Sam Ravnborg's tree. I've tried to get in contact with Sam, but
he seems to be out. I don't want to hold up this push on that account.
But if you want, I could wait to fix the conflicts, or you can pull
this and he can fix it on his end. I'm fine with it. I just think
that this tool is important enough to get into mainline, especially
early in the merge window since it will help others test it.
Please pull kconfig updates for v2.6.32 from:
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-kconfig.git
for-linus
Steven Rostedt (15):
kconfig: add streamline_config.pl to scripts
kconfig: make localmodconfig to run streamline_config.pl
kconfig: add make localyesconfig option
kconfig: streamline_config.pl do not stop with no depends
kconfig: do not warn about modules built in
kconfig: enable CONFIG_IKCONFIG from streamline_config.pl
kconfig: add check if end exists in extract-ikconfig
kconfig: have extract-ikconfig read ELF files
kconfig: keep config.gz around even if CONFIG_IKCONFIG_PROC is not set
kconfig: search for a config to base the local(mod|yes)config on
kconfig: unset IKCONFIG_PROC and clean up nesting
kconfig: test for /boot/config-uname after /proc/config.gz in localconfig
kconfig: make local .config default for streamline_config
kconfig: test if a .config already exists
kconfig: add missing dependency of conf to localyesconfig
----
kernel/Makefile | 2 +-
scripts/extract-ikconfig | 14 ++
scripts/kconfig/Makefile | 34 +++-
scripts/kconfig/streamline_config.pl | 366 ++++++++++++++++++++++++++++++++++
4 files changed, 414 insertions(+), 2 deletions(-)
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
|
Code: |
/pub/scm / linux/kernel/git/torvalds/linux-2.6.git / commitdiff
? search: re
summary | shortlog | log | commit | commitdiff | tree
raw | patch (parent: 03fa25d)
kconfig: add make localyesconfig option
author Steven Rostedt <srostedt@redhat.com>
Thu, 30 Apr 2009 02:52:23 +0000 (22:52 -0400)
committer Steven Rostedt <rostedt@goodmis.org>
Wed, 19 Aug 2009 01:55:49 +0000 (21:55 -0400)
This adds the option localyesconfig to make. This is similar to
localmodconfig, but after it removes unnecessary modules it runs
sed -i s/=m/=y/
on the .config file. It then runs "make silentoldconfig" to fix any
wholes that were created by the conversion of modules to core.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
scripts/kconfig/Makefile
patch | blob | history
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index e4d8394..12a4d9e 100644 (file)
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -3,7 +3,7 @@
# These targets are used from top-level makefile
PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config \
- localmodconfig
+ localmodconfig localyesconfig
ifdef KBUILD_KCONFIG
Kconfig := $(KBUILD_KCONFIG)
@@ -38,6 +38,16 @@ localmodconfig: $(obj)/streamline_config.pl $(obj)/conf
mv -f .config.old.1 .config.old)
$(Q)rm -f .tmp.config
+localyesconfig: $(obj)/streamline_config.pl
+ $(Q)perl $< $(Kconfig) > .tmp.config
+ $(Q)sed -i s/=m/=y/ .tmp.config
+ $(Q)cmp -s .tmp.config .config || \
+ (mv -f .config .config.old.1; \
+ mv -f .tmp.config .config; \
+ $(obj)/conf -s $(Kconfig); \
+ mv -f .config.old.1 .config.old)
+ $(Q)rm -f .tmp.config
+
# Create new linux.pot file
# Adjust charset to UTF-8 in .po file to accept UTF-8 in Kconfig files
# The symlink is used to repair a deficiency in arch/um
@@ -94,6 +104,7 @@ help:
@echo ' gconfig - Update current config utilising a GTK based front-end'
@echo ' oldconfig - Update current config utilising a provided .config as base'
@echo ' localmodconfig - Update current config disabling modules not loaded'
+ @echo ' localyesconfig - Update current config converting local mods to core'
@echo ' silentoldconfig - Same as oldconfig, but quietly, additionally update deps'
@echo ' randconfig - New config with random answer to all options'
@echo ' defconfig - New config with default answer to all options'
Cache Last Updated: Thu Dec 3 08:12:02 2009 GMT
Linus' kernel tree
RSS Atom
|
_________________ If you want to see a Distro done right, compile it yourself! |
|
Back to top |
|
|
d2_racing Bodhisattva
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Mon Dec 07, 2009 1:01 pm Post subject: |
|
|
Do we really needs this option if you use a custom kernel :
Code: |
make localmodconfig
|
Maybe this command doesn't concern Gentoo if you don't use Genkernel. |
|
Back to top |
|
|
Randy Andy Veteran
Joined: 19 Jun 2007 Posts: 1148 Location: /dev/koelsch
|
Posted: Tue Dec 08, 2009 7:44 am Post subject: |
|
|
As far as i understand this option, it is very helpful to get to a customized kernel.
My future strategie to built a new customized kernel would be:
Running a kernel supporting nearly all options as a base. Special hardware which needs a loaded firmware to get recognized by the kernel should have loaded too.
Running make localmodconfig should configure automatically the needed modules, supporting your built in and connected hardware while running this script, for you.
This should be more easier than fiddleing around with the output of lspci lsmod lsusb and so on, to decide what's needed to built in to your kernel, to get a customized config only for your needs and the used hardware.
@d2_racing: Regarding your questions:
Especially when you want to built your customized kernel (not when you use it already, and it's complete and lean)
this option is very helpful.
And, if you doesn't use genkernel, you use a customized kernel, and so need it too.
Has anyone tried it?
I haven't had the time las weekend, cause Nikolaus... _________________ If you want to see a Distro done right, compile it yourself! |
|
Back to top |
|
|
d2_racing Bodhisattva
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Tue Dec 08, 2009 12:41 pm Post subject: |
|
|
I would like to know, if this new command remove the extra stuff that is using the [M] or it can even remove the extra stuff that is builtin inside the kernel. |
|
Back to top |
|
|
Randy Andy Veteran
Joined: 19 Jun 2007 Posts: 1148 Location: /dev/koelsch
|
Posted: Tue Dec 08, 2009 1:43 pm Post subject: |
|
|
As my posted info said, in short form...
This will facilitate testers by removing the thousand modules that
distributions enable with only the ones that they have loaded.
Then lsmod
is used to see what modules are loaded, and it will keep enabled all
the configs (including dependencies) that those modules require to
build. It disables all modules not needed.
Note, it only disables it does not enable, because a lot of modules
can be enabled by more than one config, and I don't want to guess.
I could someday enable easy configs (1 to 1 matches of config to module).
It also does nothing with built in code (=y). It does not enable or
disable them.
_________________ If you want to see a Distro done right, compile it yourself! |
|
Back to top |
|
|
jeffk l33t
Joined: 13 Sep 2003 Posts: 671
|
Posted: Thu Feb 04, 2010 8:19 pm Post subject: |
|
|
This looks extremely helpful, and I would like to use it with genkernel 64-bit. On my gentoo machines, I started with the default config, and spend quite a bit of time in menuconfig paring down unwanted hardware module options. Sometimes one goes too far and it doesn't boot
Can anyone provide an example syntax to use this with genkernel? I would guess --makeopts= won't work, since localmodconfig is a make target.
Thanks. |
|
Back to top |
|
|
jeffk l33t
Joined: 13 Sep 2003 Posts: 671
|
Posted: Wed Feb 10, 2010 4:49 am Post subject: |
|
|
What is the definition of 'loaded modules only'? I was hoping to reduce the set to modules loaded by exiting hardware only. The modules loaded by LiveCDs such as SystemRescueCD, etc. seem to include many more:
Code: | (chroot) sysresccd # lsmod
Module Size Used by
video 19964 0
output 2656 1 video
r8169 30212 0
i2c_i801 9216 0
i2c_core 18256 1 i2c_i801
shpchp 31404 0
raid10 20848 0
raid456 47728 0
raid6_pq 78368 1 raid456
async_xor 3264 1 raid456
async_memcpy 2080 1 raid456
async_tx 2896 3 raid456,async_xor,async_memcpy
xor 4848 2 raid456,async_xor
raid1 21600 0
raid0 7108 0
sbp2 19852 0
ohci1394 27444 0
ieee1394 69000 2 sbp2,ohci1394
sl811_hcd 10784 0
usb_storage 43808 0
virtio_blk 6504 0
bnx2i 35740 0
cnic 22248 1 bnx2i
uio 10112 1 cnic
ipv6 279648 25 cnic
fcoe 17248 0
libfcoe 12692 1 fcoe
libfc 66896 2 fcoe,libfcoe
osst 47592 0
sym53c8xx 69816 0
atp870u 26448 0
hptiop 12704 0
ses 6208 0
enclosure 6992 1 ses
aic79xx 118860 0
aic7xxx 107996 0
aic94xx 66236 0
ppa 9884 0
raid_class 4848 0
sym53c500_cs 7760 0
qlogic_cs 5920 0
qlogicfas408 5040 1 qlogic_cs
aacraid 66312 0
imm 10412 0
parport 29904 2 ppa,imm
mvsas 42464 0
3w_xxxx 22816 0
initio 17240 0
gdth 77256 0
arcmsr 21712 0
stex 13780 0
tmscsim 18960 0
dc395x 30028 0
iscsi_tcp 11372 0
libiscsi_tcp 13556 1 iscsi_tcp
3w_9xxx 31812 0
a100u2w 9120 0
BusLogic 21552 0
libsrp 6000 0
libiscsi 32512 3 bnx2i,iscsi_tcp,libiscsi_tcp
st 34100 0
ch 11960 0
scsi_transport_srp 5424 0
scsi_transport_spi 21024 3 sym53c8xx,aic79xx,aic7xxx
qla4xxx 49672 0
scsi_transport_iscsi 24864 4 bnx2i,iscsi_tcp,libiscsi,qla4xxx
qla2xxx 212940 0
lpfc 368452 0
scsi_transport_fc 38548 4 fcoe,libfc,qla2xxx,lpfc
scsi_tgt 11072 3 libsrp,scsi_transport_srp,scsi_transport_fc
qla1280 21232 0
megaraid_sas 32924 0
megaraid 34564 0
pdc_adma 7412 0
sata_vsc 5956 0
sata_via 10020 0
sata_uli 4516 0
sata_sx4 10276 0
sata_svw 5572 0
sata_sis 5636 0
sata_sil 9496 0
sata_sil24 13380 0
sata_qstor 7524 0
sata_promise 11540 0
sata_nv 22508 0
sata_mv 26948 0
sata_inic162x 9332 0
pata_via 9592 0
pata_triflex 4420 0
pata_sl82c105 4864 0
pata_sis 11492 1 sata_sis
pata_sil680 6404 0
pata_serverworks 7088 0
pata_sch 3908 0
pata_pdc202xx_old 5552 0
pata_pdc2027x 7812 0
pata_pcmcia 11920 0
pata_opti 4052 0
pata_optidma 6008 0
pata_oldpiix 4356 0
pata_ns87415 4628 0
pata_ns87410 4144 0
pata_ninja32 4512 0
pata_netcell 3444 0
pata_marvell 3872 0
pata_jmicron 3408 0
pata_it821x 10756 0
pata_it8213 4772 0
pata_hpt3x3 4772 0
pata_hpt3x2n 6368 0
pata_hpt37x 12320 0
pata_hpt366 6560 0
pata_efar 4708 0
pata_cypress 3952 0
pata_cs5530 5968 0
pata_cs5520 5888 0
pata_cmd64x 7008 0
pata_cmd640 4816 0
pata_atiixp 4896 0
pata_artop 5988 0
pata_amd 11940 0
pata_ali 10768 0
pata_acpi 4464 0
scsi_wait_scan 1184 0
ata_generic 4660 0 |
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|