cmd_bootcycle: initcycle will now set a valid crc
This commit is contained in:
parent
f63f863c85
commit
6ea75b8c9c
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue