Hello all,

After many tries I got a working i2c test program. Here's what I did in case somebody needs it.

1.Configured the kernel for I2C support (modular-but I suppose in kernel should also work fine)
-Configure the kernel : in /home/giannis/gumstix-buildroot/build_arm_nofpu/linux-2.6.11gum

make -j3 -C /home/giannis/gumstix-buildroot/build_arm_nofpu/linux-2.6.11gum ARCH=arm CROSS_COMPILE=/home/giannis/gumstix-buildroot/build_arm_nofpu/staging_dir/bin/arm-linux-uclibc- menuconfig

-to load modules into gumstix filesystem

make -j3 -C /home/giannis/gumstix-buildroot/build_arm_nofpu/linux-2.6.11gum DEPMOD="/sbin/depmod" CROSS_COMPILE=/home/giannis/gumstix-buildroot/build_arm_nofpu/staging_dir/bin/arm-linux-uclibc- ARCH=arm INSTALL_MOD_PATH=/home/giannis/gumstix-buildroot/build_arm_nofpu/root modules_install

-build the gumstix filesystem again including the modules:
go to ~/gumstix-buildroot and make.

2. Transferred the new image to my gumstix as described in the tutorial

3.Got the sample code from devantech for the magnetic compass (http://www.robot-electronics.co.uk/files/compass.c)

4.Got the latest release of the i2c and lmsensors from http://secure.netroedge.com/~lm78/index.html

5. In the sample code changed <linux/i2c-dev.h> to "i2c-dev.h" where the i2c-dev.h is the header file from the lmsensors download. lm-sensors-2.9.1/kernel/include/i2c-dev.h and put the header file in my  project's  workspace.

6. Compiled with arm-linux-gcc with no errors or even warnings

7.Pushed the binary to my gumstix using
scp location user@othermachine.com:destination

8. using insmode i inserted the necessary modules :
(lsmod from my gumstix)
i2c_sensor 3104 0 - Live 0xbf047000
i2c_pxa 5116 0 - Live 0xbf044000
i2c_algo_pxa 3936 1 i2c_pxa, Live 0xbf042000
i2c_dev 8640 0 - Live 0xbf03e000
i2c_core 20656 3 i2c_sensor,i2c_algo_pxa,i2c_dev, Live 0xbf037000

note that i2c_algo_pxa must be inserted prior to i2c_pxa

9.run my binary and got the readings from the compass.

Thanks to everybody for their support,
I hope that this is a bit of help to somebody,
Giannis