summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Fagerburg <pfagerburg@chromium.org>2019-09-25 12:48:03 -0600
committerCommit Bot <commit-bot@chromium.org>2019-09-28 20:23:39 +0000
commit8beebe104d7b265ff187b6d1f20979c2b3e053b4 (patch)
tree9237d05fa267ea888d00713bd683c4f38c68c96b
parent3c1215dadc3a279925a17f55bdf0cb8863c41626 (diff)
downloadchrome-ec-8beebe104d7b265ff187b6d1f20979c2b3e053b4.tar.gz
automation: move create_variant to dev/contrib
Most of the scripts to automate creating a new variant are moving to platform/dev/contrib/variant for maintenance reasons. Keeping them in one place makes it easier to coordinate changes in the scripts, instead of having them spread across different repos. It also allows keeping documentation close to the scripts. BUG=b:140261109 BRANCH=None TEST=N/A, script is being removed Change-Id: Idd9ad328d2fab34a9bd9e42c360219b75018d3af Signed-off-by: Paul Fagerburg <pfagerburg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1829398 Reviewed-by: Jett Rink <jettrink@chromium.org>
-rwxr-xr-xutil/create_variant.sh63
1 files changed, 0 insertions, 63 deletions
diff --git a/util/create_variant.sh b/util/create_variant.sh
deleted file mode 100755
index 4f287c6d36..0000000000
--- a/util/create_variant.sh
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/bin/bash
-# Copyright 2019 The Chromium OS Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-if [[ "$#" -lt 2 ]]; then
- echo "Usage: $0 base_name variant_name [bug_number]"
- echo "e.g. $0 hatch kohaku b:140261109"
- echo "Creates the initial EC image as a copy of the base board's EC."
- exit 1
-fi
-
-# This is the name of the base board that we're cloning to make the variant.
-# ${var,,} converts to all lowercase.
-BASE="${1,,}"
-# This is the name of the variant that is being cloned.
-VARIANT="${2,,}"
-
-# Assign BUG= text, or "None" if that parameter wasn't specified.
-BUG=${3:-None}
-
-# All of the necessary files are in the ../board directory.
-pushd "${BASH_SOURCE%/*}/../board" || exit
-
-# Make sure that the base exists.
-if [[ ! -e "${BASE}" ]]; then
- echo "${BASE} does not exist; please specify a valid baseboard"
- exit 1
-fi
-
-# Make sure the variant doesn't already exist.
-if [[ -e "${VARIANT}" ]]; then
- echo "${VARIANT} already exists; have you already created this variant?"
- exit 1
-fi
-
-# Start a branch. Use YMD timestamp to avoid collisions.
-DATE=$(date +%Y%m%d)
-repo start "create_${VARIANT}_${DATE}" . || exit 1
-
-mkdir "${VARIANT}"
-cp "${BASE}"/* "${VARIANT}"
-# TODO replace the base name with the variant name in the copied files,
-# TODO except for the BASEBOARD=${BASE^^} line in build.mk.
-
-# Build the code; exit if it fails.
-pushd .. || exit 1
-make BOARD=${VARIANT} || exit 1
-popd || exit 1
-
-git add "${VARIANT}"/*
-
-# Now commit the files.
-git commit -sm "${VARIANT}: Initial EC image
-
-The starting point for the ${VARIANT} EC image
-
-BUG=${BUG}
-BRANCH=none
-TEST=make BOARD=${VARIANT}"
-
-echo "Please check all the files (git show), make any changes you want,"
-echo "and then repo upload."