This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: 32 bit flash checksums
- From: Andrew Lunn <andrew at lunn dot ch>
- To: Adam Yergovich <ayergo at jkmicro dot com>
- Cc: eCos Discussion <ecos-discuss at ecos dot sourceware dot org>
- Date: Sat, 7 Jan 2006 09:38:04 +0100
- Subject: Re: [ECOS] 32 bit flash checksums
- References: <43BF198F.7070903@jkmicro.com>
On Fri, Jan 06, 2006 at 05:29:51PM -0800, Adam Yergovich wrote:
> Hello all,
>
> Long time reader, first time poster. Redboot is a great little program
> and i've been enjoying it immensely.
>
> I'm currently looking at accessing the redboot partitions from within
> Linux, which is in itself none too difficult with the mtd tools. In
> order for Redboot to "like" any changed image though, it has to have a
> proper checksum or key at the end. It looks to me like the last 32 bits
> of the image partition (say "redbootconfig") make up this magic number
> that is needed to ensure validity. I looked through the source code,
> but i am still unsure of the algorithm used to generate this checksum.
> Anyone know what algorithm is used?
It uses cyg_crc32(). You can find the implementation in
packages/services/crc/current/src/crc32.c.
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss