logo.png

Pres-requis

Compilation croisée

GPIO

Démon Tcp

Home Up


Contents



1 Introduction

Grâce à la carte de développement nous pouvons nous interfacer avec le module ARM. Cet interfaçage requiert d'installer des logiciels côté client. Nous verrons ici lesquels et comment les configurer.


2 Serveur TFTP

Le serveurs TFTP dans un premier temps utilisé pour transférer les images du noyau et du système de fichier racine. Ensuite, il reste le meilleur moyen pour uploader de gros fichiers, comme par exemple les binaires à tester.

# apt-get install tftpd
# mkdir  /tftpboot
# chown nroche. /tftpboot
# ln -s /tftpboot /src/tftp

Le serveur est lancé via INETD. Cf /etc/inetd.conf.

#:BOOT: TFTP service is provided primarily for booting.  Most sites
#       run this only on machines acting as "boot servers."
tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /srv/tftp


3 Serveur DHCP

En fin de compte on peut se passer du serveur de nom si l'on inscrit en dur une adresse IP sur la carte via par exemple la liaison série.

# apt-get install dhcp3-server

/etc/dhcp3/dhcpd.conf

#option domain-name "example.org";
#option domain-name-servers ns1.example.org, ns2.example.org;

subnet 192.168.1.0 netmask 255.255.255.0 { 
         range 192.168.1.2 192.168.1.2;                              
}


4 Terminal Série

Avant que la liaison ETHERNET soit d'aplomb, on devra utiliser la liaison série pour se connecter à la carte. Voici comment paramétrer la liaison série.

# apt-get install gtkterm minicom ckermit lrzsz
# adduser nroche dialoput

Les modems sont en mode compressés d'habitude et donc il faut configurer minicom en protocole ASCII.

$ minicom -s

  • Configuration du port série
    Port série : /dev/ttyS0
    Emplacement du fichier de verrouillage: /var/lock
    Programme d'appel intérieur:  
    Programme d'appel extérieur:  
    Débit/Parité/Bits: 115200 8N1
    Contrôle de flux matériel: Non
    Contrôle de flux logiciel: Non

  • Modem et appel
    Chaîne d'initialisation.. (effacé)
    Chaîne de remise à zéro.. (effacé)

  • Enregistrer config. sous dfl

L'utilisateur normal peut dès lors utiliser minicom :

$ minicom

Les commandes importantes sont :

CTRL A - Q quitter
CTRL A - O configuration
CTRL A - S envoyer un fichier


5 Connexion série

Reliez le port série du poste client au port UART DBG au moyen d'un câble série croisé (dit femelle - femelle). Positionnez les Jumpers bleu Jmp9 et Jmp10 afin de connecter le port série UART DBG. Retirez le jumper rouge Jmp11.

Bienvenue avec minicom 2.3

OPTIONS: I18n 
Compilé le Feb 24 2008, 16:35:15.
Port /dev/ttyS0

               Tapez CTRL-A Z pour voir l'aide concernant les touches spéciales


U-Boot 1.2.0 (Mar 21 2008 - 14:15:56)

DRAM:  32 MB
Flash:  8 MB
In:    serial
Out:   serial
Err:   serial
Press SPACE to abort autoboot in 1 seconds
## Booting image at 10040000 ...
   Image Name:   Linux-2.6.22.1
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1396708 Bytes =  1.3 MB
   Load Address: 20008000                                                       
   Entry Point:  20008000                                                       
   Verifying Checksum ... OK                                                    
OK                                                                              
                                                                                
Starting kernel ...                                                             
                                                                                
Uncompressing Linux.......................................................... \
-->   .................................. done, booting the kernel.
Linux version 2.6.22.1 (eukrea@lpnlp227) (gcc version 4.1.2) #1 PREEMPT \
-->  Fri Mar 21 14:19:32 CET 2008
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
Machine: EUKREA AT91RM9200 SBC
Memory policy: ECC disabled, Data cache writeback
Clocks: CPU 179 MHz, master 59 MHz, main 18.432 MHz
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
CPU0: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
Built 1 zonelists.  Total pages: 8128
Kernel command line: root=/dev/mtdblock2 rootfstype=jffs2 console=ttyS0,115200 \
-->  mtdparts=physmap-flash.0:256k(u-boot),1408k(kernel),-(rootfs) mem=32M
AT91: 96 gpio irqs in 3 banks
PID hash table entries: 128 (order: 7, 512 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 32MB = 32MB total
Memory: 29480KB available (2612K code, 235K data, 116K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
JFFS2 version 2.2. (NAND) ?? 2001-2006 Red Hat, Inc.
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
AT91 Watchdog Timer enabled (5 seconds, nowayout)
atmel_usart.0: ttyS0 at MMIO 0xfefff200 (irq = 1) is a ATMEL_SERIAL
atmel_usart.1: ttyS1 at MMIO 0xfffc0000 (irq = 6) is a ATMEL_SERIAL
atmel_usart.2: ttyS2 at MMIO 0xfffc4000 (irq = 7) is a ATMEL_SERIAL
atmel_usart.3: ttyS3 at MMIO 0xfffc8000 (irq = 8) is a ATMEL_SERIAL
atmel_usart.4: ttyS4 at MMIO 0xfffcc000 (irq = 9) is a ATMEL_SERIAL
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
loop: module loaded
nbd: registered device at major 43
at91_ether: Your bootloader did not configure a MAC address.
eth0: Link down.
eth0: AT91 ethernet at 0xfefbc000 int=24 10-HalfDuplex (00:00:00:00:00:00)
eth0: Micrel KS8721 PHY
physmap platform flash device: 01000000 at 10000000
physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank
 Intel/Sharp Extended Query Table at 0x0031
Using buffer write method
cfi_cmdset_0001: Erase suspend on write enabled
3 cmdlinepart partitions found on MTD device physmap-flash.0
Creating 3 MTD partitions on "physmap-flash.0":
0x00000000-0x00040000 : "u-boot"
0x00040000-0x001a0000 : "kernel"
0x001a0000-0x00800000 : "rootfs"
Generic platform RAM MTD, (c) 2004 Simtec Electronics
mtd-ram mtd-ram.0: registered mtd device
atmel_spi atmel_spi.0: Atmel SPI Controller at 0xfffe0000 (irq 13)
at91_ohci at91_ohci: AT91 OHCI
at91_ohci at91_ohci: new USB bus registered, assigned bus number 1
at91_ohci at91_ohci: irq 23, io mem 0x00300000
usb usb1: Product: AT91 OHCI
usb usb1: Manufacturer: Linux 2.6.22.1 ohci_hcd
usb usb1: SerialNumber: at91
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
Initializing USB Mass Storage driver...
      usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
udc: at91_udc version 3 May 2006
ether gadget: using random self ethernet address
ether gadget: using random host ethernet address
usb0: Ethernet Gadget, version: May Day 2005
usb0: using at91_udc, OUT ep2 IN ep1 STATUS ep4
usb0: MAC 12:c3:b9:85:2d:cf
usb0: HOST MAC 3a:78:c7:96:c2:7e
usb0: RNDIS ready
mice: PS/2 mouse device common for all mice
at91_rtc at91_rtc: rtc core: registered at91_rtc as rtc0
AT91 Real Time Clock driver.
i2c /dev entries driver
at91_i2c at91_i2c: AT91 i2c bus driver.
AT91 MMC: 4 wire bus mode not supported - using 1 wire
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
at91_rtc at91_rtc: setting the system clock to 1998-01-01 00:00:05 (883612805)
VFS: Mounted root (jffs2 filesystem).
Freeing init memory: 116K
eth0: Setting MAC address to 4e:a0:7f:c0:7d:72
var/
var/lib/
var/log/
var/run/
var/tmp/
var/lock/
Starting network...
eth0: Link down.
Starting dropbear sshd: OK
Starting telnet server: OK

CPUAT91 - v2.0 - 2007-06
HESS-2 LED System CPU - LPNHE Paris -
http://www.eukrea.com/ - contact@eukrea.com

 login:

Nous sommes dès à présent en possession d'un véritable LINUX FROM SCRATCH. Nul besoin à priori de lui changer quoi que ce soit. Si néanmoins c'était le cas, nous verrons comment réinstaller net OS dans la partie suivante.

Remarque: le système de fichier est monté en lecture/écriture sauf pour les répertoires au contenus volatiles comme /var/ afin de ne pas 'user' la mémoire FLASH.

Home Up

This document is also available in PDF and PostScript format.



2016-02-15