
Maybe you explain in more detail what you intend to do.
The target board is our SoM-5282M, http://www.emacinc.com/som/som5282em.htm which comes with U-Boot and uClinux installed on it. U-Boot has tftp capability and can access all the flash, and is fully capable of swapping out the OS image already. The uClinux build has MTD installed and can see all the external flash of the device, which is where the OS image is located. We want to add a feature to allow the module to reflash it's OS from the command line of uClinux through the MTD layer. Ideally, we would like to write the image through the MTD layer and then verify it by reading it back and making sure the image checksum matches a calculated one.
I don't see why "the flashing utility needs to calculate a checksum" - the uImage file already has two checksums, so no new calculation should be needed.
For verification during the writing process.
If you use the MTD layer as a blockdevice, you will probably have a file system there; then you can just use "cp" as "flashing utility" and "mkimage -l" to verify the checksums after writing.
If you use a character device, you can just use "cp" as "flashing utility" and "mkimage -l" to verify the checksums after writing; probably an additional step will be nedded to reead back the MTD character device in a file, making sure only the original amount of data is read back; a tiny shell script based on "ls" and "cut" and "dd" will do).
I have no idea what you could need special tools for.
It needs to be an easy to use utility (This utility could be a shell script) because we are not the ones using it, it's for the end customer, and further down the line, it's for the technicians in the field. A uClinux daemon that provided a port to do this would be even better.
I realize it's not that complicated an issue, and I could probably figure it out in an hour or two. But somebody's probably already done this, why not just ask?
This is really a question for both the uClinux and u-boot communities.
Actually this has nothing to do with uClinux, and very little with U-Boot.
It requires a small amount of knowlege of raw access to MTD, the format used by mkimage, and it would be nice to know I'm not reinventing the wheel. Therefore the original question was posted to the uClinux list (for MTD help) The U-Boot list (for information about the mkimage format) , and to Wildrice (general search for pre-generated scripts and utilities) I received several helpful responses. Thank you to everyone who has contributed.
NZG
And there never was an apple, in Adam's opinion, that wasn't worth the trouble you got into for eating it. -Neil Gaiman