Jump to content
  • 0

Help needed on adding a custom app to Petalinux for CoraZ7-10


jmccabe

Question

I'm just starting out with the CoraZ7-10 and having what seems like a weird issue.

I've followed the getting started stuff at https://github.com/Digilent/Petalinux-Cora-Z7-10 to the letter and packaged up a BOOT.bin and image.ub that loads and boots fine. I now want to try a simple custom application, so followed the instructions to the letter in the section "Creating and Adding Custom Applications" (for a C++ app) in the Petalinux reference guide for 2017.4 (https://www.xilinx.com/support/documentation/sw_manuals/xilinx2017_4/ug1144-petalinux-tools-reference-guide.pdf), followed by the "Building User Application" section (as far as the 4 commands that are preceded by "To build myapp into an existing system image:"; I assumed the bulleted stuff after that is optional).

At the end of all that I have to re-run the petalinux-package command to get a BOOT.BIN and image.ub out as necessary.

However, when I use the files built at this point, the CoraZ7-10 gets stuck at "Starting kernel ...".

I'm hoping that someone can spot whether there's something I'm missing!

Please feel free to ask for more details; I'm new to this so, if there's something you need, you might have to tell me the command I need to use to get it (sorry about that).

John

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

From "Building User Application" section running  `petalinux-build` command is the only required step. This will trigger the build for petalinux-user-image which in turn will trigger the build for your c++ app. After a successful build the components get packed then installed in the rootfs.  Then the rootfs gets included in image.ub.

The issue you have found can be solved by issuing:

$ petalinux-build -x mrproper   #clean entire build output

$ petalunix-build    #build linux image which includes your newly added component since it is included in rootfs

$ petalinux-package --boot --force --fsbl images/linux/zynq_fsbl.elf --fpga images/linux/cora_z7_10_wrapper.bit --u-boot           # builds the bootloader image BOOT.BIN

Steps above are same as a clean build, this solves the issue.

After changing your c++ application running  `petilinux-build` command is enough  to build a new image.ub. No need to regenerate the `BOOT.BIN` file.

Additional explications given in "Building User Application" section is for how you can build your component without building the entire system images and where you can find build directory in the build system. In case of Cora-Z7-10 is <TMPDIR>/work/cortexa9hf-neon-xilinx-linux-gnueabi/myapp/1.0-r0/

 

Link to comment
Share on other sites

2 minutes ago, Ionel said:

From "Building User Application" section running  `petalinux-build` command is the only required step. This will trigger the build for petalinux-user-image which in turn will trigger the build for your c++ app. After a successful build the components get packed then installed in the rootfs.  Then the rootfs gets included in image.ub.

The issue you have found can be solved by issuing:


$ petalinux-build -x mrproper   #clean entire build output

$ petalunix-build    #build linux image which includes your newly added component since it is included in rootfs

$ petalinux-package --boot --force --fsbl images/linux/zynq_fsbl.elf --fpga images/linux/cora_z7_10_wrapper.bit --u-boot           # builds the bootloader image BOOT.BIN

Steps above are same as a clean build, this solves the issue.

After changing your c++ application running  `petilinux-build` command is enough  to build a new image.ub. No need to regenerate the `BOOT.BIN` file.

Additional explications given in "Building User Application" section is for how you can build your component without building the entire system images and where you can find build directory in the build system. In case of Cora-Z7-10 is <TMPDIR>/work/cortexa9hf-neon-xilinx-linux-gnueabi/myapp/1.0-r0/

 

Thanks for your reply. I'll have a go with mrproper and let you know if that helps.

 

Link to comment
Share on other sites

3 hours ago, Ionel said:

From "Building User Application" section running  `petalinux-build` command is the only required step. This will trigger the build for petalinux-user-image which in turn will trigger the build for your c++ app. After a successful build the components get packed then installed in the rootfs.  Then the rootfs gets included in image.ub.

<..snip..>

Just thought I'd let you know your suggestion worked, so I've marked it as the answer. Thank you for that.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...