On 05/13/2011 02:46 PM, Koenig, Florian wrote: > Hi, > i have a powerpc 405GP without FPU and want to build a xenomai application. I > installed and setup eldk-4.2 for ppc_4xx, to have a cross toolchain on my > x86 computer. After that, i patched the linux-2.6.36 kernel with > > scripts/prepare-kernel.sh --linux=/usr/src/linux-2.6.36/ > --adeos=ksrc/arch/powerpc/patches/adeos-ipipe-2.6.36-powerpc-2.12-03.patch > > Then i configured and build the kernel. I tested the kernel on the cpu, and > it runs well. > Now i switched into the xenomai directory and to build the user-space > support, i called: > > ./configure --host=ppc-linux CFLAGS="-msoft-float" LDFLAGS="-msoft-float" > ;make;make install
Please just use: $ ./configure --host=powerpc-linux --prefix=/usr/xenomai-2.5 The toolchain knows that it has to use -msoft-float. Next you need to build and *install* the user-space libs, tools, etc.: $ make $ export DESTDIR=/opt/eldk-4.2/ppc_4xx $ make install > This builds without any errors. Now i simply try to build the hello_world > example from http://www.cs.ru.nl/lab/xenomai/exercises/ex01/Exercise-1.html > with: > > powerpc-linux-gcc -msoft-float -L/usr/xenomai/lib -lnative -lxenomai > -lpthread_rt -lrtdk -I/usr/xenomai/include -o test test.c Then you should be able to compile that program with $ ${CROSS_COMPILE}gcc -o test test.c `$DESTDIR//usr/xenomai-2.5/bin/xeno-config --skin native --cflags --ldflags` -lrtdk Can't tell if that example is OK, though. The one coming with the Xenomai tree in "examples" are known to work. > The build of the test app is without any errors, but when i run it on the > 405GP cpu (which has no FPU) it returns: ILLEGAL INSTRUCTION. If i look at > /proc/xenomai/faults there are only zero´s. > > I know i need soft-float for this cpu, but i think a got everything correctly > setup/build, or? See above. > After reading and doing, i found in the xenomai directory a file called > scripts/defconfig.frag, where the last line is: > > CONFIG_XENO_HW_FPU=y > > Now i dont know, what the file defconfig.frag is for, and why is there > hardware fpu set to yes? I think you can switch that option off. Wolfgang. _______________________________________________ Xenomai-help mailing list [email protected] https://mail.gna.org/listinfo/xenomai-help
