summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2020-06-03 19:50:11 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-06-09 13:13:59 +0100
commitfb9c85e3bf320c50596098cd141f8e56b001a617 (patch)
treeeac159704306c27e30367434a13b646632d34d7c /meta/recipes-core
parent6710572f90101e3a7af67c31d118d977eb78d151 (diff)
downloadpoky-fb9c85e3bf320c50596098cd141f8e56b001a617.tar.gz
initramfs-framework: check successful mount using mountpoint
Instead of checking for existence of /dev in the mounted file system use mountpoint to check if a root file system has been mounted. This allows to use the rootfs module for OSTree based rootfs as well, where the file system rootfs does not have any of the regular directories (at least when using the modern layout). (From OE-Core rev: efdfd0d5dde4dde43cb67ef28a90d5f5fe3e0ac6) Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/initrdscripts/initramfs-framework/rootfs4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/rootfs b/meta/recipes-core/initrdscripts/initramfs-framework/rootfs
index 748c9391c0..ee24e82af3 100644
--- a/meta/recipes-core/initrdscripts/initramfs-framework/rootfs
+++ b/meta/recipes-core/initrdscripts/initramfs-framework/rootfs
@@ -13,7 +13,7 @@ rootfs_run() {
13 C=0 13 C=0
14 delay=${bootparam_rootdelay:-1} 14 delay=${bootparam_rootdelay:-1}
15 timeout=${bootparam_roottimeout:-5} 15 timeout=${bootparam_roottimeout:-5}
16 while [ ! -d $ROOTFS_DIR/dev ]; do 16 while ! mountpoint -q $ROOTFS_DIR; do
17 if [ $(( $C * $delay )) -gt $timeout ]; then 17 if [ $(( $C * $delay )) -gt $timeout ]; then
18 fatal "root '$bootparam_root' doesn't exist or does not contain a /dev." 18 fatal "root '$bootparam_root' doesn't exist or does not contain a /dev."
19 fi 19 fi
@@ -61,7 +61,7 @@ rootfs_run() {
61 flags="$flags -t$bootparam_rootfstype" 61 flags="$flags -t$bootparam_rootfstype"
62 fi 62 fi
63 mount $flags $bootparam_root $ROOTFS_DIR 63 mount $flags $bootparam_root $ROOTFS_DIR
64 if [ -d $ROOTFS_DIR/dev ]; then 64 if mountpoint -q $ROOTFS_DIR; then
65 break 65 break
66 else 66 else
67 # It is unlikely to change, but keep trying anyway. 67 # It is unlikely to change, but keep trying anyway.