diff options
| author | Naveen Saini <naveen.kumar.saini@intel.com> | 2024-04-24 18:00:30 +0800 |
|---|---|---|
| committer | Anuj Mittal <anuj.mittal@intel.com> | 2024-04-29 10:03:39 +0800 |
| commit | 547f00bca5e81f52996b218771054b53f1752bcd (patch) | |
| tree | 26bf692ac571224b52b0fb72494ad7c6eb906934 | |
| parent | 7165c20b435033a0abe0114cf52cb817cba6265e (diff) | |
| download | meta-intel-547f00bca5e81f52996b218771054b53f1752bcd.tar.gz | |
openvino.md: Add document to build image with OpenVINO toolkit
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
| -rw-r--r-- | README.md | 1 | ||||
| -rw-r--r-- | documentation/openvino.md | 95 |
2 files changed, 96 insertions, 0 deletions
| @@ -24,6 +24,7 @@ Dynamic additional dependencies: | |||
| 24 | 24 | ||
| 25 | - [Building and booting meta-intel BSP layers](documentation/building_and_booting.md) | 25 | - [Building and booting meta-intel BSP layers](documentation/building_and_booting.md) |
| 26 | - [Intel oneAPI DPC++/C++ Compiler](documentation/dpcpp-compiler.md) | 26 | - [Intel oneAPI DPC++/C++ Compiler](documentation/dpcpp-compiler.md) |
| 27 | - [Build Image with OpenVINO™ toolkit](documentation/openvino.md) | ||
| 27 | - [Tested Hardware](documentation/tested_hardware.md) | 28 | - [Tested Hardware](documentation/tested_hardware.md) |
| 28 | - [Guidelines for submitting patches](documentation/submitting_patches.md) | 29 | - [Guidelines for submitting patches](documentation/submitting_patches.md) |
| 29 | - [Reporting bugs](documentation/reporting_bugs.md) | 30 | - [Reporting bugs](documentation/reporting_bugs.md) |
diff --git a/documentation/openvino.md b/documentation/openvino.md new file mode 100644 index 00000000..50dc680d --- /dev/null +++ b/documentation/openvino.md | |||
| @@ -0,0 +1,95 @@ | |||
| 1 | Build a Yocto Image with OpenVINO™ toolkit | ||
| 2 | ========================================== | ||
| 3 | |||
| 4 | Follow the [Yocto Project official documentation](https://docs.yoctoproject.org/brief-yoctoprojectqs/index.html#compatible-linux-distribution) to set up and configure your host machine to be compatible with BitBake. | ||
| 5 | |||
| 6 | ## Step 1: Set Up Environment | ||
| 7 | |||
| 8 | 1. Clone the repositories. | ||
| 9 | |||
| 10 | ``` | ||
| 11 | git clone https://git.yoctoproject.org/git/poky | ||
| 12 | git clone https://github.com/openembedded/meta-openembedded | ||
| 13 | git clone https://git.yoctoproject.org/git/meta-intel | ||
| 14 | ``` | ||
| 15 | |||
| 16 | |||
| 17 | 2. Set up the OpenEmbedded build environment. | ||
| 18 | |||
| 19 | ``` | ||
| 20 | source poky/oe-init-build-env | ||
| 21 | |||
| 22 | ``` | ||
| 23 | |||
| 24 | |||
| 25 | |||
| 26 | 3. Add BitBake layers. | ||
| 27 | |||
| 28 | |||
| 29 | ``` | ||
| 30 | bitbake-layers add-layer ../meta-openembedded/meta-oe | ||
| 31 | bitbake-layers add-layer ../meta-openembedded/meta-python | ||
| 32 | bitbake-layers add-layer ../meta-intel | ||
| 33 | |||
| 34 | ``` | ||
| 35 | |||
| 36 | |||
| 37 | 4. Set up BitBake configurations. | ||
| 38 | Include extra configuration in the `conf/local.conf` file in your build directory as required. | ||
| 39 | |||
| 40 | |||
| 41 | ``` | ||
| 42 | MACHINE = "intel-skylake-64" | ||
| 43 | |||
| 44 | # Enable building OpenVINO Python API. | ||
| 45 | # This requires meta-python layer to be included in bblayers.conf. | ||
| 46 | PACKAGECONFIG:append:pn-openvino-inference-engine = " python3" | ||
| 47 | |||
| 48 | # This adds OpenVINO related libraries in the target image. | ||
| 49 | CORE_IMAGE_EXTRA_INSTALL:append = " openvino-inference-engine" | ||
| 50 | |||
| 51 | # This adds OpenVINO samples in the target image. | ||
| 52 | CORE_IMAGE_EXTRA_INSTALL:append = " openvino-inference-engine-samples" | ||
| 53 | |||
| 54 | # Include OpenVINO Python API package in the target image. | ||
| 55 | CORE_IMAGE_EXTRA_INSTALL:append = " openvino-inference-engine-python3" | ||
| 56 | |||
| 57 | # Include model conversion API in the target image. | ||
| 58 | CORE_IMAGE_EXTRA_INSTALL:append = " openvino-model-optimizer" | ||
| 59 | |||
| 60 | ``` | ||
| 61 | |||
| 62 | ## Step 2: Build a Yocto Image with OpenVINO Packages | ||
| 63 | |||
| 64 | Run BitBake to build your image with OpenVINO packages. For example, to build the minimal image, run the following command: | ||
| 65 | |||
| 66 | |||
| 67 | ``` | ||
| 68 | bitbake core-image-minimal | ||
| 69 | |||
| 70 | ``` | ||
| 71 | |||
| 72 | ## Step 3: Verify the Yocto Image | ||
| 73 | |||
| 74 | Verify that OpenVINO packages were built successfully. Run the following command: | ||
| 75 | |||
| 76 | ``` | ||
| 77 | oe-pkgdata-util list-pkgs | grep openvino | ||
| 78 | |||
| 79 | ``` | ||
| 80 | |||
| 81 | |||
| 82 | If the image build is successful, it will return the list of packages as below: | ||
| 83 | |||
| 84 | ``` | ||
| 85 | openvino-inference-engine | ||
| 86 | openvino-inference-engine-dbg | ||
| 87 | openvino-inference-engine-dev | ||
| 88 | openvino-inference-engine-python3 | ||
| 89 | openvino-inference-engine-samples | ||
| 90 | openvino-inference-engine-src | ||
| 91 | openvino-model-optimizer | ||
| 92 | openvino-model-optimizer-dbg | ||
| 93 | openvino-model-optimizer-dev | ||
| 94 | |||
| 95 | ``` | ||
