Paul Fagerburg has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/38559 )
Change subject: util: add support for Zork ......................................................................
util: add support for Zork
Update the create_coreboot_variant.sh and kconfig.py to support the zork baseboard. Full template files will be added in a later CL.
BUG=b:148161697 BRANCH=None TEST=`./create_coreboot_variant.sh zork dalboz` and verify that the changes staged are correct.
Change-Id: Ie0a29bb9f4bb8f3bb7eaeae8799cef861c395e7d --- M util/mainboard/google/create_coreboot_variant.sh M util/mainboard/google/kconfig.py A util/mainboard/google/zork/template/Makefile.inc 3 files changed, 24 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/59/38559/1
diff --git a/util/mainboard/google/create_coreboot_variant.sh b/util/mainboard/google/create_coreboot_variant.sh index 14b2115..c4ca1c6 100755 --- a/util/mainboard/google/create_coreboot_variant.sh +++ b/util/mainboard/google/create_coreboot_variant.sh @@ -13,7 +13,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details.
-VERSION="1.0.2" +VERSION="1.0.3" SCRIPT=$(basename -- "${0}")
export LC_ALL=C @@ -61,6 +61,10 @@ # 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 diff --git a/util/mainboard/google/kconfig.py b/util/mainboard/google/kconfig.py index 6f9fccf..57d9610 100755 --- a/util/mainboard/google/kconfig.py +++ b/util/mainboard/google/kconfig.py @@ -41,7 +41,7 @@ help='Name of the board variant') args = parser.parse_args()
- if args.board not in ['hatch', 'volteer']: + if args.board not in ['hatch', 'volteer', 'zork']: print('Unsupported baseboard "' + args.board + '"') sys.exit(1)
@@ -130,6 +130,11 @@ print('\tbool "-> ' + capitalized + '"', file=outfile) print('\tselect BOARD_GOOGLE_BASEBOARD_VOLTEER', file=outfile)
+ if baseboard_name == 'zork': + print('\nconfig ' + 'BOARD_GOOGLE_' + uppercase, file=outfile) + print('\tbool "-> ' + capitalized + '"', file=outfile) + print('\tselect BOARD_GOOGLE_BASEBOARD_ZORK', file=outfile) +
if __name__ == '__main__': main() diff --git a/util/mainboard/google/zork/template/Makefile.inc b/util/mainboard/google/zork/template/Makefile.inc new file mode 100644 index 0000000..38cf728 --- /dev/null +++ b/util/mainboard/google/zork/template/Makefile.inc @@ -0,0 +1,13 @@ +## This file is part of the coreboot project. +## +## 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. +## + +SPD_SOURCES =
Paul Fagerburg has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38559 )
Change subject: util: add support for Zork ......................................................................
Patch Set 1:
This CL has basic support for Zork with a nearly-empty template directory. We can either add the full templates from trembyle-bringup now, or put them in a follow-on CL.
Hello build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/38559
to look at the new patch set (#2).
Change subject: util: add support for Zork ......................................................................
util: add support for Zork
Update the create_coreboot_variant.sh and kconfig.py to support the zork baseboard. Full template files will be added in a later CL.
BUG=b:148161697 BRANCH=None TEST=`./create_coreboot_variant.sh zork dalboz` and verify that the changes staged are correct.
Signed-off-by: Paul Fagerburg pfagerburg@google.com Change-Id: Ie0a29bb9f4bb8f3bb7eaeae8799cef861c395e7d --- M util/mainboard/google/create_coreboot_variant.sh M util/mainboard/google/kconfig.py A util/mainboard/google/zork/template/Makefile.inc 3 files changed, 34 insertions(+), 12 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/59/38559/2
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38559 )
Change subject: util: add support for Zork ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/38559/2//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/38559/2//COMMIT_MSG@7 PS2, Line 7: util util/mainboard/google
Hello Eric Peers, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/38559
to look at the new patch set (#3).
Change subject: util/mainboard/google: add support for Zork ......................................................................
util/mainboard/google: add support for Zork
Update the create_coreboot_variant.sh and kconfig.py to support the zork baseboard. Full template files will be added in a later CL.
BUG=b:148161697 BRANCH=None TEST=`./create_coreboot_variant.sh zork dalboz` and verify that the changes staged are correct.
Signed-off-by: Paul Fagerburg pfagerburg@google.com Change-Id: Ie0a29bb9f4bb8f3bb7eaeae8799cef861c395e7d --- M util/mainboard/google/create_coreboot_variant.sh M util/mainboard/google/kconfig.py A util/mainboard/google/zork/template/Makefile.inc 3 files changed, 34 insertions(+), 12 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/59/38559/3
Paul Fagerburg has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38559 )
Change subject: util/mainboard/google: add support for Zork ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/38559/2//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/38559/2//COMMIT_MSG@7 PS2, Line 7: util
util/mainboard/google
Done
Hello Eric Peers, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/38559
to look at the new patch set (#4).
Change subject: util/mainboard/google: add support for Zork ......................................................................
util/mainboard/google: add support for Zork
Update the create_coreboot_variant.sh and kconfig.py to support the zork baseboard. Full template files will be added in a later CL.
BUG=b:148161697 BRANCH=None TEST=`./create_coreboot_variant.sh zork dalboz` and verify that the changes staged are correct.
Signed-off-by: Paul Fagerburg pfagerburg@google.com Change-Id: Ie0a29bb9f4bb8f3bb7eaeae8799cef861c395e7d --- M util/mainboard/google/create_coreboot_variant.sh M util/mainboard/google/kconfig.py A util/mainboard/google/zork/template/Makefile.inc 3 files changed, 46 insertions(+), 21 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/59/38559/4
Hello Eric Peers, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/38559
to look at the new patch set (#5).
Change subject: util/mainboard/google: add support for Zork ......................................................................
util/mainboard/google: add support for Zork
Update the create_coreboot_variant.sh and kconfig.py to support the zork baseboard. Full template files will be added in a later CL.
BUG=b:148161697, b:148281637 BRANCH=None TEST=`./create_coreboot_variant.sh zork dalboz` and verify that the changes staged are correct.
Signed-off-by: Paul Fagerburg pfagerburg@google.com Change-Id: Ie0a29bb9f4bb8f3bb7eaeae8799cef861c395e7d --- M util/mainboard/google/create_coreboot_variant.sh M util/mainboard/google/kconfig.py A util/mainboard/google/zork/template/Makefile.inc 3 files changed, 46 insertions(+), 21 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/59/38559/5
Hello Eric Peers, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/38559
to look at the new patch set (#6).
Change subject: util/mainboard/google: add support for Zork ......................................................................
util/mainboard/google: add support for Zork
Update the create_coreboot_variant.sh and kconfig.py to support the zork baseboard. Full template files will be added in a later CL.
BUG=b:148161697, b:148281637 BRANCH=None TEST=`./create_coreboot_variant.sh zork dalboz` and verify that the changes staged are correct.
Signed-off-by: Paul Fagerburg pfagerburg@google.com Change-Id: Ie0a29bb9f4bb8f3bb7eaeae8799cef861c395e7d --- M util/mainboard/google/create_coreboot_variant.sh M util/mainboard/google/kconfig.py A util/mainboard/google/zork/template/Makefile.inc 3 files changed, 47 insertions(+), 21 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/59/38559/6
Martin Roth has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38559 )
Change subject: util/mainboard/google: add support for Zork ......................................................................
Patch Set 6: Code-Review+2
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/38559 )
Change subject: util/mainboard/google: add support for Zork ......................................................................
util/mainboard/google: add support for Zork
Update the create_coreboot_variant.sh and kconfig.py to support the zork baseboard. Full template files will be added in a later CL.
BUG=b:148161697, b:148281637 BRANCH=None TEST=`./create_coreboot_variant.sh zork dalboz` and verify that the changes staged are correct.
Signed-off-by: Paul Fagerburg pfagerburg@google.com Change-Id: Ie0a29bb9f4bb8f3bb7eaeae8799cef861c395e7d Reviewed-on: https://review.coreboot.org/c/coreboot/+/38559 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Martin Roth martinroth@google.com --- M util/mainboard/google/create_coreboot_variant.sh M util/mainboard/google/kconfig.py A util/mainboard/google/zork/template/Makefile.inc 3 files changed, 47 insertions(+), 21 deletions(-)
Approvals: build bot (Jenkins): Verified Martin Roth: Looks good to me, approved
diff --git a/util/mainboard/google/create_coreboot_variant.sh b/util/mainboard/google/create_coreboot_variant.sh index 14b2115..dcbacb9 100755 --- a/util/mainboard/google/create_coreboot_variant.sh +++ b/util/mainboard/google/create_coreboot_variant.sh @@ -13,29 +13,32 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details.
-VERSION="1.0.2" +VERSION="2.0.0" SCRIPT=$(basename -- "${0}")
export LC_ALL=C
-if [[ "$#" -lt 2 ]]; then - echo "Usage: ${SCRIPT} base_name variant_name [bug_number]" - echo "e.g. ${SCRIPT} hatch kohaku b:140261109" +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 that we're using to make the variant. +# 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="${2,,}" +VARIANT="${3,,}" VARIANT_UPPER="${VARIANT^^}"
# Assign BUG= text, or "None" if that parameter wasn't specified. -BUG=${3:-None} +BUG=${4:-None}
# This script lives in util/mainboard/google # The template files are in util/mainboard/google/${BASE}/templates @@ -61,6 +64,10 @@ # 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 @@ -75,12 +82,13 @@ # Now commit the files. git commit -sm "${BASE}: Create ${VARIANT} variant
-Create the ${VARIANT} variant of the ${BASE} baseboard by -copying the baseboard template files to a new directory -named for the 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}" diff --git a/util/mainboard/google/kconfig.py b/util/mainboard/google/kconfig.py index 6f9fccf..1293f4a 100755 --- a/util/mainboard/google/kconfig.py +++ b/util/mainboard/google/kconfig.py @@ -1,10 +1,10 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- -"""Add a new variant to the Kconfig and Kconfig.name for the baseboard +"""Add a new variant to the Kconfig and Kconfig.name
-To start a new variant of an existing baseboard, we need to add -the variant into the Kconfig and Kconfig.name files for the -baseboard. In Kconfig, we have two sections that need additional +To start a new variant of an existing reference board, we need to +add the variant into the Kconfig and Kconfig.name files for the +reference board. In Kconfig, we have two sections that need additional entries, MAINBOARD_PART_NUMBER and VARIANT_DIR.
The MAINBOARD_PART_NUMBER and VARIANT_DIR just use various @@ -36,13 +36,13 @@ parser = argparse.ArgumentParser( description='Add strings to coreboot Kconfig for a new board variant') parser.add_argument('--board', type=str, required=True, - help='Name of the baseboard') + help='Name of the reference board') parser.add_argument('--variant', type=str, required=True, help='Name of the board variant') args = parser.parse_args()
- if args.board not in ['hatch', 'volteer']: - print('Unsupported baseboard "' + args.board + '"') + if args.board not in ['hatch', 'volteer', 'trembyle']: + print('Unsupported reference board "' + args.board + '"') sys.exit(1)
add_to_Kconfig(args.variant) @@ -95,13 +95,13 @@ print(line, file=outfile)
-def add_to_Kconfig_name(baseboard_name, variant_name): +def add_to_Kconfig_name(refboard_name, variant_name): """Add a config section for the variant to the Kconfig.name
Kconfig.name is easier to modify than Kconfig; it only has a block at the end with the new variant's details.
- baseboard_name The name of the baseboard, e.g. 'hatch' + refboard_name The name of the reference board, e.g. 'hatch' We expect the caller to have checked that it is one we support variant_name The name of the board variant, e.g. 'kohaku' """ @@ -119,17 +119,22 @@ print(line, file=outfile)
# Now add the new section - if baseboard_name == 'hatch': + if refboard_name == 'hatch': print('\nconfig ' + 'BOARD_GOOGLE_' + uppercase, file=outfile) print('\tbool "-> ' + capitalized + '"', file=outfile) print('\tselect BOARD_GOOGLE_BASEBOARD_HATCH', file=outfile) print('\tselect BOARD_ROMSIZE_KB_16384', file=outfile)
- if baseboard_name == 'volteer': + if refboard_name == 'volteer': print('\nconfig ' + 'BOARD_GOOGLE_' + uppercase, file=outfile) print('\tbool "-> ' + capitalized + '"', file=outfile) print('\tselect BOARD_GOOGLE_BASEBOARD_VOLTEER', file=outfile)
+ if refboard_name == 'trembyle': + print('\nconfig ' + 'BOARD_GOOGLE_' + uppercase, file=outfile) + print('\tbool "-> ' + capitalized + '"', file=outfile) + print('\tselect BOARD_GOOGLE_BASEBOARD_TREMBYLE', file=outfile) +
if __name__ == '__main__': main() diff --git a/util/mainboard/google/zork/template/Makefile.inc b/util/mainboard/google/zork/template/Makefile.inc new file mode 100644 index 0000000..38cf728 --- /dev/null +++ b/util/mainboard/google/zork/template/Makefile.inc @@ -0,0 +1,13 @@ +## This file is part of the coreboot project. +## +## 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. +## + +SPD_SOURCES =