diff options
author | Paul Fagerburg <pfagerburg@chromium.org> | 2020-02-18 08:48:22 -0700 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2020-02-21 16:55:58 +0000 |
commit | 291a014e158d856b5583ff192d9300115d4cec1c (patch) | |
tree | 533b4a689a94a033e0a20d6ff40ae469ef287c98 /util/mainboard/google/create_coreboot_variant.sh | |
parent | 17f0f0118853f3f35897cf5aa14661eb9ec08ac5 (diff) | |
download | coreboot-291a014e158d856b5583ff192d9300115d4cec1c.tar.xz |
util/mainboard/google: deduplicate create_coreboot_variant.sh
create_coreboot_variant.sh and kconfig.py have moved to the chromium
repo, in src/platform/dev/contrib/variant (see crrev.com/c/2052338),
so remove them from the coreboot repo.
BUG=b:149410618
BRANCH=None
TEST=N/A
Cq-Depend: chromium:2052338
Signed-off-by: Paul Fagerburg <pfagerburg@chromium.org>
Change-Id: Ie27f68bfd978be5e2b1a2f0789d574749825f6fc
Reviewed-on: https://review.coreboot.org/c/coreboot/+/38979
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Justin TerAvest <teravest@chromium.org>
Diffstat (limited to 'util/mainboard/google/create_coreboot_variant.sh')
-rwxr-xr-x | util/mainboard/google/create_coreboot_variant.sh | 94 |
1 files changed, 0 insertions, 94 deletions
diff --git a/util/mainboard/google/create_coreboot_variant.sh b/util/mainboard/google/create_coreboot_variant.sh deleted file mode 100755 index dcbacb99cd..0000000000 --- a/util/mainboard/google/create_coreboot_variant.sh +++ /dev/null @@ -1,94 +0,0 @@ -#!/bin/bash -# -# This file is part of the coreboot project. -# -# Copyright 2019 Google LLC. -# -# 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. - -VERSION="2.0.0" -SCRIPT=$(basename -- "${0}") - -export LC_ALL=C - -if [[ "$#" -lt 3 ]]; then - echo "Usage: ${SCRIPT} base_name reference_name variant_name [bug_number]" - echo "e.g. ${SCRIPT} hatch hatch kohaku b:140261109" - echo "e.g. ${SCRIPT} zork trembyle dalboz" - echo "* Adds a new variant of the baseboard to Kconfig and Kconfig.name" - echo "* Copies the template files for the baseboard to the new variant" - exit 1 -fi - -# This is the name of the base board -# ${var,,} converts to all lowercase. -BASE="${1,,}" -# This is the name of the reference board that we're using to make the variant. -REFERENCE="${2,,}" -# This is the name of the variant that is being cloned. -# ${var,,} converts to all lowercase; ${var^^} is all uppercase. -VARIANT="${3,,}" -VARIANT_UPPER="${VARIANT^^}" - -# Assign BUG= text, or "None" if that parameter wasn't specified. -BUG=${4:-None} - -# This script lives in util/mainboard/google -# The template files are in util/mainboard/google/${BASE}/templates -# We need to create files in src/mainboard/google/${BASE}/variants/${VARIANT} -pushd "${BASH_SOURCE%/*}" || exit 1 -SRC=$(pwd) -popd || exit 1 -pushd "${SRC}/../../../src/mainboard/google/${BASE}" || { - echo "The baseboard directory for ${BASE} does not exist."; - exit 1; } - -# Make sure the variant doesn't already exist. -if [[ -e variants/${VARIANT} ]]; then - echo "variants/${VARIANT} already exists." - echo "Have you already created this variant?" - exit 1 -fi - -# Start a branch. Use YMD timestamp to avoid collisions. -DATE=$(date +%Y%m%d) -git checkout -b "coreboot_${VARIANT}_${DATE}" || exit 1 - -# Copy the template tree to the target. -mkdir -p "variants/${VARIANT}/" -cp -pr "${SRC}/${BASE}/template/." "variants/${VARIANT}/" -if [[ -e "variants/${VARIANT}/Kconfig" ]]; then - sed -i -e "s/BOARD_GOOGLE_TEMPLATE/BOARD_GOOGLE_${VARIANT_UPPER}/" \ - "variants/${VARIANT}/Kconfig" -fi -git add "variants/${VARIANT}/" - -# Now add the new variant to Kconfig and Kconfig.name -# These files are in the current directory, e.g. src/mainboard/google/hatch -"${SRC}/kconfig.py" --board "${BASE}" --variant "${VARIANT}" || exit 1 - -mv Kconfig.new Kconfig -mv Kconfig.name.new Kconfig.name - -git add Kconfig Kconfig.name - -# Now commit the files. -git commit -sm "${BASE}: Create ${VARIANT} variant - -Create the ${VARIANT} variant of the ${REFERENCE} reference -board by copying the template files to a new directory named -for the variant. - -(Auto-Generated by ${SCRIPT} version ${VERSION}). - -BUG=${BUG} -BRANCH=None -TEST=util/abuild/abuild -p none -t google/${BASE} -x -a -make sure the build includes GOOGLE_${VARIANT_UPPER}" |