Martin L Roth submitted this change.

View Change

Approvals: Paul Menzel: Looks good to me, but someone else must approve Angel Pons: Looks good to me, but someone else must approve build bot (Jenkins): Verified Martin L Roth: Looks good to me, approved
abuild: Fix board variant handling

Problem:
Me: $ util/abuild/abuild -t asus/p2b -b p2b-ls
abuild: No such target: asus/p2b, variant: p2b-ls

Cause: We identify boards and variants using path names in tree, so
I type in the test command above. abuild identifies all board variants
the Kconfig way, in all caps and all underscores.

Result: Expectation gap and abuild can't find anything where we expect
it to. All variants with a hyphen in their names are affected.

Fix: Add a substitution to replace hyphens with underscores.

Test: I get my abuild with the command above, even a variant-specific
test config works.

Change-Id: I10d5b471dac41c50a85c4a309ec561b02687bb9a
Signed-off-by: Keith Hui <buurin@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41918
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
---
M util/abuild/abuild
1 file changed, 1 insertion(+), 1 deletion(-)

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

To view, visit change 41918. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I10d5b471dac41c50a85c4a309ec561b02687bb9a
Gerrit-Change-Number: 41918
Gerrit-PatchSet: 2
Gerrit-Owner: Keith Hui <buurin@gmail.com>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Julius Werner <jwerner@chromium.org>
Gerrit-Reviewer: Martin L Roth <gaumless@gmail.com>
Gerrit-Reviewer: Paul Menzel <paulepanter@mailbox.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-MessageType: merged