new_variant: updates for dedede boards

Dedede boards are using a 16MB SPI ROM now, and waddledoo-based
boards in particular are no longer using static ACPI for the
camera, so update the options written to Kconfig.name.
Because of the 16MB SPI ROM, we also need to use a different
fitimage in the end-to-end test so that the image will link
correctly.

BUG=b:168755528
TEST=`testdata/new_variant_fulltest.sh waddledoo` succeeds.
All other reference boards (waddledee, puff, hatch, trembyle, and
dalboz) also succeed.

Change-Id: I15d4455da2b9d7e0899f9485c1e092c661655245
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/dev-util/+/2425243
Tested-by: Paul Fagerburg <pfagerburg@chromium.org>
Reviewed-by: Karthikeyan Ramasubramanian <kramasub@chromium.org>
Commit-Queue: Paul Fagerburg <pfagerburg@chromium.org>
diff --git a/contrib/variant/kconfig.py b/contrib/variant/kconfig.py
index a687ef7..9739de1 100755
--- a/contrib/variant/kconfig.py
+++ b/contrib/variant/kconfig.py
@@ -141,16 +141,13 @@
             print('\tbool "-> ' + capitalized + '"', file=outfile)
             print('\tselect BOARD_GOOGLE_BASEBOARD_DEDEDE', file=outfile)
             print('\tselect BASEBOARD_DEDEDE_LAPTOP', file=outfile)
-            print('\tselect BOARD_ROMSIZE_KB_32768', file=outfile)
         elif baseboard_name == 'waddledoo':
             print('\nconfig ' + 'BOARD_GOOGLE_' + uppercase, file=outfile)
             print('\tbool "-> ' + capitalized + '"', file=outfile)
             print('\tselect BOARD_GOOGLE_BASEBOARD_DEDEDE', file=outfile)
             print('\tselect BASEBOARD_DEDEDE_LAPTOP', file=outfile)
-            print('\tselect BOARD_ROMSIZE_KB_32768', file=outfile)
             print('\tselect DRIVERS_GENERIC_MAX98357A', file=outfile)
             print('\tselect DRIVERS_I2C_DA7219', file=outfile)
-            print('\tselect VARIANT_HAS_CAMERA_ACPI', file=outfile)
         elif baseboard_name == 'puff':
             print('\nconfig ' + 'BOARD_GOOGLE_' + uppercase, file=outfile)
             print('\tbool "-> ' + capitalized + '"', file=outfile)
diff --git a/contrib/variant/testdata/new_variant_fulltest.sh b/contrib/variant/testdata/new_variant_fulltest.sh
index 0b357a6..0244869 100755
--- a/contrib/variant/testdata/new_variant_fulltest.sh
+++ b/contrib/variant/testdata/new_variant_fulltest.sh
@@ -43,6 +43,12 @@
 #
 # Intel-based reference boards only:
 #
+# FITIMAGE - the base name of the fitimage binary to copy for making a
+#   fake fitimage for the new board. This will almost always be the same
+#   as REFERENCE, but for Waddledee and Waddledoo, it will be Drawcia,
+#   because Waddledee and Waddledoo have a 32 MB SPI ROM, while all the
+#   other variants use 16 MB, so we need to use a 16 MB fitimage for
+#   the build to succeed.
 # FITIMAGE_OUTPUTS_DIR - the directory where gen_fit_image.sh will place
 #   the fitimage files.
 # FITIMAGE_FILES_DIR - the directory where commit_fitimage.sh moves (or copies)
@@ -54,6 +60,7 @@
   hatch)
     BASE=hatch
     NEW=tiamat
+    FITIMAGE=hatch
     FITIMAGE_OUTPUTS_DIR=/mnt/host/source/src/private-overlays/baseboard-hatch-private/sys-boot/coreboot-private-files-hatch/asset_generation/outputs
     FITIMAGE_FILES_DIR=/mnt/host/source/src/private-overlays/baseboard-hatch-private/sys-boot/coreboot-private-files-hatch/files
     ;;
@@ -64,6 +71,7 @@
     CONFIG_DIR=/mnt/host/source/src/project/puff
     OVERLAY_DIR=/mnt/host/source/src/private-overlays/overlay-puff-private/chromeos-base/chromeos-config-bsp-puff-private
     EBUILD=chromeos-config-bsp-puff-private-9999.ebuild
+    FITIMAGE=puff
     FITIMAGE_OUTPUTS_DIR=/mnt/host/source/src/private-overlays/baseboard-puff-private/sys-boot/coreboot-private-files-puff/asset_generation/outputs
     FITIMAGE_FILES_DIR=/mnt/host/source/src/private-overlays/baseboard-puff-private/sys-boot/coreboot-private-files-puff/files
     ;;
@@ -74,6 +82,7 @@
     CONFIG_DIR=/mnt/host/source/src/project/volteer
     OVERLAY_DIR=/mnt/host/source/src/private-overlays/overlay-volteer-private/chromeos-base/chromeos-config-bsp-volteer-private
     EBUILD=chromeos-config-bsp-volteer-private-9999.ebuild
+    FITIMAGE=volteer
     FITIMAGE_OUTPUTS_DIR=/mnt/host/source/src/private-overlays/baseboard-volteer-private/sys-boot/coreboot-private-files-baseboard-volteer/asset_generation/outputs
     FITIMAGE_FILES_DIR=/mnt/host/source/src/private-overlays/baseboard-volteer-private/sys-boot/coreboot-private-files-baseboard-volteer/files
     ;;
@@ -84,6 +93,7 @@
     CONFIG_DIR=/mnt/host/source/src/project/dedede
     OVERLAY_DIR=/mnt/host/source/src/private-overlays/overlay-dedede-private/chromeos-base/chromeos-config-bsp-dedede-private
     EBUILD=chromeos-config-bsp-dedede-private-9999.ebuild
+    FITIMAGE=drawcia
     FITIMAGE_OUTPUTS_DIR=/mnt/host/source/src/private-overlays/baseboard-dedede-private/sys-boot/coreboot-private-files-baseboard-dedede/asset_generation/outputs
     FITIMAGE_FILES_DIR=/mnt/host/source/src/private-overlays/baseboard-dedede-private/sys-boot/coreboot-private-files-baseboard-dedede/files/blobs
     ;;
@@ -186,17 +196,17 @@
 # the chroot.
 if [[ ! -z ${FITIMAGE_OUTPUTS_DIR+x} ]] ; then
   pushd "${FITIMAGE_OUTPUTS_DIR}"
-  cp "${FITIMAGE_FILES_DIR}/fitimage-${REFERENCE}.bin" "fitimage-${NEW}.bin"
-  cp "${FITIMAGE_FILES_DIR}/fitimage-${REFERENCE}-versions.txt" "fitimage-${NEW}-versions.txt"
+  cp "${FITIMAGE_FILES_DIR}/fitimage-${FITIMAGE}.bin" "fitimage-${NEW}.bin"
+  cp "${FITIMAGE_FILES_DIR}/fitimage-${FITIMAGE}-versions.txt" "fitimage-${NEW}-versions.txt"
   # Volteer requires some extra files; the FIT log is named after the
   # variant, and there are two other blobs that are customized to the
   # variant and have names to reflect it.
   if [[ "${REFERENCE}" == "volteer" ]] ; then
-    cp "fit-${REFERENCE}.log" "fit-${NEW}.log"
+    cp "fit-${FITIMAGE}.log" "fit-${NEW}.log"
     popd
     pushd "${FITIMAGE_FILES_DIR}/blobs"
-    cp "csme-${REFERENCE}.bin" "csme-${NEW}.bin"
-    cp "descriptor-${REFERENCE}.bin" "descriptor-${NEW}.bin"
+    cp "csme-${FITIMAGE}.bin" "csme-${NEW}.bin"
+    cp "descriptor-${FITIMAGE}.bin" "descriptor-${NEW}.bin"
   fi
   popd
 fi