<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
  <!ENTITY % general-entities SYSTEM "../../general.ent">
  %general-entities;
]>

<sect1 id="ch-boot-yaboot-build" role="wrap">
  <?dbhtml filename="yaboot-build.html"?>

  <title>Yaboot-&yaboot-version;</title>

  <indexterm zone="ch-boot-yaboot-build">
    <primary sortas="a-Yaboot">Yaboot</primary>
    <secondary>boot</secondary>
  </indexterm>

  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
  href="../../final-system/ppc/yaboot.xml"
  xpointer="xpointer(//*[@role='package'])"/>

  <sect2 role="installation">
    <title>Installation of Yaboot</title>

    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    href="../../final-system/ppc/yaboot.xml"
    xpointer="xpointer(//*[@os='a'])"/>

    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    href="../../final-system/ppc/yaboot.xml"
    xpointer="xpointer(//*[@os='b'])"/>

    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    href="../../final-system/ppc/yaboot.xml"
    xpointer="xpointer(//*[@os='c'])"/>

    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    href="../../final-system/ppc/yaboot.xml"
    xpointer="xpointer(//*[@os='d'])"/>

    <para os="p1">The following patch allows <command>ofpath</command> to use
    <literal>PATH_PREFIX</literal> like the other
    <filename class="directory">ybin</filename> scripts:</para>

<screen os="p2"><userinput>patch -Np1 -i ../&yaboot-ofpath_path-patch;</userinput></screen>

    <para>The Makefile is already set to do kernel-style cross-compiling,
    but it will try to use <command>strip</command> 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 LFS cannot do.  The following command
    will fix this:</para>

<screen><userinput>cp Makefile,{.orig}
sed -e "s/\(strip \)/${LFS_TARGET}-\1/" \
    -e 's/-o root -g root//' \
    Makefile.orig > Makefile</userinput></screen>

    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    href="../../final-system/ppc/yaboot.xml"
    xpointer="xpointer(//*[@os='g'])"/>

<screen><userinput>make CROSS=${LFS_TARGET}-</userinput></screen>

    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    href="../../final-system/ppc/yaboot.xml"
    xpointer="xpointer(//*[@os='i'])"/>

<screen><userinput>make CROSS=${LFS_TARGET}- ROOT=/tools PREFIX= install</userinput></screen>

  </sect2>

  <sect2 role="content">
    <title/>

    <para>Details on this package are located in <xref linkend="contents-yaboot" role="."/></para>

  </sect2>

</sect1>
