UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor genesio
Visitor
384 Views
Registered: ‎04-08-2019

How to create a PetaLinux 2019.1 project in Xilinx SDK for a custom board (DSA exported from Vivado 2019.1)

Hello, I am trying to build a PetaLinux 2019.1 project for a custom board (based on ZynqMP platform)

The hardware design team delivered a package with DSA and bitstream file exported from Vivado 2019.1

My workstation is set up in this way

  • Ubuntu 18.04 LTS x64 (VM with 8 cores and 16GB of RAM)
  • Xilinx SDK 2019.1
  • PetaLinux 2019.1 installed in `/opt/pkg/petalinux/2019.1` following UG1144 (v2019.1) May 22, 2019

I executed the following steps without issues (path names are mocked):

  • petalinux-create --type project --template zymqMP --name projectname
  • petalinux-config --get-hw-description=/path-of-dsa-and-bitstream
  • petalinux-config
    • no changes, just save and exit

  • petalinux-build 
    • all ok, build completed successfully

  • petalinux-package --boot --fpga ../main_wrapper.bit --u-boot
    • all ok, says "binary is ready"

  • petalinux-build --sdk
    • end with errors: 
      | gdbstub-xml.c:1742:3: error: expected expression at end of input
      |    { "aarch64-el2.xml", xml_feature_aarch64_el2_xml },
      |    ^
      (full message at https://pastebin.com/tvvj9VaG)

Can someone please tell me what am I missing?

I need the sdk in order to proceed with Xilinx SDK and create a Linux Project for this board

Best regards,

Genesio

Tags (3)
7 Replies
Moderator
Moderator
323 Views
Registered: ‎09-12-2007

Re: How to create a PetaLinux 2019.1 project in Xilinx SDK for a custom board (DSA exported from Vivado 2019.1)

Are there libraries in the filesystem that you want to use in the SDK? otherwise you dont really need the petalinux-build --sdk step.

As a shortcut, you can do the following:

  • cd images/linux
  • mkdir sysroot
  • tar -xzf rootfs.tar.gz -C sysroot ./usr ./lib
0 Kudos
Visitor genesio
Visitor
319 Views
Registered: ‎04-08-2019

Re: How to create a PetaLinux 2019.1 project in Xilinx SDK for a custom board (DSA exported from Vivado 2019.1)

Thank you for your reply.

My goal is to be able to create an application project in Xilinx SDK based on "linux" OS platform

 

Maybe I didn't correctly understand where I can find the following paths:

"linux system root"

"linux toolchain"

Capture.PNG

0 Kudos
Moderator
Moderator
310 Views
Registered: ‎09-12-2007

Re: How to create a PetaLinux 2019.1 project in Xilinx SDK for a custom board (DSA exported from Vivado 2019.1)

It really depends on what you want to do. If you have a simple userspace Linux application, then you dont really need them.

0 Kudos
Visitor genesio
Visitor
294 Views
Registered: ‎04-08-2019

Re: How to create a PetaLinux 2019.1 project in Xilinx SDK for a custom board (DSA exported from Vivado 2019.1)

ok thanks for the clarification.
Yes, I want to develop a userspace Linux application in C

At this point I really don't know where I can find the two paths (Linux System Root and Linux Toolchain) that are required to proceed with the project creation in Xilinx SDK (see screenshot)

Could you please help me with this step?

Thank you very much
0 Kudos
Visitor genesio
Visitor
292 Views
Registered: ‎04-08-2019

Re: How to create a PetaLinux 2019.1 project in Xilinx SDK for a custom board (DSA exported from Vivado 2019.1)

Maybe I misunderstood your suggestion:
You say that I don't *need* to check those two paths in order to create the Linux application

Ok I can proceed with project creation without those two options, but then I need further instructions on how to deploy petalinux+my app on the target board connected via USB<->UART adapter

Could you please point me to some UG or other docs related to this kind of workflow?

Thank you
0 Kudos
Moderator
Moderator
252 Views
Registered: ‎09-12-2007

Re: How to create a PetaLinux 2019.1 project in Xilinx SDK for a custom board (DSA exported from Vivado 2019.1)

0 Kudos
Visitor genesio
Visitor
98 Views
Registered: ‎04-08-2019

Re: How to create a PetaLinux 2019.1 project in Xilinx SDK for a custom board (DSA exported from Vivado 2019.1)

Hello,

sorry for my late reply, I has some issues in setting up the test project following the mentioned guide.

First of all, just a clarification: is the "RFDC" device or driver mandatory for creating a "hello world" PetaLinux project for a custom board? I think it's not needed and I just skipped the parts relevant to RFDC

So I decompressed my packaged sysroot into a folder and then created the project from the Xilinx SDK (following "Creating Linux Application in SDK" instructions)

Then I selected "Linux Hello World" from the available templates, configured C/C++ build settings and in the ARM v8 GCC linker Miscellaneous options I configured the extracted PetaLinux sysroot path

I did not add the mentioned linker libraries (metal, rfdc, m)

Then I just skipped all the following instructions and tried to build the project but unfortunately this is the output:

10:07:11 **** Incremental Build of configuration Debug for project linux-test1 ****
make all 
Building target: linux-test1.elf
Invoking: ARM v8 Linux gcc linker
aarch64-linux-gnu-gcc -L"/home/genesio/celeri00/sysroot/usr/lib" -L"/home/genesio/celeri00/sysroot/lib" --sysroot="/home/genesio/celeri00/sysroot" -o "linux-test1.elf"  ./src/helloworld.o   
/tools/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-linux/bin/../lib/gcc/aarch64-linux-gnu/8.2.0/../../../../aarch64-linux-gnu/bin/ld: cannot find crt1.o: No such file or directory
makefile:36: recipe for target 'linux-test1.elf' failed
/tools/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-linux/bin/../lib/gcc/aarch64-linux-gnu/8.2.0/../../../../aarch64-linux-gnu/bin/ld: cannot find crti.o: No such file or directory
/tools/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-linux/bin/../lib/gcc/aarch64-linux-gnu/8.2.0/../../../../aarch64-linux-gnu/bin/ld: cannot find -lc
/tools/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-linux/bin/../lib/gcc/aarch64-linux-gnu/8.2.0/../../../../aarch64-linux-gnu/bin/ld: cannot find crtn.o: No such file or directory
collect2: error: ld returned 1 exit status
make: *** [linux-test1.elf] Error 1

10:07:11 Build Finished (took 281ms)

It looks like I am still missing something important

 

Thank you for your help, really appreciated

0 Kudos