pancake
Mon, 19 Nov 2007 19:24:46 -0800
I have imported your patches into the repository: http://news.nopcode.org/miau/pvc.cgi?prj=0xFFFF&leaf=3eb71906
Thanks. I have been using gcc3 and looks that it's not very good catching
stupid bugs like these ones. Now I'll use -pedantic -std=c99 :P
On Mon, 19 Nov 2007 17:49:07 -0300
"Osvaldo Santana Neto" <[EMAIL PROTECTED]> wrote:
>
> > FIASCO is not a good format for firmwares, checksumming is poor,
> > extensibility is limited to the flasher tool and it's proprietary,
>
> Yes, I agree with you. BTW, what algorithm is used for checksumming the
> pieces?
It's a xorpair on the whole piece. This is in C:
unsigned short do_hash(usho *b, int len)
{
usho result = 0;
for(len>>=1;len--;b=b+1)
result^=b[0];
return result;
}
(...)
do { ret = fread(&buf, 1, BSIZE, fd);
if (ret == -1)
return 0;
hash ^= do_hash((usho *)&buf, ret);
} while(ret);
(...)
This is extracted from src/hash.c, you can calculate this by using 0xFFFF or
hasher (from radare (from radare.nopcode.org)):
$ 0xFFFF -H rootfs.jffs2
$ hasher -qv -a xorpair -f rootfs.jffs2
> > I'm looking forward for testing Mamona asap, it looks like an
> > interesting project with great advantages in front of the current
> > official one.
>
> Yes and you are already contributing with us :)
>
> I've forgot to tell you that I create a patch to compile 0xFFFF with
> gcc-4.1. The build is breaking with this version of GCC (Rodrigo Vivi
> is talking with you about this and I'm CCing him). I don't know if the
> patches really fix the problem and I dindn't make extensive tests with
> it.
Thanks for your patches. I have submitted an initial patch to Rodrigo
few hours ago, and now the head of the version control is fixed too:
http://news.nopcode.org/pvcroot/0xFFFF-0.3.1.tar.gz
I will replace the 0.3 with this one after some more testing.
--pancake
_______________________________________________
0xffff mailing list
0xffff@lists.nopcode.org
https://lists.nopcode.org/mailman/listinfo/0xffff