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

attrflags is not expanded #15

Open YehorRaketskyi opened 5 years ago

YehorRaketskyi commented 5 years ago

If "attrflags" contains some environment variable, result.bif file will contain something like "[destination_cpu=a53-0, offset=${DTB_OFFSET}] /mnt/ext/bla/blabla/build/tmp/deploy/images/blablabla/blablabla-system.dtb " instead of "[destination_cpu=a53-0, offset=0x1c80000] /mnt/ext/bla/blabla/build/tmp/deploy/images/blablabla/blablabla-system.dtb "

To prevent it, attrflags should be expanded.

https://github.com/Xilinx/meta-xilinx-tools/blob/881132b62dc01e57b8d9ace458a0005528179e14/recipes-bsp/bootbin/xilinx-bootbin_1.0.bb#L46 Change to cfgval = d.expand(attrflags[cfg]).split(',')

https://github.com/Xilinx/meta-xilinx-tools/blob/881132b62dc01e57b8d9ace458a0005528179e14/recipes-bsp/bootbin/xilinx-bootbin_1.0.bb#L57 Change to cfgval = d.expand(attrflags[cfg]).split(',')

mharth commented 5 years ago

Is this new on master or warrior branch?

YehorRaketskyi commented 5 years ago

Is this new on master or warrior branch?

On both, if "warrior" is rel-v2019.1

mharth commented 5 years ago

rel-v2019.1 is on thud and we dont see the issue

YehorRaketskyi commented 5 years ago

Ok. Try to add a "xilinx-bootbin_%.bbappend":

DTB_OFFSET = "0x2A00000"
DTB_OFFSET_zcu102-zynqmp = "0x1C00000"

# specify BIF partition attributes for Device-tree blob
# destination cpu for a53-0.
BIF_PARTITION_ATTR[dtb] ?= "destination_cpu=a53-0,offset=${DTB_OFFSET}"
BIF_PARTITION_IMAGE[dtb] ?= "${DEPLOY_DIR_IMAGE}/${MACHINE}-system.dtb"
BIF_PARTITION_DEPENDS[dtb] ?= "virtual/dtb:do_deploy"

BIF_PARTITION_ATTR_zynqmp = "fsbl bitstream pmu atf u-boot dtb "

And you will find the issue.