mii,
the makefile that I use is attached to the first message I sent (but renamed to Makefile.txt because it's not possible to attach a file without extension).
Well, I have been doing some probes.
If I execute "make V=1" (see Makefile in linux source directory) instead of "make" (inside LTIB), I can see the commands that will be executed. I get the next output:
gcc -m32 -Wp,-MD,/home/javier/ltib/rpm/BUILD/test/.test.o.d -nostdinc -isystem /opt/mtwk/usr/local/powerpc-linux/gcc-3.4.3-glibc-2.3.3/lib/gcc/powerpc-linux/3.4.3/include -D__KERNEL__ -Iinclude -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -ffreestanding -O2 -fomit-frame-pointer -pipe -msoft-float -fno-unit-at-a-time -Iinclude/asm-i386/mach-default -Wdeclaration-after-statement -DMODULE -DKBUILD_BASENAME=test -DKBUILD_MODNAME=test -c -o /home/javier/ltib/rpm/BUILD/test/.tmp_test.o /home/javier/ltib/rpm/BUILD/test/test.c
One strange thing is the flag -Iinclude/asm-i386/mach-default.
My host is a i386, but my target is a POWERPC.
Well, then I try this "make V=1 ARCH=ppc" and.....voilà!
IT'S COMPILE OK!!!!
The command is gcc instead of powerpc-linux-gcc or some similar, strange, but I can load and unload the driver in the mpc8349itx platform (and the messages are output). I suppose that inside LTIB, gcc is really the powerpc compiler.
Now, I want to make a driver that manipulates a hardware timer and its interrupt.