In my case the paths are like:
# $linux_tree = /home/d.sergey/kernel/linux-2.6.29-v02.00.29
# $xenomai_root = /home/d.sergey/xemomai/xenomai-2.4.9.1
# $build_root = /home/d.sergey/build_root
# $staging_dir = /nfs/rootfs
CROSS_COMPILE - arm-none-linux-gnueabi

So, I do

1) $ $xenomai_root/scripts/prepare-kernel.sh --arch=arm  --linux=$linux_tree
ENTER
I  omitt --adeos parameter and the script suggests an appropriate one, ENTER

2) Apply patch from Jorge and fix some compilation errors
3) $ cd $linux_tree
4) $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-
O=/home/d.sergey/build_root cosmos_mono_defconfig -j5
5) $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-
O=/home/d.sergey/build_root bzImage modules -j5
6) $ cd  $build_root
7) $ /home/d.sergey/xemomai/xenomai-2.4.9.1/configure
--build=i686-pc-linux-gnu --host=arm-linux --enable-arm-mach=generic
--enable-arm-tsc
so far everything looks good
==== LOG

checking build system type... i686-pc-linux-gnu
checking host system type... arm-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking for arm-linux-gcc... no
checking for gcc... gcc
configure: WARNING: using cross tools not prefixed with host triplet
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking target system type... arm-unknown-linux-gnu
checking for arm-linux-gcc... no
checking for gcc... gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... no
checking for gcc option to accept ISO C89... (cached) none needed
checking how to run the C preprocessor... gcc -E
checking whether build environment is sane... yes
checking for arm-linux-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether to enable maintainer-specific portions of Makefiles... no
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... no
checking for arm-linux-dumpbin... no
checking for arm-linux-link... no
checking for dumpbin... no
checking for link... link -dump -symbols
checking the name lister (link -dump -symbols) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 98304
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking how to recognize dependent libraries... pass_all
checking for arm-linux-ar... no
checking for ar... ar
checking for arm-linux-strip... strip
checking for arm-linux-ranlib... no
checking for ranlib... ranlib
checking command to parse link -dump -symbols output from gcc object...
failed
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries...
yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking dependency style of gcc... gcc3
checking for flex... flex
checking lex output file root... lex.yy
checking lex library... -lfl
checking whether yytext is a pointer... yes
checking for target architecture... arm
checking for debug symbols... no
checking for SMP support... no
checking for ARM machine... generic
checking for ARM architecture version... 4
checking for ARM SA1100 architecture... y
checking for TSC emulation in user-space.... not supported by this board
checking for ARM EABI interface... no
checking whether building Linux in Xenomai build tree... no
checking for Doxygen documentation... no
checking for doxygen... doxygen
checking for dot... NO
checking whether compiling Docbook XML documentation... no
checking for xmllint... xmllint
checking for xsltproc... xsltproc
checking for fop... no
checking whether Docbook XML documentation generation can use network.... no
checking for docbook-xml root dir... network
checking for docbook-xsl root dir... network
checking whether using LaTeX non-stop mode... no
checking mqueue.h usability... yes
checking mqueue.h presence... yes
checking for mqueue.h... yes
checking for sched_setaffinity... ok
checking for specific GCC switches... done
checking whether ld supports @file... yes
checking whether the POSIX skin library automatically calls mlockall... no
checking whether the pSOS skin library automatically calls mlockall... no
checking whether the uITRON skin library automatically calls mlockall... no
checking for shm_open... yes
checking for shm_unlink... yes
checking for mmap64... yes
checking for ftruncate64... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config/Makefile
config.status: creating scripts/Makefile
config.status: creating scripts/xeno-config
config.status: creating scripts/xeno-load
config.status: creating scripts/xeno-test
config.status: creating src/Makefile
config.status: creating src/rtdk/Makefile
config.status: creating src/skins/Makefile
config.status: creating src/skins/posix/Makefile
config.status: creating src/skins/native/Makefile
config.status: creating src/skins/vxworks/Makefile
config.status: creating src/skins/psos+/Makefile
config.status: creating src/skins/vrtx/Makefile
config.status: creating src/skins/rtdm/Makefile
config.status: creating src/skins/rtai/Makefile
config.status: creating src/skins/uitron/Makefile
config.status: creating src/include/Makefile
config.status: creating src/testsuite/Makefile
config.status: creating src/testsuite/latency/Makefile
config.status: creating src/testsuite/switchbench/Makefile
config.status: creating src/testsuite/cyclic/Makefile
config.status: creating src/testsuite/switchtest/Makefile
config.status: creating src/testsuite/irqbench/Makefile
config.status: creating src/testsuite/clocktest/Makefile
config.status: creating src/testsuite/klatency/Makefile
config.status: creating src/utils/Makefile
config.status: creating src/utils/can/Makefile
config.status: creating include/Makefile
config.status: creating include/asm-generic/Makefile
config.status: creating include/asm-generic/bits/Makefile
config.status: creating include/asm-blackfin/Makefile
config.status: creating include/asm-blackfin/bits/Makefile
config.status: creating include/asm-x86/Makefile
config.status: creating include/asm-x86/bits/Makefile
config.status: creating include/asm-powerpc/Makefile
config.status: creating include/asm-powerpc/bits/Makefile
config.status: creating include/asm-ia64/Makefile
config.status: creating include/asm-ia64/bits/Makefile
config.status: creating include/asm-arm/Makefile
config.status: creating include/asm-arm/bits/Makefile
config.status: creating include/asm-sim/Makefile
config.status: creating include/asm-sim/bits/Makefile
config.status: creating include/native/Makefile
config.status: creating include/nucleus/Makefile
config.status: creating include/posix/Makefile
config.status: creating include/posix/sys/Makefile
config.status: creating include/psos+/Makefile
config.status: creating include/rtai/Makefile
config.status: creating include/rtdm/Makefile
config.status: creating include/uitron/Makefile
config.status: creating include/vrtx/Makefile
config.status: creating include/vxworks/Makefile
config.status: creating doc/Makefile
config.status: creating doc/txt/Makefile
config.status: creating doc/man/Makefile
config.status: creating doc/man/clocktest.man
config.status: creating doc/man/cyclictest.man
config.status: creating doc/man/irqbench.man
config.status: creating doc/man/irqloop.man
config.status: creating doc/man/klatency.man
config.status: creating doc/man/latency.man
config.status: creating doc/man/rtcanconfig.man
config.status: creating doc/man/rtcanrecv.man
config.status: creating doc/man/rtcansend.man
config.status: creating doc/man/switchbench.man
config.status: creating doc/man/switchtest.man
config.status: creating doc/man/runinfo.man
config.status: creating doc/man/xeno-config.man
config.status: creating doc/man/xeno-info.man
config.status: creating doc/man/xeno-load.man
config.status: creating doc/man/xeno-test.man
config.status: creating doc/doxygen/Makefile
config.status: creating doc/doxygen/Doxyfile-common
config.status: creating doc/doxygen/Doxyfile
config.status: creating doc/doxygen/Doxyfile-native
config.status: creating doc/doxygen/Doxyfile-nucleus
config.status: creating doc/doxygen/Doxyfile-posix
config.status: creating doc/doxygen/Doxyfile-rtdm
config.status: creating doc/docbook/Makefile
config.status: creating doc/docbook/catalog
config.status: creating doc/docbook/custom-stylesheets/Makefile
config.status: creating doc/docbook/custom-stylesheets/xsl/Makefile
config.status: creating doc/docbook/custom-stylesheets/xsl/common/Makefile
config.status: creating doc/docbook/custom-stylesheets/xsl/fo/Makefile
config.status: creating doc/docbook/custom-stylesheets/xsl/html/Makefile
config.status: creating doc/docbook/custom-stylesheets/xsl/html/chunk.xsl
config.status: creating doc/docbook/custom-stylesheets/xsl/html/onechunk.xsl
config.status: creating doc/docbook/xenomai/Makefile
config.status: creating src/include/xeno_config.h
config.status: linking
/home/d.sergey/xemomai/xenomai-2.4.9.1/include/asm-arm to
src/include/asm/xenomai
config.status: linking
/home/d.sergey/xemomai/xenomai-2.4.9.1/include/asm-generic to
src/include/asm-generic/xenomai
config.status: executing depfiles commands
config.status: executing libtool commands
====

But when I  do
8) $ make DESTDIR=/nfs/rootfs install
I have next messages:

=== LOG
[d.ser...@dsvlinux build_root]$ make DESTDIR=/nfs/rootfs install
Making install in src
make[1]: Entering directory `/home/d.sergey/build_root/src'
Making install in include
make[2]: Entering directory `/home/d.sergey/build_root/src/include'
make[3]: Entering directory `/home/d.sergey/build_root/src/include'
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.
make[3]: Leaving directory `/home/d.sergey/build_root/src/include'
make[2]: Leaving directory `/home/d.sergey/build_root/src/include'
Making install in rtdk
make[2]: Entering directory `/home/d.sergey/build_root/src/rtdk'
/bin/sh ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.
-I/home/d.sergey/xemomai/xenomai-2.4.9.1/src/rtdk -I../../src/include  -O2
-D_GNU_SOURCE -D_REENTRANT -Wall -pipe -march=armv4 -D__XENO__ -D__IN_XENO__
-Wstrict-prototypes -I/home/d.sergey/xemomai/xenomai-2.4.9.1/include    -MT
librtdk_la-init.lo -MD -MP -MF .deps/librtdk_la-init.Tpo -c -o
librtdk_la-init.lo `test -f 'init.c' || echo
'/home/d.sergey/xemomai/xenomai-2.4.9.1/src/rtdk/'`init.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I.
-I/home/d.sergey/xemomai/xenomai-2.4.9.1/src/rtdk -I../../src/include -O2
-D_GNU_SOURCE -D_REENTRANT -Wall -pipe -march=armv4 -D__XENO__ -D__IN_XENO__
-Wstrict-prototypes -I/home/d.sergey/xemomai/xenomai-2.4.9.1/include -MT
librtdk_la-init.lo -MD -MP -MF .deps/librtdk_la-init.Tpo -c
/home/d.sergey/xemomai/xenomai-2.4.9.1/src/rtdk/init.c  -fPIC -DPIC -o
.libs/librtdk_la-init.o
/home/d.sergey/xemomai/xenomai-2.4.9.1/src/rtdk/init.c:1: error: bad value
(armv4) for -march= switch
/home/d.sergey/xemomai/xenomai-2.4.9.1/src/rtdk/init.c:1: error: bad value
(armv4) for -mtune= switch
make[2]: *** [librtdk_la-init.lo] Error 1
make[2]: Leaving directory `/home/d.sergey/build_root/src/rtdk'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/home/d.sergey/build_root/src'
make: *** [install-recursive] Error 1
===

Gilles said: "Your problem here is that you are trying to use gcc (that is
probably an
x86 gcc) with options for an ARM gcc. It does not work. You have to
ensure that the build system uses your cross-compiler."

Which step is wrong? I have only one compiler (located in
/home/d.sergey/compiler/armel-2007q3-51)

Also could you please provide me with the steps how to run the xenomai tests
on my board?
"you can run latency test" is really not enough for me...

Sergey


2009/10/14 Gilles Chanteperdrix <[email protected]>

> Didenko Sergey wrote:
> > Dear Gilles
> >
> > when I did change the HW Timer interrupt number (__ipipe_mach_timerint)
> from
> > 0 to 1
> > Patched kernel is able to boot up...but I'm not sure whether Xenomai is
> > running or not even I can see the messages that it is started...
> > To verify whether it is running or not I want to do latency test ..for
> > that..I'm following the HOWTO which says that I have to
> > 1) configure Xenomai
> > $ ./configure --build=i686-pc-linux-gnu --host=arm-linux
> > --enable-arm-mach=generic --enable-arm-tsc
> >
> > 2) make Install
> > When I do "make DESTDIR=/nfs install" where /nfs - is the NFS path to
> rootfs
> > mounted by board.
> > I have next situation...
> >
> > ===
> >
> > [d.ser...@dsvlinux xenomai-2.4.9.1]$ make DESTDIR=/nfs install
> > Making install in src
> > make[1]: Entering directory `/home/d.sergey/xemomai/xenomai-2.4.9.1/src'
> > Making install in include
> > make[2]: Entering directory
> > `/home/d.sergey/xemomai/xenomai-2.4.9.1/src/include'
> > make[3]: Entering directory
> > `/home/d.sergey/xemomai/xenomai-2.4.9.1/src/include'
> > make[3]: Nothing to be done for `install-exec-am'.
> > make[3]: Nothing to be done for `install-data-am'.
> > make[3]: Leaving directory
> > `/home/d.sergey/xemomai/xenomai-2.4.9.1/src/include'
> > make[2]: Leaving directory
> > `/home/d.sergey/xemomai/xenomai-2.4.9.1/src/include'
> > Making install in rtdk
> > make[2]: Entering directory
> > `/home/d.sergey/xemomai/xenomai-2.4.9.1/src/rtdk'
> > /bin/sh ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.
> > -I../../src/include  -O2 -D_GNU_SOURCE -D_REENTRANT -Wall -pipe
> -march=armv4
> > -D__XENO__ -D__IN_XENO__ -Wstrict-prototypes -I../../include    -MT
> > librtdk_la-init.lo -MD -MP -MF .deps/librtdk_la-init.Tpo -c -o
> > librtdk_la-init.lo `test -f 'init.c' || echo './'`init.c
> > libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../src/include -O2
> > -D_GNU_SOURCE -D_REENTRANT -Wall -pipe -march=armv4 -D__XENO__
> -D__IN_XENO__
> > -Wstrict-prototypes -I../../include -MT librtdk_la-init.lo -MD -MP -MF
> > .deps/librtdk_la-init.Tpo -c init.c  -fPIC -DPIC -o
> .libs/librtdk_la-init.o
> > init.c:1: error: bad value (armv4) for -march= switch
> > init.c:1: error: bad value (armv4) for -mtune= switch
> > make[2]: *** [librtdk_la-init.lo] Error 1
> > make[2]: Leaving directory
> `/home/d.sergey/xemomai/xenomai-2.4.9.1/src/rtdk'
> > make[1]: *** [install-recursive] Error 1
> > make[1]: Leaving directory `/home/d.sergey/xemomai/xenomai-2.4.9.1/src'
> > make: *** [install-recursive] Error 1
> > [d.ser...@dsvlinux xenomai-2.4.9.1]$
>
> Your problem here is that you are trying to use gcc (that is probably an
> x86 gcc) with options for an ARM gcc. It does not work. You have to
> ensure that the build system uses your cross-compiler.
>
> >
> > ====
> >
> > What is wrong?
> > How can I patch the rootfs with Xenomai libraries correctly?
>
> I have no idea. But I can tell you that you do not need to patch
> anything. It should work out of the box.
>
> --
>                                             Gilles.
>
_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Reply via email to