Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions scripts/xtensa-build-zephyr.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def parse_args():
if args.clone_mode and not args.z:
args.z = "main" # set default name for -z if -c specified

if args.west_path: # allow user override path to zephyr project
if args.west_path: # let the user provide an already existing zephyrproject/ anywhere
west_top = pathlib.Path(args.west_path)
elif not args.clone_mode: # if neather -p nor -c provided, use -p
args.west_path = west_top
Expand Down Expand Up @@ -422,11 +422,6 @@ def run_clone_mode():
create_zephyr_directory()
west_init_update()
git_submodules_update()
if args.platforms:
build_platforms()
show_installed_files()
else:
git_submodules_update()

def run_point_mode():
global west_top, SOF_TOP
Expand All @@ -438,9 +433,6 @@ def run_point_mode():
raise FileNotFoundError("West topdir returned {} as workspace but it"
" does not exist".format(west_workspace_path))
create_zephyr_sof_symlink()
if args.platforms:
build_platforms()
show_installed_files()

def main():
parse_args()
Expand All @@ -450,11 +442,17 @@ def main():
else:
print("Building platforms: {}".format(" ".join(args.platforms)))

# Two mutually exclusive working modes are supported
# we made two modes mutually exclusive with argparse
if args.west_path:
# check west_path input + create symlink if needed
run_point_mode()
if args.clone_mode:
# Initialize zephyr project with west
run_clone_mode()

if args.platforms:
build_platforms()
show_installed_files()

if __name__ == "__main__":
main()