summaryrefslogtreecommitdiffstats
path: root/meta-skeleton
diff options
context:
space:
mode:
authorAlejandro Hernandez <alejandro@enedino.org>2020-07-02 18:45:16 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-07-03 20:16:20 +0100
commit9edb08c31700a85ce87344829989c1069d2760ab (patch)
treed8d6f71aaec9ec9e97ec5e3004f45a0844b90af1 /meta-skeleton
parent0954933a7cc61307df1a840318c9a553050ecdb6 (diff)
downloadopenembedded-core-contrib-9edb08c31700a85ce87344829989c1069d2760ab.tar.gz
baremetal-helloworld: Use do_image_complete instead of do_deploy
To better align with upstream and mimic how images are built, use do_image and do_image_complete instead of do_deploy to populate artifacts on DEPLOY_DIR_IMAGE. Signed-off-by: Alejandro Hernandez Samaniego <alejandro@enedino.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta-skeleton')
-rw-r--r--meta-skeleton/recipes-baremetal/baremetal-examples/baremetal-helloworld_git.bb31
1 files changed, 23 insertions, 8 deletions
diff --git a/meta-skeleton/recipes-baremetal/baremetal-examples/baremetal-helloworld_git.bb b/meta-skeleton/recipes-baremetal/baremetal-examples/baremetal-helloworld_git.bb
index e84a90f28c7..a5789e27d3e 100644
--- a/meta-skeleton/recipes-baremetal/baremetal-examples/baremetal-helloworld_git.bb
+++ b/meta-skeleton/recipes-baremetal/baremetal-examples/baremetal-helloworld_git.bb
@@ -36,21 +36,19 @@ do_install(){
# Borrowed from meta-freertos
inherit rootfs-postcommands
-inherit deploy
IMGDEPLOYDIR ?= "${WORKDIR}/deploy-${PN}-image-complete"
-do_deploy[dirs] = "${DEPLOYDIR} ${DEPLOY_DIR_IMAGE}"
do_rootfs[dirs] = "${DEPLOYDIR} ${DEPLOY_DIR_IMAGE}"
DEPLOYDIR = "${IMGDEPLOYDIR}"
IMAGE_LINK_NAME ?= "baremetal-helloworld-image-${MACHINE}"
IMAGE_NAME_SUFFIX ?= ""
-do_deploy(){
- install ${D}/${datadir}/hello_baremetal_${MACHINE}.bin ${DEPLOYDIR}/${IMAGE_LINK_NAME}.bin
- install ${D}/${datadir}/hello_baremetal_${MACHINE}.elf ${DEPLOYDIR}/${IMAGE_LINK_NAME}.elf
+do_image_complete(){
+ :
}
do_image(){
- :
+ install ${D}/${datadir}/hello_baremetal_${MACHINE}.bin ${DEPLOYDIR}/${IMAGE_LINK_NAME}.bin
+ install ${D}/${datadir}/hello_baremetal_${MACHINE}.elf ${DEPLOYDIR}/${IMAGE_LINK_NAME}.elf
}
FILES_${PN} += " \
@@ -83,11 +81,28 @@ QB_OPT_APPEND = "-nographic"
QB_DEFAULT_FSTYPE = "bin"
QB_DTB = ""
+
+# Assure binaries, manifest and qemubootconf are populated on DEPLOY_DIR_IMAGE
+do_image_complete[dirs] = "${TOPDIR}"
+do_image_complete[umask] = "022"
+SSTATETASKS += "do_image_complete"
+SSTATE_SKIP_CREATION_task-image-complete = '1'
+do_image_complete[sstate-inputdirs] = "${IMGDEPLOYDIR}"
+do_image_complete[sstate-outputdirs] = "${DEPLOY_DIR_IMAGE}"
+do_image_complete[stamp-extra-info] = "${MACHINE_ARCH}"
+addtask do_image_complete after do_image before do_build
+
+python do_image_complete_setscene () {
+ sstate_setscene(d)
+}
+addtask do_image_complete_setscene
+
# This next part is necessary to trick the build system into thinking
# its building an image recipe so it generates the qemuboot.conf
-addtask do_deploy after do_write_qemuboot_conf before do_build
-addtask do_rootfs before do_deploy after do_install
+# addtask do_deploy after do_write_qemuboot_conf before do_build
+addtask do_rootfs before do_image after do_install
addtask do_image after do_rootfs before do_build
+addtask do_image_complete after do_image before do_build
inherit qemuboot
# Based on image.bbclass to make sure we build qemu