[PATCH 02/10] Makefile: Enable CMD_ELF for SPL as well

Keerthy j-keerthy at ti.com
Fri Jan 10 11:23:25 CET 2020


Enable CMD_ELF for SPL as well. While at it stub out
code not relevant for SPL.

Signed-off-by: Keerthy <j-keerthy at ti.com>
---
 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
-- 
2.17.1



More information about the U-Boot mailing list