Xilinx / meta-xilinx-tools

Yocto Project layer enables AMD Xilinx tools related metadata for MicroBlaze, Zynq, ZynqMP and Versal devices.
MIT License
53 stars 51 forks source link

xsct-tarball.bbclass weak assigns XSCT_STAGING_DIR but doesn't honor it #20

Closed alan-kozlay closed 4 years ago

alan-kozlay commented 4 years ago

My immediate issue: In meta-xilinx-tools/classes/xsct-tarball.bbclass, we have: XSCT_STAGING_DIR ?= "${STAGING_DIR}-xsct"

But when it comes time to make use of that path (further down) we have: cmd = d.expand("\ rm -rf ${STAGING_DIR}-xsct; \ mkdir -p ${STAGING_DIR}-xsct; \ cd ${STAGING_DIR}-xsct; \ tar -xvf ${XSCT_DLDIR}/${XSCT_TARBALL};")

This prevents me from solving another larger issue I'm seeing, by overriding it. So, solving this would at least allow me to side step the larger issue.

The larger issue: Because the execution of xsct-tarball.bbclass : xsct_event_extract() occurs before mulit-config is applied (but after the local.conf is parsed), TMPDIR is defined by the local.conf (or the default bitbake.conf) to something like "build/tmp/" and is used in the calculation of STAGING_DIR (destination for unpacking the tarball).

Later, BitBake progresses to building an image based on my specific multi-config which sets TMPDIR to a specific path (not "build/tmp/"). When a Xilinx recipe looks for xsct on path, xsct-tc.bbclass has calculated XSCT_PATH_ADD using the new TMPDIR and the recipe do_configure complains that xsct tools can't be found.

I can't simply keep "build/tmp/" as the TMPDIR in my multi-config because I actually have 5 different multi-configs, each with a custom TMPDIR (as recommended by the BitBake manual).

alan-kozlay commented 4 years ago

I've created a PR to fix the immediate issue, described above: https://github.com/Xilinx/meta-xilinx-tools/pull/21

ckalluri73 commented 4 years ago

Please see the comments against the opened PR