mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 01:12:31 +00:00
Bootloader requires images be a multiple of 4 bytes; pad to comply.
This commit is contained in:
@@ -77,6 +77,10 @@ class firmware(object):
|
||||
|
||||
self.image = zlib.decompress(base64.b64decode(self.desc['image']))
|
||||
|
||||
# pad image to 4-byte length
|
||||
while ((len(self.image) % 4) != 0):
|
||||
self.image += b'\x00'
|
||||
|
||||
def property(self, propname):
|
||||
return self.desc[propname]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user