Patchwork [1/1] image.bbclass: replace rootfs with /dev/root

login
register
mail settings
Submitter Qi.Chen@windriver.com
Date March 27, 2014, 2:29 a.m.
Message ID <dc876f2fd4fb312364f86f07fd1bd9267bca973b.1395887206.git.Qi.Chen@windriver.com>
Download mbox | patch
Permalink /patch/69353/
State Accepted
Commit 61b088abb8a1b09ccaf212ab30eddc93c39b55bf
Headers show

Comments

Qi.Chen@windriver.com - March 27, 2014, 2:29 a.m.
Replace 'rootfs' with '/dev/root' in read_only_rootfs_hook function
to match the latest change in fstab file from the base-files recipe.

The related commit is as follows.

commit e8bc7a136a81a0d8df2d32dfba0920c1b2835141
    base-files: use /dev/root in /etc/fstab for systemd support

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/classes/image.bbclass |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Koen Kooi - April 11, 2014, 1:18 p.m.
Op 27 mrt. 2014, om 03:29 heeft Chen Qi <Qi.Chen@windriver.com> het volgende geschreven:

> Replace 'rootfs' with '/dev/root' in read_only_rootfs_hook function
> to match the latest change in fstab file from the base-files recipe.
> 
> The related commit is as follows.
> 
> commit e8bc7a136a81a0d8df2d32dfba0920c1b2835141
>    base-files: use /dev/root in /etc/fstab for systemd support

That commit doesn't exist in OE-core, I think you mean c509f948d9c575c45af8c5ed1cb1692c0ca5dade

This change went in already, but with a broken commit message :(

Patch

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index b0639ae..29309f5 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -175,7 +175,7 @@  do_rootfs[umask] = "022"
 read_only_rootfs_hook () {
 	if ${@base_contains("DISTRO_FEATURES", "sysvinit", "true", "false", d)}; then
 	        # Tweak the mount option and fs_passno for rootfs in fstab
-		sed -i -e '/^[#[:space:]]*rootfs/{s/defaults/ro/;s/\([[:space:]]*[[:digit:]]\)\([[:space:]]*\)[[:digit:]]$/\1\20/}' ${IMAGE_ROOTFS}/etc/fstab
+		sed -i -e '/^[#[:space:]]*\/dev\/root/{s/defaults/ro/;s/\([[:space:]]*[[:digit:]]\)\([[:space:]]*\)[[:digit:]]$/\1\20/}' ${IMAGE_ROOTFS}/etc/fstab
 	        # Change the value of ROOTFS_READ_ONLY in /etc/default/rcS to yes
 		if [ -e ${IMAGE_ROOTFS}/etc/default/rcS ]; then
 			sed -i 's/ROOTFS_READ_ONLY=no/ROOTFS_READ_ONLY=yes/' ${IMAGE_ROOTFS}/etc/default/rcS