arm-trusted-firmware/tools
Chris Kay 73f7b7ddbe fix(cot-dt2c): fix various breakages
This change fixes several breakages that were introduced in some build
configurations by the introduction of the cot-dt2c tool.

Some Python environments cannot be managed directly via `pip`, and
invocations of `make`, including `make distclean`, would cause errors
along the lines of:

    error: externally-managed-environment

    × This environment is externally managed
    ╰─> To install Python packages system-wide, try apt install
        python3-xyz, where xyz is the package you are trying to
        install.

This change has been resolved by ensuring that calls to the cot-dt2c
tool from the build system happen exclusively through Poetry, which
automatically sets up a virtual environment that *can* be modified.

Some environments saw the following error when building platforms where
the cot-dt2c tool was used:

    make: *** No rule to make target '<..>/debug/bl2_cot.c', needed
    by '<..>/debug/bl2/bl2_cot.o'.  Stop.

Additionally, environments with a more recent version of Python saw the
following error:

      File "<...>/lib/python3.12/site-packages/cot_dt2c/cot_parser.py",
      line 637, in img_to_c
        if ifdef:
           ^^^^^
    NameError: name 'ifdef' is not defined

Both of these errors have now been resolved by modifications to the
build system and the cot-dt2c tool to enable preprocessing of the device
tree source file before it is processed by the tool.

As a consequence of this change, the `pydevicetree` library is no longer
vendored into the repository tree, and we instead pull it in via a
dependency in Poetry.

This change also resolves several MyPy warnings and errors related to
missing type hints.

Change-Id: I72b2d01caca3fcb789d3fe2549f318a9c92d77d1
Signed-off-by: Chris Kay <chris.kay@arm.com>
2024-08-28 09:56:59 +00:00
..
amlogic build: unify verbosity handling 2024-06-14 15:54:48 +00:00
cert_create build(cert-create): don't generate build_msg.c 2024-07-01 14:58:56 +00:00
conventional-changelog-tf-a docs(changelog): changelog for v2.11 release 2024-05-22 19:19:54 -05:00
cot_dt2c fix(cot-dt2c): fix various breakages 2024-08-28 09:56:59 +00:00
encrypt_fw build(encrypt-fw): don't generate build_msg.c 2024-07-01 15:15:56 +00:00
fiptool build: unify verbosity handling 2024-06-14 15:54:48 +00:00
marvell/doimage build: unify verbosity handling 2024-06-14 15:54:48 +00:00
memory feat(memmap): add RELA section display 2024-01-18 14:02:18 +01:00
nxp build: unify verbosity handling 2024-06-14 15:54:48 +00:00
renesas build: consolidate directory creation rules 2024-07-22 09:41:30 +00:00
sptool build: unify verbosity handling 2024-06-14 15:54:48 +00:00
stm32image build: unify verbosity handling 2024-06-14 15:54:48 +00:00
tlc feat: add option to input attr as string of flag names 2024-08-02 12:14:53 +00:00