diff --git a/build/meta-usr/recipes-usr/so3/usr-so3_1.0.bb b/build/meta-usr/recipes-usr/so3/usr-so3_1.0.bb index c2ac3e933f..9738ccadee 100644 --- a/build/meta-usr/recipes-usr/so3/usr-so3_1.0.bb +++ b/build/meta-usr/recipes-usr/so3/usr-so3_1.0.bb @@ -76,11 +76,18 @@ python do_deploy() { d.setVar('ROOTFS_FILENAME', '') if os.path.isdir(d.getVar('IB_ROOTFS_PATH')): - __do_rootfs_mount(d) - src_dir = os.path.join(d.getVar('IB_TARGET'), 'build', 'deploy') dst_dir = os.path.join(d.getVar('IB_ROOTFS_PATH'), 'fs') + # The user space must be built before it can be deployed. Bail out + # early — before mounting the rootfs, so a missing build does not + # leave a dangling loop mount — with an actionable message. + if not os.path.isdir(src_dir): + bb.fatal("SO3 user space not built: '%s' is missing. " + "Build it first with 'build.sh -x usr-so3' (or 'build.sh bsp-so3')." % src_dir) + + __do_rootfs_mount(d) + # The SO3 rootfs.fat is loop-mounted at rootfs/fs as root # (rootfs/mount.sh), so the copy must be privileged. The split # debug-info files (*.debug) are host-side gdb symbols, not