Home/Support/Support Forum/How to verify images?
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

How to verify images?

0 votes
I am using Digi ESP for NET+OS (7.5.2) to build images for Connect ME 2MB modules.
I have a requirement that I need to be able to verify the image for the customer.
I would like to generate and embed a CRC in the image that can be viewed prior to acceptance testing. Or is there one already included?
I would also like to be able to some time in the future, be able to check the code out of the repository, build it and verify that the image is the same. This will be problematic if the date/timestamp is included in the image. I don't easily see the date/time in the image but I do see the name of the build machine - which would also be a problem.
Is there a standard way of verifying images that can be used?
Thank you for any advice or insight.
asked Oct 11 in NET+OS by WMiller New to the Community (3 points)

Please log in or register to answer this question.

1 Answer

0 votes
image.bin already has CRC calculated and stored in image header. Bootloader calculates the image CRC and compares with one stored in the image's header and it will only boot the image if CRC match.
answered Oct 14 by LeonidM Veteran of the Digi Community (3,126 points)
Thank you LeonidM, but what is the format of the image header. i.e. which bytes in the file represent the CRC value? I have not been able to find anything that describes the format of the image.bin file and especially the fields of the header portion.
If I open any image.bin file with a hex editor, I see "bootHdr" early in the file and the first sets of 4 bytes are always 00 00 00 5C so that doesn't appear to be a CRC or checksum type of value.
the CRC is in image signature, perhaps bottom of the image. Check: C:\Netos75\src\bsp\customize\blmain.c:
static BOOLEAN isImageValid(blImageHeaderType * imageInfo)
This is the code that does verification
...