Cisco Flash help needed


I'm writing some software which will allow me to read and write the PCMCIA
flash cards from Ciscos on a linux laptop. I have got reading working fine
for Class A (Cisco 7x00 and Cisco 12000) and Class B (Cisco 2600/3600)
cards, and am just about to move onto being able to write to the cards.
I've worked out the format of the flash filesystem with no problems, and
am confident that I'll be able to write new files to the filesystem, apart
from one bit - the CRC

I've come across 2 CRCs so far - a 32 bit one used on the Class A cards,
and a 16 bit one used on the Class B cards. I've tried a standard crc32
routine (stolen from ssh), but it doesn't match the CRC reported by the
router. Is there anyone good at understanding CRC routines who can help me
reverse-engineer the cisco CRC, or perhaps does someone have some inside
information they would like to share?

Secondly, I'd like to test my code against a wider range of cisco flash
formats. I've got access to 1600/2600/3600/7200/12000/LS1010. If you've
got a linux laptop with pcmcia support, and access to a cisco router not
in that list, would you mind sending me a dump of your flash card? You can
make an image of the flash card thus:

$ dd if=/dev/mem0c of=/some/where/ciscoflash.dmp bs=1048576 count=20
$ gzip /some/where/ciscoflash.dmp

(replace /dev/mem0c if necessary, and the =20 on the end is the size of
the card in MB)

If you're not happy with sending me your IOS image, tftp a couple of text
files onto a formatted flash card and use that. Please ask me first before
emailing, if the gzip'd image is more than a couple of meg!

Please don't ask me for the code yet! I'll let the list know when it's

Many thanks,