wscript: add dtc command to compile dts files

Enables building FDT files during compilation.

Updates #5136
This commit is contained in:
Gedare Bloom 2026-05-20 18:53:59 -06:00
parent 296d3872ff
commit 50e801531e
1 changed files with 8 additions and 0 deletions

View File

@ -510,6 +510,14 @@ class Item(object):
bld(rule=run, source=source, target=target)
return target
def dtc(self, bld, source, outdir):
path, base = os.path.split(source)
root, ext = os.path.splitext(base)
target = os.path.join(outdir, root + ".dtb")
bld(rule="${DTC} -I dts -O dtb -o ${TGT} ${SRC} > ${TGT}",
source=source, target=target)
return target
def bin2c(self, bld, source, name=None, target=None):
def run(task):