Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable-v2.8] clean cherry-pick of xtensa-build-zephyr --deployable #8858

Merged
merged 11 commits into from
Feb 13, 2024
Merged
Prev Previous commit
Next Next commit
xtensa-build-zephyr.py: Print out the platform aliases in help
Print platform alias information to reduce the need for guessing when
trying to figure out what platform supports what platform.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
(cherry picked from commit 7e42c43)
  • Loading branch information
ujfalusi authored and marc-hb committed Feb 12, 2024
commit a1948f9efd9ed2aa4a5db25e32ef59e785a784f8
15 changes: 11 additions & 4 deletions scripts/xtensa-build-zephyr.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,10 @@ def parse_args():
" └── RG-2017.8{}/\n".format(xtensa_tools_version_postfix) +
" └── XtensaTools/\n" +
"$XTENSA_TOOLS_ROOT=/path/to/myXtensa ...\n" +
f"Supported platforms: {list(platform_configs)}"))

f"\nSupported platforms: {list(platform_configs)}"), add_help=False)

parser.add_argument('-h', '--help', action='store_true', help='show help')
parser.add_argument("-a", "--all", required=False, action="store_true",
help="Build all currently supported platforms")
parser.add_argument("platforms", nargs="*", action=validate_platforms_arguments,
Expand Down Expand Up @@ -263,9 +265,14 @@ def parse_args():
args.platforms = list(platform_configs_all)

# print help message if no arguments provided
if len(sys.argv) == 1:
parser.print_help()
sys.exit(0)
if len(sys.argv) == 1 or args.help:
for platform in platform_configs:
if platform_configs[platform].aliases:
parser.epilog += "\nPlatform aliases for '" + platform + "':\t"
parser.epilog += f"{list(platform_configs[platform].aliases)}"

parser.print_help()
sys.exit(0)

if args.fw_naming == 'AVS':
if not args.use_platform_subdir:
Expand Down