From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 02137C433EF for ; Wed, 20 Oct 2021 02:45:11 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2C86A6109F for ; Wed, 20 Oct 2021 02:45:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2C86A6109F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sholland.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D68AB829FC; Wed, 20 Oct 2021 04:45:07 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=sholland.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=sholland.org header.i=@sholland.org header.b="OQEqD86I"; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="AipDNADZ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CCA658311B; Wed, 20 Oct 2021 04:45:04 +0200 (CEST) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 0507E81D1F for ; Wed, 20 Oct 2021 04:45:00 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=sholland.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=samuel@sholland.org Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 4F8F35C016A; Tue, 19 Oct 2021 22:44:59 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Tue, 19 Oct 2021 22:44:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=fm1; bh= qoJOLKJU6S5/P9Hu0GEC56//XLolEzNSzGFBOvGKlVM=; b=OQEqD86IKU9WDiUO 7mFjm2kvG6RkQsjdCUL1m2UjBtOTuDN4SDqcSOYEyzH0X5LP93e0iYER2injzOEB lR3mz9mYrCxBCgo7DOHd43My0tkdcq4csPVl+18JbMx6PBU8Vle5PDYynypRFGd1 HiEsa5mhU2ToL6mwxbgz0KOYOwr4AEYmeKzk8C4v0V+vtFVf9GuGcuB/g5hkIvkM cMRXzTCbkSZBsK54NhlnYbrE+tez193T6rE/h+mPcGQ0wJKmLWnkwsfncE8IvOsv R8LR2jDpoEcNr21ZBTQYRfheAwzCTJkF5nLOzc06M+saDGhUdfFawjLeWS/WdY6b aYFYAQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=qoJOLKJU6S5/P9Hu0GEC56//XLolEzNSzGFBOvGKl VM=; b=AipDNADZz91JfjgNVhzT64/6azpL4apLC1JTiwg/vknJDHsaGt6xMZgQH i8b4sfJlBB63ZvPdEjQcaD9tdeetkSGi/KXf0PGaxmbTjpyA8RLs56FiDOIJvZKc XYeZMV9TYu2krQqaClQJmETOmD0Sbd0XzkBo+6TrzYft9rVBfON4ERVvNBalGdDR USSP84vXjvLMT/SDC5Wur0UcPWJ9/8SVZeLxaCdxqjLzrQt6VG6dob9dwC86H/+v 32wECscjO/51OQVjouj8VsW6mGr5d6Gu0emsWc1TcuIeK6OPFSkGoz5ja6GuusDo Y3AmnDsDZrQVR+Br8CmorVJYfe7QQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvddvfedgheejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfgggtgfesthekredtredtjeenucfhrhhomhepufgrmhhu vghlucfjohhllhgrnhguuceoshgrmhhuvghlsehshhholhhlrghnugdrohhrgheqnecugg ftrfgrthhtvghrnhepfedvffetgeduiedtfffgleelvdfhheekkeduffetuddvgeeffedu fefhgeehueejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepshgrmhhuvghlsehshhholhhlrghnugdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 19 Oct 2021 22:44:58 -0400 (EDT) From: Samuel Holland To: u-boot@lists.denx.de, Jagan Teki , Andre Przywara Cc: "Alex G ." , =?UTF-8?q?Pali=20Roh=C3=A1r?= , Samuel Holland , Artem Lapkin , Priyanka Jain , Sughosh Ganu , =?UTF-8?q?Marek=20Beh=C3=BAn?= Subject: [PATCH v4 1/4] tools: Separate image types which depend on OpenSSL Date: Tue, 19 Oct 2021 21:44:51 -0500 Message-Id: <20211020024455.48136-2-samuel@sholland.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211020024455.48136-1-samuel@sholland.org> References: <20211020024455.48136-1-samuel@sholland.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Some image types (kwbimage and mxsimage) always depend on OpenSSL, so they can only be included in mkimage when TOOLS_LIBCRYPTO is selected. Use Makefile logic to conditionally link the files. Signed-off-by: Samuel Holland --- Changes in v4: - Do not select TOOLS_LIBCRYPTO anywhere Changes in v3: - Selected TOOLS_LIBCRYPTO on all platforms that use kwbimage (as best as I can tell, using the suggestions from Pali Rohár) Changes in v2: - Refactored the first patch on top of TOOLS_LIBCRYPTO scripts/config_whitelist.txt | 1 - tools/Makefile | 19 +++++-------------- tools/mxsimage.c | 3 --- 3 files changed, 5 insertions(+), 18 deletions(-) diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index cd94b5777a..affae6875d 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -828,7 +828,6 @@ CONFIG_MXC_UART_BASE CONFIG_MXC_USB_FLAGS CONFIG_MXC_USB_PORT CONFIG_MXC_USB_PORTSC -CONFIG_MXS CONFIG_MXS_AUART CONFIG_MXS_AUART_BASE CONFIG_MXS_OCOTP diff --git a/tools/Makefile b/tools/Makefile index 999fd46531..a9b3d982d8 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -94,9 +94,11 @@ ECDSA_OBJS-$(CONFIG_TOOLS_LIBCRYPTO) := $(addprefix lib/ecdsa/, ecdsa-libcrypto. AES_OBJS-$(CONFIG_TOOLS_LIBCRYPTO) := $(addprefix lib/aes/, \ aes-encrypt.o aes-decrypt.o) -# Cryptographic helpers that depend on openssl/libcrypto -LIBCRYPTO_OBJS-$(CONFIG_TOOLS_LIBCRYPTO) := $(addprefix lib/, \ - fdt-libcrypto.o) +# Cryptographic helpers and image types that depend on openssl/libcrypto +LIBCRYPTO_OBJS-$(CONFIG_TOOLS_LIBCRYPTO) := \ + lib/fdt-libcrypto.o \ + kwbimage.o \ + mxsimage.o ROCKCHIP_OBS = lib/rc4.o rkcommon.o rkimage.o rksd.o rkspi.o @@ -118,10 +120,8 @@ dumpimage-mkimage-objs := aisimage.o \ imximage.o \ imx8image.o \ imx8mimage.o \ - kwbimage.o \ lib/md5.o \ lpc32xximage.o \ - mxsimage.o \ omapimage.o \ os_support.o \ pblimage.o \ @@ -156,22 +156,13 @@ fit_info-objs := $(dumpimage-mkimage-objs) fit_info.o fit_check_sign-objs := $(dumpimage-mkimage-objs) fit_check_sign.o file2include-objs := file2include.o -ifneq ($(CONFIG_MX23)$(CONFIG_MX28)$(CONFIG_TOOLS_LIBCRYPTO),) -# Add CONFIG_MXS into host CFLAGS, so we can check whether or not register -# the mxsimage support within tools/mxsimage.c . -HOSTCFLAGS_mxsimage.o += -DCONFIG_MXS -endif - ifdef CONFIG_TOOLS_LIBCRYPTO # This affects include/image.h, but including the board config file # is tricky, so manually define this options here. HOST_EXTRACFLAGS += -DCONFIG_FIT_SIGNATURE HOST_EXTRACFLAGS += -DCONFIG_FIT_SIGNATURE_MAX_SIZE=0xffffffff HOST_EXTRACFLAGS += -DCONFIG_FIT_CIPHER -endif -# MXSImage needs LibSSL -ifneq ($(CONFIG_MX23)$(CONFIG_MX28)$(CONFIG_ARMADA_38X)$(CONFIG_TOOLS_LIBCRYPTO),) HOSTCFLAGS_kwbimage.o += \ $(shell pkg-config --cflags libssl libcrypto 2> /dev/null || echo "") HOSTLDLIBS_mkimage += \ diff --git a/tools/mxsimage.c b/tools/mxsimage.c index 002f4b525a..2bfbb421eb 100644 --- a/tools/mxsimage.c +++ b/tools/mxsimage.c @@ -5,8 +5,6 @@ * Copyright (C) 2012-2013 Marek Vasut */ -#ifdef CONFIG_MXS - #include #include #include @@ -2363,4 +2361,3 @@ U_BOOT_IMAGE_TYPE( NULL, mxsimage_generate ); -#endif -- 2.32.0