BBR 1 Ebene

Committer:
borlanic
Date:
Mon May 14 11:29:06 2018 +0000
Revision:
0:fbdae7e6d805
BBR

Who changed what in which revision?

UserRevisionLine numberNew contents of line
borlanic 0:fbdae7e6d805 1 ## Importing repositories into mbed-os
borlanic 0:fbdae7e6d805 2
borlanic 0:fbdae7e6d805 3 importer.py script can be used to import code base from different repositories into mbed-os.
borlanic 0:fbdae7e6d805 4
borlanic 0:fbdae7e6d805 5 ### Pre-requisties
borlanic 0:fbdae7e6d805 6 1. Get the required repository clone and update it to commit required. Note: Repository should be placed outside the mbed-os.
borlanic 0:fbdae7e6d805 7 2. Create json file as per template
borlanic 0:fbdae7e6d805 8
borlanic 0:fbdae7e6d805 9 ### JSON file template
borlanic 0:fbdae7e6d805 10
borlanic 0:fbdae7e6d805 11 You can list all the files and folders which are required to be copied in config file in `file` and `folder` arrays respectively. Script will remove the files/folders specified in `src` section from mbed-os repository before copy operation is performed.
borlanic 0:fbdae7e6d805 12 New commit is created on branch `feature_+repo_name+last_sha` with commit message "[REPO_NAME]: Updated to last_sha"
borlanic 0:fbdae7e6d805 13
borlanic 0:fbdae7e6d805 14 Note: Only files present in folder will be copied, directories inside the folder will not be copied.
borlanic 0:fbdae7e6d805 15
borlanic 0:fbdae7e6d805 16 `commit_sha` is list of commits present in mbed-os repo. These commits will be applied after copying files and folders listed above.Each commit in the commit_sha list is cherry-picked and applied with the -x option, which records the SHA of the source commit in the commit message.
borlanic 0:fbdae7e6d805 17 Note: You must resolve any conflicts that arise during this cherry-pick process. Make sure that the "(cherry picked from commit ...)" statement is present in the commit message. Re-execute the python script to apply rest of the SHA commits.
borlanic 0:fbdae7e6d805 18
borlanic 0:fbdae7e6d805 19 {
borlanic 0:fbdae7e6d805 20 "files" : [
borlanic 0:fbdae7e6d805 21 {
borlanic 0:fbdae7e6d805 22 "src_file" : "CMSIS/Core/Template/ARMv8-M/tz_context.c",
borlanic 0:fbdae7e6d805 23 "dest_file" : "cmsis/TARGET_CORTEX_M/mbed_tz_context.c"
borlanic 0:fbdae7e6d805 24 },
borlanic 0:fbdae7e6d805 25 ...
borlanic 0:fbdae7e6d805 26 {
borlanic 0:fbdae7e6d805 27 "src_file" : "",
borlanic 0:fbdae7e6d805 28 "dest_file" : ""
borlanic 0:fbdae7e6d805 29 }
borlanic 0:fbdae7e6d805 30 ],
borlanic 0:fbdae7e6d805 31 "folders" : [
borlanic 0:fbdae7e6d805 32 {
borlanic 0:fbdae7e6d805 33 "src_folder" : "CMSIS/Core/Include/",
borlanic 0:fbdae7e6d805 34 "dest_folder" : "cmsis/TARGET_CORTEX_M/"
borlanic 0:fbdae7e6d805 35 },
borlanic 0:fbdae7e6d805 36 ...
borlanic 0:fbdae7e6d805 37 {
borlanic 0:fbdae7e6d805 38 "src_folder" : "",
borlanic 0:fbdae7e6d805 39 "dest_folder" : ""
borlanic 0:fbdae7e6d805 40 }
borlanic 0:fbdae7e6d805 41 ],
borlanic 0:fbdae7e6d805 42 "commit_sha" : [
borlanic 0:fbdae7e6d805 43 "428acae1b2ac15c3ad523e8d40755a9301220822",
borlanic 0:fbdae7e6d805 44 "d9d622afe0ca8c7ab9d24c17f9fe59b54dcc61c9",
borlanic 0:fbdae7e6d805 45 ]
borlanic 0:fbdae7e6d805 46 }
borlanic 0:fbdae7e6d805 47
borlanic 0:fbdae7e6d805 48 ### Input to importer.py
borlanic 0:fbdae7e6d805 49 1. Repository: -r <repo_path> ( Example: CMSIS / Mbed-tls / uVisor)
borlanic 0:fbdae7e6d805 50 2. `repo`_importer.json: -c <json_file> (Example: cmsis_importer.json)