Merge branch '2019-10-28-azure-ci-support'
[oweals/u-boot.git] / cmd / nand.c
index a22945d144b32b9a8f37f734b837ffb34ab81629..27efef20bc95c0962a62c473521b9cb861fd2166 100644 (file)
@@ -23,6 +23,7 @@
 #include <linux/mtd/mtd.h>
 #include <command.h>
 #include <console.h>
+#include <env.h>
 #include <watchdog.h>
 #include <malloc.h>
 #include <asm/byteorder.h>
@@ -846,7 +847,7 @@ static int nand_load_image(cmd_tbl_t *cmdtp, struct mtd_info *mtd,
        int r;
        char *s;
        size_t cnt;
-#if defined(CONFIG_IMAGE_FORMAT_LEGACY)
+#if defined(CONFIG_LEGACY_IMAGE_FORMAT)
        image_header_t *hdr;
 #endif
 #if defined(CONFIG_FIT)
@@ -874,7 +875,7 @@ static int nand_load_image(cmd_tbl_t *cmdtp, struct mtd_info *mtd,
        bootstage_mark(BOOTSTAGE_ID_NAND_HDR_READ);
 
        switch (genimg_get_format ((void *)addr)) {
-#if defined(CONFIG_IMAGE_FORMAT_LEGACY)
+#if defined(CONFIG_LEGACY_IMAGE_FORMAT)
        case IMAGE_FORMAT_LEGACY:
                hdr = (image_header_t *)addr;