[FE training-materials-updates] Toolchains: use default install directories

Michael Opdenacker michael.opdenacker at free-electrons.com
Mon May 23 17:20:18 CEST 2016

Repository : git://git.free-electrons.com/training-materials.git
On branch  : master
Link       : http://git.free-electrons.com/training-materials/commit/?id=35ae281b0810612e2d958fc26d2b540c62dfd922


commit 35ae281b0810612e2d958fc26d2b540c62dfd922
Author: Michael Opdenacker <michael.opdenacker at free-electrons.com>
Date:   Mon May 23 17:20:18 2016 +0200

    Toolchains: use default install directories
    This avoids potential issues compiling the toolchain
    and simplifies instructions.
    - We keep the default path for toolchain installation
      (in $HOME/x-tools/${CT_TARGET})
      That removes a common source of problems (many people
      keep the default "x-tools" directory name, and have
      trouble with directory ownership.
    - We do not create the $HOME/src/ directory, in which
      case another default location is used for downloads
      (which is created automatically)
    Signed-off-by: Michael Opdenacker <michael.opdenacker at free-electrons.com>


 labs/sysdev-buildroot/sysdev-buildroot.tex               |  2 +-
 .../sysdev-kernel-cross-compiling.tex                    |  2 +-
 labs/sysdev-toolchain/sysdev-toolchain.tex               | 16 +++++-----------
 slides/sysdev-busybox/sysdev-busybox.tex                 |  2 +-
 4 files changed, 8 insertions(+), 14 deletions(-)

diff --git a/labs/sysdev-buildroot/sysdev-buildroot.tex b/labs/sysdev-buildroot/sysdev-buildroot.tex
index 1788a74..0baa66f 100644
--- a/labs/sysdev-buildroot/sysdev-buildroot.tex
+++ b/labs/sysdev-buildroot/sysdev-buildroot.tex
@@ -79,7 +79,7 @@ button whenever you need more details about a given option:
   \item \code{Toolchain type}: \code{External toolchain}
   \item \code{Toolchain}: \code{Custom toolchain}
   \item \code{Toolchain path}: use the toolchain you built:
-    \code{/usr/local/xtools/arm-cortexa5-linux-uclibcgnueabihf}
+    \code{/home/<user>/x-tools/arm-cortexa5-linux-uclibcgnueabihf}
   \item \code{External toolchain gcc version}: \code{5.x}
   \item \code{External toolchain kernel headers series}: \code{4.4.x}
   \item \code{External toolchain C library}: \code{uClibc}
diff --git a/labs/sysdev-kernel-cross-compiling/sysdev-kernel-cross-compiling.tex b/labs/sysdev-kernel-cross-compiling/sysdev-kernel-cross-compiling.tex
index 033aebd..186b290 100644
--- a/labs/sysdev-kernel-cross-compiling/sysdev-kernel-cross-compiling.tex
+++ b/labs/sysdev-kernel-cross-compiling/sysdev-kernel-cross-compiling.tex
@@ -34,7 +34,7 @@ toolchain. We will use the cross-compiling toolchain that we
 previously produced, so we just need to make it available in the PATH:
-export PATH=/usr/local/xtools/arm-cortexa5-linux-uclibcgnueabihf/bin:$PATH
+export PATH=$HOME/x-tools/arm-cortexa5-linux-uclibcgnueabihf/bin:$PATH
 Also, don't forget to either:
diff --git a/labs/sysdev-toolchain/sysdev-toolchain.tex b/labs/sysdev-toolchain/sysdev-toolchain.tex
index 06c8168..6a6fad0 100644
--- a/labs/sysdev-toolchain/sysdev-toolchain.tex
+++ b/labs/sysdev-toolchain/sysdev-toolchain.tex
@@ -87,9 +87,6 @@ Then, to refine the configuration, let's run the \code{menuconfig} interface:
 In \code{Path and misc options}:
-\item Change \code{Prefix directory} to
-  \code{/usr/local/xtools/${CT_TARGET}}. This is the place where
-  the toolchain will be installed.
 \item Change \code{Maximum log level to see} to \code{DEBUG} so that we can have more
   details on what happened during the build in case something went wrong.
@@ -129,18 +126,15 @@ toolchain configuration.
 \section{Produce the toolchain}
-First, create the directory \code{/usr/local/xtools/} and change its
-owner to your user, so that Crosstool-ng can write to it.
-Then, create the directory \code{$HOME/src} in which Crosstool-NG
-will save the tarballs it will download.
 Nothing is simpler:
 ./ct-ng build
+The toolchain will be installed by default in \code{$HOME/x-tools/}.
+That's something you could have changed in Crosstool-ng's configuration.
 And wait!
 \subsection{Known issues}
@@ -163,7 +157,7 @@ downloaded.
 \section{Testing the toolchain}
 You can now test your toolchain by adding
-\code{/usr/local/xtools/arm-cortexa5-linux-uclibcgnueabihf/bin/} to your
+\code{$HOME/x-tools/arm-cortexa5-linux-uclibcgnueabihf/bin/} to your
 \code{PATH} environment variable and compiling the simple
 \code{hello.c} program in your main lab directory with
@@ -181,4 +175,4 @@ To save about 7 GB of storage space, do a \code{./ct-ng clean} in the
 Crosstool-NG source directory. This will remove the source code of the
 different toolchain components, as well as all the generated files
 that are now useless since the toolchain has been installed in
diff --git a/slides/sysdev-busybox/sysdev-busybox.tex b/slides/sysdev-busybox/sysdev-busybox.tex
index 60a0605..940744c 100644
--- a/slides/sysdev-busybox/sysdev-busybox.tex
+++ b/slides/sysdev-busybox/sysdev-busybox.tex
@@ -132,7 +132,7 @@
     \code{BusyBox Settings ->  Installation Options ->  BusyBox
       installation prefix}
   \item Add the cross-compiler path to the PATH environment variable:\\
-    \code{export PATH=/usr/xtools/arm-unknown-linux-uclibcgnueabi/bin:$PATH}
+    \code{export PATH=/home/<user>/x-tools/arm-unknown-linux-uclibcgnueabi/bin:$PATH}
   \item Compile BusyBox:\\
   \item Install it (this creates a Unix directory structure symbolic

More information about the training-materials-updates mailing list