Use the following steps to set up the host for edge:
- Download the sdk.sh from here.
- Install the cross-compilation system
environment.
$./sdk.sh - Follow the prompts to install. The following figure shows the installation
process.
Note that the ~/petalinux_sdk path is recommended for installation. Regardless of the path you choose for the installation, make sure the path you choose has re-write permissions. Here, install it under ~/petalinux_sdk.
- When the installation is complete, follow the prompts and enter the following
command.
$ . ~/petalinux_sdk/environment-setup-aarch64-xilinx-linuxNote that if you close the current terminal, you need to re-execute the above instructions in the new terminal interface.
- Download the vitis_ai_2019.2-r1.1.0.tar.gz from https://github.com/Xilinx/Vitis-AI and
install it to the petalinux system.
$tar -xzvf vitis_ai_2019.2-r1.1.0.tar.gz -C ~/petalinux_sdk/sysroots/aarch64-xilinx-linux - Update the glog to v0.4.0.
- Download the glog package and untar it.
$cd ~ $curl -Lo glog-v0.4.0.tar.gz https://github.com/google/glog/archive/v0.4.0.tar.gz $tar -zxvf glog-v0.4.0.tar.gz $cd glog-0.4.0 - Build it and install it to the petalinux
system.
$mkdir build_for_petalinux $cd build_for_petalinux $unset LD_LIBRARY_PATH; source ~/petalinux_sdk/environment-setup-aarch64-xilinx-linux $cmake -DCPACK_GENERATOR=TGZ -DBUILD_SHARED_LIBS=on -DCMAKE_INSTALL_PREFIX=$OECORE_TARGET_SYSROOT/usr .. $make && make install $make package
- Download the glog package and untar it.
- Clone the Vitis AI repository:
$cd ~ $Git clone https://github.com/xilinx/vitis-ai - Cross compile the sample, take resnet50 as an
example.
$cd ~/vitis-ai/vart/samples/resnet50 $bash –x build.shIf the compilation process does not report any error and the executable file resnet50 is generated, the host environment is installed correctly.