This is the old SliTaz forum - Please use the main forum.slitaz.org

[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-2.6.30.6/drivers/usb/serial/*ko
    /my_wok/slitaz/wok/linux/linux-2.6.30.6/drivers/usb/serial/ch341.ko
    /my_wok/slitaz/wok/linux/linux-2.6.30.6/drivers/usb/serial/ftdi_sio.ko
    /my_wok/slitaz/wok/linux/linux-2.6.30.6/drivers/usb/serial/option.ko
    /my_wok/slitaz/wok/linux/linux-2.6.30.6/drivers/usb/serial/pl2303.ko
    /my_wok/slitaz/wok/linux/linux-2.6.30.6/drivers/usb/serial/ti_usb_3410_5052.ko
    /my_wok/slitaz/wok/linux/linux-2.6.30.6/drivers/usb/serial/usbserial.ko
    root@slitaz:~#


    I did installed the fresh compiled kernel with:

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


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

    root@slitaz:~# ls /lib/modules/2.6.30.6-slitaz/kernel/drivers/usb/serial/
    ch341.ko.gz pl2303.ko.gz usbserial.ko.gz
    root@slitaz:~#


    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.
    Stephane
  • 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-2.6.30.6.list. 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 http://forum.slitaz.org/index.php/vanilla/discussion/674.

    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.6.33.2-slitaz/
    root@slitaz:/usr/src/linux-2.6.33.2-slitaz#


    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-2.6.33.2-slitaz# 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-2.6.33.2-slitaz# 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
    root@slitaz:/usr/src/linux-2.6.33.2-slitaz#


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


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


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


    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-2.6.33.2-slitaz# cat /etc/rcS.conf | grep LOAD_MODULES
    LOAD_MODULES="lp parport parport_pc ti_usb_3410_5052"
    root@slitaz:/usr/src/linux-2.6.33.2-slitaz#


    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-2.6.33.2-slitaz# 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
    root@slitaz:/usr/src/linux-2.6.33.2-slitaz#


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


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

    Cheers.
    Stephane

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