Topic: Programing/Loading Linux Drivers

Hello All,

I'm considering buying the Chumby Hacker board from sparkfun for my project. Before I do that though I want to make sure that I can do what I want to with the board. I am looking for a suitable uClinux development board (which it looks like what is loaded on this board) that I can load a Linux UVC webcam driver onto that board and receive video input through a USB port. It seems that two things are done already: uClinux loaded onto storage and USB host programmed. I just want to make sure I have the freedom with the programming on the board to load the drivers and setup the microcontroller to output the data any way I want. So here are my main questions:

1. How do add Linux code? Through changing what's stored on the SDcard?
2. Are all of the output types (I2C, Serial, SPI, etc.) programmed through Linux or in the microcontroller board code?
3. Does there seem to be any large flaws in what I have just discussed?

I am just getting started with uClinux but I am experienced with microcontroller programming. I would appreciate any and all feedback and help.

Thanks for your time,
-Nick

Re: Programing/Loading Linux Drivers

Hi Clattenb,

The Linux that comes on the Hacker board is actually a full-blown glibc-based Linux, not uClinux.  There's an MMU (and a program called regutil that reads/writes to /dev/mem to gleefully ignore it).

Everything is done through Linux.  There are instructions on Lady Ada's wiki on how to install native GCC, as well as how to communicate through I2C.  Unfortunately there aren't any SPI ports that I'm aware of, aside from the boot media which is SD.  You can work with the debug serial port, though, once it's booted.

There might be drivers for your camera, assuming it's supported in Linux 2.6.28, but many UVC devices should just work.

Re: Programing/Loading Linux Drivers

Hello ChumbyLurker,

Thanks for your reply! That's pretty much what I needed to hear to convince me. I actually prefer having the full blown Linux on the board (makes me more convinced the driver will run correctly). The camera I'm using (Microsoft's Life Cinema) is listed under the UVC driver list so I have high hopes.

How does the board connect to a PC to run regutil and compile to memory? I guess I'm kind of fuzzy on what goes on in that process because I'm not all that familiar (as of right now) with Linux and I was unable to find a tutorial on the wiki that showed what the programming setup is like.

Thanks for all the help!

Re: Programing/Loading Linux Drivers

Well, there are two ways to connect.  Initially, you communicate over a TTL serial cable, much like you'd use with a uC or even with a cell phone.  Once you have things set up, you can set up a USB Ethernet or wifi card to connect over SSH.

5 (edited by amiso 2010-10-09 22:53:31)

Re: Programing/Loading Linux Drivers

Hi,
  On my hacker board:
1 -- I have installed the FT232, USB-to-serial adapter on the debug port. Good!

2 -- I started the linux terminal:  "screen /dev/ttyUSB0 115200 " to connect to the board: Great!  The Hacker board boots nicely and finally gives me the "boot> " prompt . The loader version appears to be: 1.0 hardware revision 9

3 -- Then I updated my sd card image to the "newest" one given elsewhere on this forum. Again, it went nicely, and I got the "boot>" prompt. However, the  version is 1.0 hardware revision 9 again!. Well, I already had the latest version! No harm.

My question is what do I do now? Obviously, I do not have a minimal linux system working yet! I still can not execute simple commands like "ls" or "cd".  For example,  how can I install busybox?

Obviously the hacker board is not a complete system and therefore will not run all the apps. but I was hoping that I would be able to download some files through the debug port. Another option would be that the boot loader can unpack some packages from a USB key? There is something that I don't get. So please give me some hints now...

Thanks

Amiso

Re: Programing/Loading Linux Drivers

The "boot> " prompt is the bootloader.  There should be a "help" command.  It's not the greatest bootloader in the world, but at least it has a basic shell smile

Revision 9 is the hardware revision.  All hacker boards are rev 9.  If you were to put that SD card into a shipping chumby One, it would say rev 6.

You should be able to load Linux.  What happens if you run "reboot" at the boot prompt?

7

Re: Programing/Loading Linux Drivers

I don't understand - out of the box, the sd card boots into real linux, though uses busybox - the ls and other commands should work once booted (from the serial console).

You should get or find a supported network card.  It will make things easier since you can do "scp" or "wget".  Or just use a USB thumb drive to transfer files.

Note that standard webcams are supported in the current build, but you would need to add something to read the image and get it to a framebuffer (if you don't want to install Fedora).  The frame rate might be slow.

8

Re: Programing/Loading Linux Drivers

To ask a question - what is the easiest way to build a kernel driver?  I will probably need to backport a driver for the RT8188.  There are instruction for the 2.6.16 kernels for the production chumbys but I don't see a walkthrough for the HB.

http://www.dealextreme.com/details.dx/sku.48166  has linux support but apparently will need a later kernel (I just ordered it and a bluetooth micro module that I think will work).

9 (edited by amiso 2010-10-10 19:11:21)

Re: Programing/Loading Linux Drivers

tz wrote:

I don't understand - out of the box, the sd card boots into real linux, though uses busybox - the ls and other commands should work once booted (from the serial console).

It does now !!!!

Just to close this topic, I should explain:

My power supply was had a too low voltage: just on the limit. I was fooled !!!

Thanks to you any way.