Skip to content

Commit 80fa14e

Browse files
committed
scripts: create symlink for community base FW binary
Currently the symlink for sof-ipc4/platform/sof-basefw.ri is not created when building a deployable build. Fix this so that developers can create a deployable build that can be copied directly to target from staging directory via rsync/scp as-is. Adds new --deployable-dev-build flag to enable this feature. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
1 parent 718b745 commit 80fa14e

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

scripts/xtensa-build-zephyr.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,9 @@ def parse_args():
405405
help="Build menuconfig for target")
406406
parser.add_argument("-z", "--zephyrsdk", required=False, action="store_true",
407407
help="Force Build using Zephyr SDK for target")
408+
parser.add_argument("--deployable-dev-build", required=False, action="store_true",
409+
help="""Create a deployable development build linking binaries to default""")
410+
408411

409412
args = parser.parse_args()
410413

@@ -1159,6 +1162,17 @@ def install_platform(platform, sof_output_dir, platf_build_environ, platform_wco
11591162

11601163
os.makedirs(alias_key_dir, exist_ok=True)
11611164
symlink_or_copy(install_key_dir, output_fwname, alias_key_dir, alias_fwname)
1165+
1166+
if args.deployable_dev_build:
1167+
# Also create the "plain" sof-<platform>.ri symlink in the
1168+
# sof/<vendor>/sof-ipc4/<platform> directory, so that when
1169+
# copying the entire sof/<vendor>/sof-ipc4 directory to
1170+
# the target, all platforms are there.
1171+
alias_vendor_dir = pathlib.Path(sof_output_dir, p_alias).parent
1172+
alias_ipc4_dir = pathlib.Path(alias_vendor_dir, p_alias)
1173+
alias_install_key_dir = alias_ipc4_dir / "community"
1174+
os.makedirs(alias_ipc4_dir, exist_ok=True)
1175+
symlink_or_copy(alias_install_key_dir, alias_fwname, alias_ipc4_dir, alias_fwname)
11621176
else:
11631177
# non deployable builds and IPC3 deployable builds are using the same symlink scheme
11641178
# The production key is usually different

0 commit comments

Comments
 (0)