diff options
author | Tom Rini <trini@konsulko.com> | 2021-01-31 08:49:53 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-01-31 08:49:53 -0500 |
commit | 242ef48ea76ae13ac6357cc50aae01eb7a46bfef (patch) | |
tree | 18105866b6063eddcc7ddb0530c002fadc377b3b /tools/dtoc/fdt.py | |
parent | 76404f86a24aa28efc26a296bf6ab9d697c60b9f (diff) | |
parent | f84eda89e5970ef513fe64ba8e8d977788c44dca (diff) |
Merge tag 'dm-pull-30jan21' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm
tpm fixes for coral
binman fixes support for symbols in sub-sections
support for additional cros_ec commands
various minor fixes / tweaks
Diffstat (limited to 'tools/dtoc/fdt.py')
-rw-r--r-- | tools/dtoc/fdt.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/tools/dtoc/fdt.py b/tools/dtoc/fdt.py index 4a78c73725..25ce5136eb 100644 --- a/tools/dtoc/fdt.py +++ b/tools/dtoc/fdt.py @@ -460,10 +460,21 @@ class Node: prop_name: Name of property to add val: String value of property """ - if sys.version_info[0] >= 3: # pragma: no cover - val = bytes(val, 'utf-8') + val = bytes(val, 'utf-8') self.AddData(prop_name, val + b'\0') + def AddInt(self, prop_name, val): + """Add a new integer property to a node + + The device tree is marked dirty so that the value will be written to + the blob on the next sync. + + Args: + prop_name: Name of property to add + val: Integer value of property + """ + self.AddData(prop_name, struct.pack('>I', val)) + def AddSubnode(self, name): """Add a new subnode to the node |