Esempio n. 1
0
 def flash_parameter(self, parameter_file):
   with open(parameter_file) as fh:
     data = fh.read()
     buf = rkcrc.make_parameter_image(data)
   assert len(buf) <= PART_BLOCKSIZE
   with io.BytesIO(buf) as fh:
     self.__logger.print_dividor()
     self.__logger.log('\tWriting parameter file %s\n' % (parameter_file))
     self.__flash_image_file(0x00000000, PART_BLOCKSIZE, fh)
Esempio n. 2
0
 def flash_parameter(self, parameter_file):
   with open(parameter_file) as fh:
     data = fh.read()
     buf = rkcrc.make_parameter_image(data)
   assert len(buf) <= PART_BLOCKSIZE
   with io.BytesIO(buf) as fh:
     self.__logger.print_dividor()
     self.__logger.log('\tWriting parameter file %s\n' % (parameter_file))
     self.__flash_image_file(0x00000000, PART_BLOCKSIZE, fh)