diff options
author | Tom Rini <trini@konsulko.com> | 2018-08-03 10:08:13 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-08-03 10:08:13 -0400 |
commit | a30691a538b0894dfc0076150b8a3a7326b9e45a (patch) | |
tree | 2d12b0e66b9baa83199c74b5d9b392e09b529f79 /tools/binman/etype/u_boot_dtb_with_ucode.py | |
parent | a839c3641e4de98981695056eeeb2ec17ba1a4ab (diff) | |
parent | cee02e6ff422fdb8b543a8097b84a9682785f46d (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 | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/tools/binman/etype/u_boot_dtb_with_ucode.py b/tools/binman/etype/u_boot_dtb_with_ucode.py index 3808d6d2780..285a28dd1e7 100644 --- a/tools/binman/etype/u_boot_dtb_with_ucode.py +++ b/tools/binman/etype/u_boot_dtb_with_ucode.py @@ -6,7 +6,6 @@ # import control -import fdt from entry import Entry from blob import Entry_blob import tools @@ -14,8 +13,16 @@ import tools class Entry_u_boot_dtb_with_ucode(Entry_blob): """A U-Boot device tree file, with the microcode removed - See Entry_u_boot_ucode for full details of the 3 entries involved in this - process. + Properties / Entry arguments: + - filename: Filename of u-boot.dtb (default 'u-boot.dtb') + + See Entry_u_boot_ucode for full details of the three entries involved in + this process. This entry provides the U-Boot device-tree file, which + contains the microcode. If the microcode is not being collated into one + place then the offset and size of the microcode is recorded by this entry, + for use by u_boot_with_ucode_ptr. If it is being collated, then this + entry deletes the microcode from the device tree (to save space) and makes + it available to u_boot_ucode. """ def __init__(self, section, etype, node): Entry_blob.__init__(self, section, etype, node) @@ -30,13 +37,16 @@ class Entry_u_boot_dtb_with_ucode(Entry_blob): return 'u-boot.dtb' def ProcessFdt(self, fdt): + # So the module can be loaded without it + import fdt + # If the section does not need microcode, there is nothing to do ucode_dest_entry = self.section.FindEntryType( 'u-boot-spl-with-ucode-ptr') - if not ucode_dest_entry or not ucode_dest_entry.target_pos: + 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_pos: + if not ucode_dest_entry or not ucode_dest_entry.target_offset: return True # Remove the microcode @@ -61,7 +71,7 @@ class Entry_u_boot_dtb_with_ucode(Entry_blob): # Call the base class just in case it does something important. Entry_blob.ObtainContents(self) self._pathname = control.GetFdtPath(self._filename) - self.ReadContents() + self.ReadBlobContents() if self.ucode: for node in self.ucode.subnodes: data_prop = node.props.get('data') |