[FE training-materials-updates] Block filesystem lab improvements
Michael Opdenacker
michael.opdenacker at free-electrons.com
Wed Dec 3 18:25:28 CET 2014
Repository : git://git.free-electrons.com/training-materials.git
On branch : master
Link : http://git.free-electrons.com/training-materials/commit/?id=4ccfdaa6550e7a2010a612163886886aca38b9b0
>---------------------------------------------------------------
commit 4ccfdaa6550e7a2010a612163886886aca38b9b0
Author: Michael Opdenacker <michael.opdenacker at free-electrons.com>
Date: Wed Dec 3 18:24:56 2014 +0100
Block filesystem lab improvements
Signed-off-by: Michael Opdenacker <michael.opdenacker at free-electrons.com>
>---------------------------------------------------------------
4ccfdaa6550e7a2010a612163886886aca38b9b0
.../sysdev-block-filesystems.tex | 48 ++++++++++------------
1 file changed, 21 insertions(+), 27 deletions(-)
diff --git a/labs/sysdev-block-filesystems/sysdev-block-filesystems.tex b/labs/sysdev-block-filesystems/sysdev-block-filesystems.tex
index 7a9ed14..7c0ef39 100644
--- a/labs/sysdev-block-filesystems/sysdev-block-filesystems.tex
+++ b/labs/sysdev-block-filesystems/sysdev-block-filesystems.tex
@@ -24,13 +24,17 @@ directory, which we will progressively adapt to use block filesystems.
\section{Filesystem support in the kernel}
-Recompile your kernel with support for SquashFS and ext3.
+Recompile your kernel with support for SquashFS and ext3. Update your
+kernel image in NAND flash.
Boot your board with this new kernel and on the NFS filesystem you
used in this previous lab.\footnote{If you didn't do or complete the
tinysystem lab, you can use the \code{data/rootfs} directory
instead.}
+Now, check the contents of \code{/proc/filesystems}. You should see
+ that ext3 and SquashFS are now supported.
+
\section{Prepare the MMC card}
We're going to use an MMC card for our block device.
@@ -90,10 +94,15 @@ $ sudo dd if=/dev/zero of=/dev/sdb bs=1M count=256
\end{verbatim}
Now, let's use the \code{cfdisk} command to create the partitions that
-we are going to use.
+we are going to use:
+
+\begin{verbatim}
+$ sudo cfdisk /dev/sdb
+\end{verbatim}
-In the \code{cfdisk} interface, two primary partition,
-starting from the beginning, with the following properties:
+In the \code{cfdisk} interface, delete existing partitions, then
+create two primary partitions, starting from the beginning, with the
+following properties:
\begin{itemize}
@@ -119,29 +128,14 @@ Press \code{Write} when you are done.
\section{Data partition on the MMC disk}
-\fbox{
- \begin{minipage}{\textwidth}
- {\bfseries Caution: read this carefully before proceeding. You
- could destroy existing partitions on your PC!
-
- Do not make the confusion between the device that is used by
- your board to represent your MMC disk (\code{/dev/mmcblk0)} or
- \code{/dev/sda} if you are connecting the MMC card to the board
- with a USB card reader), and the device that your workstation
- uses (probably \code{/dev/sdb}).
-
- So, don't use the \code{/dev/sdaX} device to reflash your MMC
- disk from your workstation. People have already destroyed their
- Windows partition by making this mistake.}
- \end{minipage}
-}
-
Using the \code{mkfs.ext3} create a journaled file system on the
-third partition of the MMC disk. Remember that you can use the
-\code{-L} option to set a volume name for the partition. Move the
-contents of the \code{/www/upload/files} directory (in your target root
-filesystem) into this new partition. The goal is to use the third
-partition of the MMC card as the storage for the uploaded images.
+third partition of the MMC disk (Caution: one again, make sure
+you're not touching hard disk partitions instead of the MMC ones!).
+Remember that you can use the \code{-L} option to set a volume name
+for the partition. Move the contents of the \code{/www/upload/files}
+directory (in your target root filesystem) into this new partition.
+The goal is to use the third partition of the MMC card as the storage
+for the uploaded images.
Connect the MMC disk to your board. You should see the MMC partitions
in \code{/proc/partitions}.
@@ -225,4 +219,4 @@ fatload mmc 0:1 0x21000000 filename
Which will load the file named \code{filename} from the first
partition of the first MMC device to the system memory at the address
-\code{0x21000000},
+\code{0x21000000}.
More information about the training-materials-updates
mailing list