Installing Ubuntu 6.10 on AMCC PPC 440EPx "Sequoia" Board
Abstract
This Application Note describes how to install the Ubuntu 6.10 GNU/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 Ubuntu 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 network server based installation may be wanted.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 installation data; typically this will be a CDROM drive
- a storage device for the Ubuntu file systems; typically this will be a harddisk drive
- a storage controller to attach the CDROM and harddisk drives 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.
Full bootstrap from original installation media
- Download
"Mac (PowerPC) and IBM-PPC (POWER5) alternate install CD"
(image name
"ubuntu-6.10-alternate-powerpc.iso") from some Ubuntu mirror site, for example http://ftp.uni-bayreuth.de/linux/ubuntu/releases/6.10/ubuntu-6.10-alternate-powerpc.iso - Burn image on CDROM to use for installation later
# cdrecord -tao -v -eject ubuntu-6.10-alternate-powerpc.iso
- Extract ramdisk image used for installation and convert it into
U-Boot ramdisk image:
# mkdir -p /mnt/tmp # mount -o ro,loop ubuntu-6.10-alternate-powerpc.iso /mnt/tmp $ mkimage -T ramdisk -C gzip -n 'Ubuntu-6.10 Ramdisk' \ -d /mnt/tmp/install/powerpc/initrd.gz /tftpboot-sequoia/uRamdisk-ubuntu
- Configure and build the 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/
- Install Ubuntu:
Set up the target board for standard operation with ELDK.
Make sure you can boot with the ELDK provided root file system mounted over NFS,
and also with root file system on a ramdisk
(use the ramdisk image that comes with the ELDK for testing,
see /opt/eldk/ppc_4xxFP/images/uRamdisk).
For details please see the DULG.
The following U-Boot variable settings were used for this example installation:=> setenv bootfile /tftpboot/sequoia/uImage => setenv ramdisk /tftpboot/sequoia/uRamdisk-ubuntu => setenv ramargs setenv bootargs root=/dev/ram rw => 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 ramdisk=16384 => setenv ubuntu_install 'tftp 400000 ${bootfile};tftp 800000 ${ramdisk};run ramargs addip addtty addmisc;bootm 400000 800000' => saveenvWith these settings, you can start the installation procedure by typing:=> run ubuntu_install
Please anser the questions / dialogues as follows:Choose a language: English
Choose your location: other Germany
Keyboard model: Generic 105-key (Intl) PC
Detect keyboard layout? No
The origin of the keyboard: U.S. English
Keyboard layout: U.S. English
Continue the install without loading kernel modules? <Yes>
Primary network interface: eth0: Ethernet or Fast Ethernet
Network autoconfiguration failed <Continue>
Network configuration method: Configure network manually IP address: 192.168.3.104 Netmask: 255.255.0.0 Gateway: 192.168.0.1 Name server addresses: 192.168.0.1 Hostname: sequoia <Continue>
Continue with partitioning? <Yes>
Partitioning method: Manually edit partition table #1 primary 1.0 GB F swap Use as: swap area Done setting up the partition #2 primary 12.0 GB K ext3 Use as: Ext3 journaling file system Format the partition: yes, format it Mount point: / Mount options: defaults Label: none Reserved blocks: 5% Typical usage: standard Bootable flag: off Done setting up the partition Finish partitioning and write changes to disk Write the changes to disks? <Yes>Is the system clock set to UTC? <Yes>
Full name for the new user: <your name here> ==> Example used: "Wolfgang Denk" <Continue>
Username for your account: <your login name here> ==> Example used: "denx" <Continue>
Choose a password for the new user: <your password here> ==> Example used: "1tux@work" <Continue>
Re-enter password to verify: <your password here> ==> Example used: "1tux@work" <Continue>
Continue without installing a kernel? <Yes>
Choose software to install: [*] Ubuntu desktop
Video modes to be used by the X server: [*] 1024x768
No boot loader installed <Continue>
Installation complete <Continue>
State saved as: ubuntu-6.10-ppc-stage1-2007-01-01.tar.bz2
- Reboot the system, and adjust boot arguments to boot from the
newly installed root file system:
=> setenv ubuntu 'tftp 400000 ${bootfile};setenv bootargs root=/dev/hda2 ro;run addip addtty addmisc;bootm 400000' => saveenv => run ubuntuThis should boot you into a Ubuntu system; log in on the serial console as user"denx", password"1tux@work". - Post-Install Configuration:
Install sshd so we can access the system over the network and run GUI programs over X11:$ sudo /bin/bash # apt-get update # apt-get install openssh-server
- Then log in over the network, and run
"synaptic"to update all installed packages:$ ssh denx@sequoia ... denx@sequoia:~$ sudo /bin/bash Password: root@sequoia:~# synaptic "Mark All Upgrades" "Mark" "Apply"
State saved as: ubuntu-6.10-ppc-stage2-2007-01-02.tar.bz2
Bootstrap from snapshot tarball
In the installation steps above, we saved certain states of the installed root file system as tarballs. We can now use these snapshots as base for a new installation, for example when you don't have a way to attach a CDROM drive to your system.- In such a case, boot your "sequoia" board as usual with the ELDK root
file system mounted over 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 anext3file system:bash-3.00b# fdisk /dev/hda ... bash-3.00b# mkswap /dev/hda1 bash-3.00b# mke2fs -j /dev/hda2
- The mount the partition that shall become your root file system on
some directory, and start the dropbear ssh server:
bash-3.00b# mount /dev/hda2 /mnt bash-3.00b# dropbear
- Also make sure your target has at least a somewhat reasonable
setting of the system time; for example, run:
bash-3.00b# ntpdate -b 0.pool.ntp.org
This assumes that you have set up your network correctly to provide valid default route and name servers. - Then uncompress the snapshot tarball on your development host
(which is probably faster than doing it on the target)
and unpack it in the target root file system,
for example like this:
bash$ bunzip2 </tmp/ubuntu-6.10-ppc-stage2-2007-01-02.tar.bz2 | \ > ssh root@sequoia '( cd /mnt && tar xpf - )'
- When this completes, you have to make some final adjustments in
the target root file system:
bash-3.00b# cd /mnt bash-3.00b# vi etc/hostname <== set real hostname bash-3.00b# vi etc/hosts <== set host name/ IP address bash-3.00b# vi etc/network/interfaces <== set network parameters bash-3.00b# vi etc/fstab <== set partition information (root dev!) bash-3.00b# vi etc/event.d/ttyS0 <== set console baudrate
- Finally, unmount the file system and reboot your target, using the
newly installed file system as root (see above):
bash-3.00b# cd / bash-3.00b# umount /mnt bash-3.00b# reboot
Set up diskless system
Using the snapshow tarballs it is also easy to set up a diskless system which mounts the Ubuntu root file system over NFS:- Create a directory on your NFS server which will be exported as
root file system:
# mkdir /opt/ubuntu-6.10 # cd /opt/ubuntu-6.10 # tar jxpf /tmp/ubuntu-6.10-ppc-stage2-2007-01-02.tar.bz2
- Perform the same adjustments described above, i. e.:
# vi etc/hostname <== set real hostname # vi etc/hosts <== set host name/ IP address # vi etc/network/interfaces <== set network parameters # vi etc/fstab <== set partition information (root dev!) # vi etc/event.d/ttyS0 <== set console baudrate
Use the following entry for the root device in"etc/fstab":/dev/nfs / nfs defaults 0 0
- Make sure the new root directory is exported by your NFS server.
- Adjust U-Boot environment to boot from this new root directory
over NFS:
=> setenv rootpath /opt/ubuntu-6.10 => run net_nfs
