[PATCH 1/2] arm/trusted-firmware-a: Add cot-dt2c

Jon Mason <[email protected]>
Newsgroups org.yoctoproject.lists.meta-arm
Message-ID <[email protected]>
Platforms with GENERATE_COT need to either have COT_DESC_IN_DTB set or
use cot-dt2c to generate it.  Add cot-dt2c from trusted-firmware-a
sources and its python dependencies to enable this for those that need
it.

Also, move all the relevant platforms in meta-arm-bsp to use 2.12

Signed-off-by: Jon Mason <[email protected]>
---
 .../trusted-firmware-a/cot-dt2c_0.1.0.bb      | 25 +++++++++++++++++++
 .../python/python3-pydevicetree_0.0.12.bb     | 10 ++++++++
 2 files changed, 35 insertions(+)
 create mode 100644 meta-arm/recipes-bsp/trusted-firmware-a/cot-dt2c_0.1.0.bb
 create mode 100644 meta-arm/recipes-devtools/python/python3-pydevicetree_0.0.12.bb

diff --git a/meta-arm/recipes-bsp/trusted-firmware-a/cot-dt2c_0.1.0.bb b/meta-arm/recipes-bsp/trusted-firmware-a/cot-dt2c_0.1.0.bb
new file mode 100644
index 000000000000..8f64b8a66b8a
--- /dev/null
+++ b/meta-arm/recipes-bsp/trusted-firmware-a/cot-dt2c_0.1.0.bb
@@ -0,0 +1,25 @@
+# Description, License, and version from tools/cot_dt2c/pyproject.toml in TF-A source
+DESCRIPTION = "CoT-dt2c Tool is a python script to convert CoT DT file into corresponding C file"
+LICENSE = "BSD-3-Clause"
+
+SRC_URI_TRUSTED_FIRMWARE_A ?= "git://git.trustedfirmware.org/TF-A/trusted-firmware-a.git;protocol=https"
+SRC_URI = "${SRC_URI_TRUSTED_FIRMWARE_A};branch=${SRCBRANCH}"
+LIC_FILES_CHKSUM = "file://docs/license.rst;md5=83b7626b8c7a37263c6a58af8d19bee1"
+
+# Use cot-dt2c from TF-A v2.12.0
+SRCREV = "4ec2948fe3f65dba2f19e691e702f7de2949179c"
+SRCBRANCH = "master"
+
+inherit python_poetry_core
+
+BBCLASSEXTEND = "native nativesdk"
+
+S = "${UNPACKDIR}/git"
+
+# Dependencies of plotly and igraph are not needed for the standard case
+RDEPENDS:${PN} += "python3-click \
+                   python3-pydevicetree \
+                   python3-pyparsing \
+                  "
+
+PEP517_SOURCE_PATH = "${S}/tools/cot_dt2c"
diff --git a/meta-arm/recipes-devtools/python/python3-pydevicetree_0.0.12.bb b/meta-arm/recipes-devtools/python/python3-pydevicetree_0.0.12.bb
new file mode 100644
index 000000000000..fdd7715df629
--- /dev/null
+++ b/meta-arm/recipes-devtools/python/python3-pydevicetree_0.0.12.bb
@@ -0,0 +1,10 @@
+SUMMARY = "Python 3 library for parsing, querying, and modifying Devicetree Source v1 files"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=23f9ad5cad3d8cc0336e2a5d8a87e1fa"
+HOMEPAGE = "https://github.com/sifive/pydevicetree"
+
+inherit pypi setuptools3
+
+SRC_URI[sha256sum] = "1ca19ec38bec0095a0a8dc4753a578e8c6e9a70873112547d30c92b32411f667"
+
+BBCLASSEXTEND = "native nativesdk"
-- 
2.39.5 (Apple Git-154)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.