LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-12-2013, 08:25 AM   #1
swaroop_kv
LQ Newbie
 
Registered: Feb 2013
Posts: 2

Rep: Reputation: Disabled
Smile in running linux kernel - how to add USB as a module


I configured kernel (2.6.34.14) and installed, while make menuconfig i did not select the USB option (neither as a module nor inside kernel, just put a space). Then saved the config file, and completed the remaining steps that are - make, make install, make modules_install.

when i restarted the system, in older versions i found 2.6.34.14. Its working fine, pendrive or any usb device is not working as i didn't include USB while configuration.

Now if i want to add that functionality to Running or installed linux kernel. what is the procedure?

How can i build only USB, as a module, from source code, and use that in running linux kernel.
 
Old 02-12-2013, 11:41 AM   #2
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,654

Rep: Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255
Just change the configuration parameter and rebuild.

Once the updated module is installed (since it will be the same version as the running version) you can then load the modules (no reboot needed).

If you removed and reinstalled the kernel source, then you lost the already build object files (and libraries) used to create the usb module - and they will need to be rebuilt. If you also lost the configuration file, you are in luck - the one you used to build the system is in the /boot/config-<version> file, and you can copy it to .config before you do a "make menuconfig" (or equivalent) to enable the USB module. Note - enabling the USB will also allow you to build any USB layered drivers for your system (both the controller module and device modules that depend on the controller can be created).
 
Old 02-12-2013, 01:01 PM   #3
swaroop_kv
LQ Newbie
 
Registered: Feb 2013
Posts: 2

Original Poster
Rep: Reputation: Disabled
If i make changes to config file, and rebuild, that means building the whole kernel again. I don't want to build the whole kernel again, i just want add the USB functionality to my existing kernel.

In make menuconfig - USB support - previously i entered n (y/n/M), so its not included in the kernel. For USB support 'M' option is not working, only y or n options are working.

that means if i select y, and save changes to .config file, i am asking for including this in the kernel, not as a module, so whole kernel needs to builded again.

so is there no other way to do the above task.
 
Old 02-12-2013, 04:01 PM   #4
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,654

Rep: Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255
Hmmm... It isn't the controllers.

It must be some kernel side support that is needed for them though. Though on mine it (it is an old kernel- 2.6.36) it is still listed as a module.

Now some of the flags are not for modules, but options within the module. The "support for host-side USB" is/can be a module (name is "usbcore"), and modprobe should load it automatically along with any USB drivers required. I was building my systems from a Fedora starting point, so this was included in the kernel at build time. The "USB announce new devices" is an option to the host-side USB module.

What version are you trying out?

Last edited by jpollard; 02-12-2013 at 04:02 PM.
 
  


Reply


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
How add assebly in linux kernel module program? aminoamide Linux - Kernel 3 02-24-2009 11:39 AM
how to add my module to linux kernel eshwar_ind Linux - Newbie 3 02-10-2004 09:01 AM


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

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