Lines Matching refs:blob
171 blob = self.fum.get_section(self.image, subsection_name)
172 if blob:
175 f.write(blob)
178 blob = self.fum.get_section(self.image, section.get_body_name())
179 if blob:
181 s.update(blob)
270 into the section blob, either body or signature.
288 blob = self.fum.get_section(self.image, subsection_name)
290 # Modify the byte in it within 2% of the section blob.
291 modified_index = len(blob) / 50
293 blob_list = [('%c' % ((ord(x) + delta) % 0x100)) for x in blob]
295 blob_list = list(blob)
297 ((ord(blob[modified_index]) + delta) % 0x100))
394 def write_partial(self, subsection_name, blob=None, write_through=True):
397 One can pass a blob to update the data of the subsection before write
405 if blob is not None:
406 self.image = self.fum.put_section(self.image, subsection_name, blob)
427 blob = self.fum.get_section(self.image, subsection_name)
428 open(filename, 'w').write(blob)
501 blob = self.fum.get_section(self.image, subsection_name)
502 return blob
511 blob = self.fum.get_section(self.image, subsection_name)
512 return blob
515 """Retrieve fwid blob of a firmware section"""
517 blob = self.fum.get_section(self.image, subsection_name)
518 return blob
520 def set_section_body(self, section, blob, write_through=False):
521 """Put the supplied blob to the body of the firmware section"""
523 self.write_partial(subsection_name, blob, write_through)
525 def set_section_sig(self, section, blob, write_through=False):
526 """Put the supplied blob to the vblock of the firmware section"""
528 self.write_partial(subsection_name, blob, write_through)
530 def set_section_fwid(self, section, blob, write_through=False):
531 """Put the supplied blob to the fwid of the firmware section"""
533 self.write_partial(subsection_name, blob, write_through)