mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-17 18:14:24 +00:00

Transfer List Compiler is a command line tool that enables the static generation of TL's compliant with version 0.9 of the firmware handoff specification. The intent of this tool is to support information passing via the firmware handoff framework to bootloaders that run without preceding images (i.e. `RESET_TO_BL31`). It currently allows for TL's to be statically generated from blobs of data, and modified by removing/adding TE's. Future work will provide support for TL generation from configuration file. Change-Id: Iff670842e34c9ad18eac935248ee2aece43dc533 Signed-off-by: Harrison Mutai <harrison.mutai@arm.com> Co-authored-by: Charlie Bareham <charlie.bareham@arm.com>
40 lines
792 B
Python
40 lines
792 B
Python
#!/usr/bin/env python3
|
|
# type: ignore[attr-defined]
|
|
|
|
#
|
|
# Copyright (c) 2024, Arm Limited. All rights reserved.
|
|
#
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
#
|
|
|
|
""" Common configurations and fixtures for test environment."""
|
|
|
|
import pytest
|
|
from click.testing import CliRunner
|
|
|
|
from tlc.cli import cli
|
|
|
|
|
|
@pytest.fixture
|
|
def tmptlstr(tmpdir):
|
|
return tmpdir.join("tl.bin").strpath
|
|
|
|
|
|
@pytest.fixture
|
|
def tmpfdt(tmpdir):
|
|
fdt = tmpdir.join("fdt.dtb")
|
|
fdt.write_binary(b"\x00" * 100)
|
|
return fdt
|
|
|
|
|
|
@pytest.fixture
|
|
def tlcrunner(tmptlstr):
|
|
runner = CliRunner()
|
|
with runner.isolated_filesystem():
|
|
runner.invoke(cli, ["create", tmptlstr])
|
|
return runner
|
|
|
|
|
|
@pytest.fixture
|
|
def tlc_entries(tmpfdt):
|
|
return [(0, "/dev/null"), (1, tmpfdt.strpath), (0x102, tmpfdt.strpath)]
|