Building Images =============== Setup Build Directory --------------------- We provide a script, ``karo-setup-release.sh``, that simplifies the setup for our machines. To use the script, the name of the specific machine to be built for needs to be specified as well as the desired distro. The script sets up a directory and the configuration files for the specified machine and distro. It also adds our layers to the ``bblayers.conf`` file. There are different configurations you can choose from. * **Ka-Ro DISTRO configurations** .. list-table:: :header-rows: 1 * - ``DISTRO=`` - Description * - karo-minimal - Ka-Ro Linux Distro with minimal read-only rootfs * - karo-wayland - Ka-Ro Linux Distro with wayland backend * - karo-xwayland - Ka-Ro Linux Distro with xwayland backend * - karo-x11 - Ka-Ro Linux Distro with X11 support * Possible ``MACHINE`` configurations: NXP modules can only be built with the ``karo-nxp-bsp``, STM and Renesas modules only with the ``karo-bsp``. .. list-table:: :header-rows: 2 * - ``karo-nxp-bsp`` - ``karo-bsp`` * - ``MACHINE=`` - ``MACHINE=`` * - * qs8m-mq00 * qs8m-nd00 * qsxm-mm60 * qsxp-ml81 * tx8m-1610 * tx8m-1620 * tx8m-1622 * tx8m-nd00 * tx8p-ml81 * tx8p-ml82 * qs91-3110 * tx91-3110 * qs93-5210 * tx93-5210 * txul-5010 * txul-5011 * txul-8013 * tx6s-8034 * tx6s-8035 * tx6s-8134 * tx6s-8135 * tx6u-8030 * tx6u-8033 * tx6u-8130 * tx6u-8133 * tx6q-1030 * tx6q-1036 * tx6q-1130 * tx6q-8037 * tx6q-8137 - * qsrz-g2l0 * txrz-g2l0 * qsrz-g2l1 * txrz-g2l1 * txrz-g2l2 * qsmp-1351 * qsmp-1570 * qsmp-1570w * qsmp-1530 * qsmp-1530w * qsmp-2030 * qsmp-2350 * qsmp-2550 * txmp-1530 * txmp-1570 * txmp-1571 * txmp-2550 * txmp-2570 Use this command to setup your build directory (specify the distro you want to use, the machine, and the build directory): * **General Example:** .. prompt:: :prompts: $ DISTRO= MACHINE= source karo-setup-release.sh -b When the script has run, your current directory changes to the ```` you chose before. * **Specific Example:** .. prompt:: :prompts: $ DISTRO=karo-minimal MACHINE= source karo-setup-release.sh -b build- * **Returning to existing build:** You can return to an already setup build directory by running: .. prompt:: :prompts: $ source setup-environment Configuration ------------- To enable different features for your build you can modify the ``conf/local.conf`` file inside your ****. Baseboard (optional) ~~~~~~~~~~~~~~~~~~~~ .. list-table:: :header-rows: 1 * - Machine - Supported Baseboards * - * QS8M - * qsbase2 * qsbase4 * - * QSXM * QSXP - * qsbase3 * qsbase4 * - * QS91-3110 - * qsbase1 * qsbase4 * - * QS93-5210 - * qsbase4 * qsbase93 * - * TX8M-1610 * TX8M-1622 * TX8M-ND00 - * mipi-mb * mb7 * - * TX8M-1620 * TX8P-ML81 * TX8P-ML82 * TX91-3110 * TX93-5210 - * lvds-mb * mb7 * - * TX6 series * TXUL series - * mb7 * - * QSMP series - * qsbase1 * qsbase2 * qsbase4 * - * TXMP series - * mb7 * - * QSRZ series - * qsbase1 * qsbase4 * - * QSRZ-G2L0 (additional) - * qsglyn1 * - * TXRZ series - * mb7 * - * TXRZ-G2L0 (additional) - * lvds-mb To set the ``KARO_BASEBOARD`` variable, modify your ``conf/local.conf``: .. code-block:: text KARO_BASEBOARD = "baseboard" Machine Features ~~~~~~~~~~~~~~~~ .. list-table:: :header-rows: 1 * - Machine Feature - Description - Default? * - emmc - eMMC storage support - Automatically selected via $MACHINE if supported * - nand - NAND storage support - Automatically selected via $MACHINE if supported * - lcd - LCD interface support - Automatically selected via $MACHINE if supported * - lvds - LVDS interface support - Automatically selected via $MACHINE if supported * - dsi83 - SN65DSI83 mipi-lvds bridge support - Automatically selected via $MACHINE if supported To expand the ``MACHINE_FEATURES`` variable to your needs, modify your ``conf/local.conf``: .. code-block:: text MACHINE_FEATURES:append = " item1 item2 ..." Distro Features ~~~~~~~~~~~~~~~ .. list-table:: :header-rows: 1 * - Distro Feature - Description - Default? * - systemd - Changes init-system to systemd, e.g. neccessary when using Debian - No * - ipv6 - IPV6 support - No * - wifi - WiFi support - No * - bluetooth - Bluetooth support - No To expand the ``DISTRO_FEATURES`` variable to your needs, modify your ``conf/local.conf``: .. code-block:: text DISTRO_FEATURES:append = " item1 item2 ..." Build the Image --------------- Build the image with the following command inside your ````: .. prompt:: :prompts: $ bitbake Here are the different images that can be build: .. table:: :widths: 20 30 20 20 +----------------------------------+------------------------------------------------------------------+---------------------------+-----------------------------------+ | Image | Description | DISTRO | Provided by layer | +==================================+==================================================================+===========================+===================================+ | karo-image-minimal | Image with minimal read-only rootfs | karo-minimal | meta-karo-distro | +----------------------------------+------------------------------------------------------------------+---------------------------+-----------------------------------+ | karo-image-weston | Image with basic weston desktop, graphics accelerated | karo-(x)wayland | meta-karo-distro | +----------------------------------+------------------------------------------------------------------+---------------------------+-----------------------------------+ | karo-image-qt6 | Image with basic weston desktop and QT6. | karo-(x)wayland | meta-karo-distro | | | To use it wit QT-Creator see | | | | | :doc:`/software-documentation/applications/qt/index` | | | +----------------------------------+------------------------------------------------------------------+---------------------------+-----------------------------------+ | karo-image-x11 | Image with X11 support | karo-x11 | meta-karo-distro | +----------------------------------+------------------------------------------------------------------+---------------------------+-----------------------------------+ | karo-image-ml | Image including and supporting imx Machine-Learning demos | karo-(x)wayland | meta-karo-distro | | | See :doc:`/software-documentation/applications/ml/index` | | | +----------------------------------+------------------------------------------------------------------+---------------------------+-----------------------------------+ | karo-image-basler | Image with Basler Camera support on weston desktop | karo-xwayland | meta-karo-distro | | | Also including imx Machine-Learning demos | | | | | See :doc:`/software-documentation/applications/ml/index` | | | +----------------------------------+------------------------------------------------------------------+---------------------------+-----------------------------------+ To build the SDK of a certain image run inside your ````: .. prompt:: :prompts: $ bitbake -c populate_sdk .. tip:: The SDK can e.g. be used for :doc:`/software-documentation/applications/vscode/index`. Image Deployment ---------------- After a build is complete, the **results reside in the** ``/tmp/deploy/images//`` **sub-directory**. An image is, for the most part, specific to the machine set in the environment setup. Each image build usually creates U-Boot, kernel, and an image based on the machine and distro configuration files. i.MX ~~~~ To continue programming your board with these images, simply ``cd`` into the above mentioned **** folder inside deploy folder and run: .. prompt:: :prompts: $ uuu -v For further information about **uuu** see :doc:`/software-documentation/flashtools/uuu/index`. STM32MP ~~~~~~~ To continue with these images see :doc:`/software-documentation/flashtools/stm-flashing/index`. RZ/G2L ~~~~~~ To continue with these images see :doc:`/software-documentation/flashtools/rzg2-flashing/index`. | .. tip:: See what you can do with Yocto built images on your module at :doc:`/software-documentation/linux/index`. If you compiled ``karo-image-qt6`` check out :doc:`/software-documentation/applications/qt/index`.