<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  "http://www.oasis-open.org/docbook/xml/4.5/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/2001/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/2001/XInclude"
    href="../../final-system/ppc/yaboot.xml"
    xpointer="xpointer(//*[@os='p3'])"/>

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

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

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

    <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 tries to change user and group ownership for the installed
    files to <systemitem class="username">root</systemitem>, which the
    <systemitem class="username">clfs</systemitem> user cannot do. It will also
    fail due to a compile warning with the -Werror flag on.   The following
    command fixes these issues:</para>

<screen><userinput>cp -v Makefile{,.orig}
sed -e "s/\(strip \)/${CLFS_TARGET}-\1/" \
    -e 's/-o root -g root//' \
    -e 's/-Werror//' \
    Makefile.orig &gt; Makefile</userinput></screen>

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

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

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

<screen><userinput>make CROSS=${CLFS_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>
