As a follow up to the blog I posted on building the hardware design for the out of box image for the ON Semiconductor Dual Camera Mezzanine card, here are the instructions to complete the build with the Petalinux project. The original blog can be found here -
Ultra96-V2 ON Semiconductor Dual Camera Mezzanine hardware build instructions

 

The process of porting the full design over to our Github repo has now been completed. Below I've pasted the instructions to build the full design including Petalinux from the repo. The final command will build the hardware design as part of the script and create the full design.

 

#

# Clone the repositories

#

 

$ cd ~

$ mkdir -p git/avnet

$ cd git/avnet/

$ git clone https://github.com/Avnet/bdf.git

$ git clone https://github.com/Avnet/hdl.git

$ git clone https://github.com/Avnet/petalinux.git

$ cd bdf
$ git checkout master

$ cd ../petalinux

$ git checkout 2020.1

$ cd ../hdl

$ git checkout 2020.1

 

#

# Run the Vivado build script for the Ultra96-V2 dualcam design

#

 

$ cd petalinux

$ ./scripts/make_ultra96v2_dualcam.sh

 

 

This process will take a long time and will depend on your pc hardware. When complete, you should see something similar to this:

 

Your design has now successfully been built (yay!). So now we need to put it on an SDcard to use on your hardware. Pulling from my colleague Tom Curran's excellent instructions, if you haven't already followed the Getting Started Guide you will need to first partition the SD card with - for example - a 1GB FAT32 boot partition and (assuming you are using the provided 16GB Delkin micro SD card) and a 15GB ext4 partition. I've also attached a handy guide on formatting a new SDcard to this blog.

 

If you have successfully configured your SDcard you are ready to copy over the files. Here are the commands to create the SDcard image. First you must navigate to the folder where the files were generated, then you can copy them over to the proper partitions on your SDcard.

 

$ cd ~/git/avnet/petalinux/projects/ultra96v2_dualcam_2020_1

$ cp ./images/linux/BOOT.BIN /media/training/<UUID of FAT32 partition>/.

$ cp ./images/linux/boot.scr /media/training/<UUID of FAT32 partition>/.

$ cp ./images/linux/image.ub /media/training/<UUID of FAT32 partition>/.

$ sudo rm -rf /media/training/<UUID of ext4 partition>/*

$ sudo tar xvf ./images/linux/rootfs.tar.gz -C /media/training/<UUID of ext4 partition>/

$ sync; sync (VERY IMPORTANT to sync the filesystem BEFORE ejecting the SD card!  If you don't the filesystem may be corrupted. This process can take minutes to complete)

 

You should now be able to run the out of box design from your SDcard with the command

 

$ run_1920_1080

 

The out of box image will show 2 live streams from the cameras on a 1080p monitor.

 

Ultra96-V2Ultra96-V2