Skip to main content.
Navigation:
DENX
>
DULG
>
AN2007_06_DebianEtchOnAMCC440EPx
Translations:
Edit
|
Attach
|
Raw
|
Ref-By
|
Printable
|
More
DULG
Sections of this site:
DENX Home
|
DULG
|
ELDK-5
|
Know
|
Training
|
U-Boot
|
U-Bootdoc
Topics
DULG Home
BoardSelect
Manual
FAQ
Application Notes
Changes
Index
List of pages in DULG
Search
---+ Installing Debian Etch on AMCC PPC 440EPx "Sequoia" Board %TOC% ---++ Abstract This Application Note describes how to install the Debian 4.0 (Etch) Linux distribution on the AMCC PPC 440EPx *"Sequoia"* Board. There are other ways to achieve the same result but still this document outlines the general approach. ---++ Author This document was written by Main.ZuZhihui (zuzhihui {at} gmail {dot} com). ---++ Installation Requirements In order to install Debian Etch on the Sequoia board you need the following hardware and software components: * a target AMCC PPC 440EPx Sequoia board with a hard disk attached. * a development host running DENX ELDK (4.1 or newer). If you want to generate the image files (such as kernel image, ramdisk, filesystem image and Debian image) by yourself, you also need: * a powerpc running Linux * AMCC's resource CD for 440EPx Sequoia evaluation kit My hardware setup is: * a Sequoia board with a Silicon Image Serial ATA hard disk. * a Mac Mini with ppc CPU running Fedora Core 4 This Application Note is based on my hardware. If your setup is different, you need to identify if you need to change the drivers. ---++ Installation Don't want to compile the images by yourself? Just want Debian Etch to run on your board? Follow here. Otherwise please look at *Compile* ---+++ Download Image Files Download the following image files and put them into your tftp server: * http://219.238.170.12/~john.zu/debian-amcc/uImage.amcc * http://219.238.170.12/~john.zu/debian-amcc/ramdisk.img.amcc * http://219.238.170.12/~john.zu/debian-amcc/sequoia.flashfs.amcc Download http://219.238.170.12/~john.zu/debian-amcc/ppc-etch-image.tgz and put them where your tftp server can see them. ---+++ Boot Boot the board: <verbatim> tftp 200000 uImage.amcc era FE000000 FE17FFFF cp.b 200000 FE000000 ${filesize} tftp 200000 ramdisk.img.amcc era FE180000 FE3FFFFF cp.b 200000 FE180000 ${filesize} tftp 0x200000 sequoia.flashfs.amcc era FE400000 FFF5FFFF cp.b 0x200000 0xfe400000 ${filesize} setenv bootcmd 'run flash_self' setenv flash_self 'run ramargs addtty;bootm ${kernel_addr} ${ramdisk_addr}' setenv addtty 'setenv bootargs ${bootargs} console=ttyS0,${baudrate}' setenv kernel_addr FE000000 setenv ramdisk_addr FE180000 setenv baudrate 115200 setenv ramargs 'setenv bootargs root=/dev/ram rw' saveenv boot </verbatim> ---+++ Copy files to hard disk The boot process should be smooth and leave you with a busybox prompt, if this is not the case check that you followed the steps above closely. Now use the =fdisk= command to partition your hard disk. The device name of the serial ATA hard disk should be =/dev/sda=. Create a new partition =/dev/sda1= with at least 200MB spaces. <verbatim> fdisk /dev/sda </verbatim> Now create a filesystem on =/dev/sda1= and extract the Debian image files to it. Then reboot the board. Of course be sure to adjust the ftpget command to the mirror you intend to use. <verbatim> mkfs.ext2 /dev/sda1 mkdir /mnt/sata1 mount /dev/sda1 /mnt/sata1 cd /mnt/sata1 ftpget -u FTPUSER -p FTPPASSWORD FTPSERVER ppc-etch-image.tgz REMOTEPATH/ppc-etch-image.tgz tar zxf ppc-etch-image.tgz mv ppc-etch-image/* . rm -rf ppc-etch-image* cd umount /mnt/sata1 reboot </verbatim> ---+++ Boot into Debian Etch <verbatim> setenv bootcmd 'run flash_sata' setenv flash_sata 'run sataargs addtty;bootm ${kernel_addr}' setenv sataargs 'setenv bootargs root=/dev/sda1 rw' saveenv boot </verbatim> Debian Etch should boot on your board, login, and apt-get what you need, enjoy! ---++ Compile ---+++ Download AMCC resource CD Download AMCC's resource CD for 440EPx Sequoia board at http://www.amcc.com/Embedded/Downloads/download.html?item=458 and mount it to /mnt. We need /mnt/software/linux/kernel/linux-2.6-denx.tar.gz and /mnt/software/linux/rootfs/filesystem.tar.gz ---+++ Compile Kernel On the development host, compile kernel using kernel source from the AMCC resource CD: <verbatim> make sequoia_defconfig make menuconfig make uImage </verbatim> Be sure to select the following items while make menuconfig: * *File Systems --> ext3 journalling file system support* * *General setup --> Configure standard kernel features --> Support for hot-pluggable devices* * The SATA driver, mine is *Device drivers --> Serial ATA and Parallel ATA drivers --> Silicon Image SATA support* Because: * We may use ext3 filesystem on hard disk * The initrd(ramdisk) of Debian Etch depends on the hotplug support in kernel. * Silicon SATA is my SATA driver, you may change it according to your SATA type. When finished, rename the *uImage* file to *uImage.amcc*, that's the kernel image we need. ---+++ Compile Ramdisk and filesystem Extract all the files from filesystem.tar.gz, read the README.filesystem file and follow it. Then you should have the files *ramdisk.img* and *sequoia.flashfs*, rename them to *ramdisk.img.amcc*, *sequoia.flashfs.amcc* since they are AMCC official. ---+++ Make Debian Etch Image We'll bootstrap the Etch image using our Power Architecture® server. The ppc server must run Linux, even better Debian Etch. My ppc server runs Fedora 4 so I have to install *debootstrap* on it. You can skip installing debootstrap if you run Debian Etch on the ppc server. These steps must be done by root: <verbatim> cd wget debootstrap_0.3.3.2_all.deb mkdir tmp ar -x ../debootstrap_0.3.3.2_all.deb tar zxf data.tar.gz mv usr/lib/debootstrap/ / mv usr/sbin/debootstrap /debootstrap/ </verbatim> After debootstrap is installed, then we can bootstrap a Etch image: <verbatim> debootstrap --arch powerpc etch /home/ppc-etch-image http://ftp.us.debian.org/debian #chroot into it and make some changes: LANG=C chroot ppc-etch-image/ /bin/bash #remove the APT caches apt-get clean #modify the hostname echo "etchamcc440" >/etc/hostname </verbatim> Create the serial devices, because we'll let Linux console runs on serial port: <verbatim> mount -t proc proc /proc cd /dev ./MAKEDEV ttyS umount /proc </verbatim> Then we should modify the =/etc/fstab= file, this file lists the filesystems to be mounted after boot. My =/etc/fstab= file looks like this: <verbatim> /dev/sda1 / ext2 defaults 0 1 proc /proc proc defaults 0 0 </verbatim> Modify =/etc/network/interfaces= file to configure the loopback network device. The contents of =/etc/network/interfaces=: <verbatim> auto lo iface lo inet loopback </verbatim> Change the =/etc/hosts= file as: <verbatim> 127.0.0.1 localhost localhost.localdomain etchamcc440 </verbatim> The most important change is in the =/etc/inittab= file, we should remove the line shown below since we do not want CTRL+ALT+DEL to reboot the system. <verbatim> ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now </verbatim> Furtheron remove the following lines: <verbatim> 1:2345:respawn:/sbin/getty 38400 tty1 2:23:respawn:/sbin/getty 38400 tty2 3:23:respawn:/sbin/getty 38400 tty3 4:23:respawn:/sbin/getty 38400 tty4 5:23:respawn:/sbin/getty 38400 tty5 6:23:respawn:/sbin/getty 38400 tty6 </verbatim> and add the line: <verbatim> T0:23:respawn:/sbin/getty -L ttyS0 115200 vt100 </verbatim> We only have the serial console, so we should only respawn the login program on the serial console. Now the Etch image is ready. We need to exit the chroot environment and make a tgz file of the Etch image. That's it! <verbatim> exit tar czf ppc-etch-image.tgz /home/ppc-etch-image </verbatim>