Thu 23 August 2012

Compiling the cp210x module for use with the NAO

Posted by ankur in Tech (356 words, approximately a 2 minute read)

  • Share this post:

I've been recently working on trying to get a NavChipto work with the NAO. (The NAO is very cool btw!) To start with, I was delighted to see that the NAO uses a Linux OS on it's Geode processor. (The newer NAOs are using an Atom processor though) The issue was that this kernel that Aldebaran (the manufacturer) uses is customized. Specifically, it lacks the cp210x driver that the NavChip requires. I've been trying to build/compile this driver for the past week, and the one before. I'm really not a kernel developer. In fact, this is the first time I've come close to touching the kernel sources and well, running make!

Anyway, as a note to self (yes, another!), and as some documentation for folks who'd try to use the NAO with more hardware, here's what I've done so far. I haven't tested the final module yet, but it looks okay. I'll only know tomorrow when I try it out on the robot if I were successful.

Download the Nao kernel from Aldebaran's github. Please be careful. It has two branches. Download the one for your Nao: either the Geode or the Atom version. Download the cp210x source from the Silabs page. Untar it in your kernel source tree.

Get the kernel configuration from the Nao. It should be /boot/config on the file system. Copy this to your downloaded kernel source tree as .config (DOT config).


make oldconfig ARCH=i386 #My system is an x86_64, so the ARCH argument is needed

The Nao's kernel is 2.6, so you need to use the Makefile26 file in the cp210x directory. Run configure. It'll create a file. Modify this file to correct the KVER etcetera variables (You can also modify the configure script instead. Whatever you prefer):

# Makefile.config
# Automatically generated

In the Makefile, under "default:", I added ARCH=i386 (again, since my host is an x86_64). Now, just run


That should be it. Check if your module is okay using "file" and "modinfo". It looks okay. I've got to try it on the Nao tomorrow though to confirm.

  • Share this post: