Implementation of Firmware Handoff Specification

Clone this repo:

Branches

  1. 25d25c5 feat: add fdt overlay tag to tl by Maheedhar Bollapalli · 9 months ago main
  2. cc54d78 fix: support clang build with aarch64-unknown-windows-msvc target by Yeoreum Yun · 5 months ago
  3. da4f18a chore: add README for TLC by Harrison Mutai · 1 year ago
  4. 3272a99 Revert "fix(tlc): correct checksum to use XOR per specification" by Harrison Mutai · 10 months ago
  5. 81d7f82 Revert "fix: use XOR for checksum" by Harrison Mutai · 10 months ago

Transfer List Library (LibTL)

The Transfer List Library (LibTL) implements the Firmware Handoff specification, providing a streamlined interface for managing transfer lists. LibTL offers a user-friendly interface for:

  • Creating transfer lists
  • Reading and extracting data from transfer lists
  • Manipulating and updating transfer lists

The library supports building with host tools such as Clang and GCC, and cross compilation with the Aarch64 GNU compiler.

Minimum Supporting Tooling Requirements

ToolMinimum Version
Clang-Format14
CMake3.15

Building with CMake

To configure the project with the default settings (using GCC as the host compiler), run:

cmake -B build

Then, to compile the project and produce libtl.a in the build/ directory:

cmake --build build

To cross-compile the project (e.g., for AArch64), specify the appropriate tool using the CC option when configuring the project:

CC=aarch64-none-elf-gcc cmake -B build -DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY
cmake --build build

You can specify the build mode using the CMAKE_BUILD_TYPE option. Supported modes include:

  • Debug – Full debug info with no optimization.
  • Release – Optimized build without debug info.
  • RelWithDebInfo – Optimized build with debug info.
  • MinSizeRel – Optimized for minimum size.

APIs for specific projects can be conditionally included in the static library using the PROJECT_API option.

Testing with CTest

Tests for LibTL are provided in the folder test, to configure the project for test builds, run:

cmake -B build -DTARGET_GROUP=test
cmake --build build

Then, to run the tests with ctest, use:

ctest --test-dir build/