From fb3148a2302b18860a5141d2d8d500ff7d58c0b8 Mon Sep 17 00:00:00 2001
From: Jun Nie <jun.nie@linaro.org>
Date: Tue, 13 Feb 2018 16:07:55 +0800
Subject: [PATCH] common: build ymodem only on need

Build ymodem only on need to shrink spl image size.

Signed-off-by: Jun Nie <jun.nie@linaro.org>
---
 common/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/common/Makefile b/common/Makefile
index 7473b85011..a2388364d9 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -121,6 +121,7 @@ obj-y += command.o
 obj-$(CONFIG_$(SPL_)LOG) += log.o
 obj-$(CONFIG_$(SPL_)LOG_CONSOLE) += log_console.o
 obj-y += s_record.o
-obj-y += xyzModem.o
+obj-$(CONFIG_CMD_LOADB) += xyzModem.o
+obj-$(CONFIG_$(SPL_TPL_)YMODEM_SUPPORT) += xyzModem.o
 
 obj-$(CONFIG_AVB_VERIFY) += avb_verify.o
-- 
2.39.5