Entry_ti_secure and Entry_ti_secure_rom both call super().ReadNode() and then read the 'keyfile' entry argument a second time, with exactly the call that Entry_x509_cert.ReadNode() has already made. The second read is pure duplication, and it means anything the parent does to self.key_fname is silently discarded.
Drop it, so that the subclasses use the value their parent decided on, and drop the EntryArg import which becomes unused. No functional change. Signed-off-by: Sergio Prado <[email protected]> --- tools/binman/etype/ti_secure.py | 3 --- tools/binman/etype/ti_secure_rom.py | 3 --- 2 files changed, 6 deletions(-) diff --git a/tools/binman/etype/ti_secure.py b/tools/binman/etype/ti_secure.py index f6caa0286d97..705a05342a85 100644 --- a/tools/binman/etype/ti_secure.py +++ b/tools/binman/etype/ti_secure.py @@ -5,7 +5,6 @@ # Support for generation of TI secured binary blobs -from binman.entry import EntryArg from binman.etype.x509_cert import Entry_x509_cert from dataclasses import dataclass @@ -110,8 +109,6 @@ class Entry_ti_secure(Entry_x509_cert): def ReadNode(self): super().ReadNode() - self.key_fname = self.GetEntryArgsOrProps([ - EntryArg('keyfile', str)], required=True)[0] auth_in_place = fdt_util.GetInt(self._node, 'auth-in-place') if auth_in_place: self.firewall_cert_data['auth_in_place'] = auth_in_place diff --git a/tools/binman/etype/ti_secure_rom.py b/tools/binman/etype/ti_secure_rom.py index 7e90c6559409..f1bc9e7577e6 100644 --- a/tools/binman/etype/ti_secure_rom.py +++ b/tools/binman/etype/ti_secure_rom.py @@ -5,7 +5,6 @@ # Support for generation of TI secured bootloaders booted by ROM -from binman.entry import EntryArg from binman.etype.x509_cert import Entry_x509_cert import hashlib @@ -71,8 +70,6 @@ class Entry_ti_secure_rom(Entry_x509_cert): self.sha = fdt_util.GetInt(self._node, 'sha', 512) self.core = fdt_util.GetString(self._node, 'core', 'secure') self.bootcore_opts = fdt_util.GetInt(self._node, 'core-opts') - self.key_fname = self.GetEntryArgsOrProps([ - EntryArg('keyfile', str)], required=True)[0] if self.combined: self.sysfw_inner_cert = fdt_util.GetBool(self._node, 'sysfw-inner-cert', False) self.load_addr_sysfw = fdt_util.GetInt(self._node, 'load-sysfw', 0x00000000) -- 2.34.1
