This patch refactors how the firmware.bin is deployed to the
DEPLOY_DIR_IMAGE. Instead of directly copying, we now deploy via the
sstate cache. By that, the cleanup is automatically handled and
potential conflicts on the filename are reported.
Signed-off-by: Felix Moessbauer <felix.moessbauer@...>
---
recipes-bsp/u-boot/u-boot-qemu-common.inc | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/recipes-bsp/u-boot/u-boot-qemu-common.inc b/recipes-bsp/u-boot/u-boot-qemu-common.inc
index 0a9a15a..4d8b240 100644
--- a/recipes-bsp/u-boot/u-boot-qemu-common.inc
+++ b/recipes-bsp/u-boot/u-boot-qemu-common.inc
@@ -13,11 +13,21 @@ require recipes-bsp/u-boot/u-boot-common.inc
U_BOOT_BIN = "u-boot.bin"
-do_deploy[dirs] = "${DEPLOY_DIR_IMAGE}"
+DEPLOYDIR_U_BOOT = "${WORKDIR}/deploy-u-boot"
+SSTATETASKS += "do_deploy"
+
+do_deploy[cleandirs] += "${DEPLOYDIR_U_BOOT}"
+do_deploy[sstate-inputdirs] = "${DEPLOYDIR_U_BOOT}"
+do_deploy[sstate-outputdirs] = "${DEPLOY_DIR_IMAGE}"
do_deploy() {
dpkg --fsys-tarfile "${WORKDIR}/u-boot-${MACHINE}_${PV}_${DISTRO_ARCH}.deb" | \
tar xOf - "./usr/lib/u-boot/${MACHINE}/${U_BOOT_BIN}" \
- > "${DEPLOY_DIR_IMAGE}/firmware.bin"
+ > "${DEPLOYDIR_U_BOOT}/firmware.bin"
+}
+
+python do_deploy_setscene () {
+ sstate_setscene(d)
}
+addtask do_deploy_setscene
addtask deploy after do_dpkg_build before do_deploy_deb
--
2.34.1