Apologies, I forgot to actually attach the patch as I often do!

On Mon, May 02, 2022 at 02:30:30PM -0400, Corey Thompson wrote:
> Hello.
> 
> I've been troubleshooting an issue that sometimes QEMU wouldn't start
> after I built my image.  I narrowed it down to that the extract-cdo
> recipe doesn't properly deploy pmc_cdo.bin to the images dir when the
> recipe is deployed from sstate cache.
> 
> I found a note in the Yocto reference manual about this issue here:
> 
> https://docs.yoctoproject.org/3.2.4/ref-manual/ref-tasks.html#do-deploy
> 
> Attached is a patch which seems to address the problem as far as I can
> tell.
> 
> I am building using meta-xilinx rel-v2021.2 (commit hash
> 054cb2cb4c3ffe868ade68369433027989571cf6) with the following in my
> local.conf:
> 
> MACHINE ?= "versal-generic"
> BOARD ?= "vck190"
> 
> Thanks,
> Corey
From bfdf387f47320216d0b51b0d935637b1cc3a084d Mon Sep 17 00:00:00 2001
From: Corey Thompson <[email protected]>
Date: Mon, 2 May 2022 13:56:52 -0400
Subject: [PATCH] extract-cdo: Avoid directly populating ${DEPLOY_DIR_IMAGE}

This creates problems when images are deployed from sstate cache.  Avoid
it by copying the xilinx-bootbin boot.bin file into the extract-cdo
build dir ${B} before using bootgen to create pmc_cdo.bin there, and
then deploy from the output in ${B}.
---
 meta-xilinx-bsp/recipes-bsp/cdo/extract-cdo_1.0.bb | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/meta-xilinx-bsp/recipes-bsp/cdo/extract-cdo_1.0.bb 
b/meta-xilinx-bsp/recipes-bsp/cdo/extract-cdo_1.0.bb
index dedb3559..7dac5111 100644
--- a/meta-xilinx-bsp/recipes-bsp/cdo/extract-cdo_1.0.bb
+++ b/meta-xilinx-bsp/recipes-bsp/cdo/extract-cdo_1.0.bb
@@ -21,14 +21,17 @@ BOOTGEN_CMD ?= "bootgen"
 BOOTGEN_ARGS ?= "-arch versal"
 BOOTGEN_OUTFILE ?= "${DEPLOY_DIR_IMAGE}/boot.bin"
 
-#The following line creates the pmc_cdo.bin file at the same dir as the 
boot.bin which is DEPLOY_DIR_IMAGE
+# bootgen creates the pmc_cdo.bin file at the same dir as the boot.bin, so copy
+# it into our build dir first
 do_compile() {
-    ${BOOTGEN_CMD} ${BOOTGEN_ARGS} -dump ${BOOTGEN_OUTFILE} pmc_cdo
+    cp ${BOOTGEN_OUTFILE} ${B}/boot.bin
+    ${BOOTGEN_CMD} ${BOOTGEN_ARGS} -dump ${B}/boot.bin pmc_cdo
 }
 
 do_deploy() {
     install -d ${DEPLOYDIR}/CDO
-    install -m 0644 ${DEPLOY_DIR_IMAGE}/pmc_cdo.bin 
${DEPLOYDIR}/CDO/pmc_cdo.bin
+    install -m 0644 ${B}/pmc_cdo.bin ${DEPLOYDIR}/CDO/pmc_cdo.bin
+    install -m 0644 ${B}/pmc_cdo.bin ${DEPLOYDIR}/pmc_cdo.bin
 }
 
 addtask do_deploy after do_install
-- 
2.33.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#4982): 
https://lists.yoctoproject.org/g/meta-xilinx/message/4982
Mute This Topic: https://lists.yoctoproject.org/mt/90842546/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-xilinx/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to