\subchapter{Training setup}{Download files and directories used in practical labs}

\section{Install lab data}

For the different labs in this course, your instructor has prepared a
set of data (kernel images, kernel configurations, root filesystems
and more). Download and extract its tarball from a terminal:


{\scriptsize
{\tt
cd \\
wget \sessionurl/\longname-labs.tar.xz \\
tar xvf \longname-labs.tar.xz \\
}
}

Lab data are now available in an {\tt \longname-labs} directory in
your home directory. For each lab there is a directory containing
various data. This directory will also be used as working space for
each lab, so that the files that you produce during each lab are kept
separate.

You are now ready to start the real practical labs!

\section{Install extra packages}

Feel free to install other packages you may need for your development
environment. In particular, we recommend to install your favorite text
editor and configure it to your taste. The favorite text editors of
embedded Linux developers are of course {\em Vim} and {\em Emacs}, but
there are also plenty of other possibilities, such as {\em GEdit},
{\em Qt Creator}, {\em CodeBlocks}, {\em Geany}, etc.

It is worth mentioning that by default, Ubuntu comes with a very
limited version of the \code{vi} editor. So if you would like to use
\code{vi}, we recommend to use the more featureful version by
installing the \code{vim} package.

\section{More guidelines}

Can be useful throughout any of the labs

\begin{itemize}

\item Read instructions and tips carefully. Lots of people make
  mistakes or waste time because they missed an explanation or a
  guideline.

\item Always read error messages carefully, in particular the first
  one which is issued. Some people stumble on very simple errors just
  because they specified a wrong file path and didn't pay enough
  attention to the corresponding error message.

\item Never stay stuck with a strange problem more than 5
  minutes. Show your problem to your colleagues or to the instructor.

\item You should only use the \code{root} user for operations that require
  super-user privileges, such as: mounting a file system, loading a
  kernel module, changing file ownership, configuring the
  network. Most regular tasks (such as downloading, extracting
  sources, compiling...) can be done as a regular user.

\item If you ran commands from a root shell by mistake, your regular
  user may no longer be able to handle the corresponding generated
  files. In this case, use the \code{chown -R} command to give the new
  files back to your regular user.\\
  Example: \code{chown -R myuser.myuser linux/}

\item If you are using Gnome Terminal (the default terminal emulator
  in the current version of Ubuntu), you can use tabs to have multiple terminals
  in the same window. There's no more menu option to create a new
  tab, but you can get one by pressing the \code{[Ctrl] [Shift] [t]}
  keys.

\end{itemize}

