Paul Fagerburg has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/36408 )
Change subject: automation: add version number and change branch name ......................................................................
automation: add version number and change branch name
* Add a version number for the script and an "auto-generated by" line in the git commit message. * Change the branch name so that it's not the same as the ones that the other scripts will create, so that repo upload on those CLs won't affect this one.
BUG=b:140261109 BRANCH=None TEST=Create and build the "sushi" variant: $ util/mainboard/google/hatch/create_coreboot_variant.sh sushi $ util/abuild/abuild -p none -t google/hatch -x -a
Prior to this CL, you would get an error message that SPD_SOURCES is not set. If you fixed that, then you would get failures for GPIO_MEM_CONFIG_0, _1, _2, and _3 not defined, and/or gpio_table[] and early_gpio_table[] not defined. After the CL, the build proceeds.
Change-Id: I0f48d6bb9544cad6d419d3a6fbb17f57200938b2 --- M util/mainboard/google/hatch/create_coreboot_variant.sh 1 file changed, 8 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/08/36408/1
diff --git a/util/mainboard/google/hatch/create_coreboot_variant.sh b/util/mainboard/google/hatch/create_coreboot_variant.sh index 569143f..184e54c 100755 --- a/util/mainboard/google/hatch/create_coreboot_variant.sh +++ b/util/mainboard/google/hatch/create_coreboot_variant.sh @@ -13,11 +13,14 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details.
+VERSION="1.0.0" +SCRIPT=$(basename -- "${0}") + export LC_ALL=C
if [[ "$#" -lt 1 ]]; then - echo "Usage: $0 variant_name [b:bug_number]" - echo "e.g. $0 kohaku b:140261109" + echo "Usage: ${SCRIPT} variant_name [b:bug_number]" + echo "e.g. ${SCRIPT} kohaku b:140261109" echo "Adds a new variant of Hatch to Kconfig and Kconfig.name, creates the" echo "skeleton files for acpi, ec, and gpio, copies the makefile for" echo "SPD sources, and sets up a basic overridetree" @@ -56,7 +59,7 @@
# Start a branch. Use YMD timestamp to avoid collisions. DATE=$(date +%Y%m%d) -git checkout -b "create_${VARIANT}_${DATE}" || exit 1 +git checkout -b "coreboot_${VARIANT}_${DATE}" || exit 1
# Copy the template tree to the target. mkdir -p "variants/${VARIANT}/" @@ -75,6 +78,8 @@ # Now commit the files. git commit -sm "${BASE}: Create ${VARIANT} variant
+(Auto-Generated by ${SCRIPT} version ${VERSION}). + BUG=${BUG} TEST=util/abuild/abuild -p none -t google/${BASE} -x -a make sure the build includes GOOGLE_${VARIANT_UPPER}"