From patchwork Wed Nov 11 11:18:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Stanley X-Patchwork-Id: 322918 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:5ce:0:0:0:0 with SMTP id l14csp299771ils; Wed, 11 Nov 2020 03:19:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJy7ZoNg6H8D7FQvahVpVvA5yLHis2BuiPTneYXPguE7oebmGwnjxd/JEk5Y8PbHndBmFtZf X-Received: by 2002:a17:906:cc8c:: with SMTP id oq12mr25568016ejb.177.1605093547431; Wed, 11 Nov 2020 03:19:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605093547; cv=none; d=google.com; s=arc-20160816; b=yDl5d6VZUp2QwAfpdKjem+RvnUwoyPzCFxJ/Br2fEqCjY/YYEXXZfDyUvdEsh76/iP WGXodJS5v4hBVWU3R2el+uyqWteF+T/82zPKyos1ugNycMqABF/jatkeAVX1XF03t9bl 5JuTw675SJd/AVnaZ1f8v2YSLIS0U8srCNGzDQKOanPZjWsi/q8Vyjcgu7PGgCC0haws vFG+O1TjwWQDSVygJqZFFfkMAPX7jgH3eTKMkCB+BgPGDJCn+5GFE2J+xi8l8cP7cZRy eIvZNP7Qc/4DPKuMtULvOH8x6hckykNFUJpBRAc2jlNd2BxmRfNCA7q8J066dFY+Ume8 JY3A== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=GhvRDIVmARaQDt15acyMj/Qndo+FOc12GwIbpb2TgGg=; b=FZBnRydT/CbnlCaTtcHDAi2G3jRSlg2dYIxqPY87R2wvZCbn+Bh+vRAb8FpA2UnryI k9fVMSfHy/2F0CG624DKu6A9bZfAbl0AzTqUHK9+LeqHfU8eLoGHAHjYM13kXJa0bufc rGBrajWlGFEhiTSm3i0FwqNX5bw7h+TqBMl+IVqm58bCA25nK2XtGbV5IQtCZH3J2F67 4f3iiOs96qnCqc6qbOHxG1kOKLfL4SqduzuqAXnDt+sa2xJxBUGK3P6m/rWJcYe41Tvu pZtaSU3ouwcjcKeq7YkFEqSSzZJJtOpzs7XTSWH1EgK5bEcGG+v68BX6A3ak7aSdnwEv t4TA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=ZYVv5rvu; 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 d19si1264689edq.303.2020.11.11.03.19.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Nov 2020 03:19:07 -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=ZYVv5rvu; 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 83BD4824FD; 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=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="ZYVv5rvu"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 59B1482523; Wed, 11 Nov 2020 12:19:00 +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 autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) (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 F03E0823FE for ; Wed, 11 Nov 2020 12:18:55 +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-x542.google.com with SMTP id e21so1232893pgr.11 for ; Wed, 11 Nov 2020 03:18:55 -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:mime-version :content-transfer-encoding; bh=GhvRDIVmARaQDt15acyMj/Qndo+FOc12GwIbpb2TgGg=; b=ZYVv5rvu2FEiPdgFQD2bnvZvzYGgjxcyN6nLSzm7hVSpYhqvlJasqdiJZ6wpRx/loc 9bwu6TK8STlYK8QQe7RApr98y/Dn/jJzLHoqVP66hYCSy/PbhGFdH/D1kw2Tc6E0kZ4L pUZpDeT5+nMX/Xt9N1S/uqfRER2Q4ubKSPYOpncLJoYMT3U0aRIfHPwuWUbtBJUxWJvj NIwj3j3cxUyKTWq5P7QxT7Jm+ijdCr1LxF+tuLmePc5CZZH0p3z1OEG0qjIuW6ildOYS mTmIvVU5CeFeI9UGKVk5RnF57s+8jPtECIjb7iUPydL3m2eIb1mDtqDQW+FU7jsqWocK WmDA== 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 :mime-version:content-transfer-encoding; bh=GhvRDIVmARaQDt15acyMj/Qndo+FOc12GwIbpb2TgGg=; b=iQ8DNluDYPAQkcqvHMwTieLwyBubOWGgFkg3fJFzhHtQfDJew1mWDgAC7DOcoCkwyO 8Nih4RJ/SNNp0IqnhNX/HsvEt42ZZBsIMmGdCo92jATcNBUaqxtUQMpHggZpbxtetQYV 0L5DxsJK5OHpqSKCC4M5H1m2Loj4SfnMgljydyDmzrPpXuVx7lyqlqxY4Zyy0yCXJlH7 JWOhxZde6rdzMWX3A+hy9LHLIn0qY3lAPnY/VRJD89vB8PozPcQcI39fh/HMkuCzg+Jb mYnL5ogKZgE/drNc+bmQbO9Ukv3rPWULy7963EgIpMEytOSJhh5T1arIdB/zlBul8C5W 2sGQ== X-Gm-Message-State: AOAM533oZyzEw+qhnMUPIPPiuWzfbIzch5PcIl1LYHQRCZbYagbqwhYI i6A+0Mnz65Gg5b+OjcptWK4= X-Received: by 2002:a62:54c2:0:b029:156:4e4c:ff49 with SMTP id i185-20020a6254c20000b02901564e4cff49mr22314222pfb.26.1605093534036; Wed, 11 Nov 2020 03:18:54 -0800 (PST) Received: from voyager.lan ([45.124.203.14]) by smtp.gmail.com with ESMTPSA id l62sm2339495pga.63.2020.11.11.03.18.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Nov 2020 03:18:52 -0800 (PST) From: Joel Stanley To: Simon Glass , Philippe Reynes Cc: Andrew Jeffery , u-boot@lists.denx.de Subject: [PATCH 0/3] mkimage usability fixes Date: Wed, 11 Nov 2020 21:48:30 +1030 Message-Id: <20201111111833.741937-1-joel@jms.id.au> X-Mailer: git-send-email 2.28.0 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 Hello, I was learning about signed FIT today and was unable to convince mkimage to produce a signature node in my control device tree. It turns out that Debian's packaged mkimage doesn't enable FIT_SIGNATURE, so the options I was passing were silently ignored. There's an existing Debian bug for that[1] but in the mean time this changes mkimage's behaviour to fail loudly when FIT_SIGNATURE is disabled. The first two patches fix some issues I found when testing the third patch under sandbox_defconfig with FIT_SIGNATURE=n. [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=972513 Joel Stanley (3): tools/Makefile: FIT_CIPHER requires libssl image-cipher: Fix FIT_CIPHER linking mkimge: Reject signing-related flags without FIT_SIGNATURE common/image-cipher.c | 14 ++++++++++++++ tools/Makefile | 2 +- tools/mkimage.c | 9 +++++++-- 3 files changed, 22 insertions(+), 3 deletions(-) -- 2.28.0