[FE training-materials-updates] Document U-boot's editenv command and suggest to use it
Michael Opdenacker
michael.opdenacker at free-electrons.com
Mon Feb 3 06:03:31 CET 2014
Repository : git://git.free-electrons.com/training-materials.git
On branch : master
Link : http://git.free-electrons.com/training-materials/commit/?id=13424cb83f9bb49338389d37609129d3fe209a8f
>---------------------------------------------------------------
commit 13424cb83f9bb49338389d37609129d3fe209a8f
Author: Michael Opdenacker <michael.opdenacker at free-electrons.com>
Date: Mon Feb 3 06:02:00 2014 +0100
Document U-boot's editenv command and suggest to use it
Signed-off-by: Michael Opdenacker <michael.opdenacker at free-electrons.com>
>---------------------------------------------------------------
13424cb83f9bb49338389d37609129d3fe209a8f
labs/android-new-board/android-new-board.tex | 7 +++++
labs/sysdev-tinysystem/sysdev-tinysystem.tex | 3 ++
.../sysdev-bootloaders-u-boot.tex | 33 +++++++++++++-------
3 files changed, 31 insertions(+), 12 deletions(-)
diff --git a/labs/android-new-board/android-new-board.tex b/labs/android-new-board/android-new-board.tex
index 24efd5a..042a792 100644
--- a/labs/android-new-board/android-new-board.tex
+++ b/labs/android-new-board/android-new-board.tex
@@ -321,6 +321,13 @@ setenv bootargs console=ttyO0,115200 root=/dev/nfs ip=192.168.0.100
Of course, you need to adapt the IP addresses to your exact network
setup. Save the environment variables (with \code{saveenv}).
+If you later want to make changes to this setting, you can type the
+below command in U-boot:
+
+\begin{verbatim}
+editenv bootargs
+\end{verbatim}
+
Now, boot your system. The kernel should be able to mount the root
filesystem over NFS:
diff --git a/labs/sysdev-tinysystem/sysdev-tinysystem.tex b/labs/sysdev-tinysystem/sysdev-tinysystem.tex
index 53d031c..20df0b4 100644
--- a/labs/sysdev-tinysystem/sysdev-tinysystem.tex
+++ b/labs/sysdev-tinysystem/sysdev-tinysystem.tex
@@ -93,6 +93,9 @@ setenv bootargs console=ttyO2,115200 root=/dev/nfs ip=192.168.0.100
Of course, you need to adapt the IP addresses to your exact network
setup. Save the environment variables (with \code{saveenv}).
+You will later need to make changes to the \code{bootargs} value.
+Don't forget you can do this with the \code{editenv} command.
+
Now, boot your system. The kernel should be able to mount the root
filesystem over NFS:
diff --git a/slides/sysdev-bootloaders-u-boot/sysdev-bootloaders-u-boot.tex b/slides/sysdev-bootloaders-u-boot/sysdev-bootloaders-u-boot.tex
index 2fb98d4..5540434 100644
--- a/slides/sysdev-bootloaders-u-boot/sysdev-bootloaders-u-boot.tex
+++ b/slides/sysdev-bootloaders-u-boot/sysdev-bootloaders-u-boot.tex
@@ -231,27 +231,36 @@ U-Boot 2013.04 (May 29 2013 - 10:30:21)
\end{frame}
\begin{frame}
- \frametitle{Environment variables commands}
+ \frametitle{Environment variables commands (1)}
\begin{itemize}
\item U-Boot can be configured through environment variables, which
affect the behavior of the different commands.
\item Environment variables are loaded from flash to RAM at U-Boot
startup, can be modified and saved back to flash for persistence
- \item There is a dedicated location in flash to store U-Boot
- environment, defined in the board configuration file
- \item Commands to manipulate environment variables:
- \begin{itemize}
- \item \code{printenv}, shows all variables
- \item \code{printenv <variable-name>}, shows the value of one variable
- \item \code{setenv <variable-name> <variable-value>}, changes the
- value of a variable, only in RAM
- \item \code{saveenv}, saves the current state of the environment to flash
- \end{itemize}
+ \item There is a dedicated location in flash (or in MMC storage)
+ to store the U-Boot environment, defined in the board configuration file
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ \frametitle{Environment variables commands (2)}
+ Commands to manipulate environment variables:
+ \begin{itemize}
+ \item \code{printenv}\\
+ Shows all variables
+ \item \code{printenv <variable-name>}\\
+ Shows the value of a variable
+ \item \code{setenv <variable-name> <variable-value>}\\
+ Changes the value of a variable, only in RAM
+ \item \code{editenv <variable-name>}\\
+ Edits the value of a variable, only in RAM
+ \item \code{saveenv}\\
+ Saves the current state of the environment to flash
\end{itemize}
\end{frame}
\begin{frame}[fragile]
-\frametitle{Environment variables commands (2)}
+\frametitle{Environment variables commands - Example}
\begin{verbatim}
u-boot # printenv
baudrate=19200
More information about the training-materials-updates
mailing list