From 3eda07d8632fe6723418b47dfb3a0bb4b41129b3 Mon Sep 17 00:00:00 2001 From: Phil Wise Date: Thu, 22 Jun 2017 12:16:03 +0200 Subject: Retry mounting sysroot Fixes DEM-169 --- recipes-sota/ostree-initrd/files/init.sh | 8 +++++++- recipes-sota/ostree-initrd/ostree-initrd.bb | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'recipes-sota/ostree-initrd') diff --git a/recipes-sota/ostree-initrd/files/init.sh b/recipes-sota/ostree-initrd/files/init.sh index b88716c..0b0693d 100644 --- a/recipes-sota/ostree-initrd/files/init.sh +++ b/recipes-sota/ostree-initrd/files/init.sh @@ -56,7 +56,13 @@ grep -q smackfs /proc/filesystems && { mkdir -p /sysroot ostree_sysroot=$(get_ostree_sysroot) -mount $ostree_sysroot /sysroot || bail_out "Unable to mount $ostree_sysroot as physical sysroot" +mount "$ostree_sysroot" /sysroot || { + # The SD card in the R-Car M3 takes a bit of time to come up + # Retry the mount if it fails the first time + log_info "Mounting $ostree_sysroot failed, waiting 5s for the device to be available..." + sleep 5 + mount "$ostree_sysroot" /sysroot || bail_out "Unable to mount $ostree_sysroot as physical sysroot" +} ostree-prepare-root /sysroot # move mounted devices to new root diff --git a/recipes-sota/ostree-initrd/ostree-initrd.bb b/recipes-sota/ostree-initrd/ostree-initrd.bb index b721405..6046c81 100644 --- a/recipes-sota/ostree-initrd/ostree-initrd.bb +++ b/recipes-sota/ostree-initrd/ostree-initrd.bb @@ -5,7 +5,7 @@ SRC_URI = "file://init.sh" S = "${WORKDIR}" -PV = "2" +PV = "3" do_install() { install -dm 0755 ${D}/etc -- cgit v1.2.3-54-g00ecf