From patchwork Tue Jan 22 06:36:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [V8,3/6] core-image.bbclass: support read-only rootfs Date: Tue, 22 Jan 2013 06:36:14 -0000 From: Qi.Chen@windriver.com X-Patchwork-Id: 43127 Message-Id: <506daef56169328eba02cdb031f455313261cc3c.1358836314.git.Qi.Chen@windriver.com> To: Cc: Zhenfeng.Zhao@windriver.com From: Chen Qi The hook function is appended to ROOTFS_POSTPROCESS_COMMAND properly to support the 'read-only-rootfs' image feature. [YOCTO #3406] Signed-off-by: Chen Qi --- meta/classes/core-image.bbclass | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meta/classes/core-image.bbclass b/meta/classes/core-image.bbclass index e0f6dbb..0e6663d 100644 --- a/meta/classes/core-image.bbclass +++ b/meta/classes/core-image.bbclass @@ -28,6 +28,7 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3 # - dev-pkgs - development packages (headers, etc.) for all installed packages in the rootfs # - dbg-pkgs - debug symbol packages for all installed packages in the rootfs # - doc-pkgs - documentation packages for all installed packages in the rootfs +# - read-only-rootfs - tweaks an image to support read-only rootfs # PACKAGE_GROUP_x11 = "packagegroup-core-x11" PACKAGE_GROUP_x11-base = "packagegroup-core-x11-base" @@ -76,3 +77,6 @@ ROOTFS_POSTPROCESS_COMMAND += "rootfs_update_timestamp ; " # Zap the root password if debug-tweaks feature is not enabled ROOTFS_POSTPROCESS_COMMAND += '${@base_contains("IMAGE_FEATURES", "debug-tweaks", "", "zap_root_password ; ",d)}' + +# Tweak the mount options for rootfs in /etc/fstab if read-only-rootfs is enabled +ROOTFS_POSTPROCESS_COMMAND += '${@base_contains("IMAGE_FEATURES", "read-only-rootfs", "read_only_rootfs_hook; ", "",d)}'