
In message B64365CEC50FA74DB2B72D3F7A5D4C7D10AD30@EPEXCH02.qlogic.org you wrote:
Does the U-Boot code generate and check a checksum or CRC on itself? I see code to verify
No.
CRC checksums on images that U-Boot loads into memory, but I do not see any code that checks the U-Boot image itself.
I'm not sure what you mean with "image" here. If you build a U-Boot image (meaning using the "mkimage" tool to create an image out of the "u-boot.bin" file) this _will_ have checksums included and checked.
The U-Boot code as stored in flash does compute or check a checksum.
If there is a function that checks the U-Boot CRC or checksum, could someone point it out to me?
You can use the CRC command to compute a checksum, and store it at location of your choice. Note however that with many board configu- rations this will not work (especially with those that use an embedded environment).
We burn the U-Boot code into a boot PROM and I need some way of verifying the boot PROM was burned correctly when the system powers up. I've written checksum generation and verification utilities in the past but would prefer to use the utilities that come with U-Boot if they exist.
You can use the existing CRC32 code in U-Boot for such a purpose, but be aware that you have a chicken-and-egg problem here. If you assume that the U-Boot image in the PROM is corrupted but still running god enough that you can do _anything_ with it - what makes you believe that it will calculate a valid checksum then? If the image is corrupted, it might be exactly the part of the code that does the checksum verification...
Best regards,
Wolfgang Denk