[bootlin/training-materials updates] master: Boot time labs: mount rootfs in read-only mode (b4a607a8)

Michael Opdenacker michael.opdenacker at bootlin.com
Tue Oct 22 14:51:26 CEST 2019

Repository : https://github.com/bootlin/training-materials
On branch  : master
Link       : https://github.com/bootlin/training-materials/commit/b4a607a80493e472303deed5eadd0e680ea560be


commit b4a607a80493e472303deed5eadd0e680ea560be
Author: Michael Opdenacker <michael.opdenacker at bootlin.com>
Date:   Tue Oct 22 14:51:26 2019 +0200

    Boot time labs: mount rootfs in read-only mode
    Signed-off-by: Michael Opdenacker <michael.opdenacker at bootlin.com>


 .../boot-time-build-kernel-and-start-system.tex                   | 3 ++-
 labs/boot-time-build-system/boot-time-build-system.tex            | 8 ++++++++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/labs/boot-time-build-kernel-and-start-system/boot-time-build-kernel-and-start-system.tex b/labs/boot-time-build-kernel-and-start-system/boot-time-build-kernel-and-start-system.tex
index ebd1ce3f..9b28dd4f 100644
--- a/labs/boot-time-build-kernel-and-start-system/boot-time-build-kernel-and-start-system.tex
+++ b/labs/boot-time-build-kernel-and-start-system/boot-time-build-kernel-and-start-system.tex
@@ -191,13 +191,14 @@ setenv bootcmd 'fatload mmc 0:1 81000000 zImage; fatload mmc 0:1 82000000 dtb; b
 The last thing to do is to define the kernel command line:
-setenv bootargs console=ttyO0,115200n8 root=/dev/mmcblk0p2 rootwait
+setenv bootargs console=ttyO0,115200n8 root=/dev/mmcblk0p2 rootwait ro
 \item \code{rootwait} waits for the root device to be ready before
 attempting to mount it. You may have a kernel panic otherwise.
+\item \code{ro} mounts the root filesystem in read-only mode.
 Last but not least, save your changes:
diff --git a/labs/boot-time-build-system/boot-time-build-system.tex b/labs/boot-time-build-system/boot-time-build-system.tex
index f1dc48b0..b037f57d 100644
--- a/labs/boot-time-build-system/boot-time-build-system.tex
+++ b/labs/boot-time-build-system/boot-time-build-system.tex
@@ -78,6 +78,14 @@ make menuconfig
     slightly more compact code).
+\item \code{System configuration} menu
+  \begin{itemize}
+  \item Unselect \code{remount root filesystem read-write during boot}.
+    This way, we will keep the root filesystem in read-only mode. When
+    we make tests and reboot the system multiple times, this avoids
+    filesystem recovery with approximately takes 4 seconds and adds
+    jitter to our measurements.
+  \end{itemize}
 \item As we wish to make Buildroot compile its own toolchain as as we
 will compile the kernel and bootloader separately, for the moment, we
 can keep the default build, toolchain and system settings.

More information about the training-materials-updates mailing list