4. Building Debian Images Using Armbian

4.1. Introduction

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.

AM62Lx-SDK-Download-page provides Debian images, but users can also build these, especially if users require something custom (such as different kernel configurations or default desktop environments).

4.2. Armbian Usage

This document provides high-level information about how to build Debian images for TI platforms, using Armbian. For a full list of options available for users to configure these images at build time, see Armbian Documentation.

4.2.1. Get Armbian

For the time being, TI’s fork of Armbian/build maintains support for TI platforms. Therefore, the first step is to fetch TI’s fork:

git clone https://github.com/TexasInstruments/armbian-build.git

4.2.2. Repository Structure

The following files and directories are relevant to this high-level overview:

  • config/: This directory has configurations for boards, families, kernel configurations, desktop or CLI environments and so on. To find configuration files relevant to TI, see:

    • config/boards/<TI EVM board>.conf

    • config/sources/families/k3.conf

    • config/kernel/linux-k3-current.conf

    • config/kernel/linux-k3-rt-current.conf

  • compile.sh: This is the script that the user should run for building Armbian images.

  • lib/: This directory stores the scripts that do most of the work in building Armbian images.

  • 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. 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:

    enable_extension <extension_name>
    
  • userpatches/: This directory stores files that define build parameters, user patches and so on.

4.2.3. Building Images

Armbian supports both an interactive UI and a noninteractive build process.

Note

This build guide has been tested on an x86 host machine running Ubuntu 22.04. The Armbian compile.sh script builds in an ARM64 docker container. Ensure the following packages are installed:

sudo apt update
sudo apt install docker.io qemu qemu-user-static binfmt-support
  • To build interactively:

    ./compile.sh
    

    The build framework will then display dialog boxes. The user can use this to select the board, CLI or desktop environment, kernel configurations and so on.

  • To build non-interactively:

    ./compile.sh [command] [switch...] [command...]
    

    A full list of build switches is available at Build Switches.

    Warning

    If build issues arise, try adding these build switches to the end of the build command:

    GIT_SKIP_SUBMODULES=yes SKIP_ARMBIAN_REPO=yes
    

    For example, the following command builds the minimal non-RT Trixie image:

    ./compile.sh build BOARD=<board> BRANCH=current BUILD_MINIMAL=yes KERNEL_CONFIGURE=no RELEASE=trixie GIT_SKIP_SUBMODULES=yes SKIP_ARMBIAN_REPO=yes
    

For a list of boards and branches supported by each SoC, refer:

SoC

Board

Board Config File

Branch

AM62Lx

am62lxx-evm

config/boards/am62lxx-evm.conf

current, current-rt, edge

AM62Px

am62pxx-evm

config/boards/am62pxx-evm.conf

current, current-rt, edge

AM62x

sk-am62b

config/boards/sk-am62b.conf

current, edge

AM62-LP

sk-am62-lp

config/boards/sk-am62-lp.conf

current, current-rt, edge

AM62SIP

sk-am62-sip

config/boards/sk-am62-sip.conf

current, current-rt, edge

AM64x

sk-am64b

config/boards/sk-am64b.conf

current, edge

output/images/ stores the built images. These images have a .img extension.