| View previous topic :: View next topic |
| Author |
Message |
gr0x0rd Apprentice


Joined: 12 Aug 2006 Posts: 273
|
Posted: Sat Nov 10, 2007 11:49 pm Post subject: Removing unused modules |
|
|
I've spent the last few hour searching the forums and the documentation for a way to safely remove redundant modules. Hopefully someone can let me know if I'm on the right track here... anyway.
I almost had everything working fine, except my IDE hard drive and cdrom. So I stated n00b'ing my way through my kernel options looking to enable the right settings to get them to show up. lspci -v shows
| Code: | 00:00.0 Host bridge: Intel Corporation 82P965/G965 Memory Controller Hub (rev 02)
Subsystem: ASUSTeK Computer Inc. Unknown device 81ea
Flags: bus master, fast devsel, latency 0
Capabilities: [e0] Vendor Specific Information
00:01.0 PCI bridge: Intel Corporation 82P965/G965 PCI Express Root Port (rev 02) (prog-if 00 [Normal decode])
Flags: bus master, fast devsel, latency 0
Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
I/O behind bridge: 00007000-00009fff
Memory behind bridge: ff700000-ff7fffff
Prefetchable memory behind bridge: 00000000bfe00000-00000000dfdfffff
Capabilities: [88] Subsystem: Intel Corporation Unknown device 0000
Capabilities: [80] Power Management version 3
Capabilities: [90] Message Signalled Interrupts: Mask- 64bit- Queue=0/0 Enable+
Capabilities: [a0] Express Root Port (Slot+), MSI 00
00:1a.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Contoller #4 (rev 02) (prog-if 00 [UHCI])
Subsystem: ASUSTeK Computer Inc. Unknown device 81ec
Flags: bus master, medium devsel, latency 0, IRQ 16
I/O ports at dc00 [size=32]
00:1a.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #5 (rev 02) (prog-if 00 [UHCI])
Subsystem: ASUSTeK Computer Inc. Unknown device 81ec
Flags: bus master, medium devsel, latency 0, IRQ 20
I/O ports at e000 [size=32]
00:1a.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 (rev 02) (prog-if 20 [EHCI])
Subsystem: ASUSTeK Computer Inc. Unknown device 81ec
Flags: bus master, medium devsel, latency 0, IRQ 18
Memory at ffaffc00 (32-bit, non-prefetchable) [size=1K]
Capabilities: [50] Power Management version 2
Capabilities: [58] Debug port
00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 02)
Subsystem: ASUSTeK Computer Inc. Unknown device 81ec
Flags: bus master, fast devsel, latency 0, IRQ 3
Memory at ffaf8000 (64-bit, non-prefetchable) [size=16K]
Capabilities: [50] Power Management version 2
Capabilities: [60] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 Enable-
Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00
00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 02) (prog-if 00 [Normal decode])
Flags: bus master, fast devsel, latency 0
Bus: primary=00, secondary=04, subordinate=04, sec-latency=0
Prefetchable memory behind bridge: 00000000dfe00000-00000000dfefffff
Capabilities: [40] Express Root Port (Slot+), MSI 00
Capabilities: [80] Message Signalled Interrupts: Mask- 64bit- Queue=0/0 Enable+
Capabilities: [90] Subsystem: ASUSTeK Computer Inc. Unknown device 81ec
Capabilities: [a0] Power Management version 2
00:1c.3 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 4 (rev 02) (prog-if 00 [Normal decode])
Flags: bus master, fast devsel, latency 0
Bus: primary=00, secondary=03, subordinate=03, sec-latency=0
I/O behind bridge: 0000b000-0000bfff
Memory behind bridge: ff900000-ff9fffff
Capabilities: [40] Express Root Port (Slot+), MSI 00
Capabilities: [80] Message Signalled Interrupts: Mask- 64bit- Queue=0/0 Enable+
Capabilities: [90] Subsystem: ASUSTeK Computer Inc. Unknown device 81ec
Capabilities: [a0] Power Management version 2
00:1c.4 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 5 (rev 02) (prog-if 00 [Normal decode])
Flags: bus master, fast devsel, latency 0
Bus: primary=00, secondary=02, subordinate=02, sec-latency=0
I/O behind bridge: 0000a000-0000afff
Memory behind bridge: ff800000-ff8fffff
Capabilities: [40] Express Root Port (Slot+), MSI 00
Capabilities: [80] Message Signalled Interrupts: Mask- 64bit- Queue=0/0 Enable+
Capabilities: [90] Subsystem: ASUSTeK Computer Inc. Unknown device 81ec
Capabilities: [a0] Power Management version 2
00:1d.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1 (rev 02) (prog-if 00 [UHCI])
Subsystem: ASUSTeK Computer Inc. Unknown device 81ec
Flags: bus master, medium devsel, latency 0, IRQ 19
I/O ports at d480 [size=32]
00:1d.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #2 (rev 02) (prog-if 00 [UHCI])
Subsystem: ASUSTeK Computer Inc. Unknown device 81ec
Flags: bus master, medium devsel, latency 0, IRQ 17
I/O ports at d800 [size=32]
00:1d.2 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #3 (rev 02) (prog-if 00 [UHCI])
Subsystem: ASUSTeK Computer Inc. Unknown device 81ec
Flags: bus master, medium devsel, latency 0, IRQ 18
I/O ports at d880 [size=32]
00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 02) (prog-if 20 [EHCI])
Subsystem: ASUSTeK Computer Inc. Unknown device 81ec
Flags: bus master, medium devsel, latency 0, IRQ 19
Memory at ffaff800 (32-bit, non-prefetchable) [size=1K]
Capabilities: [50] Power Management version 2
Capabilities: [58] Debug port
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev f2) (prog-if 01 [Subtractive decode])
Flags: bus master, fast devsel, latency 0
Bus: primary=00, secondary=05, subordinate=05, sec-latency=32
Capabilities: [50] Subsystem: ASUSTeK Computer Inc. Unknown device 81ec
00:1f.0 ISA bridge: Intel Corporation 82801HB/HR (ICH8/R) LPC Interface Controller (rev 02)
Subsystem: ASUSTeK Computer Inc. Unknown device 81ec
Flags: bus master, medium devsel, latency 0
Capabilities: [e0] Vendor Specific Information
00:1f.2 IDE interface: Intel Corporation 82801H (ICH8 Family) 4 port SATA IDE Controller (rev 02) (prog-if 8f [Master SecP SecO PriP PriO])
Subsystem: ASUSTeK Computer Inc. Unknown device 81ec
Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 17
I/O ports at ec00 [size=8]
I/O ports at e880 [size=4]
I/O ports at e800 [size=8]
I/O ports at e480 [size=4]
I/O ports at e400 [size=16]
I/O ports at e080 [size=16]
Capabilities: [70] Power Management version 3
00:1f.3 SMBus: Intel Corporation 82801H (ICH8 Family) SMBus Controller (rev 02)
Subsystem: ASUSTeK Computer Inc. Unknown device 81ec
Flags: medium devsel, IRQ 10
Memory at 88000000 (32-bit, non-prefetchable) [disabled] [size=256]
I/O ports at 0400 [size=32]
00:1f.5 IDE interface: Intel Corporation 82801H (ICH8 Family) 2 port SATA IDE Controller (rev 02) (prog-if 85 [Master SecO PriO])
Subsystem: ASUSTeK Computer Inc. Unknown device 81ec
Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 17
I/O ports at d400 [size=8]
I/O ports at d080 [size=4]
I/O ports at d000 [size=8]
I/O ports at cc00 [size=4]
I/O ports at c880 [size=16]
I/O ports at c800 [size=16]
Capabilities: [70] Power Management version 3
01:00.0 VGA compatible controller: ATI Technologies Inc R580 [Radeon X1900 XT] (Primary) (prog-if 00 [VGA])
Subsystem: ATI Technologies Inc Unknown device 0412
Flags: bus master, fast devsel, latency 0, IRQ 16
Memory at c0000000 (64-bit, prefetchable) [size=256M]
Memory at ff7f0000 (64-bit, non-prefetchable) [size=64K]
I/O ports at 9000 [size=256]
Expansion ROM at ff7c0000 [disabled] [size=128K]
Capabilities: [50] Power Management version 2
Capabilities: [58] Express Endpoint, MSI 00
Capabilities: [80] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 Enable-
01:00.1 Display controller: ATI Technologies Inc R580 [Radeon X1900 XT] (Secondary)
Subsystem: ATI Technologies Inc Unknown device 0413
Flags: bus master, fast devsel, latency 0
Memory at ff7e0000 (64-bit, non-prefetchable) [size=64K]
Capabilities: [50] Power Management version 2
Capabilities: [58] Express Endpoint, MSI 00
02:00.0 SATA controller: JMicron Technologies, Inc. JMicron 20360/20363 AHCI Controller (rev 02) (prog-if 01 [AHCI 1.0])
Subsystem: ASUSTeK Computer Inc. Unknown device 81e4
Flags: bus master, fast devsel, latency 0, IRQ 11
Memory at ff8fe000 (32-bit, non-prefetchable) [size=8K]
Expansion ROM at ff8e0000 [disabled] [size=64K]
Capabilities: [68] Power Management version 2
Capabilities: [50] Express Legacy Endpoint, MSI 01
02:00.1 IDE interface: JMicron Technologies, Inc. JMicron 20360/20363 AHCI Controller (rev 02) (prog-if 85 [Master SecO PriO])
Subsystem: ASUSTeK Computer Inc. Unknown device 81e4
Flags: fast devsel
I/O ports at ac00 [disabled] [size=8]
I/O ports at a880 [disabled] [size=4]
I/O ports at a800 [disabled] [size=8]
I/O ports at a480 [disabled] [size=4]
I/O ports at a400 [disabled] [size=16]
Capabilities: [68] Power Management version 2
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 01)
Subsystem: ASUSTeK Computer Inc. Unknown device 8168
Flags: bus master, fast devsel, latency 0, IRQ 17
I/O ports at b800 [size=256]
Memory at ff9ff000 (64-bit, non-prefetchable) [size=4K]
Expansion ROM at ff9c0000 [disabled] [size=128K]
Capabilities: [40] Power Management version 2
Capabilities: [48] Vital Product Data
Capabilities: [50] Message Signalled Interrupts: Mask- 64bit+ Queue=0/1 Enable-
Capabilities: [60] Express Endpoint, MSI 00
Capabilities: [84] Vendor Specific Information |
Okay, great. The other devices in my system all seemed to be working, but try as I might I couldnt find the right setting. Since I could see the drives when I booted from the minimal installation cd, I thought I might try genkernel to see if I could isolate which setting it was that would enable the controller. So I emerged genkernel and ran it using --no-install and went with the defaults. I saved my old kernel and put the newly genkernel'd one in its place.
The first thing I noticed on bootup was the plethora of modules loading. What's worse was after I got up and running, my IDE devices didn't show up, and I lost my sound support. Fine, this was a stupid idea, but that's the folly of n00b, isnt it. So I emerge --unmerge 'd genkernel and went back to the make menuconfig system I'd become familiar with.
Step 1: try to get my sound support working again. Genkernel had modularized everything I could imagine so I spent a good hour traversing the kernel tree removing all these bloody modules I don't need. I set my sound device as a module, did a make && make modules_install and copied over my new kernel.
| Code: | <*> Advanced Linux Sound Architecture │ │
│ │ <*> Sequencer support │ │
│ │ < > Sequencer dummy client │ │
│ │ <*> OSS Mixer API │ │
│ │ <*> OSS PCM (digital audio) API │ │
│ │ [*] OSS PCM (digital audio) API - Include plugin system │ │
│ │ [*] OSS Sequencer API │ │
│ │ < > RTC Timer support │ │
│ │ [ ] Dynamic device file minor numbers │ │
│ │ [*] Support old ALSA API │ │
│ │ [ ] Verbose procfs contents │ │
│ │ [ ] Verbose printk │ │
│ │ [ ] Debug │ │
│ │ Generic devices ---> │ │
│ │ PCI devices ---> │ │
<M> Intel HD Audio
│ │ USB devices ---> │ │
│ │ System on Chip audio support --->
|
During my kernel compile, I noticed all the modules genkernel had created were still resident in the system. I know I don't need them... what's the best way to get rid of them?
After bootup, my sound still wasnt working. I'm thinking there might be some sort of conflict created by all these useless modules since my sound was working fine before I started this adventure with the same settings I have above. Can someone give me some advice on how I can eliminate these modules (other than blasting everything in /lib/modules/.../kernel which will probably just give me a ton of errors)? Is there a catalog or conf file somewhere that I can edit to prevent the kernel from loading them at startup and compiling them all when I do a make modules_install? Any advice to get my IDE devices working would also be a godsend!
Thanks! _________________ ~g
emerge -FML... |
|
| Back to top |
|
 |
wjb Guru


Joined: 10 Jul 2005 Posts: 323 Location: Fife, Scotland
|
Posted: Sun Nov 11, 2007 10:33 am Post subject: |
|
|
| Code: | # cd /usr/src/linux
# make clean
# ...
| .. then rebuild the kernel as normal.
clean leaves the existing .config alone but gets rid of most of the build products (modules, .o, etc). |
|
| Back to top |
|
 |
gr0x0rd Apprentice


Joined: 12 Aug 2006 Posts: 273
|
|
| 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
|
|