Create update.bin if missing

This will allow l4t/Android to always use latest hekate in case of old r2p.
This commit is contained in:
CTCaer 2020-10-20 10:34:33 +03:00
parent 27b1f0e843
commit 9d1c0ce308

View file

@ -293,8 +293,15 @@ void auto_launch_update()
EMC(EMC_SCRATCH0) &= ~EMC_HEKA_UPD;
else if (sd_mount())
{
// Check if update.bin exists and is newer and launch it. Otherwise create it.
if (!f_stat("bootloader/update.bin", NULL))
launch_payload("bootloader/update.bin", true);
else
{
u8 *buf = calloc(0x200, 1);
is_ipl_updated(buf, "bootloader/update.bin", false);
free(buf);
}
}
}