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

[SOLVED] initramfs.c is buggy in linux-source
  • Hi,
    I am still trying to add module ti_usb_3410_5052 to slitaz kernel.

    Unfortunately, when trying to compile the kernel, it appears that file initramfs.c is buggy.


    root@lenovo_slitaz:/usr/src/linux-2.6.30.6-slitaz# make bzImage
    ...

    init/initramfs.c: In function ‘unpack_to_rootfs’:
    init/initramfs.c:491: erreur: ‘compress_name’ undeclared (first use in this function)
    init/initramfs.c:491: erreur: (Each undeclared identifier is reported only once
    init/initramfs.c:491: erreur: for each function it appears in.)
    make[1]: *** [init/initramfs.o] Erreur 1
    make: *** [init] Erreur 2
    root@lenovo_slitaz:/usr/src/linux-2.6.30.6-slitaz#


    For info, I downloaded the linux source with:

    root@lenovo_slitaz:~# tazpkg get-install linux-source


    Would it be possible to make sure that supplied linux-source files are correct in order to make a successfull compilation?

    Thanks
    Stephane

  • Using the wok is not working neither.

    root@lenovo_slitaz:~# tazwok cook linux
    ...
    ...
    CC [M] fs/aufs/sysfs.o
    CC [M] fs/aufs/loop.o
    CC [M] fs/aufs/f_op_sp.o
    fs/aufs/f_op_sp.c: In function ‘au_do_open_sp’:
    fs/aufs/f_op_sp.c:146: erreur: implicit declaration of function ‘au_dbg_sp_fop’
    make[2]: *** [fs/aufs/f_op_sp.o] Erreur 1
    make[1]: *** [fs/aufs] Erreur 2
    make: *** [fs] Erreur 2
    ================================Compilation failed. Please read the compiler output.

    root@lenovo_slitaz:~#


    It would be nice if Slitaz team could:
    a) check what is wrong when using source code from:

    root@lenovo_slitaz:~# tazpkg get-install linux-source


    b) check what is wrong when cooking the wok.

    I understand that this kind of module is not a priority for Slitaz team. But once this is solved, many MSP430 developpers will enjoy using Slitaz.

    Thanks for helping.
    Stephane
  • erniaernia March 2010
    try the method you can find here
    http://forum.slitaz.org/index.php/discussion/comment/4109/#Comment_4109
    to compile only the module you need, i did it for rfcomm.
  • Thank for the link, but in your case you had a Makefile:

    root@lenovo_slitaz:/usr/src/linux-2.6.30.6-slitaz# ls net/bluetooth/rfcomm/
    core.c Kconfig Makefile sock.c tty.c
    root@lenovo_slitaz:/usr/src/linux-2.6.30.6-slitaz#


    In my case, no Makefile, only ti_usb_3410_5052.c and ti_usb_3410_5052.h:

    root@lenovo_slitaz:/usr/src/linux-2.6.30.6-slitaz# ls drivers/usb/serial/ti_usb_3410_5052*
    drivers/usb/serial/ti_usb_3410_5052.c drivers/usb/serial/ti_usb_3410_5052.h
    root@lenovo_slitaz:/usr/src/linux-2.6.30.6-slitaz#


    I think this is why I have to compile the entire kernel instead of the module.

    I am deeply wondering if dev. guys used the same source files for compilation...

    Stephane
  • erniaernia March 2010
    disable initramfs support, compile the kernel and copy only the module in the current kernel /lib/modules ?
  • Excellent idea. I'll try and let you know.
  • erniaernia March 2010
    this should be the command line you need:
    make CONFIG_USB_SERIAL_TI=m M=drivers/usb/serial

    you will find the module in
    /usr/src/linux-2.6.30.6-slitaz/drivers/usb/serial/ti_usb_3410_5052.ko
  • @ernia: You are great! Thank you so much.

    I copied the file ti_usb_3410_5052.ko. to current kernel /lib/module/...:

    root@lenovo_slitaz:/usr/src/linux-2.6.30.6-slitaz# cp drivers/usb/serial/ti_usb_
    3410_5052.ko /lib/modules/2.6.30.6-slitaz/kernel/drivers/usb/serial/

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



    Then how to load the module? If I use modprobe, it does not recognize the new module:


    root@lenovo_slitaz:/usr/src/linux-2.6.30.6-slitaz# modprobe /lib/modules/2.6.30.
    6-slitaz/kernel/drivers/usb/serial/ti_usb_3410_5052.ko
    FATAL: Module /lib/modules/2.6.30.6_slitaz/kernel/drivers/usb/serial/ti_usb_3410_5052.ko not found.


    Is it related to file format (other modules are *ko.gz, the new module is only *.ko) or something else?


  • erniaernia March 2010
    root@slitaz:/home/tux# depmod -a                           
    root@slitaz:/home/tux# modprobe ti_usb_3410_5052
    root@slitaz:/home/tux# lsmod | grep ti_usb
    ti_usb_3410_5052 21884 0
    usbserial 25904 1 ti_usb_3410_5052

    good night
  • roozeecroozeec March 2010
    Hello
    I have the same problem.
    This mean we cannot compile a new full slitaz kernel...
    How could it be solved ?
    Thanks
  • erniaernia March 2010
    if you have an hd install you don't need initramfs support, you can disable it
  • Once again, a huge thanks to ernia for your tip on adding module without compilling the entire kernel. :))

    Now the module is available, but when connecting my device (ez430-F2013) to usb port, the system warned me about missing firmware...

    Obviously I had to 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:~#


    And that's it!! It works.

    Two more points:
    a) I will write shortly a step by step setup tutorial about all this.
    b) I will not edit topic subject to [SOLVED] because, in my opinion, slitaz team should investigate on:
    - why kernel source files supplied by Slitaz do not compile?
    - why cooking kernel through the wok does not work successfully?

    Anyway I feel so good beeing ready to play with msp430 development under Slitaz.
    Cheers.
    Stéphane

This discussion has been closed.
← All Discussions

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