From patchwork Fri May 19 16:26:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Thompson X-Patchwork-Id: 100199 Delivered-To: patches@linaro.org Received: by 10.182.142.97 with SMTP id rv1csp368617obb; Fri, 19 May 2017 09:27:15 -0700 (PDT) X-Received: by 10.223.170.67 with SMTP id q3mr4368899wrd.19.1495211235886; Fri, 19 May 2017 09:27:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1495211235; cv=none; d=google.com; s=arc-20160816; b=UZzTKvynmeANO9e9tiDRtOkjr+tXRENkoL6vE95o5ow/ikTzSlzFhekjDcn6ThTZ0M FPn+OL+IcY+P92ppB0IZIVuv7/WZfgUltSGTfvZs7jKIi14kVOhIY6PJ5zLmwF+h0ur1 BkipEItzrbbmNutFFNp09Cz5QFXQWy8WjZksSDP7/710Jw/QP6gmptLqjMJTYhL514GR jfOAPzfLYAQOuv0CnxKVMqmzGZXlBp8aKMjpqruxpNcgwgZJ4xDG2vMMWjEgO6pM6CW+ A6hG6KyQseROJvVpxIxaWvnL3WG0BBitka26eFpT+yYx2Xx2Kl5qt5kfn6kC16uj28E9 9bGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=8vvWrb26KYviIQK50FDVuChkDoiRfLsdJGJOKu2RpA0=; b=zAtDTjdeO+6YN+sstXbNDxEtJLECbvSdLDCp4gu4YX5I3bm2lNhJKtpjK5seXt8NZb YU6yK2yBRXgJWJvDnpDDYPTUWdDJuBaOg4hjlADjvjf3H+tuX6KvyOWhOVBTgCpYfItw Qg8cx15TNNf2VMVbOgcHLgeSd9ZOhj5VmjM1lbDQKp2hivl5fBDCBY5Ue/bR66Mlnapl P2Uj34tbjYPGpzJ7kMMslBoFo28YDyU9vHJIz5cj07l72Q61YUs3Qz8Z9PrNxitXHd25 1ogyv8w0sywepjgC+YwqIQJYPd98/zDrOZNbmv50Peu2TlPdBogDetzwRqAMll4MW4wj DmlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: domain of daniel.thompson@linaro.org designates 2a00:1450:400c:c09::230 as permitted sender) smtp.mailfrom=daniel.thompson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-wm0-x230.google.com (mail-wm0-x230.google.com. [2a00:1450:400c:c09::230]) by mx.google.com with ESMTPS id c29si3132002wrb.102.2017.05.19.09.27.15 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 May 2017 09:27:15 -0700 (PDT) Received-SPF: pass (google.com: domain of daniel.thompson@linaro.org designates 2a00:1450:400c:c09::230 as permitted sender) client-ip=2a00:1450:400c:c09::230; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: domain of daniel.thompson@linaro.org designates 2a00:1450:400c:c09::230 as permitted sender) smtp.mailfrom=daniel.thompson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by mail-wm0-x230.google.com with SMTP id d127so91075843wmf.0 for ; Fri, 19 May 2017 09:27:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=8vvWrb26KYviIQK50FDVuChkDoiRfLsdJGJOKu2RpA0=; b=Yb0qkUUAhAq011y+hOqb4HApFidVKGKBTbQNK6nRcu0cvxRUxAWXH0PrcoLW0dWgvf TIVgcO8j5z+Tt+fG3hE/MeLTvuO+cyRdEZ67FCemEwJVOZlsQjm+q8UdS7bOJWd88lAY qP/kiUyTlkTudEbJOeXpxMvoNhmcfGa/LfJok= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=8vvWrb26KYviIQK50FDVuChkDoiRfLsdJGJOKu2RpA0=; b=uK6fdlHeXNqgAwqC+lnqTKE2H26zTG1BIYV/bD+z3aL297XAF7fQJYBHHHNmpgGVRF 9YRMLp+9G6Na8EtvOI8UthVvbbioM25rl0vybykjBI/Y67vkmcHwZfdLyd5UN+04T0Oy 97TuLOSPdGA5fMuWP9mOEJSw0MS78YkFuuF/v+XjZ+mDdNM6cGEPj7ZbZv7czS3th96H TW64PbIFDbQ7diPz7DvlNHZSNSaRgSIDuQqELIuEjaIQcV8WNQw9S3TmB14cykMEcjjO 1iV50JQUrs226B08gEB2EE6H2Bjbzpu8Zgc9MvxrnOn/8k0U/V1NDWTadoLpcYxxvA7V Zt/g== X-Gm-Message-State: AODbwcCql+nldUpdmJNuVTvtVWZ1oqraabK+Xk5ySQKRS4F5KTs7awQ4 YorpqCUGvQvqsZKkPkY= X-Received: by 10.28.92.135 with SMTP id q129mr6837554wmb.109.1495211235446; Fri, 19 May 2017 09:27:15 -0700 (PDT) Return-Path: Received: from birch.lan (cpc87149-aztw31-2-0-cust149.18-1.cable.virginm.net. [77.101.221.150]) by smtp.gmail.com with ESMTPSA id o200sm6781030wmg.22.2017.05.19.09.27.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 May 2017 09:27:14 -0700 (PDT) From: Daniel Thompson To: Simon Glass Cc: Daniel Thompson , u-boot@lists.denx.de, patches@linaro.org Subject: [PATCH] Kconfig: Add support for hash and sha1sum commands Date: Fri, 19 May 2017 17:26:58 +0100 Message-Id: <20170519162658.14212-1-daniel.thompson@linaro.org> X-Mailer: git-send-email 2.9.4 Currently these (board agnostic) commands cannot be selected using menuconfig and friends. Fix this the obvious way. Signed-off-by: Daniel Thompson --- cmd/Kconfig | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) -- 2.9.4 diff --git a/cmd/Kconfig b/cmd/Kconfig index d9f7151bacdc..f459f8440346 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -338,6 +338,19 @@ config CMD_CRC32 help Compute CRC32. +config CMD_HASH + bool "hash" + default n + help + Compute a hash using any algorithm supported by hash_lookup_algo(). + +config HASH_VERIFY + bool "hash -v" + default n + depends on CMD_HASH + help + Add -v option to verify data against a hash. + config CMD_MD5SUM bool "md5sum" default n @@ -352,6 +365,20 @@ config MD5SUM_VERFIY help Add -v option to verify data against an MD5 checksum. +config CMD_SHA1SUM + bool "sha1sum" + default n + select SHA1 + help + Compute SHA1 checksum. + +config SHA1SUM_VERFIY + bool "sha1sum -v" + default n + depends on CMD_SHA1SUM + help + Add -v option to verify data against an SHA1 checksum. + config LOOPW bool "loopw" help