From Fedora Project Wiki
No edit summary
 
(8 intermediate revisions by 2 users not shown)
Line 2: Line 2:


== Introduction ==
== 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  
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 ===
=== Technical Specifications ===
Line 12: Line 12:
* Dimensions: 110 x 69.5 x 48.5 (mm)
* Dimensions: 110 x 69.5 x 48.5 (mm)


== Setup Kernel Image ==
== Installing Rootfs to MicroSD card ==


You can either simply use a pre-built kernel image or build your own from source.
You will need to download the latest root file system for use with ARM. That can be found [http://ftp.linux.org.uk/pub/linux/arm/fedora/rootfs/rootfs-f12.tar.bz2 here]. This example is using the kernel that shipped with the GuruPlug.


== Installing Rootfs to MicroSD card ==
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:


 
<pre>
First untar the provided rootfs 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 ~]# tar -jxf rootfs-f12.tar.bz2
[root@newzealand ~]# cp -r rootfs-f12/* /media/flash/
[root@newzealand ~]# cp -r rootfs-f12/* /media/flash/
</pre>


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:
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:
<pre>
[root@newzealand ~]# yum install minicom
[root@newzealand ~]# yum install minicom
[root@newzealand ~]# minicom -s
[root@newzealand ~]# minicom -s
</pre>


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.
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.
<pre>
| A - Serial Device : /dev/ttyUSB0
| A - Serial Device : /dev/ttyUSB0
| B - Lockfile Location : /var/lock
| B - Lockfile Location : /var/lock
Line 36: Line 41:
| F - Hardware Flow Control : No
| F - Hardware Flow Control : No
| G - Software Flow Control : No
| G - Software Flow Control : No
</pre>


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


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:
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:
<pre>
sheevaplug-debian:/dev# ls -l /dev/sd*
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, 0 2009-08-08 09:30 /dev/sda
Line 46: Line 56:
brw-rw---- 1 root floppy 8, 17 2009-08-08 09:30 /dev/sdb1
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
brw-rw---- 1 root floppy 8, 18 2009-08-08 09:30 /dev/sdb2
</pre>


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.
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:
Reboot the GuruPlug and this time hit any key before the system boots into Debian. Once at the Marvell prompt type:
<pre>
Marvell>> nand read.e 0x6400000 0x100000 0x400000
Marvell>> nand read.e 0x6400000 0x100000 0x400000
Marvell>> setenv bootargs console=ttyS0,115200 root=0812 rootdelay=10
Marvell>> setenv bootargs console=ttyS0,115200 root=0812 rootdelay=10
Marvell>> bootm 0x6400000
Marvell>> bootm 0x6400000
</pre>


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:
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:
<pre>
Marvell>> printenv
Marvell>> printenv
bootcmd=setenv ethact egiga0; ${x_bootcmd_ethernet}; setenv ethact egiga1; ${x_;
bootcmd=setenv ethact egiga0; ${x_bootcmd_ethernet}; setenv ethact egiga1; ${x_;
Line 69: Line 85:
stdout=serial
stdout=serial
stderr=serial
stderr=serial
</pre>


To change the location of the rootfs, enter commands below, changing the values again to represent your configuration:
To change the location of the rootfs, enter commands below, changing the values again to represent your configuration:
<pre>
Marvell>> editenv x_bootargs_root
Marvell>> editenv x_bootargs_root
edit: ubi.mtd=2 root=0812 rootdelay=10
edit: ubi.mtd=2 root=0812 rootdelay=10
Line 79: Line 98:
Writing to Nand... done
Writing to Nand... done
Marvell>> reset
Marvell>> reset
</pre>


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.
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.

Latest revision as of 14:17, 15 November 2010

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.