Building the bootloader is failing in do_boot_tail because the generated checksum for years >= 2022 is to big to be represented as unsigned int.
DEBUG: Executing python function do_boot_tail
NOTE: Calculating boot tail given V: US02HSXXB00000000
ERROR: Error executing a python function in /public/Work/build/../git/meta-exor-us02/recipes-bsp/bootloader/bootloader_git.bb:
The stack trace of python calls that resulted in this exception/failure was:
File: 'do_boot_tail', lineno: 82, function: <module>
0078: finally:
0079: loaderfile.close()
0080:
0081:
*** 0082:do_boot_tail(d)
0083:
File: 'do_boot_tail', lineno: 42, function: do_boot_tail
0038: for i in range(0,len(s)/4):
0039: chksum += struct.unpack('I', s[i*4:i*4+4])[0]
0040:
0041: # append checksum to header and it's ready
*** 0042: s += struct.pack('I', chksum)
0043:
0044: hexs = binascii.hexlify(s)
0045: bb.note("tail (hex): %s" % hexs)
0046:
Exception: error: 'I' format requires 0 <= number <= 4294967295
DEBUG: Python function do_boot_tail finished
ERROR: Function failed: do_boot_tail
This is working fine, if today.year in exorint-boottail.bbclass is 2021, but no longer for 2022 as the chksum is exceeding the four byte integer size.
I've "fixed" this by giving it another 20 years to overflow again by changing line 40 of exorint-boottail.bbclass from
to
This is working fine but raises the question what is this checksum for? Is it read anywhere? Why is there no hash function used?
Building the bootloader is failing in
do_boot_tailbecause the generated checksum for years >= 2022 is to big to be represented as unsigned int.This is working fine, if
today.yearinexorint-boottail.bbclassis 2021, but no longer for 2022 as the chksum is exceeding the four byte integer size.I've "fixed" this by giving it another 20 years to overflow again by changing line 40 of
exorint-boottail.bbclassfromto
This is working fine but raises the question what is this checksum for? Is it read anywhere? Why is there no hash function used?