1
0
mirror of https://github.com/DigitalDevices/dddvb.git synced 2023-10-10 13:37:43 +02:00

Fixed updating of a preloaded GTL version

This commit is contained in:
mvoelkel 2017-02-24 20:11:30 +01:00
parent 9dcd81fe42
commit adf4e40256

View File

@ -617,17 +617,20 @@ static int update_flash(struct ddflash *ddf)
if ((res = update_image(ddf, "/boot/fpga.img", 0x10000, 0xa0000, 1, 0)) == 1) if ((res = update_image(ddf, "/boot/fpga.img", 0x10000, 0xa0000, 1, 0)) == 1)
stat |= 1; stat |= 1;
} else { } else {
if ((res = update_image(ddf, "/config/fpga.img", 0x10000, 0xa0000, 1, 1)) == 1) if (ddf->id.device == 0x0307) {
stat |= 1; if (res == -1)
if (res == -1) if ((res = update_image(ddf, "/config/fpga_gtl.img", 0x10000, 0xa0000, 1, 1)) == 1)
if ((res = update_image(ddf, "/boot/fpga.img", 0x10000, 0xa0000, 1, 1)) == 1) stat |= 1;
stat |= 1; if (res == -1)
if (res == -1) if ((res = update_image(ddf, "/boot/fpga_gtl.img", 0x10000, 0xa0000, 1, 1)) == 1)
if ((res = update_image(ddf, "/config/fpga_gtl.img", 0x10000, 0xa0000, 1, 1)) == 1) stat |= 1;
stat |= 1; } else {
if (res == -1) if ((res = update_image(ddf, "/config/fpga.img", 0x10000, 0xa0000, 1, 1)) == 1)
if ((res = update_image(ddf, "/boot/fpga_gtl.img", 0x10000, 0xa0000, 1, 1)) == 1)
stat |= 1; stat |= 1;
if (res == -1)
if ((res = update_image(ddf, "/boot/fpga.img", 0x10000, 0xa0000, 1, 1)) == 1)
stat |= 1;
}
} }
#if 1 #if 1
if ( (stat&1) && (ddf->id.hw & 0xffffff) <= 0x010001) { if ( (stat&1) && (ddf->id.hw & 0xffffff) <= 0x010001) {