Skip to content

TexasInstruments/ti-bdebstrap

Repository files navigation

ti-bdebstrap

Scripts to build custom bootstrap images using bdebstrap for TI platforms

Directory Structure

├── build.sh
├── builds.toml
├── configs
│   ├── bdebstrap_configs
│   │   ├── bookworm-default.yaml
│   │   └── bullseye-default.yaml
│   ├── bsp_sources.toml
│   └── machines.toml
├── LICENSE
├── README.md
├── scripts
│   ├── build_bsp.sh
│   ├── build_distro.sh
│   ├── common.sh
│   └── setup.sh
├── target
│   └── files for target configs

Prerequisites

Host Setup - Ubuntu 22.04 (Recommended)

To install the dependencies, run the following commands

sudo apt update
sudo apt install -y \
        pigz expect pv \
        binfmtc binfmt-support \
        qemu-user qemu-user-static qemu-system-arm \
        debian-archive-keyring bdebstrap \
        build-essential autoconf automake \
        bison flex libssl-dev \
        bc git wget u-boot-tools swig \
        python3-pyelftools python3-pip python3-dev \
        python3-yaml python3-jsonschema python3-cryptography
sudo apt install --fix-broken
sudo pip3 install toml-cli
sudo pip3 install yamllint

Usage

A build (specified in builds.toml file) represents the image for a particular machine, BSP version and distribution variant. The builds.toml file contains a list of builds, with corresponding machine, BSP version and distribution variant specifications.

Further, each machine is defined in configs/machines.toml. Each BSP version is defined in configs/bsp_sources.toml. Each distribution variant is defined in the configs/bdebstrap_configs/ directory.

Running these scripts requires root privileges.

General Syntax:
sudo ./build.sh <build>

Each successful build is placed in build/ directory. Logs for each build are placed in the logs/ directory.

For example, the following command builds a Bookworm Debian image for am62xx-evm machine, where the BSP version is 09.01.00.008.

sudo ./build.sh am62-bookworm-09.01.00.008

The output will be generated at build/. The log file will be logs/am62-bookworm-09.01.00.008.log.

Flashing Image to SD Card

If you just want to flash the built image to the SD card, use the create-sdcard.sh script. Syntax:

sudo ./create-sdcard.sh <build>

Continuing the example above, if you've built am62-bookworm-09.01.00.008, type:

sudo ./create-sdcard.sh am62-bookworm-09.01.00.008

This command will flash am62-bookworm-09.01.00.008 image to the SD card.

Following the above, you should have a basic Debian SD Card set up.

Creating SD Card Image

To create a shareable SD card Image to flash with tools like balena-etcher, use create-wic.sh script. Syntax:

sudo ./create-wic.sh <build>

This command will generate a tisdk-debian-bookworm-<machine>.wic.xz image at <ti-bdebstrap>/build/<build>/

Continuing the example above, if you've built am62-bookworm-09.01.00.008, type:

sudo ./create-wic.sh am62-bookworm-09.01.00.008

This command will generate a tisdk-debian-bookworm-am62xx-evm.wic.xz image at <ti-bdebstrap>/build/am62-bookworm-09.01.00.008/

About

Build custom bootstrap images using bdebstrap

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages