From patchwork Tue Dec 8 04:12:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Stanley X-Patchwork-Id: 339687 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp3365475jai; Mon, 7 Dec 2020 20:13:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJxerG71N0+dA9T5g4uPYqHpFB8KxmD5wCiPXTa1exa2Lq0Qp8qPvEN8+rkP8l28FH7jOToS X-Received: by 2002:a50:c209:: with SMTP id n9mr11973321edf.123.1607400791170; Mon, 07 Dec 2020 20:13:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607400791; cv=none; d=google.com; s=arc-20160816; b=mQ9R8PVid9GeLE+lsf8wrqb48a3WYTMPCGEcS1j5wZY1IVn8XZo1HIiqQ0Vq9Cqg4b Qckhlp07Zu4sMMIyvg965KyrE4xtyzfin7mrx5jxzH4S8CfpjF8uwI8fKi1HlBFQwVOC SFkicEEn7HxBi6uKS5+HRXUeqW9DPxNsKjq8QUJkoP1G9v30DNwATAU6oZD05jOikWbR 7KNTQT/nTWiannmg+K/o8rMDPw00M1+89kX2xKpJqSO4j9n0ru+eQOm5qzDox8r4dJnv K0G8nMEyKUTo3vaWQ7tFwqe5A5uO+Q5GvXnzk+f1mK9LFdyuXEwEHrWk+9mV102fD0f7 D3gQ== 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=B9dB58QebQjv8joh71RoB3dp3pFDLiZ4c+qsL1Bcs84=; b=nATlv4EWnQ8EUZb31pzK6CyEySYvO7hTN3Oo4tnQ/PwXQdg+HyvELXqHiRgEFtcGJj RyJpKgcR+KcBKefhI2r/TMDxGW+6vuGXoNux0P1VPpWSI/K9VlZ9KXGFwRlmDpRxT6St vYSi5l8pIf4G0UqF9xQiWcW70O1FFjXwVStOehOJpFbUQ905lIbs1OBOSYPLFLCTT0Pi pFdxYpHXVzXTT7zctlLtbZtoxOGh6dbIsSuv7N5XmU3NQea5VvD7acasckADl3vZCucn 2rqzZkX11Ff8yEBTrBx1fLYheBsbSnobFy48DGHoAuxQ88fWKjOEzknA2Bgk8zEObX9g a2qg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=D6jUQkIu; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id cb9si9357474edb.580.2020.12.07.20.13.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Dec 2020 20:13:11 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=D6jUQkIu; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 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 C7D1982300; Tue, 8 Dec 2020 05:12:44 +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="D6jUQkIu"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B35A282300; Tue, 8 Dec 2020 05:12:43 +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.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_SBL_CSS,SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.2 Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) (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 2AB8C823ED for ; Tue, 8 Dec 2020 05:12:41 +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-pl1-x62b.google.com with SMTP id 4so6308681plk.5 for ; Mon, 07 Dec 2020 20:12:41 -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=B9dB58QebQjv8joh71RoB3dp3pFDLiZ4c+qsL1Bcs84=; b=D6jUQkIuVr2Ij2RMDalkeN6xcLrTaoawEjJGgSAkL9sRePwP692GKy8cD6oTv430Xv c/e0kcGwWlGjEpc8HLcvD3C5KRlf2nEt2tHmkzL9cqhDQgT78ARMslNJqkj8Wl0W1ya0 OmGca9ORI1bD1MC1aTUa4yaW9s13qhUvrZjYb1CuYqqvG6pEK4CSKBtmppmvKwXygRdD tQYehWElbTehF6DdVi05O1Xstq9o4BLeER7p63il3lbJso6FoXbppXq277ELDfnjWC7d Pvz0G1mLNGvlBlC8wGOP2zQ6Zqff8MCYjmgc9QrLvSQTSFZj9u/zcFRJ89f7mIKMaMb4 X0Fw== 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=B9dB58QebQjv8joh71RoB3dp3pFDLiZ4c+qsL1Bcs84=; b=hAjEP6K6Hsw+qKZgsc/GSzQEjjz7gAc0sgz/daT8Q8yarS7GQJy8GBfdk8LbtKHV5I a0LSRsYDgtAOXrd4csUCrzahphf5aLvKa5aUVOHq8aLmHa7pURQUIGlikEUQ47sIvEPJ BqSEB6yA1PRymXqY7DTnuAMlApsy5tP/QqYihJgJnQHIVH8qlObgC11NyZzHTySzIgBL U4VPz0NuwdbqmbKyZ+hdjdi5x14kDNi7hMk2j061bHW4GPLBo7gTa/y3h+ENiV7Z0AmZ lPxoxl70u7CdUVnyVOC1fogLIXYe1t5Mh38nCDuL02ACXe/4W09RvoUZfIO7+ZTVvfMR l63Q== X-Gm-Message-State: AOAM530ihizxX8ipbPuU0a7Eo0hF/F9hkZoEWsORpr9M2KMH4IGSm7Ta Bb1nq9dKCjbntaPy9r46X3U= X-Received: by 2002:a17:902:8306:b029:da:d7f0:9e16 with SMTP id bd6-20020a1709028306b02900dad7f09e16mr16244265plb.53.1607400759774; Mon, 07 Dec 2020 20:12:39 -0800 (PST) Received: from localhost.localdomain ([45.124.203.14]) by smtp.gmail.com with ESMTPSA id j20sm6055162pfd.106.2020.12.07.20.12.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Dec 2020 20:12:38 -0800 (PST) From: Joel Stanley To: Simon Glass , Heinrich Schuchardt , Philippe REYNES Cc: u-boot@lists.denx.de Subject: [PATCH v2 3/4] mkimage: Move padding commands outside of FIT_SIGNATURE Date: Tue, 8 Dec 2020 14:42:15 +1030 Message-Id: <20201208041216.888902-4-joel@jms.id.au> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201208041216.888902-1-joel@jms.id.au> References: <20201208041216.888902-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 These commands were disabled when CONFIG_FIT_SIGNATURE is disabled, but they do not depend on crypto support so they can be unconditionally enabled. Signed-off-by: Joel Stanley -- v2: New patch --- tools/mkimage.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) -- 2.29.2 diff --git a/tools/mkimage.c b/tools/mkimage.c index e78608293e72..68d5206cb4fd 100644 --- a/tools/mkimage.c +++ b/tools/mkimage.c @@ -94,18 +94,18 @@ static void usage(const char *msg) " -x ==> set XIP (execute in place)\n", params.cmdname); fprintf(stderr, - " %s [-D dtc_options] [-f fit-image.its|-f auto|-F] [-b [-b ]] [-i ] fit-image\n" + " %s [-D dtc_options] [-f fit-image.its|-f auto|-F] [-b [-b ]] [-E] [-B size] [-i ] fit-image\n" " file is used with -f auto, it may occur multiple times.\n", params.cmdname); fprintf(stderr, " -D => set all options for device tree compiler\n" " -f => input filename for FIT source\n" - " -i => input filename for ramdisk file\n"); + " -i => input filename for ramdisk file\n" + " -E => place data outside of the FIT structure\n" + " -B => align size in hex for FIT structure and header\n"); #ifdef CONFIG_FIT_SIGNATURE fprintf(stderr, - "Signing / verified boot options: [-E] [-B size] [-k keydir] [-K dtb] [ -c ] [-p addr] [-r] [-N engine]\n" - " -E => place data outside of the FIT structure\n" - " -B => align size in hex for FIT structure and header\n" + "Signing / verified boot options: [-k keydir] [-K dtb] [ -c ] [-p addr] [-r] [-N engine]\n" " -k => set directory containing private keys\n" " -K => write public keys to this .dtb file\n" " -c => add comment in signature node\n" @@ -142,6 +142,7 @@ static int add_content(int type, const char *fname) return 0; } +#define OPT_STRING "a:A:b:B:c:C:d:D:e:Ef:Fk:i:K:ln:N:p:O:rR:qstT:vVx" static void process_args(int argc, char **argv) { char *ptr;