.. include:: /keyword.rst
======================
Build from Source Code
======================
Based on `Yocto project `_, ``rity-demo-image`` is used to demonstrate the |IOT-YOCTO| BSP.
Please follow the instructions below to build the demo images of each board.
.. note::
* You can download prebuilt demo images from :doc:`/sw/yocto/download` page.
* You must :doc:`setup a Linux host computer ` to build the images.
.. important::
You need permission to access the |AIOT-NDA| to build fully functioned ``rity-demo-image``.
You can still build image using only publicly available packages through
configuration, but the resulting images have only limited feature set.
To request for the permission, please contact your MediaTek sales.
.. contents:: Build Instructions
:local:
:depth: 1
Build Images for Genio EVK Boards
=================================
.. important::
Please read and agree :ref:`AIoT Software License Agreement ` before accessing or using |IOT-YOCTO| software.
If you do not agree to the terms and conditions of :ref:`AIoT Software License Agreement `, you must not access or use the software.
.. _build-with-nda:
In v23.2 release, to build private configuration that requires GitLab account and NDA repository access, set the ``NDA_BUILD`` configuration variable to ``1``
after initializing the build environment:
.. code-block:: bash
:emphasize-lines: 12
:linenos:
# download recipe with manifests
mkdir iot-yocto; cd iot-yocto
export PROJ_ROOT=`pwd`
repo init -u https://gitlab.com/mediatek/aiot/bsp/manifest.git -b refs/tags/rity-kirkstone-v23.2 -m default.xml --no-repo-verify
repo sync
# build configuration
TEMPLATECONF=$PWD/src/meta-rity/meta/conf source src/poky/oe-init-build-env
export BUILD_DIR=`pwd`
# Enable components that require NDA access
echo NDA_BUILD = \"1\" >> ${BUILD_DIR}/conf/local.conf
# Setup paths for downloads and sstate-cache folders
echo DL_DIR = \"\${TOPDIR}/../downloads\" >> ${BUILD_DIR}/conf/local.conf
echo SSTATE_DIR = \"\${TOPDIR}/../sstate-cache\" >> ${BUILD_DIR}/conf/local.conf
Please skip **line 12** above if you don't have NDA repository access or if you'd like to build a public configuration.
Depending on which board you'd like to build for, assign the ``MACHINE`` config variable:
.. _build-for-g350:
|G350-EVK|
----------
.. prompt:: bash $ auto
# fetch all the packages and build rity-demo-image
$ MACHINE=genio-350-evk bitbake rity-demo-image
The output image is located in ``$BUILD_DIR/tmp/deploy/images/genio-350-evk``. Please refer to :doc:`flash/flash-g350-evk` to flash the image to the board.
|G510-EVK|
----------
.. prompt:: bash $ auto
# fetch all the packages and build rity-demo-image
$ MACHINE=genio-510-evk bitbake rity-demo-image
The output image is located in ``$BUILD_DIR/tmp/deploy/images/genio-510-evk``. Please refer to :doc:`flash/flash-g700-evk` to flash the image to the board.
|G700-EVK|
----------
.. prompt:: bash $ auto
# fetch all the packages and build rity-demo-image
$ MACHINE=genio-700-evk bitbake rity-demo-image
The output image is located in ``$BUILD_DIR/tmp/deploy/images/genio-700-evk``. Please refer to :doc:`flash/flash-g700-evk` to flash the image to the board.
|G1200-EVK|
-----------
.. prompt:: bash $ auto
# fetch all the packages and build rity-demo-image
$ MACHINE=genio-1200-evk bitbake rity-demo-image
The output image is located in ``$BUILD_DIR/tmp/deploy/images/genio-1200-evk``. Please refer to :doc:`flash/flash-g1200-evk` to flash the image to the board.
Details and Other Boards
========================
Please continue to the following sections for descriptions of each step and possible boards and image configurations.
.. toctree::
:titlesonly:
build-code/build-steps
build-code/other-boards-and-images