diff --git a/u-boot/common/cmd_bootcycle.c b/u-boot/common/cmd_bootcycle.c index 6c040eb245..09feba682a 100644 --- a/u-boot/common/cmd_bootcycle.c +++ b/u-boot/common/cmd_bootcycle.c @@ -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)