[FE training-materials-updates] yocto: labs: move the network configuration part

Antoine Ténart antoine.tenart at free-electrons.com
Fri Dec 12 15:01:48 CET 2014


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

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

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

commit afbde003eff24b8aebeaa4aad343300f6a5d18cf
Author: Antoine Tenart <antoine.tenart at free-electrons.com>
Date:   Fri Dec 12 14:51:56 2014 +0100

    yocto: labs: move the network configuration part
    
    Signed-off-by: Antoine Tenart <antoine.tenart at free-electrons.com>


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

afbde003eff24b8aebeaa4aad343300f6a5d18cf
 labs/common/setup-ethernet-communication.tex       | 115 ---------------------
 .../network-config-1.png                           | Bin
 .../network-config-2.png                           | Bin
 .../network-config-3.png                           | Bin
 .../yocto-advanced-configuration.tex               |  74 ++++++++++++-
 5 files changed, 73 insertions(+), 116 deletions(-)

diff --git a/labs/common/setup-ethernet-communication.tex b/labs/common/setup-ethernet-communication.tex
deleted file mode 100644
index b309aa8..0000000
--- a/labs/common/setup-ethernet-communication.tex
+++ /dev/null
@@ -1,115 +0,0 @@
-\section{Set up the Ethernet communication}
-
-Later on, we will transfer files from the development workstation to
-the board using the TFTP protocol, which works on top of an Ethernet
-connection.
-
-To start with, install the \code{tftpd-hda} server and create the root TFTP
-directory:
-\begin{verbatim}
-sudo apt-get install tftpd-hpa
-sudo chmod a+rw /var/lib/tftpboot
-\end{verbatim}
-
-Then make sure the \code{tftpd-hpa} server uses the right directory by checking
-the \code{TFTP_DIRECTORY} variable in \code{/etc/default/tftpd-hpa}.
-
-Finally restart the service to make sure all modifications are effective:
-\begin{verbatim}
-sudo service tftpd-hpa restart
-\end{verbatim}
-
-With a network cable, connect the Ethernet port of your board to the
-one of your computer. If your computer already has a wired connection
-to the network, your instructor will provide you with a USB Ethernet
-adapter. A new network interface, probably \code{eth1} or \code{eth2},
-should appear on your Linux system.
-
-To configure this network interface on the workstation side, click on
-the {\em Network Manager} tasklet on your desktop, and select {\em
-  Edit Connections}.
-
-\begin{center}
-\includegraphics[width=8cm]{../labs/common/network-config-1.png}
-\end{center}
-
-Select the new {\em wired network connection}:
-
-\begin{center}
-\includegraphics[width=8cm]{../labs/common/network-config-2.png}
-\end{center}
-
-In the \code{IPv4 Settings} tab, press the \code{Add} button
-and make the interface use a static IP
-address, like \code{192.168.0.1} (of course, make sure that this
-address belongs to a separate network segment from the one of the main
-company network).
-
-\begin{center}
-\includegraphics[width=8cm]{../labs/common/network-config-3.png}
-\end{center}
-
-You can use \code{255.255.255.0} as \code{Netmask}, and leave the
-\code{Gateway} field untouched (if you click on the \code{Gateway} box, you
-will have to type a valid IP address, otherwise you won't be apply to
-click on the \code{Apply} button).
-
-Now, configure the network on the board in U-Boot by setting the \code{ipaddr}
-and \code{serverip} environment variables:
-
-\begin{verbatim}
-setenv ipaddr 192.168.0.100
-setenv serverip 192.168.0.1
-\end{verbatim}
-
-The first time you use your board, you also need to send the MAC address
-in U-boot:
-
-\begin{verbatim}
-setenv ethaddr 01:02:03:04:05:06
-\end{verbatim}
-
-In case the board was previously configured in a different way, we
-also turn off automatic booting after commands that can be used to
-copy a kernel to RAM:
-
-\begin{verbatim}
-setenv autostart no
-\end{verbatim}
-
-To make these settings permanent, save the environment:
-
-\begin{verbatim}
-saveenv
-\end{verbatim}
-
-Now switch your board off and on again\footnote{Power cycling your
-  board is needed to make your \code{ethaddr} permanent, for obscure
-  reasons. If you don't, U-boot will complain that \code{ethaddr} is not
-  set.}.
-
-You can then test the TFTP connection. First, put a small text file in
-the directory exported through TFTP on your development
-workstation. Then, from U-Boot, do:
-
-\begin{verbatim}
-tftp 0x80000000 textfile.txt
-\end{verbatim}
-
-{\bf Caution: known issue in Ubuntu 12.04 and later}:
-if this command doesn't work, you may have to stop the server
-and start it again every time you boot your workstation:
-
-\begin{verbatim}
-sudo service tftpd-hpa restart
-\end{verbatim}
-
-The \code{tftp} command should have downloaded
-the \code{textfile.txt} file from your development
-workstation into the board's memory at location 0x80000000 (this
-location is part of the board DRAM). You can verify that the download
-was successful by dumping the contents of the memory:
-
-\begin{verbatim}
-md 0x80000000
-\end{verbatim}
diff --git a/labs/common/network-config-1.png b/labs/yocto-advanced-configuration/network-config-1.png
similarity index 100%
rename from labs/common/network-config-1.png
rename to labs/yocto-advanced-configuration/network-config-1.png
diff --git a/labs/common/network-config-2.png b/labs/yocto-advanced-configuration/network-config-2.png
similarity index 100%
rename from labs/common/network-config-2.png
rename to labs/yocto-advanced-configuration/network-config-2.png
diff --git a/labs/common/network-config-3.png b/labs/yocto-advanced-configuration/network-config-3.png
similarity index 100%
rename from labs/common/network-config-3.png
rename to labs/yocto-advanced-configuration/network-config-3.png
diff --git a/labs/yocto-advanced-configuration/yocto-advanced-configuration.tex b/labs/yocto-advanced-configuration/yocto-advanced-configuration.tex
index abf2978..7e26efe 100644
--- a/labs/yocto-advanced-configuration/yocto-advanced-configuration.tex
+++ b/labs/yocto-advanced-configuration/yocto-advanced-configuration.tex
@@ -8,7 +8,79 @@ During this lab, you will:
   \item Use the rootfs over NFS
 \end{itemize}
 
-\input{../labs/common/setup-ethernet-communication.tex}
+\section{Set up the Ethernet communication}
+
+Later on, we will mount our root filesystem through the network using
+NFS. This works on top of an Ethernet connection.
+
+With a network cable, connect the Ethernet port of your board to the
+one of your computer. If your computer already has a wired connection
+to the network, your instructor will provide you with a USB Ethernet
+adapter. A new network interface, probably \code{eth1} or \code{eth2},
+should appear on your Linux system.
+
+To configure this network interface on the workstation side, click on
+the {\em Network Manager} tasklet on your desktop, and select {\em
+Edit Connections}.
+
+\begin{center}
+\includegraphics[width=8cm]{../labs/yocto-advanced-configuration/network-config-1.png}
+\end{center}
+
+Select the new {\em wired network connection}:
+
+\begin{center}
+\includegraphics[width=8cm]{../labs/yocto-advanced-configuration/network-config-2.png}
+\end{center}
+
+In the \code{IPv4 Settings} tab, press the \code{Add} button
+and make the interface use a static IP
+address, like \code{192.168.0.1} (of course, make sure that this
+address belongs to a separate network segment from the one of the main
+company network).
+
+\begin{center}
+\includegraphics[width=8cm]{../labs/yocto-advanced-configuration/network-config-3.png}
+\end{center}
+
+You can use \code{255.255.255.0} as \code{Netmask}, and leave the
+\code{Gateway} field untouched (if you click on the \code{Gateway} box, you
+will have to type a valid IP address, otherwise you won't be apply to
+click on the \code{Apply} button).
+
+Now, configure the network on the board in U-Boot by setting the \code{ipaddr}
+and \code{serverip} environment variables:
+
+\begin{verbatim}
+setenv ipaddr 192.168.0.100
+setenv serverip 192.168.0.1
+\end{verbatim}
+
+The first time you use your board, you also need to send the MAC address
+in U-boot:
+
+\begin{verbatim}
+setenv ethaddr 00:01:02:03:04:05
+\end{verbatim}
+
+In case the board was previously configured in a different way, we
+also turn off automatic booting after commands that can be used to
+copy a kernel to RAM:
+
+\begin{verbatim}
+setenv autostart no
+\end{verbatim}
+
+To make these settings permanent, save the environment:
+
+\begin{verbatim}
+saveenv
+\end{verbatim}
+
+Now switch your board off and on again\footnote{Power cycling your
+board is needed to make your \code{ethaddr} permanent, for obscure
+reasons. If you don't, U-boot will complain that \code{ethaddr} is not
+set.}.
 
 \section{Set up the NFS server}
 



More information about the training-materials-updates mailing list