From: Ravi Babu <ravibabu@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 3/3] spl: dfu: reduce spl-dfu MLO size
Date: Thu, 27 Apr 2017 17:45:21 +0530 [thread overview]
Message-ID: <1493295321-15498-4-git-send-email-ravibabu@ti.com> (raw)
In-Reply-To: <1493295321-15498-1-git-send-email-ravibabu@ti.com>
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>
---
need better way for how to compile out CONFIG_DFU_MMC
common/Makefile | 3 +--
drivers/dfu/Makefile | 2 ++
include/dfu.h | 2 +-
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/common/Makefile b/common/Makefile
index 86225f1..8976cbc 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -11,6 +11,7 @@ obj-y += init/
obj-y += main.o
obj-y += exports.o
obj-y += hash.o
+obj-y += cli.o
obj-$(CONFIG_HUSH_PARSER) += cli_hush.o
obj-$(CONFIG_AUTOBOOT) += autoboot.o
@@ -90,7 +91,6 @@ endif # !CONFIG_SPL_BUILD
ifdef CONFIG_SPL_BUILD
obj-$(CONFIG_SPL_DFU_SUPPORT) += dfu.o
-obj-$(CONFIG_SPL_DFU_SUPPORT) += cli_hush.o
obj-$(CONFIG_SPL_HASH_SUPPORT) += hash.o
obj-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o
obj-$(CONFIG_SPL_YMODEM_SUPPORT) += xyzModem.o
@@ -171,7 +171,6 @@ endif
# We always have this since drivers/ddr/fs/interactive.c needs it
obj-$(CONFIG_CMDLINE) += cli_simple.o
-obj-y += cli.o
obj-$(CONFIG_CMDLINE) += cli_readline.o
obj-$(CONFIG_CMD_DFU) += dfu.o
obj-y += command.o
diff --git a/drivers/dfu/Makefile b/drivers/dfu/Makefile
index 61f2b71..5628734 100644
--- a/drivers/dfu/Makefile
+++ b/drivers/dfu/Makefile
@@ -6,7 +6,9 @@
#
obj-$(CONFIG_USB_FUNCTION_DFU) += dfu.o
+ifndef CONFIG_SPL_BUILD
obj-$(CONFIG_DFU_MMC) += dfu_mmc.o
+endif
obj-$(CONFIG_DFU_NAND) += dfu_nand.o
obj-$(CONFIG_DFU_RAM) += dfu_ram.o
obj-$(CONFIG_DFU_SF) += dfu_sf.o
diff --git a/include/dfu.h b/include/dfu.h
index f39d3f1..70eeaef 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)
extern int dfu_fill_entity_mmc(struct dfu_entity *dfu, char *devstr, char *s);
#else
static inline int dfu_fill_entity_mmc(struct dfu_entity *dfu, char *devstr,
--
1.9.1
prev parent reply other threads:[~2017-04-27 12:15 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-27 12:15 [U-Boot] [PATCH v2 0/3] spl: dfu: misc fixes and reduce MLO foot print Ravi Babu
2017-04-27 12:15 ` [U-Boot] [PATCH v2 1/3] spl: Kconfig: dfu: spl-dfu depends on SPL_RAM_SUPPORT Ravi Babu
2017-04-27 12:15 ` [U-Boot] [PATCH v2 2/3] common: dfu: ignore reset for spl-dfu Ravi Babu
2017-04-27 12:32 ` Tom Rini
2017-04-27 17:24 ` B, Ravi
2017-04-27 18:13 ` Tom Rini
2017-05-02 12:41 ` B, Ravi
2017-05-02 12:57 ` Tom Rini
2017-05-02 13:02 ` B, Ravi
2017-05-02 13:19 ` Tom Rini
2017-05-02 13:25 ` B, Ravi
2017-05-02 13:56 ` B, Ravi
2017-05-02 14:54 ` Tom Rini
2017-05-02 14:54 ` B, Ravi
2017-05-02 12:48 ` B, Ravi
2017-04-27 12:15 ` Ravi Babu [this message]
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=1493295321-15498-4-git-send-email-ravibabu@ti.com \
--to=ravibabu@ti.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.