Preparations
- Install the CANN development kit of the ARM version on Ubuntu 18.04 x86_64. For details, see Installing the CANN Development Kit.
- Install the SDK of the ARM version on Ubuntu 18.04 x86_64. For details, see Installing MindX SDK.
- Run the following command to install the cross compilation toolchain:
sudo apt-get install g++-aarch64-linux-gnu
- Download and compile the zlib source code.
- Download the zlib .gz package.
- Decompress and compile the zlib source code.
tar zxvf zlib-1.2.11.tar.gz
Copy the build_zlib.sh script to the same directory and run the following command to compile the script. For details about the build_zlib.sh script, see build_zlib Script Code.
bash build_zlib.sh

- After the compilation is complete, copy the generated files to opensource in the SDK installation directory.
cp -r tmp/zlib/* ${MX_SDK_HOME}/opensource ll ${MX_SDK_HOME}/opensource/lib

Parent topic: Cross Compilation Description
