On Mon, May 27, 2013 at 10:51:46AM +1200, Chris Packham wrote: > From: Chris Packham <chris.pack...@alliedtelesis.co.nz> > > Instead of assuming that SYS_TEXT_BASE is 0xFFF80000 calculate the initial > pbl command offset by subtracting the image size from the top of the > 24-bit address range. Also increase the size of the memory buffer to > accommodate a larger output image. > > Signed-off-by: Chris Packham <chris.pack...@alliedtelesis.co.nz>
I've applied this (thanks), but I'll note it had a warning about unused variable "size". Because it was unused. Please build-test any patches, and ensure they are free of warnings. > + * The PBL can load up to 64 bytes at a time, so we split the U-Boot > + * image into 64 byte chunks. PBL needs a command for each piece, of > + * the form "81xxxxxx", where "xxxxxx" is the offset. Calculate the > + * start offset by subtracting the size of the u-boot image from the > + * top of the allowable 24-bit range. > + */ > +static void init_next_pbl_cmd(FILE *fp_uboot) > +{ > + struct stat st; > + int fd = fileno(fp_uboot); > + size_t size; This was the variable, for future reference. > + > + if (fstat(fd, &st) == -1) { > + printf("Error: Could not determine u-boot image size. %s\n", > + strerror(errno)); > + exit(EXIT_FAILURE); > + } > + > + next_pbl_cmd = 0x82000000 - st.st_size; > +} Andy _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot