[FE training-materials-updates] Erase the whole NAND at the beginning
Michael Opdenacker
michael.opdenacker at free-electrons.com
Wed Jan 23 10:48:52 CET 2013
Repository : git://git.free-electrons.com/training-materials.git
On branch : master
Link : http://git.free-electrons.com/training-materials/commit/?id=7c422ceeb65a2b432ba307acc5bb632a23d575b9
>---------------------------------------------------------------
commit 7c422ceeb65a2b432ba307acc5bb632a23d575b9
Author: Michael Opdenacker <michael.opdenacker at free-electrons.com>
Date: Wed Jan 23 10:47:45 2013 +0100
Erase the whole NAND at the beginning
Good to avoid interference with previous sessions
or with pre-installed software.
Signed-off-by: Michael Opdenacker <michael.opdenacker at free-electrons.com>
>---------------------------------------------------------------
7c422ceeb65a2b432ba307acc5bb632a23d575b9
labs/sysdev-u-boot/sysdev-u-boot.tex | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/labs/sysdev-u-boot/sysdev-u-boot.tex b/labs/sysdev-u-boot/sysdev-u-boot.tex
index e2b4d98..84f161e 100644
--- a/labs/sysdev-u-boot/sysdev-u-boot.tex
+++ b/labs/sysdev-u-boot/sysdev-u-boot.tex
@@ -281,7 +281,19 @@ In U-Boot, type the \code{help} command, and explore the few commands available.
\section{Reflashing from U-boot}
-We will first reflash the X-Loader in NAND. To do so, type the following commands:
+We will flash X-loader, U-boot and later the kernel and filesystem in
+NAND flash. Let's first erase the whole NAND storage to remove its
+existing contents. This way, we are sure that what we find in NAND comes
+from our own manipulations:
+
+\begin{verbatim}
+nand erase 0
+\end{verbatim}
+
+This command starts erasing at offset \code{0}, and since it's not given
+any length parameters, it does this until the end.
+
+We are going to reflash X-Loader in NAND. To do so, type the following commands:
\begin{verbatim}
mmc rescan
@@ -306,6 +318,9 @@ nand erase 0 80000
\end{verbatim}
This command erases a 0x80000 byte long space of NAND flash from offset 0
+\footnote{Of course, this is not needed here if you erased the whole NAND contents
+as instructed earlier. However, we prefer to write it here so that you
+don't forget next time you write anything to NAND.}
\begin{verbatim}
nand write 80000000 0 80000
More information about the training-materials-updates
mailing list