[PATCH 02/10] Makefile: Enable CMD_ELF for SPL as well
keerthy
j-keerthy at ti.com
Fri Jan 10 11:40:59 CET 2020
On 1/10/2020 4:00 PM, Simon Goldschmidt wrote:
> On Fri, Jan 10, 2020 at 11:24 AM Keerthy <j-keerthy at ti.com> wrote:
>>
>> 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
>
> Unless I read it wrong, what you want is the elf parsing code, but not the
> commands?
Yes. We will not need commands in SPL.
>
> This patch and 2/10 look to me as it would be much cleaner to separate the upper
> half of this file into a different file that does not live in cmd/.
Any specific place you recommend? Something under lib?
>
> Regards,
> Simon
>
>> /*
>> * 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