From 4cdc6168cf18f03e2996637c07fbe5a61a37b4c6 Mon Sep 17 00:00:00 2001 From: Michael Opdenacker Date: Tue, 23 Feb 2021 12:01:18 +0100 Subject: [PATCH] Further updates about the tftp server home directory - It is now on /srv/tftp if /srv exists on your system Signed-off-by: Michael Opdenacker --- labs/kernel-board-setup/kernel-board-setup.tex | 10 ++++++---- .../kernel-compiling-and-nfs-booting.tex | 8 ++++---- .../yocto-advanced-configuration-stm32.tex | 5 +++-- .../yocto-advanced-configuration.tex | 3 ++- 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/labs/kernel-board-setup/kernel-board-setup.tex b/labs/kernel-board-setup/kernel-board-setup.tex index b729ddd17..c5526246a 100644 --- a/labs/kernel-board-setup/kernel-board-setup.tex +++ b/labs/kernel-board-setup/kernel-board-setup.tex @@ -217,10 +217,12 @@ \section{Setting up the TFTP server} sudo apt install tftpd-hpa \end{verbatim} -Once the package is installed, open \code{/etc/default/tftpd-hpa} with your favorite -text editor, and make sure that the TFTP directory is set to \code{TFTP_DIRECTORY=/var/lib/tftpboot/}. +Once the package is installed, view the contents of +\code{/etc/default/tftpd-hpa}, and check what the TFTP server home directory +(\code{TFTP_DIRECTORY} setting). If \code{/srv} exists on your system, +it should be \code{/srv/tftp}, otherwise \code{/var/lib/tftpboot/}. -If you need to make a change, then save the changes and restart the TFTP server: +If you wish to make a change to this file, you will have to restart the TFTP server: \begin{verbatim} sudo /etc/init.d/tftpd-hpa restart @@ -229,7 +231,7 @@ \section{Setting up the TFTP server} \section{Testing the network connection} You can then test the TFTP connection. First, put a small text -file in \code{/var/lib/tftpboot}. Then, from U-Boot, do: +file in TFTP server home directory. Then, from U-Boot, do: \begin{verbatim} tftp 0x81000000 textfile.txt 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 86b8b967d..9caeeca07 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 @@ -98,7 +98,7 @@ \section{Kernel compiling} Now, copy the \code{zImage} and \code{am335x-boneblack.dtb} or \code{am335x-boneblack-wireless.dtb} files -to the TFTP server home directory (\code{/var/lib/tftpboot}). +to the TFTP server home directory (as specified in \code{/etc/default/tftpd-hpa}). \section{Setting up the NFS server} @@ -189,15 +189,15 @@ \section{Checking the kernel version} It's often a good idea to make sure you booted the right kernel. By mistake, you could have booted a kernel previously stored in flash -(typically through a default boot command in U-Boot), or forgotten to -update the kernel image in \code{/var/lib/tftpboot}. +(typically through a default boot command in U-Boot), or forgotten to +update the kernel image in the TFTP server home directory. This could explain some unexpected behavior. There are two ways of checking your kernel version: \begin{itemize} \item By looking at the first kernel messages -\item By running the \code{uname -a} command after booting Linux. +\item By running the \code{uname -a} command after booting Linux. \end{itemize} In both cases, you will not only know the kernel version, but also diff --git a/labs/yocto-advanced-configuration-stm32/yocto-advanced-configuration-stm32.tex b/labs/yocto-advanced-configuration-stm32/yocto-advanced-configuration-stm32.tex index 5beb6ae72..f3763a06e 100644 --- a/labs/yocto-advanced-configuration-stm32/yocto-advanced-configuration-stm32.tex +++ b/labs/yocto-advanced-configuration-stm32/yocto-advanced-configuration-stm32.tex @@ -179,10 +179,11 @@ \section{Going further} \begin{enumerate} -\item Install a TFTP server (package \code{tftpd-hpa}) on your system. +\item Install a TFTP server (package \code{tftpd-hpa}) on your system. \item Copy the Linux kernel image and Device Tree to - \code{/var/lib/tftpboot} so that they are made available by the TFTP + the TFTP server home directory (specified in + \code{/etc/default/tftpd-hpa}) so that they are made available by the TFTP server. \item Change the U-Boot \code{bootcmd} to load the kernel image and diff --git a/labs/yocto-advanced-configuration/yocto-advanced-configuration.tex b/labs/yocto-advanced-configuration/yocto-advanced-configuration.tex index 8b011b4c9..574f2aebe 100644 --- a/labs/yocto-advanced-configuration/yocto-advanced-configuration.tex +++ b/labs/yocto-advanced-configuration/yocto-advanced-configuration.tex @@ -176,7 +176,8 @@ \section{Going further} \item Install a TFTP server (package \code{tftpd-hpa}) on your system. \item Copy the Linux kernel image and Device Tree to - \code{/var/lib/tftpboot} so that they are made available by the TFTP + the TFTP server home directory (specified in + \code{/etc/default/tftpd-hpa}) so that they are made available by the TFTP server. \item Change the U-Boot \code{bootcmd} to load the kernel image and