Two patches for the documentation
Hi
xeno.sim.patch contains some clarification on how to build the xenoscope. (GCC 3.4 worked for me on a x86 system, but with a lot of warnings, that fwritable is deprecated)
xeno.patch is a shorter way how to cross-compile using the CROSS_COMPILE variable. It worked for me without any problems for my board. Also contains a hint to use O=../a-build-dir to compile the linux kernel.
Best regards
Signature · 1 line
Niklaus Giger
README.INSTALL +15 -11
@@ -150,20 +150,22 @@ needed, but if you do not use it, configure emit a warning, which may be confusing. +The easiest way to build a GNU cross-compiler might involve using Dan Kegel +crosstools found at http://kegel.com/crosstool. + Since cross-compiling requires specific tools, such tools are generally prefixed with the host architecture name; for example, a compiler for the power PC -architecture may be named powerpc-linux-gcc. +architecture may be named powerpc-405-linux-gnu-gcc. -When this prefix contains the name of the architecture, you may pass this prefix -to the --host option of configure. For example, if you type : -configure --host=powerpc-linux - -configure will automatically use powerpc-linux- as a prefix too all compilation +configure will automatically use powerpc-405-linux-gnu- as a prefix too all compilation tools names and deduce the architecture name. If configure is unable to deduce the architecture name from this prefix, you will have to manually pass the name of all compilation tools on configure command line. As in: -configure --build=i686-pc-linux-gnu --host=powerpc-unknown-linux-gnu CC=ppc_82xx-gcc CXX=ppc_82xx-gcc AR=ppc_82xx-ar LD=ppc_82xx-ld +It might be a good idea to put all the output into a differen build directory +as to build from from linux source several targets. For each target add +O=../build-<target> to each make invocation. +configure CROSS_COMPILE=powerpc-405-linux-gnu- For more details: http://sourceware.org/autobook/autobook/autobook_264.html#SEC264
@@ -204,16 +206,18 @@ 2.2 Building for the PowerPC architecture A typical cross-compilation setup, in order to build Xenomai for a -82xx-based system: +PowerPC-405-based system: $ $xenomai_root/scripts/prepare-kernel.sh --arch=powerpc \ --adeos=$xenomai_root/ksrc/arch/powerpc/patches/adeos-ipipe-2.6.14-ppc-X.Y-ZZ.patch \ --linux=$linux_tree $ cd $linux_tree -$ make xconfig/gconfig/menuconfig # select the kernel and Xenomai options -$ make bzImage modules # then install as needed +$ make CROSS_COMPILE=powerpc-405-linux-gnu- O=../build-powerpc-405-2.6.14 xconfig/gconfig/menuconfig +# select the kernel and Xenomai options +$ make CROSS_COMPILE=powerpc-405-linux-gnu- O=../build-powerpc-405-2.6.14 bzImage modules +# then install as needed $ mkdir $build_root && cd $build_root -$ $xenomai_root/configure --build=i686-pc-linux-gnu --host=powerpc-unknown-linux-gnu CC=ppc_82xx-gcc CXX=ppc_82xx-gcc AR=ppc_82xx-ar LD=ppc_82xx-ld +$ $xenomai_root/configure CROSS_COMPILE=powerpc-405-linux-gnu- $ make install 2.3 Building for the IPF
README +5 -1
@@ -28,7 +28,11 @@ Building the simulator ====================== -You will need the libelf, libpng, tcl8.x/tk8.x and tix41 _development +The simulator does not build with GCC 4.0 or later. + +Currently it does not work on PowerPC systems. + +You will need the libelf, libpng, tcl8.x/tk8.x and tix81 _development packages_ in order to build the simulator and its companion tools. For instance, on Debian systems, you will need to install libelfg0-dev, libpng2-dev, tcl8.3-dev, tk8.3-dev and tix41-dev (any
Philippe Gerum
AppliedQuoted 61 lines · Niklaus Giger
Hi
xeno.sim.patch contains some clarification on how to build the xenoscope. (GCC 3.4 worked for me on a x86 system, but with a lot of warnings, that fwritable is deprecated)
xeno.patch is a shorter way how to cross-compile using the
CROSS_COMPILEvariable. It worked for me without any problems for my board. Also contains a hint to use O=../a-build-dir to compile the linux kernel.Best regards
------------------------------------------------------------------------
Index: README.INSTALL
===================================================================README.INSTALL +10
-10@@ -150,20 +150,22 @@ needed, but if you do not use it, configure emit a warning, which may be confusing. +The easiest way to build a GNU cross-compiler might involve using Dan Kegel +crosstools found at http://kegel.com/crosstool. + Since cross-compiling requires specific tools, such tools are generally prefixed with the host architecture name; for example, a compiler for the power PC -architecture may be named powerpc-linux-gcc. +architecture may be named powerpc-405-linux-gnu-gcc. -When this prefix contains the name of the architecture, you may pass this prefix -to the --host option of configure. For example, if you type : -configure --host=powerpc-linux - -configure will automatically use powerpc-linux- as a prefix too all compilation +configure will automatically use powerpc-405-linux-gnu- as a prefix too all compilation tools names and deduce the architecture name. If configure is unable to deduce the architecture name from this prefix, you will have to manually pass the name of all compilation tools on configure command line. As in: -configure --build=i686-pc-linux-gnu --host=powerpc-unknown-linux-gnu CC=ppc_82xx-gcc CXX=ppc_82xx-gcc AR=ppc_82xx-ar LD=ppc_82xx-ld +It might be a good idea to put all the output into a differen build directory +as to build from from linux source several targets. For each target add +O=../build-<target> to each make invocation. +configure CROSS_COMPILE=powerpc-405-linux-gnu- For more details: http://sourceware.org/autobook/autobook/autobook_264.html#SEC264@@ -204,16 +206,18 @@ 2.2 Building for the PowerPC architecture A typical cross-compilation setup, in order to build Xenomai for a -82xx-based system: +PowerPC-405-based system: $ $xenomai_root/scripts/prepare-kernel.sh --arch=powerpc \ --adeos=$xenomai_root/ksrc/arch/powerpc/patches/adeos-ipipe-2.6.14-ppc-X.Y-ZZ.patch \ --linux=$linux_tree $ cd $linux_tree -$ make xconfig/gconfig/menuconfig # select the kernel and Xenomai options -$ make bzImage modules # then install as needed
README.INSTALL line 223
Quoted 10 lines
README.INSTALL +5
-1+$ make CROSS_COMPILE=powerpc-405-linux-gnu- O=../build-powerpc-405-2.6.14 xconfig/gconfig/menuconfig +# select the kernel and Xenomai options +$ make CROSS_COMPILE=powerpc-405-linux-gnu- O=../build-powerpc-405-2.6.14 bzImage modules +# then install as needed $ mkdir $build_root && cd $build_root -$ $xenomai_root/configure --build=i686-pc-linux-gnu --host=powerpc-unknown-linux-gnu CC=ppc_82xx-gcc CXX=ppc_82xx-gcc AR=ppc_82xx-ar LD=ppc_82xx-ld +$ $xenomai_root/configure CROSS_COMPILE=powerpc-405-linux-gnu- $ make install 2.3 Building for the IPF
Applied, thanks.
Quoted 8 lines
------------------------------------------------------------------------
Index: sim/README
===================================================================
README line 34
Quoted 8 lines
README +4
-1@@ -28,7 +28,11 @@ Building the simulator ====================== -You will need the libelf, libpng, tcl8.x/tk8.x and tix41 _development +The simulator does not build with GCC 4.0 or later. + +Currently it does not work on PowerPC systems. +
Why?
Quoted 12 lines
README +1
-1+You will need the libelf, libpng, tcl8.x/tk8.x and tix81 _development packages_ in order to build the simulator and its companion tools. For instance, on Debian systems, you will need to install libelfg0-dev, libpng2-dev, tcl8.3-dev, tk8.3-dev and tix41-dev (any ------------------------------------------------------------------------_______________________________________________
Xenomai-core mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-core
Signature · 1 line
Philippe.
Am Sonntag, 8. Januar 2006 11.53 schrieb Philippe Gerum:
Quoted 2 lines
Quoted 1 line · Niklaus Giger
Hi
<...>
Quoted 8 lines
Quoted 8 lines
Index: sim/README
===================================================================README +0
-0@@ -28,7 +28,11 @@ Building the simulator ======================
Quoted 7 lines
README line 34
Quoted 5 lines
README +4
-1-You will need the libelf, libpng, tcl8.x/tk8.x and tix41 _development +The simulator does not build with GCC 4.0 or later. + +Currently it does not work on PowerPC systems. +Why?
xenoscope is not even able to open a window as apparently it goes somewhere into a recursion. I do not know however how to debug it.
gdb /usr/xenomai/bin/xenoscope
GNU gdb 6.3-debian
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "powerpc-linux"...Using host libthread_db library "/lib/tls/libthread_db.so.1".
(gdb) run
Starting program: /usr/xenomai/bin/xenoscope
[Thread debugging using libthread_db enabled]
[New Thread 805421056 (LWP 25333)]
[New Thread 813860064 (LWP 25336)]
Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 805421056 (LWP 25333)] 0x0f80c2e8 in strchr () from /lib/tls/libc.so.6 (gdb) info stack
#0 0x0f80c2e8 in strchr () from /lib/tls/libc.so.6 #1 0x0fef3958 in TkpGetFontFamilies () from /usr/lib/libtk8.4.so.0 #2 0x0fef3958 in TkpGetFontFamilies () from /usr/lib/libtk8.4.so.0 #3 0x0fef3958 in TkpGetFontFamilies () from /usr/lib/libtk8.4.so.0 #4 0x0fef3958 in TkpGetFontFamilies () from /usr/lib/libtk8.4.so.0
<..>
#63 0x0fef3958 in TkpGetFontFamilies () from /usr/lib/libtk8.4.so.0 Previous frame inner to this frame (corrupt stack?)
Best regards
Signature · 1 line
Niklaus Giger
Quoted 2 lines · Niklaus Giger
xeno.patch is a shorter way how to cross-compile using the
CROSS_COMPILEvariable.
The CROSS_COMPILE prefix is not used by the configure script of branch 2.1 of Xenomai (though it works with branch 2.0), the --host option of configure should be used instead.
Quoted 1 line
Also contains a hint to use O=../a-build-dir to compile the linux kernel.
Maybe this would look more apropriate in section 1.2, entitled "Configuring and building Linux kernel" ?
The attached patch, for your review, attempt to reword the paragraph I had written on cross-compilation, and reflect the last two remarks.
Signature · 1 line
Gilles Chanteperdrix.
README.INSTALL +27 -23
@@ -76,6 +76,14 @@ Once configured, the kernel should be built as usual. +It might be a good idea to put all the output into a different build +directory as to build from from linux source several targets. For each +target add O=../build-<target> to each make invocation. + +In order to cross-compile the Linux kernel, pass an ARCH and +CROSS_COMPILE variable on make command line. See sections 2.2, 2.3 and +2.4 for examples. + 1.3 Building the user-space support -----------------------------------
@@ -144,33 +152,29 @@ ----------------------- Passing a --host option to the configure script allows to select the -architecture for which the libraries and programs are built. The --build option -allow to choose the architecture on which the compilation tool are run, i.e. the -system running the configure script. Using the --build option should not be -needed, but if you do not use it, configure emit a warning, which may be -confusing. +architecture for which the libraries and programs are built. The +--build option allow to choose the architecture on which the +compilation tool are run, i.e. the system running the configure +script. Using the --build option should not be needed, but if you do +not use it, configure emit a warning, which may be confusing. -The easiest way to build a GNU cross-compiler might involve using Dan Kegel -crosstools found at http://kegel.com/crosstool. +The easiest way to build a GNU cross-compiler might involve using Dan +Kegel crosstools found at http://kegel.com/crosstool. -Since cross-compiling requires specific tools, such tools are generally prefixed -with the host architecture name; for example, a compiler for the power PC -architecture may be named powerpc-405-linux-gnu-gcc. +Since cross-compiling requires specific tools, such tools are +generally prefixed with the host architecture name; for example, a +compiler for the power PC architecture may be named +powerpc-405-linux-gnu-gcc. -configure will automatically use powerpc-405-linux-gnu- as a prefix too all compilation -tools names and deduce the architecture name. If configure is unable to deduce -the architecture name from this prefix, you will have to manually pass the name -of all compilation tools on configure command line. As in: +When passing the option --host=powerpc-405-linux-gnu to configure, +configure will automatically use powerpc-405-linux-gnu- as a prefix to +all compilation tools names and infer the host architecture name from +this prefix. If configure is unable to infer the architecture name +from the cross-compilation tools prefix, you will have to manually +pass the name of all compilation tools on configure command line. -It might be a good idea to put all the output into a differen build directory -as to build from from linux source several targets. For each target add -O=../build-<target> to each make invocation. -configure CROSS_COMPILE=powerpc-405-linux-gnu- +See sections 2.2, 2.3 and 2.4 for examples. -For more details: -http://sourceware.org/autobook/autobook/autobook_264.html#SEC264 -http://sourceware.org/autobook/autobook/autobook_266.html#SEC266 - 2. Typical installation procedures ----------------------------------
@@ -217,7 +221,7 @@ $ make CROSS_COMPILE=powerpc-405-linux-gnu- O=../build-powerpc-405-2.6.14 bzImage modules # then install as needed $ mkdir $build_root && cd $build_root -$ $xenomai_root/configure CROSS_COMPILE=powerpc-405-linux-gnu- +$ $xenomai_root/configure --build=i686-linux --host=powerpc-405-linux-gnu $ make install 2.3 Building for the IPF