diff options
author | Simon Glass <sjg@chromium.org> | 2023-02-23 18:18:17 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2023-03-08 11:40:49 -0800 |
commit | 77b3ccb89ae373d054533f5f4a4192a4ba020405 (patch) | |
tree | 6e7a2ccc2595a2998fbcc4b14eaaf5b6e1604f82 /tools/dtoc | |
parent | 1688d6ca0e0c665c909ec6cd30c2aa53445548f2 (diff) | |
download | u-boot-77b3ccb89ae373d054533f5f4a4192a4ba020405.zip u-boot-77b3ccb89ae373d054533f5f4a4192a4ba020405.tar.gz u-boot-77b3ccb89ae373d054533f5f4a4192a4ba020405.tar.bz2 |
dtoc: Add support for building a dtoc PyPi package
Create the necessary files to build this new package.
This is needed for binman.
Move the main program into a function so that it can easily be called by
the PyPi-created script.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/dtoc')
-rw-r--r-- | tools/dtoc/README.rst | 15 | ||||
-rw-r--r-- | tools/dtoc/pyproject.toml | 26 |
2 files changed, 41 insertions, 0 deletions
diff --git a/tools/dtoc/README.rst b/tools/dtoc/README.rst new file mode 100644 index 0000000..92b3975 --- /dev/null +++ b/tools/dtoc/README.rst @@ -0,0 +1,15 @@ +.. SPDX-License-Identifier: GPL-2.0+ + +Devicetree-to-C generator +========================= + +This is a Python program and associated utilities, which supports converting +devicetree files into C code. It generates header files containing struct +definitions, as well as C files containing the data. It does not require any +modification of the devicetree files. + +Some high-level libraries are provided for working with devicetree. These may +be useful in other projects. + +This package also includes some U-Boot-specific features, such as creating +`struct udevice` and `struct uclass` entries for devicetree nodes. diff --git a/tools/dtoc/pyproject.toml b/tools/dtoc/pyproject.toml new file mode 100644 index 0000000..77fe4da --- /dev/null +++ b/tools/dtoc/pyproject.toml @@ -0,0 +1,26 @@ +[build-system] +requires = ["setuptools>=61.0"] +build-backend = "setuptools.build_meta" + +[project] +name = "dtoc" +version = "0.0.2" +authors = [ + { name="Simon Glass", email="sjg@chromium.org" }, +] +dependencies = ["pylibfdt", "u_boot_pylib"] +description = "Devicetree-to-C generator" +readme = "README.rst" +requires-python = ">=3.7" +classifiers = [ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)", + "Operating System :: OS Independent", +] + +[project.urls] +"Homepage" = "https://u-boot.readthedocs.io/en/latest/develop/driver-model/of-plat.html" +"Bug Tracker" = "https://source.denx.de/groups/u-boot/-/issues" + +[project.scripts] +dtoc = "dtoc.main:run_dtoc" |