From patchwork Fri Jan 10 10:23:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "J, KEERTHY" X-Patchwork-Id: 239382 List-Id: U-Boot discussion From: j-keerthy at ti.com (Keerthy) Date: Fri, 10 Jan 2020 15:53:25 +0530 Subject: [PATCH 02/10] Makefile: Enable CMD_ELF for SPL as well In-Reply-To: <20200110102333.22767-1-j-keerthy@ti.com> References: <20200110102333.22767-1-j-keerthy@ti.com> Message-ID: <20200110102333.22767-3-j-keerthy@ti.com> Enable CMD_ELF for SPL as well. While at it stub out code not relevant for SPL. Signed-off-by: Keerthy --- cmd/Makefile | 2 +- cmd/elf.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/Makefile b/cmd/Makefile index 8df39f3a19..95bb87c6db 100644 --- a/cmd/Makefile +++ b/cmd/Makefile @@ -53,7 +53,6 @@ obj-$(CONFIG_ENV_IS_IN_EEPROM) += eeprom.o obj-$(CONFIG_CMD_EEPROM) += eeprom.o obj-$(CONFIG_EFI_STUB) += efi.o obj-$(CONFIG_CMD_EFIDEBUG) += efidebug.o -obj-$(CONFIG_CMD_ELF) += elf.o obj-$(CONFIG_HUSH_PARSER) += exit.o obj-$(CONFIG_CMD_EXT4) += ext4.o obj-$(CONFIG_CMD_EXT2) += ext2.o @@ -187,6 +186,7 @@ endif # !CONFIG_SPL_BUILD # core command obj-y += nvedit.o +obj-$(CONFIG_CMD_ELF) += elf.o obj-$(CONFIG_TI_COMMON_CMD_OPTIONS) += ti/ filechk_data_gz = (echo "static const char data_gz[] ="; cat $< | scripts/bin2c; echo ";") diff --git a/cmd/elf.c b/cmd/elf.c index ea76fb42aa..8b3889f134 100644 --- a/cmd/elf.c +++ b/cmd/elf.c @@ -322,6 +322,7 @@ int do_bootelf(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return rcode; } +#ifndef CONFIG_SPL_BUILD /* * Interpreter command to boot VxWorks from a memory image. The image can * be either an ELF image or a raw binary. Will attempt to setup the @@ -542,3 +543,4 @@ U_BOOT_CMD( "Boot vxWorks from an ELF image", " [address] - load address of vxWorks ELF image." ); +#endif