diff --git a/build/meta-bsp/classes/bsp.bbclass b/build/meta-bsp/classes/bsp.bbclass index 678aa173f..83787bf9d 100644 --- a/build/meta-bsp/classes/bsp.bbclass +++ b/build/meta-bsp/classes/bsp.bbclass @@ -176,7 +176,13 @@ addtask do_deploy_boot_chain before do_deploy def __do_deploy_boot(d): if d.getVar('IB_STORAGE_MODE') not in ("remote", "http"): - bb.warn("Now mounting") + # Make deploy depend on an initialised storage. In "soft" mode this + # creates sdcard.img. on the fly when it is missing (the + # same work as scripts/init_storage.sh), so a fresh tree can deploy + # without a separate manual init step. deploy.sh already opened a + # sudo session, so the losetup/mkfs done here via `sudo -n` succeeds. + __do_fs_check(d) + bb.plain("Mounting storage") __do_fs_mount(d) __do_platform_deploy(d) diff --git a/build/meta-filesystem/classes/fs_arm_common.bbclass b/build/meta-filesystem/classes/fs_arm_common.bbclass index b82717add..03018982b 100644 --- a/build/meta-filesystem/classes/fs_arm_common.bbclass +++ b/build/meta-filesystem/classes/fs_arm_common.bbclass @@ -169,7 +169,13 @@ def __do_fs_mount(d): os.stat(img_path) except OSError as e: if e.errno == errno.ENOENT: - bb.fatal(f"{img_path} does not exist") + bb.fatal( + f"Storage image '{img_path}' does not exist: the filesystem " + f"for platform '{IB_PLATFORM}' has not been initialised yet.\n" + f"Deploy normally creates it automatically; if you reach this, " + f"initialise the storage explicitly by running:\n" + f" ./scripts/init_storage.sh\n" + f"then run the deploy again.") p1 = os.path.join(WORKDIR, "p1") p2 = os.path.join(WORKDIR, "p2")