Skip to content

Conversation

gsmecher
Copy link

Currently, do_install() copies files into ${D}/boot and do_deploy() copies them from there into ${DEPLOYDIR}. However, when do_install() and do_deploy() are executed across different bitbake runs, ${IMAGE_VERSION_SUFFIX} changes and the ${ATF_BASE_NAME} used for filenames differs between the two. This causes failures during do_deploy():

| DEBUG: Executing shell function do_deploy
| install: cannot stat '[...]/build/tmp/work/t0_crs-poky-linux/trusted-firmware-a/2.10.0-xilinx-v2024.2/image/boot/arm-trusted-firmware--2.10.0-xilinx-v2024.2-r0-20250724184305.elf': No such file or directory
| WARNING: [...]/build/tmp/work/t0_crs-poky-linux/trusted-firmware-a/2.10.0-xilinx-v2024.2/temp/run.do_deploy.1652316:143 exit 1 from 'install -m 0644 [...]/build/tmp/work/t0_crs-poky-linux/trusted-firmware-a/2.10.0-xilinx-v2024.2/image/boot/arm-trusted-firmware--2.10.0-xilinx-v2024.2-r0-20250724184305.elf [...]/build/tmp/work/t0_crs-poky-linux/trusted-firmware-a/2.10.0-xilinx-v2024.2/deploy-trusted-firmware-a/arm-trusted-firmware--2.10.0-xilinx-v2024.2-r0-20250724184305.elf'
| WARNING: Backtrace (BB generated script):
| 	#1: do_deploy, [...]/build/tmp/work/t0_crs-poky-linux/trusted-firmware-a/2.10.0-xilinx-v2024.2/temp/run.do_deploy.1652316, line 143
| 	#2: main, [...]/build/tmp/work/t0_crs-poky-linux/trusted-firmware-a/2.10.0-xilinx-v2024.2/temp/run.do_deploy.1652316, line 154

This patch uses fixed filenames for the deployment process.

Currently, do_install() copies files into ${D}/boot and do_deploy()
copies them from there into ${DEPLOYDIR}. However, when do_install() and
do_deploy() are executed across different bitbake runs,
${IMAGE_VERSION_SUFFIX} changes and the ${ATF_BASE_NAME} used for
filenames differs between the two. This causes failures during
do_deploy():

    | DEBUG: Executing shell function do_deploy
    | install: cannot stat '[...]/build/tmp/work/t0_crs-poky-linux/trusted-firmware-a/2.10.0-xilinx-v2024.2/image/boot/arm-trusted-firmware--2.10.0-xilinx-v2024.2-r0-20250724184305.elf': No such file or directory
    | WARNING: [...]/build/tmp/work/t0_crs-poky-linux/trusted-firmware-a/2.10.0-xilinx-v2024.2/temp/run.do_deploy.1652316:143 exit 1 from 'install -m 0644 [...]/build/tmp/work/t0_crs-poky-linux/trusted-firmware-a/2.10.0-xilinx-v2024.2/image/boot/arm-trusted-firmware--2.10.0-xilinx-v2024.2-r0-20250724184305.elf [...]/build/tmp/work/t0_crs-poky-linux/trusted-firmware-a/2.10.0-xilinx-v2024.2/deploy-trusted-firmware-a/arm-trusted-firmware--2.10.0-xilinx-v2024.2-r0-20250724184305.elf'
    | WARNING: Backtrace (BB generated script):
    | 	Xilinx#1: do_deploy, [...]/build/tmp/work/t0_crs-poky-linux/trusted-firmware-a/2.10.0-xilinx-v2024.2/temp/run.do_deploy.1652316, line 143
    | 	Xilinx#2: main, [...]/build/tmp/work/t0_crs-poky-linux/trusted-firmware-a/2.10.0-xilinx-v2024.2/temp/run.do_deploy.1652316, line 154

This patch uses fixed filenames for the deployment process.

Signed-Off-By: Graeme Smecher <gsmecher@t0.technology>
@gsmecher
Copy link
Author

@mhatle
Copy link
Collaborator

mhatle commented Jul 31, 2025

Further reviewing this, I'm not sure why the issue is happening -- but essentially do_install is being restored from sstate-cache, but do_deploy is running. Due to the deploy class and the timestamps it uses the do_install and do_deploy timestamps can differ.

Looking at meta-arm, they corrected this issue with a simple 'cp -r' from ${D}/... to the deploy directory. I'm going to implement the fix following that example. Essentially:

do_deploy() {
cp -rf ${D}/boot/* ${DEPLOYDIR}/
}

This will ensure any date stamps are preserved and match do_install, even if the do_deploy and do_install get separated (in time) during the build process.

@gsmecher
Copy link
Author

Thanks again, @mhatle - that sounds reasonable. Please feel free to close the issue here whenever it's served its purpose.

@mhatle
Copy link
Collaborator

mhatle commented Jul 31, 2025

I plan to close this once I've got a fix (yours or my proposed one) merged into the public repository. Thank you again for the report and pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants