|
ONE - On-device Neural Engine
|
Install required packages
Use install_rootfs.sh script to prepare Root File System. You should have sudo
arm(default) and aarch64 architecutre for nowjammy, and noble releaseTo see the options,
RootFS will be prepared at tools/cross/rootfs/arm or tools/cross/rootfs/aarch64 folder.
* CAUTION: The OS version of rootfs must match the OS version of execution target device. On the other hand, you need to match the Ubuntu version of the development PC with the Ubuntu version of rootfs to be used for cross-build. Otherwise, unexpected build errors may occur.
If you are using Ubuntu 22.04 LTS, select jammy, if you are using Ubuntu 24.04 LTS, select noble. You can check your Ubuntu code name in the following way.
install_rootfs.sh will select development system code name as default.
If a build error occurs because the version of the development system and the target system do not match, and if you can't replace your development system for any reason, you can consider cross-build using the docker image.
Use ROOTFS_DIR to a full path to prepare at alternative path.
If you need to use proxy server while building the rootfs, use --setproxy option.
This will put apt proxy settings in rootfs/etc/apt/apt.conf.d/90proxy file for http, https and ftp protocol.
We recommend you have g++ >= 9 installed on your system for c++17.
Mostly you only need once of ACL (ARM Compute Library) build.
To build ACL, you need to install scons
ACL source will be automatically installed in externals/ARMCOMPUTE when you build runtime without any changes.
You can check ACL source information in infra/cmake/packages/ARMComputeSourceConfig.cmake
Python package numpy is needed for build. Please use this guide to install it.
Give TARGET_ARCH variable to set the target architecture.
If you used ROOTFS_DIR to prepare in alternative folder, you should also give this to makefile.
Remember to activate venv if you didn't activate it already:
Makefile.template will pass crossbuild toolchain setting to cmake automatically by parsing variables.
To run and test the cross-compiled runtime, you need to install library packages and copy the compiled output to the target device of the architecture in which it is executable.
./Product/armv7l-linux.<BUILD_TYPE> folder to the target device, Odroid-XU4 for example, as a whole.Product directory.Now you can test the compilation result in the same way as the native build. Please refer to the following document for details on the test procedure.