Merge tag 'xilinx-for-v2018.01-rc2-v2' of git://www.denx.de/git/u-boot-microblaze

Xilinx changes for v2018.01-rc2-v2

fpga:
- Enable loading bitstream via fit image for !xilinx platforms

zynq:
- Fix SPL SD boot mode

zynqmp:
- Not not reset in panic
- Do not use simple allocator because of fat changes
- Various dt chagnes
- modeboot variable setup
- Fix fpga loading on automotive devices
- Fix coverity issues

test:
- Fix env test for !hush case - Stephen's patch
This commit is contained in:
Tom Rini
2017-12-18 12:23:27 -05:00
44 changed files with 212 additions and 81 deletions

View File

@@ -245,16 +245,38 @@ static int zynqmpimage_check_image_types(uint8_t type)
return EXIT_FAILURE;
}
static int fsize(FILE *fp)
static uint32_t fsize(FILE *fp)
{
int size;
int origin = ftell(fp);
int size, ret, origin;
origin = ftell(fp);
if (origin < 0) {
fprintf(stderr, "Incorrect file size\n");
fclose(fp);
exit(2);
}
ret = fseek(fp, 0L, SEEK_END);
if (ret) {
fprintf(stderr, "Incorrect file SEEK_END\n");
fclose(fp);
exit(3);
}
fseek(fp, 0L, SEEK_END);
size = ftell(fp);
if (size < 0) {
fprintf(stderr, "Incorrect file size\n");
fclose(fp);
exit(4);
}
/* going back */
fseek(fp, origin, SEEK_SET);
ret = fseek(fp, origin, SEEK_SET);
if (ret) {
fprintf(stderr, "Incorrect file SEEK_SET to %d\n", origin);
fclose(fp);
exit(3);
}
return size;
}