All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] Problem to cross-compile Xenomai user-space support
@ 2010-03-25 20:24 Chtourou Sonda
  2010-03-28 13:26 ` Patrice Kadionik
  0 siblings, 1 reply; 18+ messages in thread
From: Chtourou Sonda @ 2010-03-25 20:24 UTC (permalink / raw)
  To: xenomai

[-- Attachment #1: Type: text/plain, Size: 1557 bytes --]

Dears, 


I built the uClinux kernel for NIOS II and it run well on the target board. I followed the typical actions available here : http://www.nioswiki.com/ 

Now, I want to add a co-scheduler xenomai to the kernel (uclinux) to reduce its latency. I followed these steps: (http://www.xenomai.org/documentation/xenomai-2.5/README.INSTALL)
$ $xenomai-2.5.1/scripts/prepare-kernel.sh --arch=nios2 --adeos=$xenomai-2.5.1/ksrc/arch/nios2/patches/adeos-ipipe-2.6.30-nios2-1.1-00.patch
  --linux=$linux_tree
$ $xenomai-2.5.1/configure --host=nios2-linux
$ make install DESTDIR=$uClinux-dist/romfs

But, in this step, I got this error:

eck_vdso-check-vdso.o ../../skins/native/libnative.la -lpthread -lm
libtool: link: ../../../scripts/wrap-link.sh nios2-linux-gcc -Wl,-elf2flt -o check-vdso check_vdso-check-vdso.o  ../../skins/native/.libs/libnative.a -lpthread -lm
check-vdso.elf2flt(.text+0x16c): In function `main':
: undefined reference to `xeno_sem_heap'
check-vdso.elf2flt(.text+0x170): In function `main':
: undefined reference to `xeno_sem_heap'
collect2: ld returned 1 exit status
make[3]: *** [check-vdso] Erreur 1
make[3]: quittant le répertoire « /home/sonda/Desktop/xenomai-2.5.1/src/testsuite/unit »
make[2]: *** [all-recursive] Erreur 1
make[2]: quittant le répertoire « /home/sonda/Desktop/xenomai-2.5.1/src/testsuite »
make[1]: *** [all-recursive] Erreur 1
make[1]: quittant le répertoire « /home/sonda/Desktop/xenomai-2.5.1/src »
make: *** [all-recursive] Erreur 1

what can I do? Please help
Regards,


      

[-- Attachment #2: Type: text/html, Size: 2413 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Xenomai-help] Problem to cross-compile Xenomai user-space support
  2010-03-25 20:24 [Xenomai-help] Problem to cross-compile Xenomai user-space support Chtourou Sonda
@ 2010-03-28 13:26 ` Patrice Kadionik
  2010-03-29 22:20   ` Huan Fang
  0 siblings, 1 reply; 18+ messages in thread
From: Patrice Kadionik @ 2010-03-28 13:26 UTC (permalink / raw)
  To: Chtourou Sonda; +Cc: xenomai

[-- Attachment #1: Type: text/plain, Size: 4703 bytes --]

Le 20:59, Chtourou Sonda a écrit :
>
> Dears,
>
Hi,

>
> I built the uClinux kernel for NIOS II and it run well on the target 
> board. I followed the typical actions available here : 
> http://www.nioswiki.com/
>
> Now, I want to add a co-scheduler xenomai to the kernel (uclinux) to 
> reduce its latency. I followed these steps: 
> (http://www.xenomai.org/documentation/xenomai-2.5/README.INSTALL)
>
I've tried to reproduce your compilation error but without success.

For using Xenomai on NIOS II processor with uClinux, you must add extra 
hardware in your SoPC design as explained in this tutorial 
(http://uuu.enseirb.fr/~kadionik/nios2-xenomai/Xenomai%20on%20NIOS%20II%20Softcore%20Processor%20Guide-v1.1.pdf).

It is OK on my Altera 1S10 board  with Xenomai v2.5.1 (see traces).

Sincerely;

Patrice
========================================

Uncompressing Linux... Ok, booting the kernel.
Linux version 2.6.30 (kadionik@domain.hid) (gcc version 3.4.6) #4 PREEMPT 
Sun Mar 0


uClinux/Nios II
Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 4064
Kernel command line:
NR_IRQS:32
PID hash table entries: 64 (order: 6, 256 bytes)
I-pipe 1.1-00: pipeline enabled.
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Memory available: 12108k/3990k RAM, 0k/0k ROM (1931k kernel code, 2059k 
data)
Calibrating delay loop... 24.06 BogoMIPS (lpj=120320)
Mount-cache hash table entries: 512
net_namespace: 264 bytes
NET: Registered protocol family 16
init_BSP(): registering device resources
bio: create slab <bio-0> at 0
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 512 (order: 0, 4096 bytes)
TCP bind hash table entries: 512 (order: -1, 2048 bytes)
TCP: Hash tables configured (established 512 bind 512)
TCP reno registered
NET: Registered protocol family 1
I-pipe: Domain Xenomai registered.
Xenomai: hal/nios2 started.
Xenomai: scheduling class idle registered.
Xenomai: scheduling class rt registered.
Xenomai: real-time nucleus v2.5.1 (Speed Of Light) loaded.
Xenomai: starting native API services.
Xenomai: starting POSIX services.
Xenomai: starting RTDM services.
io scheduler noop registered
io scheduler deadline registered (default)
ttyS0 at MMIO 0x810840 (irq = 5) is a Altera UART
console [ttyS0] enabled




> $ $xenomai-2.5.1/scripts/prepare-kernel.sh --arch=nios2 
> --adeos=$xenomai-2.5.1/ksrc/arch/nios2/patches/adeos-ipipe-2.6.30-nios2-1.1-00.patch
>   --linux=$linux_tree
> $ $xenomai-2.5.1/configure --host=nios2-linux
> $ make install DESTDIR=$uClinux-dist/romfs
>
> But, in this step, I got this error:
>
> eck_vdso-check-vdso.o ../../skins/native/libnative.la -lpthread -lm
> libtool: link: ../../../scripts/wrap-link.sh nios2-linux-gcc 
> -Wl,-elf2flt -o check-vdso check_vdso-check-vdso.o  
> ../../skins/native/.libs/libnative.a -lpthread -lm
> check-vdso.elf2flt(.text+0x16c): In function `main':
> : undefined reference to `xeno_sem_heap'
> check-vdso.elf2flt(.text+0x170): In function `main':
> : undefined reference to `xeno_sem_heap'
> collect2: ld returned 1 exit status
> make[3]: *** [check-vdso] Erreur 1
> make[3]: quittant le répertoire « 
> /home/sonda/Desktop/xenomai-2.5.1/src/testsuite/unit »
> make[2]: *** [all-recursive] Erreur 1
> make[2]: quittant le répertoire « 
> /home/sonda/Desktop/xenomai-2.5.1/src/testsuite »
> make[1]: *** [all-recursive] Erreur 1
> make[1]: quittant le répertoire « /home/sonda/Desktop/xenomai-2.5.1/src »
> make: *** [all-recursive] Erreur 1
>
> what can I do? Please help
>
> Regards,
>
>
>
> _______________________________________________
> Xenomai-help mailing list
> Xenomai-help@domain.hid
> https://mail.gna.org/listinfo/xenomai-help
>    


-- 
Patrice Kadionik. F6KQH / F4CUQ
-----------

+----------------------------------------------------------------------+
+"Tout doit etre aussi simple que possible, pas seulement plus simple" +
+----------------------------------------------------------------------+
+ Patrice Kadionik             http://www.enseirb-matmeca.fr/~kadionik +
+ IMS Laboratory               http://www.ims-bordeaux.fr/             +
+ ENSEIRB-MATMECA              http://www.enseirb-matmeca.fr           +
+ PO BOX 99                    fax   : +33 5.56.37.20.23               +
+ 33402 TALENCE Cedex          voice : +33 5.56.84.23.47               +
+ FRANCE                       mailto:patrice.kadionik@domain.hid +
+----------------------------------------------------------------------+


[-- Attachment #2: Type: text/html, Size: 16013 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Xenomai-help] Problem to cross-compile Xenomai user-space support
  2010-03-28 13:26 ` Patrice Kadionik
@ 2010-03-29 22:20   ` Huan Fang
  2010-03-29 22:23     ` Gilles Chanteperdrix
  2010-03-30  8:37     ` Patrice Kadionik
  0 siblings, 2 replies; 18+ messages in thread
From: Huan Fang @ 2010-03-29 22:20 UTC (permalink / raw)
  To: Patrice Kadionik, Chtourou Sonda; +Cc: xenomai

Hi Patrice,

Many thanks for the tutorial, Now I am able to run xenomai patched uclinux on my DE2-70 board.
But the kernel doesn't boot unless I modified one file :linux-2.6/arch/nios2/kernel/time.c

na_timer0 -> na_sys_clock_timer which I guess is the clock timer used by Linux. Did you manually patch this file?
The adeos patch doesn't seem to change this part.

currently my timer settings are

/proc/xenomai>cat timer
status=on+watchdog:setup=1030:clock=1638046732:timerdev=hrtimer:clockdev=hrclock
Does it looks all right?

Best Regards,
Huan
________________________________________
From: xenomai-help-bounces@domain.hid [xenomai-help-bounces@domain.hid] On Behalf Of Patrice Kadionik [kadionik@domain.hid]
Sent: 28 March 2010 15:26
To: Chtourou Sonda
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Problem to cross-compile Xenomai user-space support

Le 20:59, Chtourou Sonda a écrit :
Dears,
Hi,


I built the uClinux kernel for NIOS II and it run well on the target board. I followed the typical actions available here : http://www.nioswiki.com/

Now, I want to add a co-scheduler xenomai to the kernel (uclinux) to reduce its latency. I followed these steps: (http://www.xenomai.org/documentation/xenomai-2.5/README.INSTALL)
I've tried to reproduce your compilation error but without success.

For using Xenomai on NIOS II processor with uClinux, you must add extra hardware in your SoPC design as explained in this tutorial (http://uuu.enseirb.fr/~kadionik/nios2-xenomai/Xenomai%20on%20NIOS%20II%20Softcore%20Processor%20Guide-v1.1.pdf).

It is OK on my Altera 1S10 board  with Xenomai v2.5.1 (see traces).

Sincerely;

Patrice
========================================

Uncompressing Linux... Ok, booting the kernel.
Linux version 2.6.30 (kadionik@domain.hid) (gcc version 3.4.6) #4 PREEMPT Sun Mar 0


uClinux/Nios II
Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 4064
Kernel command line:
NR_IRQS:32
PID hash table entries: 64 (order: 6, 256 bytes)
I-pipe 1.1-00: pipeline enabled.
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Memory available: 12108k/3990k RAM, 0k/0k ROM (1931k kernel code, 2059k data)
Calibrating delay loop... 24.06 BogoMIPS (lpj=120320)
Mount-cache hash table entries: 512
net_namespace: 264 bytes
NET: Registered protocol family 16
init_BSP(): registering device resources
bio: create slab <bio-0> at 0
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 512 (order: 0, 4096 bytes)
TCP bind hash table entries: 512 (order: -1, 2048 bytes)
TCP: Hash tables configured (established 512 bind 512)
TCP reno registered
NET: Registered protocol family 1
I-pipe: Domain Xenomai registered.
Xenomai: hal/nios2 started.
Xenomai: scheduling class idle registered.
Xenomai: scheduling class rt registered.
Xenomai: real-time nucleus v2.5.1 (Speed Of Light) loaded.
Xenomai: starting native API services.
Xenomai: starting POSIX services.
Xenomai: starting RTDM services.
io scheduler noop registered
io scheduler deadline registered (default)
ttyS0 at MMIO 0x810840 (irq = 5) is a Altera UART
console [ttyS0] enabled




$ $xenomai-2.5.1/scripts/prepare-kernel.sh --arch=nios2 --adeos=$xenomai-2.5.1/ksrc/arch/nios2/patches/adeos-ipipe-2.6.30-nios2-1.1-00.patch
  --linux=$linux_tree
$ $xenomai-2.5.1/configure --host=nios2-linux
$ make install DESTDIR=$uClinux-dist/romfs

But, in this step, I got this error:

eck_vdso-check-vdso.o ../../skins/native/libnative.la -lpthread -lm
libtool: link: ../../../scripts/wrap-link.sh nios2-linux-gcc -Wl,-elf2flt -o check-vdso check_vdso-check-vdso.o  ../../skins/native/.libs/libnative.a -lpthread -lm
check-vdso.elf2flt(.text+0x16c): In function `main':
: undefined reference to `xeno_sem_heap'
check-vdso.elf2flt(.text+0x170): In function `main':
: undefined reference to `xeno_sem_heap'
collect2: ld returned 1 exit status
make[3]: *** [check-vdso] Erreur 1
make[3]: quittant le répertoire « /home/sonda/Desktop/xenomai-2.5.1/src/testsuite/unit »
make[2]: *** [all-recursive] Erreur 1
make[2]: quittant le répertoire « /home/sonda/Desktop/xenomai-2.5.1/src/testsuite »
make[1]: *** [all-recursive] Erreur 1
make[1]: quittant le répertoire « /home/sonda/Desktop/xenomai-2.5.1/src »
make: *** [all-recursive] Erreur 1

what can I do? Please help
Regards,





_______________________________________________
Xenomai-help mailing list
Xenomai-help@domain.hid<mailto:Xenomai-help@domain.hid>
https://mail.gna.org/listinfo/xenomai-help




--
Patrice Kadionik. F6KQH / F4CUQ
-----------

+----------------------------------------------------------------------+
+"Tout doit etre aussi simple que possible, pas seulement plus simple" +
+----------------------------------------------------------------------+
+ Patrice Kadionik             http://www.enseirb-matmeca.fr/~kadionik +
+ IMS Laboratory               http://www.ims-bordeaux.fr/             +
+ ENSEIRB-MATMECA              http://www.enseirb-matmeca.fr           +
+ PO BOX 99                    fax   : +33 5.56.37.20.23               +
+ 33402 TALENCE Cedex          voice : +33 5.56.84.23.47               +
+ FRANCE                       mailto:patrice.kadionik@domain.hid +
+----------------------------------------------------------------------+




^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Xenomai-help] Problem to cross-compile Xenomai user-space support
  2010-03-29 22:20   ` Huan Fang
@ 2010-03-29 22:23     ` Gilles Chanteperdrix
  2010-03-30  9:05       ` Patrice Kadionik
  2010-03-30  8:37     ` Patrice Kadionik
  1 sibling, 1 reply; 18+ messages in thread
From: Gilles Chanteperdrix @ 2010-03-29 22:23 UTC (permalink / raw)
  To: Huan Fang; +Cc: Chtourou Sonda, xenomai

Huan Fang wrote:
> eck_vdso-check-vdso.o ../../skins/native/libnative.la -lpthread -lm
> libtool: link: ../../../scripts/wrap-link.sh nios2-linux-gcc -Wl,-elf2flt -o check-vdso check_vdso-check-vdso.o  ../../skins/native/.libs/libnative.a -lpthread -lm
> check-vdso.elf2flt(.text+0x16c): In function `main':
> : undefined reference to `xeno_sem_heap'
> check-vdso.elf2flt(.text+0x170): In function `main':
> : undefined reference to `xeno_sem_heap'
> collect2: ld returned 1 exit status
> make[3]: *** [check-vdso] Erreur 1
> make[3]: quittant le répertoire « /home/sonda/Desktop/xenomai-2.5.1/src/testsuite/unit »
> make[2]: *** [all-recursive] Erreur 1
> make[2]: quittant le répertoire « /home/sonda/Desktop/xenomai-2.5.1/src/testsuite »
> make[1]: *** [all-recursive] Erreur 1
> make[1]: quittant le répertoire « /home/sonda/Desktop/xenomai-2.5.1/src »
> make: *** [all-recursive] Erreur 1
> 
> what can I do? Please help

Please try xenomai 2.5.2


-- 
					    Gilles.



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Xenomai-help] Problem to cross-compile Xenomai user-space support
  2010-03-29 22:20   ` Huan Fang
  2010-03-29 22:23     ` Gilles Chanteperdrix
@ 2010-03-30  8:37     ` Patrice Kadionik
  2010-03-30 17:37       ` Huan Fang
  1 sibling, 1 reply; 18+ messages in thread
From: Patrice Kadionik @ 2010-03-30  8:37 UTC (permalink / raw)
  To: Huan Fang; +Cc: xenomai

Le 30/03/2010 00:20, Huan Fang a écrit :
> Hi Patrice,
>    
Hi Huan,

Have you really used  uClinux with NIOS2 without MMU in your Quartus II 
design? Have you synchronized the µClinux kernel file version with the 
NIOS2 ipipe version?

> Many thanks for the tutorial, Now I am able to run xenomai patched uclinux on my DE2-70 board.
> But the kernel doesn't boot unless I modified one file :linux-2.6/arch/nios2/kernel/time.c
>
> na_timer0 ->  na_sys_clock_timer which I guess is the clock timer used by Linux. Did you manually patch this file?
> The adeos patch doesn't seem to change this part.
>    
Not at all.

If you have done this:
$ make vendor_hwselect SYSPTF=my_design.ptf
it generates a nios2.h under uClinux-dist/linux-2.6.x/include/asm-nios2
in which you have na_sys_clk_timer redefined as na_timer0.
For example, in my nios2.h generated file, I have:
/* Executing ...scripts/nios2.h/altera_avalon_timer.pm */

/* system timer input clock frequency */
#define nasys_clock_freq                                        50000000
#define nasys_clock_freq_1000                                      50000

/* Redefining sys_clk_timer -> timer0 */
#undef na_sys_clk_timer
#undef na_sys_clk_timer_irq

#define na_timer0                                  ((void *) 0x00810800)

Please send me in a private email your nios2.h file.

Patrice



> currently my timer settings are
>
> /proc/xenomai>cat timer
> status=on+watchdog:setup=1030:clock=1638046732:timerdev=hrtimer:clockdev=hrclock
> Does it looks all right?
>
> Best Regards,
> Huan
> ________________________________________
> From: xenomai-help-bounces@domain.hid [xenomai-help-bounces@domain.hid] On Behalf Of Patrice Kadionik [kadionik@domain.hid]
> Sent: 28 March 2010 15:26
> To: Chtourou Sonda
> Cc: xenomai@xenomai.org
> Subject: Re: [Xenomai-help] Problem to cross-compile Xenomai user-space support
>
> Le 20:59, Chtourou Sonda a écrit :
> Dears,
> Hi,
>
>
> I built the uClinux kernel for NIOS II and it run well on the target board. I followed the typical actions available here : http://www.nioswiki.com/
>
> Now, I want to add a co-scheduler xenomai to the kernel (uclinux) to reduce its latency. I followed these steps: (http://www.xenomai.org/documentation/xenomai-2.5/README.INSTALL)
> I've tried to reproduce your compilation error but without success.
>
> For using Xenomai on NIOS II processor with uClinux, you must add extra hardware in your SoPC design as explained in this tutorial (http://uuu.enseirb.fr/~kadionik/nios2-xenomai/Xenomai%20on%20NIOS%20II%20Softcore%20Processor%20Guide-v1.1.pdf).
>
> It is OK on my Altera 1S10 board  with Xenomai v2.5.1 (see traces).
>
> Sincerely;
>
> Patrice
> ========================================
>
> Uncompressing Linux... Ok, booting the kernel.
> Linux version 2.6.30 (kadionik@domain.hid) (gcc version 3.4.6) #4 PREEMPT Sun Mar 0
>
>
> uClinux/Nios II
> Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 4064
> Kernel command line:
> NR_IRQS:32
> PID hash table entries: 64 (order: 6, 256 bytes)
> I-pipe 1.1-00: pipeline enabled.
> Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
> Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
> Memory available: 12108k/3990k RAM, 0k/0k ROM (1931k kernel code, 2059k data)
> Calibrating delay loop... 24.06 BogoMIPS (lpj=120320)
> Mount-cache hash table entries: 512
> net_namespace: 264 bytes
> NET: Registered protocol family 16
> init_BSP(): registering device resources
> bio: create slab<bio-0>  at 0
> NET: Registered protocol family 2
> IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
> TCP established hash table entries: 512 (order: 0, 4096 bytes)
> TCP bind hash table entries: 512 (order: -1, 2048 bytes)
> TCP: Hash tables configured (established 512 bind 512)
> TCP reno registered
> NET: Registered protocol family 1
> I-pipe: Domain Xenomai registered.
> Xenomai: hal/nios2 started.
> Xenomai: scheduling class idle registered.
> Xenomai: scheduling class rt registered.
> Xenomai: real-time nucleus v2.5.1 (Speed Of Light) loaded.
> Xenomai: starting native API services.
> Xenomai: starting POSIX services.
> Xenomai: starting RTDM services.
> io scheduler noop registered
> io scheduler deadline registered (default)
> ttyS0 at MMIO 0x810840 (irq = 5) is a Altera UART
> console [ttyS0] enabled
>
>
>
>
> $ $xenomai-2.5.1/scripts/prepare-kernel.sh --arch=nios2 --adeos=$xenomai-2.5.1/ksrc/arch/nios2/patches/adeos-ipipe-2.6.30-nios2-1.1-00.patch
>    --linux=$linux_tree
> $ $xenomai-2.5.1/configure --host=nios2-linux
> $ make install DESTDIR=$uClinux-dist/romfs
>
> But, in this step, I got this error:
>
> eck_vdso-check-vdso.o ../../skins/native/libnative.la -lpthread -lm
> libtool: link: ../../../scripts/wrap-link.sh nios2-linux-gcc -Wl,-elf2flt -o check-vdso check_vdso-check-vdso.o  ../../skins/native/.libs/libnative.a -lpthread -lm
> check-vdso.elf2flt(.text+0x16c): In function `main':
> : undefined reference to `xeno_sem_heap'
> check-vdso.elf2flt(.text+0x170): In function `main':
> : undefined reference to `xeno_sem_heap'
> collect2: ld returned 1 exit status
> make[3]: *** [check-vdso] Erreur 1
> make[3]: quittant le répertoire « /home/sonda/Desktop/xenomai-2.5.1/src/testsuite/unit »
> make[2]: *** [all-recursive] Erreur 1
> make[2]: quittant le répertoire « /home/sonda/Desktop/xenomai-2.5.1/src/testsuite »
> make[1]: *** [all-recursive] Erreur 1
> make[1]: quittant le répertoire « /home/sonda/Desktop/xenomai-2.5.1/src »
> make: *** [all-recursive] Erreur 1
>
> what can I do? Please help
> Regards,
>
>
>
>
>
> _______________________________________________
> Xenomai-help mailing list
> Xenomai-help@domain.hid<mailto:Xenomai-help@domain.hid>
> https://mail.gna.org/listinfo/xenomai-help
>
>
>
>
> --
> Patrice Kadionik. F6KQH / F4CUQ
> -----------
>
> +----------------------------------------------------------------------+
> +"Tout doit etre aussi simple que possible, pas seulement plus simple" +
> +----------------------------------------------------------------------+
> + Patrice Kadionik             http://www.enseirb-matmeca.fr/~kadionik +
> + IMS Laboratory               http://www.ims-bordeaux.fr/             +
> + ENSEIRB-MATMECA              http://www.enseirb-matmeca.fr           +
> + PO BOX 99                    fax   : +33 5.56.37.20.23               +
> + 33402 TALENCE Cedex          voice : +33 5.56.84.23.47               +
> + FRANCE                       mailto:patrice.kadionik@domain.hid +
> +----------------------------------------------------------------------+
>
>
>
>
>    


-- 
--
Patrice Kadionik. F6KQH / F4CUQ
-----------

+----------------------------------------------------------------------+
+"Tout doit etre aussi simple que possible, pas seulement plus simple" +
+----------------------------------------------------------------------+
+ Patrice Kadionik             http://www.enseirb-matmeca.fr/~kadionik +
+ IMS Laboratory               http://www.ims-bordeaux.fr/             +
+ ENSEIRB-MATMECA              http://www.enseirb-matmeca.fr           +
+ PO BOX 99                    fax   : +33 5.56.37.20.23               +
+ 33402 TALENCE Cedex          voice : +33 5.56.84.23.47               +
+ FRANCE                       mailto:patrice.kadionik@domain.hid +
+----------------------------------------------------------------------+



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Xenomai-help] Problem to cross-compile Xenomai user-space support
  2010-03-29 22:23     ` Gilles Chanteperdrix
@ 2010-03-30  9:05       ` Patrice Kadionik
  2010-03-30  9:14         ` Gilles Chanteperdrix
  2010-03-30  9:40         ` Gilles Chanteperdrix
  0 siblings, 2 replies; 18+ messages in thread
From: Patrice Kadionik @ 2010-03-30  9:05 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai

Le 30/03/2010 00:23, Gilles Chanteperdrix a écrit :
> Huan Fang wrote:
>    
>> eck_vdso-check-vdso.o ../../skins/native/libnative.la -lpthread -lm
>> libtool: link: ../../../scripts/wrap-link.sh nios2-linux-gcc -Wl,-elf2flt -o check-vdso check_vdso-check-vdso.o  ../../skins/native/.libs/libnative.a -lpthread -lm
>> check-vdso.elf2flt(.text+0x16c): In function `main':
>> : undefined reference to `xeno_sem_heap'
>> check-vdso.elf2flt(.text+0x170): In function `main':
>> : undefined reference to `xeno_sem_heap'
>> collect2: ld returned 1 exit status
>> make[3]: *** [check-vdso] Erreur 1
>> make[3]: quittant le répertoire « /home/sonda/Desktop/xenomai-2.5.1/src/testsuite/unit »
>> make[2]: *** [all-recursive] Erreur 1
>> make[2]: quittant le répertoire « /home/sonda/Desktop/xenomai-2.5.1/src/testsuite »
>> make[1]: *** [all-recursive] Erreur 1
>> make[1]: quittant le répertoire « /home/sonda/Desktop/xenomai-2.5.1/src »
>> make: *** [all-recursive] Erreur 1
>>
>> what can I do? Please help
>>      
> Please try xenomai 2.5.2
>
>
>    
Hi Gilles,

I've done this with the 2.5.2 version and I have had the same problem. 
It is the consequence of another one earlier in the compilation process.
After the xenomai configuration for NIOS II:
$ ./configure --host=nios2-linux

the generated src/include/xeno_config.h configuration file has 
CONFIG_XENO_FASTSYNCH not configured:
...
/* config */
/* #undef CONFIG_XENO_FASTSYNCH */
...

If you make the compilation, it fails on the src/skins/common/sem_heap.c 
compilation.
You have in this files 2 similar functions
line 100: static void xeno_init_sem_heaps_inner(void)
and
line 118: void xeno_init_sem_heaps(void)

There is a mismatch in the src/skins/common/sem_heap.h file according to 
the CONFIG_XENO_FASTSYNCH definition (during Xenomai configuration).
In this case it conflits with the macro #define xeno_init_sem_heaps() 
line 9 in the src/skins/common/sem_heap.h file and the void 
xeno_init_sem_heaps(void) in the src/skins/common/sem_heap.c

I don't know what in the right correction to do in the 
src/skins/common/sem_heap.h file according to the CONFIG_XENO_FASTSYNCH 
definition.

If I suppress the line 9 (#define ...) in the 
src/skins/common/sem_heap.h file, it compiles until problems for 
src/testsuite/unit  tool:
cond-torture.c file. Line 56: problem with the  "if else" structure when 
HAVE_PTHREAD_MUTEXATTR_SETPROTOCOL is not defined (the case here).
check-vdso.c compilation: in the src/testsuite/unit/Makefile.in file, 
the @CONFIG_XENO_FASTSYNCH_TRUE@ controls the check-vdso compilation. it 
is not completely inhibited when CONFIG_XENO_FASTSYNCH is not configured 
(the case here).

I have corrected by hand these 2 problems and Xenomai v2.5.2 is OK on my 
NIOS II board.

Gilles, what is the right modification to make on the 
src/skins/common/sem_heap.h file when CONFIG_XENO_FASTSYNCH is not 
defined during Xenomai configration?

Cheers;

Patrice

--
Patrice Kadionik. F6KQH / F4CUQ
-----------

+----------------------------------------------------------------------+
+"Tout doit etre aussi simple que possible, pas seulement plus simple" +
+----------------------------------------------------------------------+
+ Patrice Kadionik             http://www.enseirb-matmeca.fr/~kadionik +
+ IMS Laboratory               http://www.ims-bordeaux.fr/             +
+ ENSEIRB-MATMECA              http://www.enseirb-matmeca.fr           +
+ PO BOX 99                    fax   : +33 5.56.37.20.23               +
+ 33402 TALENCE Cedex          voice : +33 5.56.84.23.47               +
+ FRANCE                       mailto:patrice.kadionik@domain.hid +
+----------------------------------------------------------------------+



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Xenomai-help] Problem to cross-compile Xenomai user-space support
  2010-03-30  9:05       ` Patrice Kadionik
@ 2010-03-30  9:14         ` Gilles Chanteperdrix
  2010-03-30  9:40           ` Patrice Kadionik
  2010-03-30  9:40         ` Gilles Chanteperdrix
  1 sibling, 1 reply; 18+ messages in thread
From: Gilles Chanteperdrix @ 2010-03-30  9:14 UTC (permalink / raw)
  To: Patrice Kadionik; +Cc: xenomai

Patrice Kadionik wrote:
> Le 30/03/2010 00:23, Gilles Chanteperdrix a écrit :
>> Huan Fang wrote:
>>    
>>> eck_vdso-check-vdso.o ../../skins/native/libnative.la -lpthread -lm
>>> libtool: link: ../../../scripts/wrap-link.sh nios2-linux-gcc -Wl,-elf2flt -o check-vdso check_vdso-check-vdso.o  ../../skins/native/.libs/libnative.a -lpthread -lm
>>> check-vdso.elf2flt(.text+0x16c): In function `main':
>>> : undefined reference to `xeno_sem_heap'
>>> check-vdso.elf2flt(.text+0x170): In function `main':
>>> : undefined reference to `xeno_sem_heap'
>>> collect2: ld returned 1 exit status
>>> make[3]: *** [check-vdso] Erreur 1
>>> make[3]: quittant le répertoire « /home/sonda/Desktop/xenomai-2.5.1/src/testsuite/unit »
>>> make[2]: *** [all-recursive] Erreur 1
>>> make[2]: quittant le répertoire « /home/sonda/Desktop/xenomai-2.5.1/src/testsuite »
>>> make[1]: *** [all-recursive] Erreur 1
>>> make[1]: quittant le répertoire « /home/sonda/Desktop/xenomai-2.5.1/src »
>>> make: *** [all-recursive] Erreur 1
>>>
>>> what can I do? Please help
>>>      
>> Please try xenomai 2.5.2
>>
>>
>>    
> Hi Gilles,
> 
> I've done this with the 2.5.2 version and I have had the same problem. 
> It is the consequence of another one earlier in the compilation process.
> After the xenomai configuration for NIOS II:
> $ ./configure --host=nios2-linux
> 
> the generated src/include/xeno_config.h configuration file has 
> CONFIG_XENO_FASTSYNCH not configured:
> ...
> /* config */
> /* #undef CONFIG_XENO_FASTSYNCH */
> ...
> 
> If you make the compilation, it fails on the src/skins/common/sem_heap.c 
> compilation.
> You have in this files 2 similar functions
> line 100: static void xeno_init_sem_heaps_inner(void)
> and
> line 118: void xeno_init_sem_heaps(void)
> 
> There is a mismatch in the src/skins/common/sem_heap.h file according to 
> the CONFIG_XENO_FASTSYNCH definition (during Xenomai configuration).
> In this case it conflits with the macro #define xeno_init_sem_heaps() 
> line 9 in the src/skins/common/sem_heap.h file and the void 
> xeno_init_sem_heaps(void) in the src/skins/common/sem_heap.c
> 
> I don't know what in the right correction to do in the 
> src/skins/common/sem_heap.h file according to the CONFIG_XENO_FASTSYNCH 
> definition.
> 
> If I suppress the line 9 (#define ...) in the 
> src/skins/common/sem_heap.h file, it compiles until problems for 
> src/testsuite/unit  tool:
> cond-torture.c file. Line 56: problem with the  "if else" structure when 
> HAVE_PTHREAD_MUTEXATTR_SETPROTOCOL is not defined (the case here).
> check-vdso.c compilation: in the src/testsuite/unit/Makefile.in file, 
> the @CONFIG_XENO_FASTSYNCH_TRUE@ controls the check-vdso compilation. it 
> is not completely inhibited when CONFIG_XENO_FASTSYNCH is not configured 
> (the case here).
> 
> I have corrected by hand these 2 problems and Xenomai v2.5.2 is OK on my 
> NIOS II board.
> 
> Gilles, what is the right modification to make on the 
> src/skins/common/sem_heap.h file when CONFIG_XENO_FASTSYNCH is not 
> defined during Xenomai configration?

We want everything to be compiled even without FASTSYNCH. So, please try
the following patch:

diff --git a/src/skins/common/sem_heap.h b/src/skins/common/sem_heap.h
index d799a37..16dedda 100644
--- a/src/skins/common/sem_heap.h
+++ b/src/skins/common/sem_heap.h
@@ -3,10 +3,6 @@

 #include <xeno_config.h>

-#ifdef CONFIG_XENO_FASTSYNCH
 void xeno_init_sem_heaps(void);
-#else /* !CONFIG_XENO_FASTSYNCH */
-#define xeno_init_sem_heaps()
-#endif /* !CONFIG_XENO_FASTSYNCH */

 #endif /* XENO_SEM_HEAP_H */
diff --git a/src/testsuite/unit/Makefile.am b/src/testsuite/unit/Makefile.am
index d94e53f..8966883 100644
--- a/src/testsuite/unit/Makefile.am
+++ b/src/testsuite/unit/Makefile.am
@@ -92,8 +92,6 @@ cond_torture_native_LDADD = \
 	../../skins/common/libxenomai.la \
 	-lpthread -lm

-if CONFIG_XENO_FASTSYNCH
-
 check_vdso_SOURCES = check-vdso.c

 check_vdso_CPPFLAGS = \
@@ -107,8 +105,6 @@ check_vdso_LDADD = \
 	../../skins/common/libxenomai.la \
 	-lpthread -lm

-endif
-
 install-data-local:
 	$(mkinstalldirs) $(DESTDIR)$(rundir)
 	@sed -e's,@exec_prefix\@,$(exec_prefix),g' $(srcdir)/runinfo.in >
$(DESTDIR)$(rundir)/.runinfo
diff --git a/src/testsuite/unit/Makefile.in b/src/testsuite/unit/Makefile.in
index 3d536a8..5125678 100644
--- a/src/testsuite/unit/Makefile.in
+++ b/src/testsuite/unit/Makefile.in
@@ -64,13 +64,10 @@ arith_DEPENDENCIES = ../../skins/native/libnative.la \
 arith_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
 	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(arith_LDFLAGS) \
 	$(LDFLAGS) -o $@
-am__check_vdso_SOURCES_DIST = check-vdso.c
-@domain.hid =  \
-@domain.hid@	check_vdso-check-vdso.$(OBJEXT)
+am_check_vdso_OBJECTS = check_vdso-check-vdso.$(OBJEXT)
 check_vdso_OBJECTS = $(am_check_vdso_OBJECTS)
-@domain.hid =  \
-@domain.hid@	../../skins/native/libnative.la \
-@domain.hid@	../../skins/common/libxenomai.la
+check_vdso_DEPENDENCIES = ../../skins/native/libnative.la \
+	../../skins/common/libxenomai.la
 check_vdso_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
 	$(check_vdso_LDFLAGS) $(LDFLAGS) -o $@
@@ -130,7 +127,7 @@ SOURCES = $(arith_SOURCES) $(check_vdso_SOURCES) \
 	$(cond_torture_native_SOURCES) $(cond_torture_posix_SOURCES) \
 	$(mutex_torture_native_SOURCES) $(mutex_torture_posix_SOURCES) \
 	$(wakeup_time_SOURCES)
-DIST_SOURCES = $(arith_SOURCES) $(am__check_vdso_SOURCES_DIST) \
+DIST_SOURCES = $(arith_SOURCES) $(check_vdso_SOURCES) \
 	$(cond_torture_native_SOURCES) $(cond_torture_posix_SOURCES) \
 	$(mutex_torture_native_SOURCES) $(mutex_torture_posix_SOURCES) \
 	$(wakeup_time_SOURCES)
@@ -368,16 +365,16 @@ cond_torture_native_LDADD = \
 	../../skins/common/libxenomai.la \
 	-lpthread -lm

-@domain.hid = check-vdso.c
-@domain.hid = \
-@domain.hid@	@XENO_USER_CFLAGS@ \
-@domain.hid@	-I$(top_srcdir)/include
+check_vdso_SOURCES = check-vdso.c
+check_vdso_CPPFLAGS = \
+	@XENO_USER_CFLAGS@ \
+	-I$(top_srcdir)/include

-@domain.hid = @XENO_USER_LDFLAGS@
-@domain.hid = \
-@domain.hid@	../../skins/native/libnative.la \
-@domain.hid@	../../skins/common/libxenomai.la \
-@domain.hid@	-lpthread -lm
+check_vdso_LDFLAGS = @XENO_USER_LDFLAGS@
+check_vdso_LDADD = \
+	../../skins/native/libnative.la \
+	../../skins/common/libxenomai.la \
+	-lpthread -lm

 EXTRA_DIST = runinfo.in
 all: all-am


-- 
					    Gilles.



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [Xenomai-help] Problem to cross-compile Xenomai user-space support
  2010-03-30  9:14         ` Gilles Chanteperdrix
@ 2010-03-30  9:40           ` Patrice Kadionik
  0 siblings, 0 replies; 18+ messages in thread
From: Patrice Kadionik @ 2010-03-30  9:40 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai

Le 30/03/2010 11:14, Gilles Chanteperdrix a écrit :
> Patrice Kadionik wrote:
>    
>> Le 30/03/2010 00:23, Gilles Chanteperdrix a écrit :
>>      
>>> Huan Fang wrote:
>>>
>>>        
>>>> eck_vdso-check-vdso.o ../../skins/native/libnative.la -lpthread -lm
>>>> libtool: link: ../../../scripts/wrap-link.sh nios2-linux-gcc -Wl,-elf2flt -o check-vdso check_vdso-check-vdso.o  ../../skins/native/.libs/libnative.a -lpthread -lm
>>>> check-vdso.elf2flt(.text+0x16c): In function `main':
>>>> : undefined reference to `xeno_sem_heap'
>>>> check-vdso.elf2flt(.text+0x170): In function `main':
>>>> : undefined reference to `xeno_sem_heap'
>>>> collect2: ld returned 1 exit status
>>>> make[3]: *** [check-vdso] Erreur 1
>>>> make[3]: quittant le répertoire « /home/sonda/Desktop/xenomai-2.5.1/src/testsuite/unit »
>>>> make[2]: *** [all-recursive] Erreur 1
>>>> make[2]: quittant le répertoire « /home/sonda/Desktop/xenomai-2.5.1/src/testsuite »
>>>> make[1]: *** [all-recursive] Erreur 1
>>>> make[1]: quittant le répertoire « /home/sonda/Desktop/xenomai-2.5.1/src »
>>>> make: *** [all-recursive] Erreur 1
>>>>
>>>> what can I do? Please help
>>>>
>>>>          
>>> Please try xenomai 2.5.2
>>>
>>>
>>>
>>>        
>> Hi Gilles,
>>
>> I've done this with the 2.5.2 version and I have had the same problem.
>> It is the consequence of another one earlier in the compilation process.
>> After the xenomai configuration for NIOS II:
>> $ ./configure --host=nios2-linux
>>
>> the generated src/include/xeno_config.h configuration file has
>> CONFIG_XENO_FASTSYNCH not configured:
>> ...
>> /* config */
>> /* #undef CONFIG_XENO_FASTSYNCH */
>> ...
>>
>> If you make the compilation, it fails on the src/skins/common/sem_heap.c
>> compilation.
>> You have in this files 2 similar functions
>> line 100: static void xeno_init_sem_heaps_inner(void)
>> and
>> line 118: void xeno_init_sem_heaps(void)
>>
>> There is a mismatch in the src/skins/common/sem_heap.h file according to
>> the CONFIG_XENO_FASTSYNCH definition (during Xenomai configuration).
>> In this case it conflits with the macro #define xeno_init_sem_heaps()
>> line 9 in the src/skins/common/sem_heap.h file and the void
>> xeno_init_sem_heaps(void) in the src/skins/common/sem_heap.c
>>
>> I don't know what in the right correction to do in the
>> src/skins/common/sem_heap.h file according to the CONFIG_XENO_FASTSYNCH
>> definition.
>>
>> If I suppress the line 9 (#define ...) in the
>> src/skins/common/sem_heap.h file, it compiles until problems for
>> src/testsuite/unit  tool:
>> cond-torture.c file. Line 56: problem with the  "if else" structure when
>> HAVE_PTHREAD_MUTEXATTR_SETPROTOCOL is not defined (the case here).
>> check-vdso.c compilation: in the src/testsuite/unit/Makefile.in file,
>> the @CONFIG_XENO_FASTSYNCH_TRUE@ controls the check-vdso compilation. it
>> is not completely inhibited when CONFIG_XENO_FASTSYNCH is not configured
>> (the case here).
>>
>> I have corrected by hand these 2 problems and Xenomai v2.5.2 is OK on my
>> NIOS II board.
>>
>> Gilles, what is the right modification to make on the
>> src/skins/common/sem_heap.h file when CONFIG_XENO_FASTSYNCH is not
>> defined during Xenomai configration?
>>      
> We want everything to be compiled even without FASTSYNCH. So, please try
> the following patch:
>    

Gilles,

The patch is OK.
There is a last error on the src/testsuite/unit/cond-torture.c file. 
Line 56: problem with the  "if else" structure when 
HAVE_PTHREAD_MUTEXATTR_SETPROTOCOL is not defined (the case here):
         if (pi != 0)
#ifdef HAVE_PTHREAD_MUTEXATTR_SETPROTOCOL
                 pthread_mutexattr_setprotocol(&mattr, 
PTHREAD_PRIO_INHERIT);

         err = pthread_mutex_init(mutex, &mattr);
#else
         else {
                 err = ENOSYS;
                 goto out;
         }
         err = pthread_mutex_init(mutex, &mattr);

   out:
#endif
         pthread_mutexattr_destroy(&mattr);


Patrice

~


> diff --git a/src/skins/common/sem_heap.h b/src/skins/common/sem_heap.h
> index d799a37..16dedda 100644
> --- a/src/skins/common/sem_heap.h
> +++ b/src/skins/common/sem_heap.h
> @@ -3,10 +3,6 @@
>
>   #include<xeno_config.h>
>
> -#ifdef CONFIG_XENO_FASTSYNCH
>   void xeno_init_sem_heaps(void);
> -#else /* !CONFIG_XENO_FASTSYNCH */
> -#define xeno_init_sem_heaps()
> -#endif /* !CONFIG_XENO_FASTSYNCH */
>
>   #endif /* XENO_SEM_HEAP_H */
> diff --git a/src/testsuite/unit/Makefile.am b/src/testsuite/unit/Makefile.am
> index d94e53f..8966883 100644
> --- a/src/testsuite/unit/Makefile.am
> +++ b/src/testsuite/unit/Makefile.am
> @@ -92,8 +92,6 @@ cond_torture_native_LDADD = \
>   	../../skins/common/libxenomai.la \
>   	-lpthread -lm
>
> -if CONFIG_XENO_FASTSYNCH
> -
>   check_vdso_SOURCES = check-vdso.c
>
>   check_vdso_CPPFLAGS = \
> @@ -107,8 +105,6 @@ check_vdso_LDADD = \
>   	../../skins/common/libxenomai.la \
>   	-lpthread -lm
>
> -endif
> -
>   install-data-local:
>   	$(mkinstalldirs) $(DESTDIR)$(rundir)
>   	@sed -e's,@exec_prefix\@,$(exec_prefix),g' $(srcdir)/runinfo.in>
> $(DESTDIR)$(rundir)/.runinfo
> diff --git a/src/testsuite/unit/Makefile.in b/src/testsuite/unit/Makefile.in
> index 3d536a8..5125678 100644
> --- a/src/testsuite/unit/Makefile.in
> +++ b/src/testsuite/unit/Makefile.in
> @@ -64,13 +64,10 @@ arith_DEPENDENCIES = ../../skins/native/libnative.la \
>   arith_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
>   	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(arith_LDFLAGS) \
>   	$(LDFLAGS) -o $@
> -am__check_vdso_SOURCES_DIST = check-vdso.c
> -@domain.hid =  \
> -@domain.hid@	check_vdso-check-vdso.$(OBJEXT)
> +am_check_vdso_OBJECTS = check_vdso-check-vdso.$(OBJEXT)
>   check_vdso_OBJECTS = $(am_check_vdso_OBJECTS)
> -@domain.hid =  \
> -@domain.hid@	../../skins/native/libnative.la \
> -@domain.hid@	../../skins/common/libxenomai.la
> +check_vdso_DEPENDENCIES = ../../skins/native/libnative.la \
> +	../../skins/common/libxenomai.la
>   check_vdso_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
>   	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
>   	$(check_vdso_LDFLAGS) $(LDFLAGS) -o $@
> @@ -130,7 +127,7 @@ SOURCES = $(arith_SOURCES) $(check_vdso_SOURCES) \
>   	$(cond_torture_native_SOURCES) $(cond_torture_posix_SOURCES) \
>   	$(mutex_torture_native_SOURCES) $(mutex_torture_posix_SOURCES) \
>   	$(wakeup_time_SOURCES)
> -DIST_SOURCES = $(arith_SOURCES) $(am__check_vdso_SOURCES_DIST) \
> +DIST_SOURCES = $(arith_SOURCES) $(check_vdso_SOURCES) \
>   	$(cond_torture_native_SOURCES) $(cond_torture_posix_SOURCES) \
>   	$(mutex_torture_native_SOURCES) $(mutex_torture_posix_SOURCES) \
>   	$(wakeup_time_SOURCES)
> @@ -368,16 +365,16 @@ cond_torture_native_LDADD = \
>   	../../skins/common/libxenomai.la \
>   	-lpthread -lm
>
> -@domain.hid = check-vdso.c
> -@domain.hid = \
> -@domain.hid@	@XENO_USER_CFLAGS@ \
> -@domain.hid@	-I$(top_srcdir)/include
> +check_vdso_SOURCES = check-vdso.c
> +check_vdso_CPPFLAGS = \
> +	@XENO_USER_CFLAGS@ \
> +	-I$(top_srcdir)/include
>
> -@domain.hid = @XENO_USER_LDFLAGS@
> -@domain.hid = \
> -@domain.hid@	../../skins/native/libnative.la \
> -@domain.hid@	../../skins/common/libxenomai.la \
> -@domain.hid@	-lpthread -lm
> +check_vdso_LDFLAGS = @XENO_USER_LDFLAGS@
> +check_vdso_LDADD = \
> +	../../skins/native/libnative.la \
> +	../../skins/common/libxenomai.la \
> +	-lpthread -lm
>
>   EXTRA_DIST = runinfo.in
>   all: all-am
>
>
>    


-- 
--
Patrice Kadionik. F6KQH / F4CUQ
-----------

+----------------------------------------------------------------------+
+"Tout doit etre aussi simple que possible, pas seulement plus simple" +
+----------------------------------------------------------------------+
+ Patrice Kadionik             http://www.enseirb-matmeca.fr/~kadionik +
+ IMS Laboratory               http://www.ims-bordeaux.fr/             +
+ ENSEIRB-MATMECA              http://www.enseirb-matmeca.fr           +
+ PO BOX 99                    fax   : +33 5.56.37.20.23               +
+ 33402 TALENCE Cedex          voice : +33 5.56.84.23.47               +
+ FRANCE                       mailto:patrice.kadionik@domain.hid +
+----------------------------------------------------------------------+



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Xenomai-help] Problem to cross-compile Xenomai user-space support
  2010-03-30  9:05       ` Patrice Kadionik
  2010-03-30  9:14         ` Gilles Chanteperdrix
@ 2010-03-30  9:40         ` Gilles Chanteperdrix
  2010-03-30  9:46           ` Patrice Kadionik
  1 sibling, 1 reply; 18+ messages in thread
From: Gilles Chanteperdrix @ 2010-03-30  9:40 UTC (permalink / raw)
  To: Patrice Kadionik; +Cc: xenomai

Patrice Kadionik wrote:
> Le 30/03/2010 00:23, Gilles Chanteperdrix a écrit :
>> Huan Fang wrote:
>>    
>>> eck_vdso-check-vdso.o ../../skins/native/libnative.la -lpthread -lm
>>> libtool: link: ../../../scripts/wrap-link.sh nios2-linux-gcc -Wl,-elf2flt -o check-vdso check_vdso-check-vdso.o  ../../skins/native/.libs/libnative.a -lpthread -lm
>>> check-vdso.elf2flt(.text+0x16c): In function `main':
>>> : undefined reference to `xeno_sem_heap'
>>> check-vdso.elf2flt(.text+0x170): In function `main':
>>> : undefined reference to `xeno_sem_heap'
>>> collect2: ld returned 1 exit status
>>> make[3]: *** [check-vdso] Erreur 1
>>> make[3]: quittant le répertoire « /home/sonda/Desktop/xenomai-2.5.1/src/testsuite/unit »
>>> make[2]: *** [all-recursive] Erreur 1
>>> make[2]: quittant le répertoire « /home/sonda/Desktop/xenomai-2.5.1/src/testsuite »
>>> make[1]: *** [all-recursive] Erreur 1
>>> make[1]: quittant le répertoire « /home/sonda/Desktop/xenomai-2.5.1/src »
>>> make: *** [all-recursive] Erreur 1
>>>
>>> what can I do? Please help
>>>      
>> Please try xenomai 2.5.2
>>
>>
>>    
> Hi Gilles,
> 
> I've done this with the 2.5.2 version and I have had the same problem. 
> It is the consequence of another one earlier in the compilation process.
> After the xenomai configuration for NIOS II:
> $ ./configure --host=nios2-linux
> 
> the generated src/include/xeno_config.h configuration file has 
> CONFIG_XENO_FASTSYNCH not configured:
> ...
> /* config */
> /* #undef CONFIG_XENO_FASTSYNCH */
> ...
> 
> If you make the compilation, it fails on the src/skins/common/sem_heap.c 
> compilation.
> You have in this files 2 similar functions
> line 100: static void xeno_init_sem_heaps_inner(void)
> and
> line 118: void xeno_init_sem_heaps(void)
> 
> There is a mismatch in the src/skins/common/sem_heap.h file according to 
> the CONFIG_XENO_FASTSYNCH definition (during Xenomai configuration).
> In this case it conflits with the macro #define xeno_init_sem_heaps() 
> line 9 in the src/skins/common/sem_heap.h file and the void 
> xeno_init_sem_heaps(void) in the src/skins/common/sem_heap.c
> 
> I don't know what in the right correction to do in the 
> src/skins/common/sem_heap.h file according to the CONFIG_XENO_FASTSYNCH 
> definition.
> 
> If I suppress the line 9 (#define ...) in the 
> src/skins/common/sem_heap.h file, it compiles until problems for 
> src/testsuite/unit  tool:
> cond-torture.c file. Line 56: problem with the  "if else" structure when 
> HAVE_PTHREAD_MUTEXATTR_SETPROTOCOL is not defined (the case here).

Could you show me the compilation log? I think the "else" is simply wrong.

-- 
					    Gilles.



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Xenomai-help] Problem to cross-compile Xenomai user-space support
  2010-03-30  9:40         ` Gilles Chanteperdrix
@ 2010-03-30  9:46           ` Patrice Kadionik
  2010-03-30 10:46             ` Gilles Chanteperdrix
  0 siblings, 1 reply; 18+ messages in thread
From: Patrice Kadionik @ 2010-03-30  9:46 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai

Le 30/03/2010 11:40, Gilles Chanteperdrix a écrit :
> Patrice Kadionik wrote:
>    
>> Le 30/03/2010 00:23, Gilles Chanteperdrix a écrit :
>>      
>>> Huan Fang wrote:
>>>
>>>        
>>>> eck_vdso-check-vdso.o ../../skins/native/libnative.la -lpthread -lm
>>>> libtool: link: ../../../scripts/wrap-link.sh nios2-linux-gcc -Wl,-elf2flt -o check-vdso check_vdso-check-vdso.o  ../../skins/native/.libs/libnative.a -lpthread -lm
>>>> check-vdso.elf2flt(.text+0x16c): In function `main':
>>>> : undefined reference to `xeno_sem_heap'
>>>> check-vdso.elf2flt(.text+0x170): In function `main':
>>>> : undefined reference to `xeno_sem_heap'
>>>> collect2: ld returned 1 exit status
>>>> make[3]: *** [check-vdso] Erreur 1
>>>> make[3]: quittant le répertoire « /home/sonda/Desktop/xenomai-2.5.1/src/testsuite/unit »
>>>> make[2]: *** [all-recursive] Erreur 1
>>>> make[2]: quittant le répertoire « /home/sonda/Desktop/xenomai-2.5.1/src/testsuite »
>>>> make[1]: *** [all-recursive] Erreur 1
>>>> make[1]: quittant le répertoire « /home/sonda/Desktop/xenomai-2.5.1/src »
>>>> make: *** [all-recursive] Erreur 1
>>>>
>>>> what can I do? Please help
>>>>
>>>>          
>>> Please try xenomai 2.5.2
>>>
>>>
>>>
>>>        
>> Hi Gilles,
>>
>> I've done this with the 2.5.2 version and I have had the same problem.
>> It is the consequence of another one earlier in the compilation process.
>> After the xenomai configuration for NIOS II:
>> $ ./configure --host=nios2-linux
>>
>> the generated src/include/xeno_config.h configuration file has
>> CONFIG_XENO_FASTSYNCH not configured:
>> ...
>> /* config */
>> /* #undef CONFIG_XENO_FASTSYNCH */
>> ...
>>
>> If you make the compilation, it fails on the src/skins/common/sem_heap.c
>> compilation.
>> You have in this files 2 similar functions
>> line 100: static void xeno_init_sem_heaps_inner(void)
>> and
>> line 118: void xeno_init_sem_heaps(void)
>>
>> There is a mismatch in the src/skins/common/sem_heap.h file according to
>> the CONFIG_XENO_FASTSYNCH definition (during Xenomai configuration).
>> In this case it conflits with the macro #define xeno_init_sem_heaps()
>> line 9 in the src/skins/common/sem_heap.h file and the void
>> xeno_init_sem_heaps(void) in the src/skins/common/sem_heap.c
>>
>> I don't know what in the right correction to do in the
>> src/skins/common/sem_heap.h file according to the CONFIG_XENO_FASTSYNCH
>> definition.
>>
>> If I suppress the line 9 (#define ...) in the
>> src/skins/common/sem_heap.h file, it compiles until problems for
>> src/testsuite/unit  tool:
>> cond-torture.c file. Line 56: problem with the  "if else" structure when
>> HAVE_PTHREAD_MUTEXATTR_SETPROTOCOL is not defined (the case here).
>>      
> Could you show me the compilation log? I think the "else" is simply wrong.
>
>    
That is:
nios2-linux-gcc -DHAVE_CONFIG_H -I. -I../../../src/include  
-I../../../include/posix -O2 -D_GNU_SOURCE -D_REENTRANT -Wall -pipe 
-D__XENO__ -D__IN_XENO__ -Wstrict-prototypes -g -DXENO_POSIX 
-I../../../include    -MT cond_torture_posix-cond-torture.o -MD -MP -MF 
.deps/cond_torture_posix-cond-torture.Tpo -c -o 
cond_torture_posix-cond-torture.o `test -f 'cond-torture.c' || echo 
'./'`cond-torture.c
cond-torture.c: In function `mutex_init':
cond-torture.c:56: error: syntax error before "else"
make[3]: *** [cond_torture_posix-cond-torture.o] Erreur 1
make[3]: quittant le répertoire « 
/home/kadionik/Altera/nios2-xenomai/tests/xenomai-2.5.2/src/testsuite/unit »

yes the #else is wrong...

Patrice

-- 
--
Patrice Kadionik. F6KQH / F4CUQ
-----------

+----------------------------------------------------------------------+
+"Tout doit etre aussi simple que possible, pas seulement plus simple" +
+----------------------------------------------------------------------+
+ Patrice Kadionik             http://www.enseirb-matmeca.fr/~kadionik +
+ IMS Laboratory               http://www.ims-bordeaux.fr/             +
+ ENSEIRB-MATMECA              http://www.enseirb-matmeca.fr           +
+ PO BOX 99                    fax   : +33 5.56.37.20.23               +
+ 33402 TALENCE Cedex          voice : +33 5.56.84.23.47               +
+ FRANCE                       mailto:patrice.kadionik@domain.hid +
+----------------------------------------------------------------------+



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Xenomai-help] Problem to cross-compile Xenomai user-space support
  2010-03-30  9:46           ` Patrice Kadionik
@ 2010-03-30 10:46             ` Gilles Chanteperdrix
  2010-03-30 15:00               ` Patrice Kadionik
  0 siblings, 1 reply; 18+ messages in thread
From: Gilles Chanteperdrix @ 2010-03-30 10:46 UTC (permalink / raw)
  To: Patrice Kadionik; +Cc: xenomai

Patrice Kadionik wrote:
> Le 30/03/2010 11:40, Gilles Chanteperdrix a écrit :
>> Patrice Kadionik wrote:
>>    
>>> Le 30/03/2010 00:23, Gilles Chanteperdrix a écrit :
>>>      
>>>> Huan Fang wrote:
>>>>
>>>>        
>>>>> eck_vdso-check-vdso.o ../../skins/native/libnative.la -lpthread -lm
>>>>> libtool: link: ../../../scripts/wrap-link.sh nios2-linux-gcc -Wl,-elf2flt -o check-vdso check_vdso-check-vdso.o  ../../skins/native/.libs/libnative.a -lpthread -lm
>>>>> check-vdso.elf2flt(.text+0x16c): In function `main':
>>>>> : undefined reference to `xeno_sem_heap'
>>>>> check-vdso.elf2flt(.text+0x170): In function `main':
>>>>> : undefined reference to `xeno_sem_heap'
>>>>> collect2: ld returned 1 exit status
>>>>> make[3]: *** [check-vdso] Erreur 1
>>>>> make[3]: quittant le répertoire « /home/sonda/Desktop/xenomai-2.5.1/src/testsuite/unit »
>>>>> make[2]: *** [all-recursive] Erreur 1
>>>>> make[2]: quittant le répertoire « /home/sonda/Desktop/xenomai-2.5.1/src/testsuite »
>>>>> make[1]: *** [all-recursive] Erreur 1
>>>>> make[1]: quittant le répertoire « /home/sonda/Desktop/xenomai-2.5.1/src »
>>>>> make: *** [all-recursive] Erreur 1
>>>>>
>>>>> what can I do? Please help
>>>>>
>>>>>          
>>>> Please try xenomai 2.5.2
>>>>
>>>>
>>>>
>>>>        
>>> Hi Gilles,
>>>
>>> I've done this with the 2.5.2 version and I have had the same problem.
>>> It is the consequence of another one earlier in the compilation process.
>>> After the xenomai configuration for NIOS II:
>>> $ ./configure --host=nios2-linux
>>>
>>> the generated src/include/xeno_config.h configuration file has
>>> CONFIG_XENO_FASTSYNCH not configured:
>>> ...
>>> /* config */
>>> /* #undef CONFIG_XENO_FASTSYNCH */
>>> ...
>>>
>>> If you make the compilation, it fails on the src/skins/common/sem_heap.c
>>> compilation.
>>> You have in this files 2 similar functions
>>> line 100: static void xeno_init_sem_heaps_inner(void)
>>> and
>>> line 118: void xeno_init_sem_heaps(void)
>>>
>>> There is a mismatch in the src/skins/common/sem_heap.h file according to
>>> the CONFIG_XENO_FASTSYNCH definition (during Xenomai configuration).
>>> In this case it conflits with the macro #define xeno_init_sem_heaps()
>>> line 9 in the src/skins/common/sem_heap.h file and the void
>>> xeno_init_sem_heaps(void) in the src/skins/common/sem_heap.c
>>>
>>> I don't know what in the right correction to do in the
>>> src/skins/common/sem_heap.h file according to the CONFIG_XENO_FASTSYNCH
>>> definition.
>>>
>>> If I suppress the line 9 (#define ...) in the
>>> src/skins/common/sem_heap.h file, it compiles until problems for
>>> src/testsuite/unit  tool:
>>> cond-torture.c file. Line 56: problem with the  "if else" structure when
>>> HAVE_PTHREAD_MUTEXATTR_SETPROTOCOL is not defined (the case here).
>>>      
>> Could you show me the compilation log? I think the "else" is simply wrong.
>>
>>    
> That is:
> nios2-linux-gcc -DHAVE_CONFIG_H -I. -I../../../src/include  
> -I../../../include/posix -O2 -D_GNU_SOURCE -D_REENTRANT -Wall -pipe 
> -D__XENO__ -D__IN_XENO__ -Wstrict-prototypes -g -DXENO_POSIX 
> -I../../../include    -MT cond_torture_posix-cond-torture.o -MD -MP -MF 
> .deps/cond_torture_posix-cond-torture.Tpo -c -o 
> cond_torture_posix-cond-torture.o `test -f 'cond-torture.c' || echo 
> './'`cond-torture.c
> cond-torture.c: In function `mutex_init':
> cond-torture.c:56: error: syntax error before "else"
> make[3]: *** [cond_torture_posix-cond-torture.o] Erreur 1
> make[3]: quittant le répertoire « 
> /home/kadionik/Altera/nios2-xenomai/tests/xenomai-2.5.2/src/testsuite/unit »
> 
> yes the #else is wrong...

Could you check the following patch?

diff --git a/src/testsuite/unit/cond-torture.c
b/src/testsuite/unit/cond-torture.c
index a20e12f..2d40a29 100644
--- a/src/testsuite/unit/cond-torture.c
+++ b/src/testsuite/unit/cond-torture.c
@@ -47,13 +47,13 @@ int mutex_init(mutex_t *mutex, int type, int pi)

        pthread_mutexattr_init(&mattr);
        pthread_mutexattr_settype(&mattr, type);
-       if (pi != 0)
 #ifdef HAVE_PTHREAD_MUTEXATTR_SETPROTOCOL
+       if (pi != 0)
                pthread_mutexattr_setprotocol(&mattr, PTHREAD_PRIO_INHERIT);

        err = pthread_mutex_init(mutex, &mattr);
 #else
-       else {
+       if (pi != 0) {
                err = ENOSYS;
                goto out;
        }


-- 
					    Gilles.



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [Xenomai-help] Problem to cross-compile Xenomai user-space support
  2010-03-30 10:46             ` Gilles Chanteperdrix
@ 2010-03-30 15:00               ` Patrice Kadionik
  0 siblings, 0 replies; 18+ messages in thread
From: Patrice Kadionik @ 2010-03-30 15:00 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai

Le 30/03/2010 12:46, Gilles Chanteperdrix a écrit :
> diff --git a/src/testsuite/unit/cond-torture.c
> b/src/testsuite/unit/cond-torture.c
> index a20e12f..2d40a29 100644
> --- a/src/testsuite/unit/cond-torture.c
> +++ b/src/testsuite/unit/cond-torture.c
> @@ -47,13 +47,13 @@ int mutex_init(mutex_t *mutex, int type, int pi)
>
>          pthread_mutexattr_init(&mattr);
>          pthread_mutexattr_settype(&mattr, type);
> -       if (pi != 0)
>   #ifdef HAVE_PTHREAD_MUTEXATTR_SETPROTOCOL
> +       if (pi != 0)
>                  pthread_mutexattr_setprotocol(&mattr, PTHREAD_PRIO_INHERIT);
>
>          err = pthread_mutex_init(mutex,&mattr);
>   #else
> -       else {
> +       if (pi != 0) {
>                  err = ENOSYS;
>                  goto out;
>          }
>    
The patch is OK. Everything compiles now. It runs on my NIOS II board.
Thanks Gilles.

Please find a patch for updating the Xenomai README file concerning NIOS II.

Cheers;
Patrice


-- 
--
Patrice Kadionik. F6KQH / F4CUQ
-----------

+----------------------------------------------------------------------+
+"Tout doit etre aussi simple que possible, pas seulement plus simple" +
+----------------------------------------------------------------------+
+ Patrice Kadionik             http://www.enseirb-matmeca.fr/~kadionik +
+ IMS Laboratory               http://www.ims-bordeaux.fr/             +
+ ENSEIRB-MATMECA              http://www.enseirb-matmeca.fr           +
+ PO BOX 99                    fax   : +33 5.56.37.20.23               +
+ 33402 TALENCE Cedex          voice : +33 5.56.84.23.47               +
+ FRANCE                       mailto:patrice.kadionik@domain.hid +
+----------------------------------------------------------------------+

=============================================================================
--- xenomai-2.5.2/README.INSTALL	2010-01-16 01:09:31.000000000 +0100
+++ xenomai-2.5.2.new/README.INSTALL	2010-03-30 16:48:54.000000000 +0200
@@ -451,8 +451,8 @@
  Note in Linux, IRQ 0 means auto-detected, so you must not use IRQ 0 for ANY devices.

  The Xenomai port for NIOS II uses extra hardware that you have to add in SOPC builder:
-- A  full featured 32-bit Timer named hrtimer with a 1 µs period.
-- A  full featured High Resolution 64-bit Timer named hrclock used for time stamping (1 µs period for example).
+- A full featured 32-bit Timer named hrtimer with a 1 us period.
+- A full featured High Resolution 64-bit Timer named hrclock used for time stamping (1 us period for example).

  PLEASE RESPECT hrtimer, hrclock names because the Xenomai port is based on them!

@@ -465,9 +465,10 @@

  You should first verify that uClinux without Xenomai can run on the target board.
  The typical actions for building the uClinux kernel for NIOS II (available here: http://www.nioswiki.com/) are:
-If $uClinux-dist is the path of NIOS II uClinux release, for example: /home/test/nios2-linux/uClinux-dist
+- If $linux_tree is the path of the NIOS II uClinux kernel source directory, for example: /home/test/nios2-linux/linux-2.6
+- If $uclinux is the path of the NIOS II uClinux distribution, for example: /home/test/nios2-linux/uClinux-dist

-$ cd $uClinux-dist
+$ cd $uclinux
  $ make menuconfig
  $ make vendor_hwselect SYSPTF=<path to your system ptf>
  $ make
@@ -475,11 +476,12 @@
  If the NIOS II cross-compiler is called nios2-linux-gcc, a typical compilation will look like:

  $ $xenomai_root/scripts/prepare-kernel.sh --arch=nios2 \
-  --adeos=$xenomai_root/ksrc/arch/nios2/patches/adeos-ipipe-2.6.26-rc6-nios2-* \
+  --adeos=$xenomai_root/ksrc/arch/nios2/patches/adeos-ipipe-2.6.30-nios2-* \
    --linux=$linux_tree
+
  $ $xenomai_root/configure --host=nios2-linux
-$ make install DESTDIR=$uClinux-dist/romf
-$ cd $uClinux-dist
+$ make install DESTDIR=$uclinux/romf
+$ cd $uclinux
  $ make

  2.6 Building with the --enable-linux-build option



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Xenomai-help] Problem to cross-compile Xenomai user-space support
  2010-03-30  8:37     ` Patrice Kadionik
@ 2010-03-30 17:37       ` Huan Fang
  2010-03-30 17:48         ` Patrice Kadionik
  0 siblings, 1 reply; 18+ messages in thread
From: Huan Fang @ 2010-03-30 17:37 UTC (permalink / raw)
  To: Patrice Kadionik; +Cc: xenomai

Hi Patrice, 

I probably know why it fails the first time.

before modification, my nios2.h has

/* system timer input clock frequency */
#define nasys_clock_freq                                       100000000
#define nasys_clock_freq_1000                                     100000

/* Redefining hrtimer -> timer0 */
#undef na_hrtimer
#undef na_hrtimer_irq

#define na_timer0                                  ((void *) 0x09609080)
#define na_timer0_irq                                                  1


The script  altera_avalon_timer.pm will redefine the first timer (by the order of address?) to timer_0.
In your case, sys_clk_timer is your first timer, that's why it's correctly redefined to timer_0 used in time.c

This is tricky, either we should improve the script or manually check(hack) the timer settings.

By the way, I haven't successfully compiled user space xenomai stuff, I will let you know when it's done. 

Best Regards,
Huan
________________________________________
From: Patrice Kadionik [kadionik@domain.hid]
Sent: 30 March 2010 10:37
To: Huan Fang
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Problem to cross-compile Xenomai user-space support

Le 30/03/2010 00:20, Huan Fang a écrit :
> Hi Patrice,
>
Hi Huan,

Have you really used  uClinux with NIOS2 without MMU in your Quartus II
design? Have you synchronized the µClinux kernel file version with the
NIOS2 ipipe version?

> Many thanks for the tutorial, Now I am able to run xenomai patched uclinux on my DE2-70 board.
> But the kernel doesn't boot unless I modified one file :linux-2.6/arch/nios2/kernel/time.c
>
> na_timer0 ->  na_sys_clock_timer which I guess is the clock timer used by Linux. Did you manually patch this file?
> The adeos patch doesn't seem to change this part.
>
Not at all.

If you have done this:
$ make vendor_hwselect SYSPTF=my_design.ptf
it generates a nios2.h under uClinux-dist/linux-2.6.x/include/asm-nios2
in which you have na_sys_clk_timer redefined as na_timer0.
For example, in my nios2.h generated file, I have:
/* Executing ...scripts/nios2.h/altera_avalon_timer.pm */

/* system timer input clock frequency */
#define nasys_clock_freq                                        50000000
#define nasys_clock_freq_1000                                      50000

/* Redefining sys_clk_timer -> timer0 */
#undef na_sys_clk_timer
#undef na_sys_clk_timer_irq

#define na_timer0                                  ((void *) 0x00810800)

Please send me in a private email your nios2.h file.

Patrice



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Xenomai-help] Problem to cross-compile Xenomai user-space support
  2010-03-30 17:37       ` Huan Fang
@ 2010-03-30 17:48         ` Patrice Kadionik
  0 siblings, 0 replies; 18+ messages in thread
From: Patrice Kadionik @ 2010-03-30 17:48 UTC (permalink / raw)
  To: Huan Fang; +Cc: xenomai

Le 30/03/2010 19:37, Huan Fang a écrit :
> Hi Patrice,
>
> I probably know why it fails the first time.
>
> before modification, my nios2.h has
>
> /* system timer input clock frequency */
> #define nasys_clock_freq                                       100000000
> #define nasys_clock_freq_1000                                     100000
>
> /* Redefining hrtimer ->  timer0 */
> #undef na_hrtimer
> #undef na_hrtimer_irq
>
> #define na_timer0                                  ((void *) 0x09609080)
> #define na_timer0_irq                                                  1
>
>
> The script  altera_avalon_timer.pm will redefine the first timer (by the order of address?) to timer_0.
> In your case, sys_clk_timer is your first timer, that's why it's correctly redefined to timer_0 used in time.c
>    
OK. You have the same thing with MicroBlaze and .DTS file with dtb 
parsing during kernel booting! Thank you for this info.
> This is tricky, either we should improve the script or manually check(hack) the timer settings.
>
> By the way, I haven't successfully compiled user space xenomai stuff, I will let you know when it's done.
>    
OK, read the other messages of this thread. Gilles proposes 2 patchs for 
Xenomai 2.5.2 for correcting error compilation (sem_heap.c, vdso-check.c 
and cond-torture.c)

Cheers;

Patrice

> Best Regards,
> Huan
> ________________________________________
> From: Patrice Kadionik [kadionik@domain.hid]
> Sent: 30 March 2010 10:37
> To: Huan Fang
> Cc: xenomai@xenomai.org
> Subject: Re: [Xenomai-help] Problem to cross-compile Xenomai user-space support
>
> Le 30/03/2010 00:20, Huan Fang a écrit :
>    
>> Hi Patrice,
>>
>>      
> Hi Huan,
>
> Have you really used  uClinux with NIOS2 without MMU in your Quartus II
> design? Have you synchronized the µClinux kernel file version with the
> NIOS2 ipipe version?
>
>    
>> Many thanks for the tutorial, Now I am able to run xenomai patched uclinux on my DE2-70 board.
>> But the kernel doesn't boot unless I modified one file :linux-2.6/arch/nios2/kernel/time.c
>>
>> na_timer0 ->   na_sys_clock_timer which I guess is the clock timer used by Linux. Did you manually patch this file?
>> The adeos patch doesn't seem to change this part.
>>
>>      
> Not at all.
>
> If you have done this:
> $ make vendor_hwselect SYSPTF=my_design.ptf
> it generates a nios2.h under uClinux-dist/linux-2.6.x/include/asm-nios2
> in which you have na_sys_clk_timer redefined as na_timer0.
> For example, in my nios2.h generated file, I have:
> /* Executing ...scripts/nios2.h/altera_avalon_timer.pm */
>
> /* system timer input clock frequency */
> #define nasys_clock_freq                                        50000000
> #define nasys_clock_freq_1000                                      50000
>
> /* Redefining sys_clk_timer ->  timer0 */
> #undef na_sys_clk_timer
> #undef na_sys_clk_timer_irq
>
> #define na_timer0                                  ((void *) 0x00810800)
>
> Please send me in a private email your nios2.h file.
>
> Patrice
>
>
>
>    


-- 
Patrice Kadionik. F6KQH / F4CUQ
-----------

+----------------------------------------------------------------------+
+"Tout doit etre aussi simple que possible, pas seulement plus simple" +
+----------------------------------------------------------------------+
+ Patrice Kadionik             http://www.enseirb-matmeca.fr/~kadionik +
+ IMS Laboratory               http://www.ims-bordeaux.fr/             +
+ ENSEIRB-MATMECA              http://www.enseirb-matmeca.fr           +
+ PO BOX 99                    fax   : +33 5.56.37.20.23               +
+ 33402 TALENCE Cedex          voice : +33 5.56.84.23.47               +
+ FRANCE                       mailto:patrice.kadionik@domain.hid +
+----------------------------------------------------------------------+



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Xenomai-help] Problem to cross-compile Xenomai user-space support
  2010-03-31 10:55 Chtourou Sonda
@ 2010-04-01 10:49 ` Patrice Kadionik
  0 siblings, 0 replies; 18+ messages in thread
From: Patrice Kadionik @ 2010-04-01 10:49 UTC (permalink / raw)
  To: Chtourou Sonda; +Cc: xenomai

[-- Attachment #1: Type: text/plain, Size: 5914 bytes --]

Le 31/03/2010 12:55, Chtourou Sonda a écrit :

Hi Chtourou,

> Hi Patrice,
>> OK. Please, verify first that you can boot µClinux without Xenomai on 
>> your board with the 2 extra hrtimer and hrclock peripherals.
>> There is no priority on IRQ with NIOS.
>>
> So, If I have understood, I could put:
> IRO = 7 for hrtimer
> IRQ = 8 for hrclock
> IRQ = 1 for sys_clk_timer
> with  this configuration µClinux without Xenomai with the 2 extra 
> hrtimer and hrclock peripherals can boot  on the board .
> But I'm wondering why with the first configuration (IRO = 1 for 
> hrtimer,IRQ = 2 for hrclock and IRQ = 3 for sys_clk_timer), it didn't 
> boot?
>
**Huan Fang 
(https://mail.gna.org/public/xenomai-help/2010-04/msg00013.html) has 
detected the problem.
I have done some investigations.

For recall,
- From the HW point of view, when you build your SoPC system with SOPC 
Builder tool in Quartus II, you add different peripherals (Altera 
peripheral and your own peripherals). After that you lanch a generate 
command. At this, it creates a .ptf (and now a .sopc) file. This file is 
an ASCII file (in a synthax like XML), a declarative file that gives all 
informations for HDL synthesis. After that, you compile (a synthesis) 
your SoPC system that gives the .sof file for programming your Altera FPGA.
- From the SW point of view, when you do a "$ make vendor_hwselect 
SYSPTF=your_ptf_file.ptf", you generate (through Perl scripts) a nios2.h 
file under  .../uClinux-dist/linux-2.6.x/include/asm-nios2 directory 
that translates the .ptf file into .h file with #define declarations.

The sys_clk_timer must be the Linux timer even with the 2 Xenomai extra 
timers. sys_cllk_timer is renamed in the nios2.h as timer0:
/* Redefining sys_clk_timer -> timer0 */
#undef na_sys_clk_timer
#undef na_sys_clk_timer_irq

#define na_timer0                                  ((void *) 0xXXXXXXXX)
#define na_timer0_irq                                                  Y

The Perl script (altera_avalon_timer.pm) used by the "make 
vendor_hwselect" command parses the .ptf file and takes the first 
encountered timer as Linux timer! So, if it is not the sys_clk_timer 
(hrtimer or hrclock or your own timer...), it will be bad and you can't 
boot.

How can you have sys_clk_timer as the first timer in your .ptf file?
If you change the order in the graphical view under SOPC builder, it 
doesn't care.
The order of the peripherals in the generated .ptf file is their 
creation order.
So, you MUST first create in SOPC Builder sys_clk_timer and then the 2 
other timers for Xenomai hrtimer and hrclock.
If you are note sure, delete all timers in the SoPC, save the SoPC and 
create finally in the right order the 3 timers.

If all is OK, you must have in the nios2.h something like:
/* Redefining sys_clk_timer -> timer0 */
#undef na_sys_clk_timer
#undef na_sys_clk_timer_irq

#define na_timer0                                  ((void *) 0xXXXXXXXX)
#define na_timer0_irq                                                  Y

Another verification is when you generate your SoPC system. The traces 
during SoPC generation with SOPC Builder gives the order in the .ptf 
file. For example, a good example:
# 2010.03.31 22:06:55 (*) Running Generator Program for ext_flash
# 2010.03.31 22:06:57 (*) Running Generator Program for ext_ram
# 2010.03.31 22:06:58 (*) Running Generator Program for onchip_ram_64_kbytes
# 2010.03.31 22:06:59 (*) Running Generator Program for sys_clk_timer
. . .
# 2010.03.31 22:07:05 (*) Running Generator Program for hrclock
. . .
# 2010.03.31 22:07:18 (*) Running Generator Program for uart_0
# 2010.03.31 22:07:21 (*) Running Generator Program for hrtimer
# 2010.03.31 22:07:22 (*) Running Generator Program for std_1s10_clock_0

So verify this point, it should be your problem.
>> Please verify that you have correctly enabled all the right options 
>> under SOPC builder for hrtimer and hrclock.
>> Because we have flexibility in HW configuration with SoPC, we must be 
>> more careful.
>>
> Configuration of hrtimer with the SoPC Builder:
> • Timer: 32 bits.
> • Timeout period: 1 µs.
> • Preset : custom. Writable period, readable snapshot, Start/Stop 
> control bits.
>
> Configuration of hrclock with the SoPC Builder:
> in the snapshot mode. Its configuration with the SoPC Builder tool is:
> • 64-bit timer.
> • Timeout period: 5 clocks. clock=20 ns (100 ns). The timer 
> functionality is not used by Xenomai.
>
> • Preset: custom. Writable period, readable snapshot, Start/Stop 
> control bits.
>
> Is it correct?
>> According to errno.h, code -19  is ENODEV, please verify your timer 
>> configuration and respect naming convention
>>
> Here, you speek about "sys_clock_timer"?
>
It is sys_clk_timer, sorry. I'll correct the typo error.

Patrice
> Configuration of sys_clock_timer with the SoPC Builder:
> • 32-bit timer.
> • Timeout period: 10 ms.
> • Preset: custom. Writable period, readable snapshot, Start/Stop 
> control bits.
>
> Regards,
>
>


-- 
Patrice Kadionik. F6KQH / F4CUQ
-----------

+----------------------------------------------------------------------+
+"Tout doit etre aussi simple que possible, pas seulement plus simple" +
+----------------------------------------------------------------------+
+ Patrice Kadionik             http://www.enseirb.fr/~kadionik         +
+ IMS Laboratory               http://www.ims-bordeaux.fr/             +
+ ENSEIRB                      http://www.enseirb.fr                   +
+ PO BOX 99                    fax   : +33 5.56.37.20.23               +
+ 33402 TALENCE Cedex          voice : +33 5.56.84.23.47               +
+ FRANCE                       mailto:patrice.kadionik@domain.hid +
+----------------------------------------------------------------------+


[-- Attachment #2: Type: text/html, Size: 10677 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Xenomai-help] Problem to cross-compile Xenomai user-space support
@ 2010-03-31 10:55 Chtourou Sonda
  2010-04-01 10:49 ` Patrice Kadionik
  0 siblings, 1 reply; 18+ messages in thread
From: Chtourou Sonda @ 2010-03-31 10:55 UTC (permalink / raw)
  To: Patrice Kadionik; +Cc: xenomai


[-- Attachment #1.1: Type: text/plain, Size: 1839 bytes --]

Hi Patrice,

  
    
      
        OK. Please, verify first that you can boot µClinux without Xenomai on your board with the 2 extra hrtimer and hrclock peripherals.
There is no priority on IRQ with NIOS.

        
      
    
  

So, If I have understood, I could put:
IRO = 7 for hrtimer 
IRQ = 8 for hrclock
IRQ = 1 for sys_clk_timer 
with  this configuration µClinux without Xenomai with the 2 extra hrtimer and hrclock peripherals can boot  on the board .
But I'm wondering why with the first configuration (IRO = 1 for hrtimer,IRQ = 2 for hrclock and IRQ = 3 for sys_clk_timer), it didn't boot? 

  
    
      
        Please verify that you have correctly enabled all the right options under SOPC builder for hrtimer and hrclock.

Because we have flexibility in HW configuration with SoPC, we must be more careful.

        
      
    
  

Configuration of hrtimer with the SoPC Builder:
• Timer: 32 bits.
• Timeout period: 1 µs.
• Preset : custom. Writable period, readable snapshot, Start/Stop control bits.

Configuration of hrclock with the SoPC Builder:
in the snapshot mode. Its configuration with the SoPC Builder tool is:
• 64-bit timer.
• Timeout period: 5 clocks. clock=20 ns (100 ns). The timer functionality is not used by Xenomai.
• Preset: custom. Writable period, readable snapshot, Start/Stop control bits.

Is it correct?

  
    
      
        According to errno.h, code -19  is ENODEV, please verify your timer configuration and respect naming convention

        
      
    
  

Here, you speek about "sys_clock_timer"?
Configuration of sys_clock_timer with the SoPC Builder: 
• 32-bit timer.
• Timeout period: 10 ms.
• Preset: custom. Writable period, readable snapshot, Start/Stop control bits.

Regards,




      

[-- Attachment #1.2: Type: text/html, Size: 3271 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: nios2.h --]
[-- Type: text/x-chdr; name="nios2.h", Size: 7749 bytes --]

#ifndef __NIOS2_H__
#define __NIOS2_H__

/*
 * This file contains hardware information about the target platform.
 *
 * This file is automatically generated.  Do not modify.
 */
   
/* Input System: std_1s40 */
/* Target CPU: cpu */

/* Nios II Constants */
#define NIOS2_STATUS_PIE_MSK  0x1
#define NIOS2_STATUS_PIE_OFST 0
#define NIOS2_STATUS_U_MSK    0x2
#define NIOS2_STATUS_U_OFST   1

/*
 * Outputting basic values from system.ptf.
 */

#define na_pll                                                0x008108c0
#define na_pll_clock_freq                                       50000000
#define na_ext_ram_bus_clock_freq                               50000000
#define na_ext_flash                                          0000000000
#define na_ext_flash_size                                     0x00800000
#define na_ext_flash_end                                      0x00800000
#define na_ext_flash_clock_freq                                 50000000
#define na_ext_ram                                            0x02000000
#define na_ext_ram_size                                       0x00100000
#define na_ext_ram_end                                        0x02100000
#define na_ext_ram_clock_freq                                   50000000
#define na_onchip_ram_64_kbytes                               0x02100000
#define na_onchip_ram_64_kbytes_size                          0x00010000
#define na_onchip_ram_64_kbytes_end                           0x02110000
#define na_onchip_ram_64_kbytes_clock_freq                       50000000
#define na_onchip_ram_64_kbytes_s1                            0x02100000
#define na_lan91c111                                          0x00800000
#define na_lan91c111_irq                                               7
#define na_lan91c111_clock_freq                                 50000000
#define na_sys_clk_timer                                      0x00810800
#define na_sys_clk_timer_irq                                           3
#define na_sys_clk_timer_clock_freq                             50000000
#define na_jtag_uart                                          0x00810820
#define na_jtag_uart_irq                                               4
#define na_jtag_uart_clock_freq                                 50000000
#define na_uart1                                              0x00810840
#define na_uart1_irq                                                   5
#define na_uart1_clock_freq                                     50000000
#define na_button_pio                                         0x00810830
#define na_button_pio_irq                                              6
#define na_button_pio_clock_freq                                50000000
#define na_led_pio                                            0x00810880
#define na_led_pio_clock_freq                                   50000000
#define na_seven_seg_pio                                      0x00810890
#define na_seven_seg_pio_clock_freq                             50000000
#define na_reconfig_request_pio                               0x008108a0
#define na_reconfig_request_pio_clock_freq                       50000000
#define na_sdram                                              0x01000000
#define na_sdram_size                                         0x01000000
#define na_sdram_end                                          0x02000000
#define na_sdram_clock_freq                                     50000000
#define na_sysid                                              0x00810828
#define na_sysid_clock_freq                                     50000000
#define na_lcd_display                                        0x008108b0
#define na_lcd_display_clock_freq                               50000000
#define na_hrtimer                                            0x00810860
#define na_hrtimer_irq                                                 1
#define na_hrtimer_clock_freq                                   50000000
#define na_hrclock                                            0x00810900
#define na_hrclock_irq                                                 2
#define na_hrclock_clock_freq                                   50000000
#define na_uart_0                                             0x008108e0
#define na_uart_0_irq                                                  8
#define na_uart_0_clock_freq                                    50000000

/* Executing ...scripts/nios2.h/altera_avalon_lan91c111.pm */

/* Redefining lan91c111 -> enet */
#undef na_lan91c111
#undef na_lan91c111_irq

#define na_enet                                               0x00800000
#define na_enet_irq                                                    7

#define LAN91C111_REGISTERS_OFFSET                                   768
#define LAN91C111_DATA_BUS_WIDTH                                      32

/* Executing ...scripts/nios2.h/altera_avalon_timer.pm */

/* system timer input clock frequency */
#define nasys_clock_freq                                        50000000
#define nasys_clock_freq_1000                                      50000

/* Redefining sys_clk_timer -> timer0 */
#undef na_sys_clk_timer
#undef na_sys_clk_timer_irq

#define na_timer0                                  ((void *) 0x00810800)
#define na_timer0_irq                                                  3

/* Executing ...scripts/nios2.h/altera_avalon_jtag_uart.pm */

/* No translation necessary for jtag_uart */

/* Executing ...scripts/nios2.h/altera_avalon_uart.pm */

/* Redefining uart1 -> uart0 */
#undef na_uart1
#undef na_uart1_irq

#define na_uart0                                  ((void **) 0x00810840)
#define na_uart0_irq                                                   5

/* The default uart is always the first one found in the PTF file */
#define nasys_printf_uart na_uart0

/* Redefining uart_0 -> uart1 */
#undef na_uart_0
#undef na_uart_0_irq

#define na_uart1                                  ((void **) 0x008108e0)
#define na_uart1_irq                                                   8

/* Executing ...scripts/nios2.h/altera_avalon_pio.pm */
#ifndef __ASSEMBLY__
#include <asm/pio_struct.h>
#endif

/* Casting base addresses to the appropriate structure */
#undef na_button_pio
#undef na_button_pio_irq

#define na_button_pio                             ((np_pio*) 0x00810830)
#define na_button_pio_irq                                              6

/* Casting base addresses to the appropriate structure */
#undef na_led_pio
#define na_led_pio                                ((np_pio*) 0x00810880)

/* Casting base addresses to the appropriate structure */
#undef na_seven_seg_pio
#define na_seven_seg_pio                          ((np_pio*) 0x00810890)

/* Casting base addresses to the appropriate structure */
#undef na_reconfig_request_pio
#define na_reconfig_request_pio                   ((np_pio*) 0x008108a0)

/* Executing ...scripts/nios2.h/altera_avalon_sysid.pm */

/* No translation necessary for sysid */

/*
 * Basic System Information
 */
#define nasys_icache_size                                           4096
#define nasys_icache_line_size                                        32
#define nasys_dcache_size                                              0
#define nasys_dcache_line_size                                         0

#define nasys_program_mem                                       na_sdram
#define nasys_program_mem_size                             na_sdram_size
#define nasys_program_mem_end                               na_sdram_end


#define na_cpu_clock_freq                                       50000000
#define CPU_RESET_ADDRESS                                     0000000000
#define CPU_EXCEPT_ADDRESS                                    0x01000020

#endif /* __NIOS2_H__ */

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Xenomai-help] Problem to cross-compile Xenomai user-space support
  2010-03-30 15:40 Chtourou Sonda
@ 2010-03-30 16:45 ` Patrice Kadionik
  0 siblings, 0 replies; 18+ messages in thread
From: Patrice Kadionik @ 2010-03-30 16:45 UTC (permalink / raw)
  To: Chtourou Sonda; +Cc: xenomai

[-- Attachment #1: Type: text/plain, Size: 26286 bytes --]

Le 30/03/2010 17:40, Chtourou Sonda a écrit :
> Hi Patrice,
> Thanks a lot for your answer and for the tutorial.
> I had used xenomai-2.5.0 and I had modified (ligne 11) one file: 
> xenomai-2.5.0/src/testsuite/unit/check-vdso.c
> extern unsigned long xeno_sem_heap[2]; --> unsigned long 
> xeno_sem_heap[2];
>
You may use Xenomai v2.5.2 now. Everything is fixed now. See the other 
messages of this thread.
> Then, I had no more error to cross-compile Xenomai user-space support.
>
> But, when I run the kernel on the board 1s40, the xenomai didn't 
> start. I explain:
>
> As motioned in the tutorial 
> (http://uuu.enseirb.fr/~kadionik/nios2-xenomai/Xenomai%20on%20NIOS%20II%20Softcore%20Processor%20Guide-v1.1.pdf): 
>
> The main points to respect are:
> • Peripheral name.
> • IRQ attributions.
> • Memory mapping for each peripheral.
>
> I had respected the Peripheral name and the Memory mapping for each 
> peripheral. But for IRQ attribution, if I put (as shown on attached 
> document figure1):
> IRO = 1 for hrtimer
> IRQ = 2 for hrclock
> IRQ = 3 for sys_clk_timer
>
>
> On the board, I got only this message:
> ---------------------------------------------------------------------------------------------------------------------------------------------- 
>
> ---------------------------------------------------------------------------------------------------------------------------------------------- 
>
> Uncompressing Linux... Ok, booting the kernel
> ---------------------------------------------------------------------------------------------------------------------------------------------- 
>
> ---------------------------------------------------------------------------------------------------------------------------------------------- 
>
> So, the kernel can't boot.
>
> But if I put (as shown on figure2):
> IRO = 7 for hrtimer
> IRQ = 8 for hrclock
> IRQ = 1 for sys_clk_timer
> On the borad, I've got this message:
>
OK. Please, verify first that you can boot µClinux without Xenomai on 
your board with the 2 extra hrtimer and hrclock peripherals.
There is no priority on IRQ with NIOS.
Please verify that you have correctly enabled all the right options 
under SOPC builder for hrtimer and hrclock.
Because we have flexibility in HW configuration with SoPC, we must be 
more careful.

For uCLinux configuration leave, do:
$ cd uClinux_dist
$ make menuconfig
In the menuconfig screens, verify that the following options are enabled:
Vendor/Product Selection --->
--- Select the Vendor you wish to target
Vendor (Altera) --->
--- Select the Product you wish to target
Altera Products (nios2) --->
Kernel/Library/Defaults Selection --->
--- Kernel is linux-2.6.x
Libc Version (None) --->
[*] Default all settings (lose changes)
[ ] Customize Kernel Settings
[ ] Customize Vendor/User Settings
[ ] Update Default Vendor Settings

and follow the doc from page 25 (keep all options by default).

According to errno.h, code -19  is ENODEV, please verify your timer 
configuration and respect naming convention.

Patrice
>
> ---------------------------------------------------------------------------------------------------------------------------------------------- 
>
> ---------------------------------------------------------------------------------------------------------------------------------------------- 
>
>
>
> Uncompressing Linux... Ok, booting the kernel.
> Linux version 2.6.30 (root@domain.hid) (gcc version 3.4.6) #40 PREEMPT 
> Tue Mar 30 10:45:46 CEST 2010
>
>
> uClinux/Nios II
> Built 1 zonelists in Zone order, mobility grouping off. Total pages: 4064
> Kernel command line:
> NR_IRQS:32
> PID hash table entries: 64 (order: 6, 256 bytes)
> I-pipe 1.1-00: pipeline enabled.
> Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
> Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
> Memory available: 11772k/4324k RAM, 0k/0k ROM (1932k kernel code, 
> 2391k data)
> Calibrating delay loop... 24.06 BogoMIPS (lpj=120320)
> Mount-cache hash table entries: 512
> net_namespace: 264 bytes
> NET: Registered protocol family 16
> init_BSP(): registering device resources
> bio: create slab <bio-0> at 0
> NET: Registered protocol family 2
> IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
> TCP established hash table entries: 512 (order: 0, 4096 bytes)
> TCP bind hash table entries: 512 (order: -1, 2048 bytes)
> TCP: Hash tables configured (established 512 bind 512)
> TCP reno registered
> NET: Registered protocol family 1
> I-pipe: Domain Xenomai registered.
> Xenomai: hal/nios2 started.
> Xenomai: system init failed, code -19.
> Xenomai: native skin init failed, code -19.
> Xenomai: starting POSIX services.
> Xenomai: POSIX skin init failed, code -19.
> Xenomai: RTDM skin init failed, code -19.
> io scheduler noop registered
> io scheduler deadline registered (default)
> ttyJ0 at MMIO 0x810820 (irq = 4) is a Altera JTAG UART
> console [ttyJ0] enabled
> ttyS0 at MMIO 0x810840 (irq = 5) is a Altera UART
> ttyS1 at MMIO 0x8108e0 (irq = 8) is a Altera UART
> smc91x.c: v1.1, sep 22 2004 by Nicolas Pitre <nico@domain.hid>
> eth0: SMC91C11xFD (rev 1) at 80800300 IRQ 7 [nowait]
> eth0: Invalid ethernet MAC address. Please set using ifconfig
> dm9000 Ethernet Driver, V1.31
> TCP cubic registered
> NET: Registered protocol family 17
> RPC: Registered udp transport module.
> RPC: Registered tcp transport module.
> Freeing unused kernel memory: 2076k freed (0x1232000 - 0x1438000)
> Shell invoked to run file: /etc/rc
> Command: hostname uClinux
> Command: mount -t proc proc /proc -o noexec,nosuid,nodev
> Command: mount -t sysfs sysfs /sys -o noexec,nosuid,nodev
> Command: mount -t devpts devpts /dev/pts -o noexec,nosuid
> Command: mount -t usbfs none /proc/bus/usb
> mount: mounting none on /proc/bus/usb failed: No such file or directory
> Command: mkdir /var/tmp
> Command: mkdir /var/log
> Command: mkdir /var/run
> Command: mkdir /var/lock
> Command: mkdir /var/empty
> Command: ifconfig lo 127.0.0.1
> Command: route add -net 127.0.0.0 netmask 255.0.0.0 lo
> Command: cat /etc/motd
> Welcome to
> ____ _ _
> / __| ||_|
> _ _| | | | _ ____ _ _ _ _
> | | | | | | || | _ \| | | |\ \/ /
> | |_| | |__| || | | | | |_| |/ \
> | ___\____|_||_|_| |_|\____|\_/\_/
> | |
> |_|
>
> For further information check:
> http://www.uclinux.org/
>
> Execution Finished, Exiting
>
> Sash command shell (version 1.1.1)
> />
> ---------------------------------------------------------------------------------------------------------------------------------------------- 
>
> ---------------------------------------------------------------------------------------------------------------------------------------------- 
>
>
> So, the xenomai didn't start:
>
> I-pipe: Domain Xenomai registered.
> Xenomai: hal/nios2 started.
> Xenomai: system init failed, code -19.
> Xenomai: native skin init failed, code -19.
> Xenomai: starting POSIX services.
> Xenomai: POSIX skin init failed, code -19.
> Xenomai: RTDM skin init failed, code -19.
>
>
>
> So, I wonder if the number IQR had caused this error.
> What should I do?
>
> RQ: In the configuration of the xenomai, I chose the default parameter:
> ---------------------------------------------------------------------------------------------------------------------------------------------- 
>
> ---------------------------------------------------------------------------------------------------------------------------------------------- 
>
>
> linux-n0mi:/home/sonda/Desktop/nios2-linux/uClinux-dist # make 
> vendor_hwselect SYSPTF=/home/sonda/Desktop/f/standard/std_1s40.ptf
> make ARCH=nios2 -C vendors vendor_hwselect
> make[1]: entrant dans le répertoire « 
> /home/sonda/Desktop/nios2-linux/uClinux-dist/vendors »
> make -C 
> /home/sonda/Desktop/nios2-linux/uClinux-dist/vendors/Altera/nios2/. 
> dir_v=/home/sonda/Desktop/nios2-linux/uClinux-dist/vendors/Altera/nios2/. 
> -f 
> /home/sonda/Desktop/nios2-linux/uClinux-dist/vendors/vendors-common.mak vendor_hwselect 
>
> make[2]: entrant dans le répertoire « 
> /home/sonda/Desktop/nios2-linux/uClinux-dist/vendors/Altera/nios2 »
> [ -d /home/sonda/Desktop/nios2-linux/uClinux-dist/romfs/$i ] || mkdir 
> -p /home/sonda/Desktop/nios2-linux/uClinux-dist/romfs
> make ARCH=nios2 CROSS_COMPILE=nios2-linux-uclibc- -C 
> /home/sonda/Desktop/nios2-linux/uClinux-dist/../linux-2.6 
> O=/home/sonda/Desktop/nios2-linux/uClinux-dist/linux-2.6.x hwselect
> make[3]: entrant dans le répertoire « 
> /home/sonda/Desktop/nios2-linux/linux-2.6 »
> no emulation specific options.
> no emulation specific options.
> GEN /home/sonda/Desktop/nios2-linux/uClinux-dist/linux-2.6.x/Makefile
> scripts/kconfig/conf -s arch/nios2/Kconfig
> *
> * Restart config...
> *
> *
> * Real-time sub-system
> *
> Xenomai (XENOMAI) [Y/n/?] (NEW) y
> Nucleus (XENO_OPT_NUCLEUS) [Y/n] (NEW) y
> Pervasive real-time support in user-space (XENO_OPT_PERVASIVE) [Y/n/?] 
> (NEW) y
> Priority coupling support (XENO_OPT_PRIOCPL) [Y/n/?] (NEW) y
> Optimize as pipeline head (XENO_OPT_PIPELINE_HEAD) [Y/n/?] (NEW) y
> Extra scheduling classes (XENO_OPT_SCHED_CLASSES) [N/y/?] (NEW) n
> Number of pipe devices (XENO_OPT_PIPE_NRDEV) [32] (NEW) 32
> Number of registry slots (XENO_OPT_REGISTRY_NRSLOTS) [512] (NEW) 512
> Size of the system heap (Kb) (XENO_OPT_SYS_HEAPSZ) [256] (NEW) 256
> Size of the private stack pool (Kb) (XENO_OPT_SYS_STACKPOOLSZ) [128] 
> (NEW) 128
> Size of private semaphores heap (Kb) (XENO_OPT_SEM_HEAPSZ) [12] (NEW) 12
> Size of global semaphores heap (Kb) (XENO_OPT_GLOBAL_SEM_HEAPSZ) [12] 
> (NEW) 12
> Statistics collection (XENO_OPT_STATS) [Y/n/?] (NEW) y
> Debug support (XENO_OPT_DEBUG) [N/y/?] (NEW) n
> Shared interrupts (XENO_OPT_SHIRQ) [N/y/?] (NEW) n
> *
> * Timing
> *
> Enable periodic timing (XENO_OPT_TIMING_PERIODIC) [N/y/?] (NEW) n
> Virtual tick duration in aperiodic mode (us) (XENO_OPT_TIMING_VIRTICK) 
> [1000] (NEW) 1000
> Scheduling latency (ns) (XENO_OPT_TIMING_SCHEDLAT) [0] (NEW) 0
> *
> * Scalability
> *
> O(1) scheduler (XENO_OPT_SCALABLE_SCHED) [N/y/?] (NEW) n
> Timer indexing method
> > 1. Linear (XENO_OPT_TIMER_LIST) (NEW)
> 2. Tree (XENO_OPT_TIMER_HEAP) (NEW)
> 3. Hash (XENO_OPT_TIMER_WHEEL) (NEW)
> choice[1-3?]: 1
> *
> * Native API
> *
> Native API (XENO_SKIN_NATIVE) [Y/n/?] (NEW) y
> Message pipes (XENO_OPT_NATIVE_PIPE) [Y/n/?] (NEW) y
> Bytes in buffer space (XENO_OPT_NATIVE_PIPE_BUFSZ) [1024] (NEW) 1024
> Counting semaphores (XENO_OPT_NATIVE_SEM) [Y/n/?] (NEW) y
> Event flags (XENO_OPT_NATIVE_EVENT) [Y/n/?] (NEW) y
> Mutexes (XENO_OPT_NATIVE_MUTEX) [Y/n/?] (NEW) y
> Condition variables (XENO_OPT_NATIVE_COND) [Y/n/?] (NEW) y
> Message queues (XENO_OPT_NATIVE_QUEUE) [Y/n/?] (NEW) y
> Buffers (XENO_OPT_NATIVE_BUFFER) [Y/n/?] (NEW) y
> Memory heaps (XENO_OPT_NATIVE_HEAP) [Y/n/?] (NEW) y
> Alarms (XENO_OPT_NATIVE_ALARM) [Y/n/?] (NEW) y
> Message passing support (XENO_OPT_NATIVE_MPS) [Y/n/?] (NEW) y
> Interrupts (XENO_OPT_NATIVE_INTR) [N/y/?] (NEW) n
> *
> * POSIX API
> *
> POSIX API (XENO_SKIN_POSIX) [Y/n/?] (NEW) y
> Shared memory (XENO_OPT_POSIX_SHM) [N/y/?] (NEW) n
> Interrupts (XENO_OPT_POSIX_INTR) [N/y/?] (NEW) n
> Select syscall (XENO_OPT_POSIX_SELECT) [N/y/?] (NEW) n
> Debugging support (XENO_OPT_DEBUG_POSIX) [N/y/?] (NEW) n
> *
> * pSOS+ emulator
> *
> pSOS+ emulator (XENO_SKIN_PSOS) [N/y/?] (NEW) n
> *
> * uITRON API
> *
> uITRON API (XENO_SKIN_UITRON) [N/y/?] (NEW) n
> *
> * VRTX emulator
> *
> VRTX emulator (XENO_SKIN_VRTX) [N/y/?] (NEW) n
> *
> * VxWorks emulator
> *
> VxWorks emulator (XENO_SKIN_VXWORKS) [N/y/?] (NEW) n
> *
> * RTAI emulator
> *
> RTAI emulator (XENO_SKIN_RTAI) [N/y/?] (NEW) n
> *
> * Interfaces
> *
> Do not warn about deprecated skin usage (XENO_OPT_NOWARN_DEPRECATED) 
> [N/y/?] (NEW) n
> *
> * Real-Time Driver Model
> *
> Real-Time Driver Model (XENO_SKIN_RTDM) [Y/n/?] (NEW) y
> Maximum number of RTDM file descriptors (XENO_OPT_RTDM_FILDES) [128] 
> (NEW) 128
> Select support for RTDM file descriptors (XENO_OPT_RTDM_SELECT) 
> [N/y/?] (NEW) n
> *
> * Serial drivers
> *
> 16550A UART driver (XENO_DRIVERS_16550A) [N/y/?] (NEW) n
> *
> * Testing drivers
> *
> Timer benchmark driver (XENO_DRIVERS_TIMERBENCH) [Y/n/?] (NEW) y
> IRQ benchmark driver (XENO_DRIVERS_IRQBENCH) [N/y/?] (NEW) n
> Context switch unit testing driver (XENO_DRIVERS_SWITCHTEST) [Y/n/?] 
> (NEW) y
> *
> * CAN drivers
> *
> RT-Socket-CAN, CAN raw socket interface (XENO_DRIVERS_CAN) [N/y/?] 
> (NEW) n
> *
> * ANALOGY drivers
> *
> ANALOGY interface (XENO_DRIVERS_ANALOGY) [N/y/?] (NEW) n
> *
> * Real-time IPC drivers
> *
> RTIPC protocol family (XENO_DRIVERS_RTIPC) [N/y/?] (NEW) n
> *
> * Processor type and features
> *
> *
> * Platform dependant setup
> *
> CPU
> > 1. NIOS2 (NIOS2)
> choice[1]: 1
> MMU support (MMU) [N/y/?] n
> Platform
> 1. Microtronix uKit board support (MICROTRONIX_UKIT)
> 2. Microtronix Stratix board support (MICROTRONIX_STRATIX)
> 3. Microtronix Cyclone board support (MICROTRONIX_CYCLONE)
> 4. Microtronix PSK (Product Starter Kit) support (MICROTRONIX_PSK)
> 5. Altera Stratix Development board support (ALTERA_STRATIX)
> 6. Altera Stratix Pro Development board support (ALTERA_STRATIX_PRO)
> 7. Altera Stratix II Development board support (ALTERA_STRATIX_II)
> 8. Altera Cyclone Development board support (ALTERA_CYCLONE)
> 9. Altera CYCLONE II Development board support (ALTERA_CYCLONE_II)
> 10. Altera Cyclone 1C12 Evaluation board support 
> (ALTERA_CYCLONE_1C12_EVAL)
> > 11. Altera DE2 Development board support (ALTERA_DE2)
> 12. Altera Nios II Embedded Evaluation Kit support (ALTERA_NEEK_C3)
> 13. Altera CYCLONE III 3C120 Development board support 
> (ALTERA_CYCLONE_III)
> choice[1-13]: 11
> Nios II Hardware Multiply Support
> 1. None (NIOS2_HW_MUL_OFF)
> > 2. Enable mul instruction (NIOS2_HW_MUL)
> 3. Enable mul and mulx instructions (NIOS2_HW_MULX)
> choice[1-3?]: 2
> *
> * Platform drivers Options
> *
> GPIO interface (GENERIC_GPIO) [N/y/?] n
> Support of DMA controller with Avalon interface (AVALON_DMA) [N/y/?] n
> Altera PCI host bridge (PCI_ALTPCI) [N/y] n
> Remote update support (ALTERA_REMOTE_UPDATE) [N/y/?] n
> *
> * Miscellaneous Options
> *
> Include breakpoint trap on kernel startup (BREAK_ON_START) [N/y/?] n
> Kernel executes from
> > 1. RAM (RAMKERNEL)
> choice[1]: 1
> Preemption Model
> 1. No Forced Preemption (Server) (PREEMPT_NONE)
> 2. Voluntary Kernel Preemption (Desktop) (PREEMPT_VOLUNTARY)
> > 3. Preemptible Kernel (Low-Latency Desktop) (PREEMPT)
> choice[1-3]: 3
> Timer frequency
> > 1. 100 HZ (HZ_100)
> 2. 250 HZ (HZ_250)
> 3. 300 HZ (HZ_300)
> 4. 1000 HZ (HZ_1000)
> choice[1-4?]: 1
> Default kernel command string (CMDLINE) []
> Passed kernel command line from u-boot (PASS_CMDLINE) [N/y/?] n
> Interrupt pipeline (IPIPE) [Y/?] (NEW) y
> Max domains (IPIPE_DOMAINS) [4] (NEW) 4
> Maintain code compatibility with older releases (IPIPE_COMPAT) [Y/n/?] 
> (NEW) y
> Memory model
> > 1. Flat Memory (FLATMEM_MANUAL)
> choice[1]: 1
> Add LRU list to track non-evictable pages (UNEVICTABLE_LRU) [Y/n/?] y
> Turn on mmap() excess space trimming before booting 
> (NOMMU_INITIAL_TRIM_EXCESS) [1] 1
> Link address offset for booting (BOOT_LINK_OFFSET) [0x00500000] 
> 0x00500000
> *
> * Kernel hacking
> *
> Show timing information on printks (PRINTK_TIME) [N/y/?] n
> Enable __deprecated logic (ENABLE_WARN_DEPRECATED) [Y/n/?] y
> Enable __must_check logic (ENABLE_MUST_CHECK) [N/y/?] n
> Warn for stack frames larger than (needs gcc 4.4) (FRAME_WARN) [1024] 
> 1024
> Magic SysRq key (MAGIC_SYSRQ) [N/y/?] n
> Enable unused/obsolete exported symbols (UNUSED_SYMBOLS) [N/y/?] n
> Debug Filesystem (DEBUG_FS) [N/y/?] n
> Run 'make headers_check' when building vmlinux (HEADERS_CHECK) [N/y/?] n
> I-pipe debugging (IPIPE_DEBUG) [N/y] (NEW) n
> Kernel debugging (DEBUG_KERNEL) [Y/n/?] y
> Debug shared IRQ handlers (DEBUG_SHIRQ) [N/y/?] n
> Detect Soft Lockups (DETECT_SOFTLOCKUP) [Y/n/?] y
> Panic (Reboot) On Soft Lockups (BOOTPARAM_SOFTLOCKUP_PANIC) [N/y/?] n
> Detect Hung Tasks (DETECT_HUNG_TASK) [Y/n/?] y
> Panic (Reboot) On Hung Tasks (BOOTPARAM_HUNG_TASK_PANIC) [N/y/?] n
> Collect scheduler debugging info (SCHED_DEBUG) [Y/n/?] y
> Collect scheduler statistics (SCHEDSTATS) [N/y/?] n
> Collect kernel timers statistics (TIMER_STATS) [N/y/?] n
> Debug object operations (DEBUG_OBJECTS) [N/y/?] n
> Debug slab memory allocations (DEBUG_SLAB) [N/y/?] n
> RT Mutex debugging, deadlock detection (DEBUG_RT_MUTEXES) [N/y/?] n
> Built-in scriptable tester for rt-mutexes (RT_MUTEX_TESTER) [N/y/?] n
> Spinlock and rw-lock debugging: basic checks (DEBUG_SPINLOCK) [N/y/?] n
> Mutex debugging: basic checks (DEBUG_MUTEXES) [N/y/?] n
> Spinlock debugging: sleep-inside-spinlock checking 
> (DEBUG_SPINLOCK_SLEEP) [N/y/?] n
> Locking API boot-time self-tests (DEBUG_LOCKING_API_SELFTESTS) [N/y/?] n
> kobject debugging (DEBUG_KOBJECT) [N/y/?] n
> Compile the kernel with debug info (DEBUG_INFO) [Y/n/?] y
> Debug VM (DEBUG_VM) [N/y/?] n
> Debug the global anon/private NOMMU mapping region tree 
> (DEBUG_NOMMU_REGIONS) [N/y/?] n
> Debug filesystem writers count (DEBUG_WRITECOUNT) [N/y/?] n
> Debug memory initialisation (DEBUG_MEMORY_INIT) [N/y/?] n
> Debug linked list manipulation (DEBUG_LIST) [N/y/?] n
> Debug SG table operations (DEBUG_SG) [N/y/?] n
> Debug notifier call chains (DEBUG_NOTIFIERS) [N/y/?] n
> Delay each boot printk message by N milliseconds (BOOT_PRINTK_DELAY) 
> [N/y/?] n
> torture tests for RCU (RCU_TORTURE_TEST) [N/y/?] n
> Check for stalled CPUs delaying RCU grace periods 
> (RCU_CPU_STALL_DETECTOR) [N/y/?] n
> Self test for the backtrace code (BACKTRACE_SELF_TEST) [N/y/?] n
> Force extended block device numbers and spread them 
> (DEBUG_BLOCK_EXT_DEVT) [N/y/?] n
> Fault-injection framework (FAULT_INJECTION) [N/y/?] n
> Debug page memory allocations (PAGE_POISONING) [N/y/?] n
> #
> # configuration written to .config
> #
> no emulation specific options.
> RUNNING hwselect
>
> --- Please select which CPU you wish to build the kernel against:
>
> (1) cpu - Class: altera_nios2 Type: s Version: 7.080910
>
> Selection: 1
>
> --- Please select a device to execute kernel from:
>
> (1) ext_flash
> Class: altera_avalon_cfi_flash
> Size: 8388608 bytes
>
> (2) onchip_ram_64_kbytes
> Class: altera_avalon_onchip_memory2
> Size: 65536 bytes
>
> (3) ext_ram
> Class: altera_nios_dev_kit_stratix_edition_sram2
> Size: 1048576 bytes
>
> (4) sdram
> Class: altera_avalon_new_sdram_controller
> Size: 16777216 bytes
>
> Selection: 4
>
> --- Summary using
>
> PTF: /home/sonda/Desktop/f/standard/std_1s40.ptf
> CPU: cpu
> Program memory to execute from: sdram
>
> --- Settings written to 
> /home/sonda/Desktop/nios2-linux/uClinux-dist/linux-2.6.x/arch/nios2/hardware.mk 
>
>
> make[3]: quittant le répertoire « 
> /home/sonda/Desktop/nios2-linux/linux-2.6 »
> make[2]: quittant le répertoire « 
> /home/sonda/Desktop/nios2-linux/uClinux-dist/vendors/Altera/nios2 »
> make[1]: quittant le répertoire « 
> /home/sonda/Desktop/nios2-linux/uClinux-dist/vendors »
> ---------------------------------------------------------------------------------------------------------------------------------------------- 
>
> ---------------------------------------------------------------------------------------------------------------------------------------------- 
>
>
> Regards,
>
> --- En date de : *Dim 28.3.10, Patrice Kadionik 
> /<kadionik@domain.hid>/* a écrit :
>
>
>     De: Patrice Kadionik <kadionik@domain.hid>
>     Objet: Re: [Xenomai-help] Problem to cross-compile Xenomai
>     user-space support
>     À: "Chtourou Sonda" <chtourou_sonda@domain.hid>
>     Cc: xenomai@xenomai.org
>     Date: Dimanche 28 mars 2010, 13h26
>
>     Le 20:59, Chtourou Sonda a écrit :
>>
>>     Dears,
>>
>     Hi,
>
>>
>>     I built the uClinux kernel for NIOS II and it run well on the
>>     target board. I followed the typical actions available here :
>>     http://www.nioswiki.com/
>>
>>     Now, I want to add a co-scheduler xenomai to the kernel (uclinux)
>>     to reduce its latency. I followed these steps:
>>     (http://www.xenomai.org/documentation/xenomai-2.5/README.INSTALL)
>>
>     I've tried to reproduce your compilation error but without success.
>
>     For using Xenomai on NIOS II processor with uClinux, you must add
>     extra hardware in your SoPC design as explained in this tutorial
>     (http://uuu.enseirb.fr/~kadionik/nios2-xenomai/Xenomai%20on%20NIOS%20II%20Softcore%20Processor%20Guide-v1.1.pdf).
>
>     It is OK on my Altera 1S10 board  with Xenomai v2.5.1 (see traces).
>
>     Sincerely;
>
>     Patrice
>     ========================================
>
>     Uncompressing Linux... Ok, booting the kernel.
>     Linux version 2.6.30 (kadionik@domain.hid) (gcc version 3.4.6) #4
>     PREEMPT Sun Mar 0
>
>
>     uClinux/Nios II
>     Built 1 zonelists in Zone order, mobility grouping off.  Total
>     pages: 4064
>     Kernel command line:
>     NR_IRQS:32
>     PID hash table entries: 64 (order: 6, 256 bytes)
>     I-pipe 1.1-00: pipeline enabled.
>     Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
>     Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
>     Memory available: 12108k/3990k RAM, 0k/0k ROM (1931k kernel code,
>     2059k data)
>     Calibrating delay loop... 24.06 BogoMIPS (lpj=120320)
>     Mount-cache hash table entries: 512
>     net_namespace: 264 bytes
>     NET: Registered protocol family 16
>     init_BSP(): registering device resources
>     bio: create slab <bio-0> at 0
>     NET: Registered protocol family 2
>     IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
>     TCP established hash table entries: 512 (order: 0, 4096 bytes)
>     TCP bind hash table entries: 512 (order: -1, 2048 bytes)
>     TCP: Hash tables configured (established 512 bind 512)
>     TCP reno registered
>     NET: Registered protocol family 1
>     I-pipe: Domain Xenomai registered.
>     Xenomai: hal/nios2 started.
>     Xenomai: scheduling class idle registered.
>     Xenomai: scheduling class rt registered.
>     Xenomai: real-time nucleus v2.5.1 (Speed Of Light) loaded.
>     Xenomai: starting native API services.
>     Xenomai: starting POSIX services.
>     Xenomai: starting RTDM services.
>     io scheduler noop registered
>     io scheduler deadline registered (default)
>     ttyS0 at MMIO 0x810840 (irq = 5) is a Altera UART
>     console [ttyS0] enabled
>
>
>
>
>>     $ $xenomai-2.5.1/scripts/prepare-kernel.sh --arch=nios2
>>     --adeos=$xenomai-2.5.1/ksrc/arch/nios2/patches/adeos-ipipe-2.6.30-nios2-1.1-00.patch
>>       --linux=$linux_tree
>>     $ $xenomai-2.5.1/configure --host=nios2-linux
>>     $ make install DESTDIR=$uClinux-dist/romfs
>>
>>     But, in this step, I got this error:
>>
>>     eck_vdso-check-vdso.o ../../skins/native/libnative.la -lpthread -lm
>>     libtool: link: ../../../scripts/wrap-link.sh nios2-linux-gcc
>>     -Wl,-elf2flt -o check-vdso check_vdso-check-vdso.o 
>>     ../../skins/native/.libs/libnative.a -lpthread -lm
>>     check-vdso.elf2flt(.text+0x16c): In function `main':
>>     : undefined reference to `xeno_sem_heap'
>>     check-vdso.elf2flt(.text+0x170): In function `main':
>>     : undefined reference to `xeno_sem_heap'
>>     collect2: ld returned 1 exit status
>>     make[3]: *** [check-vdso] Erreur 1
>>     make[3]: quittant le répertoire «
>>     /home/sonda/Desktop/xenomai-2.5.1/src/testsuite/unit »
>>     make[2]: *** [all-recursive] Erreur 1
>>     make[2]: quittant le répertoire «
>>     /home/sonda/Desktop/xenomai-2.5.1/src/testsuite »
>>     make[1]: *** [all-recursive] Erreur 1
>>     make[1]: quittant le répertoire «
>>     /home/sonda/Desktop/xenomai-2.5.1/src »
>>     make: *** [all-recursive] Erreur 1
>>
>>     what can I do? Please help
>>
>>     Regards,
>>
>>
>>
>>     _______________________________________________
>>     Xenomai-help mailing list
>>     Xenomai-help@domain.hid
>>     https://mail.gna.org/listinfo/xenomai-help
>>        
>
>
>     -- 
>     Patrice Kadionik. F6KQH / F4CUQ
>     -----------
>
>     +----------------------------------------------------------------------+
>     +"Tout doit etre aussi simple que possible, pas seulement plus simple" +
>     +----------------------------------------------------------------------+
>     + Patrice Kadionikhttp://www.enseirb-matmeca.fr/~kadionik  +
>     + IMS Laboratoryhttp://www.ims-bordeaux.fr/              +
>     + ENSEIRB-MATMECAhttp://www.enseirb-matmeca.fr            +
>     + PO BOX 99                    fax   : +33 5.56.37.20.23               +
>     + 33402 TALENCE Cedex
>              voice : +33 5.56.84.23.47               +
>     + FRANCEmailto:patrice.kadionik@domain.hid  +
>     +----------------------------------------------------------------------+
>                
>
>


-- 
Patrice Kadionik. F6KQH / F4CUQ
-----------

+----------------------------------------------------------------------+
+"Tout doit etre aussi simple que possible, pas seulement plus simple" +
+----------------------------------------------------------------------+
+ Patrice Kadionik             http://www.enseirb-matmeca.fr/~kadionik +
+ IMS Laboratory               http://www.ims-bordeaux.fr/             +
+ ENSEIRB-MATMECA              http://www.enseirb-matmeca.fr           +
+ PO BOX 99                    fax   : +33 5.56.37.20.23               +
+ 33402 TALENCE Cedex          voice : +33 5.56.84.23.47               +
+ FRANCE                       mailto:patrice.kadionik@domain.hid +
+----------------------------------------------------------------------+


[-- Attachment #2: Type: text/html, Size: 40254 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Xenomai-help] Problem to cross-compile Xenomai user-space support
@ 2010-03-30 15:40 Chtourou Sonda
  2010-03-30 16:45 ` Patrice Kadionik
  0 siblings, 1 reply; 18+ messages in thread
From: Chtourou Sonda @ 2010-03-30 15:40 UTC (permalink / raw)
  To: Patrice Kadionik; +Cc: xenomai


[-- Attachment #1.1: Type: text/plain, Size: 27094 bytes --]

Hi Patrice, 

Thanks a lot for your answer and for the tutorial.

I had used xenomai-2.5.0 and I had modified (ligne 11) one file: xenomai-2.5.0/src/testsuite/unit/check-vdso.c

extern unsigned long xeno_sem_heap[2]; --> unsigned long xeno_sem_heap[2];

Then, I had no more error to cross-compile Xenomai user-space support.

 
But, when I run the kernel on the board 1s40, the xenomai didn't start. I explain:

 
As motioned in the tutorial
(http://uuu.enseirb.fr/~kadionik/nios2-xenomai/Xenomai%20on%20NIOS%20II%20Softcore%20Processor%20Guide-v1.1.pdf): 

The main points to respect are:

• Peripheral name.

• IRQ attributions.

• Memory mapping for each peripheral.

 
I had respected the Peripheral name and the Memory mapping for
each peripheral. But for IRQ attribution, if I put (as shown on
attached document figure1):

IRO = 1 for hrtimer 

IRQ = 2 for hrclock

IRQ = 3 for sys_clk_timer

 
 
On the board, I got only this message:

----------------------------------------------------------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------------------------------------------------

Uncompressing Linux... Ok, booting the kernel

----------------------------------------------------------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------------------------------------------------

So, the kernel can't boot.

 
But if I put (as shown on figure2):

IRO = 7 for hrtimer 

IRQ = 8 for hrclock

IRQ = 1 for sys_clk_timer

On the borad, I've got this message:

 
----------------------------------------------------------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------------------------------------------------

 
 
Uncompressing Linux... Ok, booting the kernel.

Linux version 2.6.30 (root@domain.hid) (gcc version 3.4.6) #40 PREEMPT Tue Mar 30 10:45:46 CEST 2010

 
 
uClinux/Nios II

Built 1 zonelists in Zone order, mobility grouping off. Total pages: 4064

Kernel command line: 

NR_IRQS:32 

PID hash table entries: 64 (order: 6, 256 bytes) 

I-pipe 1.1-00: pipeline enabled. 

Dentry cache hash table entries: 2048 (order: 1, 8192 bytes) 

Inode-cache hash table entries: 1024 (order: 0, 4096 bytes) 

Memory available: 11772k/4324k RAM, 0k/0k ROM (1932k kernel code, 2391k data)

Calibrating delay loop... 24.06 BogoMIPS (lpj=120320) 

Mount-cache hash table entries: 512 

net_namespace: 264 bytes 

NET: Registered protocol family 16 

init_BSP(): registering device resources 

bio: create slab <bio-0> at 0 

NET: Registered protocol family 2 

IP route cache hash table entries: 1024 (order: 0, 4096 bytes) 

TCP established hash table entries: 512 (order: 0, 4096 bytes) 

TCP bind hash table entries: 512 (order: -1, 2048 bytes)

TCP: Hash tables configured (established 512 bind 512)

TCP reno registered

NET: Registered protocol family 1

I-pipe: Domain Xenomai registered.

Xenomai: hal/nios2 started.

Xenomai: system init failed, code -19.

Xenomai: native skin init failed, code -19.

Xenomai: starting POSIX services.

Xenomai: POSIX skin init failed, code -19.

Xenomai: RTDM skin init failed, code -19.

io scheduler noop registered

io scheduler deadline registered (default)

ttyJ0 at MMIO 0x810820 (irq = 4) is a Altera JTAG UART

console [ttyJ0] enabled

ttyS0 at MMIO 0x810840 (irq = 5) is a Altera UART

ttyS1 at MMIO 0x8108e0 (irq = 8) is a Altera UART

smc91x.c: v1.1, sep 22 2004 by Nicolas Pitre <nico@domain.hid>

eth0: SMC91C11xFD (rev 1) at 80800300 IRQ 7 [nowait]

eth0: Invalid ethernet MAC address. Please set using ifconfig

dm9000 Ethernet Driver, V1.31

TCP cubic registered

NET: Registered protocol family 17

RPC: Registered udp transport module.

RPC: Registered tcp transport module.

Freeing unused kernel memory: 2076k freed (0x1232000 - 0x1438000)

Shell invoked to run file: /etc/rc 

Command: hostname uClinux 

Command: mount -t proc proc /proc -o noexec,nosuid,nodev 

Command: mount -t sysfs sysfs /sys -o noexec,nosuid,nodev 

Command: mount -t devpts devpts /dev/pts -o noexec,nosuid 

Command: mount -t usbfs none /proc/bus/usb

mount: mounting none on /proc/bus/usb failed: No such file or directory

Command: mkdir /var/tmp

Command: mkdir /var/log

Command: mkdir /var/run

Command: mkdir /var/lock

Command: mkdir /var/empty

Command: ifconfig lo 127.0.0.1

Command: route add -net 127.0.0.0 netmask 255.0.0.0 lo

Command: cat /etc/motd

Welcome to

____ _ _

/ __| ||_|

_ _| | | | _ ____ _ _ _ _

| | | | | | || | _ \| | | |\ \/ /

| |_| | |__| || | | | | |_| |/ \

| ___\____|_||_|_| |_|\____|\_/\_/

| |

|_|

 
For further information check:

http://www.uclinux.org/

 
Execution Finished, Exiting

 
Sash command shell (version 1.1.1)

/>

----------------------------------------------------------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------------------------------------------------

 
So, the xenomai didn't start:

 
I-pipe: Domain Xenomai registered.

Xenomai: hal/nios2 started.

Xenomai: system init failed, code -19.

Xenomai: native skin init failed, code -19.

Xenomai: starting POSIX services.

Xenomai: POSIX skin init failed, code -19.

Xenomai: RTDM skin init failed, code -19.

 
 
 
So, I wonder if the number IQR had caused this error.

What should I do? 

 
RQ: In the configuration of the xenomai, I chose the default parameter:

----------------------------------------------------------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------------------------------------------------

 
linux-n0mi:/home/sonda/Desktop/nios2-linux/uClinux-dist #
make vendor_hwselect
SYSPTF=/home/sonda/Desktop/f/standard/std_1s40.ptf 

make ARCH=nios2 -C vendors vendor_hwselect 

make[1]: entrant dans le répertoire « /home/sonda/Desktop/nios2-linux/uClinux-dist/vendors » 

make -C
/home/sonda/Desktop/nios2-linux/uClinux-dist/vendors/Altera/nios2/.
dir_v=/home/sonda/Desktop/nios2-linux/uClinux-dist/vendors/Altera/nios2/.
-f
/home/sonda/Desktop/nios2-linux/uClinux-dist/vendors/vendors-common.mak
vendor_hwselect 

make[2]: entrant dans le répertoire « /home/sonda/Desktop/nios2-linux/uClinux-dist/vendors/Altera/nios2 » 

[ -d /home/sonda/Desktop/nios2-linux/uClinux-dist/romfs/$i ] || mkdir -p /home/sonda/Desktop/nios2-linux/uClinux-dist/romfs 

make ARCH=nios2 CROSS_COMPILE=nios2-linux-uclibc- -C
/home/sonda/Desktop/nios2-linux/uClinux-dist/../linux-2.6
O=/home/sonda/Desktop/nios2-linux/uClinux-dist/linux-2.6.x hwselect 

make[3]: entrant dans le répertoire « /home/sonda/Desktop/nios2-linux/linux-2.6 » 

no emulation specific options. 

no emulation specific options. 

GEN /home/sonda/Desktop/nios2-linux/uClinux-dist/linux-2.6.x/Makefile 

scripts/kconfig/conf -s arch/nios2/Kconfig 

* 

* Restart config... 

* 

* 

* Real-time sub-system 

* 

Xenomai (XENOMAI) [Y/n/?] (NEW) y 

Nucleus (XENO_OPT_NUCLEUS) [Y/n] (NEW) y 

Pervasive real-time support in user-space (XENO_OPT_PERVASIVE) [Y/n/?] (NEW) y 

Priority coupling support (XENO_OPT_PRIOCPL) [Y/n/?] (NEW) y 

Optimize as pipeline head (XENO_OPT_PIPELINE_HEAD) [Y/n/?] (NEW) y 

Extra scheduling classes (XENO_OPT_SCHED_CLASSES) [N/y/?] (NEW) n 

Number of pipe devices (XENO_OPT_PIPE_NRDEV) [32] (NEW) 32 

Number of registry slots (XENO_OPT_REGISTRY_NRSLOTS) [512] (NEW) 512 

Size of the system heap (Kb) (XENO_OPT_SYS_HEAPSZ) [256] (NEW) 256 

Size of the private stack pool (Kb) (XENO_OPT_SYS_STACKPOOLSZ) [128] (NEW) 128 

Size of private semaphores heap (Kb) (XENO_OPT_SEM_HEAPSZ) [12] (NEW) 12 

Size of global semaphores heap (Kb) (XENO_OPT_GLOBAL_SEM_HEAPSZ) [12] (NEW) 12 

Statistics collection (XENO_OPT_STATS) [Y/n/?] (NEW) y 

Debug support (XENO_OPT_DEBUG) [N/y/?] (NEW) n 

Shared interrupts (XENO_OPT_SHIRQ) [N/y/?] (NEW) n 

* 

* Timing 

* 

Enable periodic timing (XENO_OPT_TIMING_PERIODIC) [N/y/?] (NEW) n 

Virtual tick duration in aperiodic mode (us) (XENO_OPT_TIMING_VIRTICK) [1000] (NEW) 1000 

Scheduling latency (ns) (XENO_OPT_TIMING_SCHEDLAT) [0] (NEW) 0 

* 

* Scalability 

* 

O(1) scheduler (XENO_OPT_SCALABLE_SCHED) [N/y/?] (NEW) n 

Timer indexing method 

> 1. Linear (XENO_OPT_TIMER_LIST) (NEW) 

2. Tree (XENO_OPT_TIMER_HEAP) (NEW) 

3. Hash (XENO_OPT_TIMER_WHEEL) (NEW) 

choice[1-3?]: 1 

* 

* Native API 

* 

Native API (XENO_SKIN_NATIVE) [Y/n/?] (NEW) y 

Message pipes (XENO_OPT_NATIVE_PIPE) [Y/n/?] (NEW) y 

Bytes in buffer space (XENO_OPT_NATIVE_PIPE_BUFSZ) [1024] (NEW) 1024 

Counting semaphores (XENO_OPT_NATIVE_SEM) [Y/n/?] (NEW) y 

Event flags (XENO_OPT_NATIVE_EVENT) [Y/n/?] (NEW) y 

Mutexes (XENO_OPT_NATIVE_MUTEX) [Y/n/?] (NEW) y 

Condition variables (XENO_OPT_NATIVE_COND) [Y/n/?] (NEW) y 

Message queues (XENO_OPT_NATIVE_QUEUE) [Y/n/?] (NEW) y 

Buffers (XENO_OPT_NATIVE_BUFFER) [Y/n/?] (NEW) y 

Memory heaps (XENO_OPT_NATIVE_HEAP) [Y/n/?] (NEW) y 

Alarms (XENO_OPT_NATIVE_ALARM) [Y/n/?] (NEW) y 

Message passing support (XENO_OPT_NATIVE_MPS) [Y/n/?] (NEW) y 

Interrupts (XENO_OPT_NATIVE_INTR) [N/y/?] (NEW) n 

* 

* POSIX API 

* 

POSIX API (XENO_SKIN_POSIX) [Y/n/?] (NEW) y 

Shared memory (XENO_OPT_POSIX_SHM) [N/y/?] (NEW) n 

Interrupts (XENO_OPT_POSIX_INTR) [N/y/?] (NEW) n 

Select syscall (XENO_OPT_POSIX_SELECT) [N/y/?] (NEW) n 

Debugging support (XENO_OPT_DEBUG_POSIX) [N/y/?] (NEW) n 

* 

* pSOS+ emulator 

* 

pSOS+ emulator (XENO_SKIN_PSOS) [N/y/?] (NEW) n 

* 

* uITRON API 

* 

uITRON API (XENO_SKIN_UITRON) [N/y/?] (NEW) n 

* 

* VRTX emulator 

* 

VRTX emulator (XENO_SKIN_VRTX) [N/y/?] (NEW) n 

* 

* VxWorks emulator 

* 

VxWorks emulator (XENO_SKIN_VXWORKS) [N/y/?] (NEW) n 

* 

* RTAI emulator 

* 

RTAI emulator (XENO_SKIN_RTAI) [N/y/?] (NEW) n 

* 

* Interfaces 

* 

Do not warn about deprecated skin usage (XENO_OPT_NOWARN_DEPRECATED) [N/y/?] (NEW) n 

* 

* Real-Time Driver Model 

* 

Real-Time Driver Model (XENO_SKIN_RTDM) [Y/n/?] (NEW) y 

Maximum number of RTDM file descriptors (XENO_OPT_RTDM_FILDES) [128] (NEW) 128 

Select support for RTDM file descriptors (XENO_OPT_RTDM_SELECT) [N/y/?] (NEW) n 

* 

* Serial drivers 

* 

16550A UART driver (XENO_DRIVERS_16550A) [N/y/?] (NEW) n 

* 

* Testing drivers 

* 

Timer benchmark driver (XENO_DRIVERS_TIMERBENCH) [Y/n/?] (NEW) y 

IRQ benchmark driver (XENO_DRIVERS_IRQBENCH) [N/y/?] (NEW) n 

Context switch unit testing driver (XENO_DRIVERS_SWITCHTEST) [Y/n/?] (NEW) y 

* 

* CAN drivers 

* 

RT-Socket-CAN, CAN raw socket interface (XENO_DRIVERS_CAN) [N/y/?] (NEW) n 

* 

* ANALOGY drivers 

* 

ANALOGY interface (XENO_DRIVERS_ANALOGY) [N/y/?] (NEW) n 

* 

* Real-time IPC drivers 

* 

RTIPC protocol family (XENO_DRIVERS_RTIPC) [N/y/?] (NEW) n 

* 

* Processor type and features 

* 

* 

* Platform dependant setup 

* 

CPU 

> 1. NIOS2 (NIOS2) 

choice[1]: 1 

MMU support (MMU) [N/y/?] n 

Platform 

1. Microtronix uKit board support (MICROTRONIX_UKIT) 

2. Microtronix Stratix board support (MICROTRONIX_STRATIX) 

3. Microtronix Cyclone board support (MICROTRONIX_CYCLONE) 

4. Microtronix PSK (Product Starter Kit) support (MICROTRONIX_PSK) 

5. Altera Stratix Development board support (ALTERA_STRATIX) 

6. Altera Stratix Pro Development board support (ALTERA_STRATIX_PRO) 

7. Altera Stratix II Development board support (ALTERA_STRATIX_II) 

8. Altera Cyclone Development board support (ALTERA_CYCLONE) 

9. Altera CYCLONE II Development board support (ALTERA_CYCLONE_II) 

10. Altera Cyclone 1C12 Evaluation board support (ALTERA_CYCLONE_1C12_EVAL) 

> 11. Altera DE2 Development board support (ALTERA_DE2) 

12. Altera Nios II Embedded Evaluation Kit support (ALTERA_NEEK_C3) 

13. Altera CYCLONE III 3C120 Development board support (ALTERA_CYCLONE_III) 

choice[1-13]: 11 

Nios II Hardware Multiply Support 

1. None (NIOS2_HW_MUL_OFF) 

> 2. Enable mul instruction (NIOS2_HW_MUL) 

3. Enable mul and mulx instructions (NIOS2_HW_MULX) 

choice[1-3?]: 2 

* 

* Platform drivers Options 

* 

GPIO interface (GENERIC_GPIO) [N/y/?] n 

Support of DMA controller with Avalon interface (AVALON_DMA) [N/y/?] n 

Altera PCI host bridge (PCI_ALTPCI) [N/y] n 

Remote update support (ALTERA_REMOTE_UPDATE) [N/y/?] n 

* 

* Miscellaneous Options 

* 

Include breakpoint trap on kernel startup (BREAK_ON_START) [N/y/?] n 

Kernel executes from 

> 1. RAM (RAMKERNEL) 

choice[1]: 1 

Preemption Model 

1. No Forced Preemption (Server) (PREEMPT_NONE) 

2. Voluntary Kernel Preemption (Desktop) (PREEMPT_VOLUNTARY) 

> 3. Preemptible Kernel (Low-Latency Desktop) (PREEMPT) 

choice[1-3]: 3 

Timer frequency 

> 1. 100 HZ (HZ_100) 

2. 250 HZ (HZ_250) 

3. 300 HZ (HZ_300) 

4. 1000 HZ (HZ_1000) 

choice[1-4?]: 1 

Default kernel command string (CMDLINE) [] 

Passed kernel command line from u-boot (PASS_CMDLINE) [N/y/?] n 

Interrupt pipeline (IPIPE) [Y/?] (NEW) y 

Max domains (IPIPE_DOMAINS) [4] (NEW) 4 

Maintain code compatibility with older releases (IPIPE_COMPAT) [Y/n/?] (NEW) y 

Memory model 

> 1. Flat Memory (FLATMEM_MANUAL) 

choice[1]: 1 

Add LRU list to track non-evictable pages (UNEVICTABLE_LRU) [Y/n/?] y 

Turn on mmap() excess space trimming before booting (NOMMU_INITIAL_TRIM_EXCESS) [1] 1 

Link address offset for booting (BOOT_LINK_OFFSET) [0x00500000] 0x00500000 

* 

* Kernel hacking 

* 

Show timing information on printks (PRINTK_TIME) [N/y/?] n 

Enable __deprecated logic (ENABLE_WARN_DEPRECATED) [Y/n/?] y 

Enable __must_check logic (ENABLE_MUST_CHECK) [N/y/?] n 

Warn for stack frames larger than (needs gcc 4.4) (FRAME_WARN) [1024] 1024 

Magic SysRq key (MAGIC_SYSRQ) [N/y/?] n 

Enable unused/obsolete exported symbols (UNUSED_SYMBOLS) [N/y/?] n 

Debug Filesystem (DEBUG_FS) [N/y/?] n 

Run 'make headers_check' when building vmlinux (HEADERS_CHECK) [N/y/?] n 

I-pipe debugging (IPIPE_DEBUG) [N/y] (NEW) n 

Kernel debugging (DEBUG_KERNEL) [Y/n/?] y 

Debug shared IRQ handlers (DEBUG_SHIRQ) [N/y/?] n 

Detect Soft Lockups (DETECT_SOFTLOCKUP) [Y/n/?] y 

Panic (Reboot) On Soft Lockups (BOOTPARAM_SOFTLOCKUP_PANIC) [N/y/?] n 

Detect Hung Tasks (DETECT_HUNG_TASK) [Y/n/?] y 

Panic (Reboot) On Hung Tasks (BOOTPARAM_HUNG_TASK_PANIC) [N/y/?] n 

Collect scheduler debugging info (SCHED_DEBUG) [Y/n/?] y 

Collect scheduler statistics (SCHEDSTATS) [N/y/?] n 

Collect kernel timers statistics (TIMER_STATS) [N/y/?] n 

Debug object operations (DEBUG_OBJECTS) [N/y/?] n 

Debug slab memory allocations (DEBUG_SLAB) [N/y/?] n 

RT Mutex debugging, deadlock detection (DEBUG_RT_MUTEXES) [N/y/?] n 

Built-in scriptable tester for rt-mutexes (RT_MUTEX_TESTER) [N/y/?] n 

Spinlock and rw-lock debugging: basic checks (DEBUG_SPINLOCK) [N/y/?] n 

Mutex debugging: basic checks (DEBUG_MUTEXES) [N/y/?] n 

Spinlock debugging: sleep-inside-spinlock checking (DEBUG_SPINLOCK_SLEEP) [N/y/?] n 

Locking API boot-time self-tests (DEBUG_LOCKING_API_SELFTESTS) [N/y/?] n 

kobject debugging (DEBUG_KOBJECT) [N/y/?] n 

Compile the kernel with debug info (DEBUG_INFO) [Y/n/?] y 

Debug VM (DEBUG_VM) [N/y/?] n 

Debug the global anon/private NOMMU mapping region tree (DEBUG_NOMMU_REGIONS) [N/y/?] n 

Debug filesystem writers count (DEBUG_WRITECOUNT) [N/y/?] n 

Debug memory initialisation (DEBUG_MEMORY_INIT) [N/y/?] n 

Debug linked list manipulation (DEBUG_LIST) [N/y/?] n 

Debug SG table operations (DEBUG_SG) [N/y/?] n 

Debug notifier call chains (DEBUG_NOTIFIERS) [N/y/?] n 

Delay each boot printk message by N milliseconds (BOOT_PRINTK_DELAY) [N/y/?] n 

torture tests for RCU (RCU_TORTURE_TEST) [N/y/?] n 

Check for stalled CPUs delaying RCU grace periods (RCU_CPU_STALL_DETECTOR) [N/y/?] n 

Self test for the backtrace code (BACKTRACE_SELF_TEST) [N/y/?] n 

Force extended block device numbers and spread them (DEBUG_BLOCK_EXT_DEVT) [N/y/?] n 

Fault-injection framework (FAULT_INJECTION) [N/y/?] n 

Debug page memory allocations (PAGE_POISONING) [N/y/?] n 

# 

# configuration written to .config 

# 

no emulation specific options. 

RUNNING hwselect 

 
--- Please select which CPU you wish to build the kernel against:

 
(1) cpu - Class: altera_nios2 Type: s Version: 7.080910

 
Selection: 1

 
--- Please select a device to execute kernel from:

 
(1) ext_flash

Class: altera_avalon_cfi_flash

Size: 8388608 bytes 

 
(2) onchip_ram_64_kbytes

Class: altera_avalon_onchip_memory2

Size: 65536 bytes

 
(3) ext_ram

Class: altera_nios_dev_kit_stratix_edition_sram2

Size: 1048576 bytes

 
(4) sdram

Class: altera_avalon_new_sdram_controller

Size: 16777216 bytes

 
Selection: 4

 
--- Summary using

 
PTF: /home/sonda/Desktop/f/standard/std_1s40.ptf

CPU: cpu

Program memory to execute from: sdram

 
--- Settings written to /home/sonda/Desktop/nios2-linux/uClinux-dist/linux-2.6.x/arch/nios2/hardware.mk

 
make[3]: quittant le répertoire « /home/sonda/Desktop/nios2-linux/linux-2.6 »

make[2]: quittant le répertoire « /home/sonda/Desktop/nios2-linux/uClinux-dist/vendors/Altera/nios2 »

make[1]: quittant le répertoire « /home/sonda/Desktop/nios2-linux/uClinux-dist/vendors »

----------------------------------------------------------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------------------------------------------------

 
Regards,

--- En date de : Dim 28.3.10, Patrice Kadionik <kadionik@domain.hidca.fr> a écrit :

De: Patrice Kadionik <kadionik@domain.hid>
Objet: Re: [Xenomai-help] Problem to cross-compile Xenomai user-space support
À: "Chtourou Sonda" <chtourou_sonda@domain.hid>
Cc: xenomai@xenomai.org
Date: Dimanche 28 mars 2010, 13h26





  
Le 20:59, Chtourou Sonda a écrit :

  
  
  
  Dears, 

  
  
  

Hi,




  
  
  

   
  I built the uClinux kernel for NIOS
II and it run well on the target board. I followed the typical actions
available here : http://www.nioswiki.com/ 

  

Now, I want to add a co-scheduler xenomai to the kernel (uclinux) to
reduce its latency. I followed these steps:
(http://www.xenomai.org/documentation/xenomai-2.5/README.INSTALL)

  
  
  

I've tried to reproduce your compilation error but without success.



For using Xenomai on NIOS II processor with uClinux, you must add extra
hardware in your SoPC design as explained in this tutorial
(http://uuu.enseirb.fr/~kadionik/nios2-xenomai/Xenomai%20on%20NIOS%20II%20Softcore%20Processor%20Guide-v1.1.pdf).



It is OK on my Altera 1S10 board  with Xenomai v2.5.1 (see traces).



Sincerely;



Patrice

========================================



Uncompressing Linux... Ok, booting the kernel.                

Linux version 2.6.30 (kadionik@domain.hid) (gcc version 3.4.6) #4 PREEMPT
Sun Mar 0

                                                                               


                                                                               


uClinux/Nios
II                                                                 

Built 1 zonelists in Zone order, mobility grouping off.  Total pages:
4064      

Kernel command
line:                                                            

NR_IRQS:32                                                                     


PID hash table entries: 64 (order: 6, 256
bytes)                                

I-pipe 1.1-00: pipeline
enabled.                                                

Dentry cache hash table entries: 2048 (order: 1, 8192
bytes)                    

Inode-cache hash table entries: 1024 (order: 0, 4096
bytes)                     

Memory available: 12108k/3990k RAM, 0k/0k ROM (1931k kernel code, 2059k
data)   

Calibrating delay loop... 24.06 BogoMIPS
(lpj=120320)                           

Mount-cache hash table entries:
512                                             

net_namespace: 264
bytes                                                        

NET: Registered protocol family
16                                              

init_BSP(): registering device
resources                                        

bio: create slab <bio-0> at
0                                                   

NET: Registered protocol family
2                                               

IP route cache hash table entries: 1024 (order: 0, 4096
bytes)                  

TCP established hash table entries: 512 (order: 0, 4096
bytes)                  

TCP bind hash table entries: 512 (order: -1, 2048
bytes)                        

TCP: Hash tables configured (established 512 bind
512)                          

TCP reno
registered                                                             

NET: Registered protocol family
1                                               

I-pipe: Domain Xenomai
registered.                                              

Xenomai: hal/nios2
started.                                                     

Xenomai: scheduling class idle
registered.                                      

Xenomai: scheduling class rt
registered.                                        

Xenomai: real-time nucleus v2.5.1 (Speed Of Light)
loaded.                      

Xenomai: starting native API
services.                                          

Xenomai: starting POSIX
services.                                               

Xenomai: starting RTDM
services.                                                

io scheduler noop
registered                                                    

io scheduler deadline registered
(default)                                      

ttyS0 at MMIO 0x810840 (irq = 5) is a Altera
UART                               

console [ttyS0] enabled          










  
  
  $
$xenomai-2.5.1/scripts/prepare-kernel.sh --arch=nios2
--adeos=$xenomai-2.5.1/ksrc/arch/nios2/patches/adeos-ipipe-2.6.30-nios2-1.1-00.patch

  --linux=$linux_tree

$ $xenomai-2.5.1/configure --host=nios2-linux

$ make install DESTDIR=$uClinux-dist/romfs

  

But, in this step, I got this error:

  

eck_vdso-check-vdso.o ../../skins/native/libnative.la -lpthread -lm

libtool: link: ../../../scripts/wrap-link.sh nios2-linux-gcc
-Wl,-elf2flt -o check-vdso check_vdso-check-vdso.o 
../../skins/native/.libs/libnative.a -lpthread -lm

check-vdso.elf2flt(.text+0x16c): In function `main':

: undefined reference to `xeno_sem_heap'

check-vdso.elf2flt(.text+0x170): In function `main':

: undefined reference to `xeno_sem_heap'

collect2: ld returned 1 exit status

make[3]: *** [check-vdso] Erreur 1

make[3]: quittant le répertoire «
/home/sonda/Desktop/xenomai-2.5.1/src/testsuite/unit »

make[2]: *** [all-recursive] Erreur 1

make[2]: quittant le répertoire «
/home/sonda/Desktop/xenomai-2.5.1/src/testsuite »

make[1]: *** [all-recursive] Erreur 1

make[1]: quittant le répertoire « /home/sonda/Desktop/xenomai-2.5.1/src
»

make: *** [all-recursive] Erreur 1

  

what can I do? Please help
   Regards, 
  
  
  

  
_______________________________________________
Xenomai-help mailing list
Xenomai-help@domain.hid
https://mail.gna.org/listinfo/xenomai-help
  





-- 
Patrice Kadionik. F6KQH / F4CUQ
-----------

+----------------------------------------------------------------------+
+"Tout doit etre aussi simple que possible, pas seulement plus simple" +
+----------------------------------------------------------------------+
+ Patrice Kadionik             http://www.enseirb-matmeca.fr/~kadionik +
+ IMS Laboratory               http://www.ims-bordeaux.fr/             +
+ ENSEIRB-MATMECA              http://www.enseirb-matmeca.fr           +
+ PO BOX 99                    fax   : +33 5.56.37.20.23               +
+ 33402 TALENCE Cedex          voice : +33 5.56.84.23.47               +
+ FRANCE                       mailto:patrice.kadionik@domain.hid +
+----------------------------------------------------------------------+

 



      

[-- Attachment #1.2: Type: text/html, Size: 37864 bytes --]

[-- Attachment #2: figure1.png --]
[-- Type: image/png, Size: 101867 bytes --]

[-- Attachment #3: figure2.png --]
[-- Type: image/png, Size: 102112 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2010-04-01 10:49 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-25 20:24 [Xenomai-help] Problem to cross-compile Xenomai user-space support Chtourou Sonda
2010-03-28 13:26 ` Patrice Kadionik
2010-03-29 22:20   ` Huan Fang
2010-03-29 22:23     ` Gilles Chanteperdrix
2010-03-30  9:05       ` Patrice Kadionik
2010-03-30  9:14         ` Gilles Chanteperdrix
2010-03-30  9:40           ` Patrice Kadionik
2010-03-30  9:40         ` Gilles Chanteperdrix
2010-03-30  9:46           ` Patrice Kadionik
2010-03-30 10:46             ` Gilles Chanteperdrix
2010-03-30 15:00               ` Patrice Kadionik
2010-03-30  8:37     ` Patrice Kadionik
2010-03-30 17:37       ` Huan Fang
2010-03-30 17:48         ` Patrice Kadionik
2010-03-30 15:40 Chtourou Sonda
2010-03-30 16:45 ` Patrice Kadionik
2010-03-31 10:55 Chtourou Sonda
2010-04-01 10:49 ` Patrice Kadionik

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.