[c25d12c] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?> |
---|
| 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" |
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ |
---|
| 4 | <!ENTITY % general-entities SYSTEM "../../general.ent"> |
---|
| 5 | %general-entities; |
---|
| 6 | ]> |
---|
| 7 | |
---|
| 8 | <sect1 id="ch-system-yaboot" role="wrap"> |
---|
| 9 | <?dbhtml filename="yaboot.html"?> |
---|
| 10 | |
---|
| 11 | <title>Yaboot-&yaboot-version;</title> |
---|
| 12 | |
---|
| 13 | <indexterm zone="ch-system-yaboot"> |
---|
| 14 | <primary sortas="a-Yaboot">Yaboot</primary> |
---|
| 15 | </indexterm> |
---|
| 16 | |
---|
[da23eb8] | 17 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" |
---|
| 18 | href="../ppc/yaboot.xml" |
---|
| 19 | xpointer="xpointer(//*[@role='package'])"/> |
---|
[c25d12c] | 20 | |
---|
| 21 | <sect2 role="installation"> |
---|
| 22 | <title>Installation of Yaboot</title> |
---|
| 23 | |
---|
[da23eb8] | 24 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" |
---|
| 25 | href="../ppc/yaboot.xml" |
---|
| 26 | xpointer="xpointer(//*[@os='a'])"/> |
---|
[c25d12c] | 27 | |
---|
[da23eb8] | 28 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" |
---|
| 29 | href="../ppc/yaboot.xml" |
---|
| 30 | xpointer="xpointer(//*[@os='b'])"/> |
---|
[c25d12c] | 31 | |
---|
[da23eb8] | 32 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" |
---|
| 33 | href="../ppc/yaboot.xml" |
---|
| 34 | xpointer="xpointer(//*[@os='c'])"/> |
---|
[c25d12c] | 35 | |
---|
[da23eb8] | 36 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" |
---|
| 37 | href="../ppc/yaboot.xml" |
---|
| 38 | xpointer="xpointer(//*[@os='d'])"/> |
---|
[c25d12c] | 39 | |
---|
[da23eb8] | 40 | <para>Existing multilib distributions alter gcc to default to 32-bit |
---|
| 41 | output. Because our gcc defaults to 64-bit, we need to pass appropriate |
---|
| 42 | options to both the compiler and the linker. The Makefile already |
---|
| 43 | overrides any CC and ignores LDFLAGS in favour of its own variables, so we |
---|
| 44 | need to use the following seds for a successful compile and install.</para> |
---|
[c25d12c] | 45 | |
---|
[da23eb8] | 46 | <screen><userinput>sed -i -e "s/\(-print-libgcc-file-name\)/${BUILD32} \1/" \ |
---|
| 47 | -e "s/\(-Bstatic\)/-melf32ppclinux \1/" Makefile |
---|
| 48 | </userinput></screen> |
---|
[c25d12c] | 49 | |
---|
[da23eb8] | 50 | <variablelist os="j"> |
---|
| 51 | <title>The meaning of the sed parameters:</title> |
---|
[c25d12c] | 52 | |
---|
[da23eb8] | 53 | <varlistentry> |
---|
| 54 | <term><parameter>"s/\(-print-libgcc-file-name\)/${BUILD32} \1/"</parameter></term> |
---|
[c25d12c] | 55 | <listitem> |
---|
[da23eb8] | 56 | <para>This picks a convenient place within the Makefile's lgcc |
---|
| 57 | variable and inserts the flag to force <command>gcc</command> to |
---|
| 58 | create 32-bit code when compiling yaboot.</para> |
---|
[c25d12c] | 59 | </listitem> |
---|
| 60 | </varlistentry> |
---|
[da23eb8] | 61 | <varlistentry> |
---|
| 62 | <term><parameter>"s/\(-Bstatic\)/-melf32ppclinux \1/"</parameter></term> |
---|
[c25d12c] | 63 | <listitem> |
---|
[da23eb8] | 64 | <para>This picks the end of the LFLAGS which the Makefile passes to |
---|
| 65 | the linker to create the second-stage linux loader, and inserts a |
---|
| 66 | flag to force <command>ld</command> to use a suitable 32-bit |
---|
| 67 | emulation picked from the output of <command>'ld -V'</command>.</para> |
---|
[c25d12c] | 68 | </listitem> |
---|
| 69 | </varlistentry> |
---|
| 70 | |
---|
[da23eb8] | 71 | </variablelist> |
---|
[c25d12c] | 72 | |
---|
[da23eb8] | 73 | <important> |
---|
| 74 | <para>The above patches and seds are critical in ensuring a |
---|
| 75 | successful build. In particular, the package will appear to install |
---|
| 76 | correctly without the second sed, but will fail to load linux, |
---|
| 77 | requiring you to use OF or a rescue disk to boot.</para> |
---|
| 78 | </important> |
---|
[c25d12c] | 79 | |
---|
[da23eb8] | 80 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" |
---|
| 81 | href="../ppc/yaboot.xml" |
---|
| 82 | xpointer="xpointer(//*[@os='e'])"/> |
---|
[c25d12c] | 83 | |
---|
[da23eb8] | 84 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" |
---|
| 85 | href="../ppc/yaboot.xml" |
---|
| 86 | xpointer="xpointer(//*[@os='f'])"/> |
---|
[c25d12c] | 87 | |
---|
[da23eb8] | 88 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" |
---|
| 89 | href="../ppc/yaboot.xml" |
---|
| 90 | xpointer="xpointer(//*[@os='g'])"/> |
---|
[c25d12c] | 91 | |
---|
[26332de] | 92 | <screen os="h"><userinput>CFLAGS="${BUILD32}" make PREFIX=/usr</userinput></screen> |
---|
| 93 | |
---|
| 94 | <important> |
---|
| 95 | <para>The CFLAGS on the above command are equally critical |
---|
| 96 | for a successful install.</para> |
---|
| 97 | </important> |
---|
[da23eb8] | 98 | |
---|
| 99 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" |
---|
| 100 | href="../ppc/yaboot.xml" |
---|
| 101 | xpointer="xpointer(//*[@os='i'])"/> |
---|
| 102 | |
---|
[26332de] | 103 | <screen><userinput>make PREFIX=/usr install 2>&1 >instlog</userinput></screen> |
---|
| 104 | |
---|
| 105 | <para os='k'>To ensure that the install was successful, run the following |
---|
| 106 | command:</para> |
---|
| 107 | |
---|
| 108 | <screen os='l'><userinput>grep 'powerpc:common64' instlog</userinput></screen> |
---|
| 109 | |
---|
| 110 | <para os='m'>If the command gave you <emphasis>any</emphasis> output |
---|
| 111 | (... is incompatible with powerpc:common output) the build is broken and |
---|
| 112 | you will have to repeat it with <emphasis>all</emphasis> of the items |
---|
| 113 | marked as important.</para> |
---|
[c25d12c] | 114 | |
---|
| 115 | </sect2> |
---|
| 116 | |
---|
[da23eb8] | 117 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" |
---|
| 118 | href="../ppc/yaboot.xml" |
---|
| 119 | xpointer="xpointer(id('contents-yaboot'))"/> |
---|
| 120 | |
---|
[c25d12c] | 121 | </sect1> |
---|