From aa9912660e08f8d406e74807bab476cc60dd9581 Mon Sep 17 00:00:00 2001 From: Jan-Simon Moeller Date: Mon, 2 Mar 2020 23:02:15 +0100 Subject: Add agl-documentation subfolder into agl repo Signed-off-by: Jan-Simon Moeller --- agl-documentation/.gitignore | 5 + agl-documentation/LICENSE | 201 ++++++++++++ agl-documentation/README.md | 35 ++ agl-documentation/candevstudio/book.json | 11 + .../candevstudio/docs/0-Doc-Revisions.md | 6 + agl-documentation/candevstudio/docs/1_Usage.md | 17 + .../docs/2_can_device_socketcan_backend.md | 35 ++ .../candevstudio/docs/3_Add_CAN_Device.md | 32 ++ .../docs/4_Configure_CanRawSender_Node.md | 19 ++ .../candevstudio/docs/5_Using_CanRawView.md | 9 + agl-documentation/candevstudio/docs/README.md | 19 ++ agl-documentation/candevstudio/docs/SUMMARY.md | 9 + .../candevstudio/docs/api-services-book.yml | 20 ++ .../candevstudio/docs/pictures/CANdevStudio.png | Bin 0 -> 52285 bytes .../candevstudio/docs/pictures/canrawsender.png | Bin 0 -> 43850 bytes .../candevstudio/docs/pictures/canrawviewer.png | Bin 0 -> 125506 bytes .../candevstudio/docs/resources/iotbzh_logo.png | Bin 0 -> 129625 bytes .../docs/resources/iotbzh_logo_small.png | Bin 0 -> 6989 bytes agl-documentation/candevstudio/mkdocs.yml | 10 + agl-documentation/gen_all_docs.sh | 21 ++ agl-documentation/host-configuration/book.json | 11 + .../host-configuration/docs/0-Doc-Revisions.md | 6 + .../docs/0-build-microservice-overview.md | 55 ++++ .../host-configuration/docs/0_Abstract.md | 11 + .../host-configuration/docs/1-verify-build-host.md | 24 ++ .../host-configuration/docs/1_Prerequisites.md | 175 ++++++++++ .../host-configuration/docs/2-download-packages.md | 230 +++++++++++++ .../docs/2_AGL_Application_Framework.md | 43 +++ .../docs/3-installing-binder-daemon.md | 80 +++++ .../docs/3_Binding_Build_Example.md | 85 +++++ .../docs/4-getting-source-files.md | 65 ++++ .../host-configuration/docs/4_AGL_XDS.md | 31 ++ .../5-building-and-running-service-natively.md | 110 +++++++ .../host-configuration/docs/5_Candevstudio.md | 35 ++ .../host-configuration/docs/README.md | 20 ++ .../host-configuration/docs/SUMMARY.md | 10 + .../host-configuration/docs/devguides-book.yml | 22 ++ .../docs/pictures/Automotive_grade_linux.png | Bin 0 -> 300093 bytes .../docs/pictures/CANdevStudio.png | Bin 0 -> 52285 bytes .../host-configuration/docs/pictures/HVAC.jpg | Bin 0 -> 54861 bytes .../docs/pictures/Xds-screenshots.jpg | Bin 0 -> 697391 bytes .../docs/pictures/microservice-workflow-native.png | Bin 0 -> 29857 bytes .../docs/resources/iotbzh_logo.png | Bin 0 -> 129625 bytes .../docs/resources/iotbzh_logo_small.png | Bin 0 -> 6989 bytes agl-documentation/host-configuration/mkdocs.yml | 11 + agl-documentation/sdk-devkit/book.json | 11 + .../sdk-devkit/docs/0-Doc-Revisions.md | 12 + agl-documentation/sdk-devkit/docs/README.md | 24 ++ agl-documentation/sdk-devkit/docs/SUMMARY.md | 18 + .../sdk-devkit/docs/part-1/1_0_Abstract.md | 27 ++ .../sdk-devkit/docs/part-1/1_1-Deploy_image.md | 47 +++ .../docs/part-1/1_2-Setting-up-your_os.md | 217 ++++++++++++ .../docs/part-1/1_3-Install-agl-for-porter.md | 276 ++++++++++++++++ .../docs/part-1/1_4-Inside-the-container.md | 76 +++++ .../docs/part-1/1_5-Build-image-Porter.md | 175 ++++++++++ .../docs/part-1/1_6-Porter-image-deployment.md | 257 +++++++++++++++ .../part-1/1_7-SDK-compilation-installation.md | 49 +++ .../part-1/pictures/docker_install_macos_1.png | Bin 0 -> 2469 bytes .../part-1/pictures/docker_install_macos_2.png | Bin 0 -> 24548 bytes .../part-1/pictures/docker_install_macos_3.png | Bin 0 -> 64546 bytes .../part-1/pictures/docker_install_macos_4.png | Bin 0 -> 34747 bytes .../part-1/pictures/docker_install_macos_5.png | Bin 0 -> 7289 bytes .../part-1/pictures/docker_install_macos_6.png | Bin 0 -> 15450 bytes .../part-1/pictures/docker_install_windows_1.png | Bin 0 -> 2591 bytes .../part-1/pictures/docker_install_windows_2.png | Bin 0 -> 15143 bytes .../part-1/pictures/docker_install_windows_3.png | Bin 0 -> 14382 bytes .../part-1/pictures/docker_install_windows_4.png | Bin 0 -> 13492 bytes .../part-1/pictures/docker_install_windows_5.png | Bin 0 -> 11777 bytes .../part-1/pictures/docker_install_windows_6.png | Bin 0 -> 2431 bytes .../part-1/pictures/docker_install_windows_7.png | Bin 0 -> 9052 bytes .../docs/part-1/pictures/renesas_download.jpg | Bin 0 -> 56243 bytes .../docs/part-1/pictures/windows_putty_1.png | Bin 0 -> 1158 bytes .../docs/part-1/pictures/windows_putty_2.png | Bin 0 -> 9251 bytes .../part-1/pictures/windows_win32diskimager_1.png | Bin 0 -> 2690 bytes .../part-1/pictures/windows_win32diskimager_2.png | Bin 0 -> 13850 bytes .../part-1/pictures/windows_win32diskimager_3.png | Bin 0 -> 11277 bytes .../part-1/pictures/windows_win32diskimager_4.png | Bin 0 -> 4341 bytes .../part-1/pictures/windows_win32diskimager_5.png | Bin 0 -> 9474 bytes .../sdk-devkit/docs/part-2/2_0_Abstract.md | 25 ++ .../sdk-devkit/docs/part-2/2_1-Init-sdk-env.md | 79 +++++ .../docs/part-2/2_2-Trying-out-template.md | 134 ++++++++ .../docs/part-2/2_3-Dev-with-container.md | 93 ++++++ .../docs/part-2/2_4-Use-app-templates.md | 362 +++++++++++++++++++++ .../docs/part-2/pictures/cpu_hybrid_qml.png | Bin 0 -> 23163 bytes .../sdk-devkit/docs/part-2/pictures/html5_app.png | Bin 0 -> 28161 bytes .../docs/part-2/pictures/hybrid_html5_app.png | Bin 0 -> 32145 bytes .../part-2/pictures/hybrid_html5_app_on_target.png | Bin 0 -> 42710 bytes .../docs/part-2/pictures/hybrid_qml_app.png | Bin 0 -> 17667 bytes .../docs/part-2/pictures/mac_x11_logo.png | Bin 0 -> 1979 bytes .../docs/part-2/pictures/putty_config.png | Bin 0 -> 14903 bytes .../sdk-devkit/docs/part-2/pictures/qml_app.png | Bin 0 -> 8210 bytes .../docs/part-2/pictures/web-runtime_app.png | Bin 0 -> 11821 bytes .../docs/part-2/pictures/xming_server.png | Bin 0 -> 3514 bytes .../sdk-devkit/docs/resources/iotbzh_logo.png | Bin 0 -> 129625 bytes .../docs/resources/iotbzh_logo_small.png | Bin 0 -> 6989 bytes agl-documentation/sdk-devkit/mkdocs.yml | 20 ++ 96 files changed, 3375 insertions(+) create mode 100644 agl-documentation/.gitignore create mode 100644 agl-documentation/LICENSE create mode 100644 agl-documentation/README.md create mode 100644 agl-documentation/candevstudio/book.json create mode 100644 agl-documentation/candevstudio/docs/0-Doc-Revisions.md create mode 100644 agl-documentation/candevstudio/docs/1_Usage.md create mode 100644 agl-documentation/candevstudio/docs/2_can_device_socketcan_backend.md create mode 100644 agl-documentation/candevstudio/docs/3_Add_CAN_Device.md create mode 100644 agl-documentation/candevstudio/docs/4_Configure_CanRawSender_Node.md create mode 100644 agl-documentation/candevstudio/docs/5_Using_CanRawView.md create mode 100644 agl-documentation/candevstudio/docs/README.md create mode 100644 agl-documentation/candevstudio/docs/SUMMARY.md create mode 100644 agl-documentation/candevstudio/docs/api-services-book.yml create mode 100644 agl-documentation/candevstudio/docs/pictures/CANdevStudio.png create mode 100644 agl-documentation/candevstudio/docs/pictures/canrawsender.png create mode 100644 agl-documentation/candevstudio/docs/pictures/canrawviewer.png create mode 100644 agl-documentation/candevstudio/docs/resources/iotbzh_logo.png create mode 100644 agl-documentation/candevstudio/docs/resources/iotbzh_logo_small.png create mode 100644 agl-documentation/candevstudio/mkdocs.yml create mode 100755 agl-documentation/gen_all_docs.sh create mode 100644 agl-documentation/host-configuration/book.json create mode 100644 agl-documentation/host-configuration/docs/0-Doc-Revisions.md create mode 100755 agl-documentation/host-configuration/docs/0-build-microservice-overview.md create mode 100644 agl-documentation/host-configuration/docs/0_Abstract.md create mode 100755 agl-documentation/host-configuration/docs/1-verify-build-host.md create mode 100644 agl-documentation/host-configuration/docs/1_Prerequisites.md create mode 100755 agl-documentation/host-configuration/docs/2-download-packages.md create mode 100644 agl-documentation/host-configuration/docs/2_AGL_Application_Framework.md create mode 100755 agl-documentation/host-configuration/docs/3-installing-binder-daemon.md create mode 100644 agl-documentation/host-configuration/docs/3_Binding_Build_Example.md create mode 100755 agl-documentation/host-configuration/docs/4-getting-source-files.md create mode 100644 agl-documentation/host-configuration/docs/4_AGL_XDS.md create mode 100755 agl-documentation/host-configuration/docs/5-building-and-running-service-natively.md create mode 100644 agl-documentation/host-configuration/docs/5_Candevstudio.md create mode 100644 agl-documentation/host-configuration/docs/README.md create mode 100644 agl-documentation/host-configuration/docs/SUMMARY.md create mode 100644 agl-documentation/host-configuration/docs/devguides-book.yml create mode 100644 agl-documentation/host-configuration/docs/pictures/Automotive_grade_linux.png create mode 100644 agl-documentation/host-configuration/docs/pictures/CANdevStudio.png create mode 100644 agl-documentation/host-configuration/docs/pictures/HVAC.jpg create mode 100644 agl-documentation/host-configuration/docs/pictures/Xds-screenshots.jpg create mode 100755 agl-documentation/host-configuration/docs/pictures/microservice-workflow-native.png create mode 100644 agl-documentation/host-configuration/docs/resources/iotbzh_logo.png create mode 100644 agl-documentation/host-configuration/docs/resources/iotbzh_logo_small.png create mode 100644 agl-documentation/host-configuration/mkdocs.yml create mode 100644 agl-documentation/sdk-devkit/book.json create mode 100644 agl-documentation/sdk-devkit/docs/0-Doc-Revisions.md create mode 100644 agl-documentation/sdk-devkit/docs/README.md create mode 100644 agl-documentation/sdk-devkit/docs/SUMMARY.md create mode 100644 agl-documentation/sdk-devkit/docs/part-1/1_0_Abstract.md create mode 100644 agl-documentation/sdk-devkit/docs/part-1/1_1-Deploy_image.md create mode 100644 agl-documentation/sdk-devkit/docs/part-1/1_2-Setting-up-your_os.md create mode 100644 agl-documentation/sdk-devkit/docs/part-1/1_3-Install-agl-for-porter.md create mode 100644 agl-documentation/sdk-devkit/docs/part-1/1_4-Inside-the-container.md create mode 100644 agl-documentation/sdk-devkit/docs/part-1/1_5-Build-image-Porter.md create mode 100644 agl-documentation/sdk-devkit/docs/part-1/1_6-Porter-image-deployment.md create mode 100644 agl-documentation/sdk-devkit/docs/part-1/1_7-SDK-compilation-installation.md create mode 100644 agl-documentation/sdk-devkit/docs/part-1/pictures/docker_install_macos_1.png create mode 100644 agl-documentation/sdk-devkit/docs/part-1/pictures/docker_install_macos_2.png create mode 100644 agl-documentation/sdk-devkit/docs/part-1/pictures/docker_install_macos_3.png create mode 100644 agl-documentation/sdk-devkit/docs/part-1/pictures/docker_install_macos_4.png create mode 100644 agl-documentation/sdk-devkit/docs/part-1/pictures/docker_install_macos_5.png create mode 100644 agl-documentation/sdk-devkit/docs/part-1/pictures/docker_install_macos_6.png create mode 100644 agl-documentation/sdk-devkit/docs/part-1/pictures/docker_install_windows_1.png create mode 100644 agl-documentation/sdk-devkit/docs/part-1/pictures/docker_install_windows_2.png create mode 100644 agl-documentation/sdk-devkit/docs/part-1/pictures/docker_install_windows_3.png create mode 100644 agl-documentation/sdk-devkit/docs/part-1/pictures/docker_install_windows_4.png create mode 100644 agl-documentation/sdk-devkit/docs/part-1/pictures/docker_install_windows_5.png create mode 100644 agl-documentation/sdk-devkit/docs/part-1/pictures/docker_install_windows_6.png create mode 100644 agl-documentation/sdk-devkit/docs/part-1/pictures/docker_install_windows_7.png create mode 100644 agl-documentation/sdk-devkit/docs/part-1/pictures/renesas_download.jpg create mode 100644 agl-documentation/sdk-devkit/docs/part-1/pictures/windows_putty_1.png create mode 100644 agl-documentation/sdk-devkit/docs/part-1/pictures/windows_putty_2.png create mode 100644 agl-documentation/sdk-devkit/docs/part-1/pictures/windows_win32diskimager_1.png create mode 100644 agl-documentation/sdk-devkit/docs/part-1/pictures/windows_win32diskimager_2.png create mode 100644 agl-documentation/sdk-devkit/docs/part-1/pictures/windows_win32diskimager_3.png create mode 100644 agl-documentation/sdk-devkit/docs/part-1/pictures/windows_win32diskimager_4.png create mode 100644 agl-documentation/sdk-devkit/docs/part-1/pictures/windows_win32diskimager_5.png create mode 100644 agl-documentation/sdk-devkit/docs/part-2/2_0_Abstract.md create mode 100644 agl-documentation/sdk-devkit/docs/part-2/2_1-Init-sdk-env.md create mode 100644 agl-documentation/sdk-devkit/docs/part-2/2_2-Trying-out-template.md create mode 100644 agl-documentation/sdk-devkit/docs/part-2/2_3-Dev-with-container.md create mode 100644 agl-documentation/sdk-devkit/docs/part-2/2_4-Use-app-templates.md create mode 100644 agl-documentation/sdk-devkit/docs/part-2/pictures/cpu_hybrid_qml.png create mode 100644 agl-documentation/sdk-devkit/docs/part-2/pictures/html5_app.png create mode 100644 agl-documentation/sdk-devkit/docs/part-2/pictures/hybrid_html5_app.png create mode 100644 agl-documentation/sdk-devkit/docs/part-2/pictures/hybrid_html5_app_on_target.png create mode 100644 agl-documentation/sdk-devkit/docs/part-2/pictures/hybrid_qml_app.png create mode 100644 agl-documentation/sdk-devkit/docs/part-2/pictures/mac_x11_logo.png create mode 100644 agl-documentation/sdk-devkit/docs/part-2/pictures/putty_config.png create mode 100644 agl-documentation/sdk-devkit/docs/part-2/pictures/qml_app.png create mode 100644 agl-documentation/sdk-devkit/docs/part-2/pictures/web-runtime_app.png create mode 100644 agl-documentation/sdk-devkit/docs/part-2/pictures/xming_server.png create mode 100644 agl-documentation/sdk-devkit/docs/resources/iotbzh_logo.png create mode 100644 agl-documentation/sdk-devkit/docs/resources/iotbzh_logo_small.png create mode 100644 agl-documentation/sdk-devkit/mkdocs.yml diff --git a/agl-documentation/.gitignore b/agl-documentation/.gitignore new file mode 100644 index 0000000..74c6cd6 --- /dev/null +++ b/agl-documentation/.gitignore @@ -0,0 +1,5 @@ +.vscode +build +**/node_modules +**/_book +**/nohup.out diff --git a/agl-documentation/LICENSE b/agl-documentation/LICENSE new file mode 100644 index 0000000..8dada3e --- /dev/null +++ b/agl-documentation/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/agl-documentation/README.md b/agl-documentation/README.md new file mode 100644 index 0000000..bf38bb2 --- /dev/null +++ b/agl-documentation/README.md @@ -0,0 +1,35 @@ +# SDK devkit + +This repository holds AGL documentation (written by the IoT.bzh team) which is + not yet merged into official AGL repository. + +## How to generate pdf + +Documentation is based on [gitbook](https://www.gitbook.com/). +To install locally gitbook: + +```bash +npm install -g gitbook-cli +``` + +To generate documentation: + +```bash +./gen_all_docs.sh +``` + +or to generate one individual doc manually: +You must install calibre first : + +```bash +sudo apt install calibre +``` + +```bash +gitbook pdf ./sdk-devkit ./build/sdk-devkit.pdf +``` + +## Notes / TODO + +* Add Iot.Bzh logo in header instead of IoT.Bzh text +* Write a plugin based on svg + convert to generate cover. diff --git a/agl-documentation/candevstudio/book.json b/agl-documentation/candevstudio/book.json new file mode 100644 index 0000000..464e1b6 --- /dev/null +++ b/agl-documentation/candevstudio/book.json @@ -0,0 +1,11 @@ +{ + "title": "CanDevStudio Quickstart", + "subtitle": "Developer Documentation", + "description": "Candevstudio quickstart to launch it and use it", + "keywords": "AGL, Quickstart, candevstudio, can", + "author": "IoT.Bzh Team", + "website": "http://iot.bzh", + "published": "May 2018", + "version": "0.1", + "pdf_filename": "CanDevStudio" +} diff --git a/agl-documentation/candevstudio/docs/0-Doc-Revisions.md b/agl-documentation/candevstudio/docs/0-Doc-Revisions.md new file mode 100644 index 0000000..3485a4e --- /dev/null +++ b/agl-documentation/candevstudio/docs/0-Doc-Revisions.md @@ -0,0 +1,6 @@ +Document revisions +================== + +| Date | Version | Designation  | Author | +|-------------|---------|--------------------------------------|-------------------------| +| 17 May 1018 | 0.1 | Initial release | C.Benier [ Iot.bzh ] | diff --git a/agl-documentation/candevstudio/docs/1_Usage.md b/agl-documentation/candevstudio/docs/1_Usage.md new file mode 100644 index 0000000..c926e9e --- /dev/null +++ b/agl-documentation/candevstudio/docs/1_Usage.md @@ -0,0 +1,17 @@ +# Usage + +You can find the installation part +[here](http://docs.automotivelinux.org/master/docs/devguides/en/dev/reference/host-configuration/docs/5_Candevstudio.html). + +The official repo of CanDevStudio is a subpart of GENIVI and can be found +[here](https://github.com/GENIVI/CANdevStudio/). + +Launch it with following command: + +```bash +CANdevStudio +``` + +Then start a new project. + +![CANdevStudio general screenshot](pictures/CANdevStudio.png) diff --git a/agl-documentation/candevstudio/docs/2_can_device_socketcan_backend.md b/agl-documentation/candevstudio/docs/2_can_device_socketcan_backend.md new file mode 100644 index 0000000..60a7ff6 --- /dev/null +++ b/agl-documentation/candevstudio/docs/2_can_device_socketcan_backend.md @@ -0,0 +1,35 @@ +# Bringing up a CAN device using socketcan backend + +* [Using a supported Linux CAN device](https://www.elinux.org/CAN_Bus): + +```bash +# Find your interface name (e.g. can0) +ip link +# Configure bitrate +sudo ip link set can0 type can bitrate 1000000 +# Bring the device up +sudo ip link set can0 up +# Optionally configure CAN termination +sudo ip link set can0 type can termination 1 +``` + +## Using slcand + +* Based on FTDI Serial driver +* Requires slcand to "convert" serial device to SocketCAN. +* Officially supported in Linux Kernel v2.6.38 + +```bash +# Create SocketCAN device from serial interface +sudo slcand -o -c -s8 -S1000000 /dev/ttyUSB0 can0 +# Bring the device up +sudo ip link set can0 up +``` + +## Using builtin Linux kernel virtual CAN module vcan + +```bash +sudo modprobe vcan +sudo ip link add dev can0 type vcan +sudo ip link set can0 up +``` diff --git a/agl-documentation/candevstudio/docs/3_Add_CAN_Device.md b/agl-documentation/candevstudio/docs/3_Add_CAN_Device.md new file mode 100644 index 0000000..d41b99c --- /dev/null +++ b/agl-documentation/candevstudio/docs/3_Add_CAN_Device.md @@ -0,0 +1,32 @@ +# Add a CAN device in CANdevStudio + +Start a new project and grab a ***CanDevice*** from the left pane in the +***Device Layer*** section and drop it on the grid workspace. Right-Click on it +and open its ***Properties***. Here you have to set the ***backend*** and the +***interface*** name you'll want to use. Backend available are: + +- socketcan: CAN stack present by default in the Linux Kernel. This use Linux socket and open source CAN device driver (More information here). +- systeccan: CAN bus backend using the SYS TEC CAN adapters. +- peakcan: CAN bus plugin using the PEAK CAN adapters. +- tinycan: CAN bus plugin using the MHS CAN adapters. +- vectorcan: CAN bus plugin using the Vector CAN adapters. + +More details about CANdevStudio CAN bus support [here](http://doc.qt.io/qt-5.10/qtcanbus-backends.html). + +***Interface*** is the name of the device you want to use. Bring up your CAN device and use the following command to find out which one are available: + +```bash +ip link +1: lo: mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 + link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 +2: enp0s25: mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000 + link/ether 90:b1:1c:6b:b2:21 brd ff:ff:ff:ff:ff:ff +3: virbr0: mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default qlen 1000 + link/ether 52:54:00:56:86:80 brd ff:ff:ff:ff:ff:ff +4: virbr0-nic: mtu 1500 qdisc fq_codel master virbr0 state DOWN mode DEFAULT group default qlen 1000 + link/ether 52:54:00:56:86:80 brd ff:ff:ff:ff:ff:ff +5: docker0: mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default + link/ether 02:42:81:38:a8:75 brd ff:ff:ff:ff:ff:ff +12: can0: mtu 72 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 + link/can +``` diff --git a/agl-documentation/candevstudio/docs/4_Configure_CanRawSender_Node.md b/agl-documentation/candevstudio/docs/4_Configure_CanRawSender_Node.md new file mode 100644 index 0000000..a78bfd2 --- /dev/null +++ b/agl-documentation/candevstudio/docs/4_Configure_CanRawSender_Node.md @@ -0,0 +1,19 @@ +# Configure a CanRawSender node + +CanRawSender node lets you set a predefined list of CAN Raw messages to send. + +![CanRawSender screenshot](pictures/canrawsender.png) + +Click on the + sign to add as much as needed signals to send. For each signals, you has to define: + +- the CAN arbitration ID +- Data load +- Loop checkbox make the signal repeat infinitely +- Interval is used with loop to define how much time between 2 sends + +Once clicked on ***Play*** button in the main Window to launch the simulation, +then each signals will be sent in the same order than defined in the +CanRawSender node then using interval to repeat themselves. + +Signals without ***loop*** checked will not be sent, you have to click manually +on the ***Send*** button to trigger a sending. diff --git a/agl-documentation/candevstudio/docs/5_Using_CanRawView.md b/agl-documentation/candevstudio/docs/5_Using_CanRawView.md new file mode 100644 index 0000000..39d3615 --- /dev/null +++ b/agl-documentation/candevstudio/docs/5_Using_CanRawView.md @@ -0,0 +1,9 @@ +# Using CanRawView + +***CanRawViewer*** is pretty simple to use, once simulation launched you'll see +signal flows in the window. You can use ***Clear*** button to wipe the window. + +![CanRawViewer screenshot](pictures/canrawviewer.png) + +Use the ***Combine*** button to stack by arbitration ID the CAN signals. +Then only the latest signal for each arbitration ID will be displayed. diff --git a/agl-documentation/candevstudio/docs/README.md b/agl-documentation/candevstudio/docs/README.md new file mode 100644 index 0000000..242b010 --- /dev/null +++ b/agl-documentation/candevstudio/docs/README.md @@ -0,0 +1,19 @@ +# Introduction + +Development tool for CAN bus simulation. + +CANdevStudio is a part of GENIVI project, you can find the github repository +[here](https://github.com/GENIVI/CANdevStudio) and the documentation +[here](https://at.projects.genivi.org/wiki/display/PROJ/CANdevStudio). + +| *Meta* | *Data* | +| -- | -- | +| **Title** | {{ config.title }} | +| **Author** | {{ config.author }} | +| **Description** | {{ config.description }} | +| **Keywords** | {{ config.keywords }} | +| **Language** | English | +| **Published** | Published {{ config.published }} as an electronic book | +| **Updated** | {{ gitbook.time }} | +| **Collection** | Open-source | +| **Website** | [{{ config.website }}]({{ config.website }}) | diff --git a/agl-documentation/candevstudio/docs/SUMMARY.md b/agl-documentation/candevstudio/docs/SUMMARY.md new file mode 100644 index 0000000..3da9fdf --- /dev/null +++ b/agl-documentation/candevstudio/docs/SUMMARY.md @@ -0,0 +1,9 @@ +# Summary + +* [Document revisions](0-Doc-Revisions.md) + +* [Usage](1_Usage.md) +* [Bringing up a CAN device using socketcan backend](2_can_device_socketcan_backend.md) +* [Add a CAN device in CANdevStudio](3_Add_CAN_Device.md) +* [Configure a CanRawSender node](4_Configure_CanRawSender_Node.md) +* [Using CanRawView](5_Using_CanRawView.md) diff --git a/agl-documentation/candevstudio/docs/api-services-book.yml b/agl-documentation/candevstudio/docs/api-services-book.yml new file mode 100644 index 0000000..fd14ac9 --- /dev/null +++ b/agl-documentation/candevstudio/docs/api-services-book.yml @@ -0,0 +1,20 @@ +type: books +books: +- + id: candevstudio + title: CanDevStudio Quickstart + description: CanDevStudio Quickstart documentation + keywords: + author: "IotBzh" + version: master + chapters: + - url: 1_Usage.md + name: Usage Guide + - url: 2_can_device_socketcan_backend.md + name: Bringing up a CAN device using socketcan backend + - url: 3_Add_CAN_Device.md + name: Add a CAN device in CANdevStudio + - url: 4_Configure_CanRawSender_Node.md + name: Configure a CanRawSender node + - url: 5_Using_CanRawView.md + name: Using CanRawView diff --git a/agl-documentation/candevstudio/docs/pictures/CANdevStudio.png b/agl-documentation/candevstudio/docs/pictures/CANdevStudio.png new file mode 100644 index 0000000..c944e02 Binary files /dev/null and b/agl-documentation/candevstudio/docs/pictures/CANdevStudio.png differ diff --git a/agl-documentation/candevstudio/docs/pictures/canrawsender.png b/agl-documentation/candevstudio/docs/pictures/canrawsender.png new file mode 100644 index 0000000..766ca63 Binary files /dev/null and b/agl-documentation/candevstudio/docs/pictures/canrawsender.png differ diff --git a/agl-documentation/candevstudio/docs/pictures/canrawviewer.png b/agl-documentation/candevstudio/docs/pictures/canrawviewer.png new file mode 100644 index 0000000..f20488b Binary files /dev/null and b/agl-documentation/candevstudio/docs/pictures/canrawviewer.png differ diff --git a/agl-documentation/candevstudio/docs/resources/iotbzh_logo.png b/agl-documentation/candevstudio/docs/resources/iotbzh_logo.png new file mode 100644 index 0000000..ae6bc48 Binary files /dev/null and b/agl-documentation/candevstudio/docs/resources/iotbzh_logo.png differ diff --git a/agl-documentation/candevstudio/docs/resources/iotbzh_logo_small.png b/agl-documentation/candevstudio/docs/resources/iotbzh_logo_small.png new file mode 100644 index 0000000..6a98c60 Binary files /dev/null and b/agl-documentation/candevstudio/docs/resources/iotbzh_logo_small.png differ diff --git a/agl-documentation/candevstudio/mkdocs.yml b/agl-documentation/candevstudio/mkdocs.yml new file mode 100644 index 0000000..66604b4 --- /dev/null +++ b/agl-documentation/candevstudio/mkdocs.yml @@ -0,0 +1,10 @@ +site_name: AGL Application Framework Binder +theme: readthedocs +docs_dir: docs +pages: +- 'Document revisions' : '0-Doc-Revisions.md' +- 'Usage': '1_Usage.md' +- 'Bringing up a CAN device using socketcan backend': '2_can_device_socketcan_backend.md' +- 'Add a CAN device in CANdevStudio': '3_Add_CAN_Device.md' +- 'Configure a CanRawSender node': '4_Configure_CanRawSender_Node.md' +- 'Using CanRawView': '5_Using_CanRawView.md' diff --git a/agl-documentation/gen_all_docs.sh b/agl-documentation/gen_all_docs.sh new file mode 100755 index 0000000..daf1fb7 --- /dev/null +++ b/agl-documentation/gen_all_docs.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +cd $(dirname $0) +CURDIR=$(pwd) + +FORMAT=pdf +#DEBUG_FLAG=--debug +DEBUG_FLAG= + +DRY= +[ "$1" = "-dry" ] && DRY=echo + +OUT_DIR=./build +[ -d $OUT_DIR ] || mkdir -p $OUT_DIR + +cat < + +1. **Verify Your Build Host:** + Make sure you have a native Linux host. + For the example used in this section (i.e. `helloworld-service`), be sure your + Linux distribution is a recent version of Debian, Ubuntu, OpenSUSE, or Fedora. + +2. **Download and Install AGL Packages:** + Download and install the + [near-zero](https://en.wikipedia.org/wiki/Zero_Install) packages + from the OBS. + +3. **Install the Binder Daemon:** + Install the Binder Daemon, which is a part of the + [AGL Application Framework (AFM)](../../apis_services/reference/af-main/0-introduction.html). + The daemon allows you to connect applications to required services. + +4. **Get Your Source Files:** + For this section, you clone the `helloworld-service` binding repository. + You also need to make sure you have some other required packages to build + that specific binding. + +5. **Build and Run Your Service Natively (Optional Tool Use):** + Build your binding on your Linux host using native tools. + Once the binding is built, you can run it to make sure it functions + as expected. + + Optionally use extra tools once your binding is building and running + smoothly in the native environment. diff --git a/agl-documentation/host-configuration/docs/0_Abstract.md b/agl-documentation/host-configuration/docs/0_Abstract.md new file mode 100644 index 0000000..0bb7aca --- /dev/null +++ b/agl-documentation/host-configuration/docs/0_Abstract.md @@ -0,0 +1,11 @@ +# Host Configuration + +## Abstract + +The purpose of this section is to help developers to natively develop and debug +AGL microservices.\ +Thanks to OBS, packages for debian/ubuntu, openSUSE and +fedora distributions are available and can be installed on developer host. + +At first hand, the idea is to easily handle native development of AGL services +and at second hand to run the same services on targets/boards. diff --git a/agl-documentation/host-configuration/docs/1-verify-build-host.md b/agl-documentation/host-configuration/docs/1-verify-build-host.md new file mode 100755 index 0000000..bc7b158 --- /dev/null +++ b/agl-documentation/host-configuration/docs/1-verify-build-host.md @@ -0,0 +1,24 @@ +# Verify Your Build Host + +In order to build a Microservice binding natively, you need to be using a +supported Linux distribution. +In general, a recent version of Debian, Ubuntu, OpenSUSE, and Fedora works. +Following is a specific list of supported distributions: + +* [Debian](https://www.debian.org/releases/) 9.0 +* [Ubuntu](https://wiki.ubuntu.com/Releases) 16.04, 16.10, 17.10, and 18.04 +* [OpenSUSE](https://en.opensuse.org/openSUSE:Roadmap) Leap 15.0 and Tumbleweed +* [Fedora](https://fedoraproject.org/wiki/Releases) 27, 28, 29, and Rawhide. + +Exporting the `DISTRO` environment variable defines the distribution. +Following are examples: + +```bash +export DISTRO="Debian_9.0" +export DISTRO="xUbuntu_16.04" +export DISTRO="xUbuntu_16.10" +export DISTRO="xUbuntu_17.10" +export DISTRO="xUbuntu_18.04" +``` + +Set the `DISTRO` environment appropriately. diff --git a/agl-documentation/host-configuration/docs/1_Prerequisites.md b/agl-documentation/host-configuration/docs/1_Prerequisites.md new file mode 100644 index 0000000..14eacec --- /dev/null +++ b/agl-documentation/host-configuration/docs/1_Prerequisites.md @@ -0,0 +1,175 @@ +# Prerequisites for package installation + +There are different repos for AGL packages depending on the version, it is +possible to install all of them and switching between them. + +To install latest (master) version you must set REVISION variable as follow : + +```bash +export REVISION=Master +``` + +You can find all available repos [here](https://build.opensuse.org/project/subprojects/isv:LinuxAutomotive#). + +For more details about OBS, please visit [LinuxAutomotive page on OBS](https://build.opensuse.org/project/show/isv:LinuxAutomotive). + +## Add repo for debian distro + +Avalable distro values are + +```bash +export DISTRO="Debian_9.0" +export DISTRO="xUbuntu_16.04" +export DISTRO="xUbuntu_16.10" +export DISTRO="xUbuntu_17.10" +export DISTRO="xUbuntu_18.04" +``` + +Install the repository: + +```bash +export REVISION=Master +export DISTRO="xUbuntu_18.04" +wget -O - http://download.opensuse.org/repositories/isv:/LinuxAutomotive:/AGL_${REVISION}/${DISTRO}/Release.key | sudo apt-key add - +sudo bash -c "cat >> /etc/apt/sources.list.d/AGL.list <> /etc/apt/sources.list.d/AGL.list <=0.9.55' +-- No package 'libmicrohttpd' found +CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:415 (message): + A required package was not found +Call Stack (most recent call first): + /usr/share/cmake/Modules/FindPkgConfig.cmake:593 (_pkg_check_modules_internal) + conf.d/app-templates/cmake/cmake.d/01-build_options.cmake:92 (PKG_CHECK_MODULES) + conf.d/app-templates/cmake/common.cmake:77 (include) + conf.d/cmake/config.cmake:184 (include) + CMakeLists.txt:3 (include) +``` + +Open the config.cmake file located in helloworld-service/conf.d/cmake/ +and add a # to the beginning of the "libsystemd>=222" and "libmicrohttpd>=0.9.55". +The end result should look something like this + +```CMake + set (PKG_REQUIRED_LIST + json-c + #libsystemd>=222 + afb-daemon + #libmicrohttpd>=0.9.55 + ) +``` + +Once this is done return to the "Build it!" section of this page. diff --git a/agl-documentation/host-configuration/docs/4-getting-source-files.md b/agl-documentation/host-configuration/docs/4-getting-source-files.md new file mode 100755 index 0000000..5a7563c --- /dev/null +++ b/agl-documentation/host-configuration/docs/4-getting-source-files.md @@ -0,0 +1,65 @@ +# Getting Your Source Files + +Now that you have your host ready, packages installed, and the binder +daemon ready, you can get your source files together. +This example uses the `helloworld-service` binding, which is +a project hosted on GitHub, is written in the C programming language, +depends on the `libjson-c` library, and uses `cmake` for building. + +## Install Programs and Libraries You Need for this Example + +For this example, you need to have the following installed on your host: + +```bash +git +cmake +pkg-config +gcc +g++ +json-c +``` + +**NOTE:** If you are building a different binding, you need to make sure +you have all the programs and libraries needed to build that particular +binding. + +### Installing on Debian + +Use the following commands if your native Linux machine uses the Debian +distribution: + +```bash +sudo apt-get install git cmake pkg-config gcc g++ libjson-c-dev +``` + +### Installing on OpenSUSE + +Use the following commands if your native Linux machine uses the OpenSUSE +distribution: + +```bash +sudo zypper install git cmake pkg-config gcc gcc-c++ libjson-c-devel +``` + +### Installing on Fedora + +Use the following commands if your native Linux machine uses the Fedora +distribution: + +```bash +sudo dnf install git cmake pkg-config gcc gcc-c++ json-c-devel.x86_64 +``` + +## Cloning the helloworld-service repository + +Use Git to create a local repository of the +[helloworld-service](https://github.com/iotbzh/helloworld-service) binding from +[IoT.BZH](https://iot.bzh/en/). +The following command creates a repository named `helloworld-service` in the +current directory. +The "--recurse-submodules" option ensures that all submodules (i.e. repositories +within `helloworld-service`) are initialized and cloned as well. + +```bash +git clone https://github.com/iotbzh/helloworld-service.git --recurse-submodules +``` diff --git a/agl-documentation/host-configuration/docs/4_AGL_XDS.md b/agl-documentation/host-configuration/docs/4_AGL_XDS.md new file mode 100644 index 0000000..5f06c19 --- /dev/null +++ b/agl-documentation/host-configuration/docs/4_AGL_XDS.md @@ -0,0 +1,31 @@ +# AGL XDS + +AGL X(cross) Development System (XDS) provides a multi-platform cross +development tool with near-zero installation. + +* xds-agent: a client/agent that should run on your local / user development machine when you use XDS. +* xds-cli: a command line tool used to control / interface X(cross) Development System, it can be used in addition to XDS DASHBOARD. +* xds-gdb: a wrapper on gdb debugger for X(cross) Development System. + +## AGL XDS for debian + +```bash +sudo apt-get install agl-xds-agent agl-xds-cli agl-xds-gdb +``` + +## AGL XDS for openSUSE + +```bash +sudo zypper install agl-xds-agent agl-xds-cli agl-xds-gdb +``` + +## AGL XDS for fedora + +```bash +sudo dnf install agl-xds-agent agl-xds-cli agl-xds-gdb +``` + +## AGL XDS Documentation + +You can find the XDS documentation + [here](http://docs.automotivelinux.org/master/docs/devguides/en/dev/reference/xds/part-1/0_Abstract.html). diff --git a/agl-documentation/host-configuration/docs/5-building-and-running-service-natively.md b/agl-documentation/host-configuration/docs/5-building-and-running-service-natively.md new file mode 100755 index 0000000..3bde906 --- /dev/null +++ b/agl-documentation/host-configuration/docs/5-building-and-running-service-natively.md @@ -0,0 +1,110 @@ +# Building and Running Your Service Natively + +The next step in the binder development process is to build your +binder and run it using your native Linux system. + +**NOTE:** This section assumes using the `helloworld-service` example +and completion of the previous steps in this +"[Building Microservices Natively](./0-build-microservice-overview.html)" +section. + +## Building the Service + +Move to the cloned `helloworld-service` repository and build the service +using either of the following methods: + +* ```bash + cd helloworld-service + ./conf.d/autobuild/linux/autobuild package + ``` + +* ```bash + cd helloworld-service + mkdir build + cd build + cmake .. + make + ``` + +## Running the Service + +You use the Application Framework Binder Daemon (`afb-daemon`) to +bind one instance of an application or service to the rest of the system. +In this example, you are binding an instance of `helloworld-service` +to the rest of the system: + +```bash +afb-daemon --binding helloworld.so --port 3333 --token '' +``` + +The previous command starts `afb-daemon` and loads the `helloworld.so` +binding. +The daemon is now listening on port 3333 of the `localhost`. + +## Testing the Service + +Refer to the +[AGL Test Framework](../../apis_services/#agl-test-framework) topic in the +"APIs & Services" topic. +You can test your `helloworld-service` binding using the `afm-test` tool. + +Examine the generic example describing how to launch the tests suite +[here](../../apis_services/reference/afb-test/3_Launch_the_tests.html). +This example can help you understand how to test your helloworld binding +instance. + +## Using Optional Tools + +Once you have built and run your micro-service successfully using your +native Linux system, you should consider using some additional +development tools: X(Cross) Development System (XDS) and +the Controller Area Network (CAN) Development Studio (CANdevStudio). + +* **XDS:** Cross-compiles and ports your AGL image to your target hardware. +For information on XDS, see the +"[X(cross) Development System: User's Guide](../reference/xds/part-1/xds-overview.html)" +section. + +* **CANdevStudio:** Simulates CAN signals such as ignition status, +doors status, or reverse gear by every automotive developer. +For information on CANdevStudio, see the +"[CANdevStudio Quickstart](../../apis_services/reference/candevstudio/1_Usage.html)" +section. + +## Troubleshooting + +### systemd and/or libmicrohttpd + +If you encounter an error message similar to the following, +you need to make some changes to your `cmake` file: + +```shell +-- Checking for module 'libmicrohttpd>=0.9.60' +-- No package 'libmicrohttpd' found +CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:415 (message): + A required package was not found +Call Stack (most recent call first): + /usr/share/cmake/Modules/FindPkgConfig.cmake:593 (_pkg_check_modules_internal) + conf.d/app-templates/cmake/cmake.d/01-build_options.cmake:92 (PKG_CHECK_MODULES) + conf.d/app-templates/cmake/common.cmake:77 (include) + conf.d/cmake/config.cmake:184 (include) + CMakeLists.txt:3 (include) +``` + +Open the `config.cmake` file located in `helloworld-service/conf.d/cmake/` directory +and add a hash character (i.e. #) to the beginning of the "libsystemd>=222" +and "libmicrohttpd>=0.9.60" strings. +Following is an example of the edits: + +```CMake + set (PKG_REQUIRED_LIST + json-c + #libsystemd>=222 + afb-daemon + #libmicrohttpd>=0.9.60 + ) +``` + +After making these changes, rebuild the service again as described in the +"[Building the Service](./4-getting-source-files.html#building-the-service)" +section previously on this page. diff --git a/agl-documentation/host-configuration/docs/5_Candevstudio.md b/agl-documentation/host-configuration/docs/5_Candevstudio.md new file mode 100644 index 0000000..6118315 --- /dev/null +++ b/agl-documentation/host-configuration/docs/5_Candevstudio.md @@ -0,0 +1,35 @@ +# CANdevStudio + +CANdevStudio is a CAN bus simulation software.\ +It can work with variety of CAN hardware interfaces (e.g.): + +* Microchip +* Vector +* PEAK-Systems +* even without it (vcan and cannelloni) + +CANdevStudio enables to simulate CAN signals such as +ignition status, doors status or reverse gear by every automotive developer. + +## CANdevStudio for debian + +```bash +sudo apt-get install CANdevStudio +``` + +## CANdevStudio for openSUSE + +```bash +sudo zypper install CANdevStudio +``` + +## CANdevStudio for fedora + +```bash +sudo dnf install CANdevStudio +``` + +## CANdevStudio Quickstart + +The CANdevStudio Quickstart can be found +[here](http://docs.automotivelinux.org/master/docs/apis_services/en/dev/reference/candevstudio/docs/1_Usage.html). diff --git a/agl-documentation/host-configuration/docs/README.md b/agl-documentation/host-configuration/docs/README.md new file mode 100644 index 0000000..b1c50df --- /dev/null +++ b/agl-documentation/host-configuration/docs/README.md @@ -0,0 +1,20 @@ +# Introduction + +AGL Automotive Grade Linux Automotive Grade Linux is a collaborative open +source project that is bringing together automakers, suppliers and technology +companies to accelerate the development and adoption of a fully open software +stack for the connected car. + +![Automotive grade linux screenshot](pictures/Automotive_grade_linux.png) + +| *Meta* | *Data* | +| -- | -- | +| **Title** | {{ config.title }} | +| **Author** | {{ config.author }} | +| **Description** | {{ config.description }} | +| **Keywords** | {{ config.keywords }} | +| **Language** | English | +| **Published** | Published {{ config.published }} as an electronic book | +| **Updated** | {{ gitbook.time }} | +| **Collection** | Open-source | +| **Website** | [{{ config.website }}]({{ config.website }}) | diff --git a/agl-documentation/host-configuration/docs/SUMMARY.md b/agl-documentation/host-configuration/docs/SUMMARY.md new file mode 100644 index 0000000..1d164c0 --- /dev/null +++ b/agl-documentation/host-configuration/docs/SUMMARY.md @@ -0,0 +1,10 @@ +# Summary + +* [Document revisions](0-Doc-Revisions.md) + +* [Abstract](0_Abstract.md) +* [Prerequisites](1_Prerequisites.md) +* [AGL Application Framework Installation](2_AGL_Application_Framework.md) +* [Binding Build Example](3_Binding_Build_Example.md) +* [AGL XDS Installation.md](4_AGL_XDS.md) +* [CanDevStudio Installation](5_Candevstudio.md) diff --git a/agl-documentation/host-configuration/docs/devguides-book.yml b/agl-documentation/host-configuration/docs/devguides-book.yml new file mode 100644 index 0000000..3eacca6 --- /dev/null +++ b/agl-documentation/host-configuration/docs/devguides-book.yml @@ -0,0 +1,22 @@ +type: books +books: +- + id: host-configuration + title: Building Microservices Natively + description: Host Configuration documentation + keywords: + author: "IotBzh" + version: master + chapters: + - url: 0-build-microservice-overview.md + name: Overview + - url: 1-verify-build-host.md + name: Verify Your Build Host + - url: 2-download-packages.md + name: Download Packages + - url: 3-installing-binder-daemon.md + name: Installing the Binder Daemon + - url: 4-getting-source-files.md + name: Getting Your Source Files + - url: 5-building-and-running-service-natively.md + name: Building and Running Your Service Natively diff --git a/agl-documentation/host-configuration/docs/pictures/Automotive_grade_linux.png b/agl-documentation/host-configuration/docs/pictures/Automotive_grade_linux.png new file mode 100644 index 0000000..46291dd Binary files /dev/null and b/agl-documentation/host-configuration/docs/pictures/Automotive_grade_linux.png differ diff --git a/agl-documentation/host-configuration/docs/pictures/CANdevStudio.png b/agl-documentation/host-configuration/docs/pictures/CANdevStudio.png new file mode 100644 index 0000000..c944e02 Binary files /dev/null and b/agl-documentation/host-configuration/docs/pictures/CANdevStudio.png differ diff --git a/agl-documentation/host-configuration/docs/pictures/HVAC.jpg b/agl-documentation/host-configuration/docs/pictures/HVAC.jpg new file mode 100644 index 0000000..79175fb Binary files /dev/null and b/agl-documentation/host-configuration/docs/pictures/HVAC.jpg differ diff --git a/agl-documentation/host-configuration/docs/pictures/Xds-screenshots.jpg b/agl-documentation/host-configuration/docs/pictures/Xds-screenshots.jpg new file mode 100644 index 0000000..1901f4c Binary files /dev/null and b/agl-documentation/host-configuration/docs/pictures/Xds-screenshots.jpg differ diff --git a/agl-documentation/host-configuration/docs/pictures/microservice-workflow-native.png b/agl-documentation/host-configuration/docs/pictures/microservice-workflow-native.png new file mode 100755 index 0000000..1c38d2a Binary files /dev/null and b/agl-documentation/host-configuration/docs/pictures/microservice-workflow-native.png differ diff --git a/agl-documentation/host-configuration/docs/resources/iotbzh_logo.png b/agl-documentation/host-configuration/docs/resources/iotbzh_logo.png new file mode 100644 index 0000000..ae6bc48 Binary files /dev/null and b/agl-documentation/host-configuration/docs/resources/iotbzh_logo.png differ diff --git a/agl-documentation/host-configuration/docs/resources/iotbzh_logo_small.png b/agl-documentation/host-configuration/docs/resources/iotbzh_logo_small.png new file mode 100644 index 0000000..6a98c60 Binary files /dev/null and b/agl-documentation/host-configuration/docs/resources/iotbzh_logo_small.png differ diff --git a/agl-documentation/host-configuration/mkdocs.yml b/agl-documentation/host-configuration/mkdocs.yml new file mode 100644 index 0000000..ca03607 --- /dev/null +++ b/agl-documentation/host-configuration/mkdocs.yml @@ -0,0 +1,11 @@ +site_name: AGL Application Framework Binder +theme: readthedocs +docs_dir: docs +pages: +- 'Document revisions' : '0-Doc-Revisions.md' +- '0. Abstract': '0_Abstract.md' +- '1. Prequisites': '1_Prerequisites.md' +- '2. AGL Application Framework Installation': '2_AGL_Application_Framework.md' +- '3. Binding Build Example': '3_Binding_Build_Example.md' +- '4. AGL XDS Installation.md': '4_AGL_XDS.md' +- '5. CanDevStudio Installation': '5_Candevstudio.md' diff --git a/agl-documentation/sdk-devkit/book.json b/agl-documentation/sdk-devkit/book.json new file mode 100644 index 0000000..a27df96 --- /dev/null +++ b/agl-documentation/sdk-devkit/book.json @@ -0,0 +1,11 @@ +{ + "title": "AGL Development Kit", + "subtitle": "Developer Documentation", + "description": "Build from scratch an image and your first AGL application", + "keywords": "AGL, Development, SDK, Build, scratch, Porter, docker, container, application", + "author": "IoT.Bzh Team", + "website": "http://iot.bzh", + "published": "March 2017", + "version": "3.1", + "pdf_filename": "AGL-Development-Kit" +} diff --git a/agl-documentation/sdk-devkit/docs/0-Doc-Revisions.md b/agl-documentation/sdk-devkit/docs/0-Doc-Revisions.md new file mode 100644 index 0000000..ab5867b --- /dev/null +++ b/agl-documentation/sdk-devkit/docs/0-Doc-Revisions.md @@ -0,0 +1,12 @@ +Document revisions +================== + +| Date | Version | Designation  | Author | +|-------------|---------|--------------------------------------|-------------------------| +| 11 Feb 2016 | 0.1 | Initial release | S. Desneux [ Iot.bzh ]
Y. Gicquel [ Iot.bzh ] | +| 18 Feb 2016 | 0.2 | Fixes, multi-platform (Windows, Mac) | M.Bachmann [ Iot.bzh] | +| 29 Feb 2016 | 0.3 | Fixes for multi-platform | M.Bachmann [ Iot.bzh] | +| 29 Feb 2016 | 1.0 | Final Review | S. Desneux [ IoT.bzh ] | +| 29 Mar 2016 | 1.1 | Public version without proprietary drivers | S. Desneux [ IoT.bzh ]
Y. Gicquel [ Iot.bzh ] | +| 15 Jul 2016 | 2.0 | Update for AGL 2.0, SDK generation
& installation added | S. Desneux [ IoT.bzh]
M.Bachmann [IoT.bzh] | +| 20 Mar 2017 | 3.1 | Convert doc sources to markdown
Align on AGL Chinook | S. Douheret [ IoT.bzh ]
S.Desneux [ IoT.bzh ] | diff --git a/agl-documentation/sdk-devkit/docs/README.md b/agl-documentation/sdk-devkit/docs/README.md new file mode 100644 index 0000000..e1bb79c --- /dev/null +++ b/agl-documentation/sdk-devkit/docs/README.md @@ -0,0 +1,24 @@ +# Introduction + +AGL Development Kit allows developers and integrators to rebuild complete bootable images +from source code, as well as developing new applications for AGL. + +It leverages Docker capabilities to propose a unified environment suitable for most development tasks: + +* compatible with AGL 3.x (based on Yocto/Poky 2.x) +* support all AGL boards inc. reference boards (Renesas, Intel) +* low-level development of drivers +* system services development and integration +* applications development (build, deploy, debug) using AGL SDK and AGL Application Framework + +| *Meta* | *Data* | +| -- | -- | +| **Title** | {{ config.title }} | +| **Author** | {{ config.author }} | +| **Description** | {{ config.description }} | +| **Keywords** | {{ config.keywords }} | +| **Language** | English | +| **Published** | Published {{ config.published }} as an electronic book | +| **Updated** | {{ gitbook.time }} | +| **Collection** | Open-source | +| **Website** | [{{ config.website }}]({{ config.website }}) | diff --git a/agl-documentation/sdk-devkit/docs/SUMMARY.md b/agl-documentation/sdk-devkit/docs/SUMMARY.md new file mode 100644 index 0000000..110d4c9 --- /dev/null +++ b/agl-documentation/sdk-devkit/docs/SUMMARY.md @@ -0,0 +1,18 @@ +# Summary + +* [Document revisions](0-Doc-Revisions.md) + +* [Part 1 - Build AGL image from scratch](part-1/1_0_Abstract.md) + * [Deploy an image using containers](part-1/1_1-Deploy_image.md) + * [Setting up your operating system](part-1/1_2-Setting-up-your_os.md) + * [Install AGL Yocto image for Porter board using Docker container](part-1/1_3-Install-agl-for-porter.md) + * [Inside the container](part-1/1_4-Inside-the-container.md) + * [Build an image for Porter board](part-1/1_5-Build-image-Porter.md) + * [Porter image deployment on target](part-1/1_6-Porter-image-deployment.md) + * [AGL SDK compilation and installation](part-1/1_7-SDK-compilation-installation.md) + +* [Part 2 - Build your 1st application](part-2/2_0_Abstract.md) + * [Initializing SDK environment and templates](part-2/2_1-Init-sdk-env.md) + * [Trying out the template](part-2/2_2-Trying-out-template.md) + * [Developing smoothly with the container](part-2/2_3-Dev-with-container.md) + * [Creating your own hybrid application](part-2/2_4-Use-app-templates.md) diff --git a/agl-documentation/sdk-devkit/docs/part-1/1_0_Abstract.md b/agl-documentation/sdk-devkit/docs/part-1/1_0_Abstract.md new file mode 100644 index 0000000..46bf74e --- /dev/null +++ b/agl-documentation/sdk-devkit/docs/part-1/1_0_Abstract.md @@ -0,0 +1,27 @@ +# Part 1 - Build AGL image from scratch + +## Abstract + +The AGL DevKit allows developers to rebuild a complete bootable image +and its associated SDK from source code.\ +It uses Yocto/Poky version 2.x with latest version of Renesas BSP and + enables low-level development of drivers and system services. + +The AGL DevKit contains: + +- This guide, which describes how to create a Docker container able to + build AGL images and associated SDKs.\ + The container is also suitable to build AGL Applications + independently of Yocto/Bitbake. +- Applications templates and demos available on Github, to start + developing various types of applications independently of Yocto: + - services + - native applications + - HTML5 applications + - ... +- A documentation guide "**AGL Devkit - Build your 1st AGL + Application**" which explains how to use the AGL SDK to create applications + based on templates. + +*This document focuses on building from scratch an AGL image for Porter +board, within a Docker container, and then install the associated SDK.* diff --git a/agl-documentation/sdk-devkit/docs/part-1/1_1-Deploy_image.md b/agl-documentation/sdk-devkit/docs/part-1/1_1-Deploy_image.md new file mode 100644 index 0000000..52319b1 --- /dev/null +++ b/agl-documentation/sdk-devkit/docs/part-1/1_1-Deploy_image.md @@ -0,0 +1,47 @@ +# Deploy an image using containers + +## Motivation + +The Yocto build environment is subject to many variations depending on: + +- Yocto/Poky/OpenEmbedded versions and revisions +- Specific layers required for building either the BSP or the whole distribution +- Host distribution and version [1] +- User environment + +In particular, some recent Linux host distributions (Ubuntu 15.x, Debian +8.x, OpenSUSE 42.x, CentOS 7.x) do not officially support building with +Yocto 2.0. +Unfortunately, there's no easy solution to solve this kind of +problem: + +- we will still observe for quite a long time a significant gap + between the latest OS versions and a fully certified build environment. + +To circumvent those drawbacks and get more deterministic results amongst +the AGL community of developers and integrators, using virtualization is +a good workaround. +A Docker container is now available for AGL images: + +- it is faster, easier and less error-prone to use a prepared Docker + container because it provides all necessary components to build and + deploy an AGL image, including a validated base OS, independently of the + user's host OS. + +Moreover, light virtualization mechanisms used by Docker +do not add much overhead when building: + +- performances are nearly equal to native mode. + +[1] *The list of validated host distros is defined in the Poky distro, in +the file `meta-yocto/conf/distro/poky.conf` and also at [http://www.yoctoproject.org/docs/2.0/ref-manual/ref-manual.html#detailed-supported-distros](http://www.yoctoproject.org/docs/2.0/ref-manual/ref-manual.html#detailed-supported-distros)* + +## Prerequisites + +To run an AGL Docker image, the following prerequisites must be +fulfilled: + +- You must run a 64-bit operating system, with administrative rights, +- Docker engine v1.8 or greater must be installed, +- An internet connection must be available to download the Docker + image on your local host. diff --git a/agl-documentation/sdk-devkit/docs/part-1/1_2-Setting-up-your_os.md b/agl-documentation/sdk-devkit/docs/part-1/1_2-Setting-up-your_os.md new file mode 100644 index 0000000..2420c68 --- /dev/null +++ b/agl-documentation/sdk-devkit/docs/part-1/1_2-Setting-up-your_os.md @@ -0,0 +1,217 @@ +# Setting up your operating system + +In this section, we describe the Docker installation procedure depending +on your host system. We will be focusing on the most popular systems; +for a full list of supported operating systems, please refer to Docker +online documentation: [https://docs.docker.com/](https://docs.docker.com/) + +## Linux (Ubuntu / Debian) + +At the time of writing, Docker project supports these Ubuntu/Debian +releases: + +- Ubuntu Yakkety 16.10 +- Ubuntu Xenial 16.04 LTS +- Ubuntu Trusty 14.04 LTS +- Debian 8.0 (64-bit) +- Debian 7.7 (64-bit) + +For an updated list of supported distributions, you can refer to the +Docker project website, at these locations: + +- [https://docs.docker.com/engine/installation/linux/debian/](https://docs.docker.com/engine/installation/linux/debian/) +- [https://docs.docker.com/engine/installation/linux/ubuntu/](https://docs.docker.com/engine/installation/linux/ubuntu/) + +Here are the commands needed to install the Docker engine on your local +host: + +```bash +sudo apt-get update +sudo apt-get install wget curl +wget -qO- https://get.docker.com/ | sh +``` + +This will register a new location in your "sources.list" file and +install the "docker.io" package and its dependencies: + +```bash +$ cat /etc/apt/sources.list.d/docker.list +$ deb [arch=amd64] https://apt.dockerproject.org/repo ubuntu-xenial main +$ docker --version +Docker version 17.03.0-ce, build 60ccb22 +``` + +It is then recommended to add your user to the new "docker" system +group: + +```bash +sudo usermod -aG docker ** +``` + +... and after that, to log out and log in again to have these credentials +applied. + +You can reboot your system or start the Docker daemon using: + +```bash +sudo service docker start +``` + +If everything went right, you should be able to list all locally +available images using: + +```bash +$ docker images +REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE +``` + +In our case, no image is available yet, but the environment is ready to +go on. + +A SSH client must also be installed: + +```bash +sudo apt-get install openssh-client +``` + +## Windows © (7, 8, 8.1, 10) + +**WARNING: although Windows© can work for this purpose, not only are lots +of additional steps needed, but the build process performance itself is +suboptimal. Please consider moving to Linux for a better experience.** + +We will be downloading the latest Docker Toolbox at the following +location: + +[*https://www.docker.com/docker-toolbox*](https://www.docker.com/docker-toolbox) + +and by clicking on the "*Download (Windows)*" button: + +![window install windows 1](pictures/docker_install_windows_1.png)\ +We will answer "Yes", "Next" and "Install" in the next dialog boxes. + +![window install windows 2](pictures/docker_install_windows_2.png){style width:60%;} + +![window install windows 3](pictures/docker_install_windows_3.png){style width:48%; float:left; margin-right:0.3em} +![window install windows 4](pictures/docker_install_windows_4.png){style width:48%; float:right} + +![window install windows 5](pictures/docker_install_windows_5.png) + +We can then start it by double-clicking on the "Docker Quickstart +Terminal" icon: + +![window install windows 6](pictures/docker_install_windows_6.png) + +It will take a certain amount time to setup everything, until this +banner appears: + +![window install windows 7](pictures/docker_install_windows_7.png) + +Docker Toolbox provides a 1 Gb RAM/20 Go HDD virtual machine; this is +clearly insufficient for our needs. Let us expand it to 4 Gb RAM/50 +HDD (*these are minimal values; feel free to increase them if your computer +has more physical memory and/or free space*) : + +```bash +export VBOXPATH=/c/Program\ Files/Oracle/VirtualBox/ +export PATH="$PATH:$VBOXPATH" + +docker-machine stop default + +VBoxManage.exe modifyvm default --memory 4096 +VBoxManage.exe createhd --filename build.vmdk --size 51200 --format VMDK +VBoxManage.exe storageattach default --storagectl SATA --port 2 --medium build.vmdk --type hdd + +docker-machine start default + +docker-machine ssh default "sudo /usr/local/sbin/parted --script /dev/sdb mklabel msdos" +docker-machine ssh default "sudo /usr/local/sbin/parted --script /dev/sdb mkpart primary ext4 1% 99%" +docker-machine ssh default "sudo mkfs.ext4 /dev/sdb1" +docker-machine ssh default "sudo mkdir /tmp/sdb1" +docker-machine ssh default "sudo mount /dev/sdb1 /tmp/sdb1" +docker-machine ssh default "sudo cp -ra /mnt/sda1/* /tmp/sdb1" + +docker-machine stop default + +VboxManage.exe storageattach default --storagectl SATA --port 2 --medium none +VboxManage.exe storageattach default --storagectl SATA --port 1 --medium build.vmdk --type hdd + +docker-machine start default +``` + +We will then finalize the setup: + +```bash +VboxManage.exe modifyvm default --natpf1 sshredir,tcp,127.0.0.1,2222,,2222 +docker-machine start default +docker-machine ssh default "echo mkdir /sys/fs/cgroup/systemd | sudo tee /var/lib/boot2docker/bootlocal.sh" +docker-machine restart default +``` + +A SSH client must also be installed. We will grab *PuTTY* at the +following URL: +[*http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe*](http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe) + +## Mac OS X © + +We will be downloading the latest Docker Toolbox at the following +location: +[https://www.docker.com/docker-toolbox](https://www.docker.com/docker-toolbox) + +and by clicking on the "*Download (Mac)*" button: + +![window install macro 1](pictures/docker_install_macos_1.png) + +We will answer "Continue" and "Install" in the next dialog boxes: + +![window install macro 2](pictures/docker_install_macos_2.png) + +![window install macro 3](pictures/docker_install_macos_3.png){style width:80%;} +![window install macro 4](pictures/docker_install_macos_4.png){style width:80%;} + +Then, when we go to our "Applications" folder, we now have a "Docker" +subfolder where we can start "Docker Quickstart Terminal": + +![window install macro 5](pictures/docker_install_macos_5.png) + +It will take a certain amount of time to setup everything, until this +banner appears: + +![window install macro 6](pictures/docker_install_macos_6.png) + +Docker Toolbox provides a 1 Gb RAM/20 Go HDD virtual machine; this is +clearly insufficient for our needs. Let us expand it to 4 Gb RAM/50 +HDD (*these are minimal values; feel free to increase them if your computer +has more physical memory and/or free space*) : + +```bash +docker-machine stop default + +VboxManage modifyvm default --memory 4096 +VboxManage createhd --filename build.vmdk --size 51200 --format VMDK +VboxManage storageattach default --storagectl SATA --port 2 --medium build.vmdk --type hdd + +docker-machine start default + +docker-machine ssh default "sudo /usr/local/sbin/parted --script /dev/sdb mklabel msdos" +docker-machine ssh default "sudo /usr/local/sbin/parted --script /dev/sdb mkpart primary ext4 1% 99%" +docker-machine ssh default "sudo mkfs.ext4 /dev/sdb1" +docker-machine ssh default "sudo mkdir /tmp/sdb1" +docker-machine ssh default "sudo mount /dev/sdb1 /tmp/sdb1" +docker-machine ssh default "sudo cp -ra /mnt/sda1/* /tmp/sdb1" + +docker-machine stop default + +VboxManage storageattach default --storagectl SATA --port 2 --medium none +VboxManage storageattach default --storagectl SATA --port 1 --medium build.vmdk --type hdd + +docker-machine start default +``` + +We will then finalize the setup: + +```bash +VboxManage modifyvm default --natpf1 sshredir,tcp,127.0.0.1,2222,,2222 +docker-machine ssh default "echo mkdir /sys/fs/cgroup/systemd | sudo tee /var/lib/boot2docker/bootlocal.sh" +docker-machine restart default +``` diff --git a/agl-documentation/sdk-devkit/docs/part-1/1_3-Install-agl-for-porter.md b/agl-documentation/sdk-devkit/docs/part-1/1_3-Install-agl-for-porter.md new file mode 100644 index 0000000..905eb2a --- /dev/null +++ b/agl-documentation/sdk-devkit/docs/part-1/1_3-Install-agl-for-porter.md @@ -0,0 +1,276 @@ +# Install AGL Yocto image for Porter board using Docker container + +## Overview + +This section gives details on a procedure which allows system developers +and integrators to set up a the build environment image on their local +host. + +The prepared environment is deployed and available thanks to lightweight +virtualization containers using Docker technology +(See [https://www.docker.com/](https://www.docker.com/)). +The pre-built image for AGL development activities is currently designed to be +accessed using SSH Protocol. + +## Download the docker image + +At the time of writing, we distribute the image as a compressed archive +which can be downloaded faster as its footprint is around 226 MB. You +can then import it into Docker with the following command: + +```bash +curl https://download.automotivelinux.org/AGL/snapshots/sdk/docker/docker_agl_worker-3.0.tar.xz | docker load +``` + +You can check that the new Docker image is available by running the +`docker images` command : + +```bash +$ docker images +REPOSITORY TAG IMAGE ID CREATED SIZE +docker.automotivelinux.org/agl/worker 3.0 18a6db4db383 2 months ago 925 MB +``` + +*Note*: if you want to rebuild from scratch this docker image, you should +use scripts located into `docker-worker-generator` repository. + +```bash +git clone https://gerrit.automotivelinux.org/gerrit/AGL/docker-worker-generator +``` + +Then, please refer to `README.md` file for more details. + +## Start the container + + + +Once the image is available on your local host, you can start the +container and the SSH service. We'll also need a local directory on the +host to store bitbake mirrors (download cache and sstate cache): this +mirror helps to speed up builds. + +First, create a local directory and make it available to everyone: + +```bash +MIRRORDIR=; +mkdir -p $MIRRORDIR +chmod 777 $MIRRORDIR +``` + +Then we can start the docker image using the following command: + +```bash +docker run \ + --publish=2222:22 \ + --publish=8000:8000 \ + --publish=69:69/udp --publish=10809:10809 \ + --detach=true --privileged \ + --hostname=bsp-devkit --name=bsp-devkit \ + -v /sys/fs/cgroup:/sys/fs/cgroup:ro \ + -v $MIRRORDIR:/home/devel/mirror \ + docker.automotivelinux.org/agl/worker:3.0 +``` + +Then, you can check that the image is running with the following +command: + +```bash +$ docker ps +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +3126423788bd docker.automotivelinux.org/agl/worker:3.0 "/usr/bin/wait_for..." 2 seconds ago Up 2 seconds 0.0.0.0:2222->22/tcp, 0.0.0.0:69->69/udp, 0.0.0.0:8000->8000/tcp, 0.0.0.0:10809->10809/tcp bsp-devkit +``` + +The container is now ready to be used. A dedicated user has been +declared: + +- login: **devel** +- password: **devel** + +The following port redirections allow access to some services in the +container: + +- port 2222: SSH access using `ssh -p 2222 devel@localhost` +- port 8000: access to Toaster WebUI through [http://localhost:8000/](http://localhost:8000/) + when started (see Yocto documentation) +- ports 69 (TFTP) and 10809 (NBD): used for network boot (future enhancement) + +For easier operations, you can copy your ssh identity inside the +container: + +```bash +ssh-copy-id -p 2222 # password is 'devel' +``` + +## Connect to Yocto container through SSH + +The DevKit container provides a pre-built set of tools which can be +accessed through a terminal by using Secure Shell protocol (SSH). + +### Linux, Mac OS X © + +On Linux-based systems, you may need to install an SSH client. + +To launch the session, you can enter the following under Linux or Mac OS X: + +```bash +ssh -p 2222 devel@localhost +``` + +The password is "**devel**". You should obtain the following prompt +after success: + +```bash +devel@localhost's password: **devel** + +The programs included with the Debian GNU/Linux system are free +software; the exact distribution terms for each program are described in the +individual files in /usr/share/doc/*/copyright. + +Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent +permitted by applicable law. +[11:28:27] devel@bsp-devkit:~$ +``` + +### Windows © + +You will need *PuTTY*, downloaded during the setup +section. Run it using its icon: + +![windows putty 1](pictures/windows_putty_1.png){style width:60px;} + +We can then connect to "**localhost**" on port +"**2222**". + +![windows putty 2](pictures/windows_putty_2.png){style width:60%;} + +Credentials are the same as for Linux: user is "**devel**" with password +"**devel**". + +## Set up a persistent workspace + + + +AGL Docker image brings a set of tools and here we describe a way to +prepare a "shared directory" on your local host accessible from the +container. The aim of this shared directory is to allow your ongoing +developments to stay independent from the container upgrades. + +Please note this whole procedure is not mandatory, but highly +recommended as it will save disk space later when you will deploy the SD +card image on your target. + +### From Linux host using a shared directory + +Current docker implementation has a limitation about UID:GID mapping +between hosts and containers. In the long run, the planned mechanism is +to use the "user namespace" feature. But for now, we propose another +approach unfortunately less flexible. + +We can use a directory on the local host with a dedicated Unix group +using a common GID between the host and the container. This GID has been +fixed to "1664" ([see](https://en.wikipedia.org/wiki/Beer_in_France)) +and can be created on your linux host using the following commands: + +```bash +sudo groupadd --gid 1664 agl-sdk +sudo usermod -aG agl-sdk ** +``` + +If this GID is already used on your local host, you will have to use it +for this sharing purpose as well. In case this is not possible, another +option to exchange workspace data can be the use of a network service +(like SSH, FTP) of the container and from your local host. + +Once the GID is ready to use, we can create a shared directory (not as +'root', but as your normal user): + +```bash +cd +mkdir $HOME/agl-workspace +sudo chgrp agl-sdk $HOME/agl-workspace +chmod ug+w $HOME/agl-workspace +``` + +And run the Docker image with the shared directory (new volume): + +```bash +$ docker run \ + --publish=2222:22 \ + --publish=8000:8000 \ + --publish=69:69/udp --publish=10809:10809 \ + --detach=true --privileged \ + --hostname=bsp-devkit --name=bsp-devkit \ + -v /sys/fs/cgroup:/sys/fs/cgroup:ro \ + -v $MIRRORDIR:/home/devel/mirror \ + -v $HOME/agl-workspace:/xdt/workspace \ <--- shared directory + docker.automotivelinux.org/agl/worker:3.0 +``` + +### From Windows © host using a shared directory + +We will create a shared directory for our user: + +```bash +mkdir /c/Users/$USERNAME/agl-workspace +``` + +And run the Docker image with the shared directory (new volume): + +```bash +$ docker run \ + --publish=2222:22 --publish=8000:8000 \ + --publish=69:69/udp --publish=10809:10809 \ + --detach=true --privileged --hostname=bsp-devkit \ + --name=bsp-devkit \ + -v /sys/fs/cgroup:/sys/fs/cgroup:ro \ + -v $MIRRORDIR:/home/devel/mirror \ + -v /c/Users/$USERNAME/agl-workspace:/xdt/workspace \ <--- shared directory + docker.automotivelinux.org/agl/worker:3.0 +``` + +### From the container using a remote directory (SSHFS) + +It's also possible to mount a remote directory inside the container if +the source host is running a ssh server. In that case, we will use a SSH +connection from the host to the container as a control link, and another +SSH connection from the container to the host as a data link. + +To do so, you can start the container normally as described in +[Start container chapter](#anchor-start-container), start an SSH session and +run the following commands to install the package "sshfs" inside the container: + +```bash +sudo apt-get update +sudo apt-get install -y sshfs +``` + +NB: sudo will ask for the password of the user "**devel**", which is +"**devel**". + +Now, if we want to mount the remote dir '/data/workspace' with user +'alice' on host 'computer42', then we would run: + +```bash +$ sshfs alice@computer42:/data/workspace -o nonempty $XDT_WORKSPACE +... +Password: +``` + +NB: the directory on the remote machine must be owned by the remote user + +Verify that the mount is effective: + +```bash +$ df /xdt/workspace +Filesystem 1K-blocks Used Available Use% Mounted on +alice@computer42:/data/workspace 103081248 7138276 95612016 7% /xdt/workspace +``` + +From now, the files created inside the container in /xdt/workspace are +stored 'outside', in the shared directory with proper uid/gid. + +To unmount the shared directory, you can run: + +```bash +$sudo umount $XDT_WORKSPACE +``` diff --git a/agl-documentation/sdk-devkit/docs/part-1/1_4-Inside-the-container.md b/agl-documentation/sdk-devkit/docs/part-1/1_4-Inside-the-container.md new file mode 100644 index 0000000..3380b22 --- /dev/null +++ b/agl-documentation/sdk-devkit/docs/part-1/1_4-Inside-the-container.md @@ -0,0 +1,76 @@ +# Inside the container + +## Features + +Container features: + +- a Debian 8.5 based system with an SSH server listening on tcp/22, +- a dedicated user is defined to run the SSH session: **devel** + (password: **devel**) +- a script named "prepare_meta" for preparing the build environment + +## File system organization and shared volume + +The image has been designed with a dedicated file-system hierarchy. Here it is: + +```bash +devel@bsp-devkit:/$ **tree -L 2 /xdt** +/xdt +|-- build +| `-- conf +| |-- bblayers.conf +| |-- local.conf +| [snip] +|-- ccache +|-- downloads +|-- meta +| |-- agl-manifest +| |-- meta-agl +| |-- meta-agl-demo +| |-- meta-agl-extra +| |-- meta-amb +| |-- meta-intel +| |-- meta-intel-iot-security +| |-- meta-iot-agl +| |-- meta-oic +| |-- meta-openembedded +| |-- meta-qt5 +| |-- meta-renesas +| |-- meta-rust +| |-- meta-security-isafw +| `-- poky +|-- sdk +|-- sources +|-- sstate-cache +| |-- 00 +| |-- 01 +| |-- 02 +| |-- 03 +| |-- 04 +| |-- 05 +| |-- 06 +| |-- 07 + [snip] +`-- workspace +``` + +Noticeably, the BSP related features are located in the dedicated "/xdt" +directory. + +This directory contains sub-directories, and in particular the +following: + +- **build**: will contain the result of the build process, including + an image for the Porter board. +- **downloads**: (optional) contain the Yocto download cache, a + feature which will locally store the upstream projects sources codes + and which is fulfilled when an image is built for the first time. + When populated, this cache allow the user to built without any + connection to Internet. +- **meta**: contains the pre-selected Yocto layers required to built + the relevant AGL image for the Porter board. +- **sstate-cache**: (optional) contain the Yocto shared state + directory cache, a feature which store the intermediate output of + each task for each recipe of an image. This cache enhance the image + creation speed time by avoiding Yocto task to be run when they are + identical to a previous image creation. diff --git a/agl-documentation/sdk-devkit/docs/part-1/1_5-Build-image-Porter.md b/agl-documentation/sdk-devkit/docs/part-1/1_5-Build-image-Porter.md new file mode 100644 index 0000000..a13e9d3 --- /dev/null +++ b/agl-documentation/sdk-devkit/docs/part-1/1_5-Build-image-Porter.md @@ -0,0 +1,175 @@ +# Build an image for Porter board + +In this section, we will go on the image compilation for the Porter +board within the Docker container. + +## Download Renesas proprietary drivers + +For the Porter board, we first need to download the proprietary drivers +from Renesas web site. The evaluation version of these drivers can be +found here: + +[http://www.renesas.com/secret/r_car_download/rcar_demoboard.jsp](http://www.renesas.com/secret/r_car_download/rcar_demoboard.jsp) + +under the **Target hardware: R-Car H2, M2 and E2** section: + +![renesas download](pictures/renesas_download.jpg) + +Note that you have to register with a free account on MyRenesas and +accept the license conditions before downloading them. The operation is +fast and simple but nevertheless mandatory to access evaluation of non +open-source drivers for free. + +Once you register, you can download two zip files: store them in a +directory visible from the container, for example in the directory +`$MIRRORDIR/proprietary-renesas-r-car` (`$MIRRORDIR` was created +previously in section [Start the container](#anchor-start-container) and adjust +the permissions. The zip files should then be visible from the inside of the +container in `/home/devel/mirror`: + +```bash +$ chmod +r /home/devel/mirror/proprietary-renesas-r-car/*.zip +$ ls -l /home/devel/mirror/proprietary-renesas-r-car/ +total 8220 +-rw-r--r-- 1 1000 1000 6047383 Jul 11 11:03 R-Car_Series_Evaluation_Software_Package_for_Linux-20151228.zip +-rw-r--r-- 1 1000 1000 2394750 Jul 11 11:03 R-Car_Series_Evaluation_Software_Package_of_Linux_Drivers-20151228.zip +``` + +## Setup the build environment + +We should first prepare the environment to build images. + +This can be easily done thanks to a helper script named `prepare_meta`. +This script does the following: + +- check for an updated version at + [https://github.com/iotbzh/agl-manifest](https://github.com/iotbzh/agl-manifest) +- pull Yocto layers from git repositories, following a snapshot manifest +- setup build configuration (build/conf files) + +The following options are available: + +```bash +devel@bsp-devkit:~$ prepare_meta -h +prepare_meta [options] + +Options: + -f|--flavour + what flavour to us + default: 'iotbzh' + possible values: 'stable','unstable','testing', 'iotbzh' ... see agl-manifest git repository + -o|--outputdir + output directory where subdirectories will be created: meta, build, ... + default: current directory (.) + -l|--localmirror + specifies a local mirror directory to initialize meta, download_dir or sstate-cache + default: none + -r|--remotemirror + specifies a remote mirror directory to be used at build time for download_dir or sstate-cache + default: none + -p|--proprietary + Directory containing Renesas proprietary drivers for RCar platform (2 zip files) + default: none + -e|--enable