[E3-hacking] Trying to load u-boot from NAND.

Jonathan McDowell noodles at earth.li
Wed Apr 26 16:19:14 BST 2006


On Tue, Apr 25, 2006 at 10:53:19PM +0100, David Given wrote:
> Jonathan McDowell wrote:
> [...]
> > Leading to the following output from a freshly powered on E3:
> Hurrah! This is great news; it means that sometime soon I should
> finally be able to get rid of the serial cable...

Unfortunately I'm now stuck at the point where I can turn on the E3,
have PBL load !LDR from NAND, !LDR load u-boot from NAND, u-boot load
the kernel from NAND, the kernel does its uncompression, then hangs.
Whereas if I load the same !LDR image to PBL over the serial port
loading everything else from NAND works fine. So I need to track down
what PBL twiddles when loading something from NAND that's breaking it
all.

> Just out of interest, what did you use to bless the PBL image you
> uploaded?  The code I've currently got in pblq uses a brute-force
> method to calculate the checksum of simply trying every possible value
> in turn until the checksum succeeds, which is highly unsatisfactory.
> I'm looking for a better algorithm.

My code is roughly:

u8 i, j;
int curchar;
int len;

curchar = fgetc(stdin);
len = 0;
while (curchar != EOF) {
	i += curchar;
	i = i & 0xFF;
	j += i;
	j = j & 0xFF;
}
printf("Fixup bytes for offset 6 = 0x%02X, 7 = 0x%02X\n,
		(-j + (len - 7) * i) & 0xFF,
		(j - (len - 6) * i) & 0xFF);

J.

-- 
 "Tax free porn, man. Think about  |  .''`.  Debian GNU/Linux Developer
   it." -- Jasper Janssen, asr.    | : :' :  Happy to accept PGP signed
                                   | `. `'   or encrypted mail - RSA +
                                   |   `-    DSA keys on the keyservers.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://www.earth.li/pipermail/e3-hacking/attachments/20060426/f073ff69/attachment.pgp


More information about the e3-hacking mailing list