[RTEMS Project] #4249: fix mkimage.py script type processing

RTEMS trac trac at rtems.org
Tue Feb 16 05:21:34 UTC 2021


#4249: fix mkimage.py script type processing
--------------------------+-------------------------
  Reporter:  Chris Johns  |      Owner:  Chris Johns
      Type:  defect       |     Status:  assigned
  Priority:  normal       |  Milestone:  5.2
 Component:  tool         |    Version:  5
  Severity:  normal       |   Keywords:
Blocked By:               |   Blocking:
--------------------------+-------------------------
 The explaination is taken from André on the user list:

  Hello,

  after some digging I think I found the problem and at least a workaround.

  As a disclaimer, I do not know if this really counts as a general fix.
  I have not invested enough time to dig through the original mkimage
 U-Boot source to figure this out.
  But I have attached my workaround patch if anyone might face the same
 problems.

  The source of the problem are eight bytes between the header and the
 actual input file which are missing when using mkimage.py.
  Also the input size and input crc are wrong which is a result of the
 missing bytes.

  These eight bytes always reflect the actual size of the input file (first
 four bytes) with four bytes zeros following.
  Within the original mkimage tool these eight bytes are considered part of
 the input file section in the output file.
  Therefore the calculated input size is eight bytes higher and the input
 crc differs.

  As a workaround the mkimage.py script will add these eight bytes to the
 output file and the input crc calculation and adjusts the input size.
  This only happens when the type script was selected.

  Best regards
  André

 https://lists.rtems.org/pipermail/users/2021-January/068060.html
 https://lists.rtems.org/pipermail/users/2021-February/068140.html
 https://lists.rtems.org/pipermail/devel/2021-February/064491.html

--
Ticket URL: <http://devel.rtems.org/ticket/4249>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list