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.