Le sheevaplug

De MicElectroLinGenMet.

(Retour Accueil ou Liste des articles)

Sommaire

Plug computer

Serveur Linux : Sheevaplug
Boitier miniature sous forme de prise CPL avec un CPU Marvell Kirkwood à 1,2Ghz (Architecture ARM), 512 Mo de Flash ROM et 512Mo de RAM.
Consommation de 5w
Linux Ubuntu installé par defaut.

Connectiques :

  • une prise ou cable pour alimentation 220V Euro,
  • une prise réseau RJ45
  • une prise USB host
  • un slot pour SD card
  • une prise micro USB (pour port console et JTAG)

Voir (http://fr.wikipedia.org/wiki/SheevaPlug).

thimb


Mise en route

Connexion réseau

Adresse obtenu par dhcp:

dan@vesta:~$ ssh root@192.168.0.23
root@192.168.0.23's password: 
Linux debian 2.6.22.18 #1 Thu Mar 19 14:46:22 IST 2009 armv5tejl

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

To access official Ubuntu documentation, please visit:
http://help.ubuntu.com/
Last login: Sun Apr 12 14:25:08 1914

root@debian:~# uname -a
Linux debian 2.6.22.18 #1 Thu Mar 19 14:46:22 IST 2009 armv5tejl GNU/Linux


root@debian:~# cat /proc/cpuinfo 
Processor	: ARM926EJ-S rev 1 (v5l)
BogoMIPS	: 1192.75
Features	: swp half thumb fastmult edsp 
CPU implementer	: 0x56
CPU architecture: 5TE
CPU variant	: 0x2
CPU part	: 0x131
CPU revision	: 1
Cache type	: write-back
Cache clean	: cp15 c7 ops
Cache lockdown	: format C
Cache format	: Harvard
I size		: 16384
I assoc		: 4
I line length	: 32
I sets		: 128
D size		: 16384
D assoc		: 4
D line length	: 32
D sets		: 128

Hardware	: Feroceon-KW
Revision	: 0000
Serial		: 0000000000000000
root@debian:~# df -hP
Filesystem            Size  Used Avail Use% Mounted on
rootfs                507M  148M  360M  29% /
tmpfs                 252M     0  252M   0% /lib/init/rw
varrun                252M   36K  252M   1% /var/run
varlock               252M     0  252M   0% /var/lock
udev                  252M  8.0K  252M   1% /dev
tmpfs                 252M     0  252M   0% /dev/shm
tmpfs                 252M     0  252M   0% /var/cache/apt


Connexion console


  • Connecter le sheevaplug au PC Linux avec le câble USB fourni

Log:

May 14 15:32:17 vesta kernel: [78060.865060] usb 4-2: new full speed USB device using uhci_hcd and address 3
May 14 15:32:18 vesta kernel: [78061.077984] usb 4-2: New USB device found, idVendor=9e88, idProduct=9e8f
May 14 15:32:18 vesta kernel: [78061.077994] usb 4-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
May 14 15:32:18 vesta kernel: [78061.077999] usb 4-2: Product: SheevaPlug JTAGKey FT2232D B
May 14 15:32:18 vesta kernel: [78061.078003] usb 4-2: Manufacturer: FTDI
May 14 15:32:18 vesta kernel: [78061.078007] usb 4-2: SerialNumber: FTT2Z22U
May 14 15:32:18 vesta kernel: [78061.078193] usb 4-2: configuration #1 chosen from 1 choice


  • Installer pilote usb-serial avec ids USB
# modprobe ftdi_sio vendor=0x9e88 product=0x9e8f 

Log:

May 14 15:34:42 vesta kernel: [78205.673914] usbcore: registered new interface driver usbserial
May 14 15:34:42 vesta kernel: [78205.673952] USB Serial support registered for generic
May 14 15:34:42 vesta kernel: [78205.674035] usbcore: registered new interface driver usbserial_generic
May 14 15:34:42 vesta kernel: [78205.674040] usbserial: USB Serial Driver core
May 14 15:34:42 vesta kernel: [78205.685888] USB Serial support registered for FTDI USB Serial Device
May 14 15:34:42 vesta kernel: [78205.686096] ftdi_sio 4-2:1.0: FTDI USB Serial Device converter detected
May 14 15:34:42 vesta kernel: [78205.686154] usb 4-2: Detected FT2232C
May 14 15:34:42 vesta kernel: [78205.686279] usb 4-2: FTDI USB Serial Device converter now attached to ttyUSB0
May 14 15:34:42 vesta kernel: [78205.686354] ftdi_sio 4-2:1.1: FTDI USB Serial Device converter detected
May 14 15:34:42 vesta kernel: [78205.686392] usb 4-2: Detected FT2232C
May 14 15:34:42 vesta kernel: [78205.686450] usb 4-2: FTDI USB Serial Device converter now attached to ttyUSB1
May 14 15:34:42 vesta kernel: [78205.686477] usbcore: registered new interface driver ftdi_sio
May 14 15:34:42 vesta kernel: [78205.686482] ftdi_sio: v1.4.3:USB FTDI Serial Converters Driver


  • Lancer la connexion série

Il faut utiliser le deuxième port découvert !

# picocom -b 115200 -d 8 -f n -p n /dev/ttyUSB1


  • Boot et arrèt sur u-boot

Il faut appuyer une touche au message "Hit any key to stop autoboot" pour arréter sur u-boot.

         __  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_ 
| | | |___|  _ \ / _ \ / _ \| __| 
| |_| |___| |_) | (_) | (_) | |_ 
 \___/    |____/ \___/ \___/ \__| 
 ** MARVELL BOARD: SHEEVA PLUG LE 

U-Boot 1.1.4 (Mar 19 2009 - 16:06:59) Marvell version: 3.4.16

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CEE80

Soc: 88F6281 A0 (DDR2)
CPU running @ 1200Mhz L2 running @ 400Mhz
SysClock = 400Mhz , TClock = 200Mhz 

DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6
DRAM CS[0] base 0x00000000   size 256MB 
DRAM CS[1] base 0x10000000   size 256MB 
DRAM Total size 512MB  16bit width
Flash:  0 kB
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:512 MB

CPU : Marvell Feroceon (Rev 1)

Streaming disabled 
Write allocate disabled

USB 0: host mode
PEX 0: interface detected no Link.
Net:   egiga0 [PRIME], egiga1
Hit any key to stop autoboot:  0 
 


  • Quelques commandes u-boot
Marvell>> version
U-Boot 1.1.4 (Mar 19 2009 - 16:06:59) Marvell version: 3.4.16

Marvell>> help
?       - alias for 'help'
base    - print or set address offset
boot    - boot default, i.e., run 'bootcmd'
bootd   - boot default, i.e., run 'bootcmd'
bootext2    dev:boot_part1,boot_part2 addr boot_image linux_dev_name 
bootm   - boot application image from memory
bootp	- boot image via network using BootP/TFTP protocol
bubt	- Burn an image on the Boot Nand Flash.
chpart	- change active partition
cmp     - memory compare
cmpm	- Compare Memory
cp      - memory copy
cpumap - Display CPU memory mapping settings.
crc32   - checksum calculation
date    - get/set/reset date & time
dclk	- Display the MV device CLKs.
dhcp	- invoke DHCP client to obtain IP/boot params
diskboot- boot from IDE device
echo    - echo args to console
eeprom  - EEPROM sub-system
erase   - erase FLASH memory
ext2load- load binary file from a Ext2 filesystem
ext2ls  - list files in a directory (default /)
fatinfo - print information about filesystem
fatload - load binary file from a dos filesystem
fatls   - list files in a directory (default /)
fi	- Find value in the memory.
flinfo  - print FLASH memory information
fsinfo	- print information about filesystems
fsload	- load binary file from a filesystem image
g	- start application at cached address 'addr'(default addr 0x40000)
go      - start application at address 'addr'
help    - print online help
icrc32  - checksum calculation
ide     - IDE sub-system
iloop   - infinite loop on address range
imd     - i2c memory display
iminfo  - print header information for application image
imm[.b, .s, .w, .l]     - i2c memory modify (auto-incrementing)
imw     - memory write (fill)
inm     - memory modify (constant address)
iprobe  - probe to discover valid I2C chip addresses
ir	- reading and changing MV internal register values.
loop    - infinite loop on address range
ls	- list files in a directory (default /)
map	- Diasplay address decode windows
md      - memory display
me	- PCI master enable
mm      - memory modify (auto-incrementing)
mmcinit - init mmc card
mp	- map PCI BAR
mtdparts- define flash/nand partitions
mtest   - simple RAM test
mw      - memory write (fill)
nand    - NAND sub-system
nboot   - boot from NAND device
nbubt	- Burn a boot loader image on the Boot Nand Flash.
nm      - memory modify (constant address)
pci     - list and access PCI Configuration Space
phyRead	- Read PCI-E Phy register
pciePhyWrite	- Write PCI-E Phy register
phyRead	- Read Phy register
phyWrite	- Write Phy register
ping	- send ICMP ECHO_REQUEST to network host
printenv- print environment variables
protect - enable or disable FLASH write protection
rarpboot- boot image via network using RARP/TFTP protocol
rcvr	- Satrt recovery process (Distress Beacon with TFTP server)
reset   - Perform RESET of the CPU
resetenv	- Return all environment variable to default.
run     - run commands in an environment variable
saveenv - save environment variables to persistent storage
se	- PCI Slave enable
setenv  - set environment variables
sflash	- read, write or erase the external SPI Flash.
sg	- scanning the PHYs status
sp	- Scan PCI bus.
switchRegRead	- Read switch register
switchRegWrite	- Write switch register
tftpboot- boot image via network using TFTP protocol
usb     - USB sub-system
usbboot - boot from USB device
version - print monitor version

Marvell>> printenv
baudrate=115200
loads_echo=0
rootpath=/mnt/ARM_FS/
netmask=255.255.0.0
console=console=ttyS0,115200
CASset=min
MALLOC_len=1
ethprime=egiga0
bootargs_root=root=/dev/mtdblock2 ro
ethmtu=1500
usb0Mode=host
nandEcc=1bit
ethact=egiga0
serverip=10.10.0.2
ipaddr=10.10.0.1
cesvcid=ULULULULULULPPULULULULULDA
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x2000000;
mvPhoneConfig=mv_phone_config=dev0:fxs,dev1:fxs
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
yuk_ethaddr=00:00:00:EE:51:81
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
ethaddr=00:50:43:01:50:28
run_diag=no
bootargs=console=ttyS0,115200 mtdparts=nand_mtd:0x400000@0x100000(uImage),0x1fb00000@0x500000(rootfs) rw root=/dev/mtdblock1 rw ip=10.4.50.4:10.4.50.5:10.4.50.5:255.255.255.0:DB88FXX81:eth0:none
bootcmd=nand read.e 0x800000 0x100000 0x400000; bootm 0x800000
stdin=serial
stdout=serial
stderr=serial
mainlineLinux=no
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
bootdelay=3
disaMvPnp=no
enaAutoRecovery=yes

Environment size: 1304/131068 bytes


Installation de Debian

Quitte à le faire tourner sur une distribution de type Debian autant prendre l'original !

Inspiré de la page: http://www.openplug.org/plugwiki/index.php/Debian


Installation sur la mémoire flash (nand)

http://www.openplug.org/plugwiki/index.php/Installing_Debian_To_Flash

Mise à jour de u-boot

Celle-ci est nécessaire si version < 3.4.19 pour gérer correctement l'USB et les cartes SD.
Téléchargé sur http://plugcomputer.org/plugforum/index.php?topic=1134.msg7028#msg7028 => u-boot-3.4.27_patche.bin


  • Vérifiez la version de U-Boot installée sur le SheevaPlug pour découvrir si la mise à jour est nécessaire

Connectez-vous à U-Boot en utilisant la console série et entrez:

Marvell>> version
U-Boot 1.1.4 (Mar 19 2009 - 16:06:59) Marvell version: 3.4.16


  • Mise à jour à partir d'u-boot

Mise à jour avec serveur tftp:
Serveur tftp installé sur un Linux Debian:

# aptitude install tftpd-hpa 
Marvell>> setenv serverip 192.168.0.4
Marvell>> setenv ipaddr 192.168.0.223
Marvell>> bubt u-boot-3.4.27_patche.bin
Using egiga0 device
TFTP from server 192.168.0.4; our IP address is 192.168.0.223
Filename 'u-boot-3.4.27_patche.bin'.
Load address: 0x2000000
Loading: #################################################################
	 ############################
done
Bytes transferred = 474592 (73de0 hex)

**Warning**
If U-Boot Endiannes is going to change (LE->BE or BE->LE), Then Env parameters should be overriden..
Override Env parameters? (y/n) n
Erase 0 - 655360 ... 
Copy to Nand Flash... 
done


  • Vérification au reboot
Marvell>> reset

        __  __                      _ _
       |  \/  | __ _ _ ____   _____| | |
       | |\/| |/ _` | '__\ \ / / _ \ | |
       | |  | | (_| | |   \ V /  __/ | |
       |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_ 
| | | |___|  _ \ / _ \ / _ \| __| 
| |_| |___| |_) | (_) | (_) | |_ 
 \___/    |____/ \___/ \___/ \__| 
 ** MARVELL BOARD: SHEEVA PLUG LE 

U-Boot 1.1.4 (Dec 27 2009 - 22:03:21) Marvell version: 3.4.27

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CFEE0


Flasher un nouveau noyau


Marvell>> setenv serverip 192.168.0.4
Marvell>> setenv ipaddr 192.168.0.223
Marvell>> tftpboot 0x2000000 sheeva-2.6.33.2-uImage
Using egiga0 device
TFTP from server 192.168.0.4; our IP address is 192.168.0.223
Filename 'sheeva-2.6.33.2-uImage'.
Load address: 0x2000000
Loading: #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #########
done
Bytes transferred = 2706200 (294b18 hex)
Marvell>> iminfo

## Checking Image at 02000000 ...
  Image Name:   Linux-2.6.33.2
  Created:      2010-04-02  22:37:20 UTC
  Image Type:   ARM Linux Kernel Image (uncompressed)
  Data Size:    2706136 Bytes =  2.6 MB
  Load Address: 00008000
  Entry Point:  00008000
  Verifying Checksum ... OK
Marvell>> nand erase 0x100000 0x400000

NAND erase: device 0 offset 0x100000, size 0x400000
Erasing at 0x4e0000 -- 100% complete.
OK
Marvell>> nand write 0x2000000 0x100000 0x400000

NAND write: device 0 offset 0x100000, size 0x400000
4194304 bytes written: OK
Marvell>> setenv mainlineLinux yes
Marvell>> setenv arcNumber 2097
Marvell>> saveenv
Saving Environment to NAND...
Erasing Nand...Writing to Nand... done

Marvell>> reset


Lancer l'installateur Debian

Fichiers uImage et uInitrd à télécharger ici (http://people.debian.org/~joeyh/d-i/armel/images/).
Prendre la version dans le répertoire /...DATE.../kirkwood/netboot/marvell/sheevaplug suivant dernière date disponible

Connecter une clef USB, l'installation se fera sur la clef dans un 1ier temps.
Les deux fichiers seront disponibles par tftp.

Marvell>> tftpboot 0x0400000 uImage
Using egiga0 device
TFTP from server 192.168.0.4; our IP address is 192.168.0.223
Filename 'uImage'.
Load address: 0x400000
Loading: #################################################################
 	 #################################################################
 	 #################################################################
 	 #################################################################
 	 ####################
done
Bytes transferred = 1431260 (15d6dc hex)
Marvell>> tftpboot 0x0800000 uInitrd
Using egiga0 device
TFTP from server 192.168.0.4; our IP address is 192.168.0.223
Filename 'uInitrd'.
Load address: 0x800000
Loading: #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 ##########################################################
done
Bytes transferred = 2622675 (2804d3 hex)
Marvell>> setenv bootargs console=ttyS0,115200 base-installer/initramfs-tools/driver-policy=most
Marvell>> bootm 0x0400000 0x0800000
## Booting image at 00400000 ...
   Image Name:   Debian kernel
   Created:      2010-04-28  10:27:54 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1431196 Bytes =  1.4 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 00800000 ...
   Image Name:   debian-installer ramdisk
   Created:      2010-04-28  10:27:55 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    2622611 Bytes =  2.5 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
...

Suivre l'instalation de Debian sur clef USB 4Go comme dans une installation classique.


Booter sur la clef installée

Marvell>>  setenv bootargs=console=ttyS0,115200 mtdparts=nand_mtd:0xa0000@0x0(u-boot),0x400000@0x100000(uImage),0x1fb00000@0x500000(rootfs) root=/dev/sda2 rootwait rw

Marvell>> boot

Debian GNU/Linux squeeze/sid sheeva ttyS0
sheeva login: 


  • Installer utilitaires pour gérer la mémoire flash
root@sheeva:~# apt-get install mtd-utils
root@sheeva:~# ln -fs /proc/mounts /etc/mtab


  • Convertir la partition root de la flash en UBIFS
root@sheeva:~# ubiformat /dev/mtd2 -s 512
root@sheeva:~# ubiattach /dev/ubi_ctrl -m 2 
  
root@sheeva:~# ubimkvol /dev/ubi0 -N rootfs -m
root@sheeva:~# mount -t ubifs ubi0:rootfs /mnt


  • Clone du rootfs USB dans la mémoire flash

Ménage à faire avant car plus > 600Mo de pris alors que 458Mo de libre sur NAND !

root@sheeva:~# apt-get clean
root@sheeva:~# apt-get --purge remove kernel..., 
root@sheeva:~# rm -rf /var/lib/apt/lists/security.debian.org_dists_squeeze_updates_* /var/lib/apt/lists/ftp.fr.debian.org_debian_dists_squeeze_*

Copie du rootfs:

root@sheeva:~# mkdir /tmp/rootfs
root@sheeva:~# mount -o bind / /tmp/rootfs/
root@sheeva:~# cd /tmp/rootfs
root@sheeva:~# sync
root@sheeva:~# cp -a . /mnt/

Générer un fstab correspondant:

root@sheeva:~# cat <<EOF > /mnt/etc/fstab
/dev/root  /               ubifs   defaults,noatime,rw                      0 0
tmpfs      /var/run        tmpfs   size=1M,rw,nosuid,mode=0755              0 0
tmpfs      /var/lock       tmpfs   size=1M,rw,noexec,nosuid,nodev,mode=1777 0 0
tmpfs      /tmp            tmpfs   defaults,nosuid,nodev                    0 0
EOF

Rebooter

root@sheeva:~# shutdown -r now


Boot de la Debian sur la nand

  • Modifier les variables u-boot pour booter sur la nand
Marvell>> setenv bootargs 'console=ttyS0,115200 ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs'
Marvell>> saveenv
Saving Environment to NAND...
Erasing Nand...Writing to Nand... done
Marvell>> reset


  • Mise à jour du noyau et des modules aprés le premier boot
root@sheeva:~# wget http://sheeva.with-linux.com/sheeva/README-2.6.33.2
root@sheeva:~# bash README-2.6.33.2 --nandkernel
root@sheeva:~# shutdown -r now


  • Installer Openssh pour un accès réseau
root@sheeva:~# apt-get install openssh-client openssh-server


  • Connexion réseau sur le sheevaplug en Debian Squeeze
dan@vesta:~$ ssh root@sheeva
Warning: Permanently added the RSA host key for IP address '192.168.0.23' to the list of known hosts.
root@sheeva's password: 
Linux sheeva 2.6.33.2 #1 PREEMPT Fri Apr 2 16:37:14 MDT 2010 armv5tel

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law.
Last login: Fri May 14 13:36:41 2010

root@sheeva:~# uname -a
Linux sheeva 2.6.33.2 #1 PREEMPT Fri Apr 2 16:37:14 MDT 2010 armv5tel GNU/Linux

root@sheeva:~# cat /proc/cpuinfo 
Processor       : Feroceon 88FR131 rev 1 (v5l)
BogoMIPS        : 1192.75
Features        : swp half thumb fastmult edsp 
CPU implementer : 0x56
CPU architecture: 5TE
CPU variant     : 0x2
CPU part        : 0x131
CPU revision    : 1

Hardware        : Marvell SheevaPlug Reference Board
Revision        : 0000
Serial          : 0000000000000000


Installation sur la SD card

L'installation se fera en copiant le rootfs de la NAND sur la SD.
Possiblité de booter sur la version installée en NAND ou celle installée sur la SD (multi-boot).

installation sur la carte SD

  • Préparation de la SD (8Go)
root@sheeva:~# mkfs.ext2 -I 128 /dev/mmcblk0p1
root@sheeva:~# mkfs.ext2 /dev/mmcblk0p2
root@sheeva:~# mkswap  /dev/mmcblk0p3

Partitionnement de la SD:

root@sheeva:~# fdisk -l /dev/mmcblk0

Disk /dev/mmcblk0: 7969 MB, 7969177600 bytes
221 heads, 20 sectors/track, 3521 cylinders
Units = cylinders of 4420 * 512 = 2263040 bytes
Disk identifier: 0x00000000

        Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk0p1               1          58      128170   83  Linux
/dev/mmcblk0p2              59        3343     7259850   83  Linux
/dev/mmcblk0p3            3344        3521      393380   83  Linux


  • Clone du rootfs de la mémoire flash sur la carte SD
root@sheeva:~# mount /dev/mmcblk0p2 /mnt
root@sheeva:~# mkdir /mnt/boot
root@sheeva:~# mount /dev/mmcblk0p1 /mnt/boot

root@sheeva:~# mkdir /tmp/rootfs
root@sheeva:~# mount -o bind / /tmp/rootfs/
root@sheeva:~# sync
root@sheeva:~# cd /tmp/rootfs
root@sheeva:~# cp -a . /mnt/


  • Générer la fstab
root@sheeva:~# cat /mnt/etc/fstab
/dev/mmcblk0p2  /               ext2    defaults,noatime,rw                      0 0
/dev/mmcblk0p1  /boot           ext2    defaults,noatime,rw                      0 0
tmpfs           /var/run        tmpfs   size=1M,rw,nosuid,mode=0755              0 0
tmpfs           /var/lock       tmpfs   size=1M,rw,noexec,nosuid,nodev,mode=1777 0 0
tmpfs           /tmp            tmpfs   defaults,nosuid,nodev                    0 0


  • Installer le noyau

Voir ci-dessous l'adresse pour le técharger;

root@sheeva:~# scp dan@vesta:tmp/sheevaplug/kernel/sheeva-2.6.33.2-uImage /mnt/boot
root@sheeva:~# cd /mnt/boot/
root@sheeva:/mnt/boot# ln -s sheeva-2.6.33.2-uImage uImage

root@sheeva:/mnt/boot# l
total 3,7M
drwx------ 2 root root   12K 11 juin  23:29 lost+found/
-rw-r--r-- 1 root root 1017K 14 mai   19:35 sheeva-2.6.33.2-System.map
-rw-r--r-- 1 root root  2,6M 11 juin  23:52 sheeva-2.6.33.2-uImage
lrwxrwxrwx 1 root root    22 11 juin  23:53 uImage -> sheeva-2.6.33.2-uImage


Configuration u-boot pour le multi-boot

Source: http://www.newit.co.uk/forum/index.php?PHPSESSID=f1694ae83d7668919f4c3e92f95e20bf&/topic,194.0.html

  • Variables modifiées
Marvell>> setenv bootargs_console 'console=ttyS0,115200'
Marvell>> setenv bootargs_root_mmc 'root=/dev/mmcblk0p2 rootdelay=5'
Marvell>> setenv bootargs_root_nand 'ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs'
Marvell>> setenv bootcmd_mmc 'setenv bootargs $(bootargs_console) $(bootargs_root_mmc); mmcinit; ext2load mmc 0:1 0x800000 /uImage; bootm 0x00800000'
Marvell>> setenv bootcmd_nand 'setenv bootargs $(bootargs_console) $(bootargs_root_nand); nand read.e 0x00800000 0x00100000 0x00400000; bootm 0x00800000'
Marvell>> setenv bootcmd 'run bootcmd_mmc; run bootcmd_nand'
Marvell>> saveenv


  • Boot sur MMC (SD Card)
Restarting system.

         __  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_ 
| | | |___|  _ \ / _ \ / _ \| __| 
| |_| |___| |_) | (_) | (_) | |_ 
 \___/    |____/ \___/ \___/ \__| 
 ** MARVELL BOARD: SHEEVA PLUG LE 

U-Boot 1.1.4 (Dec 27 2009 - 22:03:21) Marvell version: 3.4.27 

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CFEE0

Soc: 88F6281 A0 (DDR2)
CPU running @ 1200Mhz L2 running @ 400Mhz
SysClock = 400Mhz , TClock = 200Mhz 

DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6
DRAM CS[0] base 0x00000000   size 256MB 
DRAM CS[1] base 0x10000000   size 256MB 
DRAM Total size 512MB  16bit width
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:512 MB
Flash:  0 kB

CPU : Marvell Feroceon (Rev 1)

Streaming disabled 
Write allocate disabled


USB 0: host mode
PEX 0: interface detected no Link.
Net:   egiga0 [PRIME]
Hit any key to stop autoboot:  0 
SDHC found. Card desciption is:
Manufacturer:       0x02, OEM "TM"
Product name:       "SD08G", revision 3.8
Serial number:      3252845898
Manufacturing date: 6/2009
CRC:                0x00, b0 = 0

2706200 bytes read
## Booting image at 00800000 ...
   Image Name:   Linux-2.6.33.2
   Created:      2010-04-02  22:37:20 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2706136 Bytes =  2.6 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK

Starting kernel ...


Vue des FS de la SD:

dan@sheeva:~$ df 
Sys. de fichiers    Taille  Uti. Disp. Uti% Monté sur
rootfs                6,9G  594M  5,9G   9% /
/dev/root             6,9G  594M  5,9G   9% /
tmpfs                 251M     0  251M   0% /lib/init/rw
tmpfs                  10M  140K  9,9M   2% /dev
tmpfs                 251M     0  251M   0% /dev/shm
/dev/mmcblk0p1        122M  5,2M  110M   5% /boot
tmpfs                 1,0M   56K  968K   6% /var/run
tmpfs                 1,0M     0  1,0M   0% /var/lock
tmpfs                 251M     0  251M   0% /tmp


  • Boot sur la NAND (SD Card absente)

Des erreurs s'affichent car il n'y a pas de SD et u-boot enchaine sur le boot de la NAND.

Marvell>> ü
         __  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_ 
| | | |___|  _ \ / _ \ / _ \| __| 
| |_| |___| |_) | (_) | (_) | |_ 
 \___/    |____/ \___/ \___/ \__| 
 ** MARVELL BOARD: SHEEVA PLUG LE 

U-Boot 1.1.4 (Dec 27 2009 - 22:03:21) Marvell version: 3.4.27

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CFEE0

Soc: 88F6281 A0 (DDR2)
CPU running @ 1200Mhz L2 running @ 400Mhz
SysClock = 400Mhz , TClock = 200Mhz 

DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6
DRAM CS[0] base 0x00000000   size 256MB 
DRAM CS[1] base 0x10000000   size 256MB 
DRAM Total size 512MB  16bit width
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:512 MB
Flash:  0 kB

CPU : Marvell Feroceon (Rev 1)

Streaming disabled 
Write allocate disabled


USB 0: host mode
PEX 0: interface detected no Link.
Net:   egiga0 [PRIME]
Hit any key to stop autoboot:  0 
Error! cmd : 8, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
No MMC card found
** Bad partition 1 **
## Booting image at 00800000 ...
Bad Magic Number

NAND read: device 0 offset 0x100000, size 0x400000

Reading data from 0x4ff800 -- 100% complete.
 4194304 bytes read: OK
## Booting image at 00800000 ...
   Image Name:   Linux-2.6.33.2
   Created:      2010-04-02  22:37:20 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2706136 Bytes =  2.6 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK

Starting kernel ...


Vue des FS de la NAND:

root@sheeva:~# df
Sys. de fichiers    Taille  Uti. Disp. Uti% Monté sur
rootfs                462M  293M  166M  64% /
ubi0:rootfs           462M  293M  166M  64% /
tmpfs                 251M     0  251M   0% /lib/init/rw
tmpfs                  10M  140K  9,9M   2% /dev
tmpfs                 251M     0  251M   0% /dev/shm
tmpfs                 1,0M   48K  976K   5% /var/run
tmpfs                 1,0M     0  1,0M   0% /var/lock
tmpfs                 251M     0  251M   0% /tmp


Possibilité de forcer le boot sur la NAND en passant par u-boot:

Marvell>> run bootcmd_nand


Liens

The ultimate resource on the Sheevaplug development: http://www.openplug.org/plugwiki/index.php/Main_Page
Debian sur Sheevaplug http://www.openplug.org/plugwiki/index.php/Debian
Debian on Plug Computers like the SheevaPlug http://www.cyrius.com/debian/kirkwood/sheevaplug/



Autre "Plug computer" compatible

Voir le Seagate Dockstar basé sur le même processeur mais disponible pour pas cher.