From: NZG <ngustavson@emacinc.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Accessing mkimage checksum
Date: Thu, 27 Apr 2006 09:00:14 -0500 [thread overview]
Message-ID: <200604270900.14579.ngustavson@emacinc.com> (raw)
In-Reply-To: <20060426201415.427F9353AC4@atlas.denx.de>
> 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
next prev parent reply other threads:[~2006-04-27 14:00 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-26 15:10 [U-Boot-Users] Accessing mkimage checksum NZG
2006-04-26 16:06 ` Wolfgang Denk
2006-04-26 16:11 ` NZG
2006-04-26 19:11 ` Wolfgang Denk
2006-04-26 19:20 ` NZG
2006-04-26 19:26 ` Wolfgang Denk
2006-04-26 20:02 ` NZG
2006-04-26 20:14 ` Wolfgang Denk
2006-04-26 21:16 ` Tolunay Orkun
2006-04-26 22:33 ` Wolfgang Denk
2006-04-26 23:41 ` Tolunay Orkun
2006-04-27 7:26 ` Wolfgang Denk
2006-04-27 14:00 ` NZG [this message]
2006-04-27 14:58 ` Wolfgang Denk
2006-04-27 15:48 ` NZG
2006-04-28 3:45 ` Sam Song
2006-04-28 6:45 ` Wolfgang Denk
2006-04-28 7:07 ` Sam Song
2006-04-28 7:38 ` Wolfgang Denk
2006-04-28 15:53 ` Tolunay Orkun
2006-04-28 19:23 ` Wolfgang Denk
2006-04-29 1:22 ` Sam Song
[not found] <20060428080933.11288.qmail@web15903.mail.cnb.yahoo.com>
2006-04-28 9:54 ` Wolfgang Denk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200604270900.14579.ngustavson@emacinc.com \
--to=ngustavson@emacinc.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox