From mboxrd@z Thu Jan 1 00:00:00 1970 From: "=?iso-8859-1?Q?Hans_S=F8ndergaard_(HSO)?=" Date: Tue, 29 Apr 2008 13:37:56 +0200 Message-ID: <2220D86D21B55040AB683933DBD97B5A263A38E8E0@domain.hid> Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_2220D86D21B55040AB683933DBD97B5A263A38E8E0FNDMAILB03VIA_" MIME-Version: 1.0 Subject: [Xenomai-help] Xenomai on AT91SAM9260 List-Id: Help regarding installation and common use of Xenomai List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "xenomai@xenomai.org" --_000_2220D86D21B55040AB683933DBD97B5A263A38E8E0FNDMAILB03VIA_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Is it possible to install Xenomai 2.4.3 together with Linux 2.6.23 on AT91S= AM9260? If the answer is no, which combination of Xenomai and Linux would you recom= mend? Hans Sondergaard VIA University College, Denmark --_000_2220D86D21B55040AB683933DBD97B5A263A38E8E0FNDMAILB03VIA_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

Is it possible to install Xenomai 2.4.3 togethe= r with Linux 2.6.23 on AT91SAM9260?

If the answer is no, which combination of Xenom= ai and Linux would you recommend?

 

Hans Sondergaard

VIA University College, Denmark

 

 

--_000_2220D86D21B55040AB683933DBD97B5A263A38E8E0FNDMAILB03VIA_-- From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <2ff1a98a0804290518x59f92346mfdf32c84055a10fe@domain.hid> Date: Tue, 29 Apr 2008 14:18:27 +0200 From: "Gilles Chanteperdrix" In-Reply-To: <2220D86D21B55040AB683933DBD97B5A263A38E8E0@domain.hid> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <2220D86D21B55040AB683933DBD97B5A263A38E8E0@domain.hid> Subject: Re: [Xenomai-help] Xenomai on AT91SAM9260 List-Id: Help regarding installation and common use of Xenomai List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "=?ISO-8859-1?Q?Hans_S=F8ndergaard_(HSO)?=" Cc: "xenomai@xenomai.org" On Tue, Apr 29, 2008 at 1:37 PM, Hans S=F8ndergaard (HSO) wr= ote: > > > > > Is it possible to install Xenomai 2.4.3 together with Linux 2.6.23 on > AT91SAM9260? > > If the answer is no, which combination of Xenomai and Linux would you > recommend? Xenomai 2.4.3 ships with two versions of the Adeos I-pipe patch: one for Linux 2.6.20, the other for Linux 2.6.24. So, I would recommend using one of these two versions. Of course, you can probably adapt one of the patches to Linux 2.6.23, but that may not be obvious. Note that you may decide to apply the AT91 patch, the I-pipe patch should apply cleanly with or without the AT91 patch. --=20 Gilles From mboxrd@z Thu Jan 1 00:00:00 1970 From: "=?iso-8859-1?Q?Hans_S=F8ndergaard_(HSO)?=" Date: Thu, 1 May 2008 07:46:04 +0200 Message-ID: <2220D86D21B55040AB683933DBD97B5A263A38EC01@domain.hid> References: <2220D86D21B55040AB683933DBD97B5A263A38E8E0@domain.hid> <2ff1a98a0804290518x59f92346mfdf32c84055a10fe@domain.hid> In-Reply-To: <2ff1a98a0804290518x59f92346mfdf32c84055a10fe@domain.hid> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [Xenomai-help] Xenomai on AT91SAM9260 List-Id: Help regarding installation and common use of Xenomai List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gilles Chanteperdrix Cc: "xenomai@xenomai.org" Hi, Thanks for the answer. We are now trying to install Xenomai 2.4.3 using Linux 2.6.24 on AT91SAM926= 0, but have a problem: Is it possible to disable the building of the posix skin when configuring the user space libraries for Xenomai? I have tried --disable-posix-skin, but this had no effect. The reason why I ask is that the building of src/skins/posix/init.c fails like this: [stk@domain.hid posix]$ arm-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I../../../sr= c/inc lude -I../../../../xenomai-2.4.3/src/skins/posix -O2 -D_GNU_SOURCE -D_REENT= RANT -Wall -pipe -march=3Darmv5 -D__XENO__ -D__IN_XENO__ -Wstrict-prototypes -I.= ./../.. /../xenomai-2.4.3/include -I../../../../xenomai-2.4.3/include/posix -MT lib= pthre ad_rt_la-init.lo -MD -MP -MF .deps/libpthread_rt_la-init.Tpo -c ../../../..= /xeno mai-2.4.3/src/skins/posix/init.c -fPIC -DPIC -o .libs/libpthread_rt_la-ini= t.o In file included from ../../../src/include/asm/xenomai/atomic.h:78, from ../../../../xenomai-2.4.3/include/nucleus/system.h:27= , from ../../../src/include/asm/xenomai/system.h:135, from ../../../../xenomai-2.4.3/include/nucleus/types.h:40, from ../../../../xenomai-2.4.3/include/nucleus/queue.h:25, from ../../../../xenomai-2.4.3/include/nucleus/timebase.h:= 30, from ../../../../xenomai-2.4.3/include/nucleus/timer.h:27, from ../../../../xenomai-2.4.3/include/nucleus/thread.h:26= , from ../../../../xenomai-2.4.3/include/posix/pthread.h:150= , from /home/stk/brick/mb9200/buildroot/build_arm/staging_di= r/bin -ccache/../lib/gcc/arm-linux-uclibc/4.1.1/../../../../arm-linux-uclibc/sys-= inclu de/bits/uClibc_mutex.h:16, from /home/stk/brick/mb9200/buildroot/build_arm/staging_di= r/bin -ccache/../lib/gcc/arm-linux-uclibc/4.1.1/../../../../arm-linux-uclibc/sys-= inclu de/bits/uClibc_stdio.h:120, from /home/stk/brick/mb9200/buildroot/build_arm/staging_di= r/bin -ccache/../lib/gcc/arm-linux-uclibc/4.1.1/../../../../arm-linux-uclibc/sys-= inclu de/stdio.h:73, from ../../../../xenomai-2.4.3/src/skins/posix/init.c:20: ../../../src/include/asm/xenomai/syscall.h: In function 'xeno_arm_features_= check ': ../../../src/include/asm/xenomai/syscall.h:295: error: 'stderr' undeclared = (firs t use in this function) ../../../src/include/asm/xenomai/syscall.h:295: error: (Each undeclared ide= ntifi er is reported only once ../../../src/include/asm/xenomai/syscall.h:295: error: for each function it= appe ars in.) Obviously there is something wrong with the include path used: uClibc_mutex.h should not include 'pthread.h' in the Xenomai distribution but rather the version in uClibc itself. Why this happens I'm trying to discover. The complete configure I'm using is: ../xenomai-2.4.3/configure --build=3Di686-pc-linux-gnu --host=3Darm-linux-u= clibc --enable-arm-mach=3Dat91sam926x --enable-arm-tsc Thanks in advance. Hans -----Original Message----- From: Gilles Chanteperdrix [mailto:gilles.chanteperdrix@xenomai.org] Sent: 29. april 2008 14:18 To: Hans S=F8ndergaard (HSO) Cc: xenomai@xenomai.org Subject: Re: [Xenomai-help] Xenomai on AT91SAM9260 On Tue, Apr 29, 2008 at 1:37 PM, Hans S=F8ndergaard (HSO) wr= ote: > > > > > Is it possible to install Xenomai 2.4.3 together with Linux 2.6.23 on > AT91SAM9260? > > If the answer is no, which combination of Xenomai and Linux would you > recommend? Xenomai 2.4.3 ships with two versions of the Adeos I-pipe patch: one for Linux 2.6.20, the other for Linux 2.6.24. So, I would recommend using one of these two versions. Of course, you can probably adapt one of the patches to Linux 2.6.23, but that may not be obvious. Note that you may decide to apply the AT91 patch, the I-pipe patch should apply cleanly with or without the AT91 patch. -- Gilles From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-ID: <18457.59929.12465.572294@domain.hid> Date: Thu, 1 May 2008 18:04:41 +0200 In-Reply-To: <2220D86D21B55040AB683933DBD97B5A263A38EC01@domain.hid> References: <2220D86D21B55040AB683933DBD97B5A263A38E8E0@domain.hid> <2ff1a98a0804290518x59f92346mfdf32c84055a10fe@domain.hid> <2220D86D21B55040AB683933DBD97B5A263A38EC01@domain.hid> From: Gilles Chanteperdrix Subject: Re: [Xenomai-help] Xenomai on AT91SAM9260 List-Id: Help regarding installation and common use of Xenomai List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "=?iso-8859-1?Q?Hans_S=F8ndergaard_(HSO)?=" Cc: "xenomai@xenomai.org" Hans S=F8ndergaard (HSO) wrote: > Hi, >=20 > Thanks for the answer. > We are now trying to install Xenomai 2.4.3 using Linux 2.6.24 on AT91SAM= 9260, > but have a problem: >=20 > Is it possible to disable the building of the posix skin when > configuring the user space libraries for Xenomai? >=20 > I have tried --disable-posix-skin, but this had no effect. >=20 > The reason why I ask is that the building of src/skins/posix/init.c > fails like this: >=20 > [stk@domain.hid posix]$ arm-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I../..= /../src/inc > lude -I../../../../xenomai-2.4.3/src/skins/posix -O2 -D_GNU_SOURCE -D_RE= ENTRANT > -Wall -pipe -march=3Darmv5 -D__XENO__ -D__IN_XENO__ -Wstrict-prototypes = -I../../.. > /../xenomai-2.4.3/include -I../../../../xenomai-2.4.3/include/posix -MT = libpthre > ad_rt_la-init.lo -MD -MP -MF .deps/libpthread_rt_la-init.Tpo -c ../../..= /../xeno > mai-2.4.3/src/skins/posix/init.c -fPIC -DPIC -o .libs/libpthread_rt_la-= init.o > In file included from ../../../src/include/asm/xenomai/atomic.h:78, > from ../../../../xenomai-2.4.3/include/nucleus/system.h= :27, > from ../../../src/include/asm/xenomai/system.h:135, > from ../../../../xenomai-2.4.3/include/nucleus/types.h:= 40, > from ../../../../xenomai-2.4.3/include/nucleus/queue.h:= 25, > from ../../../../xenomai-2.4.3/include/nucleus/timebase= .h:30, > from ../../../../xenomai-2.4.3/include/nucleus/timer.h:= 27, > from ../../../../xenomai-2.4.3/include/nucleus/thread.h= :26, > from ../../../../xenomai-2.4.3/include/posix/pthread.h:= 150, > from /home/stk/brick/mb9200/buildroot/build_arm/staging= _dir/bin > -ccache/../lib/gcc/arm-linux-uclibc/4.1.1/../../../../arm-linux-uclibc/s= ys-inclu > de/bits/uClibc_mutex.h:16, > from /home/stk/brick/mb9200/buildroot/build_arm/staging= _dir/bin > -ccache/../lib/gcc/arm-linux-uclibc/4.1.1/../../../../arm-linux-uclibc/s= ys-inclu > de/bits/uClibc_stdio.h:120, > from /home/stk/brick/mb9200/buildroot/build_arm/staging= _dir/bin > -ccache/../lib/gcc/arm-linux-uclibc/4.1.1/../../../../arm-linux-uclibc/s= ys-inclu > de/stdio.h:73, > from ../../../../xenomai-2.4.3/src/skins/posix/init.c:2= 0: > ../../../src/include/asm/xenomai/syscall.h: In function 'xeno_arm_featur= es_check > ': > ../../../src/include/asm/xenomai/syscall.h:295: error: 'stderr' undeclar= ed (firs > t use in this function) > ../../../src/include/asm/xenomai/syscall.h:295: error: (Each undeclared = identifi > er is reported only once > ../../../src/include/asm/xenomai/syscall.h:295: error: for each function= it appe > ars in.) >=20 > Obviously there is something wrong with the include path used: > uClibc_mutex.h should not include 'pthread.h' in the Xenomai > distribution but rather the version in uClibc itself. >=20 > Why this happens I'm trying to discover. >=20 > The complete configure I'm using is: >=20 > ../xenomai-2.4.3/configure --build=3Di686-pc-linux-gnu --host=3Darm-linu= x-uclibc --enable-arm-mach=3Dat91sam926x --enable-arm-tsc >=20 > Thanks in advance. Well, I understand that it may not be important to you if you do not intend to use the posix skin, but we should try and solve this issue (which seems to be a uclibc issue). Including posix skin pthread.h instead of libc pthread.h should be no problem, since posix skin pthread.h include the libc pthread.h. The problem here is due to the fact that asm-arm/syscall.h is trying to use stderr whereas we are at the very beginning of stdio.h where stderr is not defined yet. I have to admit that I have no idea here other than defining a function in init.c which calls fprintf and to call this function instead of fprintf in asm-arm/syscall.h Philippe, any better idea ? --=20 Gilles. From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="gZBPKLq8pN" Content-Transfer-Encoding: 7bit Message-ID: <18457.62989.876794.339734@domain.hid> Date: Thu, 1 May 2008 18:55:41 +0200 In-Reply-To: <2220D86D21B55040AB683933DBD97B5A263A38EC01@domain.hid> References: <2220D86D21B55040AB683933DBD97B5A263A38E8E0@domain.hid> <2ff1a98a0804290518x59f92346mfdf32c84055a10fe@domain.hid> <2220D86D21B55040AB683933DBD97B5A263A38EC01@domain.hid> From: Gilles Chanteperdrix Subject: Re: [Xenomai-help] Xenomai on AT91SAM9260 List-Id: Help regarding installation and common use of Xenomai List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "=?iso-8859-1?Q?Hans_S=F8ndergaard_(HSO)?=" Cc: "xenomai@xenomai.org" --gZBPKLq8pN Content-Type: text/plain; charset="iso-8859-1" Content-Description: message body and .signature Content-Transfer-Encoding: quoted-printable Hans S=F8ndergaard (HSO) wrote: > from ../../../../xenomai-2.4.3/src/skins/posix/init.c:2= 0: > ../../../src/include/asm/xenomai/syscall.h: In function 'xeno_arm_featur= es_check > ': > ../../../src/include/asm/xenomai/syscall.h:295: error: 'stderr' undeclar= ed (firs > t use in this function) > ../../../src/include/asm/xenomai/syscall.h:295: error: (Each undeclared = identifi > er is reported only once > ../../../src/include/asm/xenomai/syscall.h:295: error: for each function= it appe > ars in.) >=20 > Obviously there is something wrong with the include path used: > uClibc_mutex.h should not include 'pthread.h' in the Xenomai > distribution but rather the version in uClibc itself. >=20 > Why this happens I'm trying to discover. >=20 > The complete configure I'm using is: >=20 > ../xenomai-2.4.3/configure --build=3Di686-pc-linux-gnu --host=3Darm-linu= x-uclibc --enable-arm-mach=3Dat91sam926x --enable-arm-tsc The way I see it, the problem is that posix/pthread.h includes nucleus/thread.h and nucleus/intr.h to get a few constants definitions. And since these include files include other include files, we end up with the whole stack of xenomai includes. So, I propose the following patch which basically stop including other include files in nucleus/thread.h and nucleus/intr.h when included from user-space. The only downside of this solution is that application like cyclictest who want to use the I-pipe tracer now need to include explicitely nucleus/trace.h. --=20 Gilles. --gZBPKLq8pN Content-Type: text/plain Content-Disposition: inline; filename="xeno-fix-uclibc-includes.diff" Content-Transfer-Encoding: 7bit Index: include/nucleus/thread.h =================================================================== --- include/nucleus/thread.h (revision 3732) +++ include/nucleus/thread.h (working copy) @@ -22,8 +22,6 @@ #ifndef _XENO_NUCLEUS_THREAD_H #define _XENO_NUCLEUS_THREAD_H -#include - /*! @ingroup nucleus @defgroup nucleus_state_flags Thread state flags. @brief Bits reporting permanent or transient states of thread. @@ -130,6 +128,7 @@ #if defined(__KERNEL__) || defined(__XENO_SIM__) #include +#include #ifdef __XENO_SIM__ /* Pseudo-status (must not conflict with other bits) */ Index: include/nucleus/intr.h =================================================================== --- include/nucleus/intr.h (revision 3732) +++ include/nucleus/intr.h (working copy) @@ -22,8 +22,6 @@ #ifndef _XENO_NUCLEUS_INTR_H #define _XENO_NUCLEUS_INTR_H -#include - /* Possible return values of ISR. */ #define XN_ISR_NONE 0x1 #define XN_ISR_HANDLED 0x2 @@ -41,6 +39,7 @@ #if defined(__KERNEL__) || defined(__XENO_SIM__) +#include #include typedef struct xnintr { Index: src/skins/posix/rtdm.c =================================================================== --- src/skins/posix/rtdm.c (revision 3732) +++ src/skins/posix/rtdm.c (working copy) @@ -18,6 +18,7 @@ */ #include +#include #include #include #include Index: src/skins/posix/thread.c =================================================================== --- src/skins/posix/thread.c (revision 3732) +++ src/skins/posix/thread.c (working copy) @@ -17,6 +17,7 @@ */ #include +#include #include #include #include Index: src/skins/posix/clock.c =================================================================== --- src/skins/posix/clock.c (revision 3732) +++ src/skins/posix/clock.c (working copy) @@ -18,6 +18,7 @@ #include #include +#include #include #include /* For pthread_setcanceltype. */ #include Index: src/testsuite/cyclic/cyclictest.c =================================================================== --- src/testsuite/cyclic/cyclictest.c (revision 3732) +++ src/testsuite/cyclic/cyclictest.c (working copy) @@ -35,6 +35,7 @@ #include #include #include +#include #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) --gZBPKLq8pN-- From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <4819F7A6.1010809@domain.hid> Date: Thu, 01 May 2008 19:02:30 +0200 From: Philippe Gerum MIME-Version: 1.0 References: <2220D86D21B55040AB683933DBD97B5A263A38E8E0@domain.hid> <2ff1a98a0804290518x59f92346mfdf32c84055a10fe@domain.hid> <2220D86D21B55040AB683933DBD97B5A263A38EC01@domain.hid> <18457.59929.12465.572294@domain.hid> In-Reply-To: <18457.59929.12465.572294@domain.hid> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: Philippe Gerum Subject: Re: [Xenomai-help] Xenomai on AT91SAM9260 Reply-To: rpm@xenomai.org List-Id: Help regarding installation and common use of Xenomai List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gilles Chanteperdrix Cc: "xenomai@xenomai.org" , =?ISO-8859-1?Q?=22Hans_S=F8ndergaard_=28HSO=29=22?= Gilles Chanteperdrix wrote: > Hans S=F8ndergaard (HSO) wrote: > > Hi, > >=20 > > Thanks for the answer. > > We are now trying to install Xenomai 2.4.3 using Linux 2.6.24 on AT91S= AM9260, > > but have a problem: > >=20 > > Is it possible to disable the building of the posix skin when > > configuring the user space libraries for Xenomai? > >=20 > > I have tried --disable-posix-skin, but this had no effect. > >=20 > > The reason why I ask is that the building of src/skins/posix/init.c > > fails like this: > >=20 > > [stk@domain.hid posix]$ arm-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I../= ../../src/inc > > lude -I../../../../xenomai-2.4.3/src/skins/posix -O2 -D_GNU_SOURCE -D_= REENTRANT > > -Wall -pipe -march=3Darmv5 -D__XENO__ -D__IN_XENO__ -Wstrict-prototype= s -I../../.. > > /../xenomai-2.4.3/include -I../../../../xenomai-2.4.3/include/posix -M= T libpthre > > ad_rt_la-init.lo -MD -MP -MF .deps/libpthread_rt_la-init.Tpo -c ../../= ../../xeno > > mai-2.4.3/src/skins/posix/init.c -fPIC -DPIC -o .libs/libpthread_rt_l= a-init.o > > In file included from ../../../src/include/asm/xenomai/atomic.h:78, > > from ../../../../xenomai-2.4.3/include/nucleus/system= .h:27, > > from ../../../src/include/asm/xenomai/system.h:135, > > from ../../../../xenomai-2.4.3/include/nucleus/types.= h:40, > > from ../../../../xenomai-2.4.3/include/nucleus/queue.= h:25, > > from ../../../../xenomai-2.4.3/include/nucleus/timeba= se.h:30, > > from ../../../../xenomai-2.4.3/include/nucleus/timer.= h:27, > > from ../../../../xenomai-2.4.3/include/nucleus/thread= .h:26, > > from ../../../../xenomai-2.4.3/include/posix/pthread.= h:150, > > from /home/stk/brick/mb9200/buildroot/build_arm/stagi= ng_dir/bin > > -ccache/../lib/gcc/arm-linux-uclibc/4.1.1/../../../../arm-linux-uclibc= /sys-inclu > > de/bits/uClibc_mutex.h:16, > > from /home/stk/brick/mb9200/buildroot/build_arm/stagi= ng_dir/bin > > -ccache/../lib/gcc/arm-linux-uclibc/4.1.1/../../../../arm-linux-uclibc= /sys-inclu > > de/bits/uClibc_stdio.h:120, > > from /home/stk/brick/mb9200/buildroot/build_arm/stagi= ng_dir/bin > > -ccache/../lib/gcc/arm-linux-uclibc/4.1.1/../../../../arm-linux-uclibc= /sys-inclu > > de/stdio.h:73, > > from ../../../../xenomai-2.4.3/src/skins/posix/init.c= :20: > > ../../../src/include/asm/xenomai/syscall.h: In function 'xeno_arm_feat= ures_check > > ': > > ../../../src/include/asm/xenomai/syscall.h:295: error: 'stderr' undecl= ared (firs > > t use in this function) > > ../../../src/include/asm/xenomai/syscall.h:295: error: (Each undeclare= d identifi > > er is reported only once > > ../../../src/include/asm/xenomai/syscall.h:295: error: for each functi= on it appe > > ars in.) > >=20 > > Obviously there is something wrong with the include path used: > > uClibc_mutex.h should not include 'pthread.h' in the Xenomai > > distribution but rather the version in uClibc itself. > >=20 > > Why this happens I'm trying to discover. > >=20 > > The complete configure I'm using is: > >=20 > > ../xenomai-2.4.3/configure --build=3Di686-pc-linux-gnu --host=3Darm-li= nux-uclibc --enable-arm-mach=3Dat91sam926x --enable-arm-tsc > >=20 > > Thanks in advance. >=20 > Well, I understand that it may not be important to you if you do not > intend to use the posix skin, but we should try and solve this issue > (which seems to be a uclibc issue). Including posix skin pthread.h > instead of libc pthread.h should be no problem, since posix skin > pthread.h include the libc pthread.h. The problem here is due to the > fact that asm-arm/syscall.h is trying to use stderr whereas we are at > the very beginning of stdio.h where stderr is not defined yet. >=20 > I have to admit that I have no idea here other than defining a function > in init.c which calls fprintf and to call this function instead of > fprintf in asm-arm/syscall.h >=20 > Philippe, any better idea ? >=20 No, but I do have an almost as ugly one to suggest: --- include/asm-arm/syscall.h (revision 3729) +++ include/asm-arm/syscall.h (working copy) @@ -222,7 +222,6 @@ #define XENOMAI_SYSARCH_TSCINFO 4 #ifndef __KERNEL__ -#include #include #include #include @@ -230,6 +229,8 @@ #include #include #include +#include +#include __attribute__((weak)) struct __xn_tscinfo __xn_tscinfo =3D { type: -1 @@ -291,17 +292,15 @@ err =3D XENOMAI_SYSCALL2(__xn_sys_arch, XENOMAI_SYSARCH_TSCINFO, &__xn_tscinfo); if (err) { - error: - fprintf(stderr, "Xenomai: Your board/configuration does not" - " allow tsc emulation in user-space: %d\n", err); - exit(EXIT_FAILURE); + fail: + error(EXIT_FAILURE, err, + "Xenomai: Your board/configuration does not" + " allow tsc emulation in user-space\n"); } fd =3D open("/dev/mem", O_RDONLY | O_SYNC); - if (fd =3D=3D -1) { - perror("Xenomai init: open(/dev/mem)"); - exit(EXIT_FAILURE); - } + if (fd =3D=3D -1) + error(EXIT_FAILURE, errno, "Xenomai init: open(/dev/mem)"); page_size =3D sysconf(_SC_PAGESIZE); @@ -313,10 +312,8 @@ phys_addr =3D (unsigned long) __xn_tscinfo.u.fr.counter; addr =3D mmap(NULL, page_size, PROT_READ, MAP_SHARED, fd, phys_addr & ~(page_size - 1)); - if (addr =3D=3D MAP_FAILED) { - perror("Xenomai init: mmap(/dev/mem)"); - exit(EXIT_FAILURE); - } + if (addr =3D=3D MAP_FAILED) + error(EXIT_FAILURE, errno, "Xenomai init: mmap(/dev/mem)"); __xn_tscinfo.u.fr.counter =3D ((volatile unsigned *) @@ -330,10 +327,8 @@ phys_addr =3D (unsigned long) __xn_tscinfo.u.dec.counter; addr =3D mmap(NULL, page_size, PROT_READ, MAP_SHARED, fd, phys_addr & ~(page_size - 1)); - if (addr =3D=3D MAP_FAILED) { - perror("Xenomai init: mmap(/dev/mem)"); - exit(EXIT_FAILURE); - } + if (addr =3D=3D MAP_FAILED) + error(EXIT_FAILURE, "Xenomai init: mmap(/dev/mem)"); __xn_tscinfo.u.dec.counter =3D ((volatile unsigned *) @@ -342,18 +337,15 @@ } #endif /* CONFIG_XENO_ARM_HW_DIRECT_TSC =3D=3D __XN_TSC_TYPE_DECREMENTER */ case __XN_TSC_TYPE_NONE: - goto error; + goto fail; =09 default: - fprintf(stderr, - "Xenomai: kernel/user tsc emulation mismatch.\n"); - exit(EXIT_FAILURE); + error(EXIT_FAILURE, err, + "Xenomai: kernel/user tsc emulation mismatch.\n"); } - if (close(fd)) { - perror("Xenomai init: close(/dev/mem)"); - exit(EXIT_FAILURE); - } + if (close(fd)) + error(EXIT_FAILURE, errno, "Xenomai init: close(/dev/mem)"); #endif /* CONFIG_XENO_ARM_HW_DIRECT_TSC */ } #define xeno_arch_features_check() xeno_arm_features_check() --=20 Philippe. From mboxrd@z Thu Jan 1 00:00:00 1970 From: "=?iso-8859-1?Q?Hans_S=F8ndergaard_(HSO)?=" Date: Sat, 3 May 2008 10:21:14 +0200 Message-ID: <2220D86D21B55040AB683933DBD97B5A263A38ECAA@FND-MAILB03.VIA.DK> References: <2220D86D21B55040AB683933DBD97B5A263A38E8E0@domain.hid> <2ff1a98a0804290518x59f92346mfdf32c84055a10fe@domain.hid> <2220D86D21B55040AB683933DBD97B5A263A38EC01@domain.hid> <18457.59929.12465.572294@domain.hid> <4819F7A6.1010809@domain.hid> In-Reply-To: <4819F7A6.1010809@domain.hid> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [Xenomai-help] Xenomai on AT91SAM9260 List-Id: Help regarding installation and common use of Xenomai List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "rpm@xenomai.org" , Gilles Chanteperdrix Cc: "xenomai@xenomai.org" Hi, The patch worked, and we are now able to compile the userspace libraries as= well as the kernel. Thank you very much! Hans S=F8 -----Original Message----- From: Philippe Gerum [mailto:philippe.gerum@domain.hid] On Behalf Of Philipp= e Gerum Sent: 1. maj 2008 19:03 To: Gilles Chanteperdrix Cc: Hans S=F8ndergaard (HSO); xenomai@xenomai.org Subject: Re: [Xenomai-help] Xenomai on AT91SAM9260 Gilles Chanteperdrix wrote: > Hans S=F8ndergaard (HSO) wrote: > > Hi, > > > > Thanks for the answer. > > We are now trying to install Xenomai 2.4.3 using Linux 2.6.24 on AT91S= AM9260, > > but have a problem: > > > > Is it possible to disable the building of the posix skin when > > configuring the user space libraries for Xenomai? > > > > I have tried --disable-posix-skin, but this had no effect. > > > > The reason why I ask is that the building of src/skins/posix/init.c > > fails like this: > > > > [stk@domain.hid posix]$ arm-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I../../= ../src/inc > > lude -I../../../../xenomai-2.4.3/src/skins/posix -O2 -D_GNU_SOURCE -D_= REENTRANT > > -Wall -pipe -march=3Darmv5 -D__XENO__ -D__IN_XENO__ -Wstrict-prototype= s -I../../.. > > /../xenomai-2.4.3/include -I../../../../xenomai-2.4.3/include/posix -M= T libpthre > > ad_rt_la-init.lo -MD -MP -MF .deps/libpthread_rt_la-init.Tpo -c ../../= ../../xeno > > mai-2.4.3/src/skins/posix/init.c -fPIC -DPIC -o .libs/libpthread_rt_l= a-init.o > > In file included from ../../../src/include/asm/xenomai/atomic.h:78, > > from ../../../../xenomai-2.4.3/include/nucleus/system= .h:27, > > from ../../../src/include/asm/xenomai/system.h:135, > > from ../../../../xenomai-2.4.3/include/nucleus/types.= h:40, > > from ../../../../xenomai-2.4.3/include/nucleus/queue.= h:25, > > from ../../../../xenomai-2.4.3/include/nucleus/timeba= se.h:30, > > from ../../../../xenomai-2.4.3/include/nucleus/timer.= h:27, > > from ../../../../xenomai-2.4.3/include/nucleus/thread= .h:26, > > from ../../../../xenomai-2.4.3/include/posix/pthread.= h:150, > > from /home/stk/brick/mb9200/buildroot/build_arm/stagi= ng_dir/bin > > -ccache/../lib/gcc/arm-linux-uclibc/4.1.1/../../../../arm-linux-uclibc= /sys-inclu > > de/bits/uClibc_mutex.h:16, > > from /home/stk/brick/mb9200/buildroot/build_arm/stagi= ng_dir/bin > > -ccache/../lib/gcc/arm-linux-uclibc/4.1.1/../../../../arm-linux-uclibc= /sys-inclu > > de/bits/uClibc_stdio.h:120, > > from /home/stk/brick/mb9200/buildroot/build_arm/stagi= ng_dir/bin > > -ccache/../lib/gcc/arm-linux-uclibc/4.1.1/../../../../arm-linux-uclibc= /sys-inclu > > de/stdio.h:73, > > from ../../../../xenomai-2.4.3/src/skins/posix/init.c= :20: > > ../../../src/include/asm/xenomai/syscall.h: In function 'xeno_arm_feat= ures_check > > ': > > ../../../src/include/asm/xenomai/syscall.h:295: error: 'stderr' undecl= ared (firs > > t use in this function) > > ../../../src/include/asm/xenomai/syscall.h:295: error: (Each undeclare= d identifi > > er is reported only once > > ../../../src/include/asm/xenomai/syscall.h:295: error: for each functi= on it appe > > ars in.) > > > > Obviously there is something wrong with the include path used: > > uClibc_mutex.h should not include 'pthread.h' in the Xenomai > > distribution but rather the version in uClibc itself. > > > > Why this happens I'm trying to discover. > > > > The complete configure I'm using is: > > > > ../xenomai-2.4.3/configure --build=3Di686-pc-linux-gnu --host=3Darm-li= nux-uclibc --enable-arm-mach=3Dat91sam926x --enable-arm-tsc > > > > Thanks in advance. > > Well, I understand that it may not be important to you if you do not > intend to use the posix skin, but we should try and solve this issue > (which seems to be a uclibc issue). Including posix skin pthread.h > instead of libc pthread.h should be no problem, since posix skin > pthread.h include the libc pthread.h. The problem here is due to the > fact that asm-arm/syscall.h is trying to use stderr whereas we are at > the very beginning of stdio.h where stderr is not defined yet. > > I have to admit that I have no idea here other than defining a function > in init.c which calls fprintf and to call this function instead of > fprintf in asm-arm/syscall.h > > Philippe, any better idea ? > No, but I do have an almost as ugly one to suggest: --- include/asm-arm/syscall.h (revision 3729) +++ include/asm-arm/syscall.h (working copy) @@ -222,7 +222,6 @@ #define XENOMAI_SYSARCH_TSCINFO 4 #ifndef __KERNEL__ -#include #include #include #include @@ -230,6 +229,8 @@ #include #include #include +#include +#include __attribute__((weak)) struct __xn_tscinfo __xn_tscinfo =3D { type: -1 @@ -291,17 +292,15 @@ err =3D XENOMAI_SYSCALL2(__xn_sys_arch, XENOMAI_SYSARCH_TSCINFO, &__xn_tscinfo); if (err) { - error: - fprintf(stderr, "Xenomai: Your board/configuration does not= " - " allow tsc emulation in user-space: %d\n", err); - exit(EXIT_FAILURE); + fail: + error(EXIT_FAILURE, err, + "Xenomai: Your board/configuration does not" + " allow tsc emulation in user-space\n"); } fd =3D open("/dev/mem", O_RDONLY | O_SYNC); - if (fd =3D=3D -1) { - perror("Xenomai init: open(/dev/mem)"); - exit(EXIT_FAILURE); - } + if (fd =3D=3D -1) + error(EXIT_FAILURE, errno, "Xenomai init: open(/dev/mem)"); page_size =3D sysconf(_SC_PAGESIZE); @@ -313,10 +312,8 @@ phys_addr =3D (unsigned long) __xn_tscinfo.u.fr.counter; addr =3D mmap(NULL, page_size, PROT_READ, MAP_SHARED, fd, phys_addr & ~(page_size - 1)); - if (addr =3D=3D MAP_FAILED) { - perror("Xenomai init: mmap(/dev/mem)"); - exit(EXIT_FAILURE); - } + if (addr =3D=3D MAP_FAILED) + error(EXIT_FAILURE, errno, "Xenomai init: mmap(/dev= /mem)"); __xn_tscinfo.u.fr.counter =3D ((volatile unsigned *) @@ -330,10 +327,8 @@ phys_addr =3D (unsigned long) __xn_tscinfo.u.dec.counter; addr =3D mmap(NULL, page_size, PROT_READ, MAP_SHARED, fd, phys_addr & ~(page_size - 1)); - if (addr =3D=3D MAP_FAILED) { - perror("Xenomai init: mmap(/dev/mem)"); - exit(EXIT_FAILURE); - } + if (addr =3D=3D MAP_FAILED) + error(EXIT_FAILURE, "Xenomai init: mmap(/dev/mem)")= ; __xn_tscinfo.u.dec.counter =3D ((volatile unsigned *) @@ -342,18 +337,15 @@ } #endif /* CONFIG_XENO_ARM_HW_DIRECT_TSC =3D=3D __XN_TSC_TYPE_DECREMENTER *= / case __XN_TSC_TYPE_NONE: - goto error; + goto fail; default: - fprintf(stderr, - "Xenomai: kernel/user tsc emulation mismatch.\n"); - exit(EXIT_FAILURE); + error(EXIT_FAILURE, err, + "Xenomai: kernel/user tsc emulation mismatch.\n"); } - if (close(fd)) { - perror("Xenomai init: close(/dev/mem)"); - exit(EXIT_FAILURE); - } + if (close(fd)) + error(EXIT_FAILURE, errno, "Xenomai init: close(/dev/mem)")= ; #endif /* CONFIG_XENO_ARM_HW_DIRECT_TSC */ } #define xeno_arch_features_check() xeno_arm_features_check() -- Philippe. From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-ID: <18460.29528.322066.882640@domain.hid> Date: Sat, 3 May 2008 16:14:48 +0200 In-Reply-To: <2220D86D21B55040AB683933DBD97B5A263A38ECAA@FND-MAILB03.VIA.DK> References: <2220D86D21B55040AB683933DBD97B5A263A38E8E0@domain.hid> <2ff1a98a0804290518x59f92346mfdf32c84055a10fe@domain.hid> <2220D86D21B55040AB683933DBD97B5A263A38EC01@domain.hid> <18457.59929.12465.572294@domain.hid> <4819F7A6.1010809@domain.hid> <2220D86D21B55040AB683933DBD97B5A263A38ECAA@FND-MAILB03.VIA.DK> From: Gilles Chanteperdrix Subject: Re: [Xenomai-help] Xenomai on AT91SAM9260 List-Id: Help regarding installation and common use of Xenomai List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "=?iso-8859-1?Q?Hans_S=F8ndergaard_(HSO)?=" Cc: "xenomai@xenomai.org" Hans S=F8ndergaard (HSO) wrote: > Hi, >=20 > The patch worked, and we are now able to compile the userspace libraries= as well as the kernel. >=20 > Thank you very much! Which patch, the one I sent, or the one Philippe sent ? --=20 Gilles. From mboxrd@z Thu Jan 1 00:00:00 1970 From: "=?iso-8859-1?Q?Hans_S=F8ndergaard_(HSO)?=" Date: Sun, 4 May 2008 17:16:58 +0200 Message-ID: <2220D86D21B55040AB683933DBD97B5A263A38ECEC@FND-MAILB03.VIA.DK> References: <2220D86D21B55040AB683933DBD97B5A263A38E8E0@domain.hid> <2ff1a98a0804290518x59f92346mfdf32c84055a10fe@domain.hid> <2220D86D21B55040AB683933DBD97B5A263A38EC01@domain.hid> <18457.59929.12465.572294@domain.hid> <4819F7A6.1010809@domain.hid> <2220D86D21B55040AB683933DBD97B5A263A38ECAA@FND-MAILB03.VIA.DK> <18460.29528.322066.882640@domain.hid> In-Reply-To: <18460.29528.322066.882640@domain.hid> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [Xenomai-help] Xenomai on AT91SAM9260 List-Id: Help regarding installation and common use of Xenomai List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gilles Chanteperdrix Cc: "xenomai@xenomai.org" I used yours - this one (we didn't try the other): Index: include/nucleus/thread.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- include/nucleus/thread.h (revision 3732) +++ include/nucleus/thread.h (working copy) @@ -22,8 +22,6 @@ #ifndef _XENO_NUCLEUS_THREAD_H #define _XENO_NUCLEUS_THREAD_H -#include - /*! @ingroup nucleus @defgroup nucleus_state_flags Thread state flags. @brief Bits reporting permanent or transient states of thread. @@ -130,6 +128,7 @@ #if defined(__KERNEL__) || defined(__XENO_SIM__) #include +#include #ifdef __XENO_SIM__ /* Pseudo-status (must not conflict with other bits) */ Index: include/nucleus/intr.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- include/nucleus/intr.h (revision 3732) +++ include/nucleus/intr.h (working copy) @@ -22,8 +22,6 @@ #ifndef _XENO_NUCLEUS_INTR_H #define _XENO_NUCLEUS_INTR_H -#include - /* Possible return values of ISR. */ #define XN_ISR_NONE 0x1 #define XN_ISR_HANDLED 0x2 @@ -41,6 +39,7 @@ #if defined(__KERNEL__) || defined(__XENO_SIM__) +#include #include typedef struct xnintr { Index: src/skins/posix/rtdm.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- src/skins/posix/rtdm.c (revision 3732) +++ src/skins/posix/rtdm.c (working copy) @@ -18,6 +18,7 @@ */ #include +#include #include #include #include Index: src/skins/posix/thread.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- src/skins/posix/thread.c (revision 3732) +++ src/skins/posix/thread.c (working copy) @@ -17,6 +17,7 @@ */ #include +#include #include #include #include Index: src/skins/posix/clock.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- src/skins/posix/clock.c (revision 3732) +++ src/skins/posix/clock.c (working copy) @@ -18,6 +18,7 @@ #include #include +#include #include #include /* For pthread_setcanceltype. */ #include Index: src/testsuite/cyclic/cyclictest.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- src/testsuite/cyclic/cyclictest.c (revision 3732) +++ src/testsuite/cyclic/cyclictest.c (working copy) @@ -35,6 +35,7 @@ #include #include #include +#include #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) Kind regards, Hans S=F8 and Stephan Korsholm -----Original Message----- From: Gilles Chanteperdrix [mailto:gilles.chanteperdrix@xenomai.org] Sent: 3. maj 2008 16:15 To: Hans S=F8ndergaard (HSO) Cc: rpm@xenomai.org; xenomai@xenomai.org Subject: RE: [Xenomai-help] Xenomai on AT91SAM9260 Hans S=F8ndergaard (HSO) wrote: > Hi, > > The patch worked, and we are now able to compile the userspace libraries= as well as the kernel. > > Thank you very much! Which patch, the one I sent, or the one Philippe sent ? -- Gilles.