Architectures/ARM/GuruPlug

= How To: Running Fedora-ARM on GuruPlug =

Introduction
The GuruPlug is a development platform, targeted for use as a plug computer, and designed to run network-based software services. It features a Kirkwood Series SoC with an embedded Marvell Sheeva™ CPU core running at 1.2 GHz. The GuruPlug is the second generation of SheevaPlugs.

Technical Specifications

 * Power: 	2.3w idle no attached devices, 7.0w running at 100% CPU utilization
 * CPU: 	       Marvell Kirkwood 88F6281 ARM Based, 1Ghz - 2Ghz processor
 * Memory: 	512MB DDR2 RAM, 512MB Nand Flash
 * Display: 	none
 * I/O:         2xUSB 2.0, 1xMicroSD, 2x Gigabit Ethernet, 1xeSATA 2.0
 * Dimensions: 	110 x 69.5 x 48.5 (mm)

Installing Rootfs to MicroSD card
You will need to download the latest root file system for use with ARM. That can be found here. This example is using the kernel that shipped with the GuruPlug.

Untar the root file system tarball onto the SD card (pls change mount point of the SD card to match yours): The SD card should be formatted as an ext2/3 filesystem, and below commands executed as root:

[root@newzealand ~]# tar -jxf rootfs-f12.tar.bz2 [root@newzealand ~]# cp -r rootfs-f12/* /media/flash/

Insert the micro SD into your GuruPlug, connect the JTAG breakout box (hopefully you have one) provided to the GuruPlug and connect the USB to another PC running Linux (hopefully Fedora!). You will need to have the package Minicom installed, if you do already please skip the first step:

[root@newzealand ~]# yum install minicom [root@newzealand ~]# minicom -s

Running the last command as root will allow you to configure minicom to use the USB you have connected to the GuruPlug as a serial connection. Go to the option ‘Serial port setup’ and hit enter. Edit the fields as shown below, substituting the USB connection if needed to match yours.


 * A - Serial Device : /dev/ttyUSB0
 * B - Lockfile Location : /var/lock
 * C - Callin Program :
 * D - Callout Program :
 * E - Bps/Par/Bits : 115200 8N1
 * F - Hardware Flow Control : No
 * G - Software Flow Control : No

Once completed run the following command to connect to the serial connection on the GuruPlug: [root@newzealand ~]# minicom

Power on the GuruPlug and you should see the boot up sequence, allow it to boot to Debian so you can find out the major and minor device numbers for the micro SD card that has the Fedora rootfs on it. Run the following command when you have logged into Debian as root:

sheevaplug-debian:/dev# ls -l /dev/sd* brw-rw 1 root floppy 8, 0 2009-08-08 09:30 /dev/sda brw-rw 1 root floppy 8, 16 2009-08-08 09:30 /dev/sdb brw-rw 1 root floppy 8, 17 2009-08-08 09:30 /dev/sdb1 brw-rw 1 root floppy 8, 18 2009-08-08 09:30 /dev/sdb2

This shows that the major and minor device numbers for ‘/dev/sdb2′ which I put the rootfs on, are 8 and 18 respectively. That number needs to be converted to hex, for entry in Uboot – 8,18 in decimal converts to 8,12 in Hex, for entry in Uboot this will be entered as ’0812′. Again, yours will be different, so be sure to substitute the correct values. Reboot the GuruPlug and this time hit any key before the system boots into Debian. Once at the Marvell prompt type:

Marvell>> nand read.e 0x6400000 0x100000 0x400000 Marvell>> setenv bootargs console=ttyS0,115200 root=0812 rootdelay=10 Marvell>> bootm 0x6400000

This should boot the GuruPlug into Fedora 12, the default password for root is ‘fedoraarm’. I had some issues booting the plug initially as it was not recognizing the micro SD card and finding the rootfs, once I added the rootdelay of 10 this worked, however lesser numbers did not. You will also of course have issues if the major and minor numbers are incorrect, so please make sure this is correct and converted to Hex. If you are happy with the these settings and would like the GuruPlug to boot using the Fedora file system you will need to reboot, again hitting any key to get to the Marvell prompt, this time you will need to edit and remove existing boot parameters, below is the default output of the ‘printenv’ command:

Marvell>> printenv bootcmd=setenv ethact egiga0; ${x_bootcmd_ethernet}; setenv ethact egiga1; ${x_; bootdelay=3 baudrate=115200 x_bootcmd_ethernet=ping 192.168.2.1 x_bootcmd_usb=usb start x_bootcmd_kernel=nand read.e 0x6400000 0x100000 0x400000 x_bootargs=console=ttyS0,115200 x_bootargs_root=ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs ethact=egiga0 ethaddr=00:50:43:01:80:3C eth1addr=00:50:43:01:80:3D stdin=serial stdout=serial stderr=serial

To change the location of the rootfs, enter commands below, changing the values again to represent your configuration:

Marvell>> editenv x_bootargs_root edit: ubi.mtd=2 root=0812 rootdelay=10 Marvell>> saveenv Saving Environment to NAND... Erasing Nand... Erasing at 0x40000 -- 100% complete. Writing to Nand... done Marvell>> reset

Hopefully you see ‘Welcome to Fedora’ after the boot. If you would like to change the plug back to the default install of Debian, then you simply have to edit the boot parameters and change back to their original values, saving once completed.