================================= kernel with adeos + Xenomai 2.5.x ================================= Checklist of procedure described in: software/Instalação do Xenomai-2.5.x.pdf Remark: kernel with adeos + Xenomai 2.5.x can be installed in a virtual machine however Real Time is not ensured. Some programs that use the real time API may work, but not in real time. #1 Download installation files: ================================= copy from ("tutoria electrónica STR"/software): http://tutoria.ualg.pt/moodle2011/course/view.php?id=140082984 to local dir /usr/src: kernel-2.6.35.7-adeos/linux-image-2.6.35.7-adeos_2.6.35.7-adeos-10.00.Custom_i386.deb kernel-2.6.35.7-adeos/linux-headers-2.6.35.7-adeos_2.6.35.7-adeos-10.00.Custom_i386.deb xenomai-2.5.5.2.tar.bz2 Note: Since in some PCs a kernel with enabled ACPI (advanced configuration and power interface) support may not boot this kernel image and headers have ACPI support disabled. #2 Install kernel with patch adeos ================================== cd /usr/src dpkg –i linux-image-2.6.35.7-adeos_2.6.35.7-adeos-10.00.Custom_i386.deb dpkg –i linux-headers-2.6.35.7-adeos_2.6.35.7-adeos-10.00.Custom_i386.deb ln -s /usr/src/linux-headers-2.6.35.7-adeos /lib/modules/2.6.35.7-adeos/build If using grub bootloader, check if there is an entry like the one below in /boot/grub/menu.lst (if not add it and save the file): title Debian GNU/Linux, kernel 2.6.35.7-adeos root (hd0,0) kernel /boot/vmlinuz-2.6.35.7-adeos root=/dev/sda1 ro initrd /boot/initrd.img-2.6.35.7-adeos savedefault Note: On 3rd line root=/dev/sda1 is the root device. If unsure check which is in another entry of this file. If using grub2 edit file: /boot/grub2/grub.cfg (Note: this file can be over wrriten by "update-grub" command) menuentry "Debian GNU/Linux, kernel 2.6.35.7-adeos" { set root=(hd0,1) linux /boot/vmlinuz-2.6.35.7-adeos root=/dev/sda1 ro initrd /boot/initrd.img-2.6.35.7-adeos } Note: on grub2 partitions are one based (not 0 based as in grub) so /dev/sda1 is set in 2nd line as: set root=(hd0,1) ======================== reboot into adeos kernel ======================== After reboot check if Adeos I-pipe was properly integrated in the kernel with: dmesg | grep -i I-pipe I-pipe: 2.7-04:pipeline enabled I-pipe: Domain Xenomai registered I-pipe: Domain IShield registered (If Interrupt Shield installed) and also: cat /proc/ipipe/Linux [...] 533: A.... 544: G...V 545: G...V [Domain info] id=0x00000000 priority=100 Note: If on boot some irq related errors keep appearing (making boot too slow or even impossible), like: ata1.00: failed comand: READ DMA ata1.00: Device rported invalid CHS sector 0 add irqpoll option to grub menu kernel entry, so that kernel and hardware agree which interrupts to use: grub: /boot/grub/menu.lst //... kernel /boot/vmlinuz-2.6.35.7-adeos root=/dev/sda1 ro irqpoll //... grub2: /boot/grub2/grub.cfg (Note: this file can be over wrriten by "update-grub" command) //... linux /boot/vmlinuz-2.6.35.7-adeos root=/dev/sda1 ro irqpoll //... #3 install XENOMAI =================== Pré-requisite: To compile Xenomai source is required: apt-get install g++ cd /usr/src tar xjvf xenomai-2.5.5.2.tar.bz2 cd /usr/src/xenomai-2.5.5.2 ./configure --enable-x86-sep make make install On compile errors see note below, if not edit file /etc/ld.so.conf and add a line at the end: /usr/xenomai/lib and execute: ldconfig Note: If when "making" some error stating that ULONG_MAX or so is not defined, a fix must be issued in file: /usr/src/xenomai-2.5.5.2/src/testsuite/irqbench/irqloop.c edit and add at the top below: #include the following line: #include save and recompile again: make make install #4 Xenomai configuration ======================== edit /etc/profile and add the following lines at the end of file: #Xenomai export PATH=$PATH:/usr/xenomai/bin export MANPATH=$MANPATH:/usr/xenomai/share/man/ Xenomai path, and manpages will be available after next login (or su - ) #5 Xenomai test =============== xeno-info man xeno-load cd /usr/xenomai/share/xenomai/testsuite/latency/; sh run ctrl-C to stop Also a stress test can be issued. However this is not necessary to determine if Xenomai installation is ok. Just to measure system performance in heavy load conditions. ATT: Computer responds very slowly to user commands when this test is running, especially on a virtual machine like vmware: xeno-test ctrl-C to stop When script xeno-test is interrupted it leaves an active process that uses a lot of CPU: ps aux […] root 27152 43.8 0.2 2004 556 pts/1 R 10:21 0:31 dd if /dev/zero of /dev/null […] Process PID==27152 is using 43,8 % of CPU however it does nothing usefull, just copies bytes from somewhere to nowhere dd if /dev/zero of /dev/null In fact it copies endlessly null charcaters (ASCII==0x00), from /dev/zero to the null device (ie. nowhere): /dev/null This is a stress tess: xeno-test perform some system tests why this heavy load process is running, to measure system performance in heavy load conditions. #6 Xenomai docs and API documentation (local copy) ================================================== /share/doc/xenomai /usr/xenomai/share/doc/xenomai/ /usr/xenomai/share/doc/xenomai/html/api/index.html Examples: /usr/src/xenomai-2.5.5.2/examples