LTIB for mpc8349itx

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LTIB for mpc8349itx

17,626 Views
fjpse
Contributor I
I want to make a hello driver for this platform using LTIB.

First, I execute this commands to get the kernel source and to compile the kernel

./ltib -p kernel -m prep
./ltib -p kernel -m scbuild

Now I get the kernel source in rpm/BUILD/linux

I create a subdir rpm/BUILD/test with two files: test.c (my hello driver) and Makefile (attached with extension  .txt)

To compile the driver, I use LTIB in shell mode:

./ltib -m shell
LTIB>cd rpm/BUILD/test
LTIB>make

But the compiler fail because it can't found <platforms/83xx/mpc8349_itx.h> (this file exist) in the linux kernel source (attached the file result.txt with the output of the make command).

What is the problem? How to build a driver using the LTIB?
Thanks.

result.txt
Makefile.txt
test.c
Message Edited by t.dowe on 2009-09-04 12:43 PM
0 Kudos
25 Replies

347 Views
aurelihein
Contributor I
i tried what you did, let me show you what i got :
abouin@FW04:~/ltib/rpm/BUILD/test$ make V=1 ARCH=ppc
make -C ../linux M=/home/abouin/ltib/rpm/BUILD/test
make[1]: entrant dans le répertoire « /home/abouin/ltib/rpm/BUILD/linux-2.6.13 »
mkdir -p /home/abouin/ltib/rpm/BUILD/test/.tmp_versions
make -f scripts/Makefile.build obj=/home/abouin/ltib/rpm/BUILD/test
 gcc -m32 -Wp,-MD,/home/abouin/ltib/rpm/BUILD/test/.test.o.d  -nostdinc -isystem /usr/lib/gcc/i486-linux-gnu/4.1.2/include -D__KERNEL__ -Iinclude  -Iarch/ppc -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -ffreestanding -O2     -fomit-frame-pointer -Iarch/ppc -msoft-float -pipe -ffixed-r2 -mmultiple -mstring -Wa,-maltivec     -DMODULE -DKBUILD_BASENAME=test -DKBUILD_MODNAME=test -c -o /home/abouin/ltib/rpm/BUILD/test/.tmp_test.o /home/abouin/ltib/rpm/BUILD/test/test.c
cc1: error: unrecognized command line option "-mmultiple"
cc1: error: unrecognized command line option "-mstring"
cc1: warning: unknown register name: r2
as: option non reconnue « -maltivec »
make[2]: *** [/home/abouin/ltib/rpm/BUILD/test/test.o] Erreur 1
make[1]: *** [_module_/home/abouin/ltib/rpm/BUILD/test] Erreur 2
make[1]: quittant le répertoire « /home/abouin/ltib/rpm/BUILD/linux-2.6.13 »
make: *** [default] Erreur 2

if you see what goes wrong . . .
thank you

0 Kudos

347 Views
mii
Contributor I
aurelihein, try the command 'make V=1 ARCH=ppc' in a shell ltib (enter by command './ltib -m shell').
 
 
0 Kudos

347 Views
mii
Contributor I
Thanks a lot, the compile is OK.
Now, I have the module nammed test.ko (under rpm/BUILD/test/).
But after the commands : ./ltib -p kernel -m scbuild and ./ltib -p -m scdeploy
this module test.ko is not present in the files : rootfs.ext2.gz.uboot or uImage.
I load this files by tftp to boot (I supposed that you use NFS to boot).
Do you know how to include the module test.ko (under rootfs/lib/module I supposed) ?
Thanks
Mii
 
0 Kudos

347 Views
fjpse
Contributor I
aurelihein posted a message indicating how to make it (the second message of this thread), but i don't probe that. (sorry)

At the moment, I`m working with the small-ramfs (saved into flash memory), because I have to do some tests over the platform before beginning the deployment of the system.


0 Kudos

347 Views
mii
Contributor I
I have seen the aurelihein message, but not understand.
My directory /rootfs/lib/modules/2.6.13.4/sources is a link
to /rpm/BUILD/linux-2.6.13.
To use small-ramfs, you must create rootfs.ext2.gz.uboot, I suppose ?
Do you have modified .lkc file to include test.ko in your small-ramfs ?
Thanks for your time.
0 Kudos