[55ab27c] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?> |
---|
[aa18ac0] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" |
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ |
---|
[55ab27c] | 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 | |
---|
[dabbced] | 17 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" |
---|
[c06e893] | 18 | href="../ppc/yaboot.xml" |
---|
| 19 | xpointer="xpointer(//*[@role='package'])"/> |
---|
[55ab27c] | 20 | |
---|
| 21 | <sect2 role="installation"> |
---|
| 22 | <title>Installation of Yaboot</title> |
---|
| 23 | |
---|
[c06e893] | 24 | <para>Existing multilib distributions alter gcc to default to 32-bit |
---|
| 25 | output. Because our gcc defaults to 64-bit, we need to pass appropriate |
---|
[a5f7c53e] | 26 | options to both the compiler and the linker. To prevent the build from |
---|
[24b004c] | 27 | failing due to compiler warnings, the -Werror flag is removed. The |
---|
| 28 | Makefile already overrides any CC and ignores LDFLAGS in favour of |
---|
| 29 | its own variables, so we need to use the following seds for a |
---|
[a5f7c53e] | 30 | successful compile and install.</para> |
---|
[55ab27c] | 31 | |
---|
[c06e893] | 32 | <screen><userinput>sed -i -e "s/\(-print-libgcc-file-name\)/${BUILD32} \1/" \ |
---|
[a5f7c53e] | 33 | -e "s/-Werror//" \ |
---|
[c06e893] | 34 | -e "s/\(-Bstatic\)/-melf32ppclinux \1/" Makefile |
---|
| 35 | </userinput></screen> |
---|
[55ab27c] | 36 | |
---|
[c06e893] | 37 | <variablelist os="j"> |
---|
| 38 | <title>The meaning of the sed parameters:</title> |
---|
[55ab27c] | 39 | |
---|
[c06e893] | 40 | <varlistentry> |
---|
| 41 | <term><parameter>"s/\(-print-libgcc-file-name\)/${BUILD32} \1/"</parameter></term> |
---|
[55ab27c] | 42 | <listitem> |
---|
[c06e893] | 43 | <para>This picks a convenient place within the Makefile's lgcc |
---|
[e3196bd] | 44 | variable and inserts the flag to force <command>gcc</command> to |
---|
[c06e893] | 45 | create 32-bit code when compiling yaboot.</para> |
---|
[55ab27c] | 46 | </listitem> |
---|
| 47 | </varlistentry> |
---|
[a5f7c53e] | 48 | <varlistentry> |
---|
| 49 | <term><parameter>"s/-Werror//"</parameter></term> |
---|
| 50 | <listitem> |
---|
| 51 | <para>This deletes the -Werror flag from the Makefile.</para> |
---|
| 52 | </listitem> |
---|
| 53 | </varlistentry> |
---|
[c06e893] | 54 | <varlistentry> |
---|
| 55 | <term><parameter>"s/\(-Bstatic\)/-melf32ppclinux \1/"</parameter></term> |
---|
[55ab27c] | 56 | <listitem> |
---|
[c06e893] | 57 | <para>This picks the end of the LFLAGS which the Makefile passes to |
---|
[e3196bd] | 58 | the linker to create the second-stage linux loader, and inserts a |
---|
| 59 | flag to force <command>ld</command> to use a suitable 32-bit |
---|
| 60 | emulation picked from the output of <command>'ld -V'</command>.</para> |
---|
[55ab27c] | 61 | </listitem> |
---|
| 62 | </varlistentry> |
---|
| 63 | |
---|
[c06e893] | 64 | </variablelist> |
---|
[55ab27c] | 65 | |
---|
[2bdaa81] | 66 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" |
---|
| 67 | href="../ppc/yaboot.xml" |
---|
| 68 | xpointer="xpointer(//*[@os='p3'])"/> |
---|
| 69 | |
---|
| 70 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" |
---|
| 71 | href="../ppc/yaboot.xml" |
---|
| 72 | xpointer="xpointer(//*[@os='p4'])"/> |
---|
| 73 | |
---|
[396b325] | 74 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" |
---|
| 75 | href="../ppc/yaboot.xml" |
---|
| 76 | xpointer="xpointer(//*[@os='p5'])"/> |
---|
| 77 | |
---|
| 78 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" |
---|
| 79 | href="../ppc/yaboot.xml" |
---|
| 80 | xpointer="xpointer(//*[@os='p6'])"/> |
---|
| 81 | |
---|
[dabbced] | 82 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" |
---|
[c06e893] | 83 | href="../ppc/yaboot.xml" |
---|
[291bd8b] | 84 | xpointer="xpointer(//*[@os='a'])"/> |
---|
[55ab27c] | 85 | |
---|
[dabbced] | 86 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" |
---|
[c06e893] | 87 | href="../ppc/yaboot.xml" |
---|
[291bd8b] | 88 | xpointer="xpointer(//*[@os='b'])"/> |
---|
[55ab27c] | 89 | |
---|
[dabbced] | 90 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" |
---|
[c06e893] | 91 | href="../ppc/yaboot.xml" |
---|
[291bd8b] | 92 | xpointer="xpointer(//*[@os='c'])"/> |
---|
[55ab27c] | 93 | |
---|
[291bd8b] | 94 | <screen os="d"><userinput>CFLAGS="${BUILD32}" make PREFIX=/usr</userinput></screen> |
---|
[9619f1a] | 95 | |
---|
[dabbced] | 96 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" |
---|
[c06e893] | 97 | href="../ppc/yaboot.xml" |
---|
[291bd8b] | 98 | xpointer="xpointer(//*[@os='e'])"/> |
---|
[c06e893] | 99 | |
---|
[bc5db55] | 100 | <important os="j0"> |
---|
| 101 | <para>The multilib install of yaboot can fail if you miss any of the |
---|
| 102 | patches or seds, or omit the CFLAGS variable. <command>ld</command> will |
---|
| 103 | issue warnings, but the install will appear to complete successfully. |
---|
| 104 | That would result in an unbootable system, so you need to log the output |
---|
| 105 | to check it.</para> |
---|
| 106 | </important> |
---|
| 107 | |
---|
[291bd8b] | 108 | <screen os='f'><userinput>make PREFIX=/usr install 2>&1 | tee instlog</userinput></screen> |
---|
[9619f1a] | 109 | |
---|
[291bd8b] | 110 | <para os='g'>To ensure that the install was successful, run the following |
---|
[9619f1a] | 111 | command:</para> |
---|
| 112 | |
---|
[291bd8b] | 113 | <screen os='h'><userinput>grep 'powerpc:common64' instlog</userinput></screen> |
---|
[9619f1a] | 114 | |
---|
[291bd8b] | 115 | <para os='i'>If the command gave you <emphasis>any</emphasis> output |
---|
[bc5db55] | 116 | (... is incompatible with powerpc:common output) the build of yaboot is |
---|
| 117 | broken and you will have to correct your error(s) and repeat it.</para> |
---|
[55ab27c] | 118 | |
---|
| 119 | </sect2> |
---|
| 120 | |
---|
[dabbced] | 121 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" |
---|
[c06e893] | 122 | href="../ppc/yaboot.xml" |
---|
| 123 | xpointer="xpointer(id('contents-yaboot'))"/> |
---|
| 124 | |
---|
[55ab27c] | 125 | </sect1> |
---|