UPSTREAM: util/kconfig: Remove miniconfig script

It replicates the functionality of savedefconfig because back when the
script was added, savedefconfig didn't work for us. It now does, is
the official way of doing things, is recommended in our documentation
and is also a fair bit faster.

BUG=none
BRANCH=none
TEST=none

Change-Id: I893f8459097cb0e2c57599fa70c7abdb19f54c5c
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: 60e0dc3919324ae7a5c3f2766790b0c76c39f25c
Original-Change-Id: Ia8e0377537ff7cd638c564037ea6a77b01a87243
Original-Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Reviewed-on: https://review.coreboot.org/c/coreboot/+/37150
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Original-Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/coreboot/+/2173056
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
Commit-Queue: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
diff --git a/util/kconfig/miniconfig b/util/kconfig/miniconfig
deleted file mode 100755
index 29a4035..0000000
--- a/util/kconfig/miniconfig
+++ /dev/null
@@ -1,87 +0,0 @@
-#!/usr/bin/env bash
-#
-# miniconfig - utility to minimize your coreboot config files
-#
-# Copyright 2015 Google Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-
-CONFIG=$1
-NEWCONFIG=$2
-
-CONF=build/util/kconfig/conf
-KCONFIG=src/Kconfig
-DOTCONFIG=.config
-PREVCONFIG=.config.prev
-TMPCONFIG=.config.mini
-
-recreate_config()
-{
-	$CONF --olddefconfig $KCONFIG &> /dev/null
-}
-
-if [ "$CONFIG" == "" ]; then
-  printf "usage: util/miniconfig/miniconfig [path to config file] <path to new config file>\n"
-  exit 0
-fi
-
-if [ ! -r "$CONFIG" ]; then
-  printf "Can't read $CONFIG.\n"
-  exit 1
-fi
-
-if [ "$CONFIG" == .config ]; then
-  printf "Can't use .config, it's overwritten. Make a backup.\n"
-  exit 1
-fi
-
-if [ ! -x "$CONF" ]; then
-  printf "conf utility at $CONF not available.\n"
-  exit 1
-fi
-
-# Start out by creating a default config file for a mainboard
-VENDOR=$( grep ^CONFIG_VENDOR "$CONFIG" )
-BOARD=$( grep ^CONFIG_BOARD "$CONFIG" | grep -v ROMSIZE | grep -v SPECIFIC_OPTIONS )
-
-printf "$VENDOR\n$BOARD\n" > "$TMPCONFIG"
-cp "$TMPCONFIG" "$DOTCONFIG"
-recreate_config
-
-LINES=$( cat "$CONFIG" | wc -l )
-CUR=1
-
-# Now go through each line of the existing, large config file, add it to our
-# new minimal config file, and see if it makes a difference when running "make
-# olddefconfig". If it does, keep the line, otherwise discard it.
-
-cat "$CONFIG" | while read L; do
-  printf "\rProcessing $CONFIG - $CUR / $LINES (%d%%)" $(( $CUR * 100 / $LINES))
-  mv "$DOTCONFIG" "$PREVCONFIG"
-  cp "$TMPCONFIG" "$DOTCONFIG"
-  echo "$L" >> "$DOTCONFIG"
-  recreate_config
-
-  if ! diff -q "$DOTCONFIG" "$PREVCONFIG" > /dev/null; then
-    echo "$L" >> "$TMPCONFIG"
-  fi
-  CUR=$(( $CUR + 1 ))
-done
-
-echo
-
-if [ "$NEWCONFIG" != "" ]; then
-  printf "Writing new, minimized config to $NEWCONFIG\n"
-  mv "$TMPCONFIG" "$NEWCONFIG"
-else
-  printf "Overwriting $CONFIG with new, minimized config.\n"
-  mv "$TMPCONFIG" "$CONFIG"
-fi