7.13. Yaboot-1.3.17

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

7.13.1. Installation of Yaboot

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 following patch allows ofpath to use PATH_PREFIX like the other ybin scripts:

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

The Makefile is already set to do kernel-style cross-compiling, but it will try to use strip to strip the second-stage loader. It also expects to be running as root for the install, and to install for the root user, which user CLFS cannot do. We also need to use the 32-bit compiler, and to force ld to use a 32-bit emulation. The following commands will fix and achieve this:

cp -v Makefile{,.orig}
sed -e "s/\(-print-libgcc-file-name\)/${BUILD32} \1/" \
            -e "s/\(-Bstatic\)/-melf32ppclinux \1/" \
            -e "s/\(strip \)/${CLFS_TARGET}-\1/" \
            -e 's/-o root -g root//' \
            -e 's/-Werror//' \
    Makefile.orig > Makefile

Compile the package:

CFLAGS=${BUILD32} make CROSS=${CLFS_TARGET}-
[Important]

Important

The multilib install of yaboot can fail if you miss any of the patches or seds, or omit the CFLAGS variable. 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.

Install the package:

make CROSS=${CLFS_TARGET}- ROOT=/tools PREFIX= 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.

Details on this package are located in Section 10.95.2, “Contents of Yaboot.”