mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-18 19:03:16 +00:00
* **New Features** * PI4IOE5V6408 I2C I/O expander driver with public GPIO APIs * CLI tool to list devicetree dependencies * **Device Tree Updates** * M5Stack Tab5 configured with two I2C IO expanders; PI4IOE5V6408 binding added * **Build / Tooling** * Devicetree code generation integrated into build; generated artifacts and dynamic dependency resolution exposed * **Refactor** * Kernel/run APIs updated to accept a null‑terminated devicetree modules array; many module symbols renamed * **Documentation** * Added README and Apache‑2.0 license for new driver module
36 lines
1.1 KiB
Python
36 lines
1.1 KiB
Python
import sys
|
|
import os
|
|
|
|
from source.printing import print_error
|
|
from source.config import parse_config
|
|
|
|
def print_help():
|
|
print("Usage: python dependencies.py [path]\n")
|
|
print("\t[in_file] the path where the root devicetree.yaml file is")
|
|
|
|
if __name__ == "__main__":
|
|
if "--help" in sys.argv:
|
|
print_help()
|
|
sys.exit()
|
|
args = [a for a in sys.argv[1:] if not a.startswith("--")]
|
|
if len(args) < 1:
|
|
print_error("Missing argument")
|
|
print_help()
|
|
sys.exit(1)
|
|
|
|
yaml_directory = args[0]
|
|
|
|
if not os.path.exists(yaml_directory):
|
|
print_error(f"Path not found: {yaml_directory}")
|
|
sys.exit(1)
|
|
|
|
config = parse_config(yaml_directory, os.getcwd())
|
|
|
|
# Device module is added first because it's started first:
|
|
# It creates the root device, so it must exist before its children.
|
|
device_dependency = os.path.basename(os.path.normpath(yaml_directory))
|
|
print(device_dependency)
|
|
for dependency in config.dependencies:
|
|
dependency_name = os.path.basename(os.path.normpath(dependency))
|
|
print(dependency_name)
|