[FE training-materials-updates] common: Split labs generation

Maxime Ripard maxime.ripard at free-electrons.com
Tue Jul 22 18:32:07 CEST 2014


Repository : git://git.free-electrons.com/training-materials.git

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

>---------------------------------------------------------------

commit d78430efaa53fa9b5a0db34350b54588232d0cf1
Author: Maxime Ripard <maxime.ripard at free-electrons.com>
Date:   Tue Jul 22 18:09:29 2014 +0200

    common: Split labs generation
    
    gen-lab-archive now takes the training name as an argument, and will generate
    an archive named labs-<training>.tar.xz, holding only the files related to that
    training.
    
    Signed-off-by: Maxime Ripard <maxime.ripard at free-electrons.com>


>---------------------------------------------------------------

d78430efaa53fa9b5a0db34350b54588232d0cf1
 gen-lab-archive                                    |   22 ++++++--
 labs/android-adb/android-adb.tex                   |    2 +-
 labs/android-application/android-application.tex   |    2 +-
 labs/android-boot/android-boot.tex                 |   10 ++--
 .../android-first-compilation.tex                  |    4 +-
 labs/android-jni-library/android-jni-library.tex   |    4 +-
 labs/android-native-app/android-native-app.tex     |    2 +-
 labs/android-new-board/android-new-board.tex       |    4 +-
 labs/android-source-code/android-source-code.tex   |    4 +-
 labs/kernel-board-setup/kernel-board-setup.tex     |    2 +-
 .../kernel-compiling-and-nfs-booting.tex           |    6 +-
 labs/kernel-debugging/kernel-debugging.tex         |    4 +-
 labs/kernel-git/kernel-git.tex                     |    2 +-
 .../kernel-i2c-communication.tex                   |    4 +-
 .../kernel-i2c-device-model.tex                    |    4 +-
 labs/kernel-module-simple/kernel-module-simple.tex |    6 +-
 labs/kernel-serial-iomem/kernel-serial-iomem.tex   |    2 +-
 labs/kernel-serial-output/kernel-serial-output.tex |    2 +-
 .../kernel-sources-download.tex                    |    4 +-
 .../kernel-sources-exploring.tex                   |    2 +-
 .../sysdev-application-debugging.tex               |    2 +-
 .../sysdev-application-development.tex             |    4 +-
 .../sysdev-block-filesystems.tex                   |    2 +-
 labs/sysdev-buildroot/sysdev-buildroot.tex         |    2 +-
 .../sysdev-flash-filesystems.tex                   |    4 +-
 .../sysdev-kernel-cross-compiling.tex              |    2 +-
 .../sysdev-kernel-fetch-and-patch.tex              |    2 +-
 labs/sysdev-real-time/sysdev-real-time.tex         |   12 ++--
 labs/sysdev-thirdparty/sysdev-thirdparty.tex       |   58 ++++++++++----------
 labs/sysdev-tinysystem/sysdev-tinysystem.tex       |    8 +--
 labs/sysdev-toolchain/sysdev-toolchain.tex         |    2 +-
 labs/sysdev-u-boot/sysdev-u-boot.tex               |    2 +-
 32 files changed, 102 insertions(+), 90 deletions(-)

diff --git a/gen-lab-archive b/gen-lab-archive
index c305e65..c9c06d6 100755
--- a/gen-lab-archive
+++ b/gen-lab-archive
@@ -20,6 +20,18 @@ if [ ! -d lab-data ]; then
    exit 1
 fi
 
+if [ -z $1 ]; then
+    $ECHO "ERROR: training name missing"
+    exit 1
+fi
+
+if ! ls lab-data | grep -q $1; then
+    $ECHO "ERROR: not a valid training name"
+    exit 1
+fi
+
+FELABS=felabs-$1
+
 # Updating repo
 
 $ECHO "Git repository update..."
@@ -28,24 +40,24 @@ $GIT pull
 # Copy lab data
 
 $ECHO "Copying data from the git repository"
-$RSYNC --exclude=.git -a --delete lab-data/ felabs/
+$RSYNC --exclude=.git -a --delete lab-data/$1/ $FELABS
 
 # Uncompress compressed files
 
 $ECHO "Extracting tar.xz archives (root permissions needed for device files)"
 
-for f in `$FIND felabs -name "*.tar.xz"`; do
+for f in `$FIND $FELABS -name "*.tar.xz"`; do
 	$SUDO $TAR -C `dirname $f` -Jxf $f
 	$RM $f
 done
 
-$SUDO $CHOWN -R $USER.$USER felabs
+$SUDO $CHOWN -R $USER.$USER $FELABS
 
 $ECHO "Uncompressing other .xz files"
-$FIND felabs -name "*.xz" -exec $UNXZ {} ';' 
+$FIND $FELABS -name "*.xz" -exec $UNXZ {} ';'
 
 # Create the final archive
 
 $ECHO "Creating the final archive..."
-$TAR Jcf labs.tar.xz felabs 
+$TAR Jcf labs-$1.tar.xz $FELABS
 
diff --git a/labs/android-adb/android-adb.tex b/labs/android-adb/android-adb.tex
index f4aaad9..24d28dd 100644
--- a/labs/android-adb/android-adb.tex
+++ b/labs/android-adb/android-adb.tex
@@ -10,7 +10,7 @@ After this lab, you will be able to use ADB to:
 
 \section{Setup}
 
-Stay in the \code{$HOME/felabs/android/source} directory.
+Stay in the \code{$HOME/felabs-android/source} directory.
 
 \section{Get ADB}
 
diff --git a/labs/android-application/android-application.tex b/labs/android-application/android-application.tex
index a2440b8..162b8ac 100644
--- a/labs/android-application/android-application.tex
+++ b/labs/android-application/android-application.tex
@@ -9,7 +9,7 @@ After this lab, you will be able to:
 
 \section{Write the application}
 
-Go to the \code{$HOME/felabs/android/app} directory.
+Go to the \code{$HOME/felabs-android/app} directory.
 
 You will find the basics for the \code{MissileControl} app. This app is incomplete,
 parts of some activities are missing. However the UI part is
diff --git a/labs/android-boot/android-boot.tex b/labs/android-boot/android-boot.tex
index 16d8be1..25df62b 100644
--- a/labs/android-boot/android-boot.tex
+++ b/labs/android-boot/android-boot.tex
@@ -9,7 +9,7 @@ After this lab, you will be able to:
 
 \section{Setup}
 
-Go to the \code{$HOME/felabs/android/} directory.
+Go to the \code{$HOME/felabs-android/} directory.
 
 \section{Compile a kernel for the Android emulator}
 
@@ -35,7 +35,7 @@ Now that we have kernel sources, we now need a toolchain to compile
 the kernel. Fortunately, Android provides one. First, add the
 toolchain from the previous lab to your \code{PATH}.
 
-\code{PATH=$HOME/felabs/android/source/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin:$PATH}
+\code{PATH=$HOME/felabs-android/source/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin:$PATH}
 
 Now, configure the kernel for the target platform
 
@@ -55,7 +55,7 @@ have to restore the environment that you had after building Android
 from sources. This is needed every time you reboot your workstation,
 and every time you work with a new terminal.
 
-Go back to \code{$HOME/felabs/android/source}.
+Go back to \code{$HOME/felabs-android/source}.
 
 All you need to do is source the environment and run the \code{lunch}
 command to specify which product you're working with
@@ -74,7 +74,7 @@ To run the emulator with your own kernel, you can use the
 \code{-kernel} option:
 
 \begin{verbatim}
-emulator -kernel $HOME/felabs/android/kernel/arch/arm/boot/zImage
+emulator -kernel $HOME/felabs-android/kernel/arch/arm/boot/zImage
 \end{verbatim}
 
 Once again, check the kernel version in the Android settings. Make
@@ -82,7 +82,7 @@ sure that the kernel was built today.
 
 \section{Generate a patchset from the Android Kernel}
 
-Go back to the \code{$HOME/felabs/android/kernel} directory.
+Go back to the \code{$HOME/felabs-android/kernel} directory.
 
 To compare the Android kernel sources with the official kernel ones,
 we need to fetch the latter sources too, allowing us to see which
diff --git a/labs/android-first-compilation/android-first-compilation.tex b/labs/android-first-compilation/android-first-compilation.tex
index 1856545..1e3c0d5 100644
--- a/labs/android-first-compilation/android-first-compilation.tex
+++ b/labs/android-first-compilation/android-first-compilation.tex
@@ -52,7 +52,7 @@ export CCACHE_DIR=/opt/ccache
 \end{verbatim}
 or, depending on your setup,
 \begin{verbatim}
-export CCACHE_DIR=$HOME/felabs/android/ccache
+export CCACHE_DIR=$HOME/felabs-android/ccache
 \end{verbatim}
 
 And that's it!
@@ -108,7 +108,7 @@ Now, look at the \code{PATH} environment variable again.
 You can see that it contains:
 \begin{itemize}
 \item
-  \code{$HOME/felabs/android/source/out/host/linux-x86/bin/}.
+  \code{$HOME/felabs-android/source/out/host/linux-x86/bin/}.
   That's where new utilities have just been compiled.
 \item Prebuilt executables, in particular the ARM cross-compiling
   toolchain, which was already present in the repositories fetched by
diff --git a/labs/android-jni-library/android-jni-library.tex b/labs/android-jni-library/android-jni-library.tex
index 9013814..1c1c833 100644
--- a/labs/android-jni-library/android-jni-library.tex
+++ b/labs/android-jni-library/android-jni-library.tex
@@ -12,7 +12,7 @@ After this lab, you will be able to
 The code should be pretty close to the one you wrote in the native
 application lab, so you will find a skeleton of the folder to
 integrate into your product definition in the
-\code{$HOME/felabs/android/jni} directory. Copy the \code{frameworks}
+\code{$HOME/felabs-android/jni} directory. Copy the \code{frameworks}
 folder you will find there into your device folder.
 
 You will mostly have to modify function prototypes from your previous
@@ -42,7 +42,7 @@ We should now have a system with the files
 \code{/system/lib/libusb.so}.
 
 Test what you did so far by using the \code{TestJNI.apk} application
-you'll find in the \code{felabs/android} directory.
+you'll find in the \code{felabs-android} directory.
 
 Install it using adb, and run it.
 
diff --git a/labs/android-native-app/android-native-app.tex b/labs/android-native-app/android-native-app.tex
index c84cfff..af992b8 100644
--- a/labs/android-native-app/android-native-app.tex
+++ b/labs/android-native-app/android-native-app.tex
@@ -9,7 +9,7 @@ After this lab, you will be able to:
 
 \section{Add the binary to the compiled image}
 Copy the \code{bin} folder from the
-\code{$HOME/felabs/android/native-app} directory and put it into your
+\code{$HOME/felabs-android/native-app} directory and put it into your
 device folder.
 
 
diff --git a/labs/android-new-board/android-new-board.tex b/labs/android-new-board/android-new-board.tex
index a8d0f27..bc6793e 100644
--- a/labs/android-new-board/android-new-board.tex
+++ b/labs/android-new-board/android-new-board.tex
@@ -11,7 +11,7 @@ After this lab, you will be able to:
 \section{Download the source code}
 
 Go to the directory holding the Android source code (either
-\code{/opt/android} or \code{$HOME/felabs/android/source}).
+\code{/opt/android} or \code{$HOME/felabs-android/source}).
 
 While still using AOSP, we will use the configuration done in
 TI-flavored Android build named \emph{rowboat}. This should make most
@@ -103,7 +103,7 @@ Make sure we are using \code{ccache}:
 
 \begin{verbatim}
 export USE_CCACHE=1
-export CCACHE_DIR=$HOME/felabs/android/ccache
+export CCACHE_DIR=$HOME/felabs-android/ccache
 \end{verbatim}
 or, depending on your setup,
 \begin{verbatim}
diff --git a/labs/android-source-code/android-source-code.tex b/labs/android-source-code/android-source-code.tex
index 36430b6..b9ac13c 100644
--- a/labs/android-source-code/android-source-code.tex
+++ b/labs/android-source-code/android-source-code.tex
@@ -22,7 +22,7 @@ cd android
 \end{verbatim}
 
 If you don't have that much space available, go to the
-\code{$HOME/felabs/android/source} directory.
+\code{$HOME/felabs-android/source} directory.
 
 \section{Install needed packages}
 
@@ -133,5 +133,5 @@ them once again, you don't have to actually cache them.
 
 Ask your trainer for a pre-filled ccache archive that we will use to
 speed up a lot the compilation. Once you have retrieved the archive,
-extract it in either the \code{/opt/} or \code{$HOME/felabs/android/}
+extract it in either the \code{/opt/} or \code{$HOME/felabs-android/}
 directories.
diff --git a/labs/kernel-board-setup/kernel-board-setup.tex b/labs/kernel-board-setup/kernel-board-setup.tex
index e80b5db..d60a3b8 100644
--- a/labs/kernel-board-setup/kernel-board-setup.tex
+++ b/labs/kernel-board-setup/kernel-board-setup.tex
@@ -119,7 +119,7 @@ Some earlier versions do not support this.}
 
 If you are doing these labs on your own (i.e. without participating to a Free Electrons
 course), we ask you to install the U-Boot binary that we compiled and
-tested. See the \code{$HOME/felabs/kernel/bootloader/beaglebone-black/README.txt}
+tested. See the \code{$HOME/felabs-kernel/bootloader/beaglebone-black/README.txt}
 file for a simple way to do this.
 
 To avoid trouble because of settings applied in previous practical labs,
diff --git a/labs/kernel-compiling-and-nfs-booting/kernel-compiling-and-nfs-booting.tex b/labs/kernel-compiling-and-nfs-booting/kernel-compiling-and-nfs-booting.tex
index 7bffc7e..0e449e2 100644
--- a/labs/kernel-compiling-and-nfs-booting/kernel-compiling-and-nfs-booting.tex
+++ b/labs/kernel-compiling-and-nfs-booting/kernel-compiling-and-nfs-booting.tex
@@ -38,7 +38,7 @@ accessed through the network by the target, using NFS.
 
 \section{Setup}
 
-Go to the \code{$HOME/felabs/kernel/src/linux} directory.
+Go to the \code{$HOME/felabs-kernel/src/linux} directory.
 
 Install packages needed for configuring, compiling and booting
 the kernel for your board:
@@ -116,7 +116,7 @@ of your board will be \code{192.168.0.100}:
 
 \scriptsize
 \begin{verbatim}
-/home/<user>/felabs/kernel/modules/nfsroot 192.168.0.100(rw,no_root_squash,no_subtree_check)
+/home/<user>/felabs-kernel/modules/nfsroot 192.168.0.100(rw,no_root_squash,no_subtree_check)
 \end{verbatim}
 \normalsize
 
@@ -142,7 +142,7 @@ just one line, pay attention to the \code{O} character, like "OMAP", in
 
 \begin{verbatim}
 setenv bootargs root=/dev/nfs rw ip=192.168.0.100 console=ttyO0
-  nfsroot=192.168.0.1:/home/<user>/felabs/kernel/modules/nfsroot
+  nfsroot=192.168.0.1:/home/<user>/felabs-kernel/modules/nfsroot
 saveenv
 \end{verbatim}
 
diff --git a/labs/kernel-debugging/kernel-debugging.tex b/labs/kernel-debugging/kernel-debugging.tex
index 76eb0a6..900b1f9 100644
--- a/labs/kernel-debugging/kernel-debugging.tex
+++ b/labs/kernel-debugging/kernel-debugging.tex
@@ -61,7 +61,7 @@ that have been transmitted by your driver.
 
 \subsection{Setup}
 
-Go to the \code{~/felabs/kernel/modules/nfsroot/root/debugging/} directory.
+Go to the \code{~/felabs-kernel/modules/nfsroot/root/debugging/} directory.
 
 Make sure your kernel is built with the following options:
 
@@ -101,7 +101,7 @@ If the function source code is not enough, then you can look at the
 disassembled version of the function, either using:
 
 \begin{verbatim}
-cd ~/felabs/kernel/src/linux/
+cd ~/felabs-kernel/src/linux/
 arm-linux-gnueabi-objdump -S vmlinux > vmlinux.disasm
 \end{verbatim}
 
diff --git a/labs/kernel-git/kernel-git.tex b/labs/kernel-git/kernel-git.tex
index 021e94e..2397560 100644
--- a/labs/kernel-git/kernel-git.tex
+++ b/labs/kernel-git/kernel-git.tex
@@ -12,7 +12,7 @@ After this lab, you will be able to:
 
 \section{Setup}
 
-Go to your kernel source tree in \code{~/felabs/kernel/src/linux}
+Go to your kernel source tree in \code{~/felabs-kernel/src/linux}
 
 \section{Exploring the history}
 
diff --git a/labs/kernel-i2c-communication/kernel-i2c-communication.tex b/labs/kernel-i2c-communication/kernel-i2c-communication.tex
index 5020fa1..64f04fc 100644
--- a/labs/kernel-i2c-communication/kernel-i2c-communication.tex
+++ b/labs/kernel-i2c-communication/kernel-i2c-communication.tex
@@ -10,9 +10,9 @@ After this lab, you will be able to:
 
 \section{Setup}
 
-Stay in the \code{~/felabs/kernel/src/linux} directory for kernel and DTB
+Stay in the \code{~/felabs-kernel/src/linux} directory for kernel and DTB
 compiling (stay in the \code{nunchuk} branch), and in
-\code{~/felabs/kernel/modules/nfsroot/root/nunchuk} for module compiling
+\code{~/felabs-kernel/modules/nfsroot/root/nunchuk} for module compiling
 (use two different terminals).
 
 \section{Find pin muxing configuration information for i2c1}
diff --git a/labs/kernel-i2c-device-model/kernel-i2c-device-model.tex b/labs/kernel-i2c-device-model/kernel-i2c-device-model.tex
index ac7d494..cd01a00 100644
--- a/labs/kernel-i2c-device-model/kernel-i2c-device-model.tex
+++ b/labs/kernel-i2c-device-model/kernel-i2c-device-model.tex
@@ -16,7 +16,7 @@ device/driver match.
 
 \section{Setup}
 
-Go to the \code{~/felabs/kernel/src/linux} directory. Check out the
+Go to the \code{~/felabs-kernel/src/linux} directory. Check out the
 \code{3.13.y} branch. 
 
 Now create a new \code{nunchuk} branch starting from the
@@ -134,7 +134,7 @@ It is now time to start writing the first building blocks of the I2C
 driver for our nunchuk.
 
 In a new terminal, go to
-\code{~/felabs/kernel/modules/nfsroot/root/nunchuk/}.  This directory
+\code{~/felabs-kernel/modules/nfsroot/root/nunchuk/}.  This directory
 contains a Makefile and an almost empty \code{nunchuk.c} file.
 
 Now, you can compile your out-of-tree module by running \code{make}. As
diff --git a/labs/kernel-module-simple/kernel-module-simple.tex b/labs/kernel-module-simple/kernel-module-simple.tex
index 6ddf351..345c541 100644
--- a/labs/kernel-module-simple/kernel-module-simple.tex
+++ b/labs/kernel-module-simple/kernel-module-simple.tex
@@ -12,7 +12,7 @@ After this lab, you will be able to:
 
 \section{Setup}
 
-Go to the \code{~/felabs/kernel/modules/nfsroot/root/hello} directory.
+Go to the \code{~/felabs-kernel/modules/nfsroot/root/hello} directory.
 Boot your board if needed.
 
 \section{Writing a module}
@@ -87,7 +87,7 @@ Run the \code{scripts/checkpatch.pl -h} command in the kernel sources,
 to find which options are available.  Now, run:
 
 \begin{verbatim}
-~/felabs/kernel/src/linux/scripts/checkpatch.pl --file --no-tree hello_version.c
+~/felabs-kernel/src/linux/scripts/checkpatch.pl --file --no-tree hello_version.c
 \end{verbatim}
 
 See how many violations are reported on your code. If there are
@@ -138,7 +138,7 @@ Then, commit your changes in the current branch (try to choose an
 appropriate commit message):
 
 \begin{verbatim}
-cd ~/felabs/kernel/src/linux
+cd ~/felabs-kernel/src/linux
 git add -A
 git commit -as
 \end{verbatim}
diff --git a/labs/kernel-serial-iomem/kernel-serial-iomem.tex b/labs/kernel-serial-iomem/kernel-serial-iomem.tex
index 790e1f3..6d3988c 100644
--- a/labs/kernel-serial-iomem/kernel-serial-iomem.tex
+++ b/labs/kernel-serial-iomem/kernel-serial-iomem.tex
@@ -76,7 +76,7 @@ Rebuild and update your DTB.
 
 \section{Operate a platform device driver}
 
-Go to the \code{~/felabs/kernel/modules/nfsroot/root/serial/} directory.
+Go to the \code{~/felabs-kernel/modules/nfsroot/root/serial/} directory.
 You will find a \code{feserial.c} file which already provides a platform
 driver skeleton.
 
diff --git a/labs/kernel-serial-output/kernel-serial-output.tex b/labs/kernel-serial-output/kernel-serial-output.tex
index 62ed30a..e10693c 100644
--- a/labs/kernel-serial-output/kernel-serial-output.tex
+++ b/labs/kernel-serial-output/kernel-serial-output.tex
@@ -108,7 +108,7 @@ weird assumptions about the {\em misc} framework.}
       changes. Commit these if they correspond to useful changes (these 
       should be your Device Tree edits).
 \item Apply the new patch using the following command:
-      \code{git am ~/felabs/kernel/src/patches/0001-char-misc*.patch}
+      \code{git am ~/felabs-kernel/src/patches/0001-char-misc*.patch}
 \item Rebuild and update your kernel image and reboot.
 \end{itemize}
 
diff --git a/labs/kernel-sources-download/kernel-sources-download.tex b/labs/kernel-sources-download/kernel-sources-download.tex
index 3014e63..4ff9db1 100644
--- a/labs/kernel-sources-download/kernel-sources-download.tex
+++ b/labs/kernel-sources-download/kernel-sources-download.tex
@@ -3,7 +3,7 @@ mainline Linux kernel source tree}
 
 \section{Setup}
 
-Go to the \code{$HOME/felabs/kernel/src} directory.
+Go to the \code{$HOME/felabs-kernel/src} directory.
 
 \section{Installing git packages}
 
@@ -89,7 +89,7 @@ tree, and fetch only the commits which are specific to that remote tree.
 
 {\footnotesize
 \begin{verbatim}
-cd ~/felabs/kernel/src/linux/
+cd ~/felabs-kernel/src/linux/
 git remote add stable git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
 git fetch stable
 \end{verbatim}
diff --git a/labs/kernel-sources-exploring/kernel-sources-exploring.tex b/labs/kernel-sources-exploring/kernel-sources-exploring.tex
index ea392c7..76380e9 100644
--- a/labs/kernel-sources-exploring/kernel-sources-exploring.tex
+++ b/labs/kernel-sources-exploring/kernel-sources-exploring.tex
@@ -22,7 +22,7 @@ running.
 First, let's get the list of branches on our \code{stable} remote tree:
 
 \begin{verbatim}
-cd ~/felabs/kernel/src/linux
+cd ~/felabs-kernel/src/linux
 git branch -a
 \end{verbatim} 
 
diff --git a/labs/sysdev-application-debugging/sysdev-application-debugging.tex b/labs/sysdev-application-debugging/sysdev-application-debugging.tex
index 6cc5dcc..f6f040a 100644
--- a/labs/sysdev-application-debugging/sysdev-application-debugging.tex
+++ b/labs/sysdev-application-debugging/sysdev-application-debugging.tex
@@ -6,7 +6,7 @@
 
 \section{Setup}
 
-Go to the \code{$HOME/felabs/sysdev/debugging} directory.
+Go to the \code{$HOME/felabs-sysdev/debugging} directory.
 
 \section{Debugging setup}
 
diff --git a/labs/sysdev-application-development/sysdev-application-development.tex b/labs/sysdev-application-development/sysdev-application-development.tex
index 0ecd7c0..b34427b 100644
--- a/labs/sysdev-application-development/sysdev-application-development.tex
+++ b/labs/sysdev-application-development/sysdev-application-development.tex
@@ -3,7 +3,7 @@
 
 \section{Setup}
 
-Go to the \code{$HOME/felabs/sysdev/appdev} directory.
+Go to the \code{$HOME/felabs-sysdev/appdev} directory.
 
 \section{Compile your own application}
 
@@ -35,7 +35,7 @@ Let's add this directory to our PATH:
 
 \footnotesize
 \begin{verbatim}
-export PATH=$HOME/felabs/sysdev/buildroot/buildroot-XXXX.YY/output/host/usr/bin:$PATH
+export PATH=$HOME/felabs-sysdev/buildroot/buildroot-XXXX.YY/output/host/usr/bin:$PATH
 \end{verbatim}
 \normalsize
 
diff --git a/labs/sysdev-block-filesystems/sysdev-block-filesystems.tex b/labs/sysdev-block-filesystems/sysdev-block-filesystems.tex
index 0d438b3..9ba7269 100644
--- a/labs/sysdev-block-filesystems/sysdev-block-filesystems.tex
+++ b/labs/sysdev-block-filesystems/sysdev-block-filesystems.tex
@@ -19,7 +19,7 @@ this MMC card, without using NFS anymore.
 \section{Setup}
 
 Throughout this lab, we will continue to use the root filesystem we
-have created in the \code{$HOME/felabs/sysdev/tinysystem/nfsroot}
+have created in the \code{$HOME/felabs-sysdev/tinysystem/nfsroot}
 directory, which we will progressively adapt to use block filesystems.
 
 \section{Filesystem support in the kernel}
diff --git a/labs/sysdev-buildroot/sysdev-buildroot.tex b/labs/sysdev-buildroot/sysdev-buildroot.tex
index a39d249..4efca25 100644
--- a/labs/sysdev-buildroot/sysdev-buildroot.tex
+++ b/labs/sysdev-buildroot/sysdev-buildroot.tex
@@ -5,7 +5,7 @@
 
 \section{Setup}
 
-Go to the \code{$HOME/felabs/sysdev/buildroot/} directory,
+Go to the \code{$HOME/felabs-sysdev/buildroot/} directory,
 which already contains some data needed for this lab, including a
 kernel image.
 
diff --git a/labs/sysdev-flash-filesystems/sysdev-flash-filesystems.tex b/labs/sysdev-flash-filesystems/sysdev-flash-filesystems.tex
index 3f7ed87..554cff2 100644
--- a/labs/sysdev-flash-filesystems/sysdev-flash-filesystems.tex
+++ b/labs/sysdev-flash-filesystems/sysdev-flash-filesystems.tex
@@ -8,7 +8,7 @@ After this lab, you will be able to:
 
 \section{Setup}
 
-Stay in \code{$HOME/felabs/sysdev/tinysystem}. Install the
+Stay in \code{$HOME/felabs-sysdev/tinysystem}. Install the
 \code{mtd-utils} package, which will be useful to create JFFS2
 filesystem images.
 
@@ -30,7 +30,7 @@ be:
 
 Apply the \code{0001-ARM-omap-switch-back-to-SW-ECC-on-IGEP.patch}
 patch available in the
-\code{$HOME/felabs/sysdev/flash-filesystems/data} directory to your
+\code{$HOME/felabs-sysdev/flash-filesystems/data} directory to your
 kernel tree. This is a Device Tree patch that fixes a problem
 of the 3.11.x/3.12 kernel, which caused the kernel to use a
 different ECC scheme than the U-Boot bootloader, making it
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 157a724..4d06cb8 100644
--- a/labs/sysdev-kernel-cross-compiling/sysdev-kernel-cross-compiling.tex
+++ b/labs/sysdev-kernel-cross-compiling/sysdev-kernel-cross-compiling.tex
@@ -11,7 +11,7 @@ After this lab, you will be able to:
 
 \section{Setup}
 
-Go to the \code{$HOME/felabs/sysdev/kernel} directory.
+Go to the \code{$HOME/felabs-sysdev/kernel} directory.
 
 Install the following packages: \code{libqt4-dev} and
 \code{u-boot-tools}. \code{libqt4-dev} is needed for the
diff --git a/labs/sysdev-kernel-fetch-and-patch/sysdev-kernel-fetch-and-patch.tex b/labs/sysdev-kernel-fetch-and-patch/sysdev-kernel-fetch-and-patch.tex
index 8ffd5fd..17dcbbf 100644
--- a/labs/sysdev-kernel-fetch-and-patch/sysdev-kernel-fetch-and-patch.tex
+++ b/labs/sysdev-kernel-fetch-and-patch/sysdev-kernel-fetch-and-patch.tex
@@ -9,7 +9,7 @@ After this lab, you will be able to:
 
 \section{Setup}
 
-Create the \code{$HOME/felabs/sysdev/kernel} directory and go into it.
+Create the \code{$HOME/felabs-sysdev/kernel} directory and go into it.
 
 \section{Get the sources}
 
diff --git a/labs/sysdev-real-time/sysdev-real-time.tex b/labs/sysdev-real-time/sysdev-real-time.tex
index 42c2940..7585f38 100644
--- a/labs/sysdev-real-time/sysdev-real-time.tex
+++ b/labs/sysdev-real-time/sysdev-real-time.tex
@@ -13,7 +13,7 @@ POSIX real-time API, and against Xenomai's POSIX skin.
 
 \section{Setup}
 
-Go to the \code{$HOME/felabs/sysdev/realtime/rttest} directory.
+Go to the \code{$HOME/felabs-sysdev/realtime/rttest} directory.
 
 If you are using a 64 bit installation of Ubuntu, install support for
 executables built with a 32 bit C library:
@@ -139,7 +139,7 @@ Let's configure our \code{PATH} to use this toolchain:
 
 \begin{verbatim}
 export
-PATH=$HOME/felabs/sysdev/realtime/rttest/buildroot-2013.02/output/host/usr/bin:$PATH
+PATH=$HOME/felabs-sysdev/realtime/rttest/buildroot-2013.02/output/host/usr/bin:$PATH
 \end{verbatim}
 
 Have a look at the \code{rttest.c} source file available in \code{root/} in
@@ -191,7 +191,7 @@ the results.
 
 Prepare the kernel for Xenomai compilation:
 \begin{verbatim}
-cd $HOME/felabs/sysdev/realtime/rttest/buildroot-2013.02/
+cd $HOME/felabs-sysdev/realtime/rttest/buildroot-2013.02/
 ./output/build/xenomai-2.6.2.1/scripts/prepare-kernel.sh \
    --arch=arm --linux=/path/to/linux-3.5.7
 \end{verbatim}
@@ -212,7 +212,7 @@ source directory, and force Buildroot to build the host variant of
 {\em pkg-config}:
 
 \begin{verbatim}
-cd $HOME/felabs/sysdev/realtime/rttest/buildroot-2013.02/
+cd $HOME/felabs-sysdev/realtime/rttest/buildroot-2013.02/
 make host-pkgconf
 \end{verbatim}
 
@@ -221,8 +221,8 @@ compile \code{rttest} for the Xenomai POSIX skin:
 
 \small
 \begin{verbatim}
-cd $HOME/felabs/sysdev/realtime/rttest/nfsroot/root
-export PATH=$HOME/felabs/sysdev/realtime/rttest/buildroot-2013.02/output/host/usr/bin:$PATH
+cd $HOME/felabs-sysdev/realtime/rttest/nfsroot/root
+export PATH=$HOME/felabs-sysdev/realtime/rttest/buildroot-2013.02/output/host/usr/bin:$PATH
 arm-none-linux-gnueabi-gcc -o rttest rttest.c $(pkg-config --libs --cflags libxenomai_posix)
 \end{verbatim}
 \normalsize
diff --git a/labs/sysdev-thirdparty/sysdev-thirdparty.tex b/labs/sysdev-thirdparty/sysdev-thirdparty.tex
index b24668b..9089d2c 100644
--- a/labs/sysdev-thirdparty/sysdev-thirdparty.tex
+++ b/labs/sysdev-thirdparty/sysdev-thirdparty.tex
@@ -79,7 +79,7 @@ To sum up, the {\em staging} space will contain everything that's
 needed for compilation, while the {\em target} space will contain only
 what's needed for execution.
 
-So, in \code{$HOME/felabs/sysdev/thirdparty}, create two
+So, in \code{$HOME/felabs-sysdev/thirdparty}, create two
 directories: \code{staging} and \code{target}.
 
 For the target, we need a basic system with BusyBox, device nodes and
@@ -88,7 +88,7 @@ initialization scripts. We will re-use the system built in the {\em A
 directory:
 
 \begin{verbatim}
-sudo cp -a $HOME/felabs/sysdev/tinysystem/nfsroot/* target/
+sudo cp -a $HOME/felabs-sysdev/tinysystem/nfsroot/* target/
 \end{verbatim}
 
 The copy must be done as \code{root}, because the root filesystem of
@@ -101,7 +101,7 @@ by adding the following line to \code{/etc/exports}:
 
 \scriptsize
 \begin{verbatim}
-/home/<user>/felabs/sysdev/thirdparty/target 172.20.0.2(rw,no_root_squash,no_subtree_check)
+/home/<user>/felabs-sysdev/thirdparty/target 172.20.0.2(rw,no_root_squash,no_subtree_check)
 \end{verbatim}
 \normalsize
 
@@ -122,7 +122,7 @@ The system should boot and give you a prompt.
 
 \code{Zlib} is a compression/decompression library available at
 \url{http://www.zlib.net/}. Download version 1.2.5, and extract it in
-\code{$HOME/felabs/sysdev/thirdparty/}.
+\code{$HOME/felabs-sysdev/thirdparty/}.
 
 By looking at the \code{configure} script, we see that this configure
 script has not been generated by \code{autoconf} (otherwise it would
@@ -258,12 +258,12 @@ Do not confuse the {\em prefix} (where the application or library will
 be running on the target system) from the location where the
 application or library will be installed on your host while building
 the root filesystem. For example, zlib will be installed in
-\code{$HOME/felabs/sysdev/thirdparty/target/usr/lib/} because
+\code{$HOME/felabs-sysdev/thirdparty/target/usr/lib/} because
 this is the directory where we are building the root filesystem, but
 once our target system will be running, it will see zlib in
 \code{/usr/lib}. The prefix corresponds to the path in the target
 system and {\bf never} on the host. So, one should {\bf never} pass a
-prefix like \code{$HOME/felabs/sysdev/thirdparty/target/usr},
+prefix like \code{$HOME/felabs-sysdev/thirdparty/target/usr},
 otherwise at runtime, the application or library may look for files
 inside this directory on the target system, which obviously doesn't
 exist! By default, most build systems will install the application or
@@ -408,7 +408,7 @@ configure script:
 Let's use this \code{LDFLAGS} variable:
 
 \begin{verbatim}
-LDFLAGS=-L$HOME/felabs/sysdev/thirdparty/staging/usr/lib \
+LDFLAGS=-L$HOME/felabs-sysdev/thirdparty/staging/usr/lib \
 CC=arm-linux-gcc \
 ./configure --host=arm-linux
 \end{verbatim}
@@ -417,7 +417,7 @@ Let's also specify the prefix, so that the library is compiled to be
 installed in \code{/usr} and not \code{/usr/local}:
 
 \begin{verbatim}
- LDFLAGS=-L$HOME/felabs/sysdev/thirdparty/staging/usr/lib \
+ LDFLAGS=-L$HOME/felabs-sysdev/thirdparty/staging/usr/lib \
  CC=arm-linux-gcc \
 ./configure --host=arm-linux --prefix=/usr
 \end{verbatim}
@@ -445,8 +445,8 @@ can be found: there are not in the default directory
 Let's use it:
 
 \begin{verbatim}
-LDFLAGS=-L$HOME/felabs/sysdev/thirdparty/staging/usr/lib \
-CPPFLAGS=-I$HOME/felabs/sysdev/thirdparty/staging/usr/include \
+LDFLAGS=-L$HOME/felabs-sysdev/thirdparty/staging/usr/lib \
+CPPFLAGS=-I$HOME/felabs-sysdev/thirdparty/staging/usr/include \
 CC=arm-linux-gcc \
 ./configure --host=arm-linux --prefix=/usr
 \end{verbatim}
@@ -564,7 +564,7 @@ So, we have:
 Now, let's make the installation in the {\em staging} space:
 
 \begin{verbatim}
-make DESTDIR=$HOME/felabs/sysdev/thirdparty/staging/ install
+make DESTDIR=$HOME/felabs-sysdev/thirdparty/staging/ install
 \end{verbatim}
 
 Then, let's install only the necessary files in the {\em target}
@@ -601,7 +601,7 @@ Installation to the {\em staging} space can be done using the
 classical \code{DESTDIR} mechanism:
 
 \begin{verbatim}
-make DESTDIR=$HOME/felabs/sysdev/thirdparty/staging/ install
+make DESTDIR=$HOME/felabs-sysdev/thirdparty/staging/ install
 \end{verbatim}
 
 And finally, install manually the only needed files at runtime in the
@@ -639,7 +639,7 @@ make
 Install it in the {\em staging} space:
 
 \begin{verbatim}
-make DESTDIR=$HOME/felabs/sysdev/thirdparty/staging/ install
+make DESTDIR=$HOME/felabs-sysdev/thirdparty/staging/ install
 \end{verbatim}
 
 And install only the required files in the {\em target} space:
@@ -708,8 +708,8 @@ are. So let's configure again with:
 
 \small
 \begin{verbatim}
-LDFLAGS=-L$HOME/felabs/sysdev/thirdparty/staging/usr/lib \
-CPPFLAGS=-I$HOME/felabs/sysdev/thirdparty/staging/usr/include \
+LDFLAGS=-L$HOME/felabs-sysdev/thirdparty/staging/usr/lib \
+CPPFLAGS=-I$HOME/felabs-sysdev/thirdparty/staging/usr/include \
 CC=arm-linux-gcc \
 ./configure --host=arm-linux --prefix=/usr \
  --with-gfxdrivers=none --with-inputdrivers=keyboard,linuxinput
@@ -754,7 +754,7 @@ explained in the manual page of \code{pkg-config}.
 
 Moreover, the \code{.pc} files contain references to paths. For
 example, in
-\code{$HOME/felabs/sysdev/thirdparty/staging/usr/lib/pkgconfig/freetype2.pc},
+\code{$HOME/felabs-sysdev/thirdparty/staging/usr/lib/pkgconfig/freetype2.pc},
 we can see:
 
 \begin{verbatim}
@@ -777,10 +777,10 @@ variables:
 
 \small
 \begin{verbatim}
-LDFLAGS=-L$HOME/felabs/sysdev/thirdparty/staging/usr/lib \
-CPPFLAGS=-I$HOME/felabs/sysdev/thirdparty/staging/usr/include \
-PKG_CONFIG_PATH=$HOME/felabs/sysdev/thirdparty/staging/usr/lib/pkgconfig \
-PKG_CONFIG_SYSROOT_DIR=$HOME/felabs/sysdev/thirdparty/staging \
+LDFLAGS=-L$HOME/felabs-sysdev/thirdparty/staging/usr/lib \
+CPPFLAGS=-I$HOME/felabs-sysdev/thirdparty/staging/usr/include \
+PKG_CONFIG_PATH=$HOME/felabs-sysdev/thirdparty/staging/usr/lib/pkgconfig \
+PKG_CONFIG_SYSROOT_DIR=$HOME/felabs-sysdev/thirdparty/staging \
 CC=arm-linux-gcc \
 ./configure --host=arm-linux --prefix=/usr \
  --with-gfxdrivers=none --with-inputdrivers=keyboard,linuxinput
@@ -791,8 +791,8 @@ Ok, now, the lines related to Libpng and FreeType 2 looks much better:
 
 \footnotesize
 \begin{verbatim}
-PNG       yes -I/home/<user>/felabs/sysdev/thirdparty/staging/usr/include/libpng14 -lpng14
-FreeType2 yes -I/home/<user>/felabs/sysdev/thirdparty/staging/usr/include/freetype2 -lfreetype
+PNG       yes -I/home/<user>/felabs-sysdev/thirdparty/staging/usr/include/libpng14 -lpng14
+FreeType2 yes -I/home/<user>/felabs-sysdev/thirdparty/staging/usr/include/freetype2 -lfreetype
 \end{verbatim}
 \normalsize
 
@@ -832,7 +832,7 @@ This happens because the {\em libtool} \code{.la} files in your
 staging area need to be fixed to describe the right paths in this
 staging area. So, in the .la files, replace \code{libdir='/usr/lib'}
 by
-\code{libdir='/home/<user>/felabs/sysdev/thirdparty/staging/usr/lib'}. Restart
+\code{libdir='/home/<user>/felabs-sysdev/thirdparty/staging/usr/lib'}. Restart
 the build again, preferably from scratch (\code{make clean} then
 \code{make}) to be sure everything is fine.
 
@@ -841,7 +841,7 @@ Finally, it builds!
 Now, install DirectFB to the {\em staging} space using:
 
 \begin{verbatim}
-make DESTDIR=$HOME/felabs/sysdev/thirdparty/staging/ install
+make DESTDIR=$HOME/felabs-sysdev/thirdparty/staging/ install
 \end{verbatim}
 
 And so the installation in the {\em target} space:
@@ -888,10 +888,10 @@ Then, we configure it just as we configured DirectFB:
 
 \small
 \begin{verbatim}
-LDFLAGS=-L$HOME/felabs/sysdev/thirdparty/staging/usr/lib \
-CPPFLAGS=-I$HOME/felabs/sysdev/thirdparty/staging/usr/include \
-PKG_CONFIG_PATH=$HOME/felabs/sysdev/thirdparty/staging/usr/lib/pkgconfig \
-PKG_CONFIG_SYSROOT_DIR=$HOME/felabs/sysdev/thirdparty/staging \
+LDFLAGS=-L$HOME/felabs-sysdev/thirdparty/staging/usr/lib \
+CPPFLAGS=-I$HOME/felabs-sysdev/thirdparty/staging/usr/include \
+PKG_CONFIG_PATH=$HOME/felabs-sysdev/thirdparty/staging/usr/lib/pkgconfig \
+PKG_CONFIG_SYSROOT_DIR=$HOME/felabs-sysdev/thirdparty/staging \
 CC=arm-linux-gcc \
 ./configure --host=arm-linux --prefix=/usr
 \end{verbatim}
@@ -928,7 +928,7 @@ variable):
 
 \begin{verbatim}
 make STRIP=arm-linux-strip \
-     DESTDIR=$HOME/felabs/sysdev/thirdparty/target/ install-strip
+     DESTDIR=$HOME/felabs-sysdev/thirdparty/target/ install-strip
 \end{verbatim}
 
 \section{Final setup}
diff --git a/labs/sysdev-tinysystem/sysdev-tinysystem.tex b/labs/sysdev-tinysystem/sysdev-tinysystem.tex
index 04f0fd9..1edfd3b 100644
--- a/labs/sysdev-tinysystem/sysdev-tinysystem.tex
+++ b/labs/sysdev-tinysystem/sysdev-tinysystem.tex
@@ -35,12 +35,12 @@ target to test the impact of script or application updates.
 
 \section{Setup}
 
-Go to the \code{$HOME/felabs/sysdev/tinysystem/} directory.
+Go to the \code{$HOME/felabs-sysdev/tinysystem/} directory.
 
 \section{Kernel configuration}
 
 We will re-use the kernel sources from our previous lab, in
-\code{$HOME/felabs/sysdev/kernel/}.
+\code{$HOME/felabs-sysdev/kernel/}.
 
 In the kernel configuration built in the previous lab, verify that you
 have all options needed for booting the system using a root filesystem
@@ -60,7 +60,7 @@ IP address of your board will be \code{192.168.0.100}:
 
 \footnotesize
 \begin{verbatim}
-/home/<user>/felabs/sysdev/tinysystem/nfsroot 192.168.0.100(rw,no_root_squash,no_subtree_check)
+/home/<user>/felabs-sysdev/tinysystem/nfsroot 192.168.0.100(rw,no_root_squash,no_subtree_check)
 \end{verbatim}
 \normalsize
 
@@ -87,7 +87,7 @@ Use the following U-Boot command to do so, {\bf in just 1 line}
 
 \begin{verbatim}
 setenv bootargs console=ttyO2,115200 root=/dev/nfs ip=192.168.0.100
-   nfsroot=192.168.0.1:/home/<user>/felabs/sysdev/tinysystem/nfsroot rw
+   nfsroot=192.168.0.1:/home/<user>/felabs-sysdev/tinysystem/nfsroot rw
 \end{verbatim}
 
 Of course, you need to adapt the IP addresses to your exact network
diff --git a/labs/sysdev-toolchain/sysdev-toolchain.tex b/labs/sysdev-toolchain/sysdev-toolchain.tex
index 89908c5..3119493 100644
--- a/labs/sysdev-toolchain/sysdev-toolchain.tex
+++ b/labs/sysdev-toolchain/sysdev-toolchain.tex
@@ -11,7 +11,7 @@ After this lab, you will be able to:
 
 \section{Setup}
 
-Go to the \code{$HOME/felabs/sysdev/toolchain} directory.
+Go to the \code{$HOME/felabs-sysdev/toolchain} directory.
 
 \section{Install needed packages}
 
diff --git a/labs/sysdev-u-boot/sysdev-u-boot.tex b/labs/sysdev-u-boot/sysdev-u-boot.tex
index 298a54e..f47604c 100644
--- a/labs/sysdev-u-boot/sysdev-u-boot.tex
+++ b/labs/sysdev-u-boot/sysdev-u-boot.tex
@@ -28,7 +28,7 @@ start up a OMAP3-based board without having anything installed on it.
 
 \section{Setup}
 
-Go to the \code{~/felabs/sysdev/bootloader} directory. 
+Go to the \code{~/felabs-sysdev/bootloader} directory.
 
 \section{MMC/SD card setup}
 



More information about the training-materials-updates mailing list