[
  {
    "path": ".gitlab-ci.yml",
    "content": "stages:\n  - check\n  - build\n  - feature_test\n  - deploy\n\nvariables:\n  IDF_PATH: \"$CI_PROJECT_DIR/esp-idf\"\n  MAKEFLAGS:  \"-j8\"\n  SSC_BRANCH: \"master\"\n  IDF_BRANCH: \"master\"\n  board: \"esp32\"\n\nbefore_script:\n  # Add gitlab ssh key\n  - mkdir -p ~/.ssh\n  - chmod 700 ~/.ssh\n  - echo -n $GITLAB_KEY > ~/.ssh/id_rsa_base64\n  - base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa\n  - chmod 600 ~/.ssh/id_rsa\n  - echo -e \"Host gitlab.espressif.cn\\n\\tStrictHostKeyChecking no\\n\" >> ~/.ssh/config\n    \ncheck_lib_reversion:\n  stage: check\n  except:\n    - master\n    - /^release\\/v/\n  image: $CI_DOCKER_REGISTRY/esp32-ci-env\n  script:\n    - GIT_COMMIT_ID=`git log --pretty=\"%s\" -1 | grep -o '([0-9a-f]*)' | tail -1 | cut -c 2-8`\n    - echo \"GIT_COMMIT_ID is \"$GIT_COMMIT_ID\n    - test $(echo -n $GIT_COMMIT_ID | wc -c) -eq 7\n    - for dir in esp32 esp32s2 esp32s3 esp32c3 esp32c2 esp32c6 esp32c5 esp32_host; do grep $GIT_COMMIT_ID $dir/libcore.a; done;\n    - for dir in esp32 esp32s2 esp32s3 esp32c3 esp32c2 esp32c6 esp32c5 esp32_host; do grep $GIT_COMMIT_ID $dir/libespnow.a; done;\n    - for dir in esp32 esp32s2 esp32s3 esp32c3 esp32c6 esp32c5 esp32_host; do grep $GIT_COMMIT_ID $dir/libmesh.a; done;\n    - for dir in esp32 esp32s2 esp32s3 esp32c3 esp32c2 esp32c6 esp32c5 esp32_host; do grep $GIT_COMMIT_ID $dir/libnet80211.a; done;\n    - for dir in esp32 esp32s2 esp32s3 esp32c3 esp32c2 esp32c6 esp32c5 esp32_host; do grep $GIT_COMMIT_ID $dir/libpp.a; done;\n    - for dir in esp32 esp32s2 esp32s3 esp32c3 esp32c2 esp32c6 esp32c5 esp32_host; do grep $GIT_COMMIT_ID $dir/libsmartconfig.a; done;\n    - for dir in esp32 esp32s2 esp32s3 esp32c3 esp32c6 esp32c5 esp32_host; do grep $GIT_COMMIT_ID $dir/libwapi.a; done;\n    - for dir in esp32_host; do grep $GIT_COMMIT_ID $dir/libtarget.a; done;\n    - for dir in esp32 esp32s2 esp32s3 esp32c3 esp32c2 esp32c6 esp32c5 esp32_host; do grep $GIT_COMMIT_ID-remote $dir/libnet80211.a; done;\n    - for dir in esp32 esp32s2 esp32s3 esp32c3 esp32c2 esp32c6 esp32c5 esp32_host; do test $(grep $GIT_COMMIT_ID-dirty $dir/*.a | wc -l) -eq 0; done;\n    - for dir in esp32 esp32s2 esp32s3; do test $(xtensa-esp32-elf-nm $dir/*.a | grep -w printf | wc -l) -eq 0; done;\n    - for dir in esp32 esp32s2 esp32s3; do test $(xtensa-esp32-elf-nm $dir/*.a | grep -w ets_printf | wc -l) -eq 0; done;\n    - for dir in esp32 esp32s2 esp32s3 esp32c3 esp32c2 esp32c6 esp32c5 esp32_host; do if [ -e $dir/libwps.a ]; then exit 1; fi; done;\n    - for dir in esp32 esp32s2 esp32s3 esp32c3 esp32c2 esp32c6 esp32c5 esp32_host; do if [ -e $dir/libwpa.a ]; then exit 1; fi; done;\n    - for dir in esp32 esp32s2 esp32s3 esp32c3 esp32c2 esp32c6 esp32c5 esp32_host; do if [ -e $dir/libwpa2.a ]; then exit 1; fi; done;\n    - for dir in esp32 esp32s2 esp32s3 esp32c3 esp32c2 esp32c6 esp32c5 esp32_host; do cd $dir; for filename in *; do if [[ -x \"$file\" ]]; then echo \"Execute permissions for $dir/$filename\";  exit 1; fi; done; cd .. ; done\n\npush_master_to_github:\n  stage: deploy\n  tags:\n    - github_sync\n  only:\n    - master\n    - /^release\\/v/\n    - /^v\\d+\\.\\d+/\n#  when: on_success\n  image: $CI_DOCKER_REGISTRY/esp32-ci-env\n  variables:\n    GIT_DEPTH: 0\n  before_script: []\n  script:\n    - mkdir -p ~/.ssh\n    - chmod 700 ~/.ssh\n    - echo -n $GH_PUSH_KEY > ~/.ssh/id_rsa_base64\n    - base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa\n    - chmod 600 ~/.ssh/id_rsa\n    - echo -e \"Host github.com\\n\\tStrictHostKeyChecking no\\n\" >> ~/.ssh/config\n    - git remote remove github &>/dev/null || true\n    - git remote add github git@github.com:espressif/esp32-wifi-lib.git\n    # Ref: esp-idf tools/ci/push_to_github.sh\n    - |\n      if [ -n \"${CI_COMMIT_TAG}\" ]; then\n        git push github \"${CI_COMMIT_TAG}\"\n      else\n        git push github \"${CI_COMMIT_SHA}:refs/heads/${CI_COMMIT_REF_NAME}\"\n      fi\ninclude:\n     - 'tools/ci/config/build.yml'\n     - 'tools/ci/config/feature_test.yml'\n"
  },
  {
    "path": "LICENSE",
    "content": "\n                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "README.rst",
    "content": "ESP32 WiFi Stack Libraries\n====================\n\nThis repository contains binary libraries supporting the ESP32 series RF subsystems. It is used as a submodule within `Espressif IoT Development Framework`_ (ESP-IDF).\n\nFiles in this repository are Copyright (C) 2015-2016 Espressif Systems.\n\nThese binary libraries are provided under the same license as the parent esp-idf project - the Apache License 2.0 as provided in the file LICENSE. (The license text refers to this as \"Object\" form.)\n\n.. _Espressif IoT Development Framework: https://github.com/espressif/esp-idf\n"
  },
  {
    "path": "fix_printf.sh",
    "content": "#!/bin/bash\nCOUNT=0\nfor dir in esp32 esp32s2 esp32c3 esp32s3 esp32c2 esp32c6 esp32_host esp32c5 esp32c61 esp32s31; do\n    if [ $dir = esp32 ]; then\n        TOOLCHAIN=\"xtensa-esp32-elf\"\n    elif [ $dir = esp32s2 ]; then\n        TOOLCHAIN=\"xtensa-esp32s2-elf\"\n    elif [ $dir = esp32c3 -o $dir = esp32c2 -o $dir = esp32c6 -o $dir = esp32_host -o $dir = esp32c5 -o $dir = esp32c61 -o $dir = esp32s31 ]; then\n        TOOLCHAIN=\"riscv32-esp-elf\"\n    elif [ $dir = esp32s3 ]; then\n        TOOLCHAIN=\"xtensa-esp32s3-elf\"\n    else\n        echo \"$dir does not exist\"\n    fi\n    if [ -d \"$dir\" ]; then\n        chmod -x $dir/*;\n        cd $dir\n\n        git status libsmartconfig.a | grep \"modified\\|修改\\|new file\\|新文件\" >/dev/null 2>&1\n        if [ $? -eq 0 ]; then\n            echo $dir/libsmartconfig.a fixed\n            ((COUNT++))\n            $TOOLCHAIN-objcopy --redefine-sym printf=sc_printf libsmartconfig.a\n        fi\n\n        git status libpp.a | grep \"modified\\|修改\\|new file\\|新文件\" >/dev/null 2>&1\n        if [ $? -eq 0 ]; then\n            echo $dir/libpp.a fixed\n            ((COUNT++))\n            $TOOLCHAIN-objcopy --redefine-sym printf=pp_printf libpp.a\n            $TOOLCHAIN-objcopy --redefine-sym ets_printf=pp_printf libpp.a\n        fi\n\n        git status libnet80211.a | grep \"modified\\|修改\\|new file\\|新文件\" >/dev/null 2>&1\n        if [ $? -eq 0 ]; then\n            echo $dir/libnet80211.a fixed\n            ((COUNT++))\n            $TOOLCHAIN-objcopy --redefine-sym printf=net80211_printf libnet80211.a\n        fi\n\n        git status libtarget.a | grep \"modified\\|修改\\|new file\\|新文件\" >/dev/null 2>&1\n        if [ $? -eq 0 ]; then\n            echo $dir/libtarget.a fixed\n            ((COUNT++))\n            $TOOLCHAIN-objcopy --redefine-sym printf=target_printf libtarget.a\n        fi\n\n        git status libmesh.a | grep \"modified\\|修改\\|new file\\|新文件\" >/dev/null 2>&1\n        if [ $? -eq 0 ]; then\n            echo $dir/libmesh.a fixed\n            ((COUNT++))\n            $TOOLCHAIN-objcopy --redefine-sym printf=mesh_printf libmesh.a\n            $TOOLCHAIN-objcopy --redefine-sym ets_printf=mesh_printf libmesh.a\n        fi\n\n        git status libcore.a | grep \"modified\\|修改\\|new file\\|新文件\" >/dev/null 2>&1\n        if [ $? -eq 0 ]; then\n            echo $dir/libcore.a fixed\n            ((COUNT++))\n            $TOOLCHAIN-objcopy --redefine-sym printf=core_printf libcore.a\n            $TOOLCHAIN-objcopy --redefine-sym ets_printf=core_printf libcore.a\n        fi\n\n        git status libespnow.a | grep \"modified\\|修改\\|new file\\|新文件\" >/dev/null 2>&1\n        if [ $? -eq 0 ]; then\n            echo $dir/libespnow.a fixed\n            ((COUNT++))\n            $TOOLCHAIN-objcopy --redefine-sym ets_printf=espnow_printf libespnow.a\n            $TOOLCHAIN-objcopy --redefine-sym printf=espnow_printf libespnow.a\n        fi\n\n        git status libwapi.a | grep \"modified\\|修改\\|new file\\|新文件\" >/dev/null 2>&1\n        if [ $? -eq 0 ]; then\n            echo $dir/libwapi.a fixed\n            ((COUNT++))\n            $TOOLCHAIN-objcopy --redefine-sym ets_printf=wapi_printf libwapi.a\n            $TOOLCHAIN-objcopy --redefine-sym printf=wapi_printf libwapi.a\n        fi\n\n        cd ..\n    else\n        echo \"$dir does not exist\"\n    fi\ndone;\necho $COUNT files fixed\n"
  },
  {
    "path": "tools/ci/build_app.sh",
    "content": "#!/bin/bash\n# This file is sourced in to the CI environment\n# in .gitlab-ci.yml file\n\nset -x\n\ndie() {\n    echo \"${1:-\"Unknown Error\"}\" 1>&2\n    exit 1\n}\n\n[ -z ${IDF_PATH} ] && die \"IDF_PATH is not set.\"\n\n# Set Env\ncd ${CI_PROJECT_DIR}/esp-idf\n./install.sh || { echo \"Install Failure\"; exit 1; }\n. ./export.sh || { echo \"Export Failure\"; exit 1; }\n\n# Set Env\ncd ${CI_PROJECT_DIR}/SSC\n\n# SSC Dut\necho Running cmake for ssc app...\nif test -f \"gen_misc_ng.sh\"; then\n    ./gen_misc_ng.sh SSC\nfi\n\nif test -f \"gen_misc_idf.sh\"; then\n    ./gen_misc_idf.sh ESP32 SSC\nfi\n\n# Copying binaries to create build tar ball\ncd $CI_PROJECT_DIR\nrm -rf ${board}-${CI_PIPELINE_ID}.debug\nmkdir -p ${board}-${CI_PIPELINE_ID}.debug/\n\necho Creating ${board}-${VERSION} app binaries debug directory...\ncp ${CI_PROJECT_DIR}/SSC/build/ssc.bin $board-${CI_PIPELINE_ID}.debug/ || { echo \"Copy file Status: Failure\"; exit 1; }\ncp ${CI_PROJECT_DIR}/SSC/build/ssc.elf $board-${CI_PIPELINE_ID}.debug/ || { echo \"Copy file Status: Failure\"; exit 1; }\ncp ${CI_PROJECT_DIR}/SSC/build/bootloader/bootloader.bin $board-${CI_PIPELINE_ID}.debug/ || { echo \"Copy file Status: Failure\"; exit 1; }\ncp ${CI_PROJECT_DIR}/SSC/build/partition_table/partition-table.bin $board-${CI_PIPELINE_ID}.debug/ || { echo \"Copy file Status: Failure\"; exit 1; }\n\n# Creating tar file (debug)\ntar -zcvf $board-${CI_PIPELINE_ID}.debug.tar.gz $board-${CI_PIPELINE_ID}.debug || { echo \"Create tar Status: Failure\"; exit 1; }\n"
  },
  {
    "path": "tools/ci/config/build.yml",
    "content": "build_ssc_esp32:\n  stage: build\n  image: $CI_DOCKER_REGISTRY/esp32-ci-env\n  tags:\n     - wlan_feature\n\n  artifacts:\n    paths:\n     - ${board}-${CI_PIPELINE_ID}.debug.tar.gz\n    expire_in: 1 week\n  \n  only:\n    refs:\n     - triggers     \n   \n  script:\n    - rm -rf /tmp/esp_wifi_lib\n    - mkdir /tmp/esp_wifi_lib\n    - cp -rf * /tmp/esp_wifi_lib\n    - if git ls-remote ${GITLAB_SSH_SERVER}/idf/esp-idf.git | grep -sw ${CI_BUILD_REF_NAME} 2>&1>/dev/null; then IDF_BRANCH=${CI_BUILD_REF_NAME} ; fi\n    - if [[ \"${BOT_CUSTOMIZED_REVISION}\" ]] && [[ \"$BOT_CUSTOMIZED_REVISION\" == *\"esp-idf\"* ]]; then IDF_BRANCH=$(python -c 'import os;print eval(os.environ[\"BOT_CUSTOMIZED_REVISION\"])[\"esp-idf\"]') ; fi\n    - echo Cloning esp-idf - ${IDF_BRANCH} ...\n    - git clone --recursive --single-branch -b $IDF_BRANCH --dissociate ${GITLAB_SSH_SERVER}/idf/esp-idf.git     \n    - cd esp-idf\n    - wlan_lib_path=`grep -B 1 esp32-wifi-lib .gitmodules | grep path | cut -d' ' -f3`\n    - cd $CI_PROJECT_DIR\n    - rm -rf esp-idf/$wlan_lib_path/*\n    - cp -rf /tmp/esp_wifi_lib/* esp-idf/$wlan_lib_path/.\n    - if [[ \"${BOT_CUSTOMIZED_REVISION}\" ]] && [[ \"$BOT_CUSTOMIZED_REVISION\" == *\"ssc\"* ]]; then SSC_BRANCH=$(python -c 'import os;print eval(os.environ[\"BOT_CUSTOMIZED_REVISION\"])[\"ssc\"]') ; fi\n    - echo Cloning SSC - ${SSC_BRANCH} ...\n    - git clone --recursive --single-branch -b $SSC_BRANCH --dissociate ${GITLAB_SSH_SERVER}/yinling/SSC.git\n    - chmod +x tools/ci/build_app.sh\n    - ./tools/ci/build_app.sh\n"
  },
  {
    "path": "tools/ci/config/feature_test.yml",
    "content": "include:\n  - project: 'espressif/wlan_ci'\n    ref: master\n    file: '/ci/templates/wifi_lib_pipeline_tests.yaml'\n"
  },
  {
    "path": "update_lib.sh",
    "content": "#!/bin/bash\nif [ $1 != \"update\" -a $1 != \"rebase\" ]; then\n   echo $0 update commit_id [path]\n   echo $0 rebase commit_id [path]\n   exit 1\nfi\n\ncmd=$1\nif [ -z $2 ]; then\n   echo wrong commit_id $2\n   exit 1\nfi\nSHA=$2\n\nLIB_PATH=$3\nif [ -z $3 ]; then\n   LIB_PATH=/mnt/software_output23/esp32_rtos_sdk_core\nfi\n\nresult=$(find $LIB_PATH -name *$SHA -print -quit | head -n 1)\necho find $SHA in $result\nsuffix=\"${result##*/}\"\nIFS=\"^\" read -r sbranch tbranch mr_number commit_id <<< \"$suffix\"\nsbranch=\"${sbranch//\\~/\\/}\"\nif [ $tbranch == \"ng_net80211\" ]; then\n    tbranch=master\nfi\nif [ $commit_id != $SHA ];then\n    echo commit id $commit_id does not match $SHA\n    exit 1\nfi\necho source branch is $sbranch\necho target branch is $tbranch \necho VNC MR number $mr_number\necho VNC commit SHA is $commit_id\n\nif [ $cmd == \"rebase\" ]; then\n    cd ..\n    echo change to esp-idf dir $(pwd)\n    git pull\n    git checkout $tbranch\n    git pull origin $tbranch\n    git checkout $sbranch\n    cd lib\n    echo change to wifi-lib dir $(pwd)\nfi\n\necho checkout $tbranch\ngit checkout $tbranch\necho pull origin $tbranch\ngit pull origin $tbranch\necho delete branch $sbranch\ngit branch -D $sbranch\necho checkout $sbranch on $tbranch\ngit checkout -b $sbranch\necho cp $result to local\ncp $result/* . -rf\n./fix_printf.sh\ncommit_message=$(cat $result/MR_TITLE | head -n 1)\ncommit_message=$commit_message\" VNC MR\"$mr_number\" (\"$commit_id\")\"\necho $commit_message\ngit commit -am \"$commit_message\"\nrm MR_TITLE\n\n\nif [ $cmd == \"rebase\" ]; then\n    cd ..\n    echo change to esp-idf dir $(pwd)\n    git commit -a --amend\n    git rebase $sbranch\n    cd lib\n    echo change to wifi-lib dir $(pwd)\nfi\n\necho please notice that $sbranch for wifi-lib and esp-idf not pushed to gitlab, please do the push manully.\n"
  }
]