WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: importing modules  (Read 11470 times)

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
importing modules
« on: January 27, 2009, 04:16:27 PM »
I copied a folder of sound modules that work with my dell, but get a "-1 invalid module format" if I try to insmod. (modprobe doesn't recognize the modules at all.) I copied them out of another linux distro, and was attempting to load in the ac97 and maestro3 modules. lsmod doesn't show any sound modules loaded at all.  Thanks
« Last Edit: January 27, 2009, 04:18:24 PM by jpeters »

Offline ^thehatsrule^

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 1726
Re: importing modules
« Reply #1 on: January 27, 2009, 05:10:23 PM »
Typically kernel modules from another distro are not recommended for things like this, even if they load - it's better to recompile them.

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: importing modules
« Reply #2 on: January 27, 2009, 05:39:36 PM »
Typically kernel modules from another distro are not recommended for things like this, even if they load - it's better to recompile them.

OK....thanks!

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: importing modules
« Reply #3 on: January 28, 2009, 12:37:12 AM »
Typically kernel modules from another distro are not recommended for things like this, even if they load - it's better to recompile them.

I can't find any download sources, just lots of info about the modules themselves.

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14741
Re: importing modules
« Reply #4 on: January 28, 2009, 12:42:43 AM »
I take it these sound modules are not in the standard kernel source or alsa-drivers source?

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: importing modules
« Reply #5 on: January 28, 2009, 01:28:08 AM »
I take it these sound modules are not in the standard kernel source or alsa-drivers source?

Alsa provides support, but trying to compile looks for /usr/src or some other problems (looks for /include/linux/version.h, etc). I was hoping that if I could load specific maestro3, intel8x0, and ac97 modules, the microphone function  on Skype would work (I can listen, just not broadcast). I know next to nothing about getting and installing modules, however.  (just basic modprobe, insmod, etc).  I downloaded alsa-driver-1.0.19 to /tmp and tried ./configure --with-maestro3. 
« Last Edit: January 28, 2009, 01:31:03 AM by jpeters »

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14741
Re: importing modules
« Reply #6 on: January 28, 2009, 01:58:55 AM »
The alsa_modules.tcem extension looks the have the maestro3, intel8x0, and ac97 modules in it - did you give it a go?

To build the alsa-modules, you need to unpack the kernel source, load the default tinycore .config with "make menuconfig" and then "make" - if I remember correctly, the alsa modules will then compile.

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: importing modules
« Reply #7 on: January 28, 2009, 03:24:11 AM »
The alsa_modules.tcem extension looks the have the maestro3, intel8x0, and ac97 modules in it - did you give it a go?

modprobe soundcore loaded the module, but don't know where to go from there. (sudo snddevices??)



Quote
To build the alsa-modules, you need to unpack the kernel source, load the default tinycore .config with "make menuconfig" and then "make" - if I remember correctly, the alsa modules will then compile.

I don't have any experience with unpacking the kernel source...where to find it, or exact.y what to do with it so the modules will compile.   


Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14741
Re: importing modules
« Reply #8 on: January 28, 2009, 04:38:46 AM »
If you load the alsa and alsa_modules extensions and make sure there are no sound modules of any kind loaded (use "lsmod" & "sudo rmmod module_name" for this), then something like this should work:
Code: [Select]
$ sudo alsaconf
$ sudo udevtrigger --subsystem-match=sound
$ speaker-test -t wav

You can find the kernel source here http://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/release/src/linux-2.6.26.tar.bz2 and the default tinycore config here: http://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/release/src/config-2.6.26-tinycore Strictly speaking you should also apply the tinycore kernel patch, but this will have no bearing on the alsa modules.

Edit: BTW, if you have one of those bluetooth headsets (they give them away free with mobile phones here) and your laptop does bt, you could use it with tc for skype  :)
« Last Edit: January 28, 2009, 04:42:17 AM by Juanito »

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: importing modules
« Reply #9 on: January 28, 2009, 06:47:44 AM »
For those new to kernel building on TC, here is a simple and convenient example way of dealing with the kernel source.  You can create a directory on one of your hard drive partitions, say /mnt/hda5, and call it src or a name of your liking.  Then download the kernel source linux-2.6.26.tar.{gz,bz2} and place it in that directory. Have the compile extension loaded and do something like this:

# mkdir /mnt/hda5/src
# cp linux-2.6.26.tar.gz /mnt/hda5/src/
# cd /mnt/hda5/src
# tar xzvf linux-2.6.26.tar.gz
# ln -s linux-2.6.26 linux    #personal preference
# mkdir /usr/src
# mount --bind /mnt/hda5/src /usr/src
# cd /usr/src/linux
# make mrproper    # a recommended step even for a newly untarred source,
# cp /path/to/config-2.6.26-tinycore /usr/src/linux/.config   # do this after any running of 'make mrproper' as 'make mrproper' will wipe your .config
# make menuconfig     # Make your kernel config choices here
# make all
# make modules_install  # or make modules_install INSTALL_MOD_PATH=/somewhere to install them elsewhere

If you want the kernel image itself, it resides in /usr/src/linux/arch/i386/boot/bzImage.  You can copy it from there.  Make modules_install installs the modules to /lib/modules/...  .  Find the modules in /lib/modules being sure to also get their dependencies.  Be sure to run "depmod -a" before you try to use the modules on the currently running system or on later reboot unless they are part of a .tcem extension.  Hope this may help those who have not built a TC kernel but would like to.

I have not applied the boot image patch slnce it does not affect modules.

After a reboot, you can make the source directory on /mnt/hda5/src part of your system again by just doing this:

# mkdir /usr/src
# mount --bind /mnt/hda5/src /usr/src
« Last Edit: January 28, 2009, 10:39:37 AM by Jason W »

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: importing modules
« Reply #10 on: January 28, 2009, 11:19:50 AM »
Thanks much for the step-by-step instructions, Jason.  I'll give it a whirl!   

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: importing modules
« Reply #11 on: January 28, 2009, 12:02:36 PM »
I will post the above tip in the TCE tips and tricks area so any questions about kernel compiling on TC could be answered there.  I don't want to hijack this thread away from the original importing modules subjuct.  Kernel compiling is not in itself TC specific but there are some specifics in dealing with module extensions so maybe a thread on building and installing modules could be helpful.
« Last Edit: January 28, 2009, 12:05:45 PM by Jason W »

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: importing modules
« Reply #12 on: January 28, 2009, 12:03:04 PM »
If you load the alsa and alsa_modules extensions and make sure there are no sound modules of any kind loaded (use "lsmod" & "sudo rmmod module_name" for this), then something like this should work:
Code: [Select]
$ sudo alsaconf
$ sudo udevtrigger --subsystem-match=sound
$ speaker-test -t wav

Alsa doesn't work with my PCI soundcard, and there are no legacy drivers with the extension. Alsa modules doesn't recognize the "sudo sounddevices" command."
~                                                                              
« Last Edit: January 28, 2009, 12:04:54 PM by jpeters »

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14741
Re: importing modules
« Reply #13 on: January 28, 2009, 10:51:58 PM »
So nothing happened with the "alsaconf" and "udev" commands? "lsmod" didn't show any modules loaded at all after issuing the commands?

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: importing modules
« Reply #14 on: January 29, 2009, 02:14:12 AM »
So nothing happened with the "alsaconf" and "udev" commands? "lsmod" didn't show any modules loaded at all after issuing the commands?

alsaconf found no pnp/pci drivers, and then no legacy drivers, so no modules were installed.
I previously loaded alsa_modules without alsa and was able to install soundcore, but that's all.
(sudo snddevices command was not recognized even with alsa installed). I haven't had time to unpack tc and compile alsa-driver package yet.