Adding the cp210x module to the NAO kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hi folks,

I'm using the NAO[1] for my research. It uses a linux 2.6.29.6-rt24
kernel[2] which they seem to have customized to their needs. I need to
use a NavChip[3] IMU(inertial measurement unit) with the NAO. The
NavChip works out of the box with my Fedora 17
kernel(3.5.1-1.fc17.x86_64). This is what dmesg says when I plug it in:

> [71406.521154] usb 2-1.5: new full-speed USB device number 6 using ehci_hcd
> [71406.607360] usb 2-1.5: New USB device found, idVendor=10c4, idProduct=ea60
> [71406.607367] usb 2-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
> [71406.607372] usb 2-1.5: Product: CP2102 USB to UART Bridge Controller
> [71406.607376] usb 2-1.5: Manufacturer: Silicon Labs
> [71406.607379] usb 2-1.5: SerialNumber: 0001
> [71406.772438] usbcore: registered new interface driver cp210x
> [71406.772468] USB Serial support registered for cp210x
> [71406.772513] cp210x 2-1.5:1.0: cp210x converter detected
> [71406.845220] usb 2-1.5: reset full-speed USB device number 6 using ehci_hcd
> [71406.931690] usb 2-1.5: cp210x converter now attached to ttyUSB0
> [ankur@ankur 2.6.29.6-rt24-aldebaran-rt]$

However, when I plug it into the NAO, it isn't detected. I looked up,
and the kernel they use doesn't seem to have the cp210x module that is
required for the NavChip (I think?). 

The NavChip's processor is an AMD Geode[1] which is x86 compatible
according to wiki.

Can you please tell me how I can add the required module to the NAO's
kernel?

I already tried something, but this is my first brush with kernel
compilation, so it was probably wrong:


I built the cp210x module using the NAO kernel tree:


> [ankur@ankur aldebaran-linux-aldebaran-66f8749]$ pwd
> /home/ankur/Documents/work/code/NAO/OS/aldebaran-linux-aldebaran-66f8749
> [ankur@ankur aldebaran-linux-aldebaran-66f8749]$ file drivers/usb/serial/cp210x.ko
> drivers/usb/serial/cp210x.ko: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), BuildID[sha1]=0x61274b6a395ca0bbb45729b87283f361c04b396f, not stripped
> [ankur@ankur aldebaran-linux-aldebaran-66f8749]$
> 

I placed this into the drivers/usb/serial directory in the NAO system,
but it didn't work (no surprise there!). It gave me an error:

"Invalid module format" when I tried modprobe or insmod.

The /var/log/messages had this:
"no version for struct_module found: kernel tainted".

Any hints please? It's probably something simple, just not simple enough
for a kernel newbie :)

This is the set of modules they ship their kernel with:

> [ankur@ankur 2.6.29.6-rt24-aldebaran-rt]$ pwd
> /run/media/ankur/OpenNao-system/lib/modules/2.6.29.6-rt24-aldebaran-rt
> [ankur@ankur 2.6.29.6-rt24-aldebaran-rt]$ ll
> total 409
> lrwxrwxrwx. 1 root root     93 Jun  4 01:23 build -> /opennao-geode/tmp/portage/ald-kernel/opennao-kernel-2.6.29-r41/work/linux-2.6.29-opennao-r41
> drwxr-xr-x. 5 root root   1024 Jun  4 01:23 kernel
> -rw-r--r--. 1 root root  59429 Aug 14 11:01 modules.alias
> -rw-r--r--. 1 root root  49998 Aug 14 11:01 modules.alias.bin
> -rw-r--r--. 1 root root     69 Aug 14 11:01 modules.ccwmap
> -rw-r--r--. 1 root root  11117 Aug 14 11:01 modules.dep
> -rw-r--r--. 1 root root  13279 Aug 14 11:01 modules.dep.bin
> -rw-r--r--. 1 root root     73 Aug 14 11:01 modules.ieee1394map
> -rw-r--r--. 1 root root    141 Aug 14 11:01 modules.inputmap
> -rw-r--r--. 1 root root     81 Aug 14 11:01 modules.isapnpmap
> -rw-r--r--. 1 root root     74 Aug 14 11:01 modules.ofmap
> -rw-r--r--. 1 root root    937 Jun  3 17:25 modules.order
> -rw-r--r--. 1 root root   2829 Aug 14 11:01 modules.pcimap
> -rw-r--r--. 1 root root     85 Aug 14 11:01 modules.seriomap
> -rw-r--r--. 1 root root  25281 Aug 14 11:01 modules.symbols
> -rw-r--r--. 1 root root  36981 Aug 14 11:01 modules.symbols.bin
> -rw-r--r--. 1 root root 199651 Aug 14 11:01 modules.usbmap
> lrwxrwxrwx. 1 root root     93 Jun  4 01:23 source -> /opennao-geode/tmp/portage/ald-kernel/opennao-kernel-2.6.29-r41/work/linux-2.6.29-opennao-r41
> drwxr-xr-x. 5 root root   1024 Jun  4 01:23 updates
> [ankur@ankur 2.6.29.6-rt24-aldebaran-rt]$ find . -name "*.ko" -not -name "cp210x.ko" -print
> ./updates/compat/compat.ko
> ./updates/compat/compat_firmware_class.ko
> ./updates/net/wireless/cfg80211.ko
> ./updates/net/mac80211/mac80211.ko
> ./updates/net/rfkill/rfkill_backport.ko
> ./updates/drivers/misc/eeprom/eeprom_93cx6.ko
> ./updates/drivers/net/wireless/rt2x00/rt2x00pci.ko
> ./updates/drivers/net/wireless/rt2x00/rt2800lib.ko
> ./updates/drivers/net/wireless/rt2x00/rt2400pci.ko
> ./updates/drivers/net/wireless/rt2x00/rt61pci.ko
> ./updates/drivers/net/wireless/rt2x00/rt2x00usb.ko
> ./updates/drivers/net/wireless/rt2x00/rt2800pci.ko
> ./updates/drivers/net/wireless/rt2x00/rt2x00lib.ko
> ./updates/drivers/net/wireless/rt2x00/rt2500usb.ko
> ./updates/drivers/net/wireless/rt2x00/rt2800usb.ko
> ./updates/drivers/net/wireless/rt2x00/rt73usb.ko
> ./updates/drivers/net/wireless/rt2x00/rt2500pci.ko
> ./updates/drivers/net/wireless/zd1211rw/zd1211rw.ko
> ./kernel/net/wireless/cfg80211.ko
> ./kernel/net/mac80211/mac80211.ko
> ./kernel/net/bluetooth/sco.ko
> ./kernel/net/bluetooth/hidp/hidp.ko
> ./kernel/net/bluetooth/l2cap.ko
> ./kernel/net/bluetooth/bnep/bnep.ko
> ./kernel/net/bluetooth/rfcomm/rfcomm.ko
> ./kernel/lib/cimarron/cimarron.ko
> ./kernel/lib/crc-itu-t.ko
> ./kernel/drivers/staging/rt2870/rt3070sta.ko
> ./kernel/drivers/misc/eeprom/eeprom_93cx6.ko
> ./kernel/drivers/usb/class/cdc-acm.ko
> ./kernel/drivers/usb/serial/usbserial.ko
> ./kernel/drivers/usb/serial/ftdi_sio.ko
> ./kernel/drivers/hid/hid.ko
> ./kernel/drivers/net/wireless/zd1211rw/zd1211rw.ko
> ./kernel/drivers/net/wireless/rtl818x/rtl8187.ko
> ./kernel/drivers/hwmon/lm90.ko
> ./kernel/drivers/scsi/scsi_wait_scan.ko
> ./kernel/drivers/media/video/lxv4l2/lxv4l2.ko
> ./kernel/drivers/i2c/busses/scx200_acb.ko
> ./kernel/drivers/i2c/busses/i2c-serial.ko
> ./kernel/drivers/bluetooth/btusb.ko
> ./kernel/drivers/bluetooth/bfusb.ko
> ./kernel/drivers/bluetooth/bcm203x.ko
> ./kernel/drivers/bluetooth/hci_vhci.ko
> [ankur@ankur 2.6.29.6-rt24-aldebaran-rt]$


Please let me know if you need any more info, and I'll provide it. 

The kernel goes on a USB flash drive that needs to be inserted into the
NAO to make it boot. They provide a utility that formats the flash drive
as such:

> [ankur@ankur ~]$ cd /run/media/ankur/
> [ankur@ankur ankur]$ ll
> total 5
> drwxr-xr-x.  7 root root 4096 Aug  6 22:28 OpenNao-data
> drwxr-xr-x. 17 root root 1024 Aug 14 10:50 OpenNao-system
> [ankur@ankur ankur]$ mount | egrep OpenNao
> /dev/sdb1 on /run/media/ankur/OpenNao-system type ext3 (rw,nosuid,nodev,relatime,seclabel,data=ordered,uhelper=udisks2)
> /dev/sdb2 on /run/media/ankur/OpenNao-data type ext3 (rw,nosuid,nodev,relatime,seclabel,data=ordered,uhelper=udisks2)
> [ankur@ankur ankur]$
> 

[1] http://en.wikipedia.org/wiki/Nao_(robot)
[2] https://github.com/aldebaran/linux-aldebaran/
[3] http://www.intersense.com/pages/16/16/
[4] http://en.wikipedia.org/wiki/Geode_(processor)

-- 
Thanks, 
Warm regards,
Ankur: "FranciscoD"

Please only print if necessary. 

Looking to contribute to Fedora? Look here: https://fedoraproject.org/wiki/Fedora_Join_SIG

http://fedoraproject.org/wiki/User:Ankursinha
http://dodoincfedora.wordpress.com/

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Networking]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]

Add to Google Powered by Linux