[U-Boot] [PATCH 3/3] spl: dfu: reduce spl-dfu MLO size

Tom Rini trini at konsulko.com
Wed May 3 12:42:15 UTC 2017


On Wed, May 03, 2017 at 08:36:31AM +0000, B, Ravi wrote:
> Tom
> 
> >>> 
> >>> Yes you are correct. 
> >>> But what is happening here is, the CONFIG_DFU_<MMC/NAND/SF/TFTP> selected through Kconfig/Menuconfig is applicable for both SPL and U-Boot.
> >>> Hence CONFIG_DFU_MMC/NA
> >ND/SF gets compiled for SPL as well, which needs run_command(). Actually CONFIG_DFU_MMC/NAND/etc is not scoped for SPL-DFU.
> >>> As we have aligned, not to increase the SPL size, user shall use SPL-DFU feature to boot to u-boot, then utilize the full featured DFU to flash MMC/NAND/SF.
> >>> 
> >>> I get undefined reference to common function run_command(),  "dfu_fill_entitiy_<mmc/nand/sf>" in driver/dfu/dfu.c. 
> >>> The dfu.c is common for both SPL-DFU and U-boot.
> 
> >>OK.  I think we need to introduce SPL_DFU_xxx Kconfig options, and use
> >>CONFIG_IS_ENABLED(DFU_xxx) so that we will get things enabled/disabled (and discarded) as needed.
> 
> >Ok, will do.
> 
> Correct me if I am wrong, I need understand if we introduce say
> SPL_DFU_MMC Kconfig options, then whether need to support DFU_MMC in
> SPL ?
> Again this will increase the SPL-size, and also DFU_MMC uses
> run_command() again, there is dependency of cli.c, hush etc. 

SPL_DFU_MMC will only increase the size of SPL if it's enabled.  Being
able to switch to testing with CONFIG_IS_ENABLED(DFU_xxx) means that
we'll be able to keep the space savings while also not making various
parts of the code harder to read with more #ifdef tests.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170503/f66352f4/attachment.sig>


More information about the U-Boot mailing list