From ed4690c82c238cf22834da52eb3d7089a74290df Mon Sep 17 00:00:00 2001 From: Daniel Rossier Date: Tue, 30 Jun 2026 10:17:06 +0200 Subject: [PATCH] build: fail usr-so3 deploy clearly when the user space is not built do_deploy rsync'd from so3/usr/build/deploy/ without checking it exists. On a fresh clone (or when only the kernel was built), that directory is missing and deploy aborted with a cryptic "rsync ... (code 23)". Check the source dir up front and bb.fatal with an actionable hint ("build.sh -x usr-so3" / "build.sh bsp-so3"). The check runs before the rootfs loop-mount, so a missing build no longer leaves a dangling mount. --- build/meta-usr/recipes-usr/so3/usr-so3_1.0.bb | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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