• 0
Victor

Error in petalinux-build command

Question

Hello all

I tried to make the PataLinux project based on Digilent's file "Petalinux-Zybo-Z7-10-2017.4-1.bsp"
and own *.hdf.
I tried to implement the following command:

petalinux-create -t project -s <path to bsp>.bsp
cd <plnx proj>
petalinux-config --get-hw-description=<path to hdf>
petalinux-build


Concrete steps:

petalinux-create -t project -s /home/victor/Zybo-Z7-10__BSP/Petalinux-Zybo-Z7-10-2017.4-1.bsp

cd into /home/victor/Zybo-Z7-10

[email protected]:~/Zybo-Z7-10$ petalinux-build

This command works about 1 hour and gives the error:


[email protected]:~/Zybo-Z7-10$ petalinux-build
[INFO] building project
[INFO] sourcing bitbake
INFO: bitbake petalinux-user-image
Loading cache: 100% |#############################################################################################| Time: 0:00:00
Loaded 3258 entries from dependency cache.
Parsing recipes: 100% |###########################################################################################| Time: 0:00:04
Parsing of 2473 .bb files complete (2430 cached, 43 parsed). 3266 targets, 226 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Initialising tasks: 100% |########################################################################################| Time: 0:00:07
Checking sstate mirror object availability: 100% |################################################################| Time: 1:12:33
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: device-tree-generation-xilinx+gitAUTOINC+3c7407f6f8-r0 do_compile: Function failed: do_compile (log file is located at /home/victor/Zybo-Z7-10/build/tmp/work/plnx_arm-xilinx-linux-gnueabi/device-tree-generation/xilinx+gitAUTOINC+3c7407f6f8-r0/temp/log.do_compile.10089)
ERROR: Logfile of failure stored in: /home/victor/Zybo-Z7-10/build/tmp/work/plnx_arm-xilinx-linux-gnueabi/device-tree-generation/xilinx+gitAUTOINC+3c7407f6f8-r0/temp/log.do_compile.10089
Log data follows:
| DEBUG: Executing shell function do_compile
| Error: /home/victor/Zybo-Z7-10/build/tmp/work/plnx_arm-xilinx-linux-gnueabi/device-tree-generation/xilinx+gitAUTOINC+3c7407f6f8-r0/system-user.dtsi:76.1-14 Label or path axi_dynclk_0 not found
| Error: /home/victor/Zybo-Z7-10/build/tmp/work/plnx_arm-xilinx-linux-gnueabi/device-tree-generation/xilinx+gitAUTOINC+3c7407f6f8-r0/system-user.dtsi:81.1-12 Label or path axi_vdma_1 not found
| Error: /home/victor/Zybo-Z7-10/build/tmp/work/plnx_arm-xilinx-linux-gnueabi/device-tree-generation/xilinx+gitAUTOINC+3c7407f6f8-r0/system-user.dtsi:84.1-10 Label or path v_tc_out not found
| Error: /home/victor/Zybo-Z7-10/build/tmp/work/plnx_arm-xilinx-linux-gnueabi/device-tree-generation/xilinx+gitAUTOINC+3c7407f6f8-r0/system-user.dtsi:90.1-9 Label or path v_tc_in not found
| Error: /home/victor/Zybo-Z7-10/build/tmp/work/plnx_arm-xilinx-linux-gnueabi/device-tree-generation/xilinx+gitAUTOINC+3c7407f6f8-r0/system-user.dtsi:93.1-12 Label or path axi_vdma_0 not found
| Error: /home/victor/Zybo-Z7-10/build/tmp/work/plnx_arm-xilinx-linux-gnueabi/device-tree-generation/xilinx+gitAUTOINC+3c7407f6f8-r0/system-user.dtsi:96.1-16 Label or path axi_gpio_video not found
| Error: /home/victor/Zybo-Z7-10/build/tmp/work/plnx_arm-xilinx-linux-gnueabi/device-tree-generation/xilinx+gitAUTOINC+3c7407f6f8-r0/system-user.dtsi:99.1-9 Label or path pwm_rgb not found
| Error: /home/victor/Zybo-Z7-10/build/tmp/work/plnx_arm-xilinx-linux-gnueabi/device-tree-generation/xilinx+gitAUTOINC+3c7407f6f8-r0/system-user.dtsi:138.1-15 Label or path axi_i2s_adi_0 not found
| Error: /home/victor/Zybo-Z7-10/build/tmp/work/plnx_arm-xilinx-linux-gnueabi/device-tree-generation/xilinx+gitAUTOINC+3c7407f6f8-r0/system-user.dtsi:154.1-14 Label or path axi_gpio_led not found
| Error: /home/victor/Zybo-Z7-10/build/tmp/work/plnx_arm-xilinx-linux-gnueabi/device-tree-generation/xilinx+gitAUTOINC+3c7407f6f8-r0/system-user.dtsi:159.1-17 Label or path axi_gpio_sw_btn not found
| FATAL ERROR: Syntax error parsing input tree
| WARNING: /home/victor/Zybo-Z7-10/build/tmp/work/plnx_arm-xilinx-linux-gnueabi/device-tree-generation/xilinx+gitAUTOINC+3c7407f6f8-r0/temp/run.do_compile.10089:1 exit 1 from 'dtc -I dts -O dtb -R 8 -p 0x1000 -i /home/victor/Zybo-Z7-10/build/tmp/work/plnx_arm-xilinx-linux-gnueabi/device-tree-generation/xilinx+gitAUTOINC+3c7407f6f8-r0 -i /home/victor/Zybo-Z7-10/build/../components/plnx_workspace/device-tree/device-tree-generation -o /home/victor/Zybo-Z7-10/build/../components/plnx_workspace/device-tree/device-tree-generation/plnx_arm-system.dtb /home/victor/Zybo-Z7-10/build/../components/plnx_workspace/device-tree/device-tree-generation/plnx_arm-system.pp'
| ERROR: Function failed: do_compile (log file is located at /home/victor/Zybo-Z7-10/build/tmp/work/plnx_arm-xilinx-linux-gnueabi/device-tree-generation/xilinx+gitAUTOINC+3c7407f6f8-r0/temp/log.do_compile.10089)
ERROR: Task (/opt/pkg/petalinux/components/yocto/source/arm/layers/meta-xilinx-tools/recipes-bsp/device-tree/device-tree-generation_git.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 2597 tasks of which 1888 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /opt/pkg/petalinux/components/yocto/source/arm/layers/meta-xilinx-tools/recipes-bsp/device-tree/device-tree-generation_git.bb:do_compile
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
ERROR: Failed to build project


log - file below this letter.

Please help to avoid this error.

Thank you.

Best regards,
Victor.

==================================================================================================================
DEBUG: Executing shell function do_compile
Error: /home/victor/Zybo-Z7-10/build/tmp/work/plnx_arm-xilinx-linux-gnueabi/device-tree-generation/xilinx+gitAUTOINC+3c7407f6f8-r0/system-user.dtsi:76.1-14 Label or path axi_dynclk_0 not found
Error: /home/victor/Zybo-Z7-10/build/tmp/work/plnx_arm-xilinx-linux-gnueabi/device-tree-generation/xilinx+gitAUTOINC+3c7407f6f8-r0/system-user.dtsi:81.1-12 Label or path axi_vdma_1 not found
Error: /home/victor/Zybo-Z7-10/build/tmp/work/plnx_arm-xilinx-linux-gnueabi/device-tree-generation/xilinx+gitAUTOINC+3c7407f6f8-r0/system-user.dtsi:84.1-10 Label or path v_tc_out not found
Error: /home/victor/Zybo-Z7-10/build/tmp/work/plnx_arm-xilinx-linux-gnueabi/device-tree-generation/xilinx+gitAUTOINC+3c7407f6f8-r0/system-user.dtsi:90.1-9 Label or path v_tc_in not found
Error: /home/victor/Zybo-Z7-10/build/tmp/work/plnx_arm-xilinx-linux-gnueabi/device-tree-generation/xilinx+gitAUTOINC+3c7407f6f8-r0/system-user.dtsi:93.1-12 Label or path axi_vdma_0 not found
Error: /home/victor/Zybo-Z7-10/build/tmp/work/plnx_arm-xilinx-linux-gnueabi/device-tree-generation/xilinx+gitAUTOINC+3c7407f6f8-r0/system-user.dtsi:96.1-16 Label or path axi_gpio_video not found
Error: /home/victor/Zybo-Z7-10/build/tmp/work/plnx_arm-xilinx-linux-gnueabi/device-tree-generation/xilinx+gitAUTOINC+3c7407f6f8-r0/system-user.dtsi:99.1-9 Label or path pwm_rgb not found
Error: /home/victor/Zybo-Z7-10/build/tmp/work/plnx_arm-xilinx-linux-gnueabi/device-tree-generation/xilinx+gitAUTOINC+3c7407f6f8-r0/system-user.dtsi:138.1-15 Label or path axi_i2s_adi_0 not found
Error: /home/victor/Zybo-Z7-10/build/tmp/work/plnx_arm-xilinx-linux-gnueabi/device-tree-generation/xilinx+gitAUTOINC+3c7407f6f8-r0/system-user.dtsi:154.1-14 Label or path axi_gpio_led not found
Error: /home/victor/Zybo-Z7-10/build/tmp/work/plnx_arm-xilinx-linux-gnueabi/device-tree-generation/xilinx+gitAUTOINC+3c7407f6f8-r0/system-user.dtsi:159.1-17 Label or path axi_gpio_sw_btn not found
FATAL ERROR: Syntax error parsing input tree
WARNING: /home/victor/Zybo-Z7-10/build/tmp/work/plnx_arm-xilinx-linux-gnueabi/device-tree-generation/xilinx+gitAUTOINC+3c7407f6f8-r0/temp/run.do_compile.10089:1 exit 1 from 'dtc -I dts -O dtb -R 8 -p 0x1000 -i /home/victor/Zybo-Z7-10/build/tmp/work/plnx_arm-xilinx-linux-gnueabi/device-tree-generation/xilinx+gitAUTOINC+3c7407f6f8-r0 -i /home/victor/Zybo-Z7-10/build/../components/plnx_workspace/device-tree/device-tree-generation -o /home/victor/Zybo-Z7-10/build/../components/plnx_workspace/device-tree/device-tree-generation/plnx_arm-system.dtb /home/victor/Zybo-Z7-10/build/../components/plnx_workspace/device-tree/device-tree-generation/plnx_arm-system.pp'
ERROR: Function failed: do_compile (log file is located at /home/victor/Zybo-Z7-10/build/tmp/work/plnx_arm-xilinx-linux-gnueabi/device-tree-generation/xilinx+gitAUTOINC+3c7407f6f8-r0/temp/log.do_compile.10089)
 

Share this post


Link to post
Share on other sites

15 answers to this question

Recommended Posts

  • 0

Your design has removed hardware in PL that was refered in device tree. You will also have to cleanup device tree bindings in system–user.dtsi

Share this post


Link to post
Share on other sites
  • 0

Please help,

ShouId I to edit this file ?

Which items I have to edit ?

Thank you.

Edited by Victor

Share this post


Link to post
Share on other sites
  • 0

@Victor

If you are not sure what to edit you may find reading the petalinux userguide useful to find out of where things are.

Compare existing vivaodo design with your design to find out what components were removed added

Reading the log you get a list of what issues have to be addressed, example: system-user.dtsi:93.1-12 Label or path axi_vdma_0 not found

It is clear that you do not have this component and others.

Additionally you can start from the same design as Petalinux-Zybo-Z7-10 project and do smaller change then re-import hardware.

For this particular task you also need to know what device trees are and how to change them. Reading documentation on this subject will help as well.

Edited by Ionel

Share this post


Link to post
Share on other sites
  • 0

I have removed all blocks which contain label or path  mentioned in the ERROR messages
from the file system-user.dtsi and overwrite this file.

Then I implemented the commands:
petalinux-build
cd images/lnux
petalinux-package --boot --u-boot
and they were finished without errors.

Then I wrote BOOT.BIN and image.ub into SD and tried to download this image
into the FPGA of the board Zybo-Z7-10 but this image was not downloded. 

Corrected file system-user.dtsi is in the attachment.

Can you suggest what necessary to do in this situation ?

Thank you.

Best regards,
Victor.

system-user.zip

Share this post


Link to post
Share on other sites
  • 0

I'm not sure what you mean by "and tried to download this image into the FPGA of the board Zybo-Z7-10 but this image was not downloaded".

Once BOOT.BIN and image.ub are on the SD, you boot the board from the SD and you should see Linux boot messages on the serial console.

Share this post


Link to post
Share on other sites
  • 0

>I assume you have the jumper set to boot from SD?

   Of course, jumper  is set as "SD" and  image from another SD (reference design from Digilent)  is loaded succesfully.

>Are you getting anything on the serial console?

   No.    Image is not loaded into FPGA and  led  "DONE"  does not  shine.  

Share this post


Link to post
Share on other sites
  • 0

Looks like something didn't build properly.

Start with a standard build of our project, make incremental changes and see at which change it stops booting / displaying boot messages on the console.

Share this post


Link to post
Share on other sites
  • 0

Hello lonel

I did 3 experiments with the own project (not with Digilent's project)

1)
source /opt/pkg/petalinux/settings.sh

petalinux-create --type project --template zynq --name Zybo-Z7-10__my

cd Zybo-Z7-10__my

petalinux-config --get-hw-description=/home/victor/Zybo-Z7-10__v2

cd Zybo-Z7-10__my

petalinux-build


// used already existing *.elf and *.bit from /images/linux/
petalinux-package --boot --force --fsbl images/linux/zynq_fsbl.elf --fpga images/linux/design_1_wrapper.bit --u-boot

Result:
--------
Obtained with this command BOOT.BIN and image.ug  were written into SD and  succesfully loaded into FPGA of the Zybo-Z7-10.
Messages went to the TeraTerm.


2) 
 petalinux-build

// used own  *.bit from my Vivado project "Zybo-Z7-10__v2"
petalinux-package --boot --force --fpga /home/victor/Zybo-Z7-10__v2/design_1_wrapper.bit

Result:
--------
Obtained with this command BOOT.BIN and image.ug  were written into SD, 
but this image was not loaded into FPGA (led "DONE" was not set up)

3)
 petalinux-build

// used own  *.elf AND *.bit from my Vivado project "Zybo-Z7-10__v2"
petalinux-package --boot --force --fsbl /home/victor/Zybo-Z7-10__v2/Hello_World_4.elf --fpga /home/victor/Zybo-Z7-10__v2/design_1_wrapper.bit --u-boot

Result:
--------
Obtained with this command BOOT.BIN and image.ug  were written into SD, 
but this image was not loaded into FPGA (led "DONE" was not set up)


Why the 2nd and 3rd images were not loaded into FPGA ?
Could you comment this results ?

Thank you.

Best regards,
Victor.
-----------------
P.S.  This bitstream (design_1_wrapper.bit) and program (Hello_World_4) were succesfully tested within Vivado/SDK2017.4
 

Share this post


Link to post
Share on other sites
  • 0

The second test did not include the second stage boot loader(u-boot).

As for the third test you created a standalone application that overrides first stage boot loader which will not load the bitstream let alone load and start the second stage boot loader.

Edited by Ionel

Share this post


Link to post
Share on other sites
  • 0

Hello lonel

Sorry, you are right.

2) 
 petalinux-build

// used own  *.bit from my Vivado project "Zybo-Z7-10__v2"
petalinux-package --boot --force --fpga /home/victor/Zybo-Z7-10__v2/design_1_wrapper.bit --u-boot

Result:  Image succesfully loaded into FPGA of the Zybo-Z7-10.
         Messages went to the TeraTerm.


> As for the third try you created a standalone application that overrides first stage boot loader
> which will not load the bitstream let alone load and start the second stage boot loader.
I am new in PetaLinux and not sure that I correctly understand it.
I want implement command  petalinux-package which let me possible to create image for:
1. Loading of the bitstream
2. Loading of the PetaLinux
3. Loading of my application program (Hello_World_4.elf) and run them

Could I ask you to help me complete such command ?

Thank you very much.

Best regards,
Victor.

Share this post


Link to post
Share on other sites
  • 0

@Victor

Petalinux is a tool that builds a linux based operating system on top of your hardware design.

Is either you run your .elf(generated by XSDK) which is a standalone application = NO Linux

Or you use the petalinux generated fsbl which starts u-boot which then starts the Linux kernel and in the end you have a user-space.

Then you will just run users-pace applications. You can still use XSDK to build Linux application however using a different approach .

If you have source code for any Linux application you can cross-compile it for ARM processor in zynq7000.

Then deploy the application on the target and run it (XSDK automates this steps for development, including debugging).

Developing Linux and inside a Linux distribution is a required knowledge at this point.

Creating and Adding Custom Applications section in petalinux user guide shows how to include an application in generated rootfs (found by default inside image.ub)

Edited by Ionel

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now