diff --git a/arch/arm/include/asm/config.h b/arch/arm/include/asm/config.h index 435fc4521c..b0ae440b3f 100644 --- a/arch/arm/include/asm/config.h +++ b/arch/arm/include/asm/config.h @@ -8,7 +8,9 @@ #define _ASM_CONFIG_H_ #define CONFIG_LMB +#ifndef CONFIG_DISABLE_RAMDISK #define CONFIG_SYS_BOOT_RAMDISK_HIGH +#endif #ifdef CONFIG_ARM64 #define CONFIG_PHYS_64BIT diff --git a/common/bootm.c b/common/bootm.c index 2e706680e7..282a4f3175 100644 --- a/common/bootm.c +++ b/common/bootm.c @@ -234,7 +234,7 @@ static int bootm_find_os(cmd_tbl_t *cmdtp, int flag, int argc, int bootm_find_images(int flag, int argc, char * const argv[]) { int ret; - +#ifndef CONFIG_DISABLE_RAMDISK /* find ramdisk */ ret = boot_get_ramdisk(argc, argv, &images, IH_INITRD_ARCH, &images.rd_start, &images.rd_end); @@ -242,6 +242,7 @@ int bootm_find_images(int flag, int argc, char * const argv[]) puts("Ramdisk image is corrupt or invalid\n"); return 1; } +#endif #if defined(CONFIG_OF_LIBFDT) /* find flattened device tree */ diff --git a/common/image.c b/common/image.c index e20a15c9b3..0e554d74ce 100644 --- a/common/image.c +++ b/common/image.c @@ -46,9 +46,11 @@ extern int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); DECLARE_GLOBAL_DATA_PTR; #if defined(CONFIG_IMAGE_FORMAT_LEGACY) +#ifndef CONFIG_DISABLE_RAMDISK static const image_header_t *image_get_ramdisk(ulong rd_addr, uint8_t arch, int verify); #endif +#endif #else #include "mkimage.h" #include @@ -351,6 +353,7 @@ void image_print_contents(const void *ptr) #ifndef USE_HOSTCC #if defined(CONFIG_IMAGE_FORMAT_LEGACY) +#ifndef CONFIG_DISABLE_RAMDISK /** * image_get_ramdisk - get and verify ramdisk image * @rd_addr: ramdisk image start address @@ -413,6 +416,7 @@ static const image_header_t *image_get_ramdisk(ulong rd_addr, uint8_t arch, return rd_hdr; } #endif +#endif #endif /* !USE_HOSTCC */ /*****************************************************************************/ @@ -866,6 +870,7 @@ int genimg_has_config(bootm_headers_t *images) return 0; } +#ifndef CONFIG_DISABLE_RAMDISK /** * boot_get_ramdisk - main ramdisk handling routine * @argc: command argument count @@ -1077,6 +1082,7 @@ int boot_get_ramdisk(int argc, char * const argv[], bootm_headers_t *images, return 0; } +#endif #ifdef CONFIG_SYS_BOOT_RAMDISK_HIGH /** diff --git a/include/configs/ipq5332.h b/include/configs/ipq5332.h index d3660f614d..c899ab5013 100644 --- a/include/configs/ipq5332.h +++ b/include/configs/ipq5332.h @@ -457,6 +457,7 @@ extern loff_t board_env_size; #define CONFIG_DISABLE_CMD_UART #define CONFIG_DISABLE_KERNEL64 #define CONFIG_CMD_DISABLE_EXECTZT +#define CONFIG_DISABLE_RAMDISK #else #define CONFIG_IPQ_ELF_AUTH #endif