From Fedora Project Wiki
Line 38: Line 38:
=== Filesystems ===
=== Filesystems ===
The Fedora 12 root filesystem is set up by default to mount a NFS share as the root partition.  This can be corrected by changing /etc/fstab.  In the ROOTFS partition, open the "etc/fstab" (note there is NO prepending slash) and change the first line to read:
The Fedora 12 root filesystem is set up by default to mount a NFS share as the root partition.  This can be corrected by changing /etc/fstab.  In the ROOTFS partition, open the "etc/fstab" (note there is NO prepending slash) and change the first line to read:
<pre></pre>
<pre>/dev/mmcblk0p2        /          ext3    defaults    1 1</pre>


== Set up u-boot boot arguments ==
== Set up u-boot boot arguments ==

Revision as of 15:38, 11 November 2010

Warning.png
This page is a draft only
It is still under construction and content may change. Do not rely on the information on this page.

How To: Use the Fedora 12 rootfs on a BeagleBoard-xM

The BeagleBoard-xM ships with a MicroSD card, which contains a working Angstrom validation image. This how-to guide will lead the user through how to modify the xM's SD card to run Fedora 12. This guide assumes that the user is running a recent version of Fedora on his or her local machine, but should apply to users of any recent linux distribution.

What you need

To complete this guide, you'll need

  • Pre-formatted SD card that came with the BeagleBoard-xM
  • Serial cable to access BeagleBoard-xM's serial console
  • SD card reader on your PC, with a MicroSD to SD adapter

SD Card Formatting

Insert the SD card into a card reader, and start up a partition editor like gparted. You should see that there is a FAT32 partition at the beginning of the card, a small "unknown" partition, and then lots of free space. Delete the "unknown" partition, then create a new partition taking up all of the available free space. Label the partition ROOTFS, and format it as ext3.

Apply your changes, and verify that you can mount the ROOTFS partition successfully.

Copy rootfs to SD Card

Now that the ROOTFS partition has been created, it's time to extract the Fedora 12 root filesystem onto it. First, download the prebuilt root file system. Once it's downloaded, navigate to the ROOTFS partition in a terminal, and extract the rootfs using the following commands:

su -c 'tar xvf /path/to/rootfs-f12.tar.bz2 ./'
su -c 'mv rootfs-f12/* ./'
su -c 'rmdir rootfs-f12'

Replace /path/to/rootfs-f12.tar.bz2 with the path to rootfs-f12.tar.bz2 on your system.

The first command extracts the root filesystem to your current directory, which is the ROOTFS partition on the SD card. In the rootfs tarball, all of the files are located in the 'rootfs-f12' folder, so the second command moves all of the files out of the rootfs-f12 folder and into the base ROOTFS directory. Finally, the third command removes the unneeded 'rootfs-f12' folder.

Install Kernel Modules

The BeagleBoard-xM comes with a pre-installed kernel image, but kernel modules and firmware are required for extra hardware such as the Real Time Clock. These modules need to be installed to /lib/modules on the ROOTFS partition. There are two ways to go about getting these modules: downloading them from the internet, or recovering them from the BeagleBoard's included validation image.

Download modules from internet

You can download modules.tgz from the Angstrom website. Once it's downloaded, navigate to the ROOTFS partition, and extract the modules using the command

su -c 'tar xvf /path/to/modules.tgz ./'

Replace /path/to/modules.tgz with the location of your downloaded modules.tgz file.

Extra settings

The Fedora 12 rootfs needs some additional configuration to do things like access the network. This section outlines some of the additional configuration changes that need to be made.

Networking

Fedora 12 defaults to the "eth0" network interface, but the BeagleBoard-xM's network interface is called usb0.

Filesystems

The Fedora 12 root filesystem is set up by default to mount a NFS share as the root partition. This can be corrected by changing /etc/fstab. In the ROOTFS partition, open the "etc/fstab" (note there is NO prepending slash) and change the first line to read:

/dev/mmcblk0p2        /           ext3    defaults     1 1

Set up u-boot boot arguments

setenv bootcmd 'mmc init; fatload mmc 0 0x80300000 uImage; bootm 0x80300000'
setenv bootargs 'console=ttyS2,115200n8 console=tty0 root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait'
saveenv