News:

Re-organized the forum to more cleanly delineate the development section, as the end user support side appears to have taken a life of its own!

Author Topic: How to add VT6656 driver to the kernel (not module)  (Read 4694 times)

May 16, 2011, 02:15:11 am
I'm playing with the kernel now. (Trying to make it smaller)
Got stuck with drivers addition. I would like to add VT6656 driver to kernel (not module) but couldn't . Was looking through Internet, found lots of info but not concreted. There are lot of information how to make the driver as a module, but I want to have the kernel with icluded driver, because the kernel becomes smaller then with the modules support.

Can someone help me with this.

May 17, 2011, 05:34:21 am
Even if I want to compile it as a module I got the following error


root@moldov-VirtualBox:/mnt/desktop/vt6656_# make all
set -e; for d in driver utility; do make -C $d ; done
make[1]: Entering directory `/mnt/desktop/vt6656_/driver'
make -C /home/N745/nuc700-uClinux/uClinux-dist/linux-2.4.x/ SUBDIRS=/mnt/desktop/vt6656_/driver modules
make[2]: Entering directory `/home/N745/nuc700-uClinux/uClinux-dist/linux-2.4.x'
make -C  /mnt/desktop/vt6656_/driver CFLAGS="-D__KERNEL__ -I/home/N745/nuc700-uClinux/uClinux-dist/linux-2.4.x/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fno-common -pipe -fno-builtin -D__linux__ -DNO_MM -mapcs-32 -march=armv4 -mtune=arm7tdmi -mshort-load-bytes -DMODULE -DMODVERSIONS -include /home/N745/nuc700-uClinux/uClinux-dist/linux-2.4.x/include/linux/modversions.h" MAKING_MODULES=1 modules
make[3]: Entering directory `/mnt/desktop/vt6656_/driver'
make[3]: *** No rule to make target `modules'.  Stop.
make[3]: Leaving directory `/mnt/desktop/vt6656_/driver'
make[2]: *** [_mod_/mnt/desktop/vt6656_/driver] Error 2
make[2]: Leaving directory `/home/N745/nuc700-uClinux/uClinux-dist/linux-2.4.x'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/mnt/desktop/vt6656_/driver'
make: *** [all] Error 2


If I want to insmod   the precompiled driver I got that error from console

# insmod /bin/vntwusb.o
Using /bin/vntwusb.o
insmod: kernel-module version mismatch
        /bin/vntwusb.o was compiled for kernel version 2.4.21-rmk1-pxa1
        while this kernel is version 2.4.20-uc0.
#

How can I fix that?


  • No avatar
  • *****
May 17, 2011, 08:22:34 am
just try insmodding it with f option

# insmod -f /bin/vntwusb.o

May 18, 2011, 04:52:11 am
schufti, thanks for reply but I couldn't insod that module even with - f option.


I got that driver from here http://www.openipcam.com/files/uCLinux/drivers/vt6656_arm_module_precompiled.rar

Here is the output from console
Code: [Select]
# insmod -f -k vntwusb.o
Using vntwusb.o
insmod: Warning: kernel-module version mismatch
        vntwusb.o was compiled for kernel version 2.4.21-rmk1-pxa1
        while this kernel is version 2.4.20-uc0
insmod: unresolved symbol register_netdevice
insmod: unresolved symbol test_and_clear_bit
insmod: unresolved symbol eth_type_trans
insmod: unresolved symbol __kfree_skb
insmod: unresolved symbol alloc_skb
insmod: unresolved symbol init_etherdev
insmod: unresolved symbol kmalloc
insmod: unresolved symbol unregister_netdevice
insmod: unresolved symbol __arch_copy_to_user
insmod: unresolved symbol __tasklet_schedule
insmod: unresolved symbol usb_deregister
insmod: unresolved symbol cpu_raise_softirq
insmod: unresolved symbol tasklet_kill
insmod: unresolved symbol unregister_netdev
insmod: unresolved symbol usb_free_urb
insmod: unresolved symbol __out_of_line_bug
insmod: unresolved symbol usb_alloc_urb
insmod: unresolved symbol usb_register
insmod: unresolved symbol del_timer
insmod: unresolved symbol register_netdev
insmod: unresolved symbol kfree
insmod: unresolved symbol netif_rx
insmod: unresolved symbol skb_over_panic
insmod: unresolved symbol __arch_copy_from_user
insmod: unresolved symbol test_and_set_bit
insmod: unresolved symbol usb_submit_urb
insmod: unresolved symbol usb_control_msg
insmod: unresolved symbol sprintf
insmod: unresolved symbol jiffies
insmod: unresolved symbol set_bit
insmod: unresolved symbol clear_bit
insmod: unresolved symbol tasklet_init
insmod: unresolved symbol softnet_data
insmod: unresolved symbol printk
insmod: unresolved symbol add_timer
insmod: unresolved symbol irq_stat
insmod: unresolved symbol usb_unlink_urb
insmod: unresolved symbol __const_delay


Could anyone help me to compile that driver with provided BSP for NUC700 MCUs?

  • No avatar
  • *****
May 23, 2011, 02:21:41 pm
Not all the files in there are "ready", I've learned to upload stuff when I can, as I've had back luck with laptops and data.
See the stolen laptop post for details on that!

Once I get back to Shanghai I'll setup another dev environment and order another camera - my first one has bitten the dust due to excessive travel, and airport baggage handlers!

Lawrence.

May 24, 2011, 07:38:27 am
I'm scratching my hands in waiting for the proper kernel drivers and tools. It's gonna be a huge impact:)
So sad to know that You've lost Your victim for the hacking:) Surely it was useful stuff :'(