This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Bug in crc32 routine?
- From: Andrew Lunn <andrew dot lunn at ascom dot ch>
- To: Roland Caßebohm <roland dot cassebohm at visionsystems dot de>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Thu, 10 Oct 2002 17:06:50 +0200
- Subject: [ECOS] Re: Bug in crc32 routine?
- References: <200210101454.g9AEsTE32032@hhlx01.visionsystems.de>
Hi Roland
The crc32 routine came originally from RedBoot. Gary will correct me
if im wrong, but i don't think it was supposed to be compatible with
anything in particular. Gary just wanted a CRC for the flash
contents. Thats they only place its used. I thought the crc functions
are useful all general, so made a package out of them.
If you want a CRC function that is compatible to something, use
cyg_posix_crc32(). I have tested that and proved (on little endian at
least) that it produces the same result as what the posix standard
says.
Changing this function would not be nice. New Redboot would compile
about false checksums, when strictly they are not.
What we could do is add a new crc32, which is compatible to zlib's
crc. This would be easy and not cause any backward compatibility
problems. Does the zlib CRC function have an official name, or
reference a standard? We can use that for a basis for the function
name.
Andrew
On Thu, Oct 10, 2002 at 04:54:28PM +0200, Roland Ca?ebohm wrote:
> I think in the crc23 routine in the crc package is a bug.
> If I use under linux the crc32 routine of the zlib I get not the same result
> as the one of eCos.
> I have seen, that in the Samsung KS32C5000 ethernet driver is a crc32 routin
> too and it differs from the one off the crc package. After changing this
> routine like the one off the ethernet driver, I get the same result right.
> As an attachment I send the patch.
>
> Best regards
>
> Roland Caßebohm
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss