U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/3] spl: dfu: reduce spl-dfu MLO size
Date: Wed, 26 Apr 2017 09:35:56 -0400	[thread overview]
Message-ID: <20170426133556.GX12511@bill-the-cat> (raw)
In-Reply-To: <1493212449-26863-4-git-send-email-ravibabu@ti.com>

On Wed, Apr 26, 2017 at 06:44:09PM +0530, Ravi Babu wrote:

> Since spl-dfu does not dfu-reset, there is no need
> of run_command_cli, hence compiling out cli.c and
> cli_hush.c to reduce the spl-dfu memory foot print.
> 
> Signed-off-by: Ravi Babu <ravibabu@ti.com>
[snip]
> diff --git a/drivers/dfu/Makefile b/drivers/dfu/Makefile
> index 61f2b71..ef48f36 100644
> --- a/drivers/dfu/Makefile
> +++ b/drivers/dfu/Makefile
> @@ -6,8 +6,10 @@
>  #
>  
>  obj-$(CONFIG_USB_FUNCTION_DFU) += dfu.o
> +ifndef CONFIG_SPL_BUILD
>  obj-$(CONFIG_DFU_MMC) += dfu_mmc.o
>  obj-$(CONFIG_DFU_NAND) += dfu_nand.o
> -obj-$(CONFIG_DFU_RAM) += dfu_ram.o
>  obj-$(CONFIG_DFU_SF) += dfu_sf.o
>  obj-$(CONFIG_DFU_TFTP) += dfu_tftp.o
> +endif
> +obj-$(CONFIG_DFU_RAM) += dfu_ram.o

We should discard at link time the unreachable parts here in SPL, no?

> diff --git a/include/dfu.h b/include/dfu.h
> index f39d3f1..b53ae80 100644
> --- a/include/dfu.h
> +++ b/include/dfu.h
> @@ -203,7 +203,7 @@ static inline void dfu_set_defer_flush(struct dfu_entity *dfu)
>  int dfu_write_from_mem_addr(struct dfu_entity *dfu, void *buf, int size);
>  
>  /* Device specific */
> -#ifdef CONFIG_DFU_MMC
> +#if defined(CONFIG_DFU_MMC) && !defined(CONFIG_SPL_BUILD)

I don't like the initial condition we have here, adding the !SPL_BUILD
test makes this even worse, lets not do that.

-- 
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/20170426/0c1fef39/attachment.sig>

  reply	other threads:[~2017-04-26 13:35 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-26 13:14 [U-Boot] [PATCH 0/3] spl: dfu: misc fixes and reduce MLO foot print Ravi Babu
2017-04-26 13:14 ` [U-Boot] [PATCH 1/3] spl: Kconfig: dfu: spl-dfu depends on SPL_RAM_SUPPORT Ravi Babu
2017-04-26 13:36   ` Tom Rini
2017-04-26 13:14 ` [U-Boot] [PATCH 2/3] common: dfu: ignore reset for spl-dfu Ravi Babu
2017-04-26 13:40   ` Tom Rini
2017-04-26 15:58     ` B, Ravi
2017-04-26 16:24       ` Tom Rini
2017-04-26 16:25         ` B, Ravi
2017-04-27  8:06         ` Lukasz Majewski
2017-04-27  8:37           ` B, Ravi
2017-04-27  8:37           ` B, Ravi
2017-04-26 13:14 ` [U-Boot] [PATCH 3/3] spl: dfu: reduce spl-dfu MLO size Ravi Babu
2017-04-26 13:35   ` Tom Rini [this message]
2017-04-27  7:22     ` B, Ravi
2017-04-27 12:31       ` Tom Rini
2017-04-27 17:25         ` B, Ravi
2017-05-03  8:36         ` B, Ravi
2017-05-03 12:42           ` Tom Rini
2017-05-03 12:45             ` B, Ravi
2017-05-03 20:53               ` Lukasz Majewski
2017-05-03 20:48             ` Lukasz Majewski
     [not found] <1493212325-31879-1-git-send-email-ravibabu@ti.com>
     [not found] ` <1493212325-31879-4-git-send-email-ravibabu@ti.com>
     [not found]   ` <20170427095808.4a87f63c@jawa>
2017-04-27 11:21     ` B, Ravi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170426133556.GX12511@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox