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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 0886CC636D4 for ; Wed, 1 Feb 2023 20:46:33 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 49B0885D03; Wed, 1 Feb 2023 21:45:34 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="L0ir6y3C"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1B3AE85AFC; Wed, 1 Feb 2023 21:45:29 +0100 (CET) Received: from mail-io1-xd2c.google.com (mail-io1-xd2c.google.com [IPv6:2607:f8b0:4864:20::d2c]) (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 61A4185D8B for ; Wed, 1 Feb 2023 21:22:58 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd2c.google.com with SMTP id w24so4058898iow.13 for ; Wed, 01 Feb 2023 12:22:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pkB/ON2Pz8oJQFzpKMjqUiBrSGaiwUcWlDpOv3AMtlI=; b=L0ir6y3CAQ8Q06aH+R0+bWg9xHWzEfk0eL4ymQ3kSt9DGP4tpWGExhpSolHgFPrvEM kbvl7JH/C/LlCKw/cPay7Z7FwuI1/vw4Sq2nRhooe6tH8Hna074LAsP25kY7KqCpfQUV 2Rdc3sHxS1DdxyTzCcpfG+GkOpYGqlufJQweg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pkB/ON2Pz8oJQFzpKMjqUiBrSGaiwUcWlDpOv3AMtlI=; b=G+cJm6dwrmoZ/JnHiZkmv1MrfwHPhcp2EQ2+35foLYtSeSzwP1SF4hPEgm2HYUtbzw t9wJzEYjN0eUtRZcIMfMXW35upeTjWdeQKir22W1PIdV0hv6CdMcHb63aYmBi80CgZKQ 5ALWScTI7Ql2pIlcdVqAApQWk8/yOOevmkepldXPOP04m4ZmAEzG5ifaLVpV54DPQGZs kw/YAwbXaBcj+4CovUSFYbtdxesdUsz4WVrgyvnqj2rUuB9SNZX8LcGBRwLryekHUnT4 4z3TxKFGyjws3CSbINyLvCRUdEDmer+ztBQC2YKP2iMIrYbT+ghteFMKq8aHoLU/S9gW 83lg== X-Gm-Message-State: AO0yUKWDm1gKPjVK3F+7mPxXhS7pSBTnjBWzLOdWrKAxjlTxcjQHF6Ea LQFz7KMQBCyNqajVbHqUQzxwRoABcM3OaDfZ X-Google-Smtp-Source: AK7set/OgJkrAEb2vDuX5cZU83cOuhhwl12d3ILCnI7QQXIf0A2Rye+x0A8MJ/WPo2dB4Vq6P3LTww== X-Received: by 2002:a5e:8814:0:b0:716:aa82:e2a5 with SMTP id l20-20020a5e8814000000b00716aa82e2a5mr2516012ioj.12.1675282933207; Wed, 01 Feb 2023 12:22:13 -0800 (PST) Received: from kea.bld.corp.google.com ([2620:15c:183:200:1fda:cca0:9a42:148c]) by smtp.gmail.com with ESMTPSA id i1-20020a6bf401000000b00704608527d1sm6166498iog.37.2023.02.01.12.22.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Feb 2023 12:22:12 -0800 (PST) From: Simon Glass To: u-boot@lists.denx.de Cc: Tom Rini , Simon Glass Subject: [PATCH v3 58/76] Drop ubsha1 tool Date: Wed, 1 Feb 2023 13:20:09 -0700 Message-Id: <20230201202027.1943031-59-sjg@chromium.org> X-Mailer: git-send-email 2.39.1.456.gfc5497dd1b-goog In-Reply-To: <20230201202027.1943031-1-sjg@chromium.org> References: <20230201202027.1943031-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.6 at phobos.denx.de X-Virus-Status: Clean This seems to have been used by ppc4xx which was removed a while back. The Kconfig does not exist so it is never built. Drop it. Signed-off-by: Simon Glass --- (no changes since v1) Makefile | 3 -- tools/.gitignore | 1 - tools/Makefile | 6 ---- tools/ubsha1.c | 83 ------------------------------------------------ 4 files changed, 93 deletions(-) delete mode 100644 tools/ubsha1.c diff --git a/Makefile b/Makefile index 73a562a26de..2c9e27ac5c2 100644 --- a/Makefile +++ b/Makefile @@ -1450,9 +1450,6 @@ u-boot-with-spl.kwb: u-boot.bin spl/u-boot-spl.bin FORCE $(call if_changed,mkimage) $(BOARD_SIZE_CHECK) -u-boot.sha1: u-boot.bin - tools/ubsha1 u-boot.bin - u-boot.dis: u-boot $(OBJDUMP) -d $< > $@ diff --git a/tools/.gitignore b/tools/.gitignore index 28e8ce2a07a..788ea260a07 100644 --- a/tools/.gitignore +++ b/tools/.gitignore @@ -33,7 +33,6 @@ /relocate-rela /spl_size_limit /sunxi-spl-image-builder -/ubsha1 /update_octeon_header /version.h /xway-swap-bytes diff --git a/tools/Makefile b/tools/Makefile index 2ee43dff542..0eadd8154a7 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -29,7 +29,6 @@ CONFIG_CMD_LOADS = y CONFIG_CMD_NET = y CONFIG_XWAY_SWAP_BYTES = y CONFIG_NETCONSOLE = y -CONFIG_SHA1_CHECK_UB_IMG = y CONFIG_ARCH_SUNXI = y endif @@ -217,11 +216,6 @@ hostprogs-$(CONFIG_ARCH_SUNXI) += sunxi-spl-image-builder sunxi-spl-image-builder-objs := sunxi-spl-image-builder.o lib/bch.o hostprogs-$(CONFIG_NETCONSOLE) += ncb -hostprogs-$(CONFIG_SHA1_CHECK_UB_IMG) += ubsha1 - -ubsha1-objs := os_support.o ubsha1.o lib/sha1.o - -HOSTCFLAGS_ubsha1.o := -pedantic hostprogs-$(CONFIG_ARCH_KIRKWOOD) += kwboot hostprogs-$(CONFIG_ARCH_MVEBU) += kwboot diff --git a/tools/ubsha1.c b/tools/ubsha1.c deleted file mode 100644 index 90a6f3f59d2..00000000000 --- a/tools/ubsha1.c +++ /dev/null @@ -1,83 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * (C) Copyright 2007 - * Heiko Schocher, DENX Software Engineering, - */ - -#include "os_support.h" -#include -#include -#include -#include -#include -#include -#include -#include - -int main (int argc, char **argv) -{ - unsigned char output[20]; - int i, len; - - char *imagefile; - char *cmdname = *argv; - unsigned char *ptr; - unsigned char *data; - struct stat sbuf; - unsigned char *ptroff; - int ifd; - int off; - - if (argc > 1) { - imagefile = argv[1]; - ifd = open (imagefile, O_RDWR|O_BINARY); - if (ifd < 0) { - fprintf (stderr, "%s: Can't open %s: %s\n", - cmdname, imagefile, strerror(errno)); - exit (EXIT_FAILURE); - } - if (fstat (ifd, &sbuf) < 0) { - fprintf (stderr, "%s: Can't stat %s: %s\n", - cmdname, imagefile, strerror(errno)); - exit (EXIT_FAILURE); - } - len = sbuf.st_size; - ptr = (unsigned char *)mmap(0, len, - PROT_READ, MAP_SHARED, ifd, 0); - if (ptr == (unsigned char *)MAP_FAILED) { - fprintf (stderr, "%s: Can't read %s: %s\n", - cmdname, imagefile, strerror(errno)); - exit (EXIT_FAILURE); - } - - /* create a copy, so we can blank out the sha1 sum */ - data = malloc (len); - memcpy (data, ptr, len); - off = SHA1_SUM_POS; - ptroff = &data[len + off]; - for (i = 0; i < SHA1_SUM_LEN; i++) { - ptroff[i] = 0; - } - - sha1_csum ((unsigned char *) data, len, (unsigned char *)output); - - printf ("U-Boot sum:\n"); - for (i = 0; i < 20 ; i++) { - printf ("%02X ", output[i]); - } - printf ("\n"); - /* overwrite the sum in the bin file, with the actual */ - lseek (ifd, SHA1_SUM_POS, SEEK_END); - if (write (ifd, output, SHA1_SUM_LEN) != SHA1_SUM_LEN) { - fprintf (stderr, "%s: Can't write %s: %s\n", - cmdname, imagefile, strerror(errno)); - exit (EXIT_FAILURE); - } - - free (data); - (void) munmap((void *)ptr, len); - (void) close (ifd); - } - - return EXIT_SUCCESS; -} -- 2.39.1.456.gfc5497dd1b-goog