Skip to main content.
Navigation:
DENX
>
DULG
>
AN2008_01_FedoraCoreOnPASemiElectra
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 ppc64 Fedora Core 8 on PASemi "Electra" Board %TOC% ---++ Abstract This Application Note describes how to install the ppc64 version of Fedora Core 8 (Werewolf) Linux distribution on the PASemi *"Electra"* Board. The installation process is a two stage operation. First stage involves booting target board with the ELDK root file system mounted over the NFS and installing a copy of the ELDK root file system to the local hard disk. Second stage starts from booting installed ELDK root file system from the local hard disk and installing from there Fedora Core 8 on another partition of the same local hard disk. ---++ Author This document was written by Marian Balakowicz (m8 {at} semihalf {dot} com). ---++ Installation Requirements In order to install Fedora Core 8 on the Electra board you need the following hardware and software components: * a target PASemi Electra board with a S-ATA hard disk attached and a network connection. * a ELDK (4.2, ppc64) root file system mountable over NFS. ---++ Step 1 - Build linux kernel and boot with the ELDK root fs over NFS <verbatim> CFE> setenv -p nfs-eldk "ifconfig eth1 -auto; setenv bootargs 'debug root=nfs rw nfsroot=192.168.1.3:/opt/eldk-ppc64/ppc64 ip=192.168.230.2:192.168.1.1::255.255.0.0:electra:eth1:'; boot -elf 192.168.1.1:/tftpboot/electra/vmlinux" CFE> nfs-eldk </verbatim> Note 1: If no RTC support is present, set correct date manually ---++ Step 2 - Install the ELDK copy on the local hard disk For detailed instructions see: http://www.denx.de/wiki/view/DULG/ELDKInstallationOnLocalHarddisk Harddisk partition layout used in this howto: <verbatim> # fdisk -l /dev/sda Disk /dev/sda: 120.0 GB, 120034123776 bytes 255 heads, 63 sectors/track, 14593 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 1 250 2008093+ 83 Linux /dev/sda2 251 3986 30009420 83 Linux /dev/sda3 3987 7722 30009420 83 Linux /dev/sda4 7723 14593 55191307+ 5 Extended /dev/sda5 7723 7972 2008093+ 82 Linux swap / Solaris /dev/sda6 7973 10405 19543041 83 Linux /dev/sda7 10406 14593 33640078+ 83 Linux </verbatim> Partition use in both install stages: * Auxiliary ELDK hard disk install: <verbatim> / ext3 /dev/sda2 swap /dev/sda5 </verbatim> * Final Fedora Core hard disk install: <verbatim> / ext3 /dev/sda3 /boot ext2 /dev/sda1 swap /dev/sda5 </verbatim> Note 2: If necessary create required hard disk =/dev/*= entries, e.g.: <verbatim> # mknod /dev/sda b 8 0 # mknod /dev/sda1 b 8 1 # mknod /dev/sda2 b 8 2 etc. </verbatim> ---++ Step 3 - Reboot to CFE firmware and start system with ELDK root fs from hard drive <verbatim> CFE> setenv -p hd-eldk "ifconfig eth1 -auto; setenv bootargs 'debug root=/dev/sda2 ro ip=192.168.230.2:192.168.1.1:192.168.1.254:255.255.0.0:electra:eth1:off'; boot -elf 192.168.1.1:/tftpboot/electra/vmlinux" CFE> hd-eldk </verbatim> Note 3: Create /etc/resolv.conf <verbatim> # cat /etc/resolv.conf nameserver 192.168.1.254 domain denx.de </verbatim> See also Note 1 and Note 2. ---++ Step 4 - Install Fedora =yum= on top of a ELDK installation ---+++ Select Fedora mirror Choose the nearest mirror from http://mirrors.fedoraproject.org/publiclist/Fedora/8/ ---+++ Install wget package Select .ppc64.rpm version of wget package as it will work on top of ELDK without any further dependency resolution: <verbatim> # ftp ftp.stw-bonn.de ftp> cd /pub/fedora/linux/releases/8/Everything/ppc64/os/Packages/ ftp> bin ftp> get wget-1.10.2-16.fc8.ppc64.rpm ftp> bye # rpm -ivh --nodeps --ignorearch wget-1.10.2-16.fc8.ppc64.rpm </verbatim> ---+++ Install yum and its dependencies: To avoid conflicts with the ELKD package set (ppc64), yum and its dependencies are installed in the form of the =ppc= binaries: <verbatim> MIRROR=ftp://ftp.stw-bonn.de/pub/fedora/linux/releases/8/Everything/ppc/os/Packages </verbatim> * use =wget ${MIRROR}/package_name= command to download a package * and =rpm= command to install it <verbatim> rpm -ivh libgcc-4.1.2-33.ppc.rpm rpm -ivh --nodeps glibc-2.7-2.ppc.rpm rpm -ivh elfutils-libelf-0.130-3.fc8.ppc.rpm rpm -ivh --nodeps libsepol-2.0.11-1.fc8.ppc.rpm rpm -ivh --nodeps libselinux-2.0.37-1.fc8.ppc.rpm rpm -ivh ncurses-5.6-12.20070812.fc8.ppc.rpm rpm -ivh --nodeps readline-5.2-7.fc8.ppc.rpm rpm -ivh zlib-1.2.3-14.fc8.ppc.rpm rpm -ivh bzip2-libs-1.0.4-12.fc8.ppc.rpm rpm -ivh expat-2.0.1-2.ppc.rpm rpm -ivh db4-4.6.21-1.fc8.ppc.rpm rpm -ivh beecrypt-4.1.2-13.ppc.rpm rpm -ivh sqlite-3.4.2-3.fc8.ppc.rpm rpm -ivh gdbm-1.8.0-27.fc7.ppc.rpm rpm -ivh keyutils-libs-1.2-2.fc6.ppc.rpm rpm -ivh glib2-2.14.2-1.fc8.ppc.rpm rpm -ivh --nodeps libxml2-2.6.30-1.ppc.rpm rpm -ivh popt-1.12-3.fc8.ppc.rpm rpm -ivh --nodeps openssl-0.9.8b-17.fc8.ppc.rpm rpm -ivh --nodeps krb5-libs-1.6.2-9.fc8.ppc.rpm rpm -ivh keyutils-libs-devel-1.2-2.fc6.ppc.rpm rpm -ivh libsepol-devel-2.0.11-1.fc8.ppc.rpm rpm -ivh libselinux-devel-2.0.37-1.fc8.ppc.rpm rpm -ivh --nodeps e2fsprogs-libs-1.40.2-10.fc8.ppc.rpm rpm -ivh --nodeps e2fsprogs-devel-1.40.2-10.fc8.ppc.rpm rpm -ivh --nodeps krb5-devel-1.6.2-9.fc8.ppc.rpm rpm -ivh --nodeps python-libs-2.5.1-15.fc8.ppc.rpm python-2.5.1-15.fc8.ppc.rpm rpm -ivh python-iniparse-0.2.2-1.fc8.noarch.rpm rpm -ivh python-urlgrabber-3.0.0-3.fc8.noarch.rpm rpm -ivh libselinux-python-2.0.37-1.fc8.ppc.rpm rpm -ivh rpm-libs-4.4.2.2-3.fc8.ppc.rpm rpm-4.4.2.2-3.fc8.ppc.rpm rpm -ivh rpm-python-4.4.2.2-3.fc8.ppc.rpm rpm -ivh yum-metadata-parser-1.1.2-1.fc8.ppc.rpm rpm -ivh yum-3.2.7-1.fc8.noarch.rpm </verbatim> At this point =yum= should be correctly installed: <verbatim> # yum --version 3.2.7 </verbatim> ---++ Step 5 - Preparations for the proper Fedora Core installation: ---+++ Mount install partitions <verbatim> # mkdir /mnt/fc # mkefs -j /dev/sda3 # mount /dev/sda3 /mnt/fc # mkdir /mnt/fc/boot # mkefs /dev/sda1 # mount /dev/sda1 /mnt/fc/boot </verbatim> ---+++ Initialize RPM database on your target file system <verbatim> # cd /mnt/fc # mkdir -p var/log var/lib/rpm # mkdir -p var/lib/yum # rpm --root=/mnt/fc --initdb </verbatim> ---+++ Install the "fedora-release-*" RPMs <verbatim> wget ${MIRROR}/fedora-release-*.noarch.rpm rpm --root=/mnt/fc -ivh --nodeps fedora-release-*.noarch.rpm </verbatim> ---+++ Edit =yum= repository configurations <verbatim> # cd /mnt/fc/etc/yum.repos.d </verbatim> Edit all =.repo= files, replace =$basearch= with =ppc64= string to force installation for ppc64 architecture (otherwise =$basearch= would select tools (yum, etc.) architecture, which is =ppc=). ---+++ Copy kernel image from nfs location to the hard disk on electra, enable password ftp login <verbatim> # cd /etc/pam.d # cp ftp ftp.orig # cp passwd ftp </verbatim> on nfs server: <verbatim> $ cd /path/to/the/kenrel/image/dir/ $ ftp electra ftp> cd / ftp> bin ftp> put vmlinux </verbatim> ---+++ Other setup <verbatim> # mount -t proc none /mnt/fc/proc/ # ln -s /mnt/fc/etc/pki/rpm-gpg/ /etc/pki/ </verbatim> ---++ Step 6 - Fedora Core installation Use the =yum= tool to perform a full installation of the "Base" system <verbatim> # yum --installroot=/mnt/fc -y groupinstall Base </verbatim> Make sure =yum= selects ppc64 packages: <verbatim> ============================================================================= Package Arch Version Repository Size ============================================================================= Installing: anacron ppc64 2.3-57.fc8 updates 42 k attr ppc64 2.4.38-2.fc8 updates 63 k authconfig ppc64 5.3.18-1.fc8 fedora 408 k autofs ppc64 1:5.0.2-24 updates 1.0 M bind-utils ppc64 32:9.5.0-22.b1.fc8 updates 212 k ... </verbatim> ---++ Step 7 - Minimal post install configuration The following additional actions are necessary to get a booting system: ---+++ Create =/dev/*= entries Populate =/dev= directory in new file system with the minimum of entries (for example, copy =/dev= from running system; this is a overkill, but simple enough). <verbatim> # rm -rf /mnt/fc/dev # cp -a /dev /mnt/fc/ </verbatim> ---+++ Create =/etc/fstab= <verbatim> # cp /etc/fstab /mnt/fc/etc # vi /mnt/fc/etc/fstab # cat /mnt/fc/etc/fstab /dev/sda3 / ext3 defaults 1 1 /dev/sda1 /boot ext2 defaults 1 2 /dev/sda5 swap swap defaults 0 0 none /proc proc defaults 0 0 sysfs /sys sysfs defaults 0 0 </verbatim> ---+++ Network setup <verbatim> # cp /etc/resolv.conf /mnt/fc/etc/ # cp /etc/sysconfig/network /mnt/fc/etc/sysconfig/ </verbatim> ---+++ Copy kernel image <verbatim> # cp /vmlinux /mnt/fc/boot/vmlinux </verbatim> ---+++ Set root password on a new system <verbatim> # chroot /mnt '/usr/bin/passwd' </verbatim> ---++ Step 8 - Boot newly installed Fedora Core <verbatim> CFE> setenv -p hd-fc "setenv bootargs 'debug root=/dev/sda3 ro ip=192.168.230.2:192.168.1.1:192.168.1.254:255.255.0.0:electra:eth1:off'; boot -fs=ext2 sata0.0:/vmlinux CFE> hd-fc </verbatim> -- Main.MarianBalakowicz - 17 Jan 2008