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: 
Highlighted
Adventurer
Adventurer
2,854 Views
Registered: ‎11-10-2017

How to include a user app in petalinux SD Card package

Jump to solution

 Hello,

 

I am following UG 1144 and UG 1157 to create files that i'll load into the ultrazed board via SD card. I have generated a basic project from Vivado 2017.3 and imported the bitstream into the petalinux project (2017.3). As per UG 1144 i have create petalinux project inside which i have created my app. I am able to generate and load the files to board but when i look in /usr/bin folder or /bin folder i am not able to see my app elf file.. 

 

Please help me out figuring what is wrong, Following are my steps to generate the app and build it:

- generate bitstream from vivado

 

$ petalinux-create -t project --template zynqMP --name myprj

$ cd myprj/

$ petalinux-config --get-hw-description=../../myProjVivado/project1/project1.sdk/

 

$ petalinux-create -t apps --name myapp --enable

$ petalinux-config

$ petalinux-config - c rootfs

$ petalinux-config -c device-tree

$ petalinux-build -c device-tree

$ petalinux-build -c kernel

$ petalinux-build -c rootfs

$ petalinux-build -x package

$ petalinux-build

$ cd /images/linux/

$ petalinux-package --boot --fsbl zynqmp_fsbl.elf --fpga design_1_wrapper.bit --u-boot u-boot.elf --pmufw pmufw.elf --atf bl31.elf --kernel image.ub

 

when i saw that myapp is missing on the target board i followed as given in UG 1144 Chapter 1 page 56-57

 

$ petalinux-build -x do_populate_sysroot

$ petalinux-build -c rootfs

$ petalinux-build -x package

$ petalinux-build

 

also i did these :

 

$ petalinux-build -c myapp -x do_install

 

$ petalinux-build -c myapp -x do_compile ( after this i am able to see the compile file in temp folder)

 

$ petalinux-build -c myapp -x do_packagedata 

 

followed by -

$ petalinux-build -c rootfs

$ petalinux-build

$ petalinux-package --boot --fsbl zynqmp_fsbl.elf --fpga design_1_wrapper.bit --u-boot u-boot.elf --pmufw pmufw.elf --atf bl31.elf --kernel image.ub

 

But still i am not able to see my compiled file in the target system. Not able to understand what is wrong ? 

 

Can someone please let me know what is going wrong..

0 Kudos
1 Solution

Accepted Solutions
Adventurer
Adventurer
3,597 Views
Registered: ‎11-10-2017

Re: How to include a user app in petalinux SD Card package

Jump to solution
0 Kudos
7 Replies
Adventurer
Adventurer
2,833 Views
Registered: ‎03-22-2016

Re: How to include a user app in petalinux SD Card package

Jump to solution

Not sure what the issue is, but I can tell you what I do differently, maybe that will help.

 

When I call petalinux-package, it's like this:

 

 petalinux-package --boot --fsbl images/linux/zynqmp_fsbl.elf --u-boot --force --fpga ../../vivado/${PROJECT}/${PROJECT}.runs/impl_1/design_1_wrapper.bit --output images/linux/BOOT.BIN

 

That generates BOOT.BIN, which includes the uboot, the first stage bootloader, and the bitfile. The kernel and root filesystem are in image.ub, which is generated separately (I believe that happens when I run petalinux-build). I put both of those files on my SD card.

 

Are you building both BOOT.BIN and image.ub and copying both to the SD of your device?

0 Kudos
Adventurer
Adventurer
2,820 Views
Registered: ‎11-10-2017

Re: How to include a user app in petalinux SD Card package

Jump to solution

yes,i have also included the following files along with BOOT.bin and image.ub:

bl31.elf

design_1_wrapper.bit

Image

pmufw.elf

rootfs.cpio

system.dtb

u-boot.elf

zynqmp.elf

 

As for the command i guess the file design_1_wrapper.bit already gets copied from the vidao directory to the <petalinux_project>/images/linux directory so it is correct either way ? and i already navigate to images/linux folder before i package the files ..

 

I can try your way also.. btw can u plz tell me how you created the app ?? like the comlete command ? was it with install  , autoconf template or default ? 

0 Kudos
Adventurer
Adventurer
2,803 Views
Registered: ‎11-10-2017

Re: How to include a user app in petalinux SD Card package

Jump to solution

hello  jeffsimpson ,

 

i tried executing the petalinux-package command as you stated but i am still getting the same issue...there is no app compiled for me :(

 

 

0 Kudos
Adventurer
Adventurer
2,791 Views
Registered: ‎11-10-2017

Re: How to include a user app in petalinux SD Card package

Jump to solution

ok...so here is one more update ... while reading into 1144 and 1157 , i came across information which states that all the files are packed into rootfs.tar.gz file in the ../../prj/image/linux/ folder after petalinux-package ...  command is executed.. 

 

When i checked this file, i can see myapp in the /usr/bin folder ! 

 

So i have loaded all the files in the images/linux folder on the SD card, even unzipped the rootfs.tar.gz file as well and then loaded the card in the board ... .

 

Still not able to see the app there once i login as root ?? Am I missing something here or doing any thing wrong to load the SD card ??? I am having SD boot mode set to OFF-ON-OFF-ON on the ultrazed board which is SD1/MMC33 *  as per the ultrazed SOM manual.

0 Kudos
Adventurer
Adventurer
2,784 Views
Registered: ‎03-22-2016

Re: How to include a user app in petalinux SD Card package

Jump to solution

I'm not familiar with the Ultrazed board, but I've worked with Microzed, Picozed, and the ZCU102, and they are all pretty similar.

 

You should only need BOOT.BIN and image.ub on the SD card. Maybe try testing it out by putting only those files on the card and see that it boots, and try deleting them (or not inserting an SD) and make sure that the board doesn't boot. Then you'll be reasonably confident that the files you're putting on the SD are actually being used by the board.

0 Kudos
Adventurer
Adventurer
2,771 Views
Registered: ‎11-10-2017

Re: How to include a user app in petalinux SD Card package

Jump to solution
I removed BOOT.bin and the board didn't booted..so pretty much it is working as you said but instead of taking the compiled folders as present in rootfs.tar.gz it is taking default or other structure...
0 Kudos
Adventurer
Adventurer
3,598 Views
Registered: ‎11-10-2017

Re: How to include a user app in petalinux SD Card package

Jump to solution
0 Kudos