From: Chen Qi <qi.c...@windriver.com>

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

[YOCTO #3406]

Signed-off-by: Chen Qi <qi.c...@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


_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Reply via email to