From patchwork Wed Nov 11 11:18:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Stanley X-Patchwork-Id: 322920 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:5ce:0:0:0:0 with SMTP id l14csp300010ils; Wed, 11 Nov 2020 03:19:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJxdvjcGv+hqZc2emkuue6Z0wy1NnNVsvtB9kGlI0o5QPE8k7B5RtTP69LXvGx8o++3chOzc X-Received: by 2002:a17:906:1246:: with SMTP id u6mr24373118eja.432.1605093570392; Wed, 11 Nov 2020 03:19:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605093570; cv=none; d=google.com; s=arc-20160816; b=an2KuQesAMmltoPPyo3lSRWe+X1ezqtlH5KNOWyMlc493gBvWGMSPxF5cApxtLBNN7 eEulGujYy46ijv4ecxkTOGVzl8PH+awf7rnKvA9ct5ZByt1aH40Tju7u94TcDcJL/oQf LjpHHxUHk1HV5jaTzHYOwwPyAqrpyaqX97CtNYB/HP+pPJ2o5muaF91NUGMSq1zlT2A7 PJc2zIIChBKLTUi4ZGl2oJCTeYdBwYxVsahsK6czDR+irGg+Ll+fODyZWxj1bkTyL2ue hiloO4I/nfAwvoqqOe1OvxzQhbUb7Kxo9isMOIb3Gi167iYvhM7IEvoMHckD5ydLKSel krJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=G/9GNE7VhoOhJkbaayefee2E6NX3aN3JN1WJFb0cf8U=; b=CWeDpcGRgG1O/TjUwQE3irsLD7KIJt+Rf5Pn85GsVNftobF3qENogc/1KxsCgxVVIa OIeiFxa0QMSi96feTAi9wJQ7m/ADZxxOpIzlY8e8Xksie7+8l8OHRyZfmIGjpa1ZnhW8 GyBVLF0aZEBCjOZDnM8gTCMsRKV0az9Kzjakp9FIJkbS74FqhXtDF5fpn+aPh3z7CA1D vmc8K46kq9QK7jlbMTMDVj5Pe1ePzciOxLFWqOpUWOfTHA1776eWVOI61l+luV66PUuU k1Mz8MLNyEvYy36+dDnUp2AAumK2/fTxBmvLblnfz0Ri3GwxPyzDFlQGS8PRvYVq7Zte LMsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=DRSUzeNf; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id m30si1229299edj.103.2020.11.11.03.19.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Nov 2020 03:19:30 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=DRSUzeNf; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5D89982553; Wed, 11 Nov 2020 12:19:17 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=jms.id.au Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="DRSUzeNf"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 427398253B; Wed, 11 Nov 2020 12:19:08 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D2FDD82523 for ; Wed, 11 Nov 2020 12:19:02 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=jms.id.au Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=joel.stan@gmail.com Received: by mail-pg1-x543.google.com with SMTP id r10so1234488pgb.10 for ; Wed, 11 Nov 2020 03:19:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=G/9GNE7VhoOhJkbaayefee2E6NX3aN3JN1WJFb0cf8U=; b=DRSUzeNfFZas2uJo5qxra/fC4LSyzowMovhwKyeY1mK3j4Dbu5GATSlcuLnBjF8u68 B3pAYUjdvnz3EZmVn0uwlnj/6rDJmwbnhcZ3NUHTcnMt0LJFP9SnIfeAKvjVvhaSuq2O Nc6yFKgdjpDJlIvsng5kquxUvzsccxv5Fj6uC+eG91c/snt+h8luhdzjUn1y6CnA9z/n XZzc4OWNh32LKgieUEKa89RTpmB+p6bOPeKtF3htYbWLfz9Lbs6ic/iBH6Ygie1bs3PP kvdMK5aONLKZty7SMMR8yrmEvvVVIZucorPbkqLM+DZGstU78vyXPFKFZdWyFGsPFT/q FIBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=G/9GNE7VhoOhJkbaayefee2E6NX3aN3JN1WJFb0cf8U=; b=EYLl4sKmZkwHUzmJbgkaRNOlWWcuJF+vXfC6EbUEW39jjaOB4/hV/3L48L8VRdSnXr j5F1VJ5tLp/XUVQWkbKtIH0j0U3guGZd2k/EZTgoCQ8mcKz7bYXyD1QMPe3+9bfCLj58 g3U3lvfkvHXAWIj7SkCz45akLSYLMYxsKCoYsIhN3vhzocZ+frs/JcAUXXSM/i20CIET apoU7Fcw6D5JPSKW6F9G0suCUUaPGUDRYZi50/vDn94kO2++zwdpgiuLNEg1fzkABBjS 2a19abLrVGeojBNwpOP/MP/0JT8xAOTZjRz6jnwbtlcGkkMlUpHt7Hlvo+7gagmCbmMd padQ== X-Gm-Message-State: AOAM532RRTmzsuGvl+FsYj9tkUe5JkVZyQe3/M+UZFiSwaIFGNOrZ+WJ NzMQWJBrSkH5oAxX/p0KCZCap6kLiG+hoQ== X-Received: by 2002:a63:1906:: with SMTP id z6mr8079715pgl.409.1605093541322; Wed, 11 Nov 2020 03:19:01 -0800 (PST) Received: from voyager.lan ([45.124.203.14]) by smtp.gmail.com with ESMTPSA id l62sm2339495pga.63.2020.11.11.03.18.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Nov 2020 03:19:00 -0800 (PST) From: Joel Stanley To: Simon Glass , Philippe Reynes Cc: Andrew Jeffery , u-boot@lists.denx.de Subject: [PATCH 2/3] image-cipher: Fix FIT_CIPHER linking Date: Wed, 11 Nov 2020 21:48:32 +1030 Message-Id: <20201111111833.741937-3-joel@jms.id.au> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201111111833.741937-1-joel@jms.id.au> References: <20201111111833.741937-1-joel@jms.id.au> MIME-Version: 1.0 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.102.3 at phobos.denx.de X-Virus-Status: Clean When CONFIG_FIT_CIPHER=y and CONFIG_FIT_SIGNATURE=n is there is no implementation of image_get_host_blob for mkimage or dumpimage: /usr/bin/ld: tools/common/image-cipher.o: in function `fit_image_decrypt_data': image-cipher.c:(.text+0x9a): undefined reference to `image_get_host_blob' The implementation is the same as common/image-fit-sig.c. Signed-off-by: Joel Stanley --- common/image-cipher.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) -- 2.28.0 diff --git a/common/image-cipher.c b/common/image-cipher.c index 4ca9eec4ef15..fcbbceb847a5 100644 --- a/common/image-cipher.c +++ b/common/image-cipher.c @@ -15,6 +15,20 @@ DECLARE_GLOBAL_DATA_PTR; #include #include +#ifdef USE_HOSTCC +void *host_blob; + +void image_set_host_blob(void *blob) +{ + host_blob = blob; +} + +void *image_get_host_blob(void) +{ + return host_blob; +} +#endif + struct cipher_algo cipher_algos[] = { { .name = "aes128",