10.72. Yaboot-1.3.17

The Yaboot package contains a PowerPC Boot Loader for machines using Open Firmware such as NewWorld Macintoshes.

10.72.1. Installation of Yaboot

Yaboot defaults to build as 32bit, so we need to pass appropriate options to both the compiler and the linker. To prevent the build from failing due to compiler warnings, the -Werror flag is removed. The Makefile already overrides any CC and ignores LDFLAGS in favour of its own variables, so we need to use the following seds for a successful compile and install.

sed -i -e "s/m32/m64/g" \
    -e "s/-Werror//" \
    -e "s/elf32ppclinux/elf64ppc/" Makefile

The meaning of the sed parameters:

"s/m32/m64/g"

Replaces -m32 with -m64 to force gcc to create 64-bit code when compiling yaboot.

"s/-Werror//"

This deletes the -Werror flag from the Makefile.

"s/elf32ppclinux/elf64ppc/"

This replaces the 32 bit emulation with a 64 bit emulation flag to force ld to use a suitable 64-bit emulation picked from the output of 'ld -V'.

The following patch adds stub functions for newer e2fsprogs releases:

patch -Np1 -i ../yaboot-1.3.17-stubfuncs-1.patch

The following patch adds Parted support to yabootconfig:

patch -Np1 -i ../yaboot-1.3.17-parted-1.patch

The supplied man pages have /usr/local in the text. This sed will correct that:

sed -i 's%/usr/local%/usr%' man/*

Compile the package:

make PREFIX=/usr

Install the package:

[Important]

Important

The install of yaboot can fail if you miss any of the patches or seds. ld will issue warnings, but the install will appear to complete successfully. That would result in an unbootable system, so you need to log the output to check it.

make PREFIX=/usr install 2>&1 | tee instlog

To ensure that the install was successful, run the following command:

grep 'powerpc:common64' instlog

If the command gave you any output (... is incompatible with powerpc:common output) the build of yaboot is broken and you will have to correct your error(s) and repeat it.

10.72.2. Contents of Yaboot

Installed programs: addnote, mkofboot (link to ybin), ofboot, ofpath, yaboot, yabootconfig, ybin
Installed files: yaboot.conf

Short Descriptions

addnote

For IBM CHRP machines, add a PT_NOTE program header entry to an elf file so that it can be booted.

mkofboot

Format the bootstrap partition and install the yaboot boot loader.

ofboot

Script to format the boot menu using yaboot.conf and write the resulting Open Firmware code to the bootstrap.

ofpath

Determine Open Firmware path corresponding to a device node.

yaboot

Open Firmware boot loader.

yabootconfig

Generate and install a simple yaboot.conf.

ybin

Shell script to update or install the boot loader on a bootstrap partition.

yaboot.conf

Configuration file used by ybin to determine how to install yaboot on the bootstrap partition.