From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lukasz Majewski Date: Wed, 3 May 2017 22:53:46 +0200 Subject: [U-Boot] [PATCH 3/3] spl: dfu: reduce spl-dfu MLO size In-Reply-To: <6C6B28D4DC342643927BEAFCE8707BF6C0B7636A@DBDE04.ent.ti.com> References: <1493212449-26863-1-git-send-email-ravibabu@ti.com> <1493212449-26863-4-git-send-email-ravibabu@ti.com> <20170426133556.GX12511@bill-the-cat> <6C6B28D4DC342643927BEAFCE8707BF6C0B6E052@DBDE04.ent.ti.com> <20170427123129.GP12511@bill-the-cat> <6C6B28D4DC342643927BEAFCE8707BF6C0B75B5C@DBDE04.ent.ti.com> <20170503124215.GS12511@bill-the-cat> <6C6B28D4DC342643927BEAFCE8707BF6C0B7636A@DBDE04.ent.ti.com> Message-ID: <20170503225346.259996e5@jawa> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, 3 May 2017 12:45:10 +0000 "B, Ravi" wrote: > Hi Tom > > >> > >> >>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. > > Ok, since SPL_DFU_MMC will be added in Kconfig, if SPL_DFU_MMC is > selected it will increase the SPL size, it means SPL_DFU_MMC > dependency code shall be included (like cli,c, hush etc). When > SPL_DFU_MMC is not selected then automatically SPL size will be > reduced. My impression here is that CONFIG_IS_ENABLED() will help us to make the code looking better and document changes by Kconfig variables. And to be honest - I do not feel like adding hush to SPL is a good conceptual solution. > > Thanks. > > Regards > Ravi Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de