cmd_bootcycle: initcycle will now set a valid crc

This commit is contained in:
Alexander Couzens 2015-03-04 22:03:45 +01:00
parent f63f863c85
commit 6ea75b8c9c
1 changed files with 4 additions and 3 deletions

View File

@ -60,9 +60,10 @@ static int valid_boot_cycle(struct sram_boot_cycle *sram)
static void init_boot_cycle(struct sram_boot_cycle *sram)
{
sram->magic = BOOT_CYCLE_MAGIC;
sram->version = BOOT_CYCLE_VERSION;
sram->counter = 0;
sram->magic = BOOT_CYCLE_MAGIC;
sram->version = BOOT_CYCLE_VERSION;
sram->counter = 0;
sram->crc = (uint32_t) crc32(0xdeadbeef, (void *)sram, sizeof(*sram) - 4);
}
void increase_boot_cycle(struct sram_boot_cycle *sram)