UPSTREAM: abuild: Fix board variant handling

Problem:

I type in the test command above. abuild identifies all board variants
the Kconfig way, in all caps and all underscores.

it to. All variants with a hyphen in their names are affected.

test config works.

(cherry picked from commit 863d3eb9354cbb8161fcffc7d228220c08272080)

Original-Me: $ util/abuild/abuild -t asus/p2b -b p2b-ls
Original-abuild: No such target: asus/p2b, variant: p2b-ls
Original-Cause: We identify boards and variants using path names in tree, so
Original-Result: Expectation gap and abuild can't find anything where we expect
Original-Fix: Add a substitution to replace hyphens with underscores.
Original-Test: I get my abuild with the command above, even a variant-specific
Original-Change-Id: I10d5b471dac41c50a85c4a309ec561b02687bb9a
Original-Signed-off-by: Keith Hui <buurin@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/c/coreboot/+/41918
Original-Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Martin L Roth <gaumless@gmail.com>
Original-Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
GitOrigin-RevId: 863d3eb9354cbb8161fcffc7d228220c08272080
Change-Id: I8f91bf64c9cd21c250552174ad86d41e22f79838
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/coreboot/+/4756298
Tested-by: ChromeOS Prod (Robot) <chromeos-ci-prod@chromeos-bot.iam.gserviceaccount.com>
Reviewed-by: Reka Norman <rekanorman@chromium.org>
Commit-Queue: Reka Norman <rekanorman@chromium.org>
diff --git a/util/abuild/abuild b/util/abuild/abuild
index 233a661..0e7e97b 100755
--- a/util/abuild/abuild
+++ b/util/abuild/abuild
@@ -181,7 +181,7 @@
 	local targets
 	local VARIANT_UC
 
-	VARIANT_UC=$(echo "${variant}" | tr '[:lower:]' '[:upper:]')
+	VARIANT_UC=$(echo "${variant}" | tr '[:lower:]' '[:upper:]' | tr '-' '_')
 
 	targets=$(get_mainboards "$1")
 	if [ -n "$targets" ]; then