From: Tom Rini Date: Mon, 14 Aug 2017 10:34:24 -0400 Subject: [U-Boot] [PATCH] hash: Compile-off SHA SW lib in case SHA HW lib is present In-Reply-To: <1502710786-30411-1-git-send-email-sumit.garg@nxp.com> References: <1502710786-30411-1-git-send-email-sumit.garg@nxp.com> Message-ID: <20170814143424.GI20467@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, Aug 14, 2017 at 05:09:46PM +0530, Sumit Garg wrote: > Commit 089df18bfe9d ("lib: move hash CONFIG options to Kconfig") > moved CONFIG_SHA1, CONFIG_SHA256, CONFIG_SHA_HW_ACCEL, and > CONFIG_SHA_PROG_HW_ACCEL config options to Kconfig. So in case of > SPL, CONFIG_SPL_HASH_SUPPORT enables CONFIG_SHA1 and CONFIG_SHA256 > which enables SHA SW library by default. But in case of platforms with > SHA HW library support, SHA SW library becomes redundant and increases > size of SPL by approx 18K. So to take care of this SHA SW library is > compiled-off in case SHA HW acceleration is present. > > Signed-off-by: Sumit Garg > --- > common/hash.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) Good find. Looking at the code I think this can be done a bit differently to clean up the code as well, which was the first thing I was wondering about when looking this over. I'll have a v2 of this hopefully later today (testing in travis now). Thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: