[OE-core] [PATCH V6 6/6] core-image-sato: support read-only rootfs

Qi.Chen at windriver.com Qi.Chen at windriver.com
Sun Jan 6 09:44:28 UTC 2013


From: Chen Qi <Qi.Chen at windriver.com>

Support read-only rootfs by providing a specific conf file for volatile storage.

[YOCTO #3406]

Signed-off-by: Chen Qi <Qi.Chen at windriver.com>
---
 meta/recipes-sato/images/core-image-sato.bb        |    8 ++++++++
 .../images/files/volatiles-readonly-sato           |   14 ++++++++++++++
 2 files changed, 22 insertions(+)
 create mode 100644 meta/recipes-sato/images/files/volatiles-readonly-sato

diff --git a/meta/recipes-sato/images/core-image-sato.bb b/meta/recipes-sato/images/core-image-sato.bb
index f52a1a5..4ca1746 100644
--- a/meta/recipes-sato/images/core-image-sato.bb
+++ b/meta/recipes-sato/images/core-image-sato.bb
@@ -6,6 +6,14 @@ IMAGE_FEATURES += "splash package-management x11-base x11-sato ssh-server-dropbe
 
 LICENSE = "MIT"
 
+SRC_URI += "file://volatiles-readonly-sato"
+
 inherit core-image
 
 IMAGE_INSTALL += "packagegroup-core-x11-sato-games"
+
+# install read-only rootfs specific conf file for sato image
+choose_volatile_conf () {
+	cp ${WORKDIR}/volatiles-readonly-sato \
+		${IMAGE_ROOTFS}/etc/default/volatiles/00_core_readonly
+}
diff --git a/meta/recipes-sato/images/files/volatiles-readonly-sato b/meta/recipes-sato/images/files/volatiles-readonly-sato
new file mode 100644
index 0000000..4a56b81
--- /dev/null
+++ b/meta/recipes-sato/images/files/volatiles-readonly-sato
@@ -0,0 +1,14 @@
+# This configuration file lists filesystem objects specific to sato image
+# with read-only rootfs.
+# This configuration file will only be applied if the image is sato 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
+d root root 0755 /var/volatile/lib/dropbear/ none
+d root root 0755 /var/volatile/lib/nfs/ none
+d root root 0755 /var/volatile/lib/dbus/ none
+l root root 0755 /var/lib/urandom /var/volatile/lib/urandom
+l root root 0755 /var/lib/dropbear /var/volatile/lib/dropbear
+l root root 0755 /var/lib/nfs /var/volatile/lib/nfs
+l root root 0755 /var/lib/dbus /var/volatile/lib/dbus
-- 
1.7.9.5





More information about the Openembedded-core mailing list