From 0aaa3bdc91beb2c3fc0c6593118ce710bbdc9970 Mon Sep 17 00:00:00 2001 From: Eman Copty Date: Fri, 5 Oct 2018 20:28:06 -0700 Subject: [PATCH] 2.08.01 release updates + Apache license Remove FW file --- ATTRIBUTIONS | 383 +++++++++++- LICENSE | 225 +------ api/LICENSE | 225 +------ api/include/mvnc.h | 29 +- api/include/ncCommPrivate.h | 29 +- api/include/ncPrivateTypes.h | 29 +- api/python/mvnc/mvncapi.py | 28 +- api/src/Makefile | 35 +- .../components/XLink/pc/UsbLinkPlatform.c | 530 ---------------- .../components/XLink/pc/XLinkPlatform.c | 573 ++++++++++++++++++ api/src/common/components/XLink/pc/usb_boot.c | 57 +- api/src/common/components/XLink/pc/usb_boot.h | 31 +- .../components/XLink/shared/UsbLinkPlatform.h | 72 --- .../common/components/XLink/shared/XLink.c | 423 +++++++++---- .../common/components/XLink/shared/XLink.h | 35 +- .../components/XLink/shared/XLinkDispatcher.c | 85 ++- .../components/XLink/shared/XLinkDispatcher.h | 35 +- .../components/XLink/shared/XLinkPlatform.h | 84 +++ .../XLink/shared/XLinkPrivateDefines.h | 71 ++- .../XLink/shared/XLinkPublicDefines.h | 41 +- .../components/XLink/shared/XLinkVersion.h | 30 +- .../components/XLinkConsole/pc/XLinkConsole.c | 29 +- .../components/XLinkConsole/pc/XLinkConsole.h | 29 +- api/src/common/shared/include/mvLog.h | 29 +- api/src/common/shared/include/mvMacros.h | 29 +- api/src/get_mvcmd.sh | 127 ++++ api/src/mvnc_api.c | 93 ++- api/src/version.txt | 2 +- docs/docker.html | 88 ++- docs/images/favicon.ico | Bin 52524 -> 1150 bytes docs/ncapi/ncapi2/c_api/ncDeviceClose.html | 56 ++ docs/ncapi/ncapi2/c_api/ncDeviceCreate.html | 56 ++ docs/ncapi/ncapi2/c_api/ncDeviceDestroy.html | 56 ++ .../ncapi/ncapi2/c_api/ncDeviceGetOption.html | 56 ++ docs/ncapi/ncapi2/c_api/ncDeviceHandle_t.html | 56 ++ .../ncapi2/c_api/ncDeviceHwVersion_t.html | 56 ++ docs/ncapi/ncapi2/c_api/ncDeviceOpen.html | 56 ++ docs/ncapi/ncapi2/c_api/ncDeviceOption_t.html | 56 ++ .../ncapi/ncapi2/c_api/ncDeviceSetOption.html | 56 ++ docs/ncapi/ncapi2/c_api/ncDeviceState_t.html | 56 ++ docs/ncapi/ncapi2/c_api/ncFifoAllocate.html | 56 ++ docs/ncapi/ncapi2/c_api/ncFifoCreate.html | 56 ++ docs/ncapi/ncapi2/c_api/ncFifoDataType_t.html | 56 ++ docs/ncapi/ncapi2/c_api/ncFifoDestroy.html | 56 ++ docs/ncapi/ncapi2/c_api/ncFifoGetOption.html | 56 ++ docs/ncapi/ncapi2/c_api/ncFifoHandle_t.html | 56 ++ docs/ncapi/ncapi2/c_api/ncFifoOption_t.html | 56 ++ docs/ncapi/ncapi2/c_api/ncFifoReadElem.html | 56 ++ docs/ncapi/ncapi2/c_api/ncFifoRemoveElem.html | 56 ++ docs/ncapi/ncapi2/c_api/ncFifoSetOption.html | 56 ++ docs/ncapi/ncapi2/c_api/ncFifoState_t.html | 56 ++ docs/ncapi/ncapi2/c_api/ncFifoType_t.html | 56 ++ docs/ncapi/ncapi2/c_api/ncFifoWriteElem.html | 56 ++ .../ncapi/ncapi2/c_api/ncGlobalGetOption.html | 56 ++ docs/ncapi/ncapi2/c_api/ncGlobalOption_t.html | 56 ++ .../ncapi/ncapi2/c_api/ncGlobalSetOption.html | 56 ++ docs/ncapi/ncapi2/c_api/ncGraphAllocate.html | 56 ++ .../c_api/ncGraphAllocateWithFifos.html | 56 ++ .../c_api/ncGraphAllocateWithFifosEx.html | 56 ++ docs/ncapi/ncapi2/c_api/ncGraphCreate.html | 56 ++ docs/ncapi/ncapi2/c_api/ncGraphDestroy.html | 56 ++ docs/ncapi/ncapi2/c_api/ncGraphGetOption.html | 56 ++ docs/ncapi/ncapi2/c_api/ncGraphHandle_t.html | 56 ++ docs/ncapi/ncapi2/c_api/ncGraphOption_t.html | 56 ++ .../ncapi2/c_api/ncGraphQueueInference.html | 56 ++ .../ncGraphQueueInferenceWithFifoElem.html | 56 ++ docs/ncapi/ncapi2/c_api/ncGraphSetOption.html | 56 ++ docs/ncapi/ncapi2/c_api/ncGraphState_t.html | 56 ++ docs/ncapi/ncapi2/c_api/ncLogLevel_t.html | 56 ++ docs/ncapi/ncapi2/c_api/ncStatus_t.html | 56 ++ .../ncapi2/c_api/ncTensorDescriptor_t.html | 56 ++ docs/ncapi/ncapi2/c_api/readme.html | 56 ++ docs/ncapi/ncapi2/py_api/FifoOption.html | 2 +- docs/release_notes.html | 38 +- docs/tools/tools_overview.html | 6 +- examples/apps/hello_ncs_cpp/cpp/hello_ncs.cpp | 28 +- examples/apps/hello_ncs_py/Makefile | 2 +- examples/apps/hello_ncs_py/hello_ncs.py | 28 +- .../apps/multistick_cpp/cpp/multistick.cpp | 28 +- examples/caffe/AlexNet/cpp/run.cpp | 28 +- examples/caffe/AlexNet/run.py | 28 +- examples/caffe/GoogLeNet/cpp/run.cpp | 28 +- examples/caffe/GoogLeNet/run.py | 28 +- examples/caffe/SqueezeNet/cpp/run.cpp | 28 +- examples/caffe/SqueezeNet/run.py | 28 +- examples/tensorflow/inception_v1/Makefile | 6 +- examples/tensorflow/inception_v1/run.py | 28 +- examples/tensorflow/inception_v3/Makefile | 8 +- examples/tensorflow/inception_v3/run.py | 28 +- extras/docker/Dockerfile | 1 + extras/docker/Dockerfile_NoPreviligeAccess | 25 + extras/docker/README.md | 7 +- extras/docker/docker_cmd.sh | 16 + extras/docker/ncs_boot_devices/Makefile | 75 +++ .../ncs_boot_devices/ncs_boot_devices.c | 92 +++ extras/docker/ncs_boot_devices/readme.md | 33 + install-utilities.sh | 11 +- install.sh | 92 +-- requirements.txt | 2 +- requirements_apt.txt | 2 +- version.txt | 2 +- 101 files changed, 4846 insertions(+), 1710 deletions(-) delete mode 100644 api/src/common/components/XLink/pc/UsbLinkPlatform.c create mode 100644 api/src/common/components/XLink/pc/XLinkPlatform.c delete mode 100644 api/src/common/components/XLink/shared/UsbLinkPlatform.h create mode 100644 api/src/common/components/XLink/shared/XLinkPlatform.h create mode 100755 api/src/get_mvcmd.sh create mode 100644 extras/docker/Dockerfile_NoPreviligeAccess create mode 100755 extras/docker/docker_cmd.sh create mode 100644 extras/docker/ncs_boot_devices/Makefile create mode 100644 extras/docker/ncs_boot_devices/ncs_boot_devices.c create mode 100644 extras/docker/ncs_boot_devices/readme.md diff --git a/ATTRIBUTIONS b/ATTRIBUTIONS index 2f92008..1eaeee6 100644 --- a/ATTRIBUTIONS +++ b/ATTRIBUTIONS @@ -3,8 +3,7 @@ The following are licenses for third party software that was used to develop the Movidius Neural Compute API Library. These licenses are listed due to attribution requirements in these license agreements. For the avoidance of doubt, -the Movidius Neural Compute API Library is solely governed by the terms and conditions of the Intel OBL SDK and Tools -License License that accompanies it. +the Movidius Neural Compute API Library is solely governed by the terms and conditions of the Intel Apache License that accompanies it. 1. Numerical Python - NumPy @@ -147,3 +146,383 @@ License License that accompanies it. LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +5. GNU C Library - glibc + License: GNU Lesser General Public License + homepage: http://www.gnu.org/software/libc/libc.html + + GNU Lesser General Public License + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + [This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. + This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. + When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. + To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. + For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. + We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. + To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. + Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. + Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. + When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. + We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. + For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. + In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. + Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. + The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". + A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. + The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) + "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. + Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. + 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. + You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. + 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: + a) The modified work must itself be a software library. + b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. + c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. + d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. + (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) + These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. + Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. + In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. + 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. + Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. + This option is useful when you wish to copy part of the code of the Library into a program that is not a library. + 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. + If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. + 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. + However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. + When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. + If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) + Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. + 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. + You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: + a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) + b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. + c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. + d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. + e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. + For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. + It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. + 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: + a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. + b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. + 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. + 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. + 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. + 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. + If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. + It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. + This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. + 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. + 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. + 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. + NO WARRANTY + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + END OF TERMS AND CONDITIONS + How to Apply These Terms to Your New Libraries + If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). + To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. + one line to give the library's name and an idea of what it does. + Copyright (C) year name of author + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Also add information on how to contact you by electronic and paper mail. + You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: + Yoyodyne, Inc., hereby disclaims all copyright interest in + the library `Frob' (a library for tweaking knobs) written + by James Random Hacker. + signature of Ty Coon, 1 April 1990 + Ty Coon, President of Vice + That's all there is to it! + +6. Linux Kernel + License: GNU General Public License v2.0 only + Homepage: http://www.kernel.org/ + + The GNU General Public License (GPL) + Version 2, June 1991 + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + Preamble + The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. + When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. + To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. + For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. + We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. + Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. + Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. + The precise terms and conditions for copying, distribution and modification follow. + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". + Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. + 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. + You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. + 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: + a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. + b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. + c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) + These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. + Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. + In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. + 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: + a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, + b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, + c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) + The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. + If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. + 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. + 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. + 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. + 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. + If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. + It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. + This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. + 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. + 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. + 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. + NO WARRANTY + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + END OF TERMS AND CONDITIONS + +7. libusb + License: GNU Lesser General Public License v2.1 or later + Homepage: http://libusb.info/ + + GNU Lesser General Public License + Version 2.1, February 1999 + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + [This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + Preamble + The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. + This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. + When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. + To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. + For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. + We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. + To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. + Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. + Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. + When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. + We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. + For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. + In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. + Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. + The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". + A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. + The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) + "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. + Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. + 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. + You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. + 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: + a) The modified work must itself be a software library. + b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. + c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. + d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. + (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) + These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. + Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. + In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. + 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. + Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. + This option is useful when you wish to copy part of the code of the Library into a program that is not a library. + 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. + If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. + 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. + However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. + When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. + If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) + Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. + 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. + You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: + a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) + b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. + c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. + d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. + e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. + For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. + It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. + 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: + a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. + b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. + 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. + 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. + 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. + 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. + If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. + It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. + This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. + 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. + 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. + 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. + NO WARRANTY + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + END OF TERMS AND CONDITIONS + How to Apply These Terms to Your New Libraries + If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). + To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. + one line to give the library's name and an idea of what it does. + Copyright (C) year name of author + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Also add information on how to contact you by electronic and paper mail. + You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: + Yoyodyne, Inc., hereby disclaims all copyright interest in + the library `Frob' (a library for tweaking knobs) written + by James Random Hacker. + signature of Ty Coon, 1 April 1990 + Ty Coon, President of Vice + That's all there is to it! + +8. systemd + License: GNU Lesser General Public License v2.1 or later + Homepage: http://freedesktop.org/wiki/Software/systemd/ + + GNU Lesser General Public License + Version 2.1, February 1999 + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + [This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + Preamble + The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. + This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. + When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. + To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. + For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. + We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. + To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. + Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. + Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. + When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. + We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. + For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. + In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. + Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. + The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". + A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. + The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) + "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. + Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. + 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. + You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. + 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: + a) The modified work must itself be a software library. + b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. + c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. + d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. + (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) + These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. + Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. + In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. + 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. + Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. + This option is useful when you wish to copy part of the code of the Library into a program that is not a library. + 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. + If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. + 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. + However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. + When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. + If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) + Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. + 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. + You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: + a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) + b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. + c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. + d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. + e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. + For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. + It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. + 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: + a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. + b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. + 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. + 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. + 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. + 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. + If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. + It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. + This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. + 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. + 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. + 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. + NO WARRANTY + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + END OF TERMS AND CONDITIONS + How to Apply These Terms to Your New Libraries + If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). + To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. + one line to give the library's name and an idea of what it does. + Copyright (C) year name of author + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Also add information on how to contact you by electronic and paper mail. + You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: + Yoyodyne, Inc., hereby disclaims all copyright interest in + the library `Frob' (a library for tweaking knobs) written + by James Random Hacker. + signature of Ty Coon, 1 April 1990 + Ty Coon, President of Vice + That's all there is to it! diff --git a/LICENSE b/LICENSE index a444ba1..617d376 100644 --- a/LICENSE +++ b/LICENSE @@ -1,193 +1,32 @@ -SOFTWARE TOOLS LICENSE AGREEMENT - -DO NOT DOWNLOAD, INSTALL, ACCESS, COPY, OR USE ANY PORTION OF THE MATERIALS (DEFINED BELOW) UNTIL YOU HAVE READ AND ACCEPTED -THE TERMS AND CONDITIONS OF THIS AGREEMENT. BY INSTALLING, COPYING, ACCESSING, OR USING THE MATERIALS, YOU AGREE TO BE LEGALLY -BOUND BY THE TERMS AND CONDITIONS OF THIS AGREEMENT. If You do not agree to be bound by, or the entity for whose benefit You act has not -authorized You to accept, these terms and conditions, do not install, access, copy, or use the Software and destroy all copies of the Software in Your -possession. - -This DEVELOPMENT TOOLS LICENSE AGREEMENT (this "Agreement") is entered into between Intel Corporation, a Delaware corporation ("Intel") and You. -"You" refers to you or your employer or other entity for whose benefit you act, as applicable. If you are agreeing to the terms and conditions of this -Agreement on behalf of a company or other legal entity, you represent and warrant that you have the legal authority to bind that legal entity to the -Agreement, in which case, "You" or "Your" shall be in reference to such entity. Intel and You are referred to herein individually as a "Party" or, together, as -the "Parties". - -The Parties, in consideration of the mutual covenants contained in this Agreement, and for other good and valuable consideration, the receipt and -sufficiency of which they acknowledge, and intending to be legally bound, agree as follows: - -1. DEFINITIONS. The following definitions are used throughout this Agreement: -"Affiliate" means any entity controlling, controlled by or under common control with a Party hereto, where "control" means the direct or indirect ownership -of more than fifty percent (50%) of such entity"s capital or equivalent voting rights. An entity will be deemed an "Affiliate" only as long as such control exists -during the term of this Agreement. - -"Contractor" means a third party consultant or subcontractor who requires access to or use of the Materials to perform work on Your behalf or at Your -behest. - -"Development Tools" means the development, evaluation, production, or test tool software, and associated documentation or other collateral, identified -in the "development_tools.txt" text files, if any, included in the Materials. - -"Derivatives" means derivative works as defined in 17 U.S.C " 101 et seq. - -"Intel-based Device" means a device designed, manufactured, or configured by You or Your Affiliates to include or operate Intel hardware, software, or -services. - -"Materials" means the software, documentation, the software product serial number and license key codes (if applicable), Development Tools, -Redistributables, and other materials or collateral, including any updates and upgrades thereto, in source code or object code form where applicable, that -are provided or otherwise made available by Intel to You under this Agreement. "Materials" do not include Open Source Software or any computer -programming code that is subject to an agreement, obligation or license (whether or not accompanying the Materials) intended to supersede this -Agreement. - -"Redistributables" means the software, documentation, or other collateral identified in the "redist.txt" text files, if any, included in the Materials. - -2. LIMITED LICENSE. -(A) Subject to the terms and conditions of this Agreement, Intel grants You and Your Affiliates, a limited, nonexclusive, nontransferable, revocable, -worldwide, fully paid-up license during the term of this Agreement, without the right to sublicense, unless expressly stated otherwise, to: -(1) internally reproduce and install a reasonable number of copies of the Materials for Your internal use solely for the purposes of designing, -developing, manufacturing and testing Intel-based Devices; -(2) internally reproduce the source code of the Development Tools, if provided to You by Intel, and to internally create and reproduce Derivatives of -the Development Tools, and to internally reproduce the binary code of the Development Tools, or any Derivatives created by You, in each case solely -for the purpose of designing, developing, manufacturing and testing the Intel-based Device, solely as necessary for the integration of any Intel software -and the output generated by the Development Tools, with and into Intel-based Devices; -(3) create Derivatives of the Redistributables, or any portions thereof, provided to You by Intel in source code form solely for the purposes of designing, -developing, debugging, modifying, distributing and testing software containing significantly more functionality and features than the Redistributables -in the form provided to You by Intel; -(4) distribute (or otherwise make available) on a royalty-free basis, subject to any other terms and conditions which may appear in the Redistributables -text files, the Redistributables, including any Derivatives of the Redistributables pursuant to Section 2(A)(3), or any portions thereof, only as integrated -or embedded in software (and not on a stand-alone basis) solely for use on an Intel-based Device; and -(5) have the tasks set forth in Section 2(A)(1) and (2) above performed by a Contractor on the conditions that You enter into a written confidentiality -agreement with any such Contractor, subject to Section 7 (Confidentiality), and You remain fully liable to Intel for the actions and inactions of Your -Contractors. -(B) You will be liable for Your Affiliate"s breach of these terms. In addition, You acknowledge that Your Affiliates are beneficiaries of the licenses granted by -Intel under Section 2. -(C) Intel hereby grants You the right to sub-license (without rights to further sublicense) the Development Tools, including any accompanying -documentation, to Your manufacturing partners, in the code format provided to You by Intel, solely for designing, developing, manufacturing and testing -the Intel-based Devices solely as necessary for the integration of any Intel software and the output generated by the Development Tools, with and into -Intel-based Devices. The sublicense is subject to a written sublicensing agreement that contains confidentiality obligations and license restrictions that are -no less protective of Intel than those provided in this Agreement. You will be fully responsible and liable towards Intel for Your sub-licensees" compliance -with all such confidentiality obligations and license restrictions. You may grant Your manufacturing partners the right to further distribute Redistributables -solely as integrated or embedded in software for Your Intel-based Devices. - -3. LICENSE RESTRICTIONS. All right, title and interest in and to the Materials and associated documentation are and will remain the exclusive property of -Intel and its suppliers. Unless expressly permitted under the Agreement, You will not, and will not allow any third party to (i) use, copy, distribute, sell or -offer to sell the Materials or associated documentation; (ii) modify, adapt, enhance, disassemble, decompile, reverse engineer, change or create derivative -works from the Materials except and only to the extent as specifically required by mandatory applicable laws or any applicable third party license terms -accompanying the Materials; (iii) use or make the Materials available for the use or benefit of third parties; or (iv) use the Materials on Your products other -than those that include the Intel product(s), platform(s), or software identified in the Materials; or (v) publish or provide any Materials benchmark or -comparison test results. -If You received the Materials solely for evaluation purposes, You have no distribution rights to the Materials or any portion thereof. - -Distribution of the Redistributables is also subject to the following conditions: You shall: (i) be solely responsible to Your customers and end users for any -update or support obligation or other liability which may arise from the distribution, (ii) not make any statement that Your software is "certified", or that its -performance is guaranteed, by Intel, (iii) not use Intel's name or trademarks to promote Your software without prior written permission, (iv) use a license -agreement that contains provisions that are at least as restrictive as this Agreement and which prohibits disassembly and reverse engineering of the -Materials provided in object code form, and (v) indemnify, hold harmless, and defend Intel, Intel"s Affiliates, and its licensors from and against any claims -or lawsuits, including attorney's fees, that arise or result from Your Derivatives or Your distribution of Your software. - -The consideration under this Agreement is only for the licenses Intel expressly grants above. Any other rights including, but not limited to, additional patent -rights, will require an additional license and additional consideration. Nothing in this Agreement requires or will be treated to require Intel to grant any -additional license. You acknowledge that an essential basis of the bargain in this Agreement is that Intel grants You no licenses or other rights including, -but not limited to, patent, copyright, trade secret, trademark, trade name, service mark or other intellectual property licenses or rights with respect to the -Materials and associated documentation, by implication, estoppel or otherwise, except for the licenses expressly granted above. You acknowledge there -are significant uses of the Materials in their original, unmodified and uncombined form. The consideration for the licenses in this Agreement reflects Intel"s -continuing right to assert patent claims against any modifications or derivative works (including, without limitation, error corrections and bug fixes) of, or -combinations with, the Materials that You, Your Affiliates or third parties make that infringe any Intel patent claim. - -4. LICENSE TO FEEDBACK. This Agreement does not obligate You to provide Intel with materials, information, comments, suggestions, Your Derivatives or -other communication regarding the features, functions, performance or use of the Materials ("Feedback"). If any software included in the Materials is -provided or otherwise made available by Intel in source code form, to the extent You provide Intel with Feedback in a tangible form, You grant to Intel and -its affiliates a non-exclusive, perpetual, sublicenseable, irrevocable, worldwide, royalty-free, fully paid-up and transferable license, to and under all of Your -intellectual property rights, whether perfected or not, to publicly perform, publicly display, reproduce, use, make, have made, sell, offer for sale, distribute, -import, create derivative works of and otherwise exploit any comments, suggestions, descriptions, ideas, Your Derivatives or other feedback regarding the -Materials provided by You or on Your behalf. - -5. OPEN SOURCE STATEMENT. The Materials may include Open Source Software (OSS) licensed pursuant to OSS license agreement(s) identified in the -OSS comments in the applicable source code file(s) and/or file header(s) provided with or otherwise associated with the Materials. Neither You nor any -Original Equipment Manufacturer (OEM), Original Device Manufacturer (ODM), customer, or distributor may subject any proprietary portion of the Materials -to any OSS license obligations including, without limitation, combining or distributing the Materials with OSS in a manner that subjects Intel, the Materials -or any portion thereof to any OSS license obligation. Nothing in this Agreement limits any rights under, or grants rights that supersede, the terms of any -applicable OSS license. - -6. THIRD PARTY SOFTWARE. Certain third party software provided with or within the Materials may only be used (a) upon securing a license directly from -the owner of the software or (b) in combination with hardware components purchased from such third party and (c) subject to further license limitations -by the software owner. A listing of any such third party limitations is in one or more text files accompanying the Materials. You acknowledge Intel is not -providing You with a license to such third party software and further that it is Your responsibility to obtain appropriate licenses from such third parties -directly. - -7. CONFIDENTIALITY. The terms and conditions of this Agreement, exchanged confidential information, as well as the Materials are subject to the terms -and conditions of the Non-Disclosure Agreement(s) or Intel Pre-Release Loan Agreement(s) (referred to herein collectively or individually as "NDA") entered -into by and in force between Intel and You, and in any case no less confidentiality protection than You apply to Your information of similar sensitivity. If -You would like to have a Contractor perform work on Your behalf that requires any access to or use of Materials You must obtain a written confidentiality -agreement from the Contractor which contains terms and conditions with respect to access to or use of Materials no less restrictive than those set forth in -this Agreement, excluding any distribution rights and use for any other purpose, and You will remain fully liable to Intel for the actions and inactions of -those Contractors. You may not use Intel's name in any publications, advertisements, or other announcements without Intel's prior written consent. - -8. NO OBLIGATION; NO AGENCY. Intel may make changes to the Software, or items referenced therein, at any time without notice. Intel is not obligated to -support, update, provide training for, or develop any further version of the Software or to grant any license thereto. No agency, franchise, partnership, joint- -venture, or employee-employer relationship is intended or created by this Agreement. - -9. EXCLUSION OF WARRANTIES. THE MATERIALS ARE PROVIDED "AS IS" WITHOUT ANY EXPRESS OR IMPLIED WARRANTY OF ANY KIND INCLUDING -WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT, OR FITNESS FOR A PARTICULAR PURPOSE. Intel does not warrant or assume responsibility -for the accuracy or completeness of any information, text, graphics, links or other items within the Materials. - -10. LIMITATION OF LIABILITY. IN NO EVENT WILL INTEL OR ITS AFFILIATES, LICENSORS OR SUPPLIERS (INCLUDING THEIR RESPECTIVE DIRECTORS, -OFFICERS, EMPLOYEES, AND AGENTS) BE LIABLE FOR ANY DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, LOST PROFITS, BUSINESS -INTERRUPTION, OR LOST DATA) ARISING OUT OF OR IN RELATION TO THIS AGREEMENT, INCLUDING THE USE OF OR INABILITY TO USE THE MATERIALS, -EVEN IF INTEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME JURISDICTIONS PROHIBIT EXCLUSION OR LIMITATION OF LIABILITY -FOR IMPLIED WARRANTIES OR CONSEQUENTIAL OR INCIDENTAL DAMAGES, SO THE ABOVE LIMITATION MAY IN PART NOT APPLY TO YOU. YOU MAY -ALSO HAVE OTHER LEGAL RIGHTS THAT VARY FROM JURISDICTION TO JURISDICTION. THE MATERIALS LICENSED HEREUNDER ARE NOT DESIGNED -OR INTENDED FOR USE IN ANY MEDICAL, LIFE SAVING OR LIFE SUSTAINING SYSTEMS, TRANSPORTATION SYSTEMS, NUCLEAR SYSTEMS, OR FOR ANY -OTHER MISSION CRITICAL APPLICATION IN WHICH THE FAILURE OF THE DEVELOPMENT TOOLS COULD LEAD TO PERSONAL INJURY OR DEATH. YOU -WILL INDEMNIFY AND HOLD INTEL AND ITS AFFILIATES, LICENSORS AND SUPPLIERS (INCLUDING THEIR RESPECTIVE DIRECTORS, OFFICERS, -EMPLOYEES, AND AGENTS) HARMLESS AGAINST ALL CLAIMS, LIABILITIES, LOSSES, COSTS, DAMAGES, AND EXPENSES (INCLUDING REASONABLE -ATTORNEY FEES), ARISING OUT OF, DIRECTLY OR INDIRECTLY, THE DISTRIBUTION OF THE MATERIALS AND ANY CLAIM OF PRODUCT LIABILITY, -PERSONAL INJURY OR DEATH ASSOCIATED WITH ANY UNINTENDED USE, EVEN IF SUCH CLAIM ALLEGES THAT INTEL OR AN INTEL AFFILIATE, LICENSOR -OR SUPPLIER WAS NEGLIGENT REGARDING THE DESIGN OR MANUFACTURE OF THE MATERIALS. THE LIMITED REMEDIES, WARRANTY DISCLAIMER AND -LIMITED LIABILITY ARE FUNDAMENTAL ELEMENTS OF THE BASIS OF THE BARGAIN BETWEEN INTEL AND YOU AND INTEL WOULD NOT BE ABLE TO -PROVIDE THE MATERIALS WITHOUT SUCH LIMITATIONS. - -11. TERMINATION AND SURVIVAL. Intel may terminate this Agreement for any reason with thirty (30) days" notice and immediately if You or someone -acting on Your behalf or at Your behest violates any of its terms or conditions. Upon termination You will immediately destroy and ensure the destruction -of the Materials (including providing certification of such destruction or return back to Intel). Upon termination of this Agreement, all licenses granted to -You hereunder terminate immediately. All Sections of this Agreement, except Section 2, will survive termination. In the event of termination of this -Agreement, the license grant to any Redistributables, including Your Derivatives of the Redistributables, distributed by You prior to the effective date of -such termination and in accordance with the terms and conditions of this Agreement shall survive any such termination of this Agreement. - -12. GOVERNING LAW AND JURISDICTION. This Agreement and any dispute arising out of or relating to it will be governed by the laws of the U.S.A. and -Delaware, without regard to conflict of laws principles. The Parties exclude the application of the United Nations Convention on Contracts for the -International Sale of Goods (1980). The state and federal courts sitting in Delaware, U.S.A. will have exclusive jurisdiction over any dispute arising out of or -relating to this Agreement. The Parties consent to personal jurisdiction and venue in those courts. A Party that obtains a judgment against the other Party -in the courts identified in this section may enforce that judgment in any court that has jurisdiction over the Parties. - -13. EXPORT REGULATIONS/EXPORT CONTROL. You agree that neither You nor Your subsidiaries or Affiliates will export/re-export the Materials, directly -or indirectly, to any country for which the U.S. Department of Commerce or any other agency or department of the U.S. Government or the foreign -government from where it is shipping requires an export license, or other governmental approval, without first obtaining any such required license or -approval. In the event the Materials are exported from the U.S.A. or re-exported from a foreign destination by You, Your subsidiaries, or Your Affiliates, You -will ensure that the distribution and export/re-export or import of the Materials complies with all laws, regulations, orders, or other restrictions of the U.S. -Export Administration Regulations and the appropriate foreign government. - -14. GOVERNMENT RESTRICTED RIGHTS. The Materials are a commercial item (as defined in 48 C.F.R. 2.101) consisting of commercial computer software -and commercial computer software documentation (as those terms are used in 48 C.F.R. 12.212). Consistent with 48 C.F.R. 12.212 and 48 C.F.R 227.72021 -through 227.7202-4, You will not provide the Materials to the U.S. Government. Contractor or Manufacturer is Intel Corporation, 2200 Mission College -Blvd., Santa Clara, CA 95054. - -15. TRADEMARKS. Third party trademarks, trade names, product names and logos (the "Trademarks") contained in or used by the Materials are the -trademarks or registered trademarks of their respective owners, and the use of such Trademarks shall inure to the benefit of the trademark owner. The -reference to such Trademarks (if any) by Intel in any of the Materials does not constitute: (i) an affiliation by Intel and its licensors with such company, or (ii) -an endorsement or approval of such company of Intel and its licensors and its products or services. - -16. ASSIGNMENT. You may not delegate, assign or transfer this Agreement, the license(s) granted or any of Your rights or duties hereunder, expressly, by -implication, by operation of law, or otherwise and any attempt to do so, without Intel"s express prior written consent, will be null and void. Intel may assign, -delegate and transfer this Agreement, and its rights and obligations hereunder, in its sole discretion. - -17. ENTIRE AGREEMENT; SEVERABILITY. The terms and conditions of this Agreement and any NDA with Intel constitute the entire agreement between the -Parties with respect to the subject matter hereof, and merge and supersede all prior or contemporaneous agreements, understandings, negotiations and -discussions. Neither Party will be bound by any terms, conditions, definitions, warranties, understandings, or representations with respect to the subject -matter hereof other than as expressly provided herein. In the event any provision of this Agreement is unenforceable or invalid under any applicable law -or applicable court decision, such unenforceability or invalidity will not render this Agreement unenforceable or invalid as a whole, instead such provision -will be changed and interpreted so as to best accomplish the objectives of such provision within legal limits. - -18. WAIVER. The failure of a Party to require performance by the other Party of any provision hereof will not affect the full right to require such performance -at any time thereafter; nor will waiver by a Party of a breach of any provision hereof constitute a waiver of the provision itself. - -19. PRIVACY. YOUR PRIVACY RIGHTS ARE SET FORTH IN INTEL'S PRIVACY NOTICE, WHICH FORMS A PART OF THIS AGREEMENT. PLEASE REVIEW THE -PRIVACY NOTICE AT HTTP://WWW.INTEL.COM/PRIVACY TO LEARN HOW INTEL COLLECTS, USES AND SHARES INFORMATION ABOUT YOU. + 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: + You must give any other recipients of the Work or Derivative Works a copy of this License; and + You must cause any modified files to carry prominent notices stating that You changed the files; and + 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 + 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/api/LICENSE b/api/LICENSE index a444ba1..617d376 100644 --- a/api/LICENSE +++ b/api/LICENSE @@ -1,193 +1,32 @@ -SOFTWARE TOOLS LICENSE AGREEMENT - -DO NOT DOWNLOAD, INSTALL, ACCESS, COPY, OR USE ANY PORTION OF THE MATERIALS (DEFINED BELOW) UNTIL YOU HAVE READ AND ACCEPTED -THE TERMS AND CONDITIONS OF THIS AGREEMENT. BY INSTALLING, COPYING, ACCESSING, OR USING THE MATERIALS, YOU AGREE TO BE LEGALLY -BOUND BY THE TERMS AND CONDITIONS OF THIS AGREEMENT. If You do not agree to be bound by, or the entity for whose benefit You act has not -authorized You to accept, these terms and conditions, do not install, access, copy, or use the Software and destroy all copies of the Software in Your -possession. - -This DEVELOPMENT TOOLS LICENSE AGREEMENT (this "Agreement") is entered into between Intel Corporation, a Delaware corporation ("Intel") and You. -"You" refers to you or your employer or other entity for whose benefit you act, as applicable. If you are agreeing to the terms and conditions of this -Agreement on behalf of a company or other legal entity, you represent and warrant that you have the legal authority to bind that legal entity to the -Agreement, in which case, "You" or "Your" shall be in reference to such entity. Intel and You are referred to herein individually as a "Party" or, together, as -the "Parties". - -The Parties, in consideration of the mutual covenants contained in this Agreement, and for other good and valuable consideration, the receipt and -sufficiency of which they acknowledge, and intending to be legally bound, agree as follows: - -1. DEFINITIONS. The following definitions are used throughout this Agreement: -"Affiliate" means any entity controlling, controlled by or under common control with a Party hereto, where "control" means the direct or indirect ownership -of more than fifty percent (50%) of such entity"s capital or equivalent voting rights. An entity will be deemed an "Affiliate" only as long as such control exists -during the term of this Agreement. - -"Contractor" means a third party consultant or subcontractor who requires access to or use of the Materials to perform work on Your behalf or at Your -behest. - -"Development Tools" means the development, evaluation, production, or test tool software, and associated documentation or other collateral, identified -in the "development_tools.txt" text files, if any, included in the Materials. - -"Derivatives" means derivative works as defined in 17 U.S.C " 101 et seq. - -"Intel-based Device" means a device designed, manufactured, or configured by You or Your Affiliates to include or operate Intel hardware, software, or -services. - -"Materials" means the software, documentation, the software product serial number and license key codes (if applicable), Development Tools, -Redistributables, and other materials or collateral, including any updates and upgrades thereto, in source code or object code form where applicable, that -are provided or otherwise made available by Intel to You under this Agreement. "Materials" do not include Open Source Software or any computer -programming code that is subject to an agreement, obligation or license (whether or not accompanying the Materials) intended to supersede this -Agreement. - -"Redistributables" means the software, documentation, or other collateral identified in the "redist.txt" text files, if any, included in the Materials. - -2. LIMITED LICENSE. -(A) Subject to the terms and conditions of this Agreement, Intel grants You and Your Affiliates, a limited, nonexclusive, nontransferable, revocable, -worldwide, fully paid-up license during the term of this Agreement, without the right to sublicense, unless expressly stated otherwise, to: -(1) internally reproduce and install a reasonable number of copies of the Materials for Your internal use solely for the purposes of designing, -developing, manufacturing and testing Intel-based Devices; -(2) internally reproduce the source code of the Development Tools, if provided to You by Intel, and to internally create and reproduce Derivatives of -the Development Tools, and to internally reproduce the binary code of the Development Tools, or any Derivatives created by You, in each case solely -for the purpose of designing, developing, manufacturing and testing the Intel-based Device, solely as necessary for the integration of any Intel software -and the output generated by the Development Tools, with and into Intel-based Devices; -(3) create Derivatives of the Redistributables, or any portions thereof, provided to You by Intel in source code form solely for the purposes of designing, -developing, debugging, modifying, distributing and testing software containing significantly more functionality and features than the Redistributables -in the form provided to You by Intel; -(4) distribute (or otherwise make available) on a royalty-free basis, subject to any other terms and conditions which may appear in the Redistributables -text files, the Redistributables, including any Derivatives of the Redistributables pursuant to Section 2(A)(3), or any portions thereof, only as integrated -or embedded in software (and not on a stand-alone basis) solely for use on an Intel-based Device; and -(5) have the tasks set forth in Section 2(A)(1) and (2) above performed by a Contractor on the conditions that You enter into a written confidentiality -agreement with any such Contractor, subject to Section 7 (Confidentiality), and You remain fully liable to Intel for the actions and inactions of Your -Contractors. -(B) You will be liable for Your Affiliate"s breach of these terms. In addition, You acknowledge that Your Affiliates are beneficiaries of the licenses granted by -Intel under Section 2. -(C) Intel hereby grants You the right to sub-license (without rights to further sublicense) the Development Tools, including any accompanying -documentation, to Your manufacturing partners, in the code format provided to You by Intel, solely for designing, developing, manufacturing and testing -the Intel-based Devices solely as necessary for the integration of any Intel software and the output generated by the Development Tools, with and into -Intel-based Devices. The sublicense is subject to a written sublicensing agreement that contains confidentiality obligations and license restrictions that are -no less protective of Intel than those provided in this Agreement. You will be fully responsible and liable towards Intel for Your sub-licensees" compliance -with all such confidentiality obligations and license restrictions. You may grant Your manufacturing partners the right to further distribute Redistributables -solely as integrated or embedded in software for Your Intel-based Devices. - -3. LICENSE RESTRICTIONS. All right, title and interest in and to the Materials and associated documentation are and will remain the exclusive property of -Intel and its suppliers. Unless expressly permitted under the Agreement, You will not, and will not allow any third party to (i) use, copy, distribute, sell or -offer to sell the Materials or associated documentation; (ii) modify, adapt, enhance, disassemble, decompile, reverse engineer, change or create derivative -works from the Materials except and only to the extent as specifically required by mandatory applicable laws or any applicable third party license terms -accompanying the Materials; (iii) use or make the Materials available for the use or benefit of third parties; or (iv) use the Materials on Your products other -than those that include the Intel product(s), platform(s), or software identified in the Materials; or (v) publish or provide any Materials benchmark or -comparison test results. -If You received the Materials solely for evaluation purposes, You have no distribution rights to the Materials or any portion thereof. - -Distribution of the Redistributables is also subject to the following conditions: You shall: (i) be solely responsible to Your customers and end users for any -update or support obligation or other liability which may arise from the distribution, (ii) not make any statement that Your software is "certified", or that its -performance is guaranteed, by Intel, (iii) not use Intel's name or trademarks to promote Your software without prior written permission, (iv) use a license -agreement that contains provisions that are at least as restrictive as this Agreement and which prohibits disassembly and reverse engineering of the -Materials provided in object code form, and (v) indemnify, hold harmless, and defend Intel, Intel"s Affiliates, and its licensors from and against any claims -or lawsuits, including attorney's fees, that arise or result from Your Derivatives or Your distribution of Your software. - -The consideration under this Agreement is only for the licenses Intel expressly grants above. Any other rights including, but not limited to, additional patent -rights, will require an additional license and additional consideration. Nothing in this Agreement requires or will be treated to require Intel to grant any -additional license. You acknowledge that an essential basis of the bargain in this Agreement is that Intel grants You no licenses or other rights including, -but not limited to, patent, copyright, trade secret, trademark, trade name, service mark or other intellectual property licenses or rights with respect to the -Materials and associated documentation, by implication, estoppel or otherwise, except for the licenses expressly granted above. You acknowledge there -are significant uses of the Materials in their original, unmodified and uncombined form. The consideration for the licenses in this Agreement reflects Intel"s -continuing right to assert patent claims against any modifications or derivative works (including, without limitation, error corrections and bug fixes) of, or -combinations with, the Materials that You, Your Affiliates or third parties make that infringe any Intel patent claim. - -4. LICENSE TO FEEDBACK. This Agreement does not obligate You to provide Intel with materials, information, comments, suggestions, Your Derivatives or -other communication regarding the features, functions, performance or use of the Materials ("Feedback"). If any software included in the Materials is -provided or otherwise made available by Intel in source code form, to the extent You provide Intel with Feedback in a tangible form, You grant to Intel and -its affiliates a non-exclusive, perpetual, sublicenseable, irrevocable, worldwide, royalty-free, fully paid-up and transferable license, to and under all of Your -intellectual property rights, whether perfected or not, to publicly perform, publicly display, reproduce, use, make, have made, sell, offer for sale, distribute, -import, create derivative works of and otherwise exploit any comments, suggestions, descriptions, ideas, Your Derivatives or other feedback regarding the -Materials provided by You or on Your behalf. - -5. OPEN SOURCE STATEMENT. The Materials may include Open Source Software (OSS) licensed pursuant to OSS license agreement(s) identified in the -OSS comments in the applicable source code file(s) and/or file header(s) provided with or otherwise associated with the Materials. Neither You nor any -Original Equipment Manufacturer (OEM), Original Device Manufacturer (ODM), customer, or distributor may subject any proprietary portion of the Materials -to any OSS license obligations including, without limitation, combining or distributing the Materials with OSS in a manner that subjects Intel, the Materials -or any portion thereof to any OSS license obligation. Nothing in this Agreement limits any rights under, or grants rights that supersede, the terms of any -applicable OSS license. - -6. THIRD PARTY SOFTWARE. Certain third party software provided with or within the Materials may only be used (a) upon securing a license directly from -the owner of the software or (b) in combination with hardware components purchased from such third party and (c) subject to further license limitations -by the software owner. A listing of any such third party limitations is in one or more text files accompanying the Materials. You acknowledge Intel is not -providing You with a license to such third party software and further that it is Your responsibility to obtain appropriate licenses from such third parties -directly. - -7. CONFIDENTIALITY. The terms and conditions of this Agreement, exchanged confidential information, as well as the Materials are subject to the terms -and conditions of the Non-Disclosure Agreement(s) or Intel Pre-Release Loan Agreement(s) (referred to herein collectively or individually as "NDA") entered -into by and in force between Intel and You, and in any case no less confidentiality protection than You apply to Your information of similar sensitivity. If -You would like to have a Contractor perform work on Your behalf that requires any access to or use of Materials You must obtain a written confidentiality -agreement from the Contractor which contains terms and conditions with respect to access to or use of Materials no less restrictive than those set forth in -this Agreement, excluding any distribution rights and use for any other purpose, and You will remain fully liable to Intel for the actions and inactions of -those Contractors. You may not use Intel's name in any publications, advertisements, or other announcements without Intel's prior written consent. - -8. NO OBLIGATION; NO AGENCY. Intel may make changes to the Software, or items referenced therein, at any time without notice. Intel is not obligated to -support, update, provide training for, or develop any further version of the Software or to grant any license thereto. No agency, franchise, partnership, joint- -venture, or employee-employer relationship is intended or created by this Agreement. - -9. EXCLUSION OF WARRANTIES. THE MATERIALS ARE PROVIDED "AS IS" WITHOUT ANY EXPRESS OR IMPLIED WARRANTY OF ANY KIND INCLUDING -WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT, OR FITNESS FOR A PARTICULAR PURPOSE. Intel does not warrant or assume responsibility -for the accuracy or completeness of any information, text, graphics, links or other items within the Materials. - -10. LIMITATION OF LIABILITY. IN NO EVENT WILL INTEL OR ITS AFFILIATES, LICENSORS OR SUPPLIERS (INCLUDING THEIR RESPECTIVE DIRECTORS, -OFFICERS, EMPLOYEES, AND AGENTS) BE LIABLE FOR ANY DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, LOST PROFITS, BUSINESS -INTERRUPTION, OR LOST DATA) ARISING OUT OF OR IN RELATION TO THIS AGREEMENT, INCLUDING THE USE OF OR INABILITY TO USE THE MATERIALS, -EVEN IF INTEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME JURISDICTIONS PROHIBIT EXCLUSION OR LIMITATION OF LIABILITY -FOR IMPLIED WARRANTIES OR CONSEQUENTIAL OR INCIDENTAL DAMAGES, SO THE ABOVE LIMITATION MAY IN PART NOT APPLY TO YOU. YOU MAY -ALSO HAVE OTHER LEGAL RIGHTS THAT VARY FROM JURISDICTION TO JURISDICTION. THE MATERIALS LICENSED HEREUNDER ARE NOT DESIGNED -OR INTENDED FOR USE IN ANY MEDICAL, LIFE SAVING OR LIFE SUSTAINING SYSTEMS, TRANSPORTATION SYSTEMS, NUCLEAR SYSTEMS, OR FOR ANY -OTHER MISSION CRITICAL APPLICATION IN WHICH THE FAILURE OF THE DEVELOPMENT TOOLS COULD LEAD TO PERSONAL INJURY OR DEATH. YOU -WILL INDEMNIFY AND HOLD INTEL AND ITS AFFILIATES, LICENSORS AND SUPPLIERS (INCLUDING THEIR RESPECTIVE DIRECTORS, OFFICERS, -EMPLOYEES, AND AGENTS) HARMLESS AGAINST ALL CLAIMS, LIABILITIES, LOSSES, COSTS, DAMAGES, AND EXPENSES (INCLUDING REASONABLE -ATTORNEY FEES), ARISING OUT OF, DIRECTLY OR INDIRECTLY, THE DISTRIBUTION OF THE MATERIALS AND ANY CLAIM OF PRODUCT LIABILITY, -PERSONAL INJURY OR DEATH ASSOCIATED WITH ANY UNINTENDED USE, EVEN IF SUCH CLAIM ALLEGES THAT INTEL OR AN INTEL AFFILIATE, LICENSOR -OR SUPPLIER WAS NEGLIGENT REGARDING THE DESIGN OR MANUFACTURE OF THE MATERIALS. THE LIMITED REMEDIES, WARRANTY DISCLAIMER AND -LIMITED LIABILITY ARE FUNDAMENTAL ELEMENTS OF THE BASIS OF THE BARGAIN BETWEEN INTEL AND YOU AND INTEL WOULD NOT BE ABLE TO -PROVIDE THE MATERIALS WITHOUT SUCH LIMITATIONS. - -11. TERMINATION AND SURVIVAL. Intel may terminate this Agreement for any reason with thirty (30) days" notice and immediately if You or someone -acting on Your behalf or at Your behest violates any of its terms or conditions. Upon termination You will immediately destroy and ensure the destruction -of the Materials (including providing certification of such destruction or return back to Intel). Upon termination of this Agreement, all licenses granted to -You hereunder terminate immediately. All Sections of this Agreement, except Section 2, will survive termination. In the event of termination of this -Agreement, the license grant to any Redistributables, including Your Derivatives of the Redistributables, distributed by You prior to the effective date of -such termination and in accordance with the terms and conditions of this Agreement shall survive any such termination of this Agreement. - -12. GOVERNING LAW AND JURISDICTION. This Agreement and any dispute arising out of or relating to it will be governed by the laws of the U.S.A. and -Delaware, without regard to conflict of laws principles. The Parties exclude the application of the United Nations Convention on Contracts for the -International Sale of Goods (1980). The state and federal courts sitting in Delaware, U.S.A. will have exclusive jurisdiction over any dispute arising out of or -relating to this Agreement. The Parties consent to personal jurisdiction and venue in those courts. A Party that obtains a judgment against the other Party -in the courts identified in this section may enforce that judgment in any court that has jurisdiction over the Parties. - -13. EXPORT REGULATIONS/EXPORT CONTROL. You agree that neither You nor Your subsidiaries or Affiliates will export/re-export the Materials, directly -or indirectly, to any country for which the U.S. Department of Commerce or any other agency or department of the U.S. Government or the foreign -government from where it is shipping requires an export license, or other governmental approval, without first obtaining any such required license or -approval. In the event the Materials are exported from the U.S.A. or re-exported from a foreign destination by You, Your subsidiaries, or Your Affiliates, You -will ensure that the distribution and export/re-export or import of the Materials complies with all laws, regulations, orders, or other restrictions of the U.S. -Export Administration Regulations and the appropriate foreign government. - -14. GOVERNMENT RESTRICTED RIGHTS. The Materials are a commercial item (as defined in 48 C.F.R. 2.101) consisting of commercial computer software -and commercial computer software documentation (as those terms are used in 48 C.F.R. 12.212). Consistent with 48 C.F.R. 12.212 and 48 C.F.R 227.72021 -through 227.7202-4, You will not provide the Materials to the U.S. Government. Contractor or Manufacturer is Intel Corporation, 2200 Mission College -Blvd., Santa Clara, CA 95054. - -15. TRADEMARKS. Third party trademarks, trade names, product names and logos (the "Trademarks") contained in or used by the Materials are the -trademarks or registered trademarks of their respective owners, and the use of such Trademarks shall inure to the benefit of the trademark owner. The -reference to such Trademarks (if any) by Intel in any of the Materials does not constitute: (i) an affiliation by Intel and its licensors with such company, or (ii) -an endorsement or approval of such company of Intel and its licensors and its products or services. - -16. ASSIGNMENT. You may not delegate, assign or transfer this Agreement, the license(s) granted or any of Your rights or duties hereunder, expressly, by -implication, by operation of law, or otherwise and any attempt to do so, without Intel"s express prior written consent, will be null and void. Intel may assign, -delegate and transfer this Agreement, and its rights and obligations hereunder, in its sole discretion. - -17. ENTIRE AGREEMENT; SEVERABILITY. The terms and conditions of this Agreement and any NDA with Intel constitute the entire agreement between the -Parties with respect to the subject matter hereof, and merge and supersede all prior or contemporaneous agreements, understandings, negotiations and -discussions. Neither Party will be bound by any terms, conditions, definitions, warranties, understandings, or representations with respect to the subject -matter hereof other than as expressly provided herein. In the event any provision of this Agreement is unenforceable or invalid under any applicable law -or applicable court decision, such unenforceability or invalidity will not render this Agreement unenforceable or invalid as a whole, instead such provision -will be changed and interpreted so as to best accomplish the objectives of such provision within legal limits. - -18. WAIVER. The failure of a Party to require performance by the other Party of any provision hereof will not affect the full right to require such performance -at any time thereafter; nor will waiver by a Party of a breach of any provision hereof constitute a waiver of the provision itself. - -19. PRIVACY. YOUR PRIVACY RIGHTS ARE SET FORTH IN INTEL'S PRIVACY NOTICE, WHICH FORMS A PART OF THIS AGREEMENT. PLEASE REVIEW THE -PRIVACY NOTICE AT HTTP://WWW.INTEL.COM/PRIVACY TO LEARN HOW INTEL COLLECTS, USES AND SHARES INFORMATION ABOUT YOU. + 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: + You must give any other recipients of the Work or Derivative Works a copy of this License; and + You must cause any modified files to carry prominent notices stating that You changed the files; and + 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 + 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/api/include/mvnc.h b/api/include/mvnc.h index 3059117..74f4b09 100644 --- a/api/include/mvnc.h +++ b/api/include/mvnc.h @@ -1,19 +1,18 @@ /* -* Copyright 2018 Intel Corporation. -* The source code, information and material ("Material") contained herein is -* owned by Intel Corporation or its suppliers or licensors, and title to such -* Material remains with Intel Corporation or its suppliers or licensors. -* The Material contains proprietary information of Intel or its suppliers and -* licensors. The Material is protected by worldwide copyright laws and treaty -* provisions. -* No part of the Material may be used, copied, reproduced, modified, published, -* uploaded, posted, transmitted, distributed or disclosed in any way without -* Intel's prior express written permission. No license under any patent, -* copyright or other intellectual property rights in the Material is granted to -* or conferred upon you, either expressly, by implication, inducement, estoppel -* or otherwise. -* Any license under such intellectual property rights must be express and -* approved by Intel in writing. +* +* Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved +* +* 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. */ #ifndef __NC_H_INCLUDED__ diff --git a/api/include/ncCommPrivate.h b/api/include/ncCommPrivate.h index 1865305..9d8681b 100644 --- a/api/include/ncCommPrivate.h +++ b/api/include/ncCommPrivate.h @@ -1,19 +1,18 @@ /* -* Copyright 2018 Intel Corporation. -* The source code, information and material ("Material") contained herein is -* owned by Intel Corporation or its suppliers or licensors, and title to such -* Material remains with Intel Corporation or its suppliers or licensors. -* The Material contains proprietary information of Intel or its suppliers and -* licensors. The Material is protected by worldwide copyright laws and treaty -* provisions. -* No part of the Material may be used, copied, reproduced, modified, published, -* uploaded, posted, transmitted, distributed or disclosed in any way without -* Intel's prior express written permission. No license under any patent, -* copyright or other intellectual property rights in the Material is granted to -* or conferred upon you, either expressly, by implication, inducement, estoppel -* or otherwise. -* Any license under such intellectual property rights must be express and -* approved by Intel in writing. +* +* Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved +* +* 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/api/include/ncPrivateTypes.h b/api/include/ncPrivateTypes.h index 02e0d80..a016429 100644 --- a/api/include/ncPrivateTypes.h +++ b/api/include/ncPrivateTypes.h @@ -1,19 +1,18 @@ /* -* Copyright 2018 Intel Corporation. -* The source code, information and material ("Material") contained herein is -* owned by Intel Corporation or its suppliers or licensors, and title to such -* Material remains with Intel Corporation or its suppliers or licensors. -* The Material contains proprietary information of Intel or its suppliers and -* licensors. The Material is protected by worldwide copyright laws and treaty -* provisions. -* No part of the Material may be used, copied, reproduced, modified, published, -* uploaded, posted, transmitted, distributed or disclosed in any way without -* Intel's prior express written permission. No license under any patent, -* copyright or other intellectual property rights in the Material is granted to -* or conferred upon you, either expressly, by implication, inducement, estoppel -* or otherwise. -* Any license under such intellectual property rights must be express and -* approved by Intel in writing. +* +* Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved +* +* 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/api/python/mvnc/mvncapi.py b/api/python/mvnc/mvncapi.py index 14957f8..e7ec5b8 100644 --- a/api/python/mvnc/mvncapi.py +++ b/api/python/mvnc/mvncapi.py @@ -1,18 +1,16 @@ -# Copyright 2018 Intel Corporation. -# The source code, information and material ("Material") contained herein is -# owned by Intel Corporation or its suppliers or licensors, and title to such -# Material remains with Intel Corporation or its suppliers or licensors. -# The Material contains proprietary information of Intel or its suppliers and -# licensors. The Material is protected by worldwide copyright laws and treaty -# provisions. -# No part of the Material may be used, copied, reproduced, modified, published, -# uploaded, posted, transmitted, distributed or disclosed in any way without -# Intel's prior express written permission. No license under any patent, -# copyright or other intellectual property rights in the Material is granted to -# or conferred upon you, either expressly, by implication, inducement, estoppel -# or otherwise. -# Any license under such intellectual property rights must be express and -# approved by Intel in writing. +# Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved +# +# 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. import os import sys import numpy diff --git a/api/src/Makefile b/api/src/Makefile index 32af558..51a803d 100644 --- a/api/src/Makefile +++ b/api/src/Makefile @@ -1,7 +1,10 @@ ARCH := $(shell uname -m) +NO_RESET ?= no +NO_BOOT ?= no -OUT := libmvnc.so.0 +LIB_NAME:= libmvnc +OUT := $(LIB_NAME).so.0 OBJDIR := obj-$(ARCH) INSTALLDIR := ${DESTDIR}/usr/local PYTHON3DIST := $(shell python3 -c "import site; print(site.getsitepackages()[0])") @@ -21,7 +24,7 @@ XLINK_SRCS=$(XLINK_BASE)/pc/usb_boot.c XLINK_SRCS+=$(XLINK_BASE)/shared/XLink.c XLINK_SRCS+=$(XLINK_BASE)/shared/XLinkDispatcher.c XLINK_SRCS+=$(XLINKCONSOLE_BASE)/pc/XLinkConsole.c -XLINK_SRCS+=$(XLINK_BASE)/pc/UsbLinkPlatform.c +XLINK_SRCS+=$(XLINK_BASE)/pc/XLinkPlatform.c XLINK_CFLAGS= -I$(XLINK_BASE)/shared \ -I$(XLINK_BASE)/pc \ @@ -30,7 +33,12 @@ XLINK_CFLAGS= -I$(XLINK_BASE)/shared \ -I $(MV_COMMON_BASE)/shared/include/ CFLAGS+=$(XLINK_CFLAGS) -D__PC__ -DUSE_USB_VSC -DVERSION_NAME="\"$(VERSION_NUMBER)\"" -#CFLAGS+=-DXLINK_NO_BOOT +ifeq ($(NO_BOOT), yes) + CFLAGS+=-DXLINK_NO_BOOT +endif +ifeq ($(NO_RESET), yes) + CFLAGS+=-DXLINK_NO_RESET +endif CFLAGS+=-DDEVICE_SHELL_ENABLED LIBS += -lpthread -lusb-1.0 -ldl @@ -52,12 +60,15 @@ LDFLAGS += -shared OBJS := $(SRCS:%.c=$(OBJDIR)/%.o) OBJS += $(XLINK_SRCS:%.c=$(OBJDIR)/%.o) DEPS := $(OBJS:.o=.d) -all: obj-$(ARCH)/libmvnc.so.0 + +.PHONY: get_mvcmd + +all: $(OBJDIR)/$(OUT) get_mvcmd $(OBJDIR)/$(OUT): $(OBJS) if [ ! -e ./version.txt ] ; then echo "missing version.txt file"; exit 1; fi; $(CC) $(LDFLAGS) $(OBJS) -o $@ $(LIBS) - ln -fs $(OBJDIR)/$(OUT) libmvnc.so + ln -fs $(OBJDIR)/$(OUT) $(LIB_NAME).so ln -fs $(OBJDIR)/$(OUT) $(OUT) $(OBJDIR)/%.o: %.c @@ -66,12 +77,15 @@ $(OBJDIR)/%.o: %.c -include $(DEPS) +get_mvcmd: + @./get_mvcmd.sh + basicinstall: $(OBJDIR)/$(OUT) mkdir -p $(INSTALLDIR)/include/ mkdir -p $(INSTALLDIR)/include/mvnc2 mkdir -p $(INSTALLDIR)/lib/ cp $(OBJDIR)/$(OUT) $(INSTALLDIR)/lib/ - ln -fs libmvnc.so.0 $(INSTALLDIR)/lib/libmvnc.so + ln -fs $(OUT) $(INSTALLDIR)/lib/$(LIB_NAME).so cp ../include/mvnc.h $(INSTALLDIR)/include/mvnc2 ln -fs $(INSTALLDIR)/include/mvnc2/mvnc.h $(INSTALLDIR)/include/mvnc.h mkdir -p $(INSTALLDIR)/lib/mvnc @@ -90,11 +104,11 @@ postinstall: udevadm trigger ldconfig -install: basicinstall pythoninstall postinstall +install: get_mvcmd basicinstall pythoninstall postinstall uninstall: - rm -f $(INSTALLDIR)/lib/libmvnc.so.0 - rm -f $(INSTALLDIR)/lib/libmvnc.so + rm -f $(INSTALLDIR)/lib/$(OUT) + rm -f $(INSTALLDIR)/lib/$(LIB_NAME).so rm -f $(INSTALLDIR)/include/mvnc.h rm -f $(INSTALLDIR)/include/mvnc2/mvnc.h rm -f $(INSTALLDIR)/lib/mvnc/MvNCAPI-*.mvcmd @@ -107,4 +121,5 @@ clean: rm -f $(OUT) rm -f $(OBJS) rm -rf $(OBJDIR) - rm -f libmvnc.so + rm -f $(LIB_NAME).so + find mvnc/ -type f -delete diff --git a/api/src/common/components/XLink/pc/UsbLinkPlatform.c b/api/src/common/components/XLink/pc/UsbLinkPlatform.c deleted file mode 100644 index 0935e34..0000000 --- a/api/src/common/components/XLink/pc/UsbLinkPlatform.c +++ /dev/null @@ -1,530 +0,0 @@ -/* -* Copyright 2018 Intel Corporation. -* The source code, information and material ("Material") contained herein is -* owned by Intel Corporation or its suppliers or licensors, and title to such -* Material remains with Intel Corporation or its suppliers or licensors. -* The Material contains proprietary information of Intel or its suppliers and -* licensors. The Material is protected by worldwide copyright laws and treaty -* provisions. -* No part of the Material may be used, copied, reproduced, modified, published, -* uploaded, posted, transmitted, distributed or disclosed in any way without -* Intel's prior express written permission. No license under any patent, -* copyright or other intellectual property rights in the Material is granted to -* or conferred upon you, either expressly, by implication, inducement, estoppel -* or otherwise. -* Any license under such intellectual property rights must be express and -* approved by Intel in writing. -*/ - -/// -/// @brief Application configuration Leon header -/// - -#include "UsbLinkPlatform.h" - -#include -#include - - -#include -#include -#include - -#include - -#include - -#if (defined(_WIN32) || defined(_WIN64) ) -#include "usb_winusb.h" -#include "gettime.h" -#include "win_pthread.h" -extern void initialize_usb_boot(); -#else -#include -#include -#include -#include -#include -#include -#include -#endif -#include "usb_boot.h" - -#ifdef USE_LINK_JTAG -#include /* See NOTES */ -#include -#include -#include -#include -#endif /*USE_LINK_JTAG*/ - -#define USB_LINK_SOCKET_PORT 5678 - -#define USBLINK_ERROR_PRINT -#ifdef USBLINK_ERROR_PRINT -#define USBLINK_ERROR(...) printf(__VA_ARGS__) -#else -#define USBLINK_ERROR(...) (void)0 -#endif /*USBLINK_ERROR_PRINT*/ - -#ifdef USBLINKDEBUG -#define USBLINK_PRINT(...) printf(__VA_ARGS__) -#else -#define USBLINK_PRINT(...) (void)0 -#endif /*USBLINKDEBUG*/ - - -#ifndef USE_USB_VSC -int usbFdWrite = -1; -int usbFdRead = -1; -#endif /*USE_USB_VSC*/ - -static int statuswaittimeout = 5; - -#include - -pthread_t readerThreadId; - -#define MAX_EVENTS 64 - -uint32_t numPoolsAllocated = 0; - -#define USB_ENDPOINT_IN 0x81 -#define USB_ENDPOINT_OUT 0x01 - -//libusb_device_handle* f; - -static double seconds() -{ - static double s; - struct timespec ts; - - clock_gettime(CLOCK_MONOTONIC, &ts); - if(!s) - s = ts.tv_sec + ts.tv_nsec * 1e-9; - return ts.tv_sec + ts.tv_nsec * 1e-9 - s; -} - -static int usb_write(libusb_device_handle *f, const void *data, size_t size, unsigned int timeout) -{ - while(size > 0) - { - int bt,ss = size; - if(ss > 1024*1024*10) - ss = 1024*1024*10; -#if (defined(_WIN32) || defined(_WIN64) ) - int rc = usb_bulk_write(f, USB_ENDPOINT_OUT, (unsigned char *)data, ss, &bt, timeout); -#else - int rc = libusb_bulk_transfer(f, USB_ENDPOINT_OUT, (unsigned char *)data, ss, &bt, timeout); -#endif - if(rc) - return rc; - data = (char *)data + bt; - size -= bt; - } - return 0; -} - -static int usb_read(libusb_device_handle *f, void *data, size_t size, unsigned int timeout) -{ - while(size > 0) - { - int bt,ss = size; - if(ss > 1024*1024*10) - ss = 1024*1024*10; -#if (defined(_WIN32) || defined(_WIN64)) - int rc = usb_bulk_read(f, USB_ENDPOINT_IN, (unsigned char *)data, ss, &bt, timeout); -#else - int rc = libusb_bulk_transfer(f, USB_ENDPOINT_IN,(unsigned char *)data, ss, &bt, timeout); -#endif - if(rc) - return rc; - data = ((char *)data) + bt; - size -= bt; - } - return 0; -} - -libusb_device_handle *usblink_open(const char *path) -{ - usbBootError_t rc = USB_BOOT_DEVICE_NOT_FOUND; - libusb_device_handle *h = NULL; - libusb_device *dev = NULL; - double waittm = seconds() + statuswaittimeout; - while(seconds() < waittm){ - int size = path != NULL ? strlen(path) : 0; - rc = usb_find_device(0, (char *)path, size, (void **)&dev, DEFAULT_OPENVID, DEFAULT_OPENPID); - if(rc == USB_BOOT_SUCCESS) - break; - usleep(1000); - } - if (rc == USB_BOOT_TIMEOUT || rc == USB_BOOT_DEVICE_NOT_FOUND) // Timeout - return 0; -#if (defined(_WIN32) || defined(_WIN64) ) - h = usb_open_device(dev, NULL, 0, NULL); - int libusb_rc = ((h != NULL) ? (0) : (-1)); - if (libusb_rc < 0) - { - usb_close_device(h); - usb_free_device(dev); - return 0; - } - //usb_close_device(h); - //usb_free_device(dev); -#else - int libusb_rc = libusb_open(dev, &h); - if (libusb_rc < 0) - { - libusb_unref_device(dev); - return 0; - } - libusb_unref_device(dev); - libusb_rc = libusb_claim_interface(h, 0); - if(libusb_rc < 0) - { - libusb_close(h); - return 0; - } -#endif - return h; -} - -void usblink_close(libusb_device_handle *f) -{ -#if (defined(_WIN32) || defined(_WIN64)) - usb_close_device(f); -#else - libusb_release_interface(f, 0); - libusb_close(f); -#endif -} - -int USBLinkWrite(void* fd, void* data, int size, unsigned int timeout) -{ - int rc = 0; -#ifndef USE_USB_VSC - int byteCount = 0; -#ifdef USE_LINK_JTAG - while (byteCount < size){ - byteCount += write(usbFdWrite, &((char*)data)[byteCount], size - byteCount); - printf("write %d %d\n", byteCount, size); - } -#else - if(usbFdWrite < 0) - { - return -1; - } - while(byteCount < size) - { - int toWrite = (PACKET_LENGTH && (size - byteCount > PACKET_LENGTH)) \ - ? PACKET_LENGTH:size - byteCount; - int wc = write(usbFdWrite, ((char*)data) + byteCount, toWrite); -// printf("wwrite %x %d %x %d\n", wc, handler->commFd, ((char*)data) + byteCount, toWrite); - - if ( wc != toWrite) - { - return -2; - } - - byteCount += toWrite; - unsigned char acknowledge; - int rc; - rc = read(usbFdWrite, &acknowledge, sizeof(acknowledge)); - if ( rc < 0) - { - return -2; - } - if (acknowledge == 0xEF) - { -// printf("read %x\n", acknowledge); - } - else - { -// printf("read err %x %d\n", acknowledge, rc); - return -2; - } - } -#endif /*USE_LINK_JTAG*/ -#else - rc = usb_write((libusb_device_handle *) fd, data, size, timeout); -#endif /*USE_USB_VSC*/ - return rc; -} - - int USBLinkRead(void* fd, void* data, int size, unsigned int timeout) -{ - //printf("%s() fd %p size %d\n", __func__, fd, size); - int rc = 0; -#ifndef USE_USB_VSC - int nread = 0; -#ifdef USE_LINK_JTAG - while (nread < size){ - nread += read(usbFdWrite, &((char*)data)[nread], size - nread); - printf("read %d %d\n", nread, size); - } -#else - if(usbFdRead < 0) - { - return -1; - } - - while(nread < size) - { - int toRead = (PACKET_LENGTH && (size - nread > PACKET_LENGTH)) \ - ? PACKET_LENGTH : size - nread; - - while(toRead > 0) - { - rc = read(usbFdRead, &((char*)data)[nread], toRead); -// printf("read %x %d\n", *(int*)data, nread); - if ( rc < 0) - { - return -2; - } - toRead -=rc; - nread += rc; - } - unsigned char acknowledge = 0xEF; - int wc = write(usbFdRead, &acknowledge, sizeof(acknowledge)); - if (wc == sizeof(acknowledge)) - { -// printf("write %x %d\n", acknowledge, wc); - } - else - { - return -2; - } - } -#endif /*USE_LINK_JTAG*/ -#else - rc = usb_read((libusb_device_handle *) fd, data, size, timeout); -#endif /*USE_USB_VSC*/ - return rc; -} - -int UsbLinkPlatformGetDeviceName(int index, char* name, int nameSize) -{ - usbBootError_t rc = usb_find_device(index, name, nameSize, 0, 0, 0); - switch(rc) { - case USB_BOOT_SUCCESS: - return USB_LINK_PLATFORM_SUCCESS; - case USB_BOOT_DEVICE_NOT_FOUND: - return USB_LINK_PLATFORM_DEVICE_NOT_FOUND; - case USB_BOOT_TIMEOUT: - return USB_LINK_PLATFORM_TIMEOUT; - default: - return USB_LINK_PLATFORM_ERROR; - } -} -//#define XLINK_NO_BOOT -int UsbLinkPlatformBootRemote(const char* deviceName, const char* binaryPath) -{ -#ifndef XLINK_NO_BOOT - - unsigned filesize; - FILE *fp; - char *tx_buf; - char subaddr[28+2]; - int rc; - -#ifndef USE_USB_VSC - if (usbFdRead != -1){ - close(usbFdRead); - usbFdRead = -1; - } - if (usbFdWrite != -1){ - close(usbFdWrite); - usbFdWrite = -1; - } -#endif /*USE_USB_VSC*/ - - // Load the executable - fp = fopen(binaryPath, "rb"); - if(fp == NULL) - { - if(usb_loglevel) - perror(binaryPath); - return -7; - } - fseek(fp, 0, SEEK_END); - filesize = ftell(fp); - rewind(fp); - if(!(tx_buf = (char*)malloc(filesize))) - { - if(usb_loglevel) - perror("buffer"); - fclose(fp); - return -3; - } - if(fread(tx_buf, 1, filesize, fp) != filesize) - { - if(usb_loglevel) - perror(binaryPath); - fclose(fp); - free(tx_buf); - return -7; - } - fclose(fp); - - // This will be the string to search for in /sys/dev/char links - int chars_to_write = snprintf(subaddr, 28, "-%s:", deviceName); - if(chars_to_write >= 28) { - printf("Path to your boot util is too long for the char array here!\n"); - } - // Boot it - rc = usb_boot(deviceName, tx_buf, filesize); - free(tx_buf); - if(rc) - { - return rc; - } - if(usb_loglevel > 1) - fprintf(stderr, "Boot successful, device address %s\n", deviceName); -#endif - return 0; -} - -int USBLinkPlatformResetRemote(void* fd) -{ -#ifndef USE_USB_VSC -#ifdef USE_LINK_JTAG - /*Nothing*/ -#else - if (usbFdRead != -1){ - close(usbFdRead); - usbFdRead = -1; - } - if (usbFdWrite != -1){ - close(usbFdWrite); - usbFdWrite = -1; - } -#endif /*USE_LINK_JTAG*/ -#else - usblink_close((libusb_device_handle *) fd); -#endif /*USE_USB_VSC*/ - return -1; -} -int UsbLinkPlatformConnect(const char* devPathRead, const char* devPathWrite, void** fd) -{ - #ifndef USE_USB_VSC -#ifdef USE_LINK_JTAG - struct sockaddr_in serv_addr; - usbFdWrite = socket(AF_INET, SOCK_STREAM, 0); - usbFdRead = socket(AF_INET, SOCK_STREAM, 0); - assert(usbFdWrite >=0); - assert(usbFdRead >=0); - memset(&serv_addr, '0', sizeof(serv_addr)); - - serv_addr.sin_family = AF_INET; - serv_addr.sin_addr.s_addr = inet_addr("127.0.0.1"); - serv_addr.sin_port = htons(USB_LINK_SOCKET_PORT); - - if (connect(usbFdWrite, (struct sockaddr*)&serv_addr, sizeof(serv_addr)) < 0) - { - perror("ERROR connecting"); - exit(1); - } - printf("this is working\n"); - return 0; - -#else - usbFdRead= open(devPathRead, O_RDWR); - if(usbFdRead < 0) - { - return -1; - } - // set tty to raw mode - struct termios tty; - speed_t spd; - int rc; - rc = tcgetattr(usbFdRead, &tty); - if (rc < 0) { - usbFdRead = -1; - return -2; - } - - spd = B115200; - cfsetospeed(&tty, (speed_t)spd); - cfsetispeed(&tty, (speed_t)spd); - - cfmakeraw(&tty); - - rc = tcsetattr(usbFdRead, TCSANOW, &tty); - if (rc < 0) { - usbFdRead = -1; - return -2; - } - - usbFdWrite= open(devPathWrite, O_RDWR); - if(usbFdWrite < 0) - { - usbFdWrite = -1; - return -2; - } - // set tty to raw mode - rc = tcgetattr(usbFdWrite, &tty); - if (rc < 0) { - usbFdWrite = -1; - return -2; - } - - spd = B115200; - cfsetospeed(&tty, (speed_t)spd); - cfsetispeed(&tty, (speed_t)spd); - - cfmakeraw(&tty); - - rc = tcsetattr(usbFdWrite, TCSANOW, &tty); - if (rc < 0) { - usbFdWrite = -1; - return -2; - } - return 0; -#endif /*USE_LINK_JTAG*/ -#else - *fd = usblink_open(devPathWrite); - if (*fd == 0) - { - /* could fail due to port name change */ - //printf("fail\n"); - return -1; - } -// dev = new fastmemDevice("usb"); -// int usbInit = dev->fastmemInit(); - if(*fd) - return 0; - else - return -1; -#endif /*USE_USB_VSC*/ -} -int UsbLinkPlatformInit(int loglevel) -{ - usb_loglevel = loglevel; -#if (defined(_WIN32) || defined(_WIN64)) - initialize_usb_boot(); -#endif - return 0; -} - -void deallocateData(void* ptr,uint32_t size, uint32_t alignment) -{ - if (!ptr) - return; -#if (defined(_WIN32) || defined(_WIN64) ) - _aligned_free(ptr); -#else - free(ptr); -#endif -} - -void* allocateData(uint32_t size, uint32_t alignment) -{ - void* ret = NULL; -#if (defined(_WIN32) || defined(_WIN64) ) - ret = _aligned_malloc(size, alignment); -#else - posix_memalign(&ret, alignment, size); -#endif - return ret; -} - diff --git a/api/src/common/components/XLink/pc/XLinkPlatform.c b/api/src/common/components/XLink/pc/XLinkPlatform.c new file mode 100644 index 0000000..ca07ac2 --- /dev/null +++ b/api/src/common/components/XLink/pc/XLinkPlatform.c @@ -0,0 +1,573 @@ +/* +* +* Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved +* +* 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. +*/ + +#include "XLinkPlatform.h" + +#include +#include + +#include +#include +#include +#include +#include +#include + +#if (defined(_WIN32) || defined(_WIN64) ) +#include "usb_winusb.h" +#include "gettime.h" +extern void initialize_usb_boot(); +#include "win_pthread.h" +#else +#include +#include +#include +#include +#include +#include +#include +#endif + +#include "usb_boot.h" + +#define MAX_EVENTS 64 +#define USB_ENDPOINT_IN 0x81 +#define USB_ENDPOINT_OUT 0x01 + +//CDC io device descriptors +int usbFdWrite = -1; +int usbFdRead = -1; +//PCIe io device descriptors +int pcieFd = -1; + +//Communication protocol used +int gl_protocol = -1; + +static int statuswaittimeout = 5; +pthread_t readerThreadId; + +#if (defined(_WIN32) || defined(_WIN64) ) +#define __attribute__(x) +#endif + +#if defined(USE_PCIE) +size_t gl_packetLength = PCIE_MAX_BUFFER_SIZE; +#else +size_t gl_packetLength = PACKET_LENGTH; +#endif + +/*################################################################################# +################################# AUXILIARY FUNCTIONS ############################# +##################################################################################*/ +static double seconds() +{ + static double s; + struct timespec ts; + + clock_gettime(CLOCK_MONOTONIC, &ts); + if(!s) + s = ts.tv_sec + ts.tv_nsec * 1e-9; + return ts.tv_sec + ts.tv_nsec * 1e-9 - s; +} + +/*################################################################################# +################################## USB CDC FUNCTIONS ############################## +##################################################################################*/ +static int cdc_usb_write(void *f __attribute__((unused)), + void* data, size_t size, + unsigned int timeout __attribute__((unused))) +{ +#if (!defined(_WIN32) && !defined(_WIN64)) + size_t byteCount = 0; + if(usbFdWrite < 0) + { + return -1; + } + while(byteCount < size) { + int toWrite = (gl_packetLength && ((size - byteCount) > gl_packetLength)) \ + ? gl_packetLength : size - byteCount; + int wc = write(usbFdWrite, ((char*)data) + byteCount, toWrite); + if (wc != toWrite) { + return -2; + } + byteCount += toWrite; + + //Acknowledge /* + unsigned char acknowledge; + int rc = read(usbFdWrite, &acknowledge, sizeof(acknowledge)); + + if ( rc < 0) { + return -2; + } + if (acknowledge == 0xEF) { + //printf("read ack %x\n", acknowledge); + } + else { + printf("read ack err %x %d\n", acknowledge, rc); + return -2; + } //*/ + } +#endif + return 0; +} + +static int cdc_usb_read(void *f __attribute__((unused)), + void* data, size_t size, + unsigned int timeout __attribute__((unused))) +{ +#if (!defined(_WIN32) && !defined(_WIN64)) + if(usbFdRead < 0) { + return -1; + } + size_t byteCount = 0; + int toRead = 0; + + while(byteCount < size) { + toRead = (gl_packetLength && ((size - byteCount) > gl_packetLength)) \ + ? gl_packetLength : size - byteCount; + while(toRead > 0) + { + int rc = read(usbFdRead, &((char*)data)[byteCount], toRead); + if (rc < 0) { + return -2; + } + toRead -= rc; + byteCount += rc; + } + //Acknowledge /* + unsigned char acknowledge = 0xEF; + int wc = write(usbFdRead, &acknowledge, sizeof(acknowledge)); + if (wc == sizeof(acknowledge)) { + //printf("write %x %d\n", acknowledge, wc); + } + else { + return -2; + } //*/ + } +#endif + return 0; +} + +static int cdc_usb_open(const char* devPathRead, + const char* devPathWrite, + void **fd __attribute__((unused))) +{ +#if (!defined(_WIN32) && !defined(_WIN64)) + usbFdRead= open(devPathRead, O_RDWR); + if(usbFdRead < 0) + { + return -1; + } + // set tty to raw mode + struct termios tty; + speed_t spd; + int rc; + rc = tcgetattr(usbFdRead, &tty); + if (rc < 0) { + usbFdRead = -1; + return -2; + } + + spd = B115200; + cfsetospeed(&tty, (speed_t)spd); + cfsetispeed(&tty, (speed_t)spd); + + cfmakeraw(&tty); + + rc = tcsetattr(usbFdRead, TCSANOW, &tty); + if (rc < 0) { + usbFdRead = -1; + return -2; + } + + usbFdWrite= open(devPathWrite, O_RDWR); + if(usbFdWrite < 0) + { + usbFdWrite = -1; + return -2; + } + // set tty to raw mode + rc = tcgetattr(usbFdWrite, &tty); + if (rc < 0) { + usbFdWrite = -1; + return -2; + } + + spd = B115200; + cfsetospeed(&tty, (speed_t)spd); + cfsetispeed(&tty, (speed_t)spd); + + cfmakeraw(&tty); + + rc = tcsetattr(usbFdWrite, TCSANOW, &tty); + if (rc < 0) { + usbFdWrite = -1; + return -2; + } +#endif + return 0; +} + +static int cdc_usb_close(void *f __attribute__((unused))) +{ +#if (!defined(_WIN32) && !defined(_WIN64)) + if (usbFdRead != -1){ + close(usbFdRead); + usbFdRead = -1; + } + if (usbFdWrite != -1){ + close(usbFdWrite); + usbFdWrite = -1; + } +#endif + return 0; +} + +/*################################################################################# +################################## USB VSC FUNCTIONS ############################## +##################################################################################*/ +static int vsc_usb_write(void *f, void *data, size_t size, unsigned int timeout) +{ + while(size > 0) + { + int bt,ss = size; + if(ss > 1024*1024*10) + ss = 1024*1024*10; + #if (defined(_WIN32) || defined(_WIN64) ) + int rc = usb_bulk_write(f, USB_ENDPOINT_OUT, (unsigned char *)data, ss, &bt, timeout); + #else + int rc = libusb_bulk_transfer((libusb_device_handle*)f, + USB_ENDPOINT_OUT, + (unsigned char *)data, + ss, + &bt, + timeout); + #endif + if(rc) + return rc; + data = (char *)data + bt; + size -= bt; + } + return 0; +} + +static int vsc_usb_read(void *f, void *data, size_t size, unsigned int timeout) +{ + while(size > 0) + { + int bt, ss = size; + if(ss > 1024*1024*10) + ss = 1024*1024*10; +#if (defined(_WIN32) || defined(_WIN64) ) + int rc = usb_bulk_read(f, USB_ENDPOINT_IN, (unsigned char *)data, ss, &bt, timeout); +#else + int rc = libusb_bulk_transfer((libusb_device_handle*)f, + USB_ENDPOINT_IN, + (unsigned char *)data, + ss, + &bt, + timeout); +#endif + if(rc) + return rc; + data = ((char *)data) + bt; + size -= bt; + } + return 0; +} + +static int vsc_usb_open(const char* devPathRead __attribute__((unused)), + const char* devPathWrite, + void** fd) +{ + usbBootError_t rc = USB_BOOT_DEVICE_NOT_FOUND; + libusb_device_handle *h = NULL; + libusb_device *dev = NULL; + double waittm = seconds() + statuswaittimeout; + while(seconds() < waittm){ + int size = devPathWrite != NULL ? strlen(devPathWrite) : 0; + + rc = usb_find_device(0, (char *)devPathWrite, size, (void **)&dev, \ + DEFAULT_OPENVID, DEFAULT_OPENPID); + if(rc == USB_BOOT_SUCCESS) + break; + usleep(1000); + } + if (rc == USB_BOOT_TIMEOUT || rc == USB_BOOT_DEVICE_NOT_FOUND) // Timeout + return -1; + + #if (defined(_WIN32) || defined(_WIN64) ) + h = usb_open_device(dev, NULL, 0, NULL); + int libusb_rc = ((h != NULL) ? (0) : (-1)); + if (libusb_rc < 0) { + usb_close_device(h); + usb_free_device(dev); + return 0; + } + //usb_close_device(h); + //usb_free_device(dev); + #else + int libusb_rc = libusb_open(dev, &h); + if (libusb_rc < 0) + { + libusb_unref_device(dev); + return -1; + } + libusb_unref_device(dev); + libusb_rc = libusb_claim_interface(h, 0); + if(libusb_rc < 0) + { + libusb_close(h); + return -1; + } + #endif + *fd = h; + if (*fd == 0) + { + // could fail due to port name change + //printf("fail\n"); + return -1; + } + //dev = new fastmemDevice("usb"); + //int usbInit = dev->fastmemInit(); + if(*fd) + return 0; + + return -1; +} + +static int vsc_usb_close(void *f) +{ + #if (defined(_WIN32) || defined(_WIN64)) + usb_close_device(f); + #else + libusb_release_interface((libusb_device_handle*)f, 0); + libusb_close((libusb_device_handle*)f); + #endif + return 0; +} + +/*################################################################################# +################################### PCIe FUNCTIONS ################################ +##################################################################################*/ +static int pcie_host_write(void *f __attribute__((unused)), + void *data, size_t size, + unsigned int timeout __attribute__((unused))) +{ + return write(pcieFd, ((char*)data), size); +} + +static int pcie_host_read(void *f __attribute__((unused)), + void *data, size_t size, + unsigned int timeout __attribute__((unused))) +{ + return read(pcieFd, ((char*)data), size); +} + +static int pcie_host_open(const char* devPathRead __attribute__((unused)), + const char* devPathWrite, + void** fd __attribute__((unused))) +{ + printf("pcie_host_open. Starting device test code example...\n"); + pcieFd = open(devPathWrite, O_RDWR); + if (pcieFd < 0){ + perror("Failed to open the device..."); + return errno; + } + //*fd = &pcieFd; //might not need + return 0; +} + +static int pcie_host_close(void *f __attribute__((unused))) +{ + printf("pcie_host_close \n"); + return close(pcieFd); +} +/*############################### FUNCTION ARRAYS #################################*/ +/*These arrays hold the write/read/open/close operation functions +specific for each communication protocol. +Add more functions if adding another protocol*/ +int (*write_fcts[protocols])(void*, void*, size_t, unsigned int) = \ + {vsc_usb_write, cdc_usb_write, pcie_host_write}; +int (*read_fcts[protocols])(void*, void*, size_t, unsigned int) = \ + {vsc_usb_read, cdc_usb_read, pcie_host_read}; +int (*open_fcts[protocols])(const char*, const char*, void**) = \ + {vsc_usb_open, cdc_usb_open, pcie_host_open}; +int (*close_fcts[protocols])(void*) = \ + {vsc_usb_close, cdc_usb_close, pcie_host_close}; + +/*################################################################################# +################################################################################### +###################################### EXTERNAL ################################### +################################################################################### +##################################################################################*/ +int XLinkPlatformConnect(const char* devPathRead, const char* devPathWrite, void** fd) +{ + return open_fcts[gl_protocol](devPathRead, devPathWrite, fd); +} + +int XLinkWrite(void* fd, void* data, int size, unsigned int timeout) +{ + return write_fcts[gl_protocol](fd, data, size, timeout); +} + + int XLinkRead(void* fd, void* data, int size, unsigned int timeout) +{ + return read_fcts[gl_protocol](fd, data, size, timeout); +} + +int XLinkPlatformResetRemote(void* fd) +{ + return close_fcts[gl_protocol](fd); +} + +int XLinkPlatformInit(protocol_t protocol, int loglevel) +{ + gl_protocol = protocol; + usb_loglevel = loglevel; +#if (defined(_WIN32) || defined(_WIN64)) + initialize_usb_boot(); +#endif + return 0; +} + + +int getDeviceName(int index, char* name, int nameSize , int pid) +{ + switch(gl_protocol){ + + case Pcie: + name = "/dev/ma2x8x_0"; //hardcoded for now + nameSize = strlen(name); + break; + case Ipc: + break; + case UsbCDC: + case UsbVSC: + /*should have common device(temporary moved to 'default')*/ + default: + switch(usb_find_device(index, name, nameSize, 0, 0, pid)) + { + case USB_BOOT_SUCCESS: + return X_LINK_PLATFORM_SUCCESS; + case USB_BOOT_DEVICE_NOT_FOUND: + return X_LINK_PLATFORM_DEVICE_NOT_FOUND; + case USB_BOOT_TIMEOUT: + return X_LINK_PLATFORM_TIMEOUT; + default: + return X_LINK_PLATFORM_ERROR; + } + break; + } + return X_LINK_PLATFORM_SUCCESS; +} + +int XLinkPlatformGetDeviceName(int index, char* name, int nameSize) +{ + return getDeviceName(index, name, nameSize, 0); +} + +int XLinkPlatformGetDeviceNameExtended(int index, char* name, int nameSize, int pid) +{ + return getDeviceName(index, name, nameSize, pid); +} + +int XLinkPlatformBootRemote(const char* deviceName, const char* binaryPath) +{ +#ifndef XLINK_NO_BOOT + unsigned filesize; + FILE *fp; + char *tx_buf; + char subaddr[28+2]; + int rc; + + if (usbFdRead != -1){ + close(usbFdRead); + usbFdRead = -1; + } + if (usbFdWrite != -1){ + close(usbFdWrite); + usbFdWrite = -1; + } + // Load the executable + fp = fopen(binaryPath, "rb"); + if(fp == NULL) + { + if(usb_loglevel) + perror(binaryPath); + return -7; + } + fseek(fp, 0, SEEK_END); + filesize = ftell(fp); + rewind(fp); + if(!(tx_buf = (char*)malloc(filesize))) + { + if(usb_loglevel) + perror("buffer"); + fclose(fp); + return -3; + } + if(fread(tx_buf, 1, filesize, fp) != filesize) + { + if(usb_loglevel) + perror(binaryPath); + fclose(fp); + free(tx_buf); + return -7; + } + fclose(fp); + + // This will be the string to search for in /sys/dev/char links + int chars_to_write = snprintf(subaddr, 28, "-%s:", deviceName); + if(chars_to_write >= 28) { + printf("Path to your boot util is too long for the char array here!\n"); + } + // Boot it + rc = usb_boot(deviceName, tx_buf, filesize); + free(tx_buf); + if(rc) + { + return rc; + } + if(usb_loglevel > 1) + fprintf(stderr, "Boot successful, device address %s\n", deviceName); +#endif + return 0; +} + +void deallocateData(void* ptr,uint32_t size, uint32_t alignment) +{ + if (!ptr) + return; +#if (defined(_WIN32) || defined(_WIN64) ) + _aligned_free(ptr); +#else + free(ptr); +#endif +} + +void* allocateData(uint32_t size, uint32_t alignment) +{ + void* ret = NULL; +#if (defined(_WIN32) || defined(_WIN64) ) + ret = _aligned_malloc(size, alignment); +#else + posix_memalign(&ret, alignment, size); +#endif + return ret; +} + diff --git a/api/src/common/components/XLink/pc/usb_boot.c b/api/src/common/components/XLink/pc/usb_boot.c index 69f792d..11b5672 100644 --- a/api/src/common/components/XLink/pc/usb_boot.c +++ b/api/src/common/components/XLink/pc/usb_boot.c @@ -1,19 +1,18 @@ /* -* Copyright 2018 Intel Corporation. -* The source code, information and material ("Material") contained herein is -* owned by Intel Corporation or its suppliers or licensors, and title to such -* Material remains with Intel Corporation or its suppliers or licensors. -* The Material contains proprietary information of Intel or its suppliers and -* licensors. The Material is protected by worldwide copyright laws and treaty -* provisions. -* No part of the Material may be used, copied, reproduced, modified, published, -* uploaded, posted, transmitted, distributed or disclosed in any way without -* Intel's prior express written permission. No license under any patent, -* copyright or other intellectual property rights in the Material is granted to -* or conferred upon you, either expressly, by implication, inducement, estoppel -* or otherwise. -* Any license under such intellectual property rights must be express and -* approved by Intel in writing. +* +* Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved +* +* 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. */ // USB utility for use with Myriad2v2 ROM @@ -202,13 +201,18 @@ usbBootError_t usb_find_device(unsigned idx, char *addr, unsigned addrsize, void // 2 => pid // '255-' x 7 (also gives us nul-terminator for last entry) // 7 => to add "-maXXXX" - uint8_t devs[15][2 + 2 + 4 * 7 + 7] = { 0 };//to store ven_id,dev_id; + //uint8_t devs[15][2 + 2 + 4 * 7 + 7] = { 0 };//to store ven_id,dev_id; + static uint8_t devs[15][2 + 2 + 4 * 7 + 7] = { 0 };//to store ven_id,dev_id; + static int devs_cnt = 0; #else static libusb_device **devs; libusb_device *dev; struct libusb_device_descriptor desc; #endif int count = 0; +#if (defined(_WIN32) || defined(_WIN64)) + int create_count = 0; +#endif size_t i; if(!initialized) @@ -226,7 +230,10 @@ usbBootError_t usb_find_device(unsigned idx, char *addr, unsigned addrsize, void fprintf(stderr, "Unable to get USB device list: %s\n", libusb_strerror(res)); return USB_BOOT_ERROR; } + devs_cnt = res; } + else + res = devs_cnt; #else if(!devs || idx == 0) { @@ -248,7 +255,7 @@ usbBootError_t usb_find_device(unsigned idx, char *addr, unsigned addrsize, void while (res-- > 0) { if (((int)(devs[res][0] << 8 | devs[res][1]) == vid && (devs[res][2] << 8 | devs[res][3]) == pid) || - (pid == 0 && vid == 0 && + ((pid == 0 || pid == -1) && vid == 0 && (((int)(devs[res][0] << 8 | devs[res][1]) == DEFAULT_VID && is_pid_supported((int)(devs[res][2] << 8 | devs[res][3])) == 1) || ((int)(devs[res][0] << 8 | devs[res][1]) == DEFAULT_OPENVID && (int)(devs[res][2] << 8 | devs[res][3]) == DEFAULT_OPENPID)))) { @@ -263,7 +270,20 @@ usbBootError_t usb_find_device(unsigned idx, char *addr, unsigned addrsize, void return USB_BOOT_SUCCESS; } } - else if (idx == count) + else if ((pid == -1) && (int)(devs[res][2] << 8 | devs[res][3]) != DEFAULT_OPENPID)//pid==-1 is an indicator to try to find Myriad devices, exclude VSC devices + { + if (idx == create_count) + { + const char *caddr = &devs[res][4]; + if (usb_loglevel > 1) + fprintf(stderr, "Device %d Address: %s - VID/PID %04x:%04x\n", idx, caddr, (int)(devs[res][0] << 8 | devs[res][1]), (int)(devs[res][2] << 8 | devs[res][3])); + strncpy(addr, caddr, addrsize); + return USB_BOOT_SUCCESS; + } + else + create_count++; + } + else if ((idx == count) && (pid != -1)) { const char *caddr = &devs[res][4]; if (usb_loglevel > 1) @@ -421,7 +441,6 @@ static int wait_findopen(const char *device_address, int timeout, libusb_device i++; usleep(100000); } - return 0; } static int send_file(libusb_device_handle *h, uint8_t endpoint, const uint8_t *tx_buf, unsigned filesize) diff --git a/api/src/common/components/XLink/pc/usb_boot.h b/api/src/common/components/XLink/pc/usb_boot.h index cdcabb1..39b8d6d 100644 --- a/api/src/common/components/XLink/pc/usb_boot.h +++ b/api/src/common/components/XLink/pc/usb_boot.h @@ -1,19 +1,18 @@ /* -* Copyright 2018 Intel Corporation. -* The source code, information and material ("Material") contained herein is -* owned by Intel Corporation or its suppliers or licensors, and title to such -* Material remains with Intel Corporation or its suppliers or licensors. -* The Material contains proprietary information of Intel or its suppliers and -* licensors. The Material is protected by worldwide copyright laws and treaty -* provisions. -* No part of the Material may be used, copied, reproduced, modified, published, -* uploaded, posted, transmitted, distributed or disclosed in any way without -* Intel's prior express written permission. No license under any patent, -* copyright or other intellectual property rights in the Material is granted to -* or conferred upon you, either expressly, by implication, inducement, estoppel -* or otherwise. -* Any license under such intellectual property rights must be express and -* approved by Intel in writing. +* +* Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved +* +* 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. */ #ifdef __cplusplus extern "C" { @@ -37,4 +36,4 @@ int usb_boot(const char *addr, const void *mvcmd, unsigned size); #ifdef __cplusplus } -#endif +#endif \ No newline at end of file diff --git a/api/src/common/components/XLink/shared/UsbLinkPlatform.h b/api/src/common/components/XLink/shared/UsbLinkPlatform.h deleted file mode 100644 index c59445f..0000000 --- a/api/src/common/components/XLink/shared/UsbLinkPlatform.h +++ /dev/null @@ -1,72 +0,0 @@ -/* -* Copyright 2018 Intel Corporation. -* The source code, information and material ("Material") contained herein is -* owned by Intel Corporation or its suppliers or licensors, and title to such -* Material remains with Intel Corporation or its suppliers or licensors. -* The Material contains proprietary information of Intel or its suppliers and -* licensors. The Material is protected by worldwide copyright laws and treaty -* provisions. -* No part of the Material may be used, copied, reproduced, modified, published, -* uploaded, posted, transmitted, distributed or disclosed in any way without -* Intel's prior express written permission. No license under any patent, -* copyright or other intellectual property rights in the Material is granted to -* or conferred upon you, either expressly, by implication, inducement, estoppel -* or otherwise. -* Any license under such intellectual property rights must be express and -* approved by Intel in writing. -*/ - -/// -/// @brief Application configuration Leon header -/// -#ifndef _XLINK_USBLINKPLATFORM_H -#define _XLINK_USBLINKPLATFORM_H -#include -#ifdef __cplusplus -extern "C" -{ -#endif - -#define MAX_POOLS_ALLOC 32 -#define PACKET_LENGTH (64*1024) - -#ifdef __PC__ -#define MAX_LINKS 16 -#else -#define MAX_LINKS 1 -#endif -/* -The USB specific implementation is contained in the file called UsbLinkPlatform.c/cpp. -It implements the following functions: -*/ -int USBLinkWrite(void* fd, void* data, int size, unsigned int timeout); -int USBLinkRead(void* fd, void* data, int size, unsigned int timeout); -int UsbLinkPlatformConnect(const char* devPathRead, - const char* devPathWrite, void** fd); -int UsbLinkPlatformInit(int loglevel); - -int UsbLinkPlatformGetDeviceName(int index, - char* name, - int nameSize); - -int UsbLinkPlatformBootRemote(const char* deviceName, - const char* binaryPath); -int USBLinkPlatformResetRemote(void* fd); - -void* allocateData(uint32_t size, uint32_t alignment); -void deallocateData(void* ptr,uint32_t size, uint32_t alignment); - -typedef enum usbLinkPlatformErrorCode { - USB_LINK_PLATFORM_SUCCESS = 0, - USB_LINK_PLATFORM_ERROR, - USB_LINK_PLATFORM_DEVICE_NOT_FOUND, - USB_LINK_PLATFORM_TIMEOUT -} usbLinkPlatformErrorCode_t; - -#ifdef __cplusplus -} -#endif - -#endif - -/* end of include file */ diff --git a/api/src/common/components/XLink/shared/XLink.c b/api/src/common/components/XLink/shared/XLink.c index d0404fc..1f6e5c7 100644 --- a/api/src/common/components/XLink/shared/XLink.c +++ b/api/src/common/components/XLink/shared/XLink.c @@ -1,19 +1,18 @@ /* -* Copyright 2018 Intel Corporation. -* The source code, information and material ("Material") contained herein is -* owned by Intel Corporation or its suppliers or licensors, and title to such -* Material remains with Intel Corporation or its suppliers or licensors. -* The Material contains proprietary information of Intel or its suppliers and -* licensors. The Material is protected by worldwide copyright laws and treaty -* provisions. -* No part of the Material may be used, copied, reproduced, modified, published, -* uploaded, posted, transmitted, distributed or disclosed in any way without -* Intel's prior express written permission. No license under any patent, -* copyright or other intellectual property rights in the Material is granted to -* or conferred upon you, either expressly, by implication, inducement, estoppel -* or otherwise. -* Any license under such intellectual property rights must be express and -* approved by Intel in writing. +* +* Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved +* +* 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. */ /// @@ -27,21 +26,23 @@ #include "stdio.h" #include "stdint.h" #include "string.h" - #include #include + + #if (defined(_WIN32) || defined(_WIN64)) +#include "gettime.h" #include "win_pthread.h" #include "win_semaphore.h" -#include "gettime.h" #else #include #include #endif + #include "mvMacros.h" -#include "UsbLinkPlatform.h" +#include "XLinkPlatform.h" #include "XLinkDispatcher.h" -#define _USBLINK_ENABLE_PRIVATE_INCLUDE_ +#define _XLINK_ENABLE_PRIVATE_INCLUDE_ #include "XLinkPrivateDefines.h" #ifdef MVLOG_UNIT_NAME @@ -91,14 +92,15 @@ linkId_t nextUniqueLinkId = 0; //incremental number, doesn't get decremented. typedef struct xLinkDesc_t { int nextUniqueStreamId; //incremental number, doesn't get decremented. //Needs to be per link to match remote - streamDesc_t availableStreams[USB_LINK_MAX_STREAMS]; + streamDesc_t availableStreams[XLINK_MAX_STREAMS]; xLinkState_t peerState; void* fd; linkId_t id; + int hostClosedFD; } xLinkDesc_t; xLinkDesc_t availableXLinks[MAX_LINKS]; - +xLinkDesc_t* getLink(void* fd); sem_t pingSem; //to b used by myriad @@ -124,12 +126,13 @@ int handleIncomingEvent(xLinkEvent_t* event){ //specific actions to this peer void* buffer ; streamDesc_t* stream ; + int sc = 0 ; switch (event->header.type){ case USB_WRITE_REQ: /*If we got here, we will read the data no matter what happens. If we encounter any problems we will still read the data to keep the communication working but send a NACK.*/ - stream = getStreamById(event->xLinkFD, event->header.streamId); + stream = getStreamById(event->xLinkFD, event->header.streamId);\ ASSERT_X_LINK(stream); stream->localFillLevel += event->header.size; @@ -141,7 +144,7 @@ int handleIncomingEvent(xLinkEvent_t* event){ mvLog(MVLOG_FATAL,"out of memory\n"); ASSERT_X_LINK(0); } - int sc = USBLinkRead(event->xLinkFD, buffer, event->header.size, USB_DATA_TIMEOUT); + sc = XLinkRead(event->xLinkFD, buffer, event->header.size, USB_DATA_TIMEOUT); if(sc < 0){ mvLog(MVLOG_ERROR,"%s() Read failed %d\n", __func__, (int)sc); } @@ -182,6 +185,32 @@ int handleIncomingEvent(xLinkEvent_t* event){ break; case USB_RESET_RESP: break; + case PCIE_CREATE_STREAM_REQ: + break; + case PCIE_WRITE_REQ: + printf("PCIE_WRITE_REQ\n"); + stream = getStreamById(event->xLinkFD, event->header.streamId); + printf("XLinkWrite sending size %d and bufer %p\n", (int)event->header.size, &event->data); + int rc = XLinkWrite(NULL, event->data, event->header.size, 0); + if(rc < 0) { + mvLog(MVLOG_ERROR,"Write failed %d\n", rc); + } + event->header.flags.bitField.ack = 0; + event->header.flags.bitField.nack = 1; + releaseStream(stream); + break; + case PCIE_READ_REQ: + break; + case PCIE_CLOSE_STREAM_REQ: + break; + case PCIE_WRITE_RESP: + break; + case PCIE_READ_RESP: + break; + case PCIE_CREATE_STREAM_RESP: + break; + case PCIE_CLOSE_STREAM_RESP: + break; default: ASSERT_X_LINK(0); } @@ -191,12 +220,18 @@ int handleIncomingEvent(xLinkEvent_t* event){ } int dispatcherEventReceive(xLinkEvent_t* event){ static xLinkEvent_t prevEvent; - int sc = USBLinkRead(event->xLinkFD, &event->header, sizeof(event->header), 0); + int sc = XLinkRead(event->xLinkFD, &event->header, sizeof(event->header), 0); if(sc < 0 && event->header.type == USB_RESET_RESP) { - return sc; + return sc; } - if(sc < 0){ + if(sc < 0) { + xLinkDesc_t* link = getLink(event->xLinkFD); + if (link->hostClosedFD) { + //host intentionally closed usb, finish normally + event->header.type = USB_RESET_RESP; + return 0; + } mvLog(MVLOG_ERROR,"%s() Read failed %d\n", __func__, (int)sc); return sc; } @@ -268,7 +303,7 @@ int getNextAvailableStreamIndex(xLinkDesc_t* link) return -1; int idx; - for (idx = 0; idx < USB_LINK_MAX_STREAMS; idx++) { + for (idx = 0; idx < XLINK_MAX_STREAMS; idx++) { if (link->availableStreams[idx].id == INVALID_STREAM_ID) return idx; } @@ -282,7 +317,7 @@ streamDesc_t* getStreamById(void* fd, streamId_t id) xLinkDesc_t* link = getLink(fd); ASSERT_X_LINK(link != NULL); int stream; - for (stream = 0; stream < USB_LINK_MAX_STREAMS; stream++) { + for (stream = 0; stream < XLINK_MAX_STREAMS; stream++) { if (link->availableStreams[stream].id == id) { sem_wait(&link->availableStreams[stream].sem); return &link->availableStreams[stream]; @@ -295,7 +330,7 @@ streamDesc_t* getStreamByName(xLinkDesc_t* link, const char* name) { ASSERT_X_LINK(link != NULL); int stream; - for (stream = 0; stream < USB_LINK_MAX_STREAMS; stream++) { + for (stream = 0; stream < XLINK_MAX_STREAMS; stream++) { if (link->availableStreams[stream].id != INVALID_STREAM_ID && strcmp(link->availableStreams[stream].name, name) == 0) { sem_wait(&link->availableStreams[stream].sem); @@ -354,7 +389,6 @@ void deallocateStream(streamDesc_t* stream) } } - int releasePacketFromStream(streamDesc_t* stream, uint32_t* releasedSize) { streamPacketDesc_t* currPack = &stream->packets[stream->firstPacket]; @@ -362,11 +396,14 @@ int releasePacketFromStream(streamDesc_t* stream, uint32_t* releasedSize) mvLog(MVLOG_ERROR,"There is no packet to release\n"); return 0; // ignore this, although this is a big problem on application side } + stream->localFillLevel -= currPack->length; mvLog(MVLOG_DEBUG,"Got release of %ld , current local fill level is %ld out of %ld %ld\n", currPack->length, stream->localFillLevel, stream->readSize, stream->writeSize); - deallocateData(currPack->data, ALIGN_UP_INT32((int32_t)currPack->length, __CACHE_LINE_SIZE), __CACHE_LINE_SIZE); + deallocateData(currPack->data, + ALIGN_UP_INT32((int32_t)currPack->length, __CACHE_LINE_SIZE), __CACHE_LINE_SIZE); + CIRCULAR_INCREMENT(stream->firstPacket, USB_LINK_MAX_PACKETS_PER_STREAM); stream->blockedPackets--; *releasedSize = currPack->length; @@ -396,10 +433,10 @@ int addNewPacketToStream(streamDesc_t* stream, void* buffer, uint32_t size){ } streamId_t allocateNewStream(void* fd, - const char* name, - uint32_t writeSize, - uint32_t readSize, - streamId_t forcedId) + const char* name, + uint32_t writeSize, + uint32_t readSize, + streamId_t forcedId) { streamId_t streamId; streamDesc_t* stream; @@ -487,7 +524,6 @@ int dispatcherLocalEventGetResponse(xLinkEvent_t* event, xLinkEvent_t* response) event->header.flags.bitField.block = 0; stream->remoteFillLevel += event->header.size; stream->remoteFillPacketLevel++; - mvLog(MVLOG_DEBUG,"Got local write of %ld , remote fill level %ld out of %ld %ld\n", event->header.size, stream->remoteFillLevel, stream->writeSize, stream->readSize); } @@ -549,6 +585,35 @@ int dispatcherLocalEventGetResponse(xLinkEvent_t* event, xLinkEvent_t* response) //should not happen event->header.flags.bitField.localServe = 1; break; + case PCIE_CREATE_STREAM_REQ: + break; + case PCIE_WRITE_REQ: + break; + case PCIE_READ_REQ: + printf("PCIE_READ_REQ id:%d\n", (int)event->header.streamId); + stream = getStreamById(event->xLinkFD, event->header.streamId); + event->header.flags.bitField.ack = 1; + event->header.flags.bitField.nack = 0; + event->header.flags.bitField.block = 0; + + printf("Xlink Read with data size %d and data %p \n", + (int)((streamPacketDesc_t*)event->data)->length, (streamPacketDesc_t*)event->data); + //int sc = XLinkRead(NULL, event->data->data, event->data->length, 0); + //if(sc < 0){ + // mvLog(MVLOG_ERROR,"%s() PCIE XLinkRead failed %d\n", __func__, (int)sc); + //} + releaseStream(stream); + break; + case PCIE_CLOSE_STREAM_REQ: + break; + case PCIE_WRITE_RESP: + break; + case PCIE_READ_RESP: + break; + case PCIE_CREATE_STREAM_RESP: + break; + case PCIE_CLOSE_STREAM_RESP: + break; default: ASSERT_X_LINK(0); } @@ -710,11 +775,26 @@ int dispatcherRemoteEventGetResponse(xLinkEvent_t* event, xLinkEvent_t* response releaseStream(stream); break; } - case USB_PING_RESP: break; case USB_RESET_RESP: break; + case PCIE_CREATE_STREAM_REQ: + break; + case PCIE_WRITE_REQ: + break; + case PCIE_READ_REQ: + break; + case PCIE_CLOSE_STREAM_REQ: + break; + case PCIE_WRITE_RESP: + break; + case PCIE_READ_RESP: + break; + case PCIE_CREATE_STREAM_RESP: + break; + case PCIE_CLOSE_STREAM_RESP: + break; default: ASSERT_X_LINK(0); } @@ -724,18 +804,20 @@ int dispatcherRemoteEventGetResponse(xLinkEvent_t* event, xLinkEvent_t* response int dispatcherEventSend(xLinkEvent_t *event) { mvLog(MVLOG_DEBUG,"sending %d %d\n", (int)event->header.type, (int)event->header.id); - int rc = USBLinkWrite(event->xLinkFD, &event->header, sizeof(event->header), 0); + int rc = XLinkWrite(event->xLinkFD, &event->header, sizeof(event->header), 0); if(rc < 0) { mvLog(MVLOG_ERROR,"Write failed %d\n", rc); + return rc; } if (event->header.type == USB_WRITE_REQ) { //write requested data - rc = USBLinkWrite(event->xLinkFD, event->data, + rc = XLinkWrite(event->xLinkFD, event->data, event->header.size, USB_DATA_TIMEOUT); if(rc < 0) { mvLog(MVLOG_ERROR,"Write failed %d\n", rc); + return rc; } } // this function will send events to the remote node @@ -749,45 +831,94 @@ static xLinkState_t getXLinkState(xLinkDesc_t* link) return link->peerState; } -void dispatcherCloseUsbLink(void*fd) +void dispatcherCloseLink(void*fd, int fullClose) { xLinkDesc_t* link = getLink(fd); ASSERT_X_LINK(link != NULL); - link->peerState = X_LINK_COMMUNICATION_NOT_OPEN; - link->id = INVALID_LINK_ID; - link->fd = NULL; - link->nextUniqueStreamId = 0; + if (fullClose) + { + link->peerState = X_LINK_COMMUNICATION_NOT_OPEN; + link->id = INVALID_LINK_ID; + link->fd = NULL; + link->nextUniqueStreamId = 0; - int stream; - for (stream = 0; stream < USB_LINK_MAX_STREAMS; stream++) - link->availableStreams[stream].id = INVALID_STREAM_ID; + int stream; + for (stream = 0; stream < XLINK_MAX_STREAMS; stream++) + link->availableStreams[stream].id = INVALID_STREAM_ID; + } + else + { + link->peerState = XLINK_DOWN; + } } void dispatcherResetDevice(void* fd) { - USBLinkPlatformResetRemote(fd); + XLinkPlatformResetRemote(fd); } +XLinkError_t XLinkGetFillLevel(streamId_t streamId, int isRemote, int* fillLevel) +{ + linkId_t id; + EXTRACT_IDS(streamId,id); + xLinkDesc_t* link = getLinkById(id); + streamDesc_t* stream; + + ASSERT_X_LINK(link != NULL); + if (getXLinkState(link) != XLINK_UP) + { + return X_LINK_COMMUNICATION_NOT_OPEN; + } + stream = getStreamById(link->fd, streamId); + ASSERT_X_LINK(stream); + + if (isRemote) + *fillLevel = stream->remoteFillLevel; + else + *fillLevel = stream->localFillLevel; + releaseStream(stream); + return X_LINK_SUCCESS; +} /*################################################################################# ###################################### EXTERNAL ################################### ##################################################################################*/ +/* +PCIE inserts are a temporary solution for XLinkPcie, +their purpose is to bypass using the dispatcher, +calling the xlink Platform functions directly. +Pcie calls should be moved to dispatcher as a next task/target. +*/ + //Called only from app - per device XLinkError_t XLinkConnect(XLinkHandler_t* handler) { + /************* PCIE **************/ + if (glHandler->protocol == PCIE) { + if(XLinkPlatformConnect(handler->devicePath2, \ + handler->devicePath, \ + NULL) < 0) { + return X_LINK_ERROR; + } + else { + handler->linkId = 0; + return X_LINK_SUCCESS; + } + }/*******************************/ + int index = getNextAvailableLinkIndex(); ASSERT_X_LINK(index != -1); xLinkDesc_t* link = &availableXLinks[index]; mvLog(MVLOG_DEBUG,"%s() device name %s \n", __func__, handler->devicePath); - if (UsbLinkPlatformConnect(handler->devicePath2, handler->devicePath, &link->fd) == -1) - { + if (XLinkPlatformConnect(handler->devicePath2, \ + handler->devicePath, \ + &link->fd) < 0) { return X_LINK_ERROR; } dispatcherStart(link->fd); - xLinkEvent_t event = {0}; event.header.type = USB_PING_REQ; event.xLinkFD = link->fd; @@ -795,23 +926,36 @@ XLinkError_t XLinkConnect(XLinkHandler_t* handler) dispatcherWaitEventComplete(link->fd); link->id = nextUniqueLinkId++; - link->peerState = USB_LINK_UP; + link->peerState = XLINK_UP; handler->linkId = link->id; - - return 0; + link->hostClosedFD = 0; + return X_LINK_SUCCESS; } XLinkError_t XLinkInitialize(XLinkGlobalHandler_t* handler) { - ASSERT_X_LINK(USB_LINK_MAX_STREAMS <= MAX_POOLS_ALLOC); + ASSERT_X_LINK(XLINK_MAX_STREAMS <= MAX_POOLS_ALLOC); glHandler = handler; sem_init(&pingSem,0,0); int i; - int sc = UsbLinkPlatformInit(handler->loglevel); - if (sc) - { + +#if (defined(_WIN32) || defined(_WIN64)) + if (glHandler->protocol != USB_VSC) { + printf("Windows only support USB_VSC! \n"); + return X_LINK_COMMUNICATION_NOT_OPEN; + } +#endif + + int sc = XLinkPlatformInit(glHandler->protocol, glHandler->loglevel); + if (sc != X_LINK_SUCCESS) { return X_LINK_COMMUNICATION_NOT_OPEN; } + /************* PCIE **************/ + if (glHandler->protocol == PCIE) { + /*Bypass Dispatcher on PCIE for now*/ + printf("PCIe initialized through Xlink! \n"); + return X_LINK_SUCCESS; + }/*******************************/ //initialize availableStreams xLinkDesc_t* link; @@ -819,17 +963,16 @@ XLinkError_t XLinkInitialize(XLinkGlobalHandler_t* handler) link = &availableXLinks[i]; link->id = INVALID_LINK_ID; link->fd = NULL; - link->peerState = USB_LINK_NOT_INIT; + link->peerState = XLINK_NOT_INIT; int stream; - for (stream = 0; stream < USB_LINK_MAX_STREAMS; stream++) + for (stream = 0; stream < XLINK_MAX_STREAMS; stream++) link->availableStreams[stream].id = INVALID_STREAM_ID; } - controlFunctionTbl.eventReceive = &dispatcherEventReceive; controlFunctionTbl.eventSend = &dispatcherEventSend; controlFunctionTbl.localGetResponse = &dispatcherLocalEventGetResponse; controlFunctionTbl.remoteGetResponse = &dispatcherRemoteEventGetResponse; - controlFunctionTbl.closeLink = &dispatcherCloseUsbLink; + controlFunctionTbl.closeLink = &dispatcherCloseLink; controlFunctionTbl.resetDevice = &dispatcherResetDevice; dispatcherInitialize(&controlFunctionTbl); @@ -841,52 +984,35 @@ XLinkError_t XLinkInitialize(XLinkGlobalHandler_t* handler) link = &availableXLinks[index]; link->fd = NULL; link->id = nextUniqueLinkId++; - link->peerState = USB_LINK_UP; + link->peerState = XLINK_UP; sem_wait(&pingSem); #endif return X_LINK_SUCCESS; } - -XLinkError_t XLinkGetFillLevel(streamId_t streamId, int isRemote, int* fillLevel) -{ - linkId_t id; - EXTRACT_IDS(streamId,id); - xLinkDesc_t* link = getLinkById(id); - streamDesc_t* stream; - - ASSERT_X_LINK(link != NULL); - if (getXLinkState(link) != USB_LINK_UP) - { - return X_LINK_COMMUNICATION_NOT_OPEN; - } - stream = getStreamById(link->fd, streamId); - ASSERT_X_LINK(stream); - - if (isRemote) - *fillLevel = stream->remoteFillLevel; - else - *fillLevel = stream->localFillLevel; - releaseStream(stream); - return X_LINK_SUCCESS; -} - streamId_t XLinkOpenStream(linkId_t id, const char* name, int stream_write_size) { + /************* PCIE **************/ + if (glHandler->protocol == PCIE) { + /*Exit on PCIe for now*/ + return (streamId_t)id; + }/*******************************/ + int operationTypes[NMB_OF_PROTOCOLS] = \ + {USB_CREATE_STREAM_REQ, USB_CREATE_STREAM_REQ, \ + PCIE_CREATE_STREAM_REQ, IPC_CREATE_STREAM_REQ}; + xLinkEvent_t event = {0}; xLinkDesc_t* link = getLinkById(id); mvLog(MVLOG_DEBUG,"%s() id %d link %p\n", __func__, id, link); ASSERT_X_LINK(link != NULL); - if (getXLinkState(link) != USB_LINK_UP) - { + if (getXLinkState(link) != XLINK_UP) { /*no link*/ mvLog(MVLOG_DEBUG,"%s() no link up\n", __func__); return INVALID_STREAM_ID; } - if(strlen(name) > MAX_NAME_LENGTH) - { + if(strlen(name) > MAX_NAME_LENGTH) { mvLog(MVLOG_WARN,"name too long\n"); return INVALID_STREAM_ID; } @@ -894,7 +1020,7 @@ streamId_t XLinkOpenStream(linkId_t id, const char* name, int stream_write_size) if(stream_write_size > 0) { stream_write_size = ALIGN_UP(stream_write_size, __CACHE_LINE_SIZE); - event.header.type = USB_CREATE_STREAM_REQ; + event.header.type = operationTypes[glHandler->protocol]; strncpy(event.header.streamName, name, MAX_NAME_LENGTH); event.header.size = stream_write_size; event.header.streamId = INVALID_STREAM_ID; @@ -902,7 +1028,6 @@ streamId_t XLinkOpenStream(linkId_t id, const char* name, int stream_write_size) dispatcherAddEvent(EVENT_LOCAL, &event); dispatcherWaitEventComplete(link->fd); - } streamId_t streamId = getStreamIdByName(link, name); if (streamId > 0xFFFFFFF) { @@ -925,7 +1050,7 @@ XLinkError_t XLinkCloseStream(streamId_t streamId) ASSERT_X_LINK(link != NULL); mvLog(MVLOG_DEBUG,"%s(): streamId %d\n", __func__, (int)streamId); - if (getXLinkState(link) != USB_LINK_UP) + if (getXLinkState(link) != XLINK_UP) return X_LINK_COMMUNICATION_NOT_OPEN; xLinkEvent_t event = {0}; @@ -948,7 +1073,7 @@ XLinkError_t XLinkGetAvailableStreams(linkId_t id) { xLinkDesc_t* link = getLinkById(id); ASSERT_X_LINK(link != NULL); - if (getXLinkState(link) != USB_LINK_UP) + if (getXLinkState(link) != XLINK_UP) { return X_LINK_COMMUNICATION_NOT_OPEN; } @@ -956,38 +1081,62 @@ XLinkError_t XLinkGetAvailableStreams(linkId_t id) return X_LINK_SUCCESS; } -XLinkError_t XLinkGetDeviceName(int index, char* name, int nameSize) +XLinkError_t GetDeviceName(int index, char* name, int nameSize, int pid) { - int rc = UsbLinkPlatformGetDeviceName(index, name, nameSize); - switch(rc) { - case USB_LINK_PLATFORM_SUCCESS: - return X_LINK_SUCCESS; - case USB_LINK_PLATFORM_DEVICE_NOT_FOUND: - return X_LINK_DEVICE_NOT_FOUND; - case USB_LINK_PLATFORM_TIMEOUT: - return X_LINK_TIMEOUT; - default: - return X_LINK_ERROR; + int rc = -1; + if (!pid) + rc = XLinkPlatformGetDeviceName(index, name, nameSize); + else + rc = XLinkPlatformGetDeviceNameExtended(index, name, nameSize, pid); + switch (rc) { + case X_LINK_PLATFORM_SUCCESS: + return X_LINK_SUCCESS; + case X_LINK_PLATFORM_DEVICE_NOT_FOUND: + return X_LINK_DEVICE_NOT_FOUND; + case X_LINK_PLATFORM_TIMEOUT: + return X_LINK_TIMEOUT; + default: + return X_LINK_ERROR; } } +XLinkError_t XLinkGetDeviceName(int index, char* name, int nameSize) +{ + return GetDeviceName(index, name, nameSize, 0); +} + +XLinkError_t XLinkGetDeviceNameExtended(int index, char* name, int nameSize, int pid) +{ + return GetDeviceName(index, name, nameSize, pid); +} + XLinkError_t XLinkWriteData(streamId_t streamId, const uint8_t* buffer, int size) { + /************* PCIE **************/ + if (glHandler->protocol == PCIE) { + /*Bypass Dispatcher on PCIE for now*/ + int rc = XLinkWrite(NULL, (void*)buffer, size, 0); + if(rc < 0) { + mvLog(MVLOG_ERROR,"Write failed %d\n", rc); + } + return X_LINK_SUCCESS; + }/*******************************/ + int operationTypes[NMB_OF_PROTOCOLS] = \ + {USB_WRITE_REQ, USB_WRITE_REQ, PCIE_WRITE_REQ, IPC_WRITE_REQ}; linkId_t id; EXTRACT_IDS(streamId,id); xLinkDesc_t* link = getLinkById(id); ASSERT_X_LINK(link != NULL); - if (getXLinkState(link) != USB_LINK_UP) + if (getXLinkState(link) != XLINK_UP) { return X_LINK_COMMUNICATION_NOT_OPEN; } struct timespec start, end; clock_gettime(CLOCK_REALTIME, &start); - xLinkEvent_t event = {0}; - event.header.type = USB_WRITE_REQ; + event.header.type = operationTypes[glHandler->protocol]; event.header.size = size; event.header.streamId = streamId; event.xLinkFD = link->fd; @@ -995,9 +1144,8 @@ XLinkError_t XLinkWriteData(streamId_t streamId, const uint8_t* buffer, xLinkEvent_t* ev = dispatcherAddEvent(EVENT_LOCAL, &event); dispatcherWaitEventComplete(link->fd); - clock_gettime(CLOCK_REALTIME, &end); - + clock_gettime(CLOCK_REALTIME, &end); if (ev->header.flags.bitField.ack == 1) { //profile only on success @@ -1014,7 +1162,7 @@ XLinkError_t XLinkWriteData(streamId_t streamId, const uint8_t* buffer, XLinkError_t XLinkAsyncWriteData() { - if (getXLinkState(NULL) != USB_LINK_UP) + if (getXLinkState(NULL) != XLINK_UP) { return X_LINK_COMMUNICATION_NOT_OPEN; } @@ -1023,19 +1171,37 @@ XLinkError_t XLinkAsyncWriteData() XLinkError_t XLinkReadData(streamId_t streamId, streamPacketDesc_t** packet) { + /************* PCIE **************/ + if (glHandler->protocol == PCIE) { + /*Bypass Dispatcher on PCIE for now*/ + int toRead = (int)(*packet)->length; + int byteCount = 0; + + while (toRead) { + int sc = XLinkRead(NULL, ((*packet)->data) + byteCount, (*packet)->length, 0); + if(sc < 0){ + mvLog(MVLOG_ERROR,"%s() PCIE XLinkRead failed %d\n", __func__, (int)sc); + } + + toRead -= sc; + byteCount += sc; + } + return X_LINK_SUCCESS; + }/********************************/ + int operationTypes[NMB_OF_PROTOCOLS] = \ + {USB_READ_REQ, USB_READ_REQ, PCIE_READ_REQ, IPC_READ_REQ}; + struct timespec start, end; linkId_t id; EXTRACT_IDS(streamId,id); xLinkDesc_t* link = getLinkById(id); ASSERT_X_LINK(link != NULL); - if (getXLinkState(link) != USB_LINK_UP) + if (getXLinkState(link) != XLINK_UP) { return X_LINK_COMMUNICATION_NOT_OPEN; } xLinkEvent_t event = {0}; - struct timespec start, end; - - event.header.type = USB_READ_REQ; + event.header.type = operationTypes[glHandler->protocol]; event.header.size = 0; event.header.streamId = streamId; event.xLinkFD = link->fd; @@ -1060,11 +1226,17 @@ XLinkError_t XLinkReadData(streamId_t streamId, streamPacketDesc_t** packet) XLinkError_t XLinkReleaseData(streamId_t streamId) { + /************* PCIE **************/ + if (glHandler->protocol == PCIE) { + XLinkPlatformResetRemote(NULL); + return X_LINK_SUCCESS; + }/********************************/ + linkId_t id; EXTRACT_IDS(streamId,id); xLinkDesc_t* link = getLinkById(id); ASSERT_X_LINK(link != NULL); - if (getXLinkState(link) != USB_LINK_UP) + if (getXLinkState(link) != XLINK_UP) { return X_LINK_COMMUNICATION_NOT_OPEN; } @@ -1085,19 +1257,28 @@ XLinkError_t XLinkReleaseData(streamId_t streamId) XLinkError_t XLinkBootRemote(const char* deviceName, const char* binaryPath) { - if (UsbLinkPlatformBootRemote(deviceName, binaryPath) == 0) + if (XLinkPlatformBootRemote(deviceName, binaryPath) == 0) return X_LINK_SUCCESS; else return X_LINK_COMMUNICATION_FAIL; } +XLinkError_t XLinkDisconnect(linkId_t id) +{ + xLinkDesc_t* link = getLinkById(id); + ASSERT_X_LINK(link != NULL); + link->hostClosedFD = 1; + XLinkPlatformResetRemote(link->fd); + return X_LINK_SUCCESS; +} + XLinkError_t XLinkResetRemote(linkId_t id) { xLinkDesc_t* link = getLinkById(id); ASSERT_X_LINK(link != NULL); - if (getXLinkState(link) != USB_LINK_UP) + if (getXLinkState(link) != XLINK_UP) { - USBLinkPlatformResetRemote(link->fd); + XLinkPlatformResetRemote(link->fd); return X_LINK_COMMUNICATION_NOT_OPEN; } xLinkEvent_t event = {0}; @@ -1117,7 +1298,7 @@ XLinkError_t XLinkResetAll() if (availableXLinks[i].id != INVALID_LINK_ID) { xLinkDesc_t* link = &availableXLinks[i]; int stream; - for (stream = 0; stream < USB_LINK_MAX_STREAMS; stream++) { + for (stream = 0; stream < XLINK_MAX_STREAMS; stream++) { if (link->availableStreams[stream].id != INVALID_STREAM_ID) { streamId_t streamId = link->availableStreams[stream].id; mvLog(MVLOG_DEBUG,"%s() Closing stream (stream = %d) %d on link %d\n", diff --git a/api/src/common/components/XLink/shared/XLink.h b/api/src/common/components/XLink/shared/XLink.h index a521550..9eae9a3 100644 --- a/api/src/common/components/XLink/shared/XLink.h +++ b/api/src/common/components/XLink/shared/XLink.h @@ -1,25 +1,25 @@ /* -* Copyright 2018 Intel Corporation. -* The source code, information and material ("Material") contained herein is -* owned by Intel Corporation or its suppliers or licensors, and title to such -* Material remains with Intel Corporation or its suppliers or licensors. -* The Material contains proprietary information of Intel or its suppliers and -* licensors. The Material is protected by worldwide copyright laws and treaty -* provisions. -* No part of the Material may be used, copied, reproduced, modified, published, -* uploaded, posted, transmitted, distributed or disclosed in any way without -* Intel's prior express written permission. No license under any patent, -* copyright or other intellectual property rights in the Material is granted to -* or conferred upon you, either expressly, by implication, inducement, estoppel -* or otherwise. -* Any license under such intellectual property rights must be express and -* approved by Intel in writing. +* +* Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved +* +* 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. */ /// /// @file /// @brief Application configuration Leon header /// + #ifndef _XLINK_H #define _XLINK_H #include "XLinkPublicDefines.h" @@ -35,7 +35,6 @@ XLinkError_t XLinkInitialize(XLinkGlobalHandler_t* handler); // Connects to specific device, starts dispatcher and pings remote XLinkError_t XLinkConnect(XLinkHandler_t* handler); - // Opens a stream in the remote that can be written to by the local // Allocates stream_write_size (aligned up to 64 bytes) for that stream streamId_t XLinkOpenStream(linkId_t id, const char* name, int stream_write_size); @@ -48,6 +47,7 @@ XLinkError_t XLinkCloseStream(streamId_t streamId); XLinkError_t XLinkGetAvailableStreams(linkId_t id); XLinkError_t XLinkGetDeviceName(int index, char* name, int nameSize); +XLinkError_t XLinkGetDeviceNameExtended(int index, char* name, int nameSize, int pid); // Send a package to initiate the writing of data to a remote stream // Note that the actual size of the written data is ALIGN_UP(size, 64) @@ -73,6 +73,9 @@ XLinkError_t XLinkBootRemote(const char* deviceName, const char* binaryPath); // Reset the remote XLinkError_t XLinkResetRemote(linkId_t id); +//Closes connection only +XLinkError_t XLinkDisconnect(linkId_t id); + // Close all and release all memory XLinkError_t XLinkResetAll(); diff --git a/api/src/common/components/XLink/shared/XLinkDispatcher.c b/api/src/common/components/XLink/shared/XLinkDispatcher.c index 97f3930..997d27c 100644 --- a/api/src/common/components/XLink/shared/XLinkDispatcher.c +++ b/api/src/common/components/XLink/shared/XLinkDispatcher.c @@ -1,19 +1,18 @@ /* -* Copyright 2018 Intel Corporation. -* The source code, information and material ("Material") contained herein is -* owned by Intel Corporation or its suppliers or licensors, and title to such -* Material remains with Intel Corporation or its suppliers or licensors. -* The Material contains proprietary information of Intel or its suppliers and -* licensors. The Material is protected by worldwide copyright laws and treaty -* provisions. -* No part of the Material may be used, copied, reproduced, modified, published, -* uploaded, posted, transmitted, distributed or disclosed in any way without -* Intel's prior express written permission. No license under any patent, -* copyright or other intellectual property rights in the Material is granted to -* or conferred upon you, either expressly, by implication, inducement, estoppel -* or otherwise. -* Any license under such intellectual property rights must be express and -* approved by Intel in writing. +* +* Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved +* +* 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. */ /// @@ -25,9 +24,9 @@ #include "stdint.h" #include "stdlib.h" #include "string.h" - #include #include + #if (defined(_WIN32) || defined(_WIN64)) #include "win_pthread.h" #include "win_semaphore.h" @@ -35,6 +34,7 @@ #include #include #endif + #include "XLinkDispatcher.h" #include "XLinkPrivateDefines.h" @@ -69,7 +69,7 @@ typedef struct{ xLinkEventPriv_t* curProc; xLinkEventPriv_t* cur; - __attribute__((aligned(8))) xLinkEventPriv_t q[MAX_EVENTS]; + __attribute__((aligned(64))) xLinkEventPriv_t q[MAX_EVENTS]; }eventQueueHandler_t; typedef struct { @@ -87,6 +87,11 @@ typedef struct { localSem_t eventSemaphores[MAXIMUM_SEMAPHORES]; } xLinkSchedulerState_t; +static xLinkEventPriv_t* getNextElementWithState(xLinkEventPriv_t* base, xLinkEventPriv_t* end, + xLinkEventPriv_t* start, xLinkEventState_t state); + +static void markEventServed(xLinkEventPriv_t* event); + #define CIRCULAR_INCREMENT(x, maxVal, base) \ { \ @@ -141,7 +146,11 @@ sem_t addSchedulerSem; //below workaround for "C2088 '==': illegal for struct" error int pthread_t_compare(pthread_t a, pthread_t b) { +#if (defined(_WIN32) || defined(_WIN64) ) + return ((a.tid == b.tid)); +#else return (a == b); +#endif } static int unrefSem(sem_t* sem, xLinkSchedulerState_t* curr) { @@ -233,15 +242,36 @@ static void* eventReader(void* ctx) mvLog(MVLOG_DEBUG,"Reading %s (scheduler Id %d, fd %p)\n", TypeToStr(event.header.type), schedulerId, event.xLinkFD); int sc = glControlFunc->eventReceive(&event); + if (sc) { + // Only run this logic on the host side, the FW does not need this logic +#ifdef __PC__ + xLinkSchedulerState_t *curr = &schedulerState[schedulerId]; + // Same exception that is in eventReceive. Still break out of reading more events + if (event.header.type != USB_RESET_RESP) + { + mvLog(MVLOG_ERROR, "Failed to receive event, the device may have reset\n"); + + glControlFunc->closeLink(schedulerState[schedulerId].xLinkFD, 0); + + // Find the next blocked event that the app is waiting on + // TODO will there be more than one? + xLinkEventPriv_t *e = getNextElementWithState(curr->lQueue.base, curr->lQueue.end, curr->lQueue.cur, EVENT_BLOCKED); + + if (e != NULL) + { + e->packet.header.flags.bitField.ack = 0; + e->packet.header.flags.bitField.nack = 1; + markEventServed(e); + } + } +#endif break; } } return 0; } - - static int isEventTypeRequest(xLinkEventPriv_t* event) { if (event->packet.header.type < USB_REQUEST_LAST) @@ -270,7 +300,6 @@ static void markEventServed(xLinkEventPriv_t* event) event->isServed = EVENT_SERVED; } - static int dispatcherRequestServe(xLinkEventPriv_t * event, xLinkSchedulerState_t* curr){ ASSERT_X_LINK(curr != NULL); ASSERT_X_LINK(isEventTypeRequest(event)); @@ -404,7 +433,7 @@ static void dispatcherReset(xLinkSchedulerState_t* curr) { ASSERT_X_LINK(curr != NULL); - glControlFunc->closeLink(curr->xLinkFD); + glControlFunc->closeLink(curr->xLinkFD, 1); if (sem_post(&curr->notifyDispatcherSem)) { mvLog(MVLOG_ERROR,"can't post semaphore\n"); //to allow us to get a NULL event } @@ -412,6 +441,7 @@ static void dispatcherReset(xLinkSchedulerState_t* curr) while (event != NULL) { event = dispatcherGetNextEvent(curr); } + event = getNextElementWithState(curr->lQueue.base, curr->lQueue.end, curr->lQueue.base, EVENT_PENDING); while (event != NULL) { markEventServed(event); @@ -420,7 +450,7 @@ static void dispatcherReset(xLinkSchedulerState_t* curr) glControlFunc->resetDevice(curr->xLinkFD); curr->schedulerId = -1; numSchedulers--; - mvLog(MVLOG_INFO,"Reset Successfully\n"); + mvLog(MVLOG_DEBUG,"Reset Successfully\n"); } #if (defined(_WIN32) || defined(_WIN64)) static void* __cdecl eventSchedulerRun(void* ctx) @@ -458,6 +488,13 @@ static void* eventSchedulerRun(void* ctx) while (!curr->resetXLink) { event = dispatcherGetNextEvent(curr); + if(event == NULL) + { + mvLog(MVLOG_ERROR,"Dispatcher received NULL event!"); + /// Skip the event instead of asserting, so only + /// the particular xlink chan will crash + continue; + } ASSERT_X_LINK(event->packet.xLinkFD == curr->xLinkFD); getRespFunction getResp; xLinkEvent_t* toSend; @@ -485,7 +522,7 @@ static void* eventSchedulerRun(void* ctx) } //TODO: dispatcher shouldn't know about this packet. Seems to be easily move-able to protocol - if (event->origin == EVENT_REMOTE){ + if (event->origin == EVENT_REMOTE) { if (event->packet.header.type == USB_RESET_REQ) { curr->resetXLink = 1; } @@ -712,4 +749,4 @@ int dispatcherInitialize(struct dispatcherControlFunctions* controlFunc) { #endif } -/* end of file */ +/* end of file */ \ No newline at end of file diff --git a/api/src/common/components/XLink/shared/XLinkDispatcher.h b/api/src/common/components/XLink/shared/XLinkDispatcher.h index cac032f..ee81312 100644 --- a/api/src/common/components/XLink/shared/XLinkDispatcher.h +++ b/api/src/common/components/XLink/shared/XLinkDispatcher.h @@ -1,19 +1,18 @@ /* -* Copyright 2018 Intel Corporation. -* The source code, information and material ("Material") contained herein is -* owned by Intel Corporation or its suppliers or licensors, and title to such -* Material remains with Intel Corporation or its suppliers or licensors. -* The Material contains proprietary information of Intel or its suppliers and -* licensors. The Material is protected by worldwide copyright laws and treaty -* provisions. -* No part of the Material may be used, copied, reproduced, modified, published, -* uploaded, posted, transmitted, distributed or disclosed in any way without -* Intel's prior express written permission. No license under any patent, -* copyright or other intellectual property rights in the Material is granted to -* or conferred upon you, either expressly, by implication, inducement, estoppel -* or otherwise. -* Any license under such intellectual property rights must be express and -* approved by Intel in writing. +* +* Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved +* +* 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. */ /// @@ -23,7 +22,7 @@ /// #ifndef _XLINKDISPATCHER_H #define _XLINKDISPATCHER_H -#define _USBLINK_ENABLE_PRIVATE_INCLUDE_ +#define _XLINK_ENABLE_PRIVATE_INCLUDE_ #include "XLinkPrivateDefines.h" #ifdef __cplusplus @@ -47,7 +46,7 @@ struct dispatcherControlFunctions { int (*eventReceive) (xLinkEvent_t*); getRespFunction localGetResponse; getRespFunction remoteGetResponse; - void (*closeLink) (void* fd); + void (*closeLink) (void* fd, int fullClose); void (*resetDevice) (void* fd); }; @@ -58,4 +57,4 @@ int dispatcherStart(void* fd); } #endif -#endif +#endif \ No newline at end of file diff --git a/api/src/common/components/XLink/shared/XLinkPlatform.h b/api/src/common/components/XLink/shared/XLinkPlatform.h new file mode 100644 index 0000000..fef5be1 --- /dev/null +++ b/api/src/common/components/XLink/shared/XLinkPlatform.h @@ -0,0 +1,84 @@ +/* +* +* Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved +* +* 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. +*/ + +/// +/// @brief Application configuration Leon header +/// + +#ifndef _XLINK_USBLINKPLATFORM_H +#define _XLINK_USBLINKPLATFORM_H +#include +#ifdef __cplusplus +extern "C" +{ +#endif + +#define MAX_POOLS_ALLOC 32 +#define PACKET_LENGTH (64*1024) +//PCIe +#define PCIE_MAX_BUFFER_SIZE (255 * 4096) +#ifdef __PC__ +#define MAX_LINKS 16 +#else +#define MAX_LINKS 1 +#endif + +/* +heep this struc tduplicate for now. think of a different solution*/ +typedef enum{ + UsbVSC = 0, + UsbCDC, + Pcie, + Ipc, + protocols +} protocol_t; + +int XLinkWrite(void* fd, void* data, int size, unsigned int timeout); +int XLinkRead(void* fd, void* data, int size, unsigned int timeout); +int XLinkPlatformConnect(const char* devPathRead, + const char* devPathWrite, void** fd); +int XLinkPlatformInit(protocol_t protocol, int loglevel); + +int XLinkPlatformGetDeviceName(int index, + char* name, + int nameSize); +int XLinkPlatformGetDeviceNameExtended(int index, + char* name, + int nameSize, + int pid); + +int XLinkPlatformBootRemote(const char* deviceName, + const char* binaryPath); +int XLinkPlatformResetRemote(void* fd); + +void* allocateData(uint32_t size, uint32_t alignment); +void deallocateData(void* ptr,uint32_t size, uint32_t alignment); + +typedef enum usbLinkPlatformErrorCode { + X_LINK_PLATFORM_SUCCESS = 0, + X_LINK_PLATFORM_ERROR, + X_LINK_PLATFORM_DEVICE_NOT_FOUND, + X_LINK_PLATFORM_TIMEOUT +} usbLinkPlatformErrorCode_t; + +#ifdef __cplusplus +} +#endif + +#endif + +/* end of include file */ diff --git a/api/src/common/components/XLink/shared/XLinkPrivateDefines.h b/api/src/common/components/XLink/shared/XLinkPrivateDefines.h index c9e352d..a73d3c5 100644 --- a/api/src/common/components/XLink/shared/XLinkPrivateDefines.h +++ b/api/src/common/components/XLink/shared/XLinkPrivateDefines.h @@ -1,21 +1,19 @@ /* -* Copyright 2018 Intel Corporation. -* The source code, information and material ("Material") contained herein is -* owned by Intel Corporation or its suppliers or licensors, and title to such -* Material remains with Intel Corporation or its suppliers or licensors. -* The Material contains proprietary information of Intel or its suppliers and -* licensors. The Material is protected by worldwide copyright laws and treaty -* provisions. -* No part of the Material may be used, copied, reproduced, modified, published, -* uploaded, posted, transmitted, distributed or disclosed in any way without -* Intel's prior express written permission. No license under any patent, -* copyright or other intellectual property rights in the Material is granted to -* or conferred upon you, either expressly, by implication, inducement, estoppel -* or otherwise. -* Any license under such intellectual property rights must be express and -* approved by Intel in writing. +* +* Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved +* +* 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. */ - /// /// @file /// @@ -24,7 +22,7 @@ #ifndef _XLINKPRIVATEDEFINES_H #define _XLINKPRIVATEDEFINES_H -#ifdef _USBLINK_ENABLE_PRIVATE_INCLUDE_ +#ifdef _XLINK_ENABLE_PRIVATE_INCLUDE_ #include #if (defined(_WIN32) || defined(_WIN64)) @@ -32,8 +30,9 @@ #else #include #endif + #include -#include "UsbLinkPlatform.h" +#include "XLinkPlatform.h" #ifdef __cplusplus extern "C" @@ -41,11 +40,7 @@ extern "C" #endif #define MAX_NAME_LENGTH 16 -#ifdef USE_USB_VSC -#define HEADER_SIZE (64-12 -8) -#else #define HEADER_SIZE (64-12 -8) -#endif #define MAXIMUM_SEMAPHORES 32 #define __CACHE_LINE_SIZE 64 @@ -55,9 +50,9 @@ extern "C" typedef int32_t eventId_t; typedef enum { - USB_LINK_NOT_INIT, - USB_LINK_UP, - USB_LINK_DOWN, + XLINK_NOT_INIT, + XLINK_UP, + XLINK_DOWN, }xLinkState_t; typedef struct{ @@ -86,6 +81,7 @@ typedef struct{ //events which are coming from remote typedef enum { + /*USB related events*/ USB_WRITE_REQ, USB_READ_REQ, USB_READ_REL_REQ, @@ -94,7 +90,6 @@ typedef enum USB_PING_REQ, USB_RESET_REQ, USB_REQUEST_LAST, - //note that is important to separate request and response USB_WRITE_RESP, USB_READ_RESP, @@ -104,8 +99,28 @@ typedef enum USB_PING_RESP, USB_RESET_RESP, USB_RESP_LAST, - /*Add PCI-E related events at tail*/ + /*PCI-E related events*/ + PCIE_WRITE_REQ, + PCIE_READ_REQ, + PCIE_CREATE_STREAM_REQ, + PCIE_CLOSE_STREAM_REQ, + // + PCIE_WRITE_RESP, + PCIE_READ_RESP, + PCIE_CREATE_STREAM_RESP, + PCIE_CLOSE_STREAM_RESP, + + /*IPC related events*/ + IPC_WRITE_REQ, + IPC_READ_REQ, + IPC_CREATE_STREAM_REQ, + IPC_CLOSE_STREAM_REQ, + // + IPC_WRITE_RESP, + IPC_READ_RESP, + IPC_CREATE_STREAM_RESP, + IPC_CLOSE_STREAM_RESP, } xLinkEventType_t; typedef enum @@ -151,7 +166,7 @@ typedef struct xLinkEvent_t { } #endif -#endif /*_USBLINK_ENABLE_PRIVATE_INCLUDE_ end*/ +#endif /*_XLINK_ENABLE_PRIVATE_INCLUDE_ end*/ #endif /* end of include file */ diff --git a/api/src/common/components/XLink/shared/XLinkPublicDefines.h b/api/src/common/components/XLink/shared/XLinkPublicDefines.h index 19ab13d..5e691b0 100644 --- a/api/src/common/components/XLink/shared/XLinkPublicDefines.h +++ b/api/src/common/components/XLink/shared/XLinkPublicDefines.h @@ -1,21 +1,19 @@ /* -* Copyright 2018 Intel Corporation. -* The source code, information and material ("Material") contained herein is -* owned by Intel Corporation or its suppliers or licensors, and title to such -* Material remains with Intel Corporation or its suppliers or licensors. -* The Material contains proprietary information of Intel or its suppliers and -* licensors. The Material is protected by worldwide copyright laws and treaty -* provisions. -* No part of the Material may be used, copied, reproduced, modified, published, -* uploaded, posted, transmitted, distributed or disclosed in any way without -* Intel's prior express written permission. No license under any patent, -* copyright or other intellectual property rights in the Material is granted to -* or conferred upon you, either expressly, by implication, inducement, estoppel -* or otherwise. -* Any license under such intellectual property rights must be express and -* approved by Intel in writing. +* +* Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved +* +* 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. */ - /// /// @file /// @@ -29,7 +27,7 @@ extern "C" { #endif -#define USB_LINK_MAX_STREAMS 32 +#define XLINK_MAX_STREAMS 8 #define USB_LINK_MAX_PACKETS_PER_STREAM 64 typedef enum{ @@ -43,6 +41,14 @@ typedef enum{ X_LINK_ERROR } XLinkError_t; +typedef enum{ + USB_VSC = 0, + USB_CDC, + PCIE, + IPC, + NMB_OF_PROTOCOLS +} XLinkProtocol_t; + #define USB_LINK_INVALID_FD (-314) #define INVALID_STREAM_ID 0xDEADDEAD @@ -73,6 +79,7 @@ typedef struct XLinkGlobalHandler_t { int loglevel; int profEnable; + int protocol; XLinkProf_t profilingData; } XLinkGlobalHandler_t; diff --git a/api/src/common/components/XLink/shared/XLinkVersion.h b/api/src/common/components/XLink/shared/XLinkVersion.h index d6d5a69..abc1f61 100644 --- a/api/src/common/components/XLink/shared/XLinkVersion.h +++ b/api/src/common/components/XLink/shared/XLinkVersion.h @@ -1,24 +1,22 @@ /* -* Copyright 2018 Intel Corporation. -* The source code, information and material ("Material") contained herein is -* owned by Intel Corporation or its suppliers or licensors, and title to such -* Material remains with Intel Corporation or its suppliers or licensors. -* The Material contains proprietary information of Intel or its suppliers and -* licensors. The Material is protected by worldwide copyright laws and treaty -* provisions. -* No part of the Material may be used, copied, reproduced, modified, published, -* uploaded, posted, transmitted, distributed or disclosed in any way without -* Intel's prior express written permission. No license under any patent, -* copyright or other intellectual property rights in the Material is granted to -* or conferred upon you, either expressly, by implication, inducement, estoppel -* or otherwise. -* Any license under such intellectual property rights must be express and -* approved by Intel in writing. +* +* Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved +* +* 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. */ /// /// @file -/// /// @brief Application configuration Leon header /// diff --git a/api/src/common/components/XLinkConsole/pc/XLinkConsole.c b/api/src/common/components/XLinkConsole/pc/XLinkConsole.c index f15cefd..8e46f04 100644 --- a/api/src/common/components/XLinkConsole/pc/XLinkConsole.c +++ b/api/src/common/components/XLinkConsole/pc/XLinkConsole.c @@ -1,19 +1,18 @@ /* -* Copyright 2017 Intel Corporation. -* The source code, information and material ("Material") contained herein is -* owned by Intel Corporation or its suppliers or licensors, and title to such -* Material remains with Intel Corporation or its suppliers or licensors. -* The Material contains proprietary information of Intel or its suppliers and -* licensors. The Material is protected by worldwide copyright laws and treaty -* provisions. -* No part of the Material may be used, copied, reproduced, modified, published, -* uploaded, posted, transmitted, distributed or disclosed in any way without -* Intel's prior express written permission. No license under any patent, -* copyright or other intellectual property rights in the Material is granted to -* or conferred upon you, either expressly, by implication, inducement, estoppel -* or otherwise. -* Any license under such intellectual property rights must be express and -* approved by Intel in writing. +* +* Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved +* +* 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. */ #include diff --git a/api/src/common/components/XLinkConsole/pc/XLinkConsole.h b/api/src/common/components/XLinkConsole/pc/XLinkConsole.h index b2ae231..70d4dee 100644 --- a/api/src/common/components/XLinkConsole/pc/XLinkConsole.h +++ b/api/src/common/components/XLinkConsole/pc/XLinkConsole.h @@ -1,19 +1,18 @@ /* -* Copyright 2017 Intel Corporation. -* The source code, information and material ("Material") contained herein is -* owned by Intel Corporation or its suppliers or licensors, and title to such -* Material remains with Intel Corporation or its suppliers or licensors. -* The Material contains proprietary information of Intel or its suppliers and -* licensors. The Material is protected by worldwide copyright laws and treaty -* provisions. -* No part of the Material may be used, copied, reproduced, modified, published, -* uploaded, posted, transmitted, distributed or disclosed in any way without -* Intel's prior express written permission. No license under any patent, -* copyright or other intellectual property rights in the Material is granted to -* or conferred upon you, either expressly, by implication, inducement, estoppel -* or otherwise. -* Any license under such intellectual property rights must be express and -* approved by Intel in writing. +* +* Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved +* +* 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/api/src/common/shared/include/mvLog.h b/api/src/common/shared/include/mvLog.h index 77db60b..eb87287 100644 --- a/api/src/common/shared/include/mvLog.h +++ b/api/src/common/shared/include/mvLog.h @@ -1,19 +1,18 @@ /* -* Copyright 2017 Intel Corporation. -* The source code, information and material ("Material") contained herein is -* owned by Intel Corporation or its suppliers or licensors, and title to such -* Material remains with Intel Corporation or its suppliers or licensors. -* The Material contains proprietary information of Intel or its suppliers and -* licensors. The Material is protected by worldwide copyright laws and treaty -* provisions. -* No part of the Material may be used, copied, reproduced, modified, published, -* uploaded, posted, transmitted, distributed or disclosed in any way without -* Intel's prior express written permission. No license under any patent, -* copyright or other intellectual property rights in the Material is granted to -* or conferred upon you, either expressly, by implication, inducement, estoppel -* or otherwise. -* Any license under such intellectual property rights must be express and -* approved by Intel in writing. +* +* Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved +* +* 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/api/src/common/shared/include/mvMacros.h b/api/src/common/shared/include/mvMacros.h index a7e05a1..57c378e 100644 --- a/api/src/common/shared/include/mvMacros.h +++ b/api/src/common/shared/include/mvMacros.h @@ -1,19 +1,18 @@ /* -* Copyright 2017 Intel Corporation. -* The source code, information and material ("Material") contained herein is -* owned by Intel Corporation or its suppliers or licensors, and title to such -* Material remains with Intel Corporation or its suppliers or licensors. -* The Material contains proprietary information of Intel or its suppliers and -* licensors. The Material is protected by worldwide copyright laws and treaty -* provisions. -* No part of the Material may be used, copied, reproduced, modified, published, -* uploaded, posted, transmitted, distributed or disclosed in any way without -* Intel's prior express written permission. No license under any patent, -* copyright or other intellectual property rights in the Material is granted to -* or conferred upon you, either expressly, by implication, inducement, estoppel -* or otherwise. -* Any license under such intellectual property rights must be express and -* approved by Intel in writing. +* +* Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved +* +* 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/api/src/get_mvcmd.sh b/api/src/get_mvcmd.sh new file mode 100755 index 0000000..fc3ef61 --- /dev/null +++ b/api/src/get_mvcmd.sh @@ -0,0 +1,127 @@ +#! /bin/bash +# +# Attempt to download tar file to get firmware. +# If download fails, restores saved firmware if the NCSDK installed version in /opt/movidius matches NCSDK version of this distribution. +# If download fails and versions mismatch, then existing firmware isn't restored. +# + +# read in functions shared with installer +if [ -f ../../install-utilities.sh ] ; then + source ../../install-utilities.sh + # function initialize_constants() from install-utilities.sh + initialize_constants +else + echo "Warning cannot find file install-utilities.sh. Will exit." + exit 0 +fi + + +mvcmd_dir=./mvnc +mvcmd_old_dir=./mvnc.old + +VERSION_FILE="../../version.txt" +if [ ! -f ${VERSION_FILE} ] ; then + # see if local copy of version.txt + if [ -f ./version.txt ] ; then + VERSION_FILE="./version.txt" + else + echo -e "${RED}Error cannot find version file version.txt." + echo -e "Error on line $LINENO. Will exit ${NC}." + exit 1 + fi +fi +NCSDK_API_VERSION=$(cat ${VERSION_FILE}) +download_filename="NCSDK-${NCSDK_API_VERSION}.tar.gz" + + +function restore_old_fw() +{ + # remove the tar file if downloaded + [ -f ./${download_filename} ] && rm -rf ./${download_filename} + + # Require old FW to exist + if [ ! -d ${mvcmd_old_dir} ] ; then + echo "Error restoring old firmware - directory ${mvcmd_old_dir} doesn't exist. Will exit" + exit 1 + fi + + # Remove FW directory if it exists + [ -d ${mvcmd_dir} ] && rm -rf ${mvcmd_dir} + + # check version of installed NCSDK vs. version of API + NCSDK_installed_version_file="/opt/movidius/version.txt" + if [ -f ${NCSDK_installed_version_file} ] ; then + NCSDK_INSTALLED_VERSION=$(cat ${NCSDK_installed_version_file} ) + + # compare installed version with API + if [ "${NCSDK_API_VERSION}" = "${NCSDK_INSTALLED_VERSION}" ] ; then + mv -f ${mvcmd_old_dir} ${mvcmd_dir} + echo "Warning: Restored old firmware" + else + echo "Error: Old firmware version=${NCSDK_API_VERSION} doesn't match installed NCSDK version ${NCSDK_INSTALLED_VERSION}." + echo " Not restoring old firmware directory, ${mvcmd_old_dir}. Will exit" + exit 1 + fi + + else + echo "Warning: Cannot find NCSDK installed version file ${NCSDK_installed_version_file}." + mv -f ${mvcmd_old_dir} ${mvcmd_dir} + echo "Warning: Restored old firmware and exiting" + fi + + exit 0 +} + + +# If exists, rename existing FW +[ -d ${mvcmd_old_dir} ] && rm -rf ${mvcmd_old_dir} +[ -d ${mvcmd_dir} ] && mv -f ${mvcmd_dir} ${mvcmd_old_dir} + + +# download file if not already available +if [ -f ../../${download_filename} ] ; then + [ -f ${download_filename} ] && rm -f ${download_filename} + ln -s ../../${download_filename} . +else + # download, ncsdk_download_link set in install-utilities.sh function initialize_constants() + wget -q --no-cache -O ${download_filename} ${ncsdk_download_link} + if [ $? -ne 0 ]; then + echo "Error downloading $ncsdk_download_link. Will try to restore existing firmware" + restore_old_fw + fi +fi + +# ncsdk_pkg is the filename without the .tar.gz extension +ncsdk_pkg=${download_filename%%.tar.gz} + +# create mvnc directory +mkdir -p ${mvcmd_dir} + +# search for FW in tarball +ARCH=$(uname -m) +tar -tf ${download_filename} | grep -q "ncsdk-${ARCH}/fw/$" +if [ $? -ne 0 ] ; then + echo "Error firmware, ncsdk-${ARCH}/fw/, not found in tar file ${download_filename}. Will try to restore existing firmware" + restore_old_fw +fi + + +tar -xf ${download_filename} --strip-components=3 -C ${mvcmd_dir} NCSDK-${NCSDK_API_VERSION}/ncsdk-${ARCH}/fw/ +if [ $? -ne 0 ]; then + echo "Error extracting tar file ${download_filename}. Will try to restore existing firmware" + restore_old_fw +fi + +# check for FW +ls mvnc/*.mvcmd >& /dev/null +if [ $? -eq 0 ]; then + echo "NCSDK FW successfully installed" + # remove old FW dir if it exists + [ -d ${mvcmd_old_dir} ] && rm -rf ${mvcmd_old_dir} +else + echo "ERROR NCSDK FW not found after downloading. Will try to restore existing firmware" + restore_old_fw +fi + +# remove the tar file +rm -rf ${download_filename} diff --git a/api/src/mvnc_api.c b/api/src/mvnc_api.c index 290e98c..336a989 100644 --- a/api/src/mvnc_api.c +++ b/api/src/mvnc_api.c @@ -1,19 +1,18 @@ /* -* Copyright 2018 Intel Corporation. -* The source code, information and material ("Material") contained herein is -* owned by Intel Corporation or its suppliers or licensors, and title to such -* Material remains with Intel Corporation or its suppliers or licensors. -* The Material contains proprietary information of Intel or its suppliers and -* licensors. The Material is protected by worldwide copyright laws and treaty -* provisions. -* No part of the Material may be used, copied, reproduced, modified, published, -* uploaded, posted, transmitted, distributed or disclosed in any way without -* Intel's prior express written permission. No license under any patent, -* copyright or other intellectual property rights in the Material is granted to -* or conferred upon you, either expressly, by implication, inducement, estoppel -* or otherwise. -* Any license under such intellectual property rights must be express and -* approved by Intel in writing. +* +* Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved +* +* 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. */ #define _GNU_SOURCE @@ -293,11 +292,12 @@ static void initialize() initialize_loglevel(); initialized = 1; + ghandler.protocol = 0; int sc = XLinkInitialize(&ghandler); //need to be called once if (sc != X_LINK_SUCCESS) { mvLog(MVLOG_ERROR, "Initialization failed\n"); } -#ifndef XLINK_NO_BOOT +#ifndef XLINK_NO_RESET resetAll(); #endif } @@ -320,7 +320,16 @@ ncStatus_t ncDeviceCreate(int index, struct ncDeviceHandle_t **deviceHandle) if (!initialized) initialize(); +#if (defined(_WIN32) || defined(_WIN64)) + index -= deviceGetNumberOfDevices(); + if (index < 0) { + mvLog(MVLOG_ERROR, "Invalid create index"); + return NC_INVALID_PARAMETERS; + } + XLinkError_t rc = XLinkGetDeviceNameExtended(index, name, NC_MAX_NAME_SIZE, -1); //pid== -1 is an indicator to let lower usb layer know how to exclude vsc devices +#else XLinkError_t rc = XLinkGetDeviceName(index, name, NC_MAX_NAME_SIZE); +#endif pthread_mutex_unlock(&globalMutex); if (rc == X_LINK_SUCCESS) { @@ -445,6 +454,19 @@ static ncStatus_t deviceGetDeviceMemory(struct _devicePrivate_t *d, return NC_OK; } +static int deviceGetNumberOfDevices() +{ + int num = 0; + + struct _devicePrivate_t *d = devices; + while (d) { + num++; + d = d->next; + } + return num; +} + + static int isDeviceOpened(const char *name) { struct _devicePrivate_t *d = devices; @@ -506,6 +528,10 @@ ncStatus_t ncDeviceOpen(struct ncDeviceHandle_t * deviceHandle) else mvLog(MVLOG_INFO, "%s() XLinkBootRemote returned success %d\n", __func__, rc); +#if (defined(_WIN32) || defined(_WIN64) ) + usleep(2000000); +#endif + double waittm = timeInSeconds() + STATUS_WAIT_TIMEOUT; while (timeInSeconds() < waittm && rc == 0) { XLinkHandler_t *handler = calloc(1, sizeof(XLinkHandler_t)); @@ -520,6 +546,11 @@ ncStatus_t ncDeviceOpen(struct ncDeviceHandle_t * deviceHandle) rc = XLinkGetDeviceName(count, name2, NC_MAX_NAME_SIZE); if (rc != X_LINK_SUCCESS) break; + if (isDeviceOpened(name2) == 0) + { + count++; + continue; + } handler->devicePath = (char *) name2; rc = XLinkConnect(handler); if (isDeviceOpened(name2) < 0 && rc == X_LINK_SUCCESS) { @@ -551,7 +582,7 @@ ncStatus_t ncDeviceOpen(struct ncDeviceHandle_t * deviceHandle) mvLog(MVLOG_INFO, "Booted %s -> %s\n", d->dev_addr, d->dev_file ? d->dev_file : "VSC"); pthread_mutex_unlock(&globalMutex); - sleep(1); //Allow device to initialize the XLink + usleep(1000000); //Allow device to initialize the XLink streamId_t streamId = XLinkOpenStream(d->usb_link->linkId, "deviceMonitor", CONFIG_STREAM_SIZE); if (streamId == INVALID_STREAM_ID) { @@ -559,8 +590,10 @@ ncStatus_t ncDeviceOpen(struct ncDeviceHandle_t * deviceHandle) return NC_ERROR; } d->device_mon_stream_id = streamId; - getDevAttributes(d); - + if (getDevAttributes(d)){ + mvLog(MVLOG_WARN, "getDevAttributes failed!\n"); + return NC_ERROR; + } streamId = XLinkOpenStream(d->usb_link->linkId, "graphMonitor", BLOB_STREAM_SIZE); @@ -785,9 +818,12 @@ ncStatus_t ncDeviceClose(struct ncDeviceHandle_t * deviceHandle) XLinkCloseStream(d->graph_monitor_stream_id); d->device_mon_stream_id = INVALID_LINK_ID; d->graph_monitor_stream_id = INVALID_LINK_ID; - +#ifndef XLINK_NO_RESET // Reset XLinkResetRemote(d->usb_link->linkId); +#else + XLinkDisconnect(d->usb_link->linkId); +#endif // usblink_resetmyriad(d->usb_link); // usblink_close(d->usb_link); @@ -932,13 +968,9 @@ ncStatus_t ncGraphAllocate(struct ncDeviceHandle_t * deviceHandle, static int graphIdCount = 0; struct _graphPrivate_t *g = graphHandle->private_data; - struct _devicePrivate_t *d = devices; - if (graphBufferLength > d->dev_attr.max_memory) { - mvLog(MVLOG_ERROR, "The graph file is bigger than the device memory"); - return NC_OUT_OF_MEMORY; - } - pthread_mutex_lock(&globalMutex); + + struct _devicePrivate_t *d = devices; while (d) { if (d == deviceHandle->private_data) break; @@ -952,6 +984,11 @@ ncStatus_t ncGraphAllocate(struct ncDeviceHandle_t * deviceHandle, } pthread_mutex_unlock(&globalMutex); + if (graphBufferLength > d->dev_attr.max_memory) { + mvLog(MVLOG_ERROR, "The graph file is bigger than the device memory"); + return NC_OUT_OF_MEMORY; + } + g->id = graphIdCount++; streamId_t streamId; @@ -2694,6 +2731,10 @@ ncStatus_t ncFifoReadElem(struct ncFifoHandle_t * fifoHandle, void *outputData, } XLinkReleaseData(handle->streamId); } + else{ + mvLog(MVLOG_ERROR, "Failed to read fifo element\n"); + return NC_ERROR; + } //As user should see an API read to be the same as Graph read, we need to wirte the element in 2 queues. //if we read it here, we will need to remove the element on the device side diff --git a/api/src/version.txt b/api/src/version.txt index 2e86a85..06e618d 100644 --- a/api/src/version.txt +++ b/api/src/version.txt @@ -1 +1 @@ -2.05.00.02 +2.08.01.02 diff --git a/docs/docker.html b/docs/docker.html index 619ffb8..b8c8408 100644 --- a/docs/docker.html +++ b/docs/docker.html @@ -528,61 +528,95 @@

Other Operating Systems

These instructions can be done in an Ubuntu virtual machine.

-

Create a Docker container for the NCSDK

+

Non-privileged Docker Containers

+

Versions of the NCSDK prior to 2.08 required that the docker run command was issued with the –privileged flag. This is due to the way the NCS device boots and loads its firmware. +If you are OK with running your docker container with the –privileged flag you can skip this section and follow the instructions in the Privileged Docker Containers section below. +If you want to run as docker in a non-privileged container then follow the instructions in this section.

+ +

There are a few concepts to be aware of when using NCS devices in a non-privileged docker container. In this mode the NCAPI libraries within the docker container must be rebuilt with NO_BOOT=yes NO_RESET=yes flags to prevent the API from rebooting/resetting the NCS devices. The provide docker_cmd.sh script takes care of this for you. Also, since the API isn’t booting the devices and loading the firmware this must be done prior to running an application that uses the devices and prior to starting the docker container. There is a seperate program provided that does this called ncs_boot_devices. +When starting the docker container the USB device name must be passed to the container with the –device flag. The device name is not static, it changes over time so the docker_cmd.sh script also handles this.

+ +

To make it easier to navigate the concepts above the following instructions can be followed.

+ +

1. Create a Docker Image for the NCSDK to run in Non-privileged Mode

+

The provided docker file Dockerfile_NoPreviligeAccess will be used create a docker image named ‘ncsdk’ when you follow the commands below. +You must have already cloned the ncsdk repository and should be in the top level directory named ncsdk. Note if you want to use a specific branch of the repository be sure to do git checkout for the desired branch. +After these commands are successfully executed, the docker image will contain the ncsdk and the NCAPI will have been compiled with the appropriate flags (NO_BOOT=yes and NO_RESET=yes.) within the image.

+
$ cd <NCSDK installation directory>
+$ docker build -t ncsdk -f ./extras/docker/Dockerfile_NoPreviligeAccess .
+
+ +

2. Prepare NCS Devices for Use Within the Non-privileged Container

+

Run the following commands to build and run the ncs_boot_devices program which loads the device firmware.

+
$cd <NCSDK installation path>/extras/docker/ncs_boot_devices
 
-

We have provided a Dockerfile to build an Ubuntu-based Docker image that has the NCSDK installed.

+$ #The path to api src directory is typically "../../../api/src" +$ export MVNC_API_PATH=<path to api src > -

1. Build the Docker image

+$ make ncs_boot_devices -

This command will create an image named ‘ncsdk’.

+$ #Make sure all NCS devices are plugged into the host system at this point +$ #Run the program to boot the devices and load the firmware +$ make run +
-
$ docker build -t ncsdk -f ./extras/docker/Dockerfile https://github.com/movidius/ncsdk.git#ncsdk2
+

3. Run the Non-privileged Docker Container.

+

The provided docker_cmd.sh script will run the docker container for you with appropriate –device parameters.

+
$ #Now the devices in the system have been booted with correct firmware.
+$ #Start the docker container with correct --device parameters
+$ cd <NCSDK installation path>/extras/docker
+$ ./docker_cmd.sh
 
-

This may take some time as the NCSDK is installed and dependencies are built.

+

Privileged Docker Containers

+

The simplest way to use the NCS within a docker container is to do it from a container thats running with the –privileged flag. This is not always desirable however, so if you would rather run in a non-privileged container see the Non-privileged Docker Containers section above.

+ +

1. Create a Docker Image for the NCSDK to Run in Privileged Mode

-

If you have already cloned the ncsdk repo, you can instead execute this build command from within the ncsdk directory in the ncsdk2 branch:

+

We have provided a Dockerfile to build an Ubuntu-based Docker image that has the NCSDK installed. This command will create an image named ‘ncsdk’. +You must have already cloned the ncsdk repository and should be in the top level directory named ncsdk. Note if you want to use a specific branch of the repository be sure to do git checkout for the desired branch.

-
$ docker build -t ncsdk -f ./extras/docker/Dockerfile .
+
$ cd <NCSDK installation directory>
+$ docker build -t ncsdk -f ./extras/docker/Dockerfile .
 
-

2. Create and run a Docker container from the built image

+

2. Create and Run a Privileged Docker container from the Built Image

This command will create a container named ‘ncsdk’.

$ docker run --net=host --privileged -v /dev:/dev --name ncsdk -i -t ncsdk /bin/bash
 
-

The elevated permissions are necessary for the USB access required by the neural compute device. Additional run options can be seen here. See the instructions above if you need to configure your Docker container to run behind a proxy.

+

The elevated permissions required via –privileged are necessary for the USB access required by the neural compute device unless following the non-privileged instructions above.

+ +

Use your NCSDK container

+ +

Starting the container

+

The Docker run command creates a new container instance each time that is used. If you want to use your existing container, use the start command. +(Note: The container is named ‘ncsdk’ when following both the privileged and non-privileged instructions above.)

-

3. Build examples (optional)

+
    +
  • +
    docker start -a -i ncsdk
    +
    +
  • +
+ +

Build NCSDK examples (optional)

You must have a neural compute device connected to a USB port in your host system when running this command. This command is executed inside of your Docker container.

$ make examples
 
-

4. Exit the container

+

Exit the container

This command is executed inside of your Docker container.

$ exit
 
-

Use your NCSDK container

- -

Starting the container

-

The Docker run command creates a new container instance each time that is used. If you want to use your existing container, use the start command. -(Note: We named the container ‘ncsdk’ in the run command above.)

- -
    -
  • -
    docker start -a -i ncsdk
    -
    -
  • -
- -

Other useful Docker commands

+

Other useful Docker commands

These commands are executed from your host terminal, not from inside the Docker container.

@@ -637,6 +671,8 @@

Other useful Docker commands

docker commit CONTAINER_ID [REPOSITORY_NAME[:TAG]]
 
+

Additional run options can be seen here. See the instructions above if you need to configure your Docker container to run behind a proxy.

+
diff --git a/docs/images/favicon.ico b/docs/images/favicon.ico index 91698741b95a5647f4393b975847deccbf2d44a7..1c42e657824a0184c50cd6b33ca205cde9de232e 100755 GIT binary patch literal 1150 zcmd5)-Ahwp7=NSgx)~&OBQ`21un5zbLRVb{T@-}$VRaE9ir6+qE!iRzw9-U{jfBc_ zZu6tLovp3rM$S#$B+r&@bNR8<8k+qRzn=5jv4+)U^d6q`ywC6bJsj^(3Tb{BY9Ws&iVP(>S)yOcu&IPcs6vm%s zP6wXCcdrC?jS_-d36HK2-n%L|s&etNJO@rq9^Cc$n0Zl+%&aG?&QjnR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n{>BRtrLuy9$%vh|uN5wju z%&PSIg}p4T&Usnt0#WN&jIr?jj OmbSVcFifo Functions diff --git a/docs/ncapi/ncapi2/c_api/ncDeviceCreate.html b/docs/ncapi/ncapi2/c_api/ncDeviceCreate.html index 66c58c9..0671278 100644 --- a/docs/ncapi/ncapi2/c_api/ncDeviceCreate.html +++ b/docs/ncapi/ncapi2/c_api/ncDeviceCreate.html @@ -419,6 +419,62 @@ Fifo Functions diff --git a/docs/ncapi/ncapi2/c_api/ncDeviceDestroy.html b/docs/ncapi/ncapi2/c_api/ncDeviceDestroy.html index e4550e8..5bd2aeb 100644 --- a/docs/ncapi/ncapi2/c_api/ncDeviceDestroy.html +++ b/docs/ncapi/ncapi2/c_api/ncDeviceDestroy.html @@ -419,6 +419,62 @@ Fifo Functions diff --git a/docs/ncapi/ncapi2/c_api/ncDeviceGetOption.html b/docs/ncapi/ncapi2/c_api/ncDeviceGetOption.html index 5d06784..54181e3 100644 --- a/docs/ncapi/ncapi2/c_api/ncDeviceGetOption.html +++ b/docs/ncapi/ncapi2/c_api/ncDeviceGetOption.html @@ -419,6 +419,62 @@ Fifo Functions diff --git a/docs/ncapi/ncapi2/c_api/ncDeviceHandle_t.html b/docs/ncapi/ncapi2/c_api/ncDeviceHandle_t.html index c72b412..cf81631 100644 --- a/docs/ncapi/ncapi2/c_api/ncDeviceHandle_t.html +++ b/docs/ncapi/ncapi2/c_api/ncDeviceHandle_t.html @@ -419,6 +419,62 @@ Fifo Functions diff --git a/docs/ncapi/ncapi2/c_api/ncDeviceHwVersion_t.html b/docs/ncapi/ncapi2/c_api/ncDeviceHwVersion_t.html index 280c214..c2705c6 100644 --- a/docs/ncapi/ncapi2/c_api/ncDeviceHwVersion_t.html +++ b/docs/ncapi/ncapi2/c_api/ncDeviceHwVersion_t.html @@ -419,6 +419,62 @@ Fifo Functions diff --git a/docs/ncapi/ncapi2/c_api/ncDeviceOpen.html b/docs/ncapi/ncapi2/c_api/ncDeviceOpen.html index 195589f..244e41a 100644 --- a/docs/ncapi/ncapi2/c_api/ncDeviceOpen.html +++ b/docs/ncapi/ncapi2/c_api/ncDeviceOpen.html @@ -419,6 +419,62 @@ Fifo Functions diff --git a/docs/ncapi/ncapi2/c_api/ncDeviceOption_t.html b/docs/ncapi/ncapi2/c_api/ncDeviceOption_t.html index 33f175d..3fbc7bd 100644 --- a/docs/ncapi/ncapi2/c_api/ncDeviceOption_t.html +++ b/docs/ncapi/ncapi2/c_api/ncDeviceOption_t.html @@ -419,6 +419,62 @@ Fifo Functions diff --git a/docs/ncapi/ncapi2/c_api/ncDeviceSetOption.html b/docs/ncapi/ncapi2/c_api/ncDeviceSetOption.html index 8c490aa..1b20fdf 100644 --- a/docs/ncapi/ncapi2/c_api/ncDeviceSetOption.html +++ b/docs/ncapi/ncapi2/c_api/ncDeviceSetOption.html @@ -419,6 +419,62 @@ Fifo Functions diff --git a/docs/ncapi/ncapi2/c_api/ncDeviceState_t.html b/docs/ncapi/ncapi2/c_api/ncDeviceState_t.html index e73debc..937f24f 100644 --- a/docs/ncapi/ncapi2/c_api/ncDeviceState_t.html +++ b/docs/ncapi/ncapi2/c_api/ncDeviceState_t.html @@ -419,6 +419,62 @@ Fifo Functions diff --git a/docs/ncapi/ncapi2/c_api/ncFifoAllocate.html b/docs/ncapi/ncapi2/c_api/ncFifoAllocate.html index d6c9d50..86a6ae5 100644 --- a/docs/ncapi/ncapi2/c_api/ncFifoAllocate.html +++ b/docs/ncapi/ncapi2/c_api/ncFifoAllocate.html @@ -419,6 +419,62 @@ Fifo Functions diff --git a/docs/ncapi/ncapi2/c_api/ncFifoCreate.html b/docs/ncapi/ncapi2/c_api/ncFifoCreate.html index 36fe837..89cf5a1 100644 --- a/docs/ncapi/ncapi2/c_api/ncFifoCreate.html +++ b/docs/ncapi/ncapi2/c_api/ncFifoCreate.html @@ -419,6 +419,62 @@ Fifo Functions diff --git a/docs/ncapi/ncapi2/c_api/ncFifoDataType_t.html b/docs/ncapi/ncapi2/c_api/ncFifoDataType_t.html index 150ee96..b556afa 100644 --- a/docs/ncapi/ncapi2/c_api/ncFifoDataType_t.html +++ b/docs/ncapi/ncapi2/c_api/ncFifoDataType_t.html @@ -419,6 +419,62 @@ Fifo Functions diff --git a/docs/ncapi/ncapi2/c_api/ncFifoDestroy.html b/docs/ncapi/ncapi2/c_api/ncFifoDestroy.html index 50b0203..3c650f1 100644 --- a/docs/ncapi/ncapi2/c_api/ncFifoDestroy.html +++ b/docs/ncapi/ncapi2/c_api/ncFifoDestroy.html @@ -419,6 +419,62 @@ Fifo Functions diff --git a/docs/ncapi/ncapi2/c_api/ncFifoGetOption.html b/docs/ncapi/ncapi2/c_api/ncFifoGetOption.html index c8f265b..f67a3a9 100644 --- a/docs/ncapi/ncapi2/c_api/ncFifoGetOption.html +++ b/docs/ncapi/ncapi2/c_api/ncFifoGetOption.html @@ -419,6 +419,62 @@ Fifo Functions diff --git a/docs/ncapi/ncapi2/c_api/ncFifoHandle_t.html b/docs/ncapi/ncapi2/c_api/ncFifoHandle_t.html index 649b614..f326725 100644 --- a/docs/ncapi/ncapi2/c_api/ncFifoHandle_t.html +++ b/docs/ncapi/ncapi2/c_api/ncFifoHandle_t.html @@ -419,6 +419,62 @@ Fifo Functions diff --git a/docs/ncapi/ncapi2/c_api/ncFifoOption_t.html b/docs/ncapi/ncapi2/c_api/ncFifoOption_t.html index 0bdfa79..bf843de 100644 --- a/docs/ncapi/ncapi2/c_api/ncFifoOption_t.html +++ b/docs/ncapi/ncapi2/c_api/ncFifoOption_t.html @@ -419,6 +419,62 @@ Fifo Functions diff --git a/docs/ncapi/ncapi2/c_api/ncFifoReadElem.html b/docs/ncapi/ncapi2/c_api/ncFifoReadElem.html index bcba571..69f1d13 100644 --- a/docs/ncapi/ncapi2/c_api/ncFifoReadElem.html +++ b/docs/ncapi/ncapi2/c_api/ncFifoReadElem.html @@ -419,6 +419,62 @@ Fifo Functions diff --git a/docs/ncapi/ncapi2/c_api/ncFifoRemoveElem.html b/docs/ncapi/ncapi2/c_api/ncFifoRemoveElem.html index ffbc72b..eedc403 100644 --- a/docs/ncapi/ncapi2/c_api/ncFifoRemoveElem.html +++ b/docs/ncapi/ncapi2/c_api/ncFifoRemoveElem.html @@ -419,6 +419,62 @@ Fifo Functions diff --git a/docs/ncapi/ncapi2/c_api/ncFifoSetOption.html b/docs/ncapi/ncapi2/c_api/ncFifoSetOption.html index 3fb3126..f44b826 100644 --- a/docs/ncapi/ncapi2/c_api/ncFifoSetOption.html +++ b/docs/ncapi/ncapi2/c_api/ncFifoSetOption.html @@ -419,6 +419,62 @@ Fifo Functions diff --git a/docs/ncapi/ncapi2/c_api/ncFifoState_t.html b/docs/ncapi/ncapi2/c_api/ncFifoState_t.html index f6b58f7..ec8b3e8 100644 --- a/docs/ncapi/ncapi2/c_api/ncFifoState_t.html +++ b/docs/ncapi/ncapi2/c_api/ncFifoState_t.html @@ -419,6 +419,62 @@ Fifo Functions diff --git a/docs/ncapi/ncapi2/c_api/ncFifoType_t.html b/docs/ncapi/ncapi2/c_api/ncFifoType_t.html index a4c143f..91d93b6 100644 --- a/docs/ncapi/ncapi2/c_api/ncFifoType_t.html +++ b/docs/ncapi/ncapi2/c_api/ncFifoType_t.html @@ -419,6 +419,62 @@ Fifo Functions diff --git a/docs/ncapi/ncapi2/c_api/ncFifoWriteElem.html b/docs/ncapi/ncapi2/c_api/ncFifoWriteElem.html index dda5f5b..014adf0 100644 --- a/docs/ncapi/ncapi2/c_api/ncFifoWriteElem.html +++ b/docs/ncapi/ncapi2/c_api/ncFifoWriteElem.html @@ -419,6 +419,62 @@ Fifo Functions diff --git a/docs/ncapi/ncapi2/c_api/ncGlobalGetOption.html b/docs/ncapi/ncapi2/c_api/ncGlobalGetOption.html index 52be55f..d922608 100644 --- a/docs/ncapi/ncapi2/c_api/ncGlobalGetOption.html +++ b/docs/ncapi/ncapi2/c_api/ncGlobalGetOption.html @@ -419,6 +419,62 @@ Fifo Functions diff --git a/docs/ncapi/ncapi2/c_api/ncGlobalOption_t.html b/docs/ncapi/ncapi2/c_api/ncGlobalOption_t.html index 2519baa..c311d65 100644 --- a/docs/ncapi/ncapi2/c_api/ncGlobalOption_t.html +++ b/docs/ncapi/ncapi2/c_api/ncGlobalOption_t.html @@ -419,6 +419,62 @@ Fifo Functions diff --git a/docs/ncapi/ncapi2/c_api/ncGlobalSetOption.html b/docs/ncapi/ncapi2/c_api/ncGlobalSetOption.html index 35256d6..58e232b 100644 --- a/docs/ncapi/ncapi2/c_api/ncGlobalSetOption.html +++ b/docs/ncapi/ncapi2/c_api/ncGlobalSetOption.html @@ -419,6 +419,62 @@ Fifo Functions diff --git a/docs/ncapi/ncapi2/c_api/ncGraphAllocate.html b/docs/ncapi/ncapi2/c_api/ncGraphAllocate.html index 9e590a0..007a27a 100644 --- a/docs/ncapi/ncapi2/c_api/ncGraphAllocate.html +++ b/docs/ncapi/ncapi2/c_api/ncGraphAllocate.html @@ -419,6 +419,62 @@ Fifo Functions diff --git a/docs/ncapi/ncapi2/c_api/ncGraphAllocateWithFifos.html b/docs/ncapi/ncapi2/c_api/ncGraphAllocateWithFifos.html index 96c1c2e..de33e44 100644 --- a/docs/ncapi/ncapi2/c_api/ncGraphAllocateWithFifos.html +++ b/docs/ncapi/ncapi2/c_api/ncGraphAllocateWithFifos.html @@ -419,6 +419,62 @@ Fifo Functions diff --git a/docs/ncapi/ncapi2/c_api/ncGraphAllocateWithFifosEx.html b/docs/ncapi/ncapi2/c_api/ncGraphAllocateWithFifosEx.html index e680aee..09dd16d 100644 --- a/docs/ncapi/ncapi2/c_api/ncGraphAllocateWithFifosEx.html +++ b/docs/ncapi/ncapi2/c_api/ncGraphAllocateWithFifosEx.html @@ -419,6 +419,62 @@ Fifo Functions diff --git a/docs/ncapi/ncapi2/c_api/ncGraphCreate.html b/docs/ncapi/ncapi2/c_api/ncGraphCreate.html index 2a1622e..a2598b5 100644 --- a/docs/ncapi/ncapi2/c_api/ncGraphCreate.html +++ b/docs/ncapi/ncapi2/c_api/ncGraphCreate.html @@ -419,6 +419,62 @@ Fifo Functions diff --git a/docs/ncapi/ncapi2/c_api/ncGraphDestroy.html b/docs/ncapi/ncapi2/c_api/ncGraphDestroy.html index 70b6cab..139eed6 100644 --- a/docs/ncapi/ncapi2/c_api/ncGraphDestroy.html +++ b/docs/ncapi/ncapi2/c_api/ncGraphDestroy.html @@ -419,6 +419,62 @@ Fifo Functions diff --git a/docs/ncapi/ncapi2/c_api/ncGraphGetOption.html b/docs/ncapi/ncapi2/c_api/ncGraphGetOption.html index 6f9e791..852f32a 100644 --- a/docs/ncapi/ncapi2/c_api/ncGraphGetOption.html +++ b/docs/ncapi/ncapi2/c_api/ncGraphGetOption.html @@ -419,6 +419,62 @@ Fifo Functions diff --git a/docs/ncapi/ncapi2/c_api/ncGraphHandle_t.html b/docs/ncapi/ncapi2/c_api/ncGraphHandle_t.html index d17efd5..52b98eb 100644 --- a/docs/ncapi/ncapi2/c_api/ncGraphHandle_t.html +++ b/docs/ncapi/ncapi2/c_api/ncGraphHandle_t.html @@ -419,6 +419,62 @@ Fifo Functions diff --git a/docs/ncapi/ncapi2/c_api/ncGraphOption_t.html b/docs/ncapi/ncapi2/c_api/ncGraphOption_t.html index 74c3005..281f2c4 100644 --- a/docs/ncapi/ncapi2/c_api/ncGraphOption_t.html +++ b/docs/ncapi/ncapi2/c_api/ncGraphOption_t.html @@ -419,6 +419,62 @@ Fifo Functions diff --git a/docs/ncapi/ncapi2/c_api/ncGraphQueueInference.html b/docs/ncapi/ncapi2/c_api/ncGraphQueueInference.html index fdfa1f9..e11b45a 100644 --- a/docs/ncapi/ncapi2/c_api/ncGraphQueueInference.html +++ b/docs/ncapi/ncapi2/c_api/ncGraphQueueInference.html @@ -419,6 +419,62 @@ Fifo Functions diff --git a/docs/ncapi/ncapi2/c_api/ncGraphQueueInferenceWithFifoElem.html b/docs/ncapi/ncapi2/c_api/ncGraphQueueInferenceWithFifoElem.html index 19293f4..2f8e832 100644 --- a/docs/ncapi/ncapi2/c_api/ncGraphQueueInferenceWithFifoElem.html +++ b/docs/ncapi/ncapi2/c_api/ncGraphQueueInferenceWithFifoElem.html @@ -419,6 +419,62 @@ Fifo Functions diff --git a/docs/ncapi/ncapi2/c_api/ncGraphSetOption.html b/docs/ncapi/ncapi2/c_api/ncGraphSetOption.html index a1e2092..f3901f0 100644 --- a/docs/ncapi/ncapi2/c_api/ncGraphSetOption.html +++ b/docs/ncapi/ncapi2/c_api/ncGraphSetOption.html @@ -419,6 +419,62 @@ Fifo Functions diff --git a/docs/ncapi/ncapi2/c_api/ncGraphState_t.html b/docs/ncapi/ncapi2/c_api/ncGraphState_t.html index cdbb2d9..9ec9bd7 100644 --- a/docs/ncapi/ncapi2/c_api/ncGraphState_t.html +++ b/docs/ncapi/ncapi2/c_api/ncGraphState_t.html @@ -419,6 +419,62 @@ Fifo Functions diff --git a/docs/ncapi/ncapi2/c_api/ncLogLevel_t.html b/docs/ncapi/ncapi2/c_api/ncLogLevel_t.html index 5d45033..2817799 100755 --- a/docs/ncapi/ncapi2/c_api/ncLogLevel_t.html +++ b/docs/ncapi/ncapi2/c_api/ncLogLevel_t.html @@ -417,6 +417,62 @@ Fifo Functions diff --git a/docs/ncapi/ncapi2/c_api/ncStatus_t.html b/docs/ncapi/ncapi2/c_api/ncStatus_t.html index ffca7db..fb17005 100644 --- a/docs/ncapi/ncapi2/c_api/ncStatus_t.html +++ b/docs/ncapi/ncapi2/c_api/ncStatus_t.html @@ -419,6 +419,62 @@ Fifo Functions diff --git a/docs/ncapi/ncapi2/c_api/ncTensorDescriptor_t.html b/docs/ncapi/ncapi2/c_api/ncTensorDescriptor_t.html index 519f4b4..42f48de 100644 --- a/docs/ncapi/ncapi2/c_api/ncTensorDescriptor_t.html +++ b/docs/ncapi/ncapi2/c_api/ncTensorDescriptor_t.html @@ -419,6 +419,62 @@ Fifo Functions diff --git a/docs/ncapi/ncapi2/c_api/readme.html b/docs/ncapi/ncapi2/c_api/readme.html index 53a1cd8..be90bf0 100644 --- a/docs/ncapi/ncapi2/c_api/readme.html +++ b/docs/ncapi/ncapi2/c_api/readme.html @@ -419,6 +419,62 @@ Fifo Functions diff --git a/docs/ncapi/ncapi2/py_api/FifoOption.html b/docs/ncapi/ncapi2/py_api/FifoOption.html index 381290e..21fb437 100644 --- a/docs/ncapi/ncapi2/py_api/FifoOption.html +++ b/docs/ncapi/ncapi2/py_api/FifoOption.html @@ -619,7 +619,7 @@

class FifoOption(enum.Enum)

RO_WRITE_FILL_LEVEL int Unbounded positive int - The number of tensors (Fifo elements0 in the queue for a writable Fifo. + The number of tensors (Fifo elements) in the queue for a writable Fifo. RO_GRAPH_TENSOR_DESCRIPTOR diff --git a/docs/release_notes.html b/docs/release_notes.html index 6490771..73ac976 100644 --- a/docs/release_notes.html +++ b/docs/release_notes.html @@ -496,21 +496,24 @@

============================================================

Movidius Neural Compute SDK Release Notes

-

V2.05.00 2018-06-07

+

V2.08.01 2018-10-04

============================================================

+

This release has been refactored and is now licensed under Apache 2.0 license.

+

As of V2.05.00, SDK has been refactored and contains many new features and structural changes. It is recommended you read the documentation to familiarize with the new features and contents.

SDK Notes:

New features:

    -
  1. Tensorflow 1.7 supported. Tensorflow 1.7 is automatically installed on Ubuntu.
  2. +
  3. Tensorflow 1.09 supported. Tensorflow 1.09 is automatically installed on Ubuntu.
  4. +
  5. The compiler has been refactored for best performance however some networks may still see slight performance degradation.

Networks:

    -
  1. No change
  2. +
  3. No significant changes.

Layers:

@@ -538,10 +541,11 @@

Caffe

  • VGG 16 (Configuration D)
  • Resnet 18
  • Resnet 50
  • +
  • Mobilenet v1
  • SSD Mobilenet v1
  • -

    Tensorflow r1.6

    +

    Tensorflow r1.09

    1. inception-v1
    2. inception-v2
    3. @@ -570,14 +574,14 @@

      Tensorflow r1.6

    4. TinyYolo v2 via Darkflow tranformation
    5. +
    6. facenet based on inception-resnet-v1

    Firmware Features:

    1. Convolutions
        -
      • NxN Convolution with Stride S.
      • -
      • The following cases have been extensively tested: 1x1s1,3x3s1,5x5s1,7x7s1, 7x7s2, 7x7s4
      • +
      • The following convolution cases have been extensively tested (for stride s): 1x1s1, 3x3s1, 5x5s1, 7x7s1, 7x7s2, 7x7s4, 1x3, 3x1, 1x7, 7x1
      • Group convolution
      • Depth Convolution
      • Dilated convolution
      • @@ -586,10 +590,10 @@

        Firmware Features:

      • Max Pooling Radix NxM with Stride S
      • Average Pooling: Radix NxM with Stride S, Global average pooling
      • Local Response Normalization
      • -
      • Relu, Relu-X, Prelu (see erattum #10)
      • +
      • Relu, Relu-X, Prelu (see erratum #09)
      • Softmax
      • Sigmoid
      • -
      • Tanh (see erratum #10)
      • +
      • Tanh (see erratum #09)
      • Deconvolution
      • Slice
      • Scale
      • @@ -607,7 +611,7 @@

        Firmware Features:

        Bug Fixes:

          -
        1. Fixed: Facenet and other network regression due to TensorFlow 1.7 changes.
        2. +
        3. Fixed: Various profiler issues.

        Errata:

        @@ -616,19 +620,21 @@

        Errata:

      • Depth-wise convolution may not be supported if channel multiplier > 1.
      • If working behind proxy, proper proxy settings must be applied for the installer to succeed.
      • Although improved, the installer is known to take a long time on Raspberry Pi. Date/time must be correct for SDK installation to succeed on Raspberry Pi.
      • -
      • Default system virtual memory swap file size is too small to compile AlexNet, and VGG networks on Raspberry Pi.
      • -
      • Raspberry Pi users will need to upgrade to Raspbian Stretch for releases after 1.09.
      • +
      • The Docker Non-privileged mode of operation as described in the documentation has an issue with multiple NCS devices.
      • +
      • Inception V1 obtained values are invalid for mvNCCheck.
      • Convolution may fail to find a solution for very large inputs.
      • Depth-wise convolution is tested for 3x3 kernels.
      • -
      • A TanH layer’s “top” & “bottom” blobs must have different names.  This is different from a ReLU layer, whose “top” & “bottom” should be named the same as its previous layer.
      • -
      • On upgrade from previous versions of SDK, the installer will detect if openCV 3.3.0 was installed, for example from http://github.com/movidius/ncappzoo/apps/stream_ty_gn/install-opencv-from_source.sh. For this release, the installer will prompt to uninstall this specific version of openCV. This is required for ssd-caffe to run correctly. After 2.05 installation is complete, openCV 3.3.0 can be re-installed and the ssd-caffe will continue to function.
      • -
      • On upgrade from previous versions of SDK, the installer will detect if openCV 3.3.0 was installed, for example from http://github.com/movidius/ncappzoo/apps/stream_ty_gn/install-opencv-from_source.sh. For this release, the installer will prompt to uninstall this specific version of openCV. This is required for ssd-caffe to run correctly. After 2.05 installation is complete, openCV 3.3.0 can be re-installed and the ssd-caffe will continue to function.
      • -
      • The MTCNN network in the app zoo is showing unexpected behavior for this release, and is being investigated. To use MTCNN, please use version 1.12.00 of SDK.
      • +
      • A TanH layer’s “top” & “bottom” blobs must have different names. This is different from a ReLU layer, whose “top” & “bottom” should be named the same as its previous layer.
      • +
      • On upgrade from previous versions of SDK, the installer will detect if openCV 3.3.0 was installed, for example from http://github.com/movidius/ncappzoo/apps/stream_ty_gn/install-opencv-from_source.sh. For this release, the installer will prompt to uninstall this specific version of openCV. This is required for ssd-caffe to run correctly. After installation is complete, openCV 3.3.0 can be re-installed and the ssd-caffe will continue to function.
      • +
      • The MTCNN network in the app zoo is showing unexpected behavior for this release, and is being investigated. To use MTCNN, please use version 1.12.01 of SDK.
      • Although mvNCCheck shows per-pixel error for some metrics for mobilenet_v1_224, classification results are not impacted.
      • Only Ubuntu 16.04 LTS is supported as a host OS for this release. Ubuntu 18.04 is being evaluated.
      • -
      • The visualization graph created by mvNCProfile may have an erroneous connection through the data layer.
      • +
      • Group Deconvolution with “group” parameter != 1 is not supported on the new parser.
      • +
      • For this release, use of Myriad devices connected to some specific hubs can fail. If you encounter errors, please try direct connect to PC port, or try a different hub.
      • +
      • Loading multiple graphs into one Myriad device may show stability issues with this release.
    +
    diff --git a/docs/tools/tools_overview.html b/docs/tools/tools_overview.html index fcc38d6..042a501 100755 --- a/docs/tools/tools_overview.html +++ b/docs/tools/tools_overview.html @@ -507,15 +507,15 @@

    Introduction

    - mvNCCompile + mvNCCompile Converts a Caffe/TensorFlow* network and associated weights to an internal Intel® Movidius™ compiled format for use with the Intel® Movidius™ Neural Compute API. - mvNCProfile + mvNCProfile Provides layer-by-layer statistics to evaluate the performance of Caffe/TensorFlow networks on your neural compute device. - mvNCCheck + mvNCCheck Compares the inference results from running the network on your neural compute device vs. Caffe/TensorFlow for network compilation validation. diff --git a/examples/apps/hello_ncs_cpp/cpp/hello_ncs.cpp b/examples/apps/hello_ncs_cpp/cpp/hello_ncs.cpp index 853d457..5355c13 100644 --- a/examples/apps/hello_ncs_cpp/cpp/hello_ncs.cpp +++ b/examples/apps/hello_ncs_cpp/cpp/hello_ncs.cpp @@ -1,18 +1,16 @@ -// Copyright 2018 Intel Corporation. -// The source code, information and material ("Material") contained herein is -// owned by Intel Corporation or its suppliers or licensors, and title to such -// Material remains with Intel Corporation or its suppliers or licensors. -// The Material contains proprietary information of Intel or its suppliers and -// licensors. The Material is protected by worldwide copyright laws and treaty -// provisions. -// No part of the Material may be used, copied, reproduced, modified, published, -// uploaded, posted, transmitted, distributed or disclosed in any way without -// Intel's prior express written permission. No license under any patent, -// copyright or other intellectual property rights in the Material is granted to -// or conferred upon you, either expressly, by implication, inducement, estoppel -// or otherwise. -// Any license under such intellectual property rights must be express and -// approved by Intel in writing. +// Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved +// +// 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/examples/apps/hello_ncs_py/Makefile b/examples/apps/hello_ncs_py/Makefile index cd4e1e5..e33aa15 100644 --- a/examples/apps/hello_ncs_py/Makefile +++ b/examples/apps/hello_ncs_py/Makefile @@ -3,7 +3,7 @@ .PHONY: all all: - @echo "nothing to make, use 'make run' to run." + @echo "nothing to make or download for this example, use 'make run' to run the examples." .PHONY: run run: diff --git a/examples/apps/hello_ncs_py/hello_ncs.py b/examples/apps/hello_ncs_py/hello_ncs.py index 1dd013c..9a995a7 100644 --- a/examples/apps/hello_ncs_py/hello_ncs.py +++ b/examples/apps/hello_ncs_py/hello_ncs.py @@ -1,20 +1,18 @@ #!/usr/bin/python3 # -# Copyright 2018 Intel Corporation. -# The source code, information and material ("Material") contained herein is -# owned by Intel Corporation or its suppliers or licensors, and title to such -# Material remains with Intel Corporation or its suppliers or licensors. -# The Material contains proprietary information of Intel or its suppliers and -# licensors. The Material is protected by worldwide copyright laws and treaty -# provisions. -# No part of the Material may be used, copied, reproduced, modified, published, -# uploaded, posted, transmitted, distributed or disclosed in any way without -# Intel's prior express written permission. No license under any patent, -# copyright or other intellectual property rights in the Material is granted to -# or conferred upon you, either expressly, by implication, inducement, estoppel -# or otherwise. -# Any license under such intellectual property rights must be express and -# approved by Intel in writing. +# Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved +# +# 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. # Python script to open and close a single NCS device diff --git a/examples/apps/multistick_cpp/cpp/multistick.cpp b/examples/apps/multistick_cpp/cpp/multistick.cpp index 0758771..b71fba1 100644 --- a/examples/apps/multistick_cpp/cpp/multistick.cpp +++ b/examples/apps/multistick_cpp/cpp/multistick.cpp @@ -1,18 +1,16 @@ -// Copyright 2018 Intel Corporation. -// The source code, information and material ("Material") contained herein is -// owned by Intel Corporation or its suppliers or licensors, and title to such -// Material remains with Intel Corporation or its suppliers or licensors. -// The Material contains proprietary information of Intel or its suppliers and -// licensors. The Material is protected by worldwide copyright laws and treaty -// provisions. -// No part of the Material may be used, copied, reproduced, modified, published, -// uploaded, posted, transmitted, distributed or disclosed in any way without -// Intel's prior express written permission. No license under any patent, -// copyright or other intellectual property rights in the Material is granted to -// or conferred upon you, either expressly, by implication, inducement, estoppel -// or otherwise. -// Any license under such intellectual property rights must be express and -// approved by Intel in writing. +// Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved +// +// 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. #include #include diff --git a/examples/caffe/AlexNet/cpp/run.cpp b/examples/caffe/AlexNet/cpp/run.cpp index a269f2d..4b3097f 100644 --- a/examples/caffe/AlexNet/cpp/run.cpp +++ b/examples/caffe/AlexNet/cpp/run.cpp @@ -1,18 +1,16 @@ -// Copyright 2018 Intel Corporation. -// The source code, information and material ("Material") contained herein is -// owned by Intel Corporation or its suppliers or licensors, and title to such -// Material remains with Intel Corporation or its suppliers or licensors. -// The Material contains proprietary information of Intel or its suppliers and -// licensors. The Material is protected by worldwide copyright laws and treaty -// provisions. -// No part of the Material may be used, copied, reproduced, modified, published, -// uploaded, posted, transmitted, distributed or disclosed in any way without -// Intel's prior express written permission. No license under any patent, -// copyright or other intellectual property rights in the Material is granted to -// or conferred upon you, either expressly, by implication, inducement, estoppel -// or otherwise. -// Any license under such intellectual property rights must be express and -// approved by Intel in writing. +// Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved +// +// 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. #include #include diff --git a/examples/caffe/AlexNet/run.py b/examples/caffe/AlexNet/run.py index d993c95..a824a25 100755 --- a/examples/caffe/AlexNet/run.py +++ b/examples/caffe/AlexNet/run.py @@ -1,20 +1,18 @@ #! /usr/bin/env python3 -# Copyright 2018 Intel Corporation. -# The source code, information and material ("Material") contained herein is -# owned by Intel Corporation or its suppliers or licensors, and title to such -# Material remains with Intel Corporation or its suppliers or licensors. -# The Material contains proprietary information of Intel or its suppliers and -# licensors. The Material is protected by worldwide copyright laws and treaty -# provisions. -# No part of the Material may be used, copied, reproduced, modified, published, -# uploaded, posted, transmitted, distributed or disclosed in any way without -# Intel's prior express written permission. No license under any patent, -# copyright or other intellectual property rights in the Material is granted to -# or conferred upon you, either expressly, by implication, inducement, estoppel -# or otherwise. -# Any license under such intellectual property rights must be express and -# approved by Intel in writing. +# Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved +# +# 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. from mvnc import mvncapi as mvnc import sys diff --git a/examples/caffe/GoogLeNet/cpp/run.cpp b/examples/caffe/GoogLeNet/cpp/run.cpp index d864450..d0ee32a 100644 --- a/examples/caffe/GoogLeNet/cpp/run.cpp +++ b/examples/caffe/GoogLeNet/cpp/run.cpp @@ -1,18 +1,16 @@ -// Copyright 2018 Intel Corporation. -// The source code, information and material ("Material") contained herein is -// owned by Intel Corporation or its suppliers or licensors, and title to such -// Material remains with Intel Corporation or its suppliers or licensors. -// The Material contains proprietary information of Intel or its suppliers and -// licensors. The Material is protected by worldwide copyright laws and treaty -// provisions. -// No part of the Material may be used, copied, reproduced, modified, published, -// uploaded, posted, transmitted, distributed or disclosed in any way without -// Intel's prior express written permission. No license under any patent, -// copyright or other intellectual property rights in the Material is granted to -// or conferred upon you, either expressly, by implication, inducement, estoppel -// or otherwise. -// Any license under such intellectual property rights must be express and -// approved by Intel in writing. +// Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved +// +// 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. #include #include diff --git a/examples/caffe/GoogLeNet/run.py b/examples/caffe/GoogLeNet/run.py index 33387ea..cdfe4a1 100755 --- a/examples/caffe/GoogLeNet/run.py +++ b/examples/caffe/GoogLeNet/run.py @@ -1,20 +1,18 @@ #! /usr/bin/env python3 -# Copyright 2018 Intel Corporation. -# The source code, information and material ("Material") contained herein is -# owned by Intel Corporation or its suppliers or licensors, and title to such -# Material remains with Intel Corporation or its suppliers or licensors. -# The Material contains proprietary information of Intel or its suppliers and -# licensors. The Material is protected by worldwide copyright laws and treaty -# provisions. -# No part of the Material may be used, copied, reproduced, modified, published, -# uploaded, posted, transmitted, distributed or disclosed in any way without -# Intel's prior express written permission. No license under any patent, -# copyright or other intellectual property rights in the Material is granted to -# or conferred upon you, either expressly, by implication, inducement, estoppel -# or otherwise. -# Any license under such intellectual property rights must be express and -# approved by Intel in writing. +# Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved +# +# 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. from mvnc import mvncapi as mvnc import sys diff --git a/examples/caffe/SqueezeNet/cpp/run.cpp b/examples/caffe/SqueezeNet/cpp/run.cpp index a269f2d..4b3097f 100644 --- a/examples/caffe/SqueezeNet/cpp/run.cpp +++ b/examples/caffe/SqueezeNet/cpp/run.cpp @@ -1,18 +1,16 @@ -// Copyright 2018 Intel Corporation. -// The source code, information and material ("Material") contained herein is -// owned by Intel Corporation or its suppliers or licensors, and title to such -// Material remains with Intel Corporation or its suppliers or licensors. -// The Material contains proprietary information of Intel or its suppliers and -// licensors. The Material is protected by worldwide copyright laws and treaty -// provisions. -// No part of the Material may be used, copied, reproduced, modified, published, -// uploaded, posted, transmitted, distributed or disclosed in any way without -// Intel's prior express written permission. No license under any patent, -// copyright or other intellectual property rights in the Material is granted to -// or conferred upon you, either expressly, by implication, inducement, estoppel -// or otherwise. -// Any license under such intellectual property rights must be express and -// approved by Intel in writing. +// Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved +// +// 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. #include #include diff --git a/examples/caffe/SqueezeNet/run.py b/examples/caffe/SqueezeNet/run.py index 37ceac6..56de285 100755 --- a/examples/caffe/SqueezeNet/run.py +++ b/examples/caffe/SqueezeNet/run.py @@ -1,20 +1,18 @@ #! /usr/bin/env python3 -# Copyright 2018 Intel Corporation. -# The source code, information and material ("Material") contained herein is -# owned by Intel Corporation or its suppliers or licensors, and title to such -# Material remains with Intel Corporation or its suppliers or licensors. -# The Material contains proprietary information of Intel or its suppliers and -# licensors. The Material is protected by worldwide copyright laws and treaty -# provisions. -# No part of the Material may be used, copied, reproduced, modified, published, -# uploaded, posted, transmitted, distributed or disclosed in any way without -# Intel's prior express written permission. No license under any patent, -# copyright or other intellectual property rights in the Material is granted to -# or conferred upon you, either expressly, by implication, inducement, estoppel -# or otherwise. -# Any license under such intellectual property rights must be express and -# approved by Intel in writing. +# Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved +# +# 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. from mvnc import mvncapi as mvnc import sys diff --git a/examples/tensorflow/inception_v1/Makefile b/examples/tensorflow/inception_v1/Makefile index c7be2fb..4f40b41 100644 --- a/examples/tensorflow/inception_v1/Makefile +++ b/examples/tensorflow/inception_v1/Makefile @@ -27,7 +27,7 @@ prereqs: .PHONY: profile profile: weights - ${NCPROFILE} -s 12 ${MODEL_FILENAME} ${INPUT_NODE_FLAG} ${OUTPUT_NODE_FLAG} + ${NCPROFILE} --new-parser -s 12 ${MODEL_FILENAME} ${INPUT_NODE_FLAG} ${OUTPUT_NODE_FLAG} .PHONY: browse_profile browse_profile: weights profile @@ -46,11 +46,11 @@ weights: .PHONY: compile compile: weights - test -f graph || ${NCCOMPILE} -s 12 ${MODEL_FILENAME} ${INPUT_NODE_FLAG} ${OUTPUT_NODE_FLAG} + test -f graph || ${NCCOMPILE} --new-parser -s 12 ${MODEL_FILENAME} ${INPUT_NODE_FLAG} ${OUTPUT_NODE_FLAG} .PHONY: check check: weights - ${NCCHECK} -s 12 ${MODEL_FILENAME} ${INPUT_NODE_FLAG} ${OUTPUT_NODE_FLAG} -i ../../data/images/cat.jpg -metric top1 -cs 2,1,0 + ${NCCHECK} --new-parser -s 12 ${MODEL_FILENAME} ${INPUT_NODE_FLAG} ${OUTPUT_NODE_FLAG} -i ../../data/images/cat.jpg -metric top1 -cs 2,1,0 .PHONY: run run: compile diff --git a/examples/tensorflow/inception_v1/run.py b/examples/tensorflow/inception_v1/run.py index a902f73..1c769c1 100755 --- a/examples/tensorflow/inception_v1/run.py +++ b/examples/tensorflow/inception_v1/run.py @@ -1,20 +1,18 @@ #! /usr/bin/env python3 -# Copyright 2018 Intel Corporation. -# The source code, information and material ("Material") contained herein is -# owned by Intel Corporation or its suppliers or licensors, and title to such -# Material remains with Intel Corporation or its suppliers or licensors. -# The Material contains proprietary information of Intel or its suppliers and -# licensors. The Material is protected by worldwide copyright laws and treaty -# provisions. -# No part of the Material may be used, copied, reproduced, modified, published, -# uploaded, posted, transmitted, distributed or disclosed in any way without -# Intel's prior express written permission. No license under any patent, -# copyright or other intellectual property rights in the Material is granted to -# or conferred upon you, either expressly, by implication, inducement, estoppel -# or otherwise. -# Any license under such intellectual property rights must be express and -# approved by Intel in writing. +# Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved +# +# 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. from mvnc import mvncapi as mvnc import sys diff --git a/examples/tensorflow/inception_v3/Makefile b/examples/tensorflow/inception_v3/Makefile index 7c6fce0..440a77d 100644 --- a/examples/tensorflow/inception_v3/Makefile +++ b/examples/tensorflow/inception_v3/Makefile @@ -27,11 +27,11 @@ prereqs: .PHONY: profile profile: weights - ${NCPROFILE} -s 4 ${MODEL_FILENAME} ${INPUT_NODE_FLAG} ${OUTPUT_NODE_FLAG} + ${NCPROFILE} --new-parser -s 4 ${MODEL_FILENAME} ${INPUT_NODE_FLAG} ${OUTPUT_NODE_FLAG} .PHONY: browse_profile browse_profile: weights - ${NCPROFILE} -s 4 ${MODEL_FILENAME} ${INPUT_NODE_FLAG} ${OUTPUT_NODE_FLAG} + ${NCPROFILE} --new-parser -s 4 ${MODEL_FILENAME} ${INPUT_NODE_FLAG} ${OUTPUT_NODE_FLAG} firefox output_report.html & .PHONY: weights @@ -42,11 +42,11 @@ weights: .PHONY: compile compile: weights - test -f graph || ${NCCOMPILE} -s 4 ${MODEL_FILENAME} ${INPUT_NODE_FLAG} ${OUTPUT_NODE_FLAG} + test -f graph || ${NCCOMPILE} --new-parser -s 4 ${MODEL_FILENAME} ${INPUT_NODE_FLAG} ${OUTPUT_NODE_FLAG} .PHONY: check check: weights - -${NCCHECK} -s 4 ${MODEL_FILENAME} ${INPUT_NODE_FLAG} ${OUTPUT_NODE_FLAG} -i ../../data/images/cat.jpg -metric top1 -cs 0,1,2 + -${NCCHECK} --new-parser -s 4 ${MODEL_FILENAME} ${INPUT_NODE_FLAG} ${OUTPUT_NODE_FLAG} -i ../../data/images/cat.jpg -metric top1 -cs 0,1,2 .PHONY: run run: compile diff --git a/examples/tensorflow/inception_v3/run.py b/examples/tensorflow/inception_v3/run.py index 9a10a48..b5ae0b2 100755 --- a/examples/tensorflow/inception_v3/run.py +++ b/examples/tensorflow/inception_v3/run.py @@ -1,20 +1,18 @@ #! /usr/bin/env python3 -# Copyright 2018 Intel Corporation. -# The source code, information and material ("Material") contained herein is -# owned by Intel Corporation or its suppliers or licensors, and title to such -# Material remains with Intel Corporation or its suppliers or licensors. -# The Material contains proprietary information of Intel or its suppliers and -# licensors. The Material is protected by worldwide copyright laws and treaty -# provisions. -# No part of the Material may be used, copied, reproduced, modified, published, -# uploaded, posted, transmitted, distributed or disclosed in any way without -# Intel's prior express written permission. No license under any patent, -# copyright or other intellectual property rights in the Material is granted to -# or conferred upon you, either expressly, by implication, inducement, estoppel -# or otherwise. -# Any license under such intellectual property rights must be express and -# approved by Intel in writing. +# Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved +# +# 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. from mvnc import mvncapi as mvnc import sys diff --git a/extras/docker/Dockerfile b/extras/docker/Dockerfile index e65eadf..eabf79a 100644 --- a/extras/docker/Dockerfile +++ b/extras/docker/Dockerfile @@ -2,6 +2,7 @@ FROM ubuntu:16.04 # Install necessary packages for the installer RUN apt-get update && apt-get install -y \ + lsb-release \ build-essential \ sed \ sudo \ diff --git a/extras/docker/Dockerfile_NoPreviligeAccess b/extras/docker/Dockerfile_NoPreviligeAccess new file mode 100644 index 0000000..39c8197 --- /dev/null +++ b/extras/docker/Dockerfile_NoPreviligeAccess @@ -0,0 +1,25 @@ +FROM ubuntu:16.04 + +# Install necessary packages for the installer +RUN apt-get update && apt-get install -y \ + lsb-release \ + build-essential \ + sed \ + sudo \ + tar \ + udev \ + wget \ + libusb-1.0-0-dev \ + && apt-get clean + +# Copy over the NCSDK +COPY ./ ncsdk/ + +# Set the current working directory to the cloned ncsdk directory +WORKDIR "/ncsdk" + +# Run the installer +RUN make install +WORKDIR "api/src" +RUN sudo make clean && sudo make get_mvcmd && sudo make basicinstall NO_BOOT=yes NO_RESET=yes && sudo make pythoninstall +WORKDIR "../../" diff --git a/extras/docker/README.md b/extras/docker/README.md index 7901c34..65df428 100644 --- a/extras/docker/README.md +++ b/extras/docker/README.md @@ -18,10 +18,9 @@ This creates an image named "ncsdk". ## Run the container -After the image is built, execute the following command to run the container that we named "ncsdk": - -$ docker run --net=host --privileged -v /dev:/dev --name ncsdk -i -t ncsdk /bin/bash +1. To boot devices with runtime FW compile and run the app ./ncs_boot_devices/ +2. run the command ./docker_cmd.sh ## Additional Information -See the full NCSDK documentation for Docker at https://movidius.github.io/ncsdk/ for more information. \ No newline at end of file +See the full NCSDK documentation for Docker at https://movidius.github.io/ncsdk/ for more information. diff --git a/extras/docker/docker_cmd.sh b/extras/docker/docker_cmd.sh new file mode 100755 index 0000000..81bf832 --- /dev/null +++ b/extras/docker/docker_cmd.sh @@ -0,0 +1,16 @@ +#!/bin/bash +all_devices=$(lsusb -d 03e7:f63b | cut -d" " -f2,4 | cut -d":" -f1 | sed 's/ /\//' | sed 's/^/\/dev\/bus\/usb\//') +devices_number=$(lsusb -d 03e7:f63b | wc -l) +if [ ${devices_number} -eq 0 ] ; then + echo "No devices connected!" + exit 0 +fi +docker_cmd="docker run --net=host" +for dev in $all_devices +do + docker_cmd="$docker_cmd --device=$dev" +done + +docker_cmd="$docker_cmd --name ncsdk -i -t ncsdk /bin/bash" +echo $docker_cmd +eval $docker_cmd diff --git a/extras/docker/ncs_boot_devices/Makefile b/extras/docker/ncs_boot_devices/Makefile new file mode 100644 index 0000000..7f8a34f --- /dev/null +++ b/extras/docker/ncs_boot_devices/Makefile @@ -0,0 +1,75 @@ +MVNC_API_PATH=$(realpath ../../../api/src/) +ifdef $$MVNC_API_PATH +MVNC_API_PATH := $$MVNC_API_PATH +endif + +VERSION_NUMBER=`cat $(MVNC_API_PATH)/version.txt` + +SRCS := ./ncs_boot_devices.c +SRCS += \ + $(MVNC_API_PATH)/mvnc_api.c \ + $(MVNC_API_PATH)/fp16.c + +MV_COMMON_BASE=$(realpath $(MVNC_API_PATH)/common) +XLINK_BASE=$(MV_COMMON_BASE)/components/XLink + +XLINK_SRCS=$(XLINK_BASE)/pc/usb_boot.c +XLINK_SRCS+=$(XLINK_BASE)/shared/XLink.c +XLINK_SRCS+=$(XLINK_BASE)/shared/XLinkDispatcher.c +XLINK_SRCS+=$(XLINK_BASE)/pc/XLinkPlatform.c + +XLINK_INCLUDES= -I$(XLINK_BASE)/shared \ + -I$(XLINK_BASE)/pc \ + -I$(MV_COMMON_BASE)/shared/include/ + +CFLAGS+=-D__PC__ -DUSE_USB_VSC -DXLINK_NO_RESET -DVERSION_NAME="\"$(VERSION_NUMBER)\"" +CFLAGS+=-DDEVICE_SHELL_ENABLED +CFLAGS+=-DEXCLUDE_HIGHCLASS + +LIBS += -lpthread -lusb-1.0 -ldl + +INCLUDES := \ + -I$(MVNC_API_PATH)/ \ + -I$(MVNC_API_PATH)/../include \ + -I$(SYSROOT)/usr/include/libusb-1.0 \ + +INCLUDES+= $(XLINK_INCLUDES) +CFLAGS+= -O2 -Wall -pthread -fPIC -MMD -MP $(INCLUDES) + +SRCS += $(XLINK_SRCS) +OBJS := $(SRCS:%.c=%.o) + +.PHONY: all +all: ncs_boot_devices + +.PHONY: ncs_boot_devices +ncs_boot_devices: $(OBJS) +ifeq ($(MVNC_API_PATH),) + echo "Error: MVNC_API_PATH not defined! Please define and rerun!" + exit 1 +endif + @echo "\nmaking ncs_boot_devices" + @$(CC) -o $@ $^ $(CFLAGS) $(LIBS) + if [ ! -e $(MVNC_API_PATH)/mvnc/*.mvcmd ];then \ + cd $(MVNC_API_PATH); make get_mvcmd; \ + fi + @ln -fs $(MVNC_API_PATH)/mvnc/ + +.PHONY: run +run: ncs_boot_devices + @echo "\nmaking run" + ./ncs_boot_devices; + +.PHONY: help +help: + @echo "possible make targets: "; + @echo " make help - shows this message"; + @echo " make all - same as ncs_boot_devices"; + @echo " make ncs_boot_devices - builds the ncs_boot_devices executable example"; + @echo " make run - runs the ncs_boot_devices executable example program"; + @echo " make clean - removes all created content and temporary files"; + +clean: + @echo "\nmaking clean"; + rm $(OBJS) + rm -f ncs_boot_devices; diff --git a/extras/docker/ncs_boot_devices/ncs_boot_devices.c b/extras/docker/ncs_boot_devices/ncs_boot_devices.c new file mode 100644 index 0000000..9405b02 --- /dev/null +++ b/extras/docker/ncs_boot_devices/ncs_boot_devices.c @@ -0,0 +1,92 @@ +/* +* +* Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved +* +* 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. +*/ +#include +#include +#include + +int help() +{ + fprintf(stderr, "./ncs_boot_devices [-l ] [-n ]\n"); + fprintf(stderr, " API log level\n"); + fprintf(stderr, " is the number of devices to boot, default is all (0). \n"); + return 0; +} + +int main(int argc, char** argv) +{ + struct ncDeviceHandle_t *deviceHandle; + int number_of_devices_to_boot = 0; + int loglevel = 2; + for(int i = 1; i < argc; i++) { + if(argv[i][0] == '-') { + if (argc <= i+1) { + printf("Error: missing argument for option %s\n", argv[i]); + return help(); + } + if (argv[i][1] == 'l') { + loglevel = atoi(argv[++i]); + continue; + } + else if (argv[i][1] == 'n') { + number_of_devices_to_boot = atoi(argv[++i]); + continue; + } + } + else { + printf("Error: unsupported option %s\n", argv[i]); + return help(); + } + } + + ncStatus_t retCode = ncGlobalSetOption(NC_RW_LOG_LEVEL, &loglevel, sizeof(loglevel)); + + int idx = 0; + int successfully_booted = 0; + while (!number_of_devices_to_boot || idx < number_of_devices_to_boot) { + retCode = ncDeviceCreate(idx,&deviceHandle); + if(retCode != NC_OK) { + printf("No more NCS devices found.\n"); + break; + } + + retCode = ncDeviceOpen(deviceHandle); + if(retCode != NC_OK) { + printf("Warning: ncDeviceOpen of device %d failed (ncStatus %d), skipping\n", retCode, idx); + idx++; + continue; + } + + printf("Hello NCS! Device %d opened normally.\n", idx); + + retCode = ncDeviceClose(deviceHandle); + deviceHandle = NULL; + if (retCode != NC_OK) { + printf("Error: ncDeviceClose of device %d failed (ncStatus %d), exiting...\n", retCode, idx); + printf(" ncStatus value: %d\n", retCode); + exit(-1); + } + idx++; + successfully_booted++; + } + if (successfully_booted) { + printf("Successfully Booted %d devices\n", successfully_booted); + if (idx < number_of_devices_to_boot) + printf("Warning: Number of devices connected (%d) is smaller than requested (%d)\n", idx, number_of_devices_to_boot); + } + else + printf("Error: Failed to boot any devices!\n"); +} diff --git a/extras/docker/ncs_boot_devices/readme.md b/extras/docker/ncs_boot_devices/readme.md new file mode 100644 index 0000000..b3a479f --- /dev/null +++ b/extras/docker/ncs_boot_devices/readme.md @@ -0,0 +1,33 @@ +# ncs_boot_devices: Loads and boots devices with runtime FW, without resetting them + +Sample can be used as a utility to load runtime FW on devices and boot them without resetting them. +## Prerequisites + +This code example requires that the following components are available: +1. Movidius Neural Compute Stick +2. Movidius Neural Compute SDK +3. MVNC_API_PATH environemnt variable is set to the source of the API + + +## Building the Example +To run the example code do the following : +1. Open a terminal and change directory to the ncs_boot_devices base directory +2. Type the following command in the terminal: "make ncs_boot_devices" or "make ncs_boot_devices MVNC_API_PATH=" where is your local copy of the api sources + + +## Running the Example +To run the example code do the following : +1. Open a terminal and change directory to the ncs_boot_devices base directory +2. Make sure MVNC_API_PATH env variable is set to point to the API src directory +3. Type the following command in the terminal: make run + +When the application runs normally and is able to connect to the NCS device the output will be similar to this: + +~~~ +Hello NCS! Device 0 opened normally. +No more NCS devices found. +Successfully Booted 1 devices +~~~ + + + diff --git a/install-utilities.sh b/install-utilities.sh index e07acd7..6d8946c 100644 --- a/install-utilities.sh +++ b/install-utilities.sh @@ -45,6 +45,12 @@ function set_error_handling() # initialize_constants - initialize constants function initialize_constants() { + # file + ncsdk_download_link="https://downloadmirror.intel.com/28191/eng/NCSDK-2.08.01.02.tar.gz" + + # VERBOSE value can be changed by editing ncsdk.config which will be read in function read_ncsdk_config() + VERBOSE=no + # avoid conflicts with PYTHONPATH during install export PYTHONPATH="" @@ -102,13 +108,16 @@ function read_ncsdk_config() INSTALL_TOOLKIT=yes PIP_SYSTEM_INSTALL=yes USE_VIRTUALENV=no - VERBOSE=no # check if nproc is available on the system via 'command' RC=0 command -v nproc > /dev/null || RC=$? if [ $RC -eq 0 ] ; then # default to using all processors to invoke make with (make -j $MAKE_NJOBS) MAKE_NJOBS=$(nproc) + # RPi runs make faster with N-1 cores + DISTRO="$(lsb_release -i 2>/dev/null | cut -f 2)" + OS_DISTRO="${DISTRO:-INVALID}" + [ "${OS_DISTRO,,}" = "raspbian" ] && MAKE_NJOBS=$((MAKE_NJOBS-1)) else # Can't find nproc, default to 1 make process. Can change in ncsdk.conf MAKE_NJOBS=1 diff --git a/install.sh b/install.sh index 675d7f4..28d9457 100755 --- a/install.sh +++ b/install.sh @@ -119,6 +119,9 @@ function init_installer() ### get constants (function is in install-utilities.sh) initialize_constants + ### make sure system has required prerequisites + check_prerequisites + ### check if file exist VERSION_FILE=version.txt if [ ! -f ${VERSION_FILE} ] ; then @@ -156,9 +159,6 @@ function init_installer() SYS_INSTALL_DIR=/usr fi - ### make sure system has required prerequisites - check_prerequisites - if [ "${VERBOSE}" = "yes" ] ; then print_ncsdk_config fi @@ -184,11 +184,11 @@ function make_installer_dirs() # download_and_copy_files - download tarball and copy to install dir function download_and_copy_files() { - download_filename="NCSDK-${NCSDK_VERSION}.tar.gz" +download_filename=NCSDK-2.08.01.02.tar.gz if [ ! -f ${download_filename} ] ; then echo "Downloading ${download_filename}" - ncsdk_link="https://downloadmirror.intel.com/27839/eng/NCSDK-2.05.00.02.tar.gz" - exec_and_search_errors "wget --no-cache -O ${download_filename} $ncsdk_link" + # ncsdk_download_link set in install-utilities.sh function initialize_constants() + exec_and_search_errors "wget --no-cache -O ${download_filename} $ncsdk_download_link" fi # ncsdk_pkg is the filename without the .tar.gz extension ncsdk_pkg=${download_filename%%.tar.gz} @@ -198,7 +198,7 @@ function download_and_copy_files() ${SUDO_PREFIX} cp ./uninstall.sh ${INSTALL_DIR}/ ${SUDO_PREFIX} cp ./install-utilities.sh ${INSTALL_DIR}/ ${SUDO_PREFIX} cp ./ncsdk.conf ${INSTALL_DIR}/ - + # save current dir FROM_DIR=$PWD @@ -385,7 +385,9 @@ function install_python_dependencies() elif [ "${OS_DISTRO,,}" = "raspbian" ] ; then # for Raspian, use apt with python3-* if available exec_and_search_errors "$SUDO_PREFIX apt-get $APT_QUIET install -y $(cat "$DIR/requirements_apt_raspbian.txt")" - exec_and_search_errors "$PIP_PREFIX pip3 install $PIP_QUIET --trusted-host files.pythonhosted.org Cython graphviz scikit-image" + exec_and_search_errors "$PIP_PREFIX pip3 install $PIP_QUIET --trusted-host files.pythonhosted.org Cython" + exec_and_search_errors "$PIP_PREFIX pip3 install $PIP_QUIET --trusted-host files.pythonhosted.org graphviz" + exec_and_search_errors "$PIP_PREFIX pip3 install $PIP_QUIET --trusted-host files.pythonhosted.org scikit-image" exec_and_search_errors "$PIP_PREFIX pip3 install $PIP_QUIET --trusted-host files.pythonhosted.org --upgrade numpy==1.13.1" exec_and_search_errors "$PIP_PREFIX pip3 install $PIP_QUIET --trusted-host files.pythonhosted.org pygraphviz Enum34>=1.1.6 networkx>=2.1,<=2.1" # Install packages for python 2.x, required for NCSDK python API @@ -402,7 +404,7 @@ function install_python_dependencies() # sets FIND_TENSORFLOW__FOUND_SUPPORTED_VERSION=2 when TensorFlow isn't installed function find_tensorflow() { - SUPPORTED_TENSORFLOW_VERSION=1.7.0 + SUPPORTED_TENSORFLOW_VERSION=1.9.0 RC=0 $PIP_PREFIX pip3 show $1 1> /dev/null || RC=$? if [ $RC -eq 0 ]; then @@ -428,54 +430,21 @@ function find_tensorflow() # install_tensorflow - install supported version of tensorflow on system function install_tensorflow() { - if [ "${OS_DISTRO,,}" = "raspbian" ] && [ "${INSTALL_TENSORFLOW}" = "yes" ]; then - echo -e "${YELLOW}NOTE: TensorFlow is not officially supported on Raspbian Stretch." - echo -e " We are installing a specific nightly TensorFlow build from http://ci.tensorflow.org/view/Nightly/job/nightly-pi-python3/" - echo -e " for code development and testing. ${NC}" - - echo "Checking if tensorflow is installed..." - # find_tensorflow sets FIND_TENSORFLOW__FOUND_SUPPORTED_VERSION to 0, 1 or 2 depending if correct version installed, incorrect version installed or not installed, respectively - find_tensorflow "tensorflow" - tf=${FIND_TENSORFLOW__FOUND_SUPPORTED_VERSION} - INSTALL_TF="no" - [ $tf -eq 0 ] && echo "Installed TensorFlow is the correct version, not re-installing" - if [ $tf -eq 1 ] ; then - exec_and_search_errors "$PIP_PREFIX pip3 uninstall --quiet -y tensorflow" - INSTALL_TF="yes" - fi - [ $tf -eq 2 ] && INSTALL_TF="yes" - - # install TensorFlow if needed - if [ "${INSTALL_TF}" = "yes" ] ; then - echo "Couldn't find a supported tensorflow version, downloading TensorFlow $SUPPORTED_TENSORFLOW_VERSION" - # rename wheel for python 3.5 - WHEEL_DOWNLOAD=tensorflow-1.7.0-cp34-none-any.whl - WHEEL=tensorflow-1.7.0-cp35-none-any.whl - [ -f "${WHEEL_DOWNLOAD}" ] && sudo mv -f ${WHEEL_DOWNLOAD} ${WHEEL_DOWNLOAD}.save - $SUDO_PREFIX wget https://storage.googleapis.com/download.tensorflow.org/deps/pi/2018_05_21/${WHEEL_DOWNLOAD} - [ -f "${WHEEL}" ] && $SUDO_PREFIX mv -f ${WHEEL} ${WHEEL}.save - $SUDO_PREFIX mv ${WHEEL_DOWNLOAD} ${WHEEL} - echo "Installing TensorFlow" - exec_and_search_errors "$PIP_PREFIX pip3 install --quiet ${WHEEL}" - echo "Finished installing TensorFlow" - fi - - elif [ "${OS_DISTRO,,}" = "ubuntu" ] ; then - echo "Checking whether tensorflow CPU version is installed..." - # find_tensorflow sets FIND_TENSORFLOW__FOUND_SUPPORTED_VERSION to 0, 1 or 2 depending if correct version installed, incorrect version installed or not installed, respectively - find_tensorflow "tensorflow" - tf=${FIND_TENSORFLOW__FOUND_SUPPORTED_VERSION} - if [ $tf -ne 0 ]; then - echo "Checking whether tensorflow GPU version is installed..." - find_tensorflow tensorflow-gpu - tf_gpu=${FIND_TENSORFLOW__FOUND_SUPPORTED_VERSION} - fi - if [[ $tf -ne 0 && $tf_gpu -ne 0 ]]; then - echo "Couldn't find a supported tensorflow version, installing tensorflow $SUPPORTED_TENSORFLOW_VERSION" - exec_and_search_errors "$PIP_PREFIX pip3 install $PIP_QUIET --trusted-host files.pythonhosted.org tensorflow==$SUPPORTED_TENSORFLOW_VERSION" - else - echo "tensorflow already at latest supported version...skipping." - fi + + echo "Checking whether tensorflow CPU version is installed..." + # find_tensorflow sets FIND_TENSORFLOW__FOUND_SUPPORTED_VERSION to 0, 1 or 2 depending if correct version installed, incorrect version installed or not installed, respectively + find_tensorflow "tensorflow" + tf=${FIND_TENSORFLOW__FOUND_SUPPORTED_VERSION} + if [ $tf -ne 0 ]; then + echo "Checking whether tensorflow GPU version is installed..." + find_tensorflow tensorflow-gpu + tf_gpu=${FIND_TENSORFLOW__FOUND_SUPPORTED_VERSION} + fi + if [[ $tf -ne 0 && $tf_gpu -ne 0 ]]; then + echo "Couldn't find a supported tensorflow version, installing tensorflow $SUPPORTED_TENSORFLOW_VERSION" + exec_and_search_errors "$PIP_PREFIX pip3 install $PIP_QUIET --trusted-host files.pythonhosted.org --trusted-host www.piwheels.org tensorflow==$SUPPORTED_TENSORFLOW_VERSION" + else + echo "tensorflow already at latest supported version...skipping." fi } @@ -715,14 +684,13 @@ function install_api() $SUDO_PREFIX cp $SDK_DIR/fw/MvNCAPI-*.mvcmd $SYS_INSTALL_DIR/lib/mvnc/ # Copy C API to destination - $SUDO_PREFIX cp $SDK_DIR/api/c/mvnc.h $SYS_INSTALL_DIR/include/mvnc2 + $SUDO_PREFIX cp $FROM_DIR/api/include/mvnc.h $SYS_INSTALL_DIR/include/mvnc2 $SUDO_PREFIX cp $SDK_DIR/api/c/libmvnc.so.0 $SYS_INSTALL_DIR/lib/mvnc/ if [ -f $SDK_DIR/api/c/libmvnc_highclass.so.0 ] ; then $SUDO_PREFIX cp $SDK_DIR/api/c/ncHighClass.h $SYS_INSTALL_DIR/include/mvnc2 $SUDO_PREFIX cp $SDK_DIR/api/c/libmvnc_highclass.so.0 $SYS_INSTALL_DIR/lib/mvnc/ fi - echo "NCS Include files have been installed in $SYS_INSTALL_DIR/include" check_and_remove_file $SYS_INSTALL_DIR/include/mvnc.h check_and_remove_file $SYS_INSTALL_DIR/include/ncHighClass.h @@ -737,14 +705,16 @@ function install_api() $SUDO_PREFIX ln -s $SYS_INSTALL_DIR/include/mvnc2/ncHighClass.h $SYS_INSTALL_DIR/include/ncHighClass.h $SUDO_PREFIX ln -s $SYS_INSTALL_DIR/lib/mvnc/libmvnc_highclass.so.0 $SYS_INSTALL_DIR/lib/libmvnc_highclass.so fi - + echo "NCS Include files have been installed in $SYS_INSTALL_DIR/include" + $SUDO_PREFIX ldconfig - # Copy other collaterals to destination $SUDO_PREFIX cp -r $DIR/version.txt $INSTALL_DIR/ $SUDO_PREFIX cp -r $SDK_DIR/LICENSE $INSTALL_DIR/ # Install python API + $SUDO_PREFIX cp ${FROM_DIR}/api/python/mvnc/mvncapi.py $SDK_DIR/api/python/mvnc + $SUDO_PREFIX cp ${FROM_DIR}/api/python/mvnc/__init__.py $SDK_DIR/api/python/mvnc exec_and_search_errors "$PIP_PREFIX pip3 install $PIP_QUIET --upgrade --force-reinstall $SDK_DIR/api" exec_and_search_errors "$PIP_PREFIX pip2 install $PIP_QUIET --upgrade --force-reinstall $SDK_DIR/api" echo "NCS Python API has been installed in $INSTALL_DIR, and PYTHONPATH environment variable updated" diff --git a/requirements.txt b/requirements.txt index 69a25b2..aa8a174 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,7 +7,7 @@ h5py>=2.5.0,<=2.7.0 lxml>=3.4.4,<=3.8.0 matplotlib>=1.5.0,<=2.0.2 numpy>=1.13.0,<=1.13.3 -protobuf>=3.0.0b2,<=3.4.0 +protobuf>3.4.0,<=3.6.1 python-dateutil>=2.4.2,<=2.6.1 scikit-image>=0.11.3,<=0.13.0 scipy>=0.14.1,<=0.19.1 diff --git a/requirements_apt.txt b/requirements_apt.txt index f68a825..b6b54c7 100644 --- a/requirements_apt.txt +++ b/requirements_apt.txt @@ -1 +1 @@ -unzip coreutils curl git python3 libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler libatlas-base-dev git python3-dev python3-numpy automake cmake make byacc lsb-release python3-scipy libgflags-dev libgoogle-glog-dev liblmdb-dev swig3.0 graphviz libxslt-dev libxml2-dev gfortran python3-yaml python3-nose python-numpy python3-tk python3-pip python-pip tar wget libgraphviz-dev +unzip coreutils curl git python3 libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler libatlas-base-dev git python3-dev python3-numpy automake cmake make byacc lsb-release python3-scipy libgflags-dev libgoogle-glog-dev liblmdb-dev swig3.0 graphviz libxslt-dev libxml2-dev gfortran python3-yaml python3-nose python-numpy python3-tk python3-pip python-pip tar wget libgraphviz-dev libusb-1.0-0-dev diff --git a/version.txt b/version.txt index 2e86a85..06e618d 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -2.05.00.02 +2.08.01.02