- Timestamp:
- 02/25/2022 08:47:36 PM (2 years ago)
- Branches:
- arm
- Children:
- 9c0b35a
- Parents:
- b0a6b0c
- Location:
- chapter08
- Files:
-
- 1 added
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter08/adjusting.xml
rb0a6b0c r460f575 53 53 platform-specific differences in the dynamic linker name):</para> 54 54 55 <screen os="c"><computeroutput>[Requesting program interpreter: /lib 64/ld-linux-x86-64.so.2]</computeroutput></screen>55 <screen os="c"><computeroutput>[Requesting program interpreter: /lib/ld-linux-aarch64.so.1]</computeroutput></screen> 56 56 57 57 <para>Note that on 64-bit systems <filename class="directory">/lib</filename> is … … 60 60 61 61 <note><para>On 32-bit systems the interpreter should be 62 /lib/ld-linux .so.2.</para></note>62 /lib/ld-linux-armhf.so.3.</para></note> 63 63 64 64 <para os="d">Now make sure that we're setup to use the correct start files:</para> … … 80 80 81 81 <screen><computeroutput>#include <...> search starts here: 82 /tools/lib/gcc/ x86_64-pc-linux-gnu/&gcc-version;/include82 /tools/lib/gcc/aarch64-pc-linux-gnu/&gcc-version;/include 83 83 /tools/include 84 /tools/lib/gcc/ x86_64-pc-linux-gnu/&gcc-version;/include-fixed84 /tools/lib/gcc/aarch64-pc-linux-gnu/&gcc-version;/include-fixed 85 85 /usr/include</computeroutput></screen> 86 86 87 <note><para>On a 32 bit system, x86_64 is replaced with i686.</para></note>87 <note><para>On a 32 bit system, aarch64 is replaced with an ARM 32bit variant.</para></note> 88 88 89 89 <para os="i">Next, verify that the new linker is being used with the correct search paths:</para> … … 112 112 platform-specific differences in dynamic linker name):</para> 113 113 114 <screen os="s"><computeroutput>found ld-linux- x86-64.so.2 at /usr/lib/ld-linux-x86-64.so.2</computeroutput></screen>114 <screen os="s"><computeroutput>found ld-linux-aarch64.so.1 at /usr/lib/ld-linux-aarch64.so.1</computeroutput></screen> 115 115 116 116 <para os="t">If the output does not appear as shown above or is not received -
chapter08/binutils.xml
rb0a6b0c r460f575 72 72 find -name \*.1 -delete</userinput></screen> 73 73 --> 74 75 <para> 76 Now make a fix identified upstream that affects building some packages: 77 </para> 78 79 <screen><userinput remap="pre">sed -e '/R_386_TLS_LE /i \ || (TYPE) == R_386_TLS_IE \\' \ 80 -i ./bfd/elfxx-x86.h</userinput></screen> 81 74 <!-- 75 <para>Now remove one test that prevents the tests from running 76 to completion:</para> 77 78 <screen><userinput remap="pre">sed -i '/@\tincremental_copy/d' gold/testsuite/Makefile.in</userinput></screen> 79 --> 82 80 <para>The Binutils documentation recommends building Binutils 83 81 in a dedicated build directory:</para> … … 153 151 ultimately be located) is set to <filename 154 152 class="directory">$(exec_prefix)/$(target_alias)</filename>. For 155 example, x86_64 machines would expand that to <filename156 class="directory">/usr/x86_64-pc-linux-gnu</filename>. Because this is 157 153 example, aarch64 machines would expand that to <filename 154 class="directory">/usr/aarch64-unknown-linux-gnu</filename>. Because 155 this is a custom system, this target-specific directory in <filename 158 156 class="directory">/usr</filename> is not required. <filename 159 157 class="directory">$(exec_prefix)/$(target_alias)</filename> would be -
chapter08/chapter08.xml
rb0a6b0c r460f575 35 35 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="mpfr.xml"/> 36 36 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="mpc.xml"/> 37 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="isl.xml"/> 37 38 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="attr.xml"/> 38 39 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="acl.xml"/> -
chapter08/expect.xml
rb0a6b0c r460f575 51 51 <para>Prepare Expect for compilation:</para> 52 52 53 <screen><userinput remap="configure">./configure --prefix=/usr \ 54 --with-tcl=/usr/lib \ 55 --enable-shared \ 56 --mandir=/usr/share/man \ 57 --with-tclinclude=/usr/include</userinput></screen> 53 <screen><userinput remap="configure">./configure --prefix=/usr \ 54 --with-tcl=/usr/lib \ 55 --enable-shared \ 56 --mandir=/usr/share/man \ 57 --with-tclinclude=/usr/include \ 58 --build=$(uname -m)-unknown-linux-gnu</userinput></screen> 58 59 59 60 <variablelist> … … 74 75 <para>This explicitly tells Expect where to find Tcl's internal 75 76 headers.</para> 77 </listitem> 78 </varlistentry> 79 80 <varlistentry> 81 <term><parameter>--build=$(uname -m)-uknown-linux-gnu</parameter></term> 82 <listitem> 83 <para>This tells Expect what the architecture build of the machine 84 is for ARM.</para> 76 85 </listitem> 77 86 </varlistentry> -
chapter08/findutils.xml
rb0a6b0c r460f575 47 47 48 48 <screen><userinput remap="configure">case $(uname -m) in 49 i?86)TIME_T_32_BIT_OK=yes ./configure --prefix=/usr --localstatedir=/var/lib/locate ;;50 x86_64) ./configure --prefix=/usr --localstatedir=/var/lib/locate ;;49 arm) TIME_T_32_BIT_OK=yes ./configure --prefix=/usr --localstatedir=/var/lib/locate ;; 50 aarch64) ./configure --prefix=/usr --localstatedir=/var/lib/locate ;; 51 51 esac</userinput></screen> 52 53 52 <variablelist> 54 53 <title>The meaning of the configure options:</title> -
chapter08/gcc.xml
rb0a6b0c r460f575 50 50 -i libsanitizer/sanitizer_common/sanitizer_posix_libcdep.cpp</userinput></screen> 51 51 52 <para>If building on x86_64, change the default directory name for 64-bit52 <para>If building on aarch64, change the default directory name for 64-bit 53 53 libraries to <quote>lib</quote>:</para> 54 54 55 55 <screen><userinput remap="pre">case $(uname -m) in 56 x86_64)57 sed -e '/m 64=/s/lib64/lib/' \58 -i.orig gcc/config/ i386/t-linux6456 aarch64) 57 sed -e '/mabi.lp64=/s/lib64/lib/' \ 58 -i.orig gcc/config/aarch64/t-aarch64-linux 59 59 ;; 60 60 esac</userinput></screen> … … 222 222 xpointer="xpointer(//*[@os='f'])"/> 223 223 224 <screen><computeroutput>/usr/lib/gcc/ x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crt1.o succeeded225 /usr/lib/gcc/ x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crti.o succeeded226 /usr/lib/gcc/ x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crtn.o succeeded</computeroutput></screen>224 <screen><computeroutput>/usr/lib/gcc/aarch64-unknown-linux-gnu/&gcc-version;/../../../../lib/crt1.o succeeded 225 /usr/lib/gcc/aarch64-unknown-linux-gnu/&gcc-version;/../../../../lib/crti.o succeeded 226 /usr/lib/gcc/aarch64-unknown-linux-gnu/&gcc-version;/../../../../lib/crtn.o succeeded</computeroutput></screen> 227 227 228 228 <para>Depending on your machine architecture, the above may differ slightly. … … 244 244 245 245 <screen><computeroutput>#include <...> search starts here: 246 /usr/lib/gcc/ x86_64-pc-linux-gnu/&gcc-version;/include246 /usr/lib/gcc/aarch-64-unknown-linux-gnu/&gcc-version;/include 247 247 /usr/local/include 248 /usr/lib/gcc/ x86_64-pc-linux-gnu/&gcc-version;/include-fixed248 /usr/lib/gcc/aarch64-unknown-linux-gnu/&gcc-version;/include-fixed 249 249 /usr/include</computeroutput></screen> 250 250 … … 264 264 xpointer="xpointer(//*[@os='k'])"/> 265 265 266 <screen><computeroutput>SEARCH_DIR("/usr/ x86_64-pc-linux-gnu/lib64")266 <screen><computeroutput>SEARCH_DIR("/usr/aarch64-unknown-linux-gnu/lib64") 267 267 SEARCH_DIR("/usr/local/lib64") 268 268 SEARCH_DIR("/lib64") 269 269 SEARCH_DIR("/usr/lib64") 270 SEARCH_DIR("/usr/ x86_64-pc-linux-gnu/lib")270 SEARCH_DIR("/usr/aarch64-unknown-linux-gnu/lib") 271 271 SEARCH_DIR("/usr/local/lib") 272 272 SEARCH_DIR("/lib") … … 274 274 275 275 <para>A 32-bit system may see a few different directories. For example, here 276 is the output from an i686 machine:</para> 277 278 <screen><computeroutput>SEARCH_DIR("/usr/i686-pc-linux-gnu/lib32") 279 SEARCH_DIR("/usr/local/lib32") 280 SEARCH_DIR("/lib32") 281 SEARCH_DIR("/usr/lib32") 282 SEARCH_DIR("/usr/i686-pc-linux-gnu/lib") 276 is the output from a 32bit ARM machine:</para> 277 278 <screen><computeroutput>SEARCH_DIR("/usr/armv6l-unknown-linux-gnueabihf/lib") 283 279 SEARCH_DIR("/usr/local/lib") 284 280 SEARCH_DIR("/lib") … … 352 348 libgcc_s.so, libgcov.a, libgomp.{a,so}, libitm.{a,so}, 353 349 liblsan.{a,so}, liblto_plugin.so, 354 lib quadmath.{a,so}, libssp.{a,so}, libssp_nonshared.a,350 libssp.{a,so}, libssp_nonshared.a, 355 351 libstdc++.{a,so}, libstdc++fs.a, libsupc++.a, libtsan.{a,so}, 356 352 and libubsan.{a,so}</seg> -
chapter08/glibc.xml
rb0a6b0c r460f575 50 50 -i sysdeps/unix/sysv/linux/mq_notify.c</userinput></screen> 51 51 --> 52 52 53 <para>Some of the Glibc programs use the non-FHS compliant 53 54 <filename class="directory">/var/db</filename> directory to store … … 140 141 <!-- Use remap="make" here to work around a jhalfs issue. --> 141 142 <!--<screen><userinput remap="make">case $(uname -m) in 142 i?86) ln -sfnv $PWD/elf/ld-linux.so.2/lib ;;143 x86_64) ln -sfnv $PWD/elf/ld-linux-x86-64.so.2/lib ;;143 arm*) ln -sfnv $PWD/elf/ld-linux-armhf.so.3 /lib ;; 144 aarch64) ln -sfnv $PWD/elf/ld-linux-aarch64.so.1 /lib ;; 144 145 esac</userinput></screen> 145 146 … … 434 435 435 436 <para>By default, the dynamic loader (<filename 436 class="libraryfile">/lib/ld-linux.so.2</filename>) searches through 437 class="libraryfile">/lib/ld-linux-armhf.so.3 438 /lib/ld-linux-aarch64.so.1</filename>) searches through 437 439 <filename class="directory">/lib</filename> and <filename 438 440 class="directory">/usr/lib</filename> for dynamic libraries that are … … 483 485 <seg>gencat, getconf, getent, iconv, iconvconfig, ldconfig, 484 486 ldd, lddlibc4, 485 ld.so (symlink to ld-linux-x86-64.so.2 or ld-linux.so.2), 486 locale, localedef, makedb, mtrace, nscd, 487 locale, localedef, makedb, mtrace, ncsd, 487 488 pcprofiledump, pldd, sln, sotruss, sprof, tzselect, xtrace, 488 489 zdump, and zic</seg> 489 <seg>ld-linux- x86-64.so.2, ld-linux.so.2,490 <seg>ld-linux-aarch64.so.1 or ld-linux{,-armhf}.so.3, 490 491 libBrokenLocale.{a,so}, libanl.{a,so}, 491 492 libc.{a,so}, libc_nonshared.a, libc_malloc_debug.so, -
chapter08/gmp.xml
rb0a6b0c r460f575 43 43 44 44 <note> 45 <para>If you are building for 32-bit x86, but you have a CPU which is45 <para>If you are building for 32-bit arm, but you have a CPU which is 46 46 capable of running 64-bit code <emphasis>and</emphasis> you have specified 47 47 <envar>CFLAGS</envar> in the environment, the configure script will … … 107 107 applications using the gmp libraries with the message "Illegal 108 108 instruction". In this case, gmp should be reconfigured with the option 109 --build= x86_64-pc-linux-gnu and rebuilt.</para></caution>109 --build=aarch64-unknown-linux-gnu and rebuilt.</para></caution> 110 110 111 111 <para>Ensure that all 197 tests in the test suite passed. -
chapter08/grub.xml
rb0a6b0c r460f575 51 51 </note> 52 52 53 <note> 54 <para> 55 GRUB2 with EFI support can be used with some devices, like the 56 Odroid-C2, and maybe others. Two stage loading is done where the 57 first grub.cfg can be found by U-boot, and act as a pointer to 58 the real grub.cfg with the menu. More info may be found at 59 <ulink url="http://rglinuxtech.com/?p=2595">this page</ulink>. 60 </para> 61 </note> 62 53 63 <para>Prepare GRUB for compilation:</para> 54 64 -
chapter08/libcap.xml
rb0a6b0c r460f575 60 60 <para>This parameter sets the library directory to 61 61 <filename>/usr/lib</filename> rather than 62 <filename>/usr/lib64</filename> on x86_64. It has no effect on63 x86.</para>62 <filename>/usr/lib64</filename> on aarch64. It has no effect on 63 arm.</para> 64 64 </listitem> 65 65 </varlistentry> -
chapter08/libffi.xml
rb0a6b0c r460f575 70 70 system, use the less capable system as a parameter. For details 71 71 about alternative system types, see <ulink 72 url='https://gcc.gnu.org/onlinedocs/gcc-&gcc-version;/gcc/ x86-Options.html'>73 the x86options in the GCC manual</ulink>.</para>72 url='https://gcc.gnu.org/onlinedocs/gcc-&gcc-version;/gcc/ARM-Options.html'> 73 the ARM options in the GCC manual</ulink>.</para> 74 74 </listitem> 75 75 </varlistentry> -
chapter08/readline.xml
rb0a6b0c r460f575 52 52 <para>Prepare Readline for compilation:</para> 53 53 54 <screen><userinput remap="configure">./configure --prefix=/usr \ 54 <screen><userinput remap="configure">./configure --prefix=/usr \ 55 --disable-bracketed-paste-default \ 55 56 --disable-static \ 56 57 --with-curses \ … … 67 68 termcap library. It allows generating a correct 68 69 <filename>readline.pc</filename> file.</para> 70 </listitem> 71 </varlistentry> 72 73 <varlistentry> 74 <term><parameter>--disable-bracketed-paste-default</parameter></term> 75 <listitem> 76 <para>Bracketed paste mode is enabled by default. Set this default 77 to off. Omit this configure option if bracketed paste is 78 desired.</para> 69 79 </listitem> 70 80 </varlistentry> -
chapter08/stripping.xml
rb0a6b0c r460f575 41 41 rationale to use the <command>install</command> command here.</para> 42 42 43 <note><para>The ELF loader's name is ld-linux- x86-64.so.2on 64-bit systems44 and ld-linux .so.2on 32-bit systems. The contruct below selects the43 <note><para>The ELF loader's name is ld-linux-aarch64.so.1 on 64-bit systems 44 and ld-linux-armhf.so.3 on 32-bit systems. The contruct below selects the 45 45 correct name for the current architecture.</para></note> 46 46 … … 51 51 libc.so.6 52 52 libthread_db.so.1 53 libquadmath.so.&libquadmath-version;54 53 libstdc++.so.&libstdcpp-version; 55 54 libitm.so.&libitm-version; -
chapter08/tcl.xml
rb0a6b0c r460f575 65 65 ./configure --prefix=/usr \ 66 66 --mandir=/usr/share/man \ 67 $([ "$(uname -m)" = x86_64 ] && echo --enable-64bit)</userinput></screen>67 $([ "$(uname -m)" = aarch64 ] && echo --enable-64bit)</userinput></screen> 68 68 69 69 <variablelist> … … 71 71 72 72 <varlistentry> 73 <term><parameter>$([ "$(uname -m)" = x86_64 ] && echo --enable-64bit)</parameter></term>73 <term><parameter>$([ "$(uname -m)" = aarch64 ] && echo --enable-64bit)</parameter></term> 74 74 <listitem> 75 75 <para>The construct <parameter>$(<shell command>)</parameter> -
chapter08/util-linux.xml
rb0a6b0c r460f575 512 512 </varlistentry> 513 513 514 <varlistentry id="i386">515 <term><command>i386</command></term>516 <listitem>517 <para>A symbolic link to setarch</para>518 <indexterm zone="ch-system-util-linux i386">519 <primary sortas="b-i386">i386</primary>520 </indexterm>521 </listitem>522 </varlistentry>523 524 514 <varlistentry id="ionice"> 525 515 <term><command>ionice</command></term> … … 1260 1250 </varlistentry> 1261 1251 1262 <varlistentry id="x86_64">1263 <term><command>x86_64</command></term>1264 <listitem>1265 <para>A symbolic link to setarch</para>1266 <indexterm zone="ch-system-util-linux x86_64">1267 <primary sortas="b-x86_64">x86_64</primary>1268 </indexterm>1269 </listitem>1270 </varlistentry>1271 1272 1252 <varlistentry id="zramctl"> 1273 1253 <term><command>zramctl</command></term>
Note:
See TracChangeset
for help on using the changeset viewer.