All of lore.kernel.org
 help / color / mirror / Atom feed
* 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
* 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
* [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

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-30 15:40 [Xenomai-help] Problem to cross-compile Xenomai user-space support Chtourou Sonda
2010-03-30 16:45 ` Patrice Kadionik
  -- strict thread matches above, loose matches on Subject: below --
2010-03-31 10:55 Chtourou Sonda
2010-04-01 10:49 ` Patrice Kadionik
2010-03-25 20:24 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

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.