def UpdateSignatures(self, privatekey_fname, algo, input_fname):
self.Raise('Updating signatures is not supported with this entry type')
+
+ def FdtContents(self, fdt_etype):
+ """Get the contents of an FDT for a particular phase
+
+ Args:
+ fdt_etype (str): Filename of the phase of the FDT to return, e.g.
+ 'u-boot-tpl-dtb'
+
+ Returns:
+ bytes: Contents of requested FDT
+ """
+ return self.section.FdtContents(fdt_etype)
def ObtainContents(self, fake_size=0):
"""Get the device-tree from the list held by the 'state' module"""
self._filename = self.GetDefaultFilename()
- self._pathname, _ = state.GetFdtContents(self.GetFdtEtype())
+ self._pathname, _ = self.FdtContents(self.GetFdtEtype())
return super().ReadBlobContents()
def ProcessContents(self):
"""Re-read the DTB contents so that we get any calculated properties"""
- _, indata = state.GetFdtContents(self.GetFdtEtype())
+ _, indata = self.FdtContents(self.GetFdtEtype())
if self.compress == 'zstd' and self.prepend != 'length':
self.Raise('The zstd compression requires a length header')
super().AddBintools(bintools)
self.bintools = bintools
return bintools
+
+ def FdtContents(self, fdt_etype):
+ """This base-class implementation simply calls the state function"""
+ return state.GetFdtContents(fdt_etype)