.. |br| raw:: html
Building Images =============== .. _setup-build-directory: 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 * **A list of supported MACHINE configurations** .. list-table:: :header-rows: 1 * - ``MACHINE=`` - Description - Supported Baseboards - Display Support - Camera Support * - qs8m-mq00 - QS8M-MQ00 i.MX8M Mini Solder-in Module - QSBASE 2, QSBASE4 - Raspberry Pi Display, 10 inch display**, RGB Displays** - Raspberry Pi Camera (Sony IMX 219) * - qs8m-nd00 - QS8M-MQ00 i.MX8M Nano Solder-in Module - QSBASE 2, QSBASE4 - Raspberry Pi Display, 10 inch display**, RGB Displays** - *Raspberry Pi Camera (Sony IMX 219)** * - qsxm-mm60 - QSXM-MM60 i.MX8M Mini Solder-in Module - QSBASE 3, QSBASE4 - Raspberry Pi Display, 10 inch display**, RGB Displays** - Basler daA2500-60mci * - qsxp-ml81 - QSXP-ML81 i.MX8M Plus Solder-in Module - QSBASE 3, QSBASE4 - Raspberry Pi Display, 10 inch display**, RGB Displays** - Basler daA3840-30mc, Raspberry Pi Camera (Sony IMX 219) * - tx8m-1610 - TX8M-1610 i.MX8M Mini CoM - MIPI-MB, MB7 - 10 inch display - * - tx8m-1620 - TX8M-1620 i.MX8M Mini CoM - LVDS-MB, MB7 - 10 inch display, MB7-RGB Display - * - tx8m-nd00 - TX8M-ND00 i.MX8M Nano CoM - MIPI-MB, MB7 - 10 inch display - * - tx8p-ml81 - TX8P-ML81 i.MX8M Plus CoM - LVDS-MB, MB7 - 10 inch display, MB7-RGB Display - * - tx8p-ml82 - TX8P-ML82 i.MX8M Plus CoM - LVDS-MB, MB7 - 10 inch display, MB7-RGB Display - * - qs93-5210 - QS93-5210 i.MX93 CoM - QSBASE93 - LVDS Displays - Raspberry Pi Camera (Sony IMX 219) * - tx93-5210 - TX93-5210 i.MX93 CoM - LVDS-MB, MB7 - LVDS Displays - \* = Experimental \** = Additional Hardware Required Detailed Display Information at :ref:`display-guide-index` 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 (e.g. TX8M-1610):** .. prompt:: :prompts: $ DISTRO=karo-minimal MACHINE=tx8m-1610 source karo-setup-release.sh -b build-tx8m-1610 * **Returning to existing build:** You can return to an already setup build directory by running: .. prompt:: :prompts: $ source setup-environment local.conf ---------- To enable different features for your build you can modify the ``conf/local.conf`` file inside your **build-directory**. Baseboards ~~~~~~~~~~ .. list-table:: :header-rows: 1 * - Machine - Supported Baseboards * - * QS8M - * qsbase2 * qsbase4 * - * QSXM * QSXP - * qsbase3 * qsbase4 * - * TX8M-1610 - * mipi-mb * mb7 * - * TX8M-1620 * TX8P-ML81 * TX8P-ML82 * TX93-5210 - * lvds-mb * mb7 * - * QS93-5210 - * qsbase93 WiFi/Bluetooth ~~~~~~~~~~~~~~ For **Qsbase3** baseboard there is WiFi and BT support with a `Laird WiFi Module `_. To enable add the following line to your ``conf/local.conf`` [1]_ **WiFi Only** .. code-block:: text DISTRO_FEATURES:append = " wifi"` **WiFi and Bluetooth** .. code-block:: text DISTRO_FEATURES:append = " bluetooth wifi" .. hint:: For **Bluetooth** with the Laird WiFi module it is mandatory to have the WiFi firmware loaded! .. note:: How to use WiFi / BT is documented in :ref:`wifi-guide`. Raspberry Pi Camera ~~~~~~~~~~~~~~~~~~~ For - **QS8M** on **QSBASE2** - **QSXP** on **QSBASE4** - **QS93** on **QSBASE93** there is `Raspberry Pi Camera (Sony IMX 219) `_ support. To enable simply build *karo-image-weston* and enable the according :ref:`uboot-fdt-overlays-short` inside U-Boot env. .. note:: How to use Camera is documented in :ref:`tx8-bsp-camera`. Basler Camera ~~~~~~~~~~~~~ * **QSXP** on **QSBASE3** * **QSXM** on **QSBASE3** support a Basler camera. To build a Yocto Image supporting Basler camera see the :ref:`basler-camera-yocto` section. .. _build-the-image: Build the Image --------------- .. note:: The setup-environment provided by the BSP already sets up a **SSTATE CACHE** to speedup the build process. |br| For more about sstate caches see :ref:`yocto-sstate`. Build the image with the following command inside your ````: .. prompt:: :prompts: $ bitbake Here are the different images you can build: .. list-table:: :header-rows: 1 * - Image - Description - ``DISTRO=`` (required) - Provided by layer * - **Official Ka-Ro images** - - - * - karo-image-minimal - Image with minimal read-only rootfs - karo-minimal - meta-karo-distro * - karo-image-weston - Image with weston desktop - karo-(x)wayland - meta-karo-distro * - karo-image-qt6 - QT6 Image on weston desktop. To use it with QT-Creator see :ref:`qt-guide-index`. - karo-(x)wayland - meta-karo-distro * - karo-image-ml - Image including and supporting imx Machine-Learning demos. See :ref:`machine-learning-guide-index`. - karo-(x)wayland - meta-karo-distro * - karo-image-basler - Image with Basler Camera support on weston desktop. Also including imx Machine-Learning demos. See `Basler Camera`_ and :ref:`machine-learning-guide-index`. - karo-xwayland - meta-karo-distro * - **General Yocto / OE images** - - - * - core-image-minimal - See https://layers.openembedded.org/layerindex/recipe/579/ - N/A (any) - Poky * - core-image-base - See https://layers.openembedded.org/layerindex/recipe/584/ - N/A (any) - Poky * - core-image-sato - See https://layers.openembedded.org/layerindex/recipe/658/ - N/A (any) - Poky Getting the SDK ~~~~~~~~~~~~~~~ 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 :ref:`vscode-index`. .. _nxp_image_deployment: 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 images based on the ``IMAGE_FSTYPES`` defined in the machine configuration file. Usually created files are: .. list-table:: :header-rows: 1 * - Filename - Content * - u-boot-.bin- - U-Boot flashable binaries * - Image - Kernel image * - modules-.tgz - Kernel modules * - -.ext4 - .ext4 RootFileSystem * - -.tar.bz2 - tar-archived RootFileSystem * - \*.dtb - Devicetree blob(s) * - **/** - **FlashImage standalone folder** * - **/uuu.auto** - **UUU FlashImage script** .. tip:: 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 :ref:`uuu`. .. tip:: See what you can do with Yocto built Images at :ref:`tx8-bsp`. |br| If you compiled ``karo-image-qt6`` check out :ref:`qt-guide-index`. .. [1] Always assign ``DISTRO_FEATURES`` with the ``append`` modifier rather than with ``+=`` because otherwise the default assignment of the ``DISTRO_FEATURES`` variable will be overridden.