This is the old SliTaz forum - Please use the main

[SOLVED] how to make new kernel module available (without the wok) ?
  • hi,
    After compiling kernel with new module ti_usb_3410_5210, I am wondering how to make it available for the fresh compiled kernel.

    Here are the files *.ko related to ./usb/serial/ after new kernel compilation:

    root@slitaz:~# ls /my_wok/slitaz/wok/linux/linux-*ko

    I did installed the fresh compiled kernel with:

    root@slitaz:~# tazpkg install /my_wok/slitaz/packages/linux- --forced

    But not all new modules seem to be loadable (actually only 3 instead of 6 modules):

    root@slitaz:~# ls /lib/modules/
    ch341.ko.gz pl2303.ko.gz usbserial.ko.gz

    Would anyone be so kind to tell me:
    - q1) why only 3 modules (ch341.ko.gz, pl2303.ko.gz and usbserial.ko.gz) are available instead of the 6 requested modules (ch341.ko, ftdi_sio.ko, option.ko, pl2303.ko, ti_usb_3410_5052.ko and usbserial.ko)?
    - q2) what is the procedure to make those 6 modules available for loading with modprobe?

    Thank you for you feedback.
  • I understand it might not be a very exciting subject, but I really need to solve this.

    Any help?
  • jozeejozee March 2010
    I am guessing you used "tazwok cook linux". If yes, read the output of linux pkg. most likely it must have outputted : "the module selected in .config were not categorized in linux-* pkgs". If your module is there, easiest way is to add it to modules- Otherwise, read linux-* receipts and edit an existing/make a new receipt to categorize your module.

    Hope this helps. Right now, we are busy and time-pressed for 3.0 . Please don't expect more answers :-(

  • Dear all,
    Here are the required steps in order to add module ti_usb_3410_5052 to linux kernel. This solution does not use the wok. If you are interested in a solution using the wok, please check

    Let's do it:

    0) Make sure we have linux-source files (as root):
    root@slitaz:/home/stephane# tazpkg get-install linux-source

    1) Go to linux-source directory (as root):
    root@slitaz:/home/stephane# cd /usr/src/linux-

    2) Enable the required module by editing configuration file (.config) with any text editor.
    Look for line # CONFIG_USB_SERIAL_TI is not set and replace it with CONFIG_USB_SERIAL_TI=m:
    root@slitaz:/usr/src/linux- vi .config
    # CONFIG_USB_SERIAL_TI is not set <== replace this line
    CONFIG_USB_SERIAL_TI=m <== with this one

    3) Build needed files and link final module images: [thanks Ernia ;-) ]
    root@slitaz:/usr/src/linux- make CONFIG_USB_SERIAL_TI=m M=drivers/usb/serial
    LD drivers/usb/serial/built-in.o
    CC [M] drivers/usb/serial/usb-serial.o
    CC [M] drivers/usb/serial/generic.o
    CC [M] drivers/usb/serial/bus.o
    LD [M] drivers/usb/serial/usbserial.o
    CC [M] drivers/usb/serial/ch341.o
    CC [M] drivers/usb/serial/option.o
    CC [M] drivers/usb/serial/pl2303.o
    CC [M] drivers/usb/serial/ti_usb_3410_5052.o
    Building modules, stage 2.
    MODPOST 5 modules
    CC drivers/usb/serial/ch341.mod.o
    LD [M] drivers/usb/serial/ch341.ko
    CC drivers/usb/serial/option.mod.o
    LD [M] drivers/usb/serial/option.ko
    CC drivers/usb/serial/pl2303.mod.o
    LD [M] drivers/usb/serial/pl2303.ko
    CC drivers/usb/serial/ti_usb_3410_5052.mod.o
    LD [M] drivers/usb/serial/ti_usb_3410_5052.ko
    CC drivers/usb/serial/usbserial.mod.o
    LD [M] drivers/usb/serial/usbserial.ko

    4) Copy the module:
    root@slitaz:/usr/src/linux- mkdir -p /lib/modules/
    root@slitaz:/usr/src/linux- cp drivers/usb/serial/*.ko /lib/modules/
    root@slitaz:/usr/src/linux- ls /lib/modules/
    ch341.ko option.ko pl2303.ko ti_usb_3410_5052.ko usbserial.ko

    5) Install the firmware:
    root@slitaz:~# cd /usr/src/linux-  
    root@slitaz:/usr/src/linux- make firmware_install
    root@slitaz:/usr/src/linux- ls /lib/firmware/ti_*
    /lib/firmware/ti_3410.fw /lib/firmware/ti_5052.fw

    6) Load the module and check it is loaded : [thanks Ernia ;-) ]
    root@slitaz:/usr/src/linux- depmod -a                           
    root@slitaz:/usr/src/linux- modprobe ti_usb_3410_5052
    root@slitaz:/usr/src/linux- lsmod | grep ti_usb
    ti_usb_3410_5052 16567 0
    usbserial 22032 1 ti_usb_3410_5052

    7) Load automatically the module at boot time:
    Edit /etc/rcS.conf and add ti_usb_3410_5052 to LOAD_MODULES line. Here is the resulting line in /etc/rcS.conf file:
    root@slitaz:/usr/src/linux- cat /etc/rcS.conf | grep LOAD_MODULES
    LOAD_MODULES="lp parport parport_pc ti_usb_3410_5052"

    8) Connect the MSP-FET430UIF device from Texas Instrument and make sure the driver mapped the module to the device. The output should be something like:
    root@slitaz:/usr/src/linux- dmesg | tail
    usb 1-2.2: device firmware changed
    ti_usb_3410_5052: probe of 1-2.2:1.0 failed with error -5
    usb 1-2.2: USB disconnect, address 5
    usbcore: registered new interface driver ti_usb_3410_5052
    ti_usb_3410_5052: v0.9:TI USB 3410/5052 Serial Driver
    usb 1-2.2: new full speed USB device using uhci_hcd and address 6
    ti_usb_3410_5052 1-2.2:1.0: TI USB 3410 1 port adapter converter detected
    ti_usb_3410_5052: probe of 1-2.2:1.0 failed with error -5
    ti_usb_3410_5052 1-2.2:2.0: TI USB 3410 1 port adapter converter detected
    usb 1-2.2: TI USB 3410 1 port adapter converter now attached to ttyUSB0

    9) Let's finally check that the device really exists:
    root@slitaz:/usr/src/linux- ls /dev/ttyUSB0 

    Here you are!
    Now be ready to play with Texas Instrument's MSP430 familly.


Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership

SliTaz Social