From: Stefan Agner Date: Fri, 11 Nov 2016 14:18:16 -0800 Subject: [U-Boot] [PATCH 1/3] spl: add RAM boot device only if it is actually defined In-Reply-To: <20161111221849.9260-1-stefan@agner.ch> References: <20161111221849.9260-1-stefan@agner.ch> Message-ID: <20161111221849.9260-2-stefan@agner.ch> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: Stefan Agner Some devices (e.g. dra7xx) support loading to RAM using DFU without having direct boot from RAM support. Make sure the linker list does not contain BOOT_DEVICE_RAM if CONFIG_SPL_RAM_SUPPORT is not enabled. Fixes: 98136b2f26fa ("spl: Convert spl_ram_load_image() to use linker list") Signed-off-by: Stefan Agner --- common/spl/spl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/spl/spl.c b/common/spl/spl.c index bdb165a..63e8215 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -220,7 +220,9 @@ static int spl_ram_load_image(struct spl_image_info *spl_image, return 0; } +#if defined(CONFIG_SPL_RAM_SUPPORT) SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_RAM, spl_ram_load_image); +#endif #if defined(CONFIG_SPL_DFU_SUPPORT) SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_DFU, spl_ram_load_image); #endif -- 2.10.2