diff options
author | Paul Fagerburg <pfagerburg@chromium.org> | 2019-10-28 11:27:04 -0600 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-10-30 08:26:16 +0000 |
commit | f1ca63ca40d27287b0b187d9763f06ce8ef56efb (patch) | |
tree | 37a3871d8cbe3cfd2e1cc190fb992a1aab08159b | |
parent | 480d927b023ee7c3f6ae5ac2de0245e890b927c8 (diff) |
automation: add GPIOs and version number, change branch name
* Add defines for GPIO_MEM_CONFIG_0:3 in the template file, so
that code that relies on these defines can compile. Because they
are preprocessor symbols, there is no way to define them as
__weak in the baseboard header and allow the variant to override
as needed, so they need to be defined here and changed if needed.
* 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
Signed-off-by: Paul Fagerburg <pfagerburg@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36408
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
-rwxr-xr-x | util/mainboard/google/hatch/create_coreboot_variant.sh | 11 | ||||
-rw-r--r-- | util/mainboard/google/hatch/template/include/variant/gpio.h | 7 |
2 files changed, 15 insertions, 3 deletions
diff --git a/util/mainboard/google/hatch/create_coreboot_variant.sh b/util/mainboard/google/hatch/create_coreboot_variant.sh index 569143f795..184e54c810 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 @@ fi # 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 @@ git add Kconfig Kconfig.name # 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}" diff --git a/util/mainboard/google/hatch/template/include/variant/gpio.h b/util/mainboard/google/hatch/template/include/variant/gpio.h index 1322233ad0..3b07c1ba20 100644 --- a/util/mainboard/google/hatch/template/include/variant/gpio.h +++ b/util/mainboard/google/hatch/template/include/variant/gpio.h @@ -16,4 +16,11 @@ #include <baseboard/gpio.h> +/* Memory configuration board straps */ +/* Copied from baseboard and may need to change for the new variant. */ +#define GPIO_MEM_CONFIG_0 GPP_F20 +#define GPIO_MEM_CONFIG_1 GPP_F21 +#define GPIO_MEM_CONFIG_2 GPP_F11 +#define GPIO_MEM_CONFIG_3 GPP_F22 + #endif |