.. include:: /keyword.rst =========================== Build from IoT Yocto Layer =========================== .. note:: Before downloading the Yocto layer, make sure you already have a populated Yocto building environment. Please refer to :doc:`/sw/yocto/get-started/build-code` for more information. Please run following command to download the Yocto layer: .. prompt:: bash git clone https://gitlab.com/mediatek/aiot/rity/meta-mediatek-demo.git $PROJ_ROOT/src/meta-mediatek-demo Setup Yocto building environment as described in :doc:`/sw/yocto/get-started/build-code`: .. prompt:: bash cd $PROJ_ROOT export TEMPLATECONF=${PWD}/src/meta-rity/meta/conf/ source src/poky/oe-init-build-env export BUILD_DIR=`pwd` Run following command to add the layer we just downloaded to the environment: .. prompt:: bash bitbake-layers add-layer ../src/meta-mediatek-demo Enable R2Inference and GstInference in your `$PROJ_ROOT/build/conf/local.conf`. .. prompt:: bash IMAGE_INSTALL:append = "r2inference gstinference" Rebuild the image: .. prompt:: bash DISTRO=rity-demo MACHINE=genio-1200-evk bitbake rity-demo-image Please refer to :doc:`/sw/yocto/get-started/flash` to flash the target board with the built image. You can find the example models and labels in the ``/usr/share/gstinference_example`` directory. Here is the folder structure of gstinference_example: .. code-block:: . ├── image_classification │   ├── labels.txt │   ├── mobilenet_v1_1.0_224_quant.tflite │   └── mobilenet_v1_1.0_224_quant.dla └── object_detection ├── labels_pascal.txt ├── mobilenet_ssd_pascal_quant.tflite └── mobilenet_ssd_pascal_quant.dla To run the built-in application, please connect the camera to the board first. Please refer to :doc:`/sw/yocto/app-dev/camera/camera-common` section for camera configuration. :doc:`/tools/ai-demo-app/run-the-demo` section has the detail for how to launch the APP.