diff --git a/build_sdk.py b/build_sdk.py index b3d19d553..6df5684ad 100644 --- a/build_sdk.py +++ b/build_sdk.py @@ -428,6 +428,8 @@ def main() -> None: parser.add_argument("--skip-tool", action="store_true", help="Tool will not be built") parser.add_argument("--skip-docs", action="store_true", help="Docs will not be built") parser.add_argument("--skip-tar", action="store_true", help="SDK and source tarballs will not be built") + parser.add_argument("--experimental-num-domains", type=int, help="[EXPERIMENTAL] Number of kernel domains") + parser.add_argument("--experimental-domain-schedule", type=Path, help="[EXPERIMENTAL] Path to C file specifying kernel domain schedule") args = parser.parse_args() @@ -451,6 +453,15 @@ def main() -> None: else: selected_configs = SUPPORTED_CONFIGS + if args.experimental_num_domains is not None: + if args.experimental_domain_schedule is None: + raise Exception("User must specify --experimental-domain-schedule when specifying --experimental-num-domains") + for config in selected_configs: + config.kernel_options["KernelNumDomains"] = str(args.experimental_num_domains) + config.kernel_options["KernelDomainSchedule"] = args.experimental_domain_schedule + elif args.experimental_domain_schedule is not None: + raise Exception("User must specify --experimental-num-domains when specifying --experimental-domain-schedule") + sel4_dir = args.sel4.expanduser() if not sel4_dir.exists(): raise Exception(f"sel4_dir: {sel4_dir} does not exist")