diff options
author | Alejandro Hernandez <alejandro@enedino.org> | 2020-07-02 18:45:16 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-07-03 20:17:29 +0100 |
commit | 5f460e4c1846230cefe790d378c8a59f494620e1 (patch) | |
tree | e77fcf24ecdda7a3edae21ff03dc67efcd5fc609 /meta-skeleton/recipes-baremetal | |
parent | 6178eb247c73f9b2c7bd73f48cff8a7445e8e10c (diff) | |
download | poky-5f460e4c1846230cefe790d378c8a59f494620e1.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.
(From OE-Core rev: 9edb08c31700a85ce87344829989c1069d2760ab)
Signed-off-by: Alejandro Hernandez Samaniego <alejandro@enedino.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta-skeleton/recipes-baremetal')
-rw-r--r-- | meta-skeleton/recipes-baremetal/baremetal-examples/baremetal-helloworld_git.bb | 31 |
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 e84a90f28c..a5789e27d3 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(){ | |||
36 | 36 | ||
37 | # Borrowed from meta-freertos | 37 | # Borrowed from meta-freertos |
38 | inherit rootfs-postcommands | 38 | inherit rootfs-postcommands |
39 | inherit deploy | ||
40 | IMGDEPLOYDIR ?= "${WORKDIR}/deploy-${PN}-image-complete" | 39 | IMGDEPLOYDIR ?= "${WORKDIR}/deploy-${PN}-image-complete" |
41 | do_deploy[dirs] = "${DEPLOYDIR} ${DEPLOY_DIR_IMAGE}" | ||
42 | do_rootfs[dirs] = "${DEPLOYDIR} ${DEPLOY_DIR_IMAGE}" | 40 | do_rootfs[dirs] = "${DEPLOYDIR} ${DEPLOY_DIR_IMAGE}" |
43 | DEPLOYDIR = "${IMGDEPLOYDIR}" | 41 | DEPLOYDIR = "${IMGDEPLOYDIR}" |
44 | IMAGE_LINK_NAME ?= "baremetal-helloworld-image-${MACHINE}" | 42 | IMAGE_LINK_NAME ?= "baremetal-helloworld-image-${MACHINE}" |
45 | IMAGE_NAME_SUFFIX ?= "" | 43 | IMAGE_NAME_SUFFIX ?= "" |
46 | 44 | ||
47 | do_deploy(){ | 45 | do_image_complete(){ |
48 | install ${D}/${datadir}/hello_baremetal_${MACHINE}.bin ${DEPLOYDIR}/${IMAGE_LINK_NAME}.bin | 46 | : |
49 | install ${D}/${datadir}/hello_baremetal_${MACHINE}.elf ${DEPLOYDIR}/${IMAGE_LINK_NAME}.elf | ||
50 | } | 47 | } |
51 | 48 | ||
52 | do_image(){ | 49 | do_image(){ |
53 | : | 50 | install ${D}/${datadir}/hello_baremetal_${MACHINE}.bin ${DEPLOYDIR}/${IMAGE_LINK_NAME}.bin |
51 | install ${D}/${datadir}/hello_baremetal_${MACHINE}.elf ${DEPLOYDIR}/${IMAGE_LINK_NAME}.elf | ||
54 | } | 52 | } |
55 | 53 | ||
56 | FILES_${PN} += " \ | 54 | FILES_${PN} += " \ |
@@ -83,11 +81,28 @@ QB_OPT_APPEND = "-nographic" | |||
83 | QB_DEFAULT_FSTYPE = "bin" | 81 | QB_DEFAULT_FSTYPE = "bin" |
84 | QB_DTB = "" | 82 | QB_DTB = "" |
85 | 83 | ||
84 | |||
85 | # Assure binaries, manifest and qemubootconf are populated on DEPLOY_DIR_IMAGE | ||
86 | do_image_complete[dirs] = "${TOPDIR}" | ||
87 | do_image_complete[umask] = "022" | ||
88 | SSTATETASKS += "do_image_complete" | ||
89 | SSTATE_SKIP_CREATION_task-image-complete = '1' | ||
90 | do_image_complete[sstate-inputdirs] = "${IMGDEPLOYDIR}" | ||
91 | do_image_complete[sstate-outputdirs] = "${DEPLOY_DIR_IMAGE}" | ||
92 | do_image_complete[stamp-extra-info] = "${MACHINE_ARCH}" | ||
93 | addtask do_image_complete after do_image before do_build | ||
94 | |||
95 | python do_image_complete_setscene () { | ||
96 | sstate_setscene(d) | ||
97 | } | ||
98 | addtask do_image_complete_setscene | ||
99 | |||
86 | # This next part is necessary to trick the build system into thinking | 100 | # This next part is necessary to trick the build system into thinking |
87 | # its building an image recipe so it generates the qemuboot.conf | 101 | # its building an image recipe so it generates the qemuboot.conf |
88 | addtask do_deploy after do_write_qemuboot_conf before do_build | 102 | # addtask do_deploy after do_write_qemuboot_conf before do_build |
89 | addtask do_rootfs before do_deploy after do_install | 103 | addtask do_rootfs before do_image after do_install |
90 | addtask do_image after do_rootfs before do_build | 104 | addtask do_image after do_rootfs before do_build |
105 | addtask do_image_complete after do_image before do_build | ||
91 | inherit qemuboot | 106 | inherit qemuboot |
92 | 107 | ||
93 | # Based on image.bbclass to make sure we build qemu | 108 | # Based on image.bbclass to make sure we build qemu |