Jump to content
  • 0

Error in petalinux-build command


Victor

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

victor@victor-System-Product-Name:~/Zybo-Z7-10$ petalinux-build

This command works about 1 hour and gives the error:


victor@victor-System-Product-Name:~/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)
 

Link to comment
Share on other sites

15 answers to this question

Recommended Posts

@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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

>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.  

Link to comment
Share on other sites

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
 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

@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)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...