From 95d645f2a01a5ca083d52c6d1129ac002f313397 Mon Sep 17 00:00:00 2001 From: Mason Tran Date: Tue, 16 Jul 2024 11:52:20 -0400 Subject: [PATCH] [slc] move `slc` folder to `third_party/silabs/` to maintain Silabs licensing (#913) --- .gitignore | 4 ++-- ot-efr32.slce | 2 +- script/build | 6 +++--- script/build_example_apps | 6 +++--- script/generate | 4 ++-- script/generate_cmake.py | 2 +- .../silabs/slc}/component/ot_core_vendor_extension.slcc | 0 .../silabs/slc}/component/ot_crash_handler.slcc | 0 .../silabs/slc}/component/ot_stack_features_config.slcc | 0 .../platform_library/CMakeLists.txt.jinja | 0 .../slc}/exporter_templates/platform_library/macros.jinja | 0 .../exporter_templates/platform_library/mbedtls.cmake.jinja | 0 .../silabs/slc}/exporter_templates/yaml/custom.Makefile | 0 .../silabs/slc}/exporter_templates/yaml/custom.project.mak | 0 .../slc}/platform_projects/openthread-efr32-rcp-spi.slcp | 0 .../slc}/platform_projects/openthread-efr32-rcp-uart.slcp | 0 ...openthread-efr32-soc-with-buttons-power-manager-csl.slcp | 0 .../openthread-efr32-soc-with-buttons-power-manager.slcp | 0 .../openthread-efr32-soc-with-buttons.slcp | 0 .../silabs/slc}/platform_projects/openthread-efr32-soc.slcp | 0 20 files changed, 12 insertions(+), 12 deletions(-) rename {slc => third_party/silabs/slc}/component/ot_core_vendor_extension.slcc (100%) rename {slc => third_party/silabs/slc}/component/ot_crash_handler.slcc (100%) rename {slc => third_party/silabs/slc}/component/ot_stack_features_config.slcc (100%) rename {slc => third_party/silabs/slc}/exporter_templates/platform_library/CMakeLists.txt.jinja (100%) rename {slc => third_party/silabs/slc}/exporter_templates/platform_library/macros.jinja (100%) rename {slc => third_party/silabs/slc}/exporter_templates/platform_library/mbedtls.cmake.jinja (100%) rename {slc => third_party/silabs/slc}/exporter_templates/yaml/custom.Makefile (100%) rename {slc => third_party/silabs/slc}/exporter_templates/yaml/custom.project.mak (100%) rename {slc => third_party/silabs/slc}/platform_projects/openthread-efr32-rcp-spi.slcp (100%) rename {slc => third_party/silabs/slc}/platform_projects/openthread-efr32-rcp-uart.slcp (100%) rename {slc => third_party/silabs/slc}/platform_projects/openthread-efr32-soc-with-buttons-power-manager-csl.slcp (100%) rename {slc => third_party/silabs/slc}/platform_projects/openthread-efr32-soc-with-buttons-power-manager.slcp (100%) rename {slc => third_party/silabs/slc}/platform_projects/openthread-efr32-soc-with-buttons.slcp (100%) rename {slc => third_party/silabs/slc}/platform_projects/openthread-efr32-soc.slcp (100%) diff --git a/.gitignore b/.gitignore index 505f8f52..875a32ae 100644 --- a/.gitignore +++ b/.gitignore @@ -77,8 +77,8 @@ __pycache__ # slc-cli ?/ -slc/slc_cli/ -slc/**/*.zip +**/third_party/silabs/slc/slc_cli/ +**/third_party/silabs/slc/**/*.zip .cache .toolchain \ No newline at end of file diff --git a/ot-efr32.slce b/ot-efr32.slce index 4dd1da9d..580461f1 100644 --- a/ot-efr32.slce +++ b/ot-efr32.slce @@ -6,4 +6,4 @@ sdk: id: gecko_sdk version: 4.4.0 component_path: - - path: slc/component + - path: third_party/silabs/slc/component diff --git a/script/build b/script/build index 22a53621..61b91793 100755 --- a/script/build +++ b/script/build @@ -110,7 +110,7 @@ generate() echo "=========================================================================================================" set -x "${repo_dir}/script/generate" \ - "${repo_dir}/slc/platform_projects/openthread-efr32-soc.slcp" \ + "${repo_dir}/third_party/silabs/slc/platform_projects/openthread-efr32-soc.slcp" \ "${slc_generated_projects_dir}/soc" \ "${board}" fi @@ -121,7 +121,7 @@ generate() echo "=========================================================================================================" set -x "${repo_dir}/script/generate" \ - "${repo_dir}/slc/platform_projects/openthread-efr32-rcp-uart.slcp" \ + "${repo_dir}/third_party/silabs/slc/platform_projects/openthread-efr32-rcp-uart.slcp" \ "${slc_generated_projects_dir}/rcp_uart" \ "${board}" fi @@ -132,7 +132,7 @@ generate() echo "=========================================================================================================" set -x "${repo_dir}/script/generate" \ - "${repo_dir}/slc/platform_projects/openthread-efr32-rcp-spi.slcp" \ + "${repo_dir}/third_party/silabs/slc/platform_projects/openthread-efr32-rcp-spi.slcp" \ "${slc_generated_projects_dir}/rcp_spi" \ "${board}" fi diff --git a/script/build_example_apps b/script/build_example_apps index 7a1e15b6..75c92a8e 100755 --- a/script/build_example_apps +++ b/script/build_example_apps @@ -174,13 +174,13 @@ get_associated_slcp() case "${cmake_executable}" in sleepy-demo-ftd) - echo "${repo_dir}/slc/platform_projects/openthread-efr32-soc-with-buttons.slcp" + echo "${repo_dir}/third_party/silabs/slc/platform_projects/openthread-efr32-soc-with-buttons.slcp" ;; sleepy-demo-mtd) - echo "${repo_dir}/slc/platform_projects/openthread-efr32-soc-with-buttons-power-manager.slcp" + echo "${repo_dir}/third_party/silabs/slc/platform_projects/openthread-efr32-soc-with-buttons-power-manager.slcp" ;; sleepy-demo-ssed) - echo "${repo_dir}/slc/platform_projects/openthread-efr32-soc-with-buttons-power-manager-csl.slcp" + echo "${repo_dir}/third_party/silabs/slc/platform_projects/openthread-efr32-soc-with-buttons-power-manager-csl.slcp" ;; *) die "Unknown CMake executable: ${cmake_executable}" diff --git a/script/generate b/script/generate index 4691db1c..e6f3b6bd 100755 --- a/script/generate +++ b/script/generate @@ -180,7 +180,7 @@ generate() project_name="${project_line//project_name:/}" project_name="${project_name// /}" local generation_dir=${2?A generation output dir is expected as the second argument} - local export_templates="${repo_dir}/slc/exporter_templates/platform_library" + local export_templates="${repo_dir}/third_party/silabs/slc/exporter_templates/platform_library" local board=${3?A board is expected as the third argument} local build_dir=${OT_CMAKE_BUILD_DIR-"${repo_dir}/build/${board}"} local openthread_slc_data=${openthread_slc_data-"${build_dir}/slc/openthread_slc.data"} @@ -202,7 +202,7 @@ generate() trust_sdk_and_extensions - local yaml_export_templates="${repo_dir}/slc/exporter_templates/yaml" + local yaml_export_templates="${repo_dir}/third_party/silabs/slc/exporter_templates/yaml" set +x echo echo diff --git a/script/generate_cmake.py b/script/generate_cmake.py index 8f0e47b9..754ab9d6 100755 --- a/script/generate_cmake.py +++ b/script/generate_cmake.py @@ -214,7 +214,7 @@ def f(flag: str) -> bool: script_dir: Path = Path(os.path.dirname(os.path.abspath(__file__))) repo_root: Path = script_dir.parent environment = jinja2.Environment( - loader=jinja2.FileSystemLoader(f"{repo_root}/slc/exporter_templates/platform_library")) + loader=jinja2.FileSystemLoader(f"{repo_root}/third_party/silabs/slc/exporter_templates/platform_library")) platform_lib_template: jinja2.Template = environment.get_template("CMakeLists.txt.jinja") mbedtls_lib_template: jinja2.Template = environment.get_template("mbedtls.cmake.jinja") diff --git a/slc/component/ot_core_vendor_extension.slcc b/third_party/silabs/slc/component/ot_core_vendor_extension.slcc similarity index 100% rename from slc/component/ot_core_vendor_extension.slcc rename to third_party/silabs/slc/component/ot_core_vendor_extension.slcc diff --git a/slc/component/ot_crash_handler.slcc b/third_party/silabs/slc/component/ot_crash_handler.slcc similarity index 100% rename from slc/component/ot_crash_handler.slcc rename to third_party/silabs/slc/component/ot_crash_handler.slcc diff --git a/slc/component/ot_stack_features_config.slcc b/third_party/silabs/slc/component/ot_stack_features_config.slcc similarity index 100% rename from slc/component/ot_stack_features_config.slcc rename to third_party/silabs/slc/component/ot_stack_features_config.slcc diff --git a/slc/exporter_templates/platform_library/CMakeLists.txt.jinja b/third_party/silabs/slc/exporter_templates/platform_library/CMakeLists.txt.jinja similarity index 100% rename from slc/exporter_templates/platform_library/CMakeLists.txt.jinja rename to third_party/silabs/slc/exporter_templates/platform_library/CMakeLists.txt.jinja diff --git a/slc/exporter_templates/platform_library/macros.jinja b/third_party/silabs/slc/exporter_templates/platform_library/macros.jinja similarity index 100% rename from slc/exporter_templates/platform_library/macros.jinja rename to third_party/silabs/slc/exporter_templates/platform_library/macros.jinja diff --git a/slc/exporter_templates/platform_library/mbedtls.cmake.jinja b/third_party/silabs/slc/exporter_templates/platform_library/mbedtls.cmake.jinja similarity index 100% rename from slc/exporter_templates/platform_library/mbedtls.cmake.jinja rename to third_party/silabs/slc/exporter_templates/platform_library/mbedtls.cmake.jinja diff --git a/slc/exporter_templates/yaml/custom.Makefile b/third_party/silabs/slc/exporter_templates/yaml/custom.Makefile similarity index 100% rename from slc/exporter_templates/yaml/custom.Makefile rename to third_party/silabs/slc/exporter_templates/yaml/custom.Makefile diff --git a/slc/exporter_templates/yaml/custom.project.mak b/third_party/silabs/slc/exporter_templates/yaml/custom.project.mak similarity index 100% rename from slc/exporter_templates/yaml/custom.project.mak rename to third_party/silabs/slc/exporter_templates/yaml/custom.project.mak diff --git a/slc/platform_projects/openthread-efr32-rcp-spi.slcp b/third_party/silabs/slc/platform_projects/openthread-efr32-rcp-spi.slcp similarity index 100% rename from slc/platform_projects/openthread-efr32-rcp-spi.slcp rename to third_party/silabs/slc/platform_projects/openthread-efr32-rcp-spi.slcp diff --git a/slc/platform_projects/openthread-efr32-rcp-uart.slcp b/third_party/silabs/slc/platform_projects/openthread-efr32-rcp-uart.slcp similarity index 100% rename from slc/platform_projects/openthread-efr32-rcp-uart.slcp rename to third_party/silabs/slc/platform_projects/openthread-efr32-rcp-uart.slcp diff --git a/slc/platform_projects/openthread-efr32-soc-with-buttons-power-manager-csl.slcp b/third_party/silabs/slc/platform_projects/openthread-efr32-soc-with-buttons-power-manager-csl.slcp similarity index 100% rename from slc/platform_projects/openthread-efr32-soc-with-buttons-power-manager-csl.slcp rename to third_party/silabs/slc/platform_projects/openthread-efr32-soc-with-buttons-power-manager-csl.slcp diff --git a/slc/platform_projects/openthread-efr32-soc-with-buttons-power-manager.slcp b/third_party/silabs/slc/platform_projects/openthread-efr32-soc-with-buttons-power-manager.slcp similarity index 100% rename from slc/platform_projects/openthread-efr32-soc-with-buttons-power-manager.slcp rename to third_party/silabs/slc/platform_projects/openthread-efr32-soc-with-buttons-power-manager.slcp diff --git a/slc/platform_projects/openthread-efr32-soc-with-buttons.slcp b/third_party/silabs/slc/platform_projects/openthread-efr32-soc-with-buttons.slcp similarity index 100% rename from slc/platform_projects/openthread-efr32-soc-with-buttons.slcp rename to third_party/silabs/slc/platform_projects/openthread-efr32-soc-with-buttons.slcp diff --git a/slc/platform_projects/openthread-efr32-soc.slcp b/third_party/silabs/slc/platform_projects/openthread-efr32-soc.slcp similarity index 100% rename from slc/platform_projects/openthread-efr32-soc.slcp rename to third_party/silabs/slc/platform_projects/openthread-efr32-soc.slcp