cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
6,504 Views
Registered: ‎08-16-2014

Understanding the petalinux process with Zynq7020 Dev kit

Jump to solution

I have a Zynq7020 dev kit v1.1, and I would like to create a petalinux BSP for it and boot to a command prompt so I can run a program. I will be using windows as much as possible, since windows has my Vivado and SDK licenses. I did use petalinux to build the sample BSP and boot the SD card, so I know that my hardware and my petalinux installation works. The problem is getting to a working boot.bin, uImage.bin, and uramdisk.image.gz file.

 

This is probably one of those 'RTFM->' posts, but I am posting anyway because the issue I have is that the (many and varied) instructions often relate to older software versions, and they differ a little bit from the actual menu options I see, which makes it tough for a newbie to figure out exactly what I am supposed to do. I need someone experienced with Xilinx stuff to help me get my mind right about the process. I appreciate anything you might share.

 

I want to clarify and make sure I understand the steps involved, and clear up any misunderstandings about the process flow and some of the problems I am having. I don't want to incorrectly make a bad boot.bin file and ruin my dev kit, so here goes...

 

Step 1: use Vivado to configure the Zynq processor system and Programmable Logic in the block diagram editor. This is pretty straightforward. I added the processing system, a uart and the SD card (copying the settings in the example bsp).

 

Step 2: Right click in the sources pane to Generate HDL wrapper and Create output products (instructions say to create bit stream). This creates a "nicks-learning-project.sdk" folder inside the nicks-learning-project folder in my vivado workspace. I think there is supposed to be a bitstream .bit file in there somewhere, but I can't find it, so later on I won't be able to do

petalinux-package --boot -fpga <fpgs biststream>

 

Step 3: Copy the nicks-learning-project.sdk folder into my VM with petalinux installed.

 

Step 4: petalinux-create --type project --template zynq --name nicks-learning-project

 

Step 5: Go into the SDK export folder cd nicks-learning-project.sdk

Do petalinux-config --get-hw-description -p ~/Zynq7020Dev/nicks-learning-project/

This step results in a wierd error repeated over and over. I think it has something to do with printing the device tree source file (.dts)

sed: -e expression #1, char 24: unknown option to `s'
sed: file /tmp/tmp.4dE6gjzE6w line 99: unknown option to `s'
make[1]: *** [autogen-dts] Error 1
make: *** [post-config-auto-dts] Error 255

 

Anyway, then I do

petalinux-config -c kernel

petalinux-config -c kernel

 

Step 6: Go into the petalinux project folder cd ~/Zynq7020Dev/nicks-learning-project/

Do petalinux-build

This takes about 30 minutes, not sure if that is normal

This is also supposed to make a uImage.bin and a uramdisk.image.gz. It makes these in the prebuilt BSP that you can download. It does not make it when i make my own project. There is probably an option I didn't use, but I don't know how to make those files.

 

Step 7: make a boot.bin file one of two ways

1. petalinux-pacakge --boot -fsbl uboot.bin -fpga <fpga bitstream> --uboot

but there is no fpga bistream as mentionined in step 2, so this won't work

2. use bootgen by creating a boot.bif file 

image : {
        [bootloader]zynq_fsbl.elf
        u-boot.elf
        [load=0x2a00000]system.dtb
        [load=0x2000000]uramdisk.image.gz
        [load=0x3000000]uImage.bin   // currently bootgen requires a file extension. this is just a renamed uImage
}

Do bootgen -image boot.bif -o i boot.bin

But this doesn't work either because I don't have a uramdisk and uImage.

 

Step 8: Format a fat32 SD card and copy the boot.bin, uImage.bin, and uramdisk.image.gz, then boot the Zynq7020 dev kit. I know this step works because I did it with the example dev kit.

 

So my questions/issues are:

1) I can't get a .bit file out of Vivado

2) I can't get a uImage.bin and uramdisk.image.gz out of petalinux

3) petalinux config has some wierd scripting issue when it ends

 

If I am able to resolve these issues, I am assuming that when I complete step 8, I will be able to write programs in C, compile them with the arm-xilinx-eabi.gcc compiler, and execute them from the command prompt.

 

Thank you

0 Kudos
Reply
1 Solution

Accepted Solutions
trenz-al
Scholar
Scholar
9,370 Views
Registered: ‎11-09-2013

centos 6.5.gnome x86, I am trying hard to find where i got the VM image, unusuccesful :(

 

but, ALL WORKS!

 

the only issue in petalinux install guide was that they did not 

 

BC

to be needed to be installed manually, the rest was 1:1 as in petalinux install guide

 

no issues with the -sed seen

 

 

View solution in original post

0 Kudos
Reply
5 Replies
trenz-al
Scholar
Scholar
6,484 Views
Registered: ‎11-09-2013

unsupported linux host version this sed issue, just install something else :)

 

we use free ready made VM for centos 6-5 gnome and have no issues.

 

peta is real simple

 

1 vivado make project,export

 

2 take the HDF file into your petalinux projects, do get-hw, build and

 

>> it works, done it over and over and over again, and its just works..

 

0 Kudos
Reply
6,460 Views
Registered: ‎08-16-2014

Where do I aquire instructions to set up a VM with Virtualbox? I'm already having problems with CentOS 7 in Virtualbox, going to try CentOS 6. Should I be using a 32 bit or 64 bit version? I have a 64 bit PC but I know that sometimes there are library issues.

 

0 Kudos
Reply
6,455 Views
Registered: ‎08-16-2014

Ok so I got CentOS working, which is a fork of Redhat. Still getting the same sed error.

 

Redhat seems to charge money now, except for the 30day evaluation version. When did that start?

 

This is super frustrating. If I have to be frustrated, I'd rather be frustrated by developing interesting hardware and IP that solves real problems, as opposed to getting frustrated by trying to set up the virtual machine that hosts one small part of a toolchain that performs an essentially hands-off/IP-free task.

0 Kudos
Reply
trenz-al
Scholar
Scholar
9,371 Views
Registered: ‎11-09-2013

centos 6.5.gnome x86, I am trying hard to find where i got the VM image, unusuccesful :(

 

but, ALL WORKS!

 

the only issue in petalinux install guide was that they did not 

 

BC

to be needed to be installed manually, the rest was 1:1 as in petalinux install guide

 

no issues with the -sed seen

 

 

View solution in original post

0 Kudos
Reply
6,439 Views
Registered: ‎08-16-2014

I got it working. Thank you!!  The trick is definitely use 32bit RH linux like CentOS 6.5.

 

Time to work on getting the hardware to actually boot with my own hardware source...

0 Kudos
Reply