Here’s a tut showing how to cross-compile your own device driver (as a kernel module) on the Rascal and then load/unload it into Linux on the device. I’ll assume you have previously followed these instructions to create a kernel build environment on your development PC.
As an example, let’s download Dave Hylands’s gpio-event driver and usermode application for the Gumstix Overo. As it turns out, we can compile this driver for the Rascal unmodified once we get the paths right. Check out the Rascal kernel git branch to ~/rascal/linux-2.6 and download Hylands’s code to ~/rascal/gpio-event. Modify ~/rascal/gpio-event/module/Makefile to use these alternate variable definitions:
CROSS_COMPILE ?= /opt/eldk/usr/arm-linux-gnueabi KERNEL_PATH ?= /home/mike/rascal/linux-2.6/arch/arm/kernel ARCH ?= arm
(Of course, the /home/mike prefix is specific to my machine. What matters is that $(KERNAL_PATH) contains a bunch of C source files like module.c.)
Then do this:
cd ~/rascal/gpio-event/module make -C ~/rascal/linux-2.6/ M=`pwd` ARCH=arm modules
You should get a file called gpio-event-drv.ko in ~/rascal/gpio-event/module. SCP this file to the Rascal and ssh in to it. From the directory where you put the gpio-event-drv.ko file, you can use these commands:
insmod gpio-event-drv.ko rmmod gpio-event-drv.ko
to load and unload the module respectively.