|
| 1 | +====================== |
| 2 | +Building Debian Images |
| 3 | +====================== |
| 4 | + |
| 5 | +Introduction |
| 6 | +============ |
| 7 | + |
| 8 | +Texas Instruments uses the **Armbian** build framework to generate Debian images for its platforms. *Armbian* describes itself to be a "base operating system"; that is, a build framework used to build Linux images optimized for Single-Board Computers. |
| 9 | + |
| 10 | +|__SDK_DOWNLOAD_URL__| provides Debain images for AM62L, but users can also build these, especially if users require something custom (such as different kernel configurations or default desktop environments). |
| 11 | + |
| 12 | +Armbian Usage |
| 13 | +============= |
| 14 | + |
| 15 | +This document provides high-level information about how to build Debian images for AM62LX, using Armbian. For a full list of options available for users to configure these images at build time, see `Armbian Documentation <https://docs.armbian.com/>`__. |
| 16 | + |
| 17 | +Get Armbian |
| 18 | +----------- |
| 19 | + |
| 20 | +For the time being, TI's fork of Armbian maintains AM62L support. Therefore, the first step is to fetch TI's fork: |
| 21 | + |
| 22 | +.. code-block:: console |
| 23 | +
|
| 24 | + git clone https://github.com/TexasInstruments/armbian-build.git |
| 25 | +
|
| 26 | +Repository Structure |
| 27 | +-------------------- |
| 28 | + |
| 29 | +There are 4 files and directories of relevance to this high-level overview: |
| 30 | + |
| 31 | +- ``configs/``: This directory has configurations for boards, families, kernel configurations, desktop or CLI environments and so on. To find configuration files relevant to TI, see: |
| 32 | + - ``configs/sources/families/k3.conf`` |
| 33 | + - ``configs/kernel/linux-k3-current.conf`` |
| 34 | + - ``configs/kernel/linux-k3-rt-current.conf`` |
| 35 | + |
| 36 | +- ``compile.sh``: This is the script that the user should run for building Armbian images. |
| 37 | + |
| 38 | +- ``lib/``: This directory stores the scripts that do most of the work in building Armbian images. |
| 39 | + |
| 40 | +- ``extensions/``: This directory has files that define **extension hooks**. In Armbian, *extension hooks* are function signatures, which the build framework calls in the process of building an image. However, the build framework does not define these in ``lib/``. Users can define these functions and integrate custom steps in the build process. TI has ``extensions/ti-debpkgs.sh`` extension file for AM62L. To customize the build process, create a new file in this directory, and define your extension hooks there. Once the file is created, be sure to add the following line to board/family config file: |
| 41 | + |
| 42 | + .. code-block:: console |
| 43 | +
|
| 44 | + enable_extension <extension_name> |
| 45 | +
|
| 46 | +- ``userpatches/``: This directory stores files that define build parameters, user patches and so on. |
| 47 | + |
| 48 | +Building Images |
| 49 | +--------------- |
| 50 | + |
| 51 | +Armbian supports an interactive build process. To build interactively, go to TI's Armbian fork you cloned, and use the following command: |
| 52 | + |
| 53 | +.. code-block:: console |
| 54 | +
|
| 55 | + ./compile.sh |
| 56 | +
|
| 57 | +The build framework will then display dialog boxes, through which the user can select the board, CLI or desktop environment, kernel configurations and so on. |
| 58 | + |
| 59 | +To build the image non-interactively, specify all required **Build Switches** in the command: |
| 60 | + |
| 61 | +.. code-block:: console |
| 62 | +
|
| 63 | + ./compile.sh [command] [switch...] [command...] |
| 64 | +
|
| 65 | +A full list of build switches is available at `Build Switches <https://docs.armbian.com/Developer-Guide_Build-Switches/>`__. |
| 66 | + |
| 67 | +For example, the following command builds the image at |__SDK_DOWNLOAD_URL__|: |
| 68 | + |
| 69 | +.. code-block:: console |
| 70 | +
|
| 71 | + ./compile.sh build BOARD=am62l-evm BRANCH=current BUILD_MINIMAL=yes KERNEL_CONFIGURE=no RELEASE=trixie SKIP_ARMBIAN_REPO=yes |
| 72 | +
|
| 73 | +``output/images/`` stores the built images. These images have a ``.img`` extension. |
0 commit comments