diff options
author | Tom Rini <trini@konsulko.com> | 2018-09-30 18:16:51 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-09-30 18:16:51 -0400 |
commit | d24c1d0f4da3b081a4fedf7ae2a08790871f08d0 (patch) | |
tree | 30051c24000bbb640b6296c8a71a8e05f0cc06e4 /tools/binman/etype/u_boot_dtb_with_ucode.py | |
parent | 2c1e16b9d2e3a6138acf4ffd9866e47ddbe6d453 (diff) | |
parent | 31b8217e83a63d1c8c70edcdcdf5aff3b1791640 (diff) |
Merge git://git.denx.de/u-boot-dm
Diffstat (limited to 'tools/binman/etype/u_boot_dtb_with_ucode.py')
-rw-r--r-- | tools/binman/etype/u_boot_dtb_with_ucode.py | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/tools/binman/etype/u_boot_dtb_with_ucode.py b/tools/binman/etype/u_boot_dtb_with_ucode.py index 285a28dd1e..444c51b8b7 100644 --- a/tools/binman/etype/u_boot_dtb_with_ucode.py +++ b/tools/binman/etype/u_boot_dtb_with_ucode.py @@ -5,12 +5,12 @@ # Entry-type module for U-Boot device tree with the microcode removed # -import control from entry import Entry -from blob import Entry_blob +from blob_dtb import Entry_blob_dtb +import state import tools -class Entry_u_boot_dtb_with_ucode(Entry_blob): +class Entry_u_boot_dtb_with_ucode(Entry_blob_dtb): """A U-Boot device tree file, with the microcode removed Properties / Entry arguments: @@ -25,7 +25,7 @@ class Entry_u_boot_dtb_with_ucode(Entry_blob): it available to u_boot_ucode. """ def __init__(self, section, etype, node): - Entry_blob.__init__(self, section, etype, node) + Entry_blob_dtb.__init__(self, section, etype, node) self.ucode_data = '' self.collate = False self.ucode_offset = None @@ -45,13 +45,16 @@ class Entry_u_boot_dtb_with_ucode(Entry_blob): 'u-boot-spl-with-ucode-ptr') if not ucode_dest_entry or not ucode_dest_entry.target_offset: ucode_dest_entry = self.section.FindEntryType( + 'u-boot-tpl-with-ucode-ptr') + if not ucode_dest_entry or not ucode_dest_entry.target_offset: + ucode_dest_entry = self.section.FindEntryType( 'u-boot-with-ucode-ptr') if not ucode_dest_entry or not ucode_dest_entry.target_offset: return True # Remove the microcode fname = self.GetDefaultFilename() - fdt = control.GetFdt(fname) + fdt = state.GetFdt(fname) self.ucode = fdt.GetNode('/microcode') if not self.ucode: raise self.Raise("No /microcode node found in '%s'" % fname) @@ -69,15 +72,15 @@ class Entry_u_boot_dtb_with_ucode(Entry_blob): def ObtainContents(self): # Call the base class just in case it does something important. - Entry_blob.ObtainContents(self) - self._pathname = control.GetFdtPath(self._filename) - self.ReadBlobContents() - if self.ucode: + Entry_blob_dtb.ObtainContents(self) + if self.ucode and not self.collate: for node in self.ucode.subnodes: data_prop = node.props.get('data') - if data_prop and not self.collate: + if data_prop: # Find the offset in the device tree of the ucode data self.ucode_offset = data_prop.GetOffset() + 12 self.ucode_size = len(data_prop.bytes) - self.ready = True - return True + self.ready = True + else: + self.ready = True + return self.ready |