[FE training-materials-updates] Flash fs: use setenv for mtdids and mtdparts definitions
Michael Opdenacker
michael.opdenacker at free-electrons.com
Thu Oct 29 06:21:09 CET 2015
Repository : git://git.free-electrons.com/training-materials.git
On branch : master
Link : http://git.free-electrons.com/training-materials/commit/?id=cdd5be61d6f2b4bd77f6c1afe229669fdeef0216
>---------------------------------------------------------------
commit cdd5be61d6f2b4bd77f6c1afe229669fdeef0216
Author: Michael Opdenacker <michael.opdenacker at free-electrons.com>
Date: Thu Oct 29 06:21:09 2015 +0100
Flash fs: use setenv for mtdids and mtdparts definitions
- Less confusing than showing a value with two "=" characters
Signed-off-by: Michael Opdenacker <michael.opdenacker at free-electrons.com>
>---------------------------------------------------------------
cdd5be61d6f2b4bd77f6c1afe229669fdeef0216
.../sysdev-flash-filesystems.tex | 2 +-
.../sysdev-flash-filesystems.tex | 18 ++++++++----------
2 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/labs/sysdev-flash-filesystems/sysdev-flash-filesystems.tex b/labs/sysdev-flash-filesystems/sysdev-flash-filesystems.tex
index 5471baa..2799e7a 100644
--- a/labs/sysdev-flash-filesystems/sysdev-flash-filesystems.tex
+++ b/labs/sysdev-flash-filesystems/sysdev-flash-filesystems.tex
@@ -126,7 +126,7 @@ match the way we wish to organize our flash
storage. Therefore, we will define our own partitions at boot time,
on the kernel command line.
-Redefine the partition in U-Boot using the \code{mtdids} and
+Redefine the partitions in U-Boot using the \code{mtdids} and
\code{mtdparts} environment variables.
Once done, execute the \code{mtdparts} command and check the partition
definitions.
diff --git a/slides/sysdev-flash-filesystems/sysdev-flash-filesystems.tex b/slides/sysdev-flash-filesystems/sysdev-flash-filesystems.tex
index 2008803..d1528f0 100644
--- a/slides/sysdev-flash-filesystems/sysdev-flash-filesystems.tex
+++ b/slides/sysdev-flash-filesystems/sysdev-flash-filesystems.tex
@@ -224,13 +224,12 @@
\item Requires two environment variables:
\begin{itemize}
\item \code{mtdids} attaches an {\em mtdid} to a flash device.
- Example: \code{mtdids=<devid>=<mtdid>[,<devid>=<mtdid>]}
+ Example: \code{setenv mtdids <devid>=<mtdid>[,<devid>=<mtdid>]}
\begin{itemize}
\item \code{devid}: device identifier retrieved with
\code{nand info} or \code{flinfo}
\item \code{mtdid}: mtd identifier (should match Linux MTD device
- name)
- \item \code{mtdid} is displayed when booting the Linux kernel
+ name). It is displayed when booting the Linux kernel.
\end{itemize}
\item \code{mtdparts} defines the partitions for the different devices
\end{itemize}
@@ -247,9 +246,8 @@
\begin{itemize}
\item \code{mtdparts} format: \code{<mtdid>:<partition>[,partition]}
\item \code{partition} format: \code{<size>[@offset](<name>)[ro]}
- \item \code{mtdid} is the MTD device name assigned by Linux
- \item \code{mtdid} is displayed at boot (and can be retrieved using
- \code{dmesg})
+ \item \code{mtdid} is the MTD device name assigned by Linux. It
+ is displayed at boot time (and can be retrieved using \code{dmesg}):
\end{itemize}
\tiny
\begin{verbatim}
@@ -269,8 +267,8 @@ Creating 5 MTD partitions on "omap2-nand.0":
\item Example:
{\tiny
\begin{verbatim}
-mtdids=nand0=omap2-nand.0
-mtdparts=mtdparts=omap2-nand.0:512k(X-Loader)ro,1536k(U-Boot)ro,512k(Environment),4m(Kernel),-(RootFS)
+setenv mtdids nand0=omap2-nand.0
+setenv mtdparts mtdparts=omap2-nand.0:512k(X-Loader)ro,1536k(U-Boot)ro,512k(Env),4m(Kernel),-(RootFS)
\end{verbatim}
}
\item This defines 5 partitions in the \code{omap2-nand.0} device:
@@ -780,8 +778,8 @@ vol_alignment=1
\item You just have to pass the following information on the kernel
cmdline:
\begin{itemize}
- \item \code{ubi.mtd=1}: attach /dev/mtd1 to the UBI layer and
- create ubi0
+ \item \code{ubi.mtd=1}: attach \code{/dev/mtd1} to the UBI layer and
+ create \code{ubi0}
\item \code{rootfstype=ubifs root=ubi0:rootfs}: mount the
\code{rootfs} volume on ubi0 as a UBIFS filesystem
\end{itemize}
More information about the training-materials-updates
mailing list