Skip to content

Commit

Permalink
Further updates about the tftp server home directory
Browse files Browse the repository at this point in the history
- It is now on /srv/tftp if /srv exists on your system

Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
  • Loading branch information
michaelopdenacker committed Feb 23, 2021
1 parent 9e581dd commit 4cdc616
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
10 changes: 6 additions & 4 deletions labs/kernel-board-setup/kernel-board-setup.tex
Expand Up @@ -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
Expand All @@ -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
Expand Down
Expand Up @@ -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}
Expand Down Expand Up @@ -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
Expand Down
Expand Up @@ -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
Expand Down
Expand Up @@ -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
Expand Down

0 comments on commit 4cdc616

Please sign in to comment.