[d1ebcc8] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[b06ca36] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[d1ebcc8] | 4 | <!ENTITY % general-entities SYSTEM "../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 | ]>
|
---|
[b330f4a] | 7 |
|
---|
[afcfd74] | 8 | <sect1 id="ch-partitioning-hostreqs" xreflabel="Host System Requirements">
|
---|
[b330f4a] | 9 | <?dbhtml filename="hostreqs.html"?>
|
---|
| 10 |
|
---|
| 11 | <title>Host System Requirements</title>
|
---|
| 12 |
|
---|
[7c92d6d] | 13 | <sect2>
|
---|
| 14 | <title>Hardware</title>
|
---|
| 15 |
|
---|
| 16 | <para>The LFS editors recommend that the system CPU have at least
|
---|
| 17 | four cores and that the system have at least 8 GB of memory.
|
---|
| 18 | Older systems that do not meet these requirements will still work,
|
---|
| 19 | but the time to build packages will be significantly longer
|
---|
| 20 | than documented.
|
---|
| 21 | </para>
|
---|
| 22 |
|
---|
| 23 | </sect2>
|
---|
| 24 |
|
---|
| 25 | <sect2>
|
---|
| 26 | <title>Software</title>
|
---|
| 27 |
|
---|
[fd8b059] | 28 | <para>Your host system should have the following software with the
|
---|
| 29 | minimum versions indicated. This should not be an issue for most
|
---|
| 30 | modern Linux distributions. Also note that many distributions will
|
---|
| 31 | place software headers into separate packages, often in the form of
|
---|
| 32 | <quote><package-name>-devel</quote> or
|
---|
| 33 | <quote><package-name>-dev</quote>. Be sure to install those if
|
---|
[5e858e7] | 34 | your distribution provides them.</para>
|
---|
[d12ae76] | 35 |
|
---|
[72fb9bf] | 36 | <para>Earlier versions of the listed software packages may work, but have
|
---|
| 37 | not been tested.</para>
|
---|
[7088c96] | 38 |
|
---|
[bf5724b] | 39 | <itemizedlist spacing="compact">
|
---|
[fd8b059] | 40 |
|
---|
[d12ae76] | 41 | <listitem>
|
---|
[7088c96] | 42 | <para><emphasis role="strong">Bash-3.2</emphasis> (/bin/sh
|
---|
[e4ab232] | 43 | should be a symbolic or hard link to bash)</para>
|
---|
[d12ae76] | 44 | </listitem>
|
---|
[fd8b059] | 45 |
|
---|
[d12ae76] | 46 | <listitem>
|
---|
[cc44a47b] | 47 | <para><emphasis role="strong">Binutils-2.38</emphasis> (Versions
|
---|
[fd8b059] | 48 | greater than &binutils-version; are not recommended as they have
|
---|
| 49 | not been tested)</para>
|
---|
[d12ae76] | 50 | </listitem>
|
---|
[fd8b059] | 51 |
|
---|
[07dfccb] | 52 | <listitem>
|
---|
[b55310e] | 53 | <para><emphasis role="strong">Bison-2.7</emphasis> (/usr/bin/yacc
|
---|
[17a807a] | 54 | should be a link to bison or a small script that executes bison)</para>
|
---|
[07dfccb] | 55 | </listitem>
|
---|
| 56 |
|
---|
[d12ae76] | 57 | <listitem>
|
---|
[b789d88] | 58 | <para><emphasis role="strong">Coreutils-7.0</emphasis></para>
|
---|
[d12ae76] | 59 | </listitem>
|
---|
[fd8b059] | 60 |
|
---|
[d12ae76] | 61 | <listitem>
|
---|
[7088c96] | 62 | <para><emphasis role="strong">Diffutils-2.8.1</emphasis></para>
|
---|
[d12ae76] | 63 | </listitem>
|
---|
[fd8b059] | 64 |
|
---|
[d12ae76] | 65 | <listitem>
|
---|
[7088c96] | 66 | <para><emphasis role="strong">Findutils-4.2.31</emphasis></para>
|
---|
[d12ae76] | 67 | </listitem>
|
---|
[fd8b059] | 68 |
|
---|
[d12ae76] | 69 | <listitem>
|
---|
[3fbc395] | 70 | <para><emphasis role="strong">Gawk-4.0.1</emphasis> (/usr/bin/awk
|
---|
[e4ab232] | 71 | should be a link to gawk)</para>
|
---|
[d12ae76] | 72 | </listitem>
|
---|
[fd8b059] | 73 |
|
---|
[d12ae76] | 74 | <listitem>
|
---|
[cc44a47b] | 75 | <para><emphasis role="strong">GCC-12.2</emphasis> including the C++
|
---|
[142b29b] | 76 | compiler, <command>g++</command> (Versions greater than &gcc-version; are
|
---|
[d6006ef] | 77 | not recommended as they have not been tested). C and C++ standard
|
---|
| 78 | libraries (with headers) must also be present so the C++ compiler can
|
---|
| 79 | build hosted programs</para>
|
---|
[d12ae76] | 80 | </listitem>
|
---|
[fd8b059] | 81 |
|
---|
[d12ae76] | 82 | <listitem>
|
---|
[7088c96] | 83 | <para><emphasis role="strong">Grep-2.5.1a</emphasis></para>
|
---|
[d12ae76] | 84 | </listitem>
|
---|
[fd8b059] | 85 |
|
---|
[d12ae76] | 86 | <listitem>
|
---|
[7088c96] | 87 | <para><emphasis role="strong">Gzip-1.3.12</emphasis></para>
|
---|
[d12ae76] | 88 | </listitem>
|
---|
[fd8b059] | 89 |
|
---|
[d12ae76] | 90 | <listitem>
|
---|
[a93258d] | 91 | <para><emphasis role="strong">Linux Kernel-&min-kernel;</emphasis></para>
|
---|
[fd8b059] | 92 |
|
---|
[9ee226e] | 93 | <para>The reason for the kernel version requirement is that we specify
|
---|
[33ca65c] | 94 | that version when building <application>glibc</application> in
|
---|
| 95 | <xref linkend="chapter-cross-tools"/> and
|
---|
[1cab1bf] | 96 | <xref linkend="chapter-building-system"/>, and
|
---|
| 97 | &min-kernel; is the oldest kernel release supported by Glibc for
|
---|
| 98 | LoongArch.</para>
|
---|
| 99 |
|
---|
| 100 | <important>
|
---|
| 101 | <para>
|
---|
| 102 | If a Linux distribution on LoongArch provides a kernel older than
|
---|
| 103 | &min-kernel;, it indicates the distribution is using a preliminary
|
---|
| 104 | version of the kernel ABI. The preliminary draft was rejected by
|
---|
| 105 | the kernel maintainers and it's fundamentally incompatible with
|
---|
| 106 | the packages we will built for LFS. Such <quote>old-world</quote>
|
---|
| 107 | distributions (for example, Loongnix) cannot be used as a host
|
---|
| 108 | distro for building LFS.
|
---|
| 109 | </para>
|
---|
| 110 |
|
---|
| 111 | <para>
|
---|
| 112 | Do not attempt to update the kernel to &min-kernel; or later on
|
---|
| 113 | a old-world distro because doing so will cause a boot failure.
|
---|
| 114 | Use a <quote>new-world</quote> distribution providing Linux Kernel
|
---|
| 115 | &min-kernel; or newer instead. You may need to contact the vendor
|
---|
| 116 | of your hardware to get a firmware update for booting a new-world
|
---|
| 117 | distribution because the boot protocol of LoongArch is stabilized
|
---|
| 118 | after the launch of the early LoongArch hardwares.
|
---|
| 119 | </para>
|
---|
| 120 | </important>
|
---|
[56ca3a5f] | 121 |
|
---|
[835e40c] | 122 | <para>We require the host kernel to support UNIX 98 pseudo terminal
|
---|
| 123 | (PTY). It should be enabled on all desktop or server distros shipping
|
---|
| 124 | Linux &min-kernel; or a newer kernel. If you are building a custom
|
---|
| 125 | host kernel, ensure <option>CONFIG_UNIX98_PTYS</option> is set to
|
---|
| 126 | <literal>y</literal> in the kernel configuration.</para>
|
---|
| 127 |
|
---|
[d12ae76] | 128 | </listitem>
|
---|
[fd8b059] | 129 |
|
---|
[787fe0c] | 130 | <listitem>
|
---|
[7088c96] | 131 | <para><emphasis role="strong">M4-1.4.10</emphasis></para>
|
---|
[787fe0c] | 132 | </listitem>
|
---|
| 133 |
|
---|
[d12ae76] | 134 | <listitem>
|
---|
[76db8d6] | 135 | <para><emphasis role="strong">Make-4.0</emphasis></para>
|
---|
[d12ae76] | 136 | </listitem>
|
---|
[fd8b059] | 137 |
|
---|
[d12ae76] | 138 | <listitem>
|
---|
[fd8b059] | 139 | <para><emphasis role="strong">Patch-2.5.4</emphasis></para>
|
---|
[d12ae76] | 140 | </listitem>
|
---|
[fd8b059] | 141 |
|
---|
[9692a57] | 142 | <listitem>
|
---|
[7088c96] | 143 | <para><emphasis role="strong">Perl-5.8.8</emphasis></para>
|
---|
[9692a57] | 144 | </listitem>
|
---|
| 145 |
|
---|
[a271796] | 146 | <listitem>
|
---|
| 147 | <para><emphasis role="strong">Python-3.4</emphasis></para>
|
---|
| 148 | </listitem>
|
---|
| 149 |
|
---|
[d12ae76] | 150 | <listitem>
|
---|
[7088c96] | 151 | <para><emphasis role="strong">Sed-4.1.5</emphasis></para>
|
---|
[d12ae76] | 152 | </listitem>
|
---|
[fd8b059] | 153 |
|
---|
[d12ae76] | 154 | <listitem>
|
---|
[7380c3aa] | 155 | <para><emphasis role="strong">Tar-1.22</emphasis></para>
|
---|
[d12ae76] | 156 | </listitem>
|
---|
| 157 |
|
---|
[4df39e5] | 158 | <listitem>
|
---|
| 159 | <para><emphasis role="strong">Texinfo-4.7</emphasis></para>
|
---|
| 160 | </listitem>
|
---|
| 161 |
|
---|
[8e771c5] | 162 | <listitem>
|
---|
[44f6add] | 163 | <para><emphasis role="strong">Xz-5.0.0</emphasis></para>
|
---|
[8e771c5] | 164 | </listitem>
|
---|
| 165 |
|
---|
[d12ae76] | 166 | </itemizedlist>
|
---|
| 167 |
|
---|
[72fb9bf] | 168 | <important>
|
---|
| 169 | <para>Note that the symlinks mentioned above are required to build an LFS
|
---|
| 170 | system using the instructions contained within this book. Symlinks that
|
---|
| 171 | point to other software (such as dash, mawk, etc.) may work, but are not
|
---|
| 172 | tested or supported by the LFS development team, and may require either
|
---|
| 173 | deviation from the instructions or additional patches to some
|
---|
| 174 | packages.</para>
|
---|
| 175 | </important>
|
---|
[e4ab232] | 176 |
|
---|
[d659bf4] | 177 | <!-- Use an empty sect2 element to prevent a pdf warning. -->
|
---|
[a04b192f] | 178 | <bridgehead renderas="sect2"
|
---|
| 179 | id="version-check"
|
---|
[72fb9bf] | 180 | xreflabel="Host System Requirements">
|
---|
| 181 | </bridgehead>
|
---|
| 182 | <!--<title> </title>-->
|
---|
[d659bf4] | 183 |
|
---|
| 184 | <para >To see whether your host system has all the appropriate versions, and
|
---|
[86f3868] | 185 | the ability to compile programs, run the following commands:</para>
|
---|
[5e858e7] | 186 |
|
---|
[b179883] | 187 | <screen role="nodump"><userinput>cat > version-check.sh << "EOF"
|
---|
[b789d88] | 188 | <literal>#!/bin/bash
|
---|
[140e9a44] | 189 | # A script to list version numbers of critical development tools
|
---|
| 190 |
|
---|
| 191 | # If you have tools installed in other directories, adjust PATH here AND
|
---|
| 192 | # in ~lfs/.bashrc (section 4.4) as well.
|
---|
| 193 |
|
---|
| 194 | LC_ALL=C
|
---|
| 195 | PATH=/usr/bin:/bin
|
---|
| 196 |
|
---|
| 197 | bail() { echo "FATAL: $1"; exit 1; }
|
---|
| 198 | grep --version > /dev/null 2> /dev/null || bail "grep does not work"
|
---|
| 199 | sed '' /dev/null || bail "sed does not work"
|
---|
| 200 | sort /dev/null || bail "sort does not work"
|
---|
| 201 |
|
---|
| 202 | ver_check()
|
---|
| 203 | {
|
---|
| 204 | if ! type -p $2 &>/dev/null
|
---|
| 205 | then
|
---|
| 206 | echo "ERROR: Cannot find $2 ($1)"; return 1;
|
---|
| 207 | fi
|
---|
[b789d88] | 208 | v=$($2 --version 2>&1 | grep -E -o '[0-9]+\.[0-9\.]+[a-z]*' | head -n1)
|
---|
[140e9a44] | 209 | if printf '%s\n' $3 $v | sort --version-sort --check &>/dev/null
|
---|
| 210 | then
|
---|
| 211 | printf "OK: %-9s %-6s >= $3\n" "$1" "$v"; return 0;
|
---|
| 212 | else
|
---|
| 213 | printf "ERROR: %-9s is TOO OLD ($3 or later required)\n" "$1";
|
---|
| 214 | return 1;
|
---|
| 215 | fi
|
---|
| 216 | }
|
---|
| 217 |
|
---|
| 218 | ver_kernel()
|
---|
| 219 | {
|
---|
[6e4dfa7] | 220 | kver=$(uname -r | grep -E -o '^[0-9\.]+')
|
---|
[140e9a44] | 221 | if printf '%s\n' $1 $kver | sort --version-sort --check &>/dev/null
|
---|
| 222 | then
|
---|
| 223 | printf "OK: Linux Kernel $kver >= $1\n"; return 0;
|
---|
| 224 | else
|
---|
| 225 | printf "ERROR: Linux Kernel ($kver) is TOO OLD ($1 or later required)\n" "$kver";
|
---|
| 226 | return 1;
|
---|
| 227 | fi
|
---|
| 228 | }
|
---|
| 229 |
|
---|
| 230 | # Coreutils first because-sort needs Coreutils >= 7.0
|
---|
| 231 | ver_check Coreutils sort 7.0 || bail "--version-sort unsupported"
|
---|
| 232 | ver_check Bash bash 3.2
|
---|
[cc44a47b] | 233 | ver_check Binutils ld 2.38
|
---|
[140e9a44] | 234 | ver_check Bison bison 2.7
|
---|
| 235 | ver_check Diffutils diff 2.8.1
|
---|
| 236 | ver_check Findutils find 4.2.31
|
---|
| 237 | ver_check Gawk gawk 4.0.1
|
---|
[cc44a47b] | 238 | ver_check GCC gcc 12.2
|
---|
| 239 | ver_check "GCC (C++)" g++ 12.2
|
---|
[b789d88] | 240 | ver_check Grep grep 2.5.1a
|
---|
[140e9a44] | 241 | ver_check Gzip gzip 1.3.12
|
---|
| 242 | ver_check M4 m4 1.4.10
|
---|
| 243 | ver_check Make make 4.0
|
---|
| 244 | ver_check Patch patch 2.5.4
|
---|
| 245 | ver_check Perl perl 5.8.8
|
---|
| 246 | ver_check Python python3 3.4
|
---|
| 247 | ver_check Sed sed 4.1.5
|
---|
| 248 | ver_check Tar tar 1.22
|
---|
| 249 | ver_check Texinfo texi2any 4.7
|
---|
| 250 | ver_check Xz xz 5.0.0
|
---|
[271c856] | 251 | ver_kernel &min-kernel;
|
---|
[140e9a44] | 252 |
|
---|
[835e40c] | 253 | if mount | grep -q 'devpts on /dev/pts' && [ -e /dev/ptmx ]
|
---|
| 254 | then echo "OK: Linux Kernel supports UNIX 98 PTY";
|
---|
| 255 | else echo "ERROR: Linux Kernel does NOT support UNIX 98 PTY"; fi
|
---|
| 256 |
|
---|
[140e9a44] | 257 | alias_check() {
|
---|
| 258 | if $1 --version 2>&1 | grep -qi $2
|
---|
| 259 | then printf "OK: %-4s is $2\n" "$1";
|
---|
| 260 | else printf "ERROR: %-4s is NOT $2\n" "$1"; fi
|
---|
| 261 | }
|
---|
| 262 | echo "Aliases:"
|
---|
| 263 | alias_check awk GNU
|
---|
| 264 | alias_check yacc Bison
|
---|
| 265 | alias_check sh Bash
|
---|
| 266 |
|
---|
[b789d88] | 267 | echo "Compiler check:"
|
---|
[140e9a44] | 268 | if printf "int main(){}" | g++ -x c++ -
|
---|
| 269 | then echo "OK: g++ works";
|
---|
| 270 | else echo "ERROR: g++ does NOT work"; fi
|
---|
| 271 | rm -f a.out</literal>
|
---|
[3d2cea9] | 272 | EOF
|
---|
| 273 |
|
---|
| 274 | bash version-check.sh</userinput></screen>
|
---|
| 275 |
|
---|
[7c92d6d] | 276 | </sect2>
|
---|
[d1ebcc8] | 277 | </sect1>
|
---|