43
1 Xenomai – LiveCD X86 et Architecture ARM9 LiveCD X86 Xenomai Xenomai sur architecture ARM9

LiveCD X86 Xenomai Xenomai sur architecture ARM92008.rmll.info/IMG/pdf/florent_audebert.pdf · Xenomai – LiveCD X86 et Architecture ARM9 7 Xenomai Historique Fondation en 2001 –

  • Upload
    others

  • View
    7

  • Download
    0

Embed Size (px)

Citation preview

Page 1: LiveCD X86 Xenomai Xenomai sur architecture ARM92008.rmll.info/IMG/pdf/florent_audebert.pdf · Xenomai – LiveCD X86 et Architecture ARM9 7 Xenomai Historique Fondation en 2001 –

1Xenomai – LiveCD X86 et Architecture ARM9

LiveCD X86 Xenomai

Xenomai sur architecture ARM9

Page 2: LiveCD X86 Xenomai Xenomai sur architecture ARM92008.rmll.info/IMG/pdf/florent_audebert.pdf · Xenomai – LiveCD X86 et Architecture ARM9 7 Xenomai Historique Fondation en 2001 –

2Xenomai – LiveCD X86 et Architecture ARM9

Licence

Copyright (c) 2005-2006 Stelian Pop <[email protected]>

Copyright (c) 2005-2006 Philippe Gerum <[email protected]>

Copyright (c) 2007 Pierre Ficheux <[email protected]>

Copyright (c) 2008 Florent Audebert <[email protected]>

Copyright (c) 2005-2008 Open Wide <www.openwide.fr>

Permission vous est donnée de copier, distribuer et/ou modifier ce document selon les termes de la Licence GNU Free Documentation License, Version 1.1 ou ultérieure publiée par la Free Software Foundation ; sans aucune section inaltérable; sans texte de première page de couverture; sans texte de dernière page de couverture.

Une copie de cette Licence est incluse dans la section appelée GNU Free Documentation License de ce document et peut être consultée à l'adresse www.gnu.org/copyleft/fdl.html.

Page 3: LiveCD X86 Xenomai Xenomai sur architecture ARM92008.rmll.info/IMG/pdf/florent_audebert.pdf · Xenomai – LiveCD X86 et Architecture ARM9 7 Xenomai Historique Fondation en 2001 –

3Xenomai – LiveCD X86 et Architecture ARM9

Sommaire

● Présentation de Xenomai

● LiveCD X86 Xenomai

● Xenomai sur architecture ARM9

Page 4: LiveCD X86 Xenomai Xenomai sur architecture ARM92008.rmll.info/IMG/pdf/florent_audebert.pdf · Xenomai – LiveCD X86 et Architecture ARM9 7 Xenomai Historique Fondation en 2001 –

4Xenomai – LiveCD X86 et Architecture ARM9

Première partie:

Présentation de Xenomai

Page 5: LiveCD X86 Xenomai Xenomai sur architecture ARM92008.rmll.info/IMG/pdf/florent_audebert.pdf · Xenomai – LiveCD X86 et Architecture ARM9 7 Xenomai Historique Fondation en 2001 –

5Xenomai – LiveCD X86 et Architecture ARM9

Sommaire

● Introduction● Historique● Description fonctionnelle● Architecture● Adeos● Domaines d'exécution● Interfaces temps-réel● Outils de mise au point

Page 6: LiveCD X86 Xenomai Xenomai sur architecture ARM92008.rmll.info/IMG/pdf/florent_audebert.pdf · Xenomai – LiveCD X86 et Architecture ARM9 7 Xenomai Historique Fondation en 2001 –

6Xenomai – LiveCD X86 et Architecture ARM9

Introduction

• Xenomai, sous-système temps-réel de Linux– Faible latence

– Espace utilisateur

– RTOS générique + interfaces

– Emulation de RTOS traditionnels

– Complètement intégré à Linux

• Licence GPL (coeur), LGPL (interfaces)

Page 7: LiveCD X86 Xenomai Xenomai sur architecture ARM92008.rmll.info/IMG/pdf/florent_audebert.pdf · Xenomai – LiveCD X86 et Architecture ARM9 7 Xenomai Historique Fondation en 2001 –

7Xenomai – LiveCD X86 et Architecture ARM9

XenomaiHistorique

● Fondation en 2001– Xenomai v0.5 – Septembre 2001

– Xenomai v1.1.1 – Décembre 2002● Intégration à RTAI en 2003

– RTAI/fusion v0.1 – Juin 2004● Indépendance reprise en 2005

– Xenomai v2.0 – Octobre 2005 (base RTAI/fusion v0.9.1)

– Xenomai v2.1 – Mars 2006

– Xenomai v2.2 – Juillet 2006

– Xenomai v2.3 – Décembre 2006

– Xenomai v2.4 – Décembre 2007

Page 8: LiveCD X86 Xenomai Xenomai sur architecture ARM92008.rmll.info/IMG/pdf/florent_audebert.pdf · Xenomai – LiveCD X86 et Architecture ARM9 7 Xenomai Historique Fondation en 2001 –

8Xenomai – LiveCD X86 et Architecture ARM9

XenomaiDescription fonctionnelle (1/3)

● Adaptabilité– coeur de RTOS générique

– spécialisation d'interfaces ou skins● Intégration Linux forte

– sous-système noyau● Multi plates-formes

– arm, blackfin, i386, ia64, powerpc32, powerpc64

– simulateur● Modèle de programmation

– espace noyau

– espace utilisateur standard

Page 9: LiveCD X86 Xenomai Xenomai sur architecture ARM92008.rmll.info/IMG/pdf/florent_audebert.pdf · Xenomai – LiveCD X86 et Architecture ARM9 7 Xenomai Historique Fondation en 2001 –

9Xenomai – LiveCD X86 et Architecture ARM9

XenomaiDescription fonctionnelle (2/3)

Hardware

VFS/FS ...

Pile réseau Xenomai RTOS

Adeos I-Pipe

Noyau

Code applicatif VxWorks

glibcXenomailibvxworks

Code applicatif POSIX

Xenomailibpthread

Appels système

glibc

Page 10: LiveCD X86 Xenomai Xenomai sur architecture ARM92008.rmll.info/IMG/pdf/florent_audebert.pdf · Xenomai – LiveCD X86 et Architecture ARM9 7 Xenomai Historique Fondation en 2001 –

10Xenomai – LiveCD X86 et Architecture ARM9

XenomaiDescription fonctionnelle (3/3)

Skin POSIXXenomai

Code applicatif VxWorks

Xenomailibvxworks

Code applicatif POSIX

glibc Xenomailibpthread

Nucleus (RTOS générique)

SAL/HAL

Adeos I-Pipe

Skin VXWorks

glibc

Page 11: LiveCD X86 Xenomai Xenomai sur architecture ARM92008.rmll.info/IMG/pdf/florent_audebert.pdf · Xenomai – LiveCD X86 et Architecture ARM9 7 Xenomai Historique Fondation en 2001 –

11Xenomai – LiveCD X86 et Architecture ARM9

XenomaiArchitecture générale (1/2)

Application temps-réel

API temps-réel (skin)

co-noyau Xenomai (nucleus)

Adeos

couche API (POSIX, pSOS+, VRTX, VxWorks, uITRON ...)RTOS générique

SAL/HALAdeos

Dépendances matérielles

Page 12: LiveCD X86 Xenomai Xenomai sur architecture ARM92008.rmll.info/IMG/pdf/florent_audebert.pdf · Xenomai – LiveCD X86 et Architecture ARM9 7 Xenomai Historique Fondation en 2001 –

12Xenomai – LiveCD X86 et Architecture ARM9

XenomaiArchitecture générale (2/2)

● Interfaces temps-réel, ou skins– absence d'API centrale et unique

– spécialisations d'un RTOS générique

– outil de migration● RTOS générique

– objets temps-réel réutilisables● Couches d'abstraction d'architecture hôte

– System Abstraction Layer (SAL)

– Hardware Abstraction Layer (HAL)● Adeos

Page 13: LiveCD X86 Xenomai Xenomai sur architecture ARM92008.rmll.info/IMG/pdf/florent_audebert.pdf · Xenomai – LiveCD X86 et Architecture ARM9 7 Xenomai Historique Fondation en 2001 –

13Xenomai – LiveCD X86 et Architecture ARM9

Adeos (1/2)

● Virtualisation de ressources– interruptions externes et simulées

– exceptions processeur

– appels système● Architecture type pipeline d'événements

– organisation en domaines (Xenomai, Linux...)

– notifications d'événements selon priorité● API générique● Portabilité

– x86, ppc, ppc64, ia64, arm, blackfin

Page 14: LiveCD X86 Xenomai Xenomai sur architecture ARM92008.rmll.info/IMG/pdf/florent_audebert.pdf · Xenomai – LiveCD X86 et Architecture ARM9 7 Xenomai Historique Fondation en 2001 –

14Xenomai – LiveCD X86 et Architecture ARM9

Adeos (2/2)

DomaineXenomai

...Domaine racine

Pipeline ADEOS

noyauLinux

IRQ,Traps

Page 15: LiveCD X86 Xenomai Xenomai sur architecture ARM92008.rmll.info/IMG/pdf/florent_audebert.pdf · Xenomai – LiveCD X86 et Architecture ARM9 7 Xenomai Historique Fondation en 2001 –

15Xenomai – LiveCD X86 et Architecture ARM9

XenomaiDomaines d'exécution (1/3)

● Dualité d’ordonnancement– Domaine Xenomai, déterministe

– Domaine Linux, non déterministe● Exécution d'une tâche temps-réel

– Mode primaire (domaine Xenomai)

– Mode secondaire (domaine Linux)● Migration de modes

– Automatique sur appels système

Page 16: LiveCD X86 Xenomai Xenomai sur architecture ARM92008.rmll.info/IMG/pdf/florent_audebert.pdf · Xenomai – LiveCD X86 et Architecture ARM9 7 Xenomai Historique Fondation en 2001 –

16Xenomai – LiveCD X86 et Architecture ARM9

XenomaiDomaines d'exécution (2/3)

Virtualisation d'interruptions (Adeos)

Domaine Xenomai (co-noyau)

Sources d'interruptions

Domaine Linux (noyau standard)

Contrôlemasque IRQ

Applications TRespace utilisateur

Page 17: LiveCD X86 Xenomai Xenomai sur architecture ARM92008.rmll.info/IMG/pdf/florent_audebert.pdf · Xenomai – LiveCD X86 et Architecture ARM9 7 Xenomai Historique Fondation en 2001 –

17Xenomai – LiveCD X86 et Architecture ARM9

XenomaiDomaines d'exécution (3/3)

Appel système Linux (glibc)

Appel système Xenomai (skins)

Migration d'appel système

Exécution tâche temps-réel

DomaineLinux

DomaineXenomai

Page 18: LiveCD X86 Xenomai Xenomai sur architecture ARM92008.rmll.info/IMG/pdf/florent_audebert.pdf · Xenomai – LiveCD X86 et Architecture ARM9 7 Xenomai Historique Fondation en 2001 –

18Xenomai – LiveCD X86 et Architecture ARM9

XenomaiInterfaces temps-réel (1/2)

● Personnalités temps-réel– native

– posix

– psos+

– rtai

– uitron

– vrtx

– vxworks● API pour pilotes temps-réel de périphériques

– rtdm

Page 19: LiveCD X86 Xenomai Xenomai sur architecture ARM92008.rmll.info/IMG/pdf/florent_audebert.pdf · Xenomai – LiveCD X86 et Architecture ARM9 7 Xenomai Historique Fondation en 2001 –

19Xenomai – LiveCD X86 et Architecture ARM9

XenomaiInterfaces temps-réel (2/2)

Adeos

HAL

Real­time nucleus

Native ...RTDM pSOSPOSIX

Applications en espace utilisateur

Applications en espace noyau

Interface syscall

Adeos

SAL/HAL

RTOS générique (nucleus)

VxWorks

Page 20: LiveCD X86 Xenomai Xenomai sur architecture ARM92008.rmll.info/IMG/pdf/florent_audebert.pdf · Xenomai – LiveCD X86 et Architecture ARM9 7 Xenomai Historique Fondation en 2001 –

20Xenomai – LiveCD X86 et Architecture ARM9

XenomaiOutils de mise au point

● Watchdog

● Interface /proc/xenomai

● GDB

● Simulateur Xenomai

● Traceur I-Pipe

● KGDB

Page 21: LiveCD X86 Xenomai Xenomai sur architecture ARM92008.rmll.info/IMG/pdf/florent_audebert.pdf · Xenomai – LiveCD X86 et Architecture ARM9 7 Xenomai Historique Fondation en 2001 –

21Xenomai – LiveCD X86 et Architecture ARM9

Liens & Documentation

● Xenomaihttp://www.xenomai.org

● Adeoshttp://home.gna.org/adeos/

● Interactions entre Adeos et Xenomaihttp://www.xenomai.org/documentation/branches/v2.3.x/pdf/Life-with-Adeos-rev-B.pdf

● Manifeste du projet Xenomaihttp://www.xenomai.org/documentation/branches/v2.3.x/pdf/xenomai.pdf

● Racine de documentation des interfaceshttp://www.xenomai.org/documentation/trunk/html/api/index.html

● Spécification POSIX de référence pour Xenomaihttp://www.opengroup.org/onlinepubs/009695399/

Page 22: LiveCD X86 Xenomai Xenomai sur architecture ARM92008.rmll.info/IMG/pdf/florent_audebert.pdf · Xenomai – LiveCD X86 et Architecture ARM9 7 Xenomai Historique Fondation en 2001 –

22Xenomai – LiveCD X86 et Architecture ARM9

Deuxième partie:

LiveCD X86 Xenomai

Page 23: LiveCD X86 Xenomai Xenomai sur architecture ARM92008.rmll.info/IMG/pdf/florent_audebert.pdf · Xenomai – LiveCD X86 et Architecture ARM9 7 Xenomai Historique Fondation en 2001 –

23Xenomai – LiveCD X86 et Architecture ARM9

● Objectifs● Fonctionnement général● Étapes de création de l'image bootable

● Linux : initramfs● BusyBox : init et mdev● Création de l'image bootable● Tests

● Liens et documentation

Sommaire

Page 24: LiveCD X86 Xenomai Xenomai sur architecture ARM92008.rmll.info/IMG/pdf/florent_audebert.pdf · Xenomai – LiveCD X86 et Architecture ARM9 7 Xenomai Historique Fondation en 2001 –

24Xenomai – LiveCD X86 et Architecture ARM9

Objectifs

● Outil de démonstration simple

● Vérification du fonctionnement de Xenomai

● Évaluation des performances de Xenomai sur une machine (latence, ...)

Page 25: LiveCD X86 Xenomai Xenomai sur architecture ARM92008.rmll.info/IMG/pdf/florent_audebert.pdf · Xenomai – LiveCD X86 et Architecture ARM9 7 Xenomai Historique Fondation en 2001 –

25Xenomai – LiveCD X86 et Architecture ARM9

Fonctionnement général

● Noyau Linux minimaliste– Pas d'affichage graphique évolué (console)

– Pas besoin de gérer les disques dur (initramfs)

– ...

● Distribution basée sur BusyBox

● Procédure de boot simple : pas de détection de matériel nécessaire (init fourni par BusyBox)

Page 26: LiveCD X86 Xenomai Xenomai sur architecture ARM92008.rmll.info/IMG/pdf/florent_audebert.pdf · Xenomai – LiveCD X86 et Architecture ARM9 7 Xenomai Historique Fondation en 2001 –

26Xenomai – LiveCD X86 et Architecture ARM9

Étapes de création de l'image bootable

● Patch, configuration et compilation du noyau

● Préparation du rootfs de la distribution– Compilation et installation de Xenomai & BusyBox

– Copie des bibliothèques dynamiques

● Création d'une archive contenant le rootfs

● Création de l'image ISO (Noyau Linux + GRUB + initramfs_data.gz)

Page 27: LiveCD X86 Xenomai Xenomai sur architecture ARM92008.rmll.info/IMG/pdf/florent_audebert.pdf · Xenomai – LiveCD X86 et Architecture ARM9 7 Xenomai Historique Fondation en 2001 –

27Xenomai – LiveCD X86 et Architecture ARM9

Linux> initramfs

● Dans tout les noyaux de la branche 2.6– Rootfs monté en mémoire vive (/)

– Basé sur tmpfs (ou ramfs)● Décompression d'une archive cpio dans ce rootfs● Si /init existe il est exécuté

● Possibilité de stocker l'intégralité du système dans cette archive

● Création de l'archive cpio compressée en gzip

cd rootfs && find . | cpio -o -H newc | gzip > ../initramfs.gz

Page 28: LiveCD X86 Xenomai Xenomai sur architecture ARM92008.rmll.info/IMG/pdf/florent_audebert.pdf · Xenomai – LiveCD X86 et Architecture ARM9 7 Xenomai Historique Fondation en 2001 –

28Xenomai – LiveCD X86 et Architecture ARM9

BusyBox> init et mdev

● Utilisation /sbin/init fourni par BusyBox● Nécessite un /dev valide

● /init monte et rempli /dev...

#! /bin/sh/bin/mount -t sysfs sysfs /sys/sbin/mdev -s/bin/mkdir /dev/ptsexec /sbin/init

● ... avant de donner la main à /sbin/init de BusyBox

Page 29: LiveCD X86 Xenomai Xenomai sur architecture ARM92008.rmll.info/IMG/pdf/florent_audebert.pdf · Xenomai – LiveCD X86 et Architecture ARM9 7 Xenomai Historique Fondation en 2001 –

29Xenomai – LiveCD X86 et Architecture ARM9

GNU GRUB

● Utilisation de GNU GRUB comme bootloader

● Fichier de configuration xenolive/boot/grub/menu.lst

default 0timeout 5title Xenomai 2.4.x (2.6.x-adeos)kernel (cd)/boot/vmlinuz-2.6.x-adeos rwinitrd (cd)/boot/initramfs_data.gz

● Utilisation du stage2_eltorito

cp /usr/lib/grub/i386-pc/stage2_eltorito \xenolive/boot/grub

Page 30: LiveCD X86 Xenomai Xenomai sur architecture ARM92008.rmll.info/IMG/pdf/florent_audebert.pdf · Xenomai – LiveCD X86 et Architecture ARM9 7 Xenomai Historique Fondation en 2001 –

30Xenomai – LiveCD X86 et Architecture ARM9

Création de l'image bootable

● Génération de l'image bootable ISO 9660

mkisofs -R -b boot/grub/stage2_eltorito \-no-emul-boot -boot-load-size 4 \-boot-info-table -o xenolive.iso xenolive

Page 31: LiveCD X86 Xenomai Xenomai sur architecture ARM92008.rmll.info/IMG/pdf/florent_audebert.pdf · Xenomai – LiveCD X86 et Architecture ARM9 7 Xenomai Historique Fondation en 2001 –

31Xenomai – LiveCD X86 et Architecture ARM9

Tests

● Possibilité de tester avec QEMU– Fabrice Bellard

– http://bellard.org/qemu/

– Simulateur de processeurs / machines

– Pas de comportement temps-réel– qemu -boot d -cdrom xenolive.iso

● Boot réel après gravure sur CD

Page 32: LiveCD X86 Xenomai Xenomai sur architecture ARM92008.rmll.info/IMG/pdf/florent_audebert.pdf · Xenomai – LiveCD X86 et Architecture ARM9 7 Xenomai Historique Fondation en 2001 –

32Xenomai – LiveCD X86 et Architecture ARM9

Liens & Documentation

● Documentation du noyau sur initramfslinux-2.6.25/Documentation/filesystems/ramfs-rootfs-initramfs.txt

● CD bootable avec GNU GRUBhttp://www.gnu.org/software/grub/manual/html_node/Making-a-GRUB-bootable-CD-ROM.html

● Extension ElTorito de la norme ISO 9660http://en.wikipedia.org/wiki/El_Torito_(CD-ROM_standard)

Page 33: LiveCD X86 Xenomai Xenomai sur architecture ARM92008.rmll.info/IMG/pdf/florent_audebert.pdf · Xenomai – LiveCD X86 et Architecture ARM9 7 Xenomai Historique Fondation en 2001 –

33Xenomai – LiveCD X86 et Architecture ARM9

Troisième partie:

Xenomai sur architecture ARM9

Page 34: LiveCD X86 Xenomai Xenomai sur architecture ARM92008.rmll.info/IMG/pdf/florent_audebert.pdf · Xenomai – LiveCD X86 et Architecture ARM9 7 Xenomai Historique Fondation en 2001 –

34Xenomai – LiveCD X86 et Architecture ARM9

Sommaire

● Présentation du matériel● Construction d'une chaîne de compilation croisée● Compilation du noyau● Compilation de BusyBox● Compilation de Xenomai● Bibliothèques dynamiques et finalisation du rootfs● Configuration réseau (NFS / TFTP)● Configuration de U-Boot● Liens et Documentation

Page 35: LiveCD X86 Xenomai Xenomai sur architecture ARM92008.rmll.info/IMG/pdf/florent_audebert.pdf · Xenomai – LiveCD X86 et Architecture ARM9 7 Xenomai Historique Fondation en 2001 –

35Xenomai – LiveCD X86 et Architecture ARM9

Présentation du matériel

● Carte basée sur un processeur Atmel AT91RM9200

● Ethernet 100 Mbps

● USB Host / Device

● 64 Mo de RAM

● 8 / 16 Mo de flash

● Bootloader : U-Boot

Page 36: LiveCD X86 Xenomai Xenomai sur architecture ARM92008.rmll.info/IMG/pdf/florent_audebert.pdf · Xenomai – LiveCD X86 et Architecture ARM9 7 Xenomai Historique Fondation en 2001 –

36Xenomai – LiveCD X86 et Architecture ARM9

Chaîne de compilation croisée

● Crosstool 0.43 de Dan Kegel

– Nécessite Flex et Bison

– Versions actuelles : gcc 3.4.5 et glibc 2.3.6

– Possibilité d'éditer le script pour choisir d'autres versions

● Test du compilateur

arm-softfloat-linux-gnu-gcc -o hello hello.c

Page 37: LiveCD X86 Xenomai Xenomai sur architecture ARM92008.rmll.info/IMG/pdf/florent_audebert.pdf · Xenomai – LiveCD X86 et Architecture ARM9 7 Xenomai Historique Fondation en 2001 –

37Xenomai – LiveCD X86 et Architecture ARM9

Compilation du noyau

● Noyau Vanilla 2.6.25.x

● Patch noyau 2.6 pour AT91RM9200

● Patch noyau pour notre carte (option à activer lors de la configuration du noyau)

● Xenomai 2.4.4 (Adeos + kernelspace)

./scripts/prepare-kernel.sh –linux=/chemin_noyau/ --arch=arm \--adeos=ksrc/arch/arm/patches/adeos-ipipe-2.6.x-arm-1.8-xx.patch

make ARCH=arm menuconfig

make ARCH=arm CROSS_COMPILE=arm-softfloat-linux-gnu- uImage

Page 38: LiveCD X86 Xenomai Xenomai sur architecture ARM92008.rmll.info/IMG/pdf/florent_audebert.pdf · Xenomai – LiveCD X86 et Architecture ARM9 7 Xenomai Historique Fondation en 2001 –

38Xenomai – LiveCD X86 et Architecture ARM9

Compilation de BusyBox

● BusyBox 1.10.4

● Système de configuration et compilation similaire au noyau

make ARCH=arm menuconfig

make ARCH=arm \CROSS_COMPILE=arm-softfloat-linux-gnu- \CONFIG_PREFIX=/chemin_rootfs/rootfs install

Page 39: LiveCD X86 Xenomai Xenomai sur architecture ARM92008.rmll.info/IMG/pdf/florent_audebert.pdf · Xenomai – LiveCD X86 et Architecture ARM9 7 Xenomai Historique Fondation en 2001 –

39Xenomai – LiveCD X86 et Architecture ARM9

Compilation de Xenomai

● Xenomai 2.4.4

● Bibliothèque et exemples

● Configuration et compilation à l'aide des Autotools

./configure --build=i686-pc-linux-gnu \--host=arm-softfloat-linux-gnu \--enable-arm-mach=at91rm9200

make DESTDIR=/chemin_rootfs/rootfs install

N.B. : Ne pas utiliser --prefix=<chemin>

Page 40: LiveCD X86 Xenomai Xenomai sur architecture ARM92008.rmll.info/IMG/pdf/florent_audebert.pdf · Xenomai – LiveCD X86 et Architecture ARM9 7 Xenomai Historique Fondation en 2001 –

40Xenomai – LiveCD X86 et Architecture ARM9

Bibliothèques dynamiques & RootFS

● Bibliothèques dynamiques

cd /chemin_rootfs/rootfs && mkdir libmklibs --target arm-softfloat-linux-gnu -D \

-L /chemin_crosstool/arm-softfloat-linux-gnu/lib \-L usr/xenomai/lib -d lib bin/* usr/xenomai/bin/*

● Finalisation du rootfs

mkdir /chemin_rootfs/rootfs/devcd /chemin_rootfs/rootfs/dev sudo MAKEDEV -v generic console

Page 41: LiveCD X86 Xenomai Xenomai sur architecture ARM92008.rmll.info/IMG/pdf/florent_audebert.pdf · Xenomai – LiveCD X86 et Architecture ARM9 7 Xenomai Historique Fondation en 2001 –

41Xenomai – LiveCD X86 et Architecture ARM9

Configuration réseau (NFS / TFTP)

● Valider le fonctionnement de nfsd et tftp– portmap actif et lié à la bonne interface

netstat -taupen | grep 111

– Détail sur les connections en cas de problèmetail -f /var/log/syslog

● Configuration du serveur NFS– Ajouter dans /etc/exports :

/chemin_rootfs/rootfs*(rw,no_root_squash,no_all_squash,sync,no_subtree_check)

– Exécuter la commandeexportfs -a

● Copie du noyau dans le répertoire du serveur tftp

Page 42: LiveCD X86 Xenomai Xenomai sur architecture ARM92008.rmll.info/IMG/pdf/florent_audebert.pdf · Xenomai – LiveCD X86 et Architecture ARM9 7 Xenomai Historique Fondation en 2001 –

42Xenomai – LiveCD X86 et Architecture ARM9

Configuration de U-Boot

● Paramètres passés au noyau

set bootargs root=/dev/nfs console=ttyS0,115200 nfsroot=192.168.3.xxx:/chemin_rootfs/rootfsip=192.168.3.250:::255.255.255.0:::off

● Spécification du démarrage par tftp

set bootcmd tftpboot 2000000 uImage

● Démarrage

boot

Page 43: LiveCD X86 Xenomai Xenomai sur architecture ARM92008.rmll.info/IMG/pdf/florent_audebert.pdf · Xenomai – LiveCD X86 et Architecture ARM9 7 Xenomai Historique Fondation en 2001 –

43Xenomai – LiveCD X86 et Architecture ARM9

Liens et Documentation

● Crosstoolhttp://www.kegel.com/crosstool/

● Noyau Linuxhttp://www.kernel.org

● Patch AT91 pour Linux 2.6http://maxim.org.za/at91_26.html

● BusyBoxhttp://busybox.net/

● U-Boot (mkimage)http://www.denx.de/wiki/UBoot/