Steve Underwood wrote:
> 
> Garst R. Reese wrote:
> 
> >Hi folks,
> >I'm trying to put a 2 file romfs on an mmc. The first 512 bytes contain
> >the superblock (32 bytes), the first file header (32 bytes) a 416 byte
> >ID file, and the second file header (32 bytes). The remainder of the mmc
> >contains the data file. But no matter what I do, linux says I have a bad
> >checksum :(
> >If someone has succeed in doing this, please clue this dummy in.
> >
> >
> May the source be with you, always :-)
> 
> Can't you find the sumcheck code in Linux and compare it with yours?

Yes, the sumcheck in linux/fs/romfs/inode.c where it expects the the
result of romfs_checksum(x) to be 0. In genromfs.c it uses
-romfs_checksum(x) to set the checksum. That makes sense, but scattered
in the code are htonl's and ntohl's, these functions either do nothing,
or a 32bit byte swap, depending on endianess. I've tried every
combination of byte-swapping or not that I can think, and it still tells
me I have a bad checksum. I also looked at the affs sources. I'm still
stumped. There are endian issues both with the MMC and the msp430.

I'll keep digging.
Thanks,
  Garst
> 
> Regards,
> Steve
> 
> -------------------------------------------------------
> SF.Net is sponsored by: Speed Start Your Linux Apps Now.
> Build and deploy apps & Web services for Linux with
> a free DVD software kit from IBM. Click Now!
> http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
> _______________________________________________
> Mspgcc-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Reply via email to