[U-Boot] [RFC PATCH v2 1/5] spl: dfu: add dfu support in SPL

B, Ravi ravibabu at ti.com
Wed Jul 27 16:04:24 CEST 2016


Hi Tom

Missed this thread to reply.

>> index ef12f9f..ed3e295 100644
>> --- a/Kconfig
>> +++ b/Kconfig
>> @@ -336,6 +336,33 @@ config SPL_FIT_IMAGE_POST_PROCESS
>>  	  injected into the FIT creation (i.e. the blobs would have been pre-
>>  	  processed before being added to the FIT image).
>>  
>> +config SPL_DFU_SUPPORT
>> +	bool "Enable SPL with DFU to load binaries to memory device"
>> +	depends on USB && TARGET_DRA7XX_EVM

>This seems needlessly restrictive.

Yes, I do agree, at present only dra7x platform  support BOOT_DEVICE_DFU.
if we make it generic, then other platform should also enable the SPL-DFU
support for their respective platform (similar to [RFC PATCH v2 5/5] dra7x: configs: enable SPL-DFU support).

>> diff --git a/common/command.c b/common/command.c index 
>> e5d9b9c..d1c049c 100644
>> --- a/common/command.c
>> +++ b/common/command.c
>> @@ -520,7 +520,7 @@ enum command_ret_t cmd_process(int flag, int argc, char * const argv[],
>>  	if (argc > cmdtp->maxargs)
>>  		rc = CMD_RET_USAGE;
>>  
>> -#if defined(CONFIG_CMD_BOOTD)
>> +#if defined(CONFIG_CMD_BOOTD) && !defined(CONFIG_SPL_BUILD)
>>  	/* avoid "bootd" recursion */ Check whether they use DMA or PIO mode.

>>  	else if (cmdtp->cmd == do_bootd) {
>>  		if (flag & CMD_FLAG_BOOTD) {

>Why do we need this?

Actually CONFIG_CMD_BOOTD is not required for SPL-DFU. 
But cmd/Kconfg has defined CONFIG_CMD_BOOTD by default, which is causing compilation error for "do_bootd" not defined.
Again do_bootd depends on CONFIG_CMD_BOOTM which is not defined for SPL.

What is best way? What do you suggest ?

Regards
Ravi


More information about the U-Boot mailing list