Installing Fedora Core 7 Linux on AMCC PPC 440EPx "Sequoia" Board
Abstract
This Application Note describes how to install the Fedora Core 7
Linux distribution on the AMCC PPC 440EPx
"Sequoia" Board.
Note: this guide will also work on other PowerPC systems which
are based on a 32 bit
CPU with a full Floating Point Unit (FPU),
like the AMCC PPC 440EP ("Yosemite" board),
Freescale MPC5200 ("Lite5200B" etc.), Freescale MPC82xx, etc.
Note that a 2.6 kernel is required.
Supported Target Environments
The installation of Fedora Core 7 requires a storage device.
Depending on available hardware and/or project requirements you may
want to use ATA, S-ATA or SCSI harddisk drives;
alternatively, a pure NFS network
server based installation may be used.
Installation Requirements
In addition to the AMCC PPC 440EPx "Sequoia" evaluation board
you need the following hardware and software components:
- a DENX ELDK 4.x based Linux development host
which must be configured
to provide access to the serial console port
and to work as a TFTP and NFS server.
Please see http://www.denx.de/wiki/view/DULG/SystemSetup
for details.
- a storage device for the Fedora Core 7 file systems; typically this will
be a harddisk drive
- a storage controller to attach harddisk drive to
the "Sequoia" board; in this case we use standard ATA drives:
Here we use a IT8212 PCI ATA controller.
Unfortunately there is a small problem with this
controller, i. e. the current driver code does not work with
DMA enabled, so we have to patch the Linux kernel code to
disable DMA, for example with this patch:
diff --git a/drivers/ide/pci/it821x.c b/drivers/ide/pci/it821x.c
index e9bad18..31906ce 100644
--- a/drivers/ide/pci/it821x.c
+++ b/drivers/ide/pci/it821x.c
@@ -703,9 +703,9 @@ static void __devinit init_hwif_it821x(ide_hwif_t *hwif)
if (!hwif->dma_base)
goto fallback;
- hwif->ultra_mask = 0x7f;
- hwif->mwdma_mask = 0x07;
- hwif->swdma_mask = 0x07;
+// hwif->ultra_mask = 0x7f;
+// hwif->mwdma_mask = 0x07;
+// hwif->swdma_mask = 0x07;
hwif->ide_dma_check = &it821x_config_drive_for_dma;
if (!(hwif->udma_four))
Also, we must disable RAID mode of this driver by passing a
"it821x.noraid=1" boot argument to the Linux kernel.
Please use this kernel configuration file.
Preparations:
- On the host system,
select your preferred Fedora Core 7 mirror site,
create a directory in the ELDK target file system
and download a minimal set of Fedora Core 7 RPM's:
$ MIRROR=ftp://ftp-stud.fht-esslingen.de/pub/fedora/linux/core/development/ppc/os/Fedora
$ cd /opt/eldk/ppc_6xx/tmp/
$ mkdir FC7
$ cd FC7
$ while read rpm ; do wget "${MIRROR}/${rpm}"; done <fc7-stage1.list
- Boot target system with root file system over NFS
and verify that you can access the downloaded Fedora Core 7 RPM's:
# cd /tmp/FC7/
# ls
...
- Create a working directory for a (temporary) installation
of a minimal Fedora Core 7 system:
# mkdir /tmp/FC7/work
- Install the downloaded RPM's into this working directory:
# cd /tmp/FC7/
# rpm --root=/tmp/FC7/work --initdb
# rpm --root=/tmp/FC7/work -i --nodeps *.rpm
You will see a lot of error messages and warnings, please ignore these.
- Run a second round of RPM installation.
Yes, this is a quick and dirty hack,
but we will use this stuff just once and then throw it away:
# rpm --root=/tmp/FC7/work -i --nodeps --replacepkgs coreutils-*.rpm
# rpm --root=/tmp/FC7/work -i --nodeps --replacepkgs *.rpm
Now you should see just a single warning
"... Header V3 DSA signature: NOKEY ..."
and a few error messages "... unable to flush ..."
- Populate the
/dev directory in our work environment:
# find /dev | cpio -pdum /tmp/FC7/work/
Make sure that /tmp/FC7/work/dev now contains especially the necessary device nodes
für your disk drive, i. e. the required hd* or sd* entries.
- Format your disk as seems fit using
fdisk,
create an ext3 file system on the chosen partition:
# mke2fs -m1 -j /dev/hda6
- Now use
chroot to start a shell in our newly created temporary
Fedora Core 7 environment.
# chroot /tmp/FC7/work /bin/bash
Note: depending on your configuration, you may have to adjust network
configuration in this chroot environment; for example, you may have
to create a "/etc/resolv.conf" file.
- Mount the /proc file system, nd the partition where the real Fedora core 7
shall beinstalled into:
# touch /etc/fstab
# mount -t proc proc /proc
# mount -t ext3 /dev/hda6 /mnt
- Initialize RPM database on your target file system and
install the
"fedora-release-*" RPMs:
# mkdir -p /mnt/var/log /mnt/var/lib/rpm
# rpm --root=/mnt --initdb
# MIRROR=ftp://ftp-stud.fht-esslingen.de/pub/fedora/linux/core/development/ppc/os/Fedora
# wget ${MIRROR}/fedora-release-*.noarch.rpm
# rpm --root=/mnt -ivh --nodeps fedora-release-*.noarch.rpm
- Now use the
"yum" tool to perform a full installation of the "Base" system:
# yum --installroot=/mnt -y groupinstall Base
- Install
"/etc/fstab" in target partition:
# vi /mnt/etc/fstab
# cat /mnt/etc/fstab
/dev/hda1 swap swap defaults 0 0
/dev/hda6 / ext3 defaults 1 1
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs defaults 0 0
- Install
"/etc/resolv.conf" in target partition:
# cp /etc/resolv.conf /mnt/etc/resolv.conf
- Edit
"/etc/resolv.conf" in target partition:
disable logins on virtual terminals,
and add a login on the serial console:
# diff -u /mnt/etc/inittab.ORIG /mnt/etc/inittab
--- /mnt/etc/inittab.ORIG 2007-02-23 15:57:30.000000000 +0100
+++ /mnt/etc/inittab 2007-03-19 19:03:33.000000000 +0100
@@ -42,12 +42,13 @@
# Run gettys in standard runlevels
-1:2345:respawn:/sbin/mingetty tty1
-2:2345:respawn:/sbin/mingetty tty2
-3:2345:respawn:/sbin/mingetty tty3
-4:2345:respawn:/sbin/mingetty tty4
-5:2345:respawn:/sbin/mingetty tty5
-6:2345:respawn:/sbin/mingetty tty6
+0:2345:respawn:/sbin/mingetty --noclear console
+##1:2345:respawn:/sbin/mingetty tty1
+##2:2345:respawn:/sbin/mingetty tty2
+##3:2345:respawn:/sbin/mingetty tty3
+##4:2345:respawn:/sbin/mingetty tty4
+##5:2345:respawn:/sbin/mingetty tty5
+##6:2345:respawn:/sbin/mingetty tty6
# Run xdm in runlevel 5
x:5:respawn:/etc/X11/prefdm -nodaemon
- Assign root password:
# passwd root
Changing password for user root.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
-
-
-
REBOOT:
- Configure and build the Linux kernel:
-> cp sequoia.config-??? .config
-> make ARCH=PPC CROSS_COMPILE=ppc_4xxFP- oldconfig
-> make ARCH=PPC CROSS_COMPILE=ppc_4xxFP- uImage
Alternatively, use one of the provided kernel images:
| For ATA disk drives | using an IT8212 PCI ATA controller: | uImage-IT8212 |
- Copy the kernel image to TFTP directory:
-> cp -vp arch/ppc/boot/images/uImage /tftpboot/sequoia/
- Set up the target board for standard operation with ELDK.
Boot with the ELDK provided root file system mounted over NFS.
For details please see the DULG.
The following U-Boot variable settings were used for this example installation:
=> setenv bootfile /tftpboot/sequoia/uImage
=> setenv nfsargs 'setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath}'
=> setenv addip 'setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:${netdev}:off'
=> setenv addtty 'setenv bootargs ${bootargs} console=ttyS0,${baudrate}'
=> setenv addmisc 'setenv bootargs ${bootargs} ${more_args}'
=> setenv more_args panic=1 it821x.noraid=1
=> setenv net_nfs 'tftp 400000 ${bootfile};run nfsargs addip addtty addmisc;bootm'
=> saveenv
With these settings, you can start the installation
by typing:
=> run net_nfs
- Use
"fdisk" to partition your
harddisk. Create a small partition (say, 1 GiB) for swap space
and a bigger one (say, 16 GiB) as root file system.
Use "mkswap" to initialize the swap partition,
and "mke2fs" to create an ext3 file system:
bash-2.05b# fdisk /dev/hda
...
bash-2.05b# mkswap /dev/hda1
bash-2.05b# mke2fs -j /dev/hda3
--
WolfgangDenk - 19 Mar 2007