diff options
author | Patrick Ohly <patrick.ohly@intel.com> | 2017-11-27 16:56:42 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-12-10 22:45:18 +0000 |
commit | 10865f77b97ef023eed63e2c459b57bc6f4ba279 (patch) | |
tree | efcaca5500f3a672c4e9083adb2cd396d1c0c463 /meta/classes/rootfs-postcommands.bbclass | |
parent | e9e3e60ca61ac2dd7e4e4c369dfd905d3adb5117 (diff) | |
download | poky-10865f77b97ef023eed63e2c459b57bc6f4ba279.tar.gz |
rootfs-postcommands.bbclass: ensure that rootfs gets mounted ro
When read-only-rootfs is active, we need to ensure that the rootfs
does not get mounted read/write by the kernel or initramfs. Adding
"ro" to the boot parameters achieves that.
(From OE-Core rev: cfc09de06ecc12bb42181004689e881c75072665)
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/rootfs-postcommands.bbclass')
-rw-r--r-- | meta/classes/rootfs-postcommands.bbclass | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/meta/classes/rootfs-postcommands.bbclass b/meta/classes/rootfs-postcommands.bbclass index 5391e7a8e3..a4e627fef8 100644 --- a/meta/classes/rootfs-postcommands.bbclass +++ b/meta/classes/rootfs-postcommands.bbclass | |||
@@ -14,6 +14,14 @@ ROOTFS_POSTPROCESS_COMMAND += "rootfs_update_timestamp ; " | |||
14 | # Tweak the mount options for rootfs in /etc/fstab if read-only-rootfs is enabled | 14 | # Tweak the mount options for rootfs in /etc/fstab if read-only-rootfs is enabled |
15 | ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", "read_only_rootfs_hook; ", "",d)}' | 15 | ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", "read_only_rootfs_hook; ", "",d)}' |
16 | 16 | ||
17 | # We also need to do the same for the kernel boot parameters, | ||
18 | # otherwise kernel or initramfs end up mounting the rootfs read/write | ||
19 | # (the default) if supported by the underlying storage. | ||
20 | # | ||
21 | # We do this with _append because the default value might get set later with ?= | ||
22 | # and we don't want to disable such a default that by setting a value here. | ||
23 | APPEND_append = '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", " ro", "", d)}' | ||
24 | |||
17 | # Generates test data file with data store variables expanded in json format | 25 | # Generates test data file with data store variables expanded in json format |
18 | ROOTFS_POSTPROCESS_COMMAND += "write_image_test_data ; " | 26 | ROOTFS_POSTPROCESS_COMMAND += "write_image_test_data ; " |
19 | 27 | ||