Hi Nathan,

________________________________
From: Nathan Rossi <nat...@nathanrossi.com>
Sent: Wednesday, May 16, 2018 13:20
To: Martin Siegumfeldt
Cc: meta-xilinx@yoctoproject.org
Subject: Re: [meta-xilinx] Provider of pmu-firmware [rel-v2018.1]

On 16 May 2018 at 18:24, Martin Siegumfeldt <m...@gomspace.com> wrote:
> Hi Nathan,
>
>
> I don't quite follow you here - the PMU provider of zcu102 is:
>
>
> martin@dell:~/work/petalinux/build$ cat
> ../sources/meta-xilinx/meta-xilinx-bsp/conf/machine/zcu102-zynqmp.conf |
> grep PREFERRED_PROVIDER_virtual/pmu
> PREFERRED_PROVIDER_virtual/pmu-firmware ?= "zynqmp-pmu-pmu-firmware"
>
> however, it is built using XSDK - from the compile log:
>
>
> + eval xsct
> /home/martin/work/petalinux/build/tmp/work/zcu102_zynqmp-xilinx-linux/pmu-firmware/2018.1+gitAUTOINC+aaa566bc3f-r0/app.tcl
> -ws
> /home/martin/work/petalinux/build/tmp/work/zcu102_zynqmp-xilinx-linux/pmu-firmware/2018.1+gitAUTOINC+aaa566bc3f-r0/build
> -pname pmu-firmware -rp
> /home/martin/work/petalinux/build/tmp/work/zcu102_zynqmp-xilinx-linux/pmu-firmware/2018.1+gitAUTOINC+aaa566bc3f-r0/git
> -do_compile 1

You are looking in the wrong work directory for the meta-xilinx-bsp
built pmu-firmware. It is under "zcu102_zynqmp-oe-elf" or likely in
your setup "zcu102_zynqmp-xilinx-elf". Since the zynqmp-pmu extender
has the target os as "elf" due to it being a baremetal build.

e.g. work/zcu102_zynqmp-oe-elf/zynqmp-pmu-pmu-firmware/

I am not considering log files but the terminal output:

martin@dell:~/work/petalinux/build$ bitbake virtual/pmu-firmware -v | egrep -i 
xsct
+ echo cmd is: xsct 
/home/martin/work/petalinux/build/tmp/work/zcu102_zynqmp-xilinx-linux/pmu-firmware/2018.1+gitAUTOINC+aaa566bc3f-r0/app.tcl
 -ws 
/home/martin/work/petalinux/build/tmp/work/zcu102_zynqmp-xilinx-linux/pmu-firmware/2018.1+gitAUTOINC+aaa566bc3f-r0/build
 -pname pmu-firmware -rp 
/home/martin/work/petalinux/build/tmp/work/zcu102_zynqmp-xilinx-linux/pmu-firmware/2018.1+gitAUTOINC+aaa566bc3f-r0/git
 -processor psu_pmu_0 -hdf 
/home/martin/work/petalinux/build/tmp/deploy/images/zcu102-zynqmp/Xilinx-zcu102-zynqmp.hdf
 -arch 32  -app "ZynqMP PMU Firmware"  -yamlconf 
/home/martin/work/petalinux/build/tmp/work/zcu102_zynqmp-xilinx-linux/pmu-firmware/2018.1+gitAUTOINC+aaa566bc3f-r0/pmu-firmware.yaml
cmd is: xsct 
/home/martin/work/petalinux/build/tmp/work/zcu102_zynqmp-xilinx-linux/pmu-firmware/2018.1+gitAUTOINC+aaa566bc3f-r0/app.tcl
 -ws 
/home/martin/work/petalinux/build/tmp/work/zcu102_zynqmp-xilinx-linux/pmu-firmware/2018.1+gitAUTOINC+aaa566bc3f-r0/build
 -pname pmu-firmware -rp 
/home/martin/work/petalinux/build/tmp/work/zcu102_zynqmp-xilinx-linux/pmu-firmware/2018.1+gitAUTOINC+aaa566bc3f-r0/git
 -processor psu_pmu_0 -hdf 
/home/martin/work/petalinux/build/tmp/deploy/images/zcu102-zynqmp/Xilinx-zcu102-zynqmp.hdf
 -arch 32  -app "ZynqMP PMU Firmware"  -yamlconf 
/home/martin/work/petalinux/build/tmp/work/zcu102_zynqmp-xilinx-linux/pmu-firmware/2018.1+gitAUTOINC+aaa566bc3f-r0/pmu-firmware.yaml
+ eval xsct 
/home/martin/work/petalinux/build/tmp/work/zcu102_zynqmp-xilinx-linux/pmu-firmware/2018.1+gitAUTOINC+aaa566bc3f-r0/app.tcl
 -ws 
/home/martin/work/petalinux/build/tmp/work/zcu102_zynqmp-xilinx-linux/pmu-firmware/2018.1+gitAUTOINC+aaa566bc3f-r0/build
 -pname pmu-firmware -rp 
/home/martin/work/petalinux/build/tmp/work/zcu102_zynqmp-xilinx-linux/pmu-firmware/2018.1+gitAUTOINC+aaa566bc3f-r0/git
 -processor psu_pmu_0 -hdf 
/home/martin/work/petalinux/build/tmp/deploy/images/zcu102-zynqmp/Xilinx-zcu102-zynqmp.hdf
 -arch 32 -app "ZynqMP PMU Firmware" -yamlconf 
/home/martin/work/petalinux/build/tmp/work/zcu102_zynqmp-xilinx-linux/pmu-firmware/2018.1+gitAUTOINC+aaa566bc3f-r0/pmu-firmware.yaml
+ xsct 
/home/martin/work/petalinux/build/tmp/work/zcu102_zynqmp-xilinx-linux/pmu-firmware/2018.1+gitAUTOINC+aaa566bc3f-r0/app.tcl
 -ws 
/home/martin/work/petalinux/build/tmp/work/zcu102_zynqmp-xilinx-linux/pmu-firmware/2018.1+gitAUTOINC+aaa566bc3f-r0/build
 -pname pmu-firmware -rp 
/home/martin/work/petalinux/build/tmp/work/zcu102_zynqmp-xilinx-linux/pmu-firmware/2018.1+gitAUTOINC+aaa566bc3f-r0/git
 -processor psu_pmu_0 -hdf 
/home/martin/work/petalinux/build/tmp/deploy/images/zcu102-zynqmp/Xilinx-zcu102-zynqmp.hdf
 -arch 32 -app ZynqMP PMU Firmware -yamlconf 
/home/martin/work/petalinux/build/tmp/work/zcu102_zynqmp-xilinx-linux/pmu-firmware/2018.1+gitAUTOINC+aaa566bc3f-r0/pmu-firmware.yaml
XSCTHELPER INFO: Empty WorkSpace
XSCTHELPER INFO: No BSP Configuration
+ eval xsct 
/home/martin/work/petalinux/build/tmp/work/zcu102_zynqmp-xilinx-linux/pmu-firmware/2018.1+gitAUTOINC+aaa566bc3f-r0/app.tcl
 -ws 
/home/martin/work/petalinux/build/tmp/work/zcu102_zynqmp-xilinx-linux/pmu-firmware/2018.1+gitAUTOINC+aaa566bc3f-r0/build
 -pname pmu-firmware -rp 
/home/martin/work/petalinux/build/tmp/work/zcu102_zynqmp-xilinx-linux/pmu-firmware/2018.1+gitAUTOINC+aaa566bc3f-r0/git
 -do_compile 1
+ xsct 
/home/martin/work/petalinux/build/tmp/work/zcu102_zynqmp-xilinx-linux/pmu-firmware/2018.1+gitAUTOINC+aaa566bc3f-r0/app.tcl
 -ws 
/home/martin/work/petalinux/build/tmp/work/zcu102_zynqmp-xilinx-linux/pmu-firmware/2018.1+gitAUTOINC+aaa566bc3f-r0/build
 -pname pmu-firmware -rp 
/home/martin/work/petalinux/build/tmp/work/zcu102_zynqmp-xilinx-linux/pmu-firmware/2018.1+gitAUTOINC+aaa566bc3f-r0/git
 -do_compile 1

with the provider:

martin@dell:~/work/petalinux/build$ cat 
../sources/meta-xilinx/meta-xilinx-bsp/conf/machine/zcu102-zynqmp.conf | grep 
PREFERRED_PROVIDER_virtual/pmu
PREFERRED_PROVIDER_virtual/pmu-firmware ?= "zynqmp-pmu-pmu-firmware"

What puzzles me is that no matter the assignment of the provider, the following 
is returned by bitbake:

martin@dell:~/work/petalinux/build$ bitbake -e | grep 
PREFERRED_PROVIDER_virtual/pmu
# $PREFERRED_PROVIDER_virtual/pmu-firmware [2 operations]
PREFERRED_PROVIDER_virtual/pmu-firmware="pmu-firmware"

I don't completely understand your concept here, is this the issue or expected?

>
> martin@dell:~/work/petalinux/build$ ll tmp/deploy/images/zcu102-zynqmp/pmu-*
> -rw-r--r-- 2 martin martin 116744 May 15 10:31
> tmp/deploy/images/zcu102-zynqmp/pmu-firmware-2018.1+gitAUTOINC+aaa566bc3f-r0-zcu102-zynqmp-20180515083059.elf
> lrwxrwxrwx 2 martin martin     77 May 15 10:31
> tmp/deploy/images/zcu102-zynqmp/pmu-firmware-zcu102-zynqmp.elf ->
> pmu-firmware-2018.1+gitAUTOINC+aaa566bc3f-r0-zcu102-zynqmp-20180515083059.elf
> lrwxrwxrwx 2 martin martin     30 May 15 10:31
> tmp/deploy/images/zcu102-zynqmp/pmu-zcu102-zynqmp.elf ->
> pmu-firmware-zcu102-zynqmp.elf

Unfortunately it is hard to know which provider these files come from
since both recipes populate with the exact same naming. Maybe that
needs some tweaking? Otherwise just confirm they are the ones you want
by hashing them against the files in the work dir of the intended
source (as above).

Regards,
Nathan

>
> Br,
> Martin
>
>
> ________________________________
> From: Nathan Rossi <nat...@nathanrossi.com>
> Sent: Tuesday, May 15, 2018 6:19:43 PM
> To: Martin Siegumfeldt
> Cc: meta-xilinx@yoctoproject.org
> Subject: Re: [meta-xilinx] Provider of pmu-firmware [rel-v2018.1]
>
> On 15 May 2018 at 20:54, Martin Siegumfeldt <m...@gomspace.com> wrote:
>> Hi,
>>
>> Based on
>> https://github.com/Xilinx/meta-xilinx-tools/commit/a516c3a4a8b29e07233b5f2ecf91a2a3e63a1ff7
>> I would like to switch from building the pmu-firmware using the XSDK (i.e.
>> through meta-xilinx-tools) to the generated toolchain (i.e. through
>> meta-xilinx). However the latter layer seems not (directly at least) to
>> provide this:
>>
>> martin@dell:~/work/tmp/xilinx$ ack ^'PROVIDES = "virtual/pmu-firmware'
>> meta-xilinx-tools/ meta-xilinx
>> meta-xilinx-tools/recipes-bsp/pmu-firmware/pmu-firmware_git.bb
>> 3:PROVIDES = "virtual/pmu-firmware"
>>
>> Inspecting
>> https://github.com/Xilinx/meta-xilinx/blob/rel-v2018.1/meta-xilinx-bsp/recipes-bsp/pmu-firmware/pmu-firmware_2017.3.bb
>>
>> provides the following information:
>>
>> # force this recipe to provide a target virtual/pmu-firmware. this is
>> applied
>> # after any class extender mapping and results in this recipe always
>> providing
>> # 'virtual/pmu-firmware'.
>> python append_target_provides () {
>>     d.appendVar("PROVIDES", " virtual/pmu-firmware")
>> }
>
> This is to work around the recipe only providing
> "virtual/zynqmp-pmu-pmu-firmware" since the recipe is only valid for
> the microblaze 'multilib'.
>
>>
>> which is not exactly clear to me? In any case, the recipes are named the
>> same and I don't see how to switch between the providers? I tried deleting
>> 'meta-xilinx-tools/recipes-bsp/pmu-firmware/pmu-firmware_git.bb' after which
>> the meta-xilinx variant seems to be built but does not boot.
>>
>> Am I missing something or is the provider concept broken/incomplete?
>
> The preferred provider selection should work, however due to the
> naming of the recipes it might be a bit confusing.
>
> To use the pmu-firmware (aka zynqmp-pmu-pmu-firmware) built in oe via
> the meta-xilinx-bsp pmu-firmware recipe you should set the provider
> like so:
>
> PREFERRED_PROVIDER_virtual/pmu-firmware = "zynqmp-pmu-pmu-firmware"
>
> (like how the zcu102-zynqmp machine does
> https://github.com/Xilinx/meta-xilinx/blob/master/meta-xilinx-bsp/conf/machine/zcu102-zynqmp.conf#L28)
>
> To use the pmu-firmware built using XSDK/xsct via the
> meta-xilinx-tools pmu-firmware recipe you should set the provider like
> so:
>
> PREFERRED_PROVIDER_virtual/pmu-firmware = "pmu-firmware"
>
> Regards,
> Nathan
-- 
_______________________________________________
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx

Reply via email to