From patchwork Sun Jan 6 09:44:27 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [V6,5/6] core-image-minimal: support read-only rootfs Date: Sun, 06 Jan 2013 09:44:27 -0000 From: Qi.Chen@windriver.com X-Patchwork-Id: 42091 Message-Id: <0e35cab1d0fb535e60519a11a2b95955845d4bfd.1357465230.git.Qi.Chen@windriver.com> To: Cc: Zhenfeng.Zhao@windriver.com From: Chen Qi Support read-only rootfs by providing a specific conf file for volatile storage. [YOCTO #3406] Signed-off-by: Chen Qi --- meta/recipes-core/images/core-image-minimal.bb | 10 ++++++++++ .../images/files/volatiles-readonly-minimal | 8 ++++++++ 2 files changed, 18 insertions(+) create mode 100644 meta/recipes-core/images/files/volatiles-readonly-minimal diff --git a/meta/recipes-core/images/core-image-minimal.bb b/meta/recipes-core/images/core-image-minimal.bb index 0d2613e..2e8d2ff 100644 --- a/meta/recipes-core/images/core-image-minimal.bb +++ b/meta/recipes-core/images/core-image-minimal.bb @@ -6,9 +6,19 @@ IMAGE_LINGUAS = " " LICENSE = "MIT" +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +SRC_URI += "file://volatiles-readonly-minimal" + inherit core-image IMAGE_ROOTFS_SIZE = "8192" # remove not needed ipkg informations ROOTFS_POSTPROCESS_COMMAND += "remove_packaging_data_files ; " + +# install read-only rootfs specific conf file for minimal image +choose_volatile_conf () { + cp ${WORKDIR}/volatiles-readonly-minimal \ + ${IMAGE_ROOTFS}/etc/default/volatiles/00_core_readonly +} diff --git a/meta/recipes-core/images/files/volatiles-readonly-minimal b/meta/recipes-core/images/files/volatiles-readonly-minimal new file mode 100644 index 0000000..b7146a2 --- /dev/null +++ b/meta/recipes-core/images/files/volatiles-readonly-minimal @@ -0,0 +1,8 @@ +# This configuration file lists filesystem objects specific to minimal image +# with read-only rootfs. +# This configuration file will only be applied if the image is minimal and the +# rootfs is read-only. +# For the detailed format information, refer to /etc/default/volatiles/00_core. +d root root 0755 /var/volatile/lib/ none +d root root 0755 /var/volatile/lib/urandom/ none +l root root 0755 /var/lib/urandom /var/volatile/lib/urandom