diff options
Diffstat (limited to 'common/image.c')
-rw-r--r-- | common/image.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/common/image.c b/common/image.c index 1d7543dd18..12102ab768 100644 --- a/common/image.c +++ b/common/image.c @@ -29,7 +29,7 @@ #include <image.h> #include <mapmem.h> -#if defined(CONFIG_FIT) || defined(CONFIG_OF_LIBFDT) +#if IMAGE_ENABLE_FIT || defined(CONFIG_OF_LIBFDT) #include <libfdt.h> #include <fdt_support.h> #endif @@ -707,7 +707,7 @@ ulong genimg_get_kernel_addr_fit(char * const img_addr, kernel_addr = load_addr; debug("* kernel: default image load address = 0x%08lx\n", load_addr); -#if defined(CONFIG_FIT) +#if CONFIG_IS_ENABLED(FIT) } else if (fit_parse_conf(img_addr, load_addr, &kernel_addr, fit_uname_config)) { debug("* kernel: config '%s' from image at 0x%08lx\n", @@ -762,7 +762,7 @@ int genimg_get_format(const void *img_addr) if (image_check_magic(hdr)) return IMAGE_FORMAT_LEGACY; #endif -#if defined(CONFIG_FIT) || defined(CONFIG_OF_LIBFDT) +#if IMAGE_ENABLE_FIT || defined(CONFIG_OF_LIBFDT) if (fdt_check_header(img_addr) == 0) return IMAGE_FORMAT_FIT; #endif @@ -799,7 +799,7 @@ ulong genimg_get_image(ulong img_addr) /* get header size */ h_size = image_get_header_size(); -#if defined(CONFIG_FIT) +#if IMAGE_ENABLE_FIT if (sizeof(struct fdt_header) > h_size) h_size = sizeof(struct fdt_header); #endif @@ -821,7 +821,7 @@ ulong genimg_get_image(ulong img_addr) ram_addr, d_size); break; #endif -#if defined(CONFIG_FIT) +#if IMAGE_ENABLE_FIT case IMAGE_FORMAT_FIT: d_size = fit_get_size(buf) - h_size; debug(" FIT/FDT format image found at 0x%08lx, " @@ -862,7 +862,7 @@ ulong genimg_get_image(ulong img_addr) */ int genimg_has_config(bootm_headers_t *images) { -#if defined(CONFIG_FIT) +#if IMAGE_ENABLE_FIT if (images->fit_uname_cfg) return 1; #endif @@ -903,7 +903,7 @@ int boot_get_ramdisk(int argc, char * const argv[], bootm_headers_t *images, #ifdef CONFIG_SUPPORT_RAW_INITRD char *end; #endif -#if defined(CONFIG_FIT) +#if IMAGE_ENABLE_FIT const char *fit_uname_config = images->fit_uname_cfg; const char *fit_uname_ramdisk = NULL; ulong default_addr; @@ -934,7 +934,7 @@ int boot_get_ramdisk(int argc, char * const argv[], bootm_headers_t *images, debug("## Skipping init Ramdisk\n"); rd_len = rd_data = 0; } else if (select || genimg_has_config(images)) { -#if defined(CONFIG_FIT) +#if IMAGE_ENABLE_FIT if (select) { /* * If the init ramdisk comes from the FIT image and @@ -965,7 +965,7 @@ int boot_get_ramdisk(int argc, char * const argv[], bootm_headers_t *images, "0x%08lx\n", rd_addr); } -#if defined(CONFIG_FIT) +#if IMAGE_ENABLE_FIT } else { /* use FIT configuration provided in first bootm * command argument. If the property is not defined, @@ -1008,7 +1008,7 @@ int boot_get_ramdisk(int argc, char * const argv[], bootm_headers_t *images, rd_load = image_get_load(rd_hdr); break; #endif -#if defined(CONFIG_FIT) +#if IMAGE_ENABLE_FIT case IMAGE_FORMAT_FIT: rd_noffset = fit_image_load(images, rd_addr, &fit_uname_ramdisk, @@ -1184,14 +1184,14 @@ error: int boot_get_setup(bootm_headers_t *images, uint8_t arch, ulong *setup_start, ulong *setup_len) { -#if defined(CONFIG_FIT) +#if IMAGE_ENABLE_FIT return boot_get_setup_fit(images, arch, setup_start, setup_len); #else return -ENOENT; #endif } -#if defined(CONFIG_FIT) +#if IMAGE_ENABLE_FIT int boot_get_loadable(int argc, char * const argv[], bootm_headers_t *images, uint8_t arch, const ulong *ld_start, ulong * const ld_len) { |