From Fedora Project Wiki
No edit summary
 
(13 intermediate revisions by 3 users not shown)
Line 1: Line 1:
= Work-in-Progress 26-june-2009 =
= How To: Running Fedora-ARM on Sheevaplug =
= How To: Running Fedora-ARM on Sheevaplug =


Line 5: Line 4:
The SheevaPlug 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 SheevaPlug 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.


=== Technical Specifications
=== Technical Specifications ===
* Power: 2.3w idle no attached devices, 7.0w running at 100% CPU utilization
* Power: 2.3w idle no attached devices, 7.0w running at 100% CPU utilization
* CPU:         Marvell Kirkwood 88F6281 ARM Based, 1Ghz - 2Ghz processor
* CPU:         Marvell Kirkwood 88F6281 ARM Based, 1Ghz - 2Ghz processor
Line 19: Line 18:
=== Pre-built Kernel Image ===
=== Pre-built Kernel Image ===


You can get one of the following pre-built kernel images for ARM:
You can get the following pre-built kernel image for Sheevaplug:
1. Include link XXX
http://ftp.linux.org.uk/pub/linux/arm/fedora/platforms/sheevaplug/uImage-2.6.30-sheevaplug


=== Build Kernel Image From Source ===
=== Build Kernel Image From Source ===
Line 27: Line 26:


<pre>
<pre>
export arch=ARM
export ARCH=arm
export CROSS_COMPILE=arm-none-linux-gnueabi-
export CROSS_COMPILE=arm-none-linux-gnueabi-
</pre>
</pre>
Line 39: Line 38:
$ make kirkwood_defconfig
$ make kirkwood_defconfig
$ make uImage
$ make uImage
</pre>
=== Copy the kernel over tftp ===
Setup tftp server on your host machine as follows:
{{tftpsetup}}
Now on the Sheevaplug's uboot prompt, tftp the kernel over to the Sheevaplug as:
<pre>
Marvell>> dhcp
Marvell>> set serverip <hostip>
Marvell>> tftpboot 0x6400000 uImage-2.6.30-sheevaplug
</pre>
Replace <hostip> with your host's IP address.
Once your kernel cmdline settings are done (as mentioned below), you can boot into the kernel as
<pre>
Marvell>> bootm 0x6400000
</pre>
if your linux kernel doesn't boot don't worry, try the settings listed bellow and tftp uImage again.
<pre>
setenv arcNumber 2097
setenv mainlineLinux yes
saveenv
</pre>
</pre>


== Setup Root File System ==
== Setup Root File System ==
Download the latest root filesystem from http://ftp.linux.org.uk/pub/linux/arm/fedora/rootfs/
=== RFS over NFS ===
 
{{rfsovernfs}}
Untar the filesystem and export it over NFS.


=== Kernel cmdline parameters for NFS setup ===
=== Kernel cmdline parameters for NFS setup ===
Line 52: Line 75:
root=/dev/nfs rw nfsroot=<hostip>:/mnt/ARM_FS/ ip=dhcp
root=/dev/nfs rw nfsroot=<hostip>:/mnt/ARM_FS/ ip=dhcp
</pre>
</pre>
=== RFS over USB drive ===
Details about USB boot are available at: [[ Architectures/ARM/SheevaplugUSB |  HOWTO: Sheevaplug Fedora USB Boot ]]
Details about SD card boot are available at: [[ Architectures/ARM/SheevaplugSD |  HOWTO: Sheevaplug Fedora SD card Boot ]]
=== Saving uImage into NAND flash ===
<pre>
[root@fedora-arm ~]# cat /proc/mtd
dev:    size  erasesize  name
mtd0: 00100000 00020000 "u-boot"
mtd1: 00400000 00020000 "uImage"
mtd2: 1fb00000 00020000 "root"
</pre>
don't touch mtd0 or you will need a JTAG cable to write it again and make your sheeva Lord again.
mtd1 is the uImage, let we write it again with fedora kernel.
<pre>
wget -Nc http://ftp.linux.org.uk/pub/linux/arm/fedora/platforms/sheevaplug/uImage-2.6.30-sheevaplug
nandwrite –p /dev/mtd1 uImage-2.6.30-sheevaplug
</pre>
after writing it , you don't need to tftp the uimage anymore

Latest revision as of 07:25, 14 December 2009

How To: Running Fedora-ARM on Sheevaplug

Introduction

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

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 SDRAM, 512MB Flash
  • Display: none
  • Connectivity: USB 2.0, SD, Gigabit Network,JTAG mini USB
  • Dimensions: 110 x 69.5 x 48.5 (mm)

Setup Kernel Image

You can either simply use a pre-built kernel image or build your own from source.

Pre-built Kernel Image

You can get the following pre-built kernel image for Sheevaplug: http://ftp.linux.org.uk/pub/linux/arm/fedora/platforms/sheevaplug/uImage-2.6.30-sheevaplug

Build Kernel Image From Source

You will need to have an ARM cross-compiler. If you do not have one, download one from CodeSourcery's web-site, install it and ensure that is it in your path.

export ARCH=arm
export CROSS_COMPILE=arm-none-linux-gnueabi-

You can also use the Fedora cross toolchain that we provide.

Download the Linux kernel (I have tested with 2.6.30), and build it for kirkwood_defconfig.

$ cd linux-2.6/
$ make kirkwood_defconfig
$ make uImage

Copy the kernel over tftp

Setup tftp server on your host machine as follows:

1. Install the tftp-server package as

# yum install tftp-server

2. Edit /etc/xinetd.d/tftp and change the disable value to no

3. Restart xinetd

# /etc/init.d/xinetd restart

4. Copy the binary into the tftp server's root directory (usually /tftpboot/)

Now on the Sheevaplug's uboot prompt, tftp the kernel over to the Sheevaplug as:

Marvell>> dhcp
Marvell>> set serverip <hostip>
Marvell>> tftpboot 0x6400000 uImage-2.6.30-sheevaplug

Replace <hostip> with your host's IP address.

Once your kernel cmdline settings are done (as mentioned below), you can boot into the kernel as

Marvell>> bootm 0x6400000

if your linux kernel doesn't boot don't worry, try the settings listed bellow and tftp uImage again.

setenv arcNumber 2097
setenv mainlineLinux yes
saveenv

Setup Root File System

RFS over NFS

Download the latest root filesystem tarball from http://ftp.linux.org.uk/pub/linux/arm/fedora/rootfs/ and untar it.

This assumes that you untarred the root file system in /mnt/ARM_FS. We need to export it through NFS. Add the following in your /etc/exports.

/mnt/ARM_FS/ *(rw,sync,no_root_squash)

Now, restart the NFS service.

/sbin/service nfs restart

Kernel cmdline parameters for NFS setup

While booting the kernel, pass the following cmdline options to ensure bootup over NFS. This assumes that you have the root filesystem in /mnt/ARM_FS/

root=/dev/nfs rw nfsroot=<hostip>:/mnt/ARM_FS/ ip=dhcp

RFS over USB drive

Details about USB boot are available at: HOWTO: Sheevaplug Fedora USB Boot

Details about SD card boot are available at: HOWTO: Sheevaplug Fedora SD card Boot

Saving uImage into NAND flash

[root@fedora-arm ~]# cat /proc/mtd 
dev:    size   erasesize  name
mtd0: 00100000 00020000 "u-boot"
mtd1: 00400000 00020000 "uImage"
mtd2: 1fb00000 00020000 "root"

don't touch mtd0 or you will need a JTAG cable to write it again and make your sheeva Lord again.

mtd1 is the uImage, let we write it again with fedora kernel.

wget -Nc http://ftp.linux.org.uk/pub/linux/arm/fedora/platforms/sheevaplug/uImage-2.6.30-sheevaplug
nandwrite –p /dev/mtd1 uImage-2.6.30-sheevaplug

after writing it , you don't need to tftp the uimage anymore