summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2017-08-31 20:18:39 -0700
committerMax Krummenacher <max.krummenacher@toradex.com>2017-10-02 19:26:39 +0200
commitae968c66bbd50dd8538fb41fa68f904f901bb606 (patch)
tree03ae4083b43b99e69e946031b44241229ae5b09e
parent4370811cbaf9a3dd1c34fe51532d1454328e6de8 (diff)
apalis/colibri: fix and synchronize mount options
The kernel does not know about rw,noatime. The string rw by itself is valid, and to pass additional arguments rootflags=noatime can be used. The kernel mounts ext3/ext4 file systems by default ro, hence so far the kernel mounted the rootfs read-only. The init manager systemd then remounts the rootfs after file system checking. This makes sense and does not add measureable boot time. Let the kernel explicitly mount ro on block device based rootfs. The root mount flag noatime is only relevant when re-mounting read-write, hence it needs to be present in /etc/fstab. UBIFS used on raw NAND devices has no user space file checking, hence there is no value to mount it in read-only first. Also mount time for UBIFS is larger, and mounting first read-only and then read-write has higher boot time (300ms, likely due to missing block cache). Let the kernel explicitly mount rw on raw NAND based rootfs. UBIFS has no atime support, hence no root mount flags needed. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
-rw-r--r--include/configs/apalis_imx6.h6
-rw-r--r--include/configs/apalis_t30.h6
-rw-r--r--include/configs/colibri-imx6ull.h4
-rw-r--r--include/configs/colibri_imx6.h6
-rw-r--r--include/configs/colibri_imx7.h4
-rw-r--r--include/configs/colibri_imx7_emmc.h2
-rw-r--r--include/configs/colibri_t20.h4
-rw-r--r--include/configs/colibri_t30.h6
-rw-r--r--include/configs/colibri_vf.h4
9 files changed, 21 insertions, 21 deletions
diff --git a/include/configs/apalis_imx6.h b/include/configs/apalis_imx6.h
index 04ae16b59c..92a9ed99ca 100644
--- a/include/configs/apalis_imx6.h
+++ b/include/configs/apalis_imx6.h
@@ -195,7 +195,7 @@
"imx6q-colibri-cam-eval-v3.dtb fat 0 1"
#define EMMC_BOOTCMD \
- "emmcargs=ip=off root=/dev/mmcblk0p2 rw,noatime rootfstype=ext4 " \
+ "emmcargs=ip=off root=/dev/mmcblk0p2 ro rootfstype=ext4 " \
"rootwait\0" \
"emmcboot=run setup; " \
"setenv bootargs ${defargs} ${emmcargs} ${setupargs} " \
@@ -227,7 +227,7 @@
"&& setenv dtbparam \" - ${fdt_addr_r}\" && true\0"
#define SD_BOOTCMD \
- "sdargs=ip=off root=/dev/mmcblk1p2 rw,noatime rootfstype=ext4 " \
+ "sdargs=ip=off root=/dev/mmcblk1p2 ro rootfstype=ext4 " \
"rootwait\0" \
"sdboot=run setup; " \
"setenv bootargs ${defargs} ${sdargs} ${setupargs} " \
@@ -239,7 +239,7 @@
"${fdt_file} && setenv dtbparam \" - ${fdt_addr_r}\" && true\0"
#define USB_BOOTCMD \
- "usbargs=ip=off root=/dev/sda2 rw,noatime rootfstype=ext4 " \
+ "usbargs=ip=off root=/dev/sda2 ro rootfstype=ext4 " \
"rootwait\0" \
"usbboot=run setup; setenv bootargs ${defargs} ${setupargs} " \
"${usbargs} ${vidargs}; echo Booting from USB stick...; " \
diff --git a/include/configs/apalis_t30.h b/include/configs/apalis_t30.h
index 5041a42d55..a740a383ef 100644
--- a/include/configs/apalis_t30.h
+++ b/include/configs/apalis_t30.h
@@ -92,7 +92,7 @@
"tegra30-apalis-eval.dtb fat 0 1 mmcpart 0"
#define EMMC_BOOTCMD \
- "emmcargs=ip=off root=/dev/mmcblk0p2 rw,noatime rootfstype=ext3 " \
+ "emmcargs=ip=off root=/dev/mmcblk0p2 ro rootfstype=ext3 " \
"rootwait\0" \
"emmcboot=run setup; setenv bootargs ${defargs} ${emmcargs} " \
"${setupargs} ${vidargs}; echo Booting from internal eMMC " \
@@ -114,7 +114,7 @@
"&& setenv dtbparam ${fdt_addr_r}\0"
#define SD_BOOTCMD \
- "sdargs=ip=off root=/dev/mmcblk1p2 rw,noatime rootfstype=ext3 " \
+ "sdargs=ip=off root=/dev/mmcblk1p2 ro rootfstype=ext3 " \
"rootwait\0" \
"sdboot=run setup; setenv bootargs ${defargs} ${sdargs} ${setupargs} " \
"${vidargs}; echo Booting from SD card in 8bit slot...; " \
@@ -126,7 +126,7 @@
"&& setenv dtbparam ${fdt_addr_r}\0"
#define USB_BOOTCMD \
- "usbargs=ip=off root=/dev/sda2 rw,noatime rootfstype=ext3 " \
+ "usbargs=ip=off root=/dev/sda2 ro rootfstype=ext3 " \
"rootwait\0" \
"usbboot=run setup; setenv bootargs ${defargs} ${setupargs} " \
"${usbargs} ${vidargs}; echo Booting from USB stick...; " \
diff --git a/include/configs/colibri-imx6ull.h b/include/configs/colibri-imx6ull.h
index e9e5d2d8d9..87f9683e69 100644
--- a/include/configs/colibri-imx6ull.h
+++ b/include/configs/colibri-imx6ull.h
@@ -75,7 +75,7 @@
"scriptaddr=0x87000000\0"
#define SD_BOOTCMD \
- "sdargs=root=/dev/mmcblk0p2 rw rootwait\0" \
+ "sdargs=root=/dev/mmcblk0p2 ro rootwait\0" \
"sdboot=run setup; setenv bootargs ${defargs} ${sdargs} " \
"${setupargs} ${vidargs}; echo Booting from MMC/SD card...; " \
"run m4boot && " \
@@ -93,7 +93,7 @@
"run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \
#define UBI_BOOTCMD \
- "ubiargs=ubi.mtd=ubi root=ubi0:rootfs rootfstype=ubifs " \
+ "ubiargs=ubi.mtd=ubi root=ubi0:rootfs rw rootfstype=ubifs " \
"ubi.fm_autoconvert=1\0" \
"ubiboot=run setup; " \
"setenv bootargs ${defargs} ${ubiargs} " \
diff --git a/include/configs/colibri_imx6.h b/include/configs/colibri_imx6.h
index 55ddbee464..78e85aee5b 100644
--- a/include/configs/colibri_imx6.h
+++ b/include/configs/colibri_imx6.h
@@ -175,7 +175,7 @@
"imx6q-colibri-cam-eval-v3.dtb fat 0 1"
#define EMMC_BOOTCMD \
- "emmcargs=ip=off root=/dev/mmcblk0p2 rw,noatime rootfstype=ext4 " \
+ "emmcargs=ip=off root=/dev/mmcblk0p2 ro rootfstype=ext4 " \
"rootwait\0" \
"emmcboot=run setup; " \
"setenv bootargs ${defargs} ${emmcargs} ${setupargs} " \
@@ -207,7 +207,7 @@
"&& setenv dtbparam \" - ${fdt_addr_r}\" && true\0"
#define SD_BOOTCMD \
- "sdargs=ip=off root=/dev/mmcblk1p2 rw,noatime rootfstype=ext4 " \
+ "sdargs=ip=off root=/dev/mmcblk1p2 ro rootfstype=ext4 " \
"rootwait\0" \
"sdboot=run setup; " \
"setenv bootargs ${defargs} ${sdargs} ${setupargs} " \
@@ -219,7 +219,7 @@
"${fdt_file} && setenv dtbparam \" - ${fdt_addr_r}\" && true\0"
#define USB_BOOTCMD \
- "usbargs=ip=off root=/dev/sda2 rw,noatime rootfstype=ext4 " \
+ "usbargs=ip=off root=/dev/sda2 ro rootfstype=ext4 " \
"rootwait\0" \
"usbboot=run setup; setenv bootargs ${defargs} ${setupargs} " \
"${usbargs} ${vidargs}; echo Booting from USB stick...; " \
diff --git a/include/configs/colibri_imx7.h b/include/configs/colibri_imx7.h
index ee8c137579..e890c4bf12 100644
--- a/include/configs/colibri_imx7.h
+++ b/include/configs/colibri_imx7.h
@@ -76,7 +76,7 @@
"scriptaddr=0x87000000\0"
#define SD_BOOTCMD \
- "sdargs=root=/dev/mmcblk0p2 rw rootwait\0" \
+ "sdargs=root=/dev/mmcblk0p2 ro rootwait\0" \
"sdboot=run setup; setenv bootargs ${defargs} ${sdargs} " \
"${setupargs} ${vidargs}; echo Booting from MMC/SD card...; " \
"run m4boot && " \
@@ -94,7 +94,7 @@
"run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \
#define UBI_BOOTCMD \
- "ubiargs=ubi.mtd=ubi root=ubi0:rootfs rootfstype=ubifs " \
+ "ubiargs=ubi.mtd=ubi root=ubi0:rootfs rw rootfstype=ubifs " \
"ubi.fm_autoconvert=1\0" \
"ubiboot=run setup; " \
"setenv bootargs ${defargs} ${ubiargs} " \
diff --git a/include/configs/colibri_imx7_emmc.h b/include/configs/colibri_imx7_emmc.h
index caf5aa87d2..4b844f9c80 100644
--- a/include/configs/colibri_imx7_emmc.h
+++ b/include/configs/colibri_imx7_emmc.h
@@ -88,7 +88,7 @@
"scriptaddr=0x87000000\0"
#define SD_BOOTCMD \
- "sdargs=root=/dev/mmcblk0p2 rw rootwait\0" \
+ "sdargs=root=/dev/mmcblk0p2 ro rootwait\0" \
"sdboot=run setup; setenv bootargs ${defargs} ${sdargs} " \
"${setupargs} ${vidargs}; echo Booting from MMC/SD card...; " \
"run m4boot && " \
diff --git a/include/configs/colibri_t20.h b/include/configs/colibri_t20.h
index bbf7cb0365..18ce74ec6b 100644
--- a/include/configs/colibri_t20.h
+++ b/include/configs/colibri_t20.h
@@ -116,7 +116,7 @@
"&& setenv dtbparam ${fdt_addr_r}\0"
#define SD_BOOTCMD \
- "sdargs=ip=off root=/dev/mmcblk0p2 rw,noatime rootfstype=ext3 " \
+ "sdargs=ip=off root=/dev/mmcblk0p2 ro rootfstype=ext3 " \
"rootwait\0" \
"sdboot=run setup; setenv bootargs ${defargs} ${mtdparts} ${sdargs} " \
"${setupargs} ${vidargs}; echo Booting from SD card...; " \
@@ -140,7 +140,7 @@
"setenv dtbparam ${fdt_addr_r}\0"
#define USB_BOOTCMD \
- "usbargs=ip=off root=/dev/sda2 rw,noatime rootfstype=ext3 " \
+ "usbargs=ip=off root=/dev/sda2 ro rootfstype=ext3 " \
"rootwait\0" \
"usbboot=run setup; setenv bootargs ${defargs} ${mtdparts} " \
"${setupargs} ${usbargs} ${vidargs}; echo Booting from USB " \
diff --git a/include/configs/colibri_t30.h b/include/configs/colibri_t30.h
index e7d68b9960..bd8e807080 100644
--- a/include/configs/colibri_t30.h
+++ b/include/configs/colibri_t30.h
@@ -89,7 +89,7 @@
"tegra30-colibri-eval-v3.dtb fat 0 1 mmcpart 0"
#define EMMC_BOOTCMD \
- "emmcargs=ip=off root=/dev/mmcblk0p2 rw,noatime rootfstype=ext3 " \
+ "emmcargs=ip=off root=/dev/mmcblk0p2 ro rootfstype=ext3 " \
"rootwait\0" \
"emmcboot=run setup; setenv bootargs ${defargs} ${emmcargs} " \
"${setupargs} ${vidargs}; echo Booting from internal eMMC " \
@@ -111,7 +111,7 @@
"&& setenv dtbparam ${fdt_addr_r}\0"
#define SD_BOOTCMD \
- "sdargs=ip=off root=/dev/mmcblk1p2 rw,noatime rootfstype=ext3 " \
+ "sdargs=ip=off root=/dev/mmcblk1p2 ro rootfstype=ext3 " \
"rootwait\0" \
"sdboot=run setup; setenv bootargs ${defargs} ${sdargs} ${setupargs} " \
"${vidargs}; echo Booting from SD card in 8bit slot...; " \
@@ -123,7 +123,7 @@
"&& setenv dtbparam ${fdt_addr_r}\0"
#define USB_BOOTCMD \
- "usbargs=ip=off root=/dev/sda2 rw,noatime rootfstype=ext3 " \
+ "usbargs=ip=off root=/dev/sda2 ro rootfstype=ext3 " \
"rootwait\0" \
"usbboot=run setup; setenv bootargs ${defargs} ${setupargs} " \
"${usbargs} ${vidargs}; echo Booting from USB stick...; " \
diff --git a/include/configs/colibri_vf.h b/include/configs/colibri_vf.h
index d6ec65c424..7fea78ba5f 100644
--- a/include/configs/colibri_vf.h
+++ b/include/configs/colibri_vf.h
@@ -128,7 +128,7 @@
"scriptaddr=0x87000000\0"
#define SD_BOOTCMD \
- "sdargs=root=/dev/mmcblk0p2 rw rootwait\0" \
+ "sdargs=root=/dev/mmcblk0p2 ro rootwait\0" \
"sdboot=run setup; setenv bootargs ${defargs} ${sdargs} " \
"${setupargs} ${vidargs}; echo Booting from MMC/SD card...; " \
"load mmc 0:2 ${kernel_addr_r} /boot/${kernel_file} && " \
@@ -145,7 +145,7 @@
"run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \
#define UBI_BOOTCMD \
- "ubiargs=ubi.mtd=ubi root=ubi0:rootfs rootfstype=ubifs " \
+ "ubiargs=ubi.mtd=ubi root=ubi0:rootfs rw rootfstype=ubifs " \
"ubi.fm_autoconvert=1\0" \
"ubiboot=run setup; " \
"setenv bootargs ${defargs} ${ubiargs} " \