DOCS: Updating 'Create a YOCTO image' article - for master (#14130)
* Update installing-openvino-yocto.md * Update installing-openvino-yocto.md * Update installing-openvino-yocto.md * updating troubleshooting guide Adding a respective section in the Troubleshooting guide Restructuring the installation steps and updating the branches of repositories * Update installing-openvino-yocto.md * Update docs/install_guides/installing-openvino-yocto.md Co-authored-by: Yuan Xu <yuan1.xu@intel.com> * Update docs/install_guides/troubleshooting-issues.md Co-authored-by: Yuan Xu <yuan1.xu@intel.com> * Update docs/install_guides/installing-openvino-yocto.md Co-authored-by: Yuan Xu <yuan1.xu@intel.com> * Update docs/install_guides/installing-openvino-yocto.md Co-authored-by: Yuan Xu <yuan1.xu@intel.com> * applying suggestions Removing h3 level headings. Correcting code block syntax in troubleshooting guide. * Update installing-openvino-yocto.md * reverting the steps Reverting the installation steps to previous order. Emphasizing that Step 2 is an example of creating the minimal image. Co-authored-by: Yuan Xu <yuan1.xu@intel.com>
This commit is contained in:
committed by
GitHub
parent
e41a0823db
commit
a296a509e8
@@ -1,86 +1,90 @@
|
||||
# Create a Yocto Image with Intel® Distribution of OpenVINO™ toolkit {#openvino_docs_install_guides_installing_openvino_yocto}
|
||||
|
||||
This document provides instructions for creating a Yocto image with Intel® Distribution of OpenVINO™ toolkit.
|
||||
|
||||
## System Requirements
|
||||
Use 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.
|
||||
|
||||
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.
|
||||
|
||||
## Step 1: Set Up Environment
|
||||
|
||||
### Set Up Git Repositories
|
||||
The following Git repositories are required to build a Yocto image:
|
||||
1. Clone the repositories.
|
||||
```sh
|
||||
git clone https://git.yoctoproject.org/git/poky --branch langdale
|
||||
git clone https://git.yoctoproject.org/meta-intel --branch langdale
|
||||
git clone https://git.openembedded.org/meta-openembedded --branch langdale
|
||||
git clone https://github.com/kraj/meta-clang.git
|
||||
```
|
||||
|
||||
- [Poky](https://git.yoctoproject.org/poky)
|
||||
- [Meta-intel](https://git.yoctoproject.org/meta-intel/tree/README)
|
||||
- [Meta-openembedded](http://cgit.openembedded.org/meta-openembedded/tree/README)
|
||||
- <a href="https://github.com/kraj/meta-clang/blob/master/README.md">Meta-clang</a>
|
||||
2. Set up the OpenEmbedded build environment.
|
||||
```sh
|
||||
source poky/oe-init-build-env
|
||||
```
|
||||
|
||||
Clone these Git repositories to your host machine:
|
||||
```sh
|
||||
git clone https://git.yoctoproject.org/git/poky --branch kirkstone
|
||||
git clone https://git.yoctoproject.org/git/meta-intel --branch kirkstone
|
||||
git clone https://git.openembedded.org/meta-openembedded --branch kirkstone
|
||||
git clone https://github.com/kraj/meta-clang.git --branch kirkstone-clang12
|
||||
```
|
||||
3. Add BitBake layers.
|
||||
```sh
|
||||
bitbake-layers add-layer ../meta-intel
|
||||
bitbake-layers add-layer ../meta-openembedded/meta-oe
|
||||
bitbake-layers add-layer ../meta-openembedded/meta-python
|
||||
bitbake-layers add-layer ../meta-clang
|
||||
```
|
||||
|
||||
### Set up BitBake Layers
|
||||
4. Verify if layers were added (optional step).
|
||||
```sh
|
||||
bitbake-layers show-layers
|
||||
```
|
||||
|
||||
```sh
|
||||
source poky/oe-init-build-env
|
||||
bitbake-layers add-layer ../meta-intel
|
||||
bitbake-layers add-layer ../meta-openembedded/meta-oe
|
||||
bitbake-layers add-layer ../meta-openembedded/meta-python
|
||||
bitbake-layers add-layer ../meta-clang
|
||||
```
|
||||
5. Set up BitBake configurations.
|
||||
Include extra configuration in the `conf/local.conf` file in your build directory as required.
|
||||
```sh
|
||||
# Build with SSE4.2, AVX2 etc. extensions
|
||||
MACHINE = "intel-skylake-64"
|
||||
|
||||
### Set up BitBake Configurations
|
||||
# Enable clDNN GPU plugin when needed.
|
||||
# This requires meta-clang and meta-oe layers to be included in bblayers.conf
|
||||
# and is not enabled by default.
|
||||
# Compute-runtime does not currently support building with LLVM 15 (which is
|
||||
# the default in meta-clang master) so enabling GPU plugin may result in
|
||||
# build failures.
|
||||
PACKAGECONFIG:append:pn-openvino-inference-engine = " opencl"
|
||||
|
||||
Include extra configuration in `conf/local.conf` in your build directory as required.
|
||||
# Enable building OpenVINO Python API.
|
||||
# This requires meta-python layer to be included in bblayers.conf.
|
||||
PACKAGECONFIG:append:pn-openvino-inference-engine = " python3"
|
||||
|
||||
```sh
|
||||
# Build with SSE4.2, AVX2 etc. extensions
|
||||
MACHINE = "intel-skylake-64"
|
||||
# This adds OpenVINO related libraries in the target image.
|
||||
CORE_IMAGE_EXTRA_INSTALL:append = " openvino-inference-engine"
|
||||
|
||||
# Enable clDNN GPU plugin when needed.
|
||||
# This requires meta-clang and meta-oe layers to be included in bblayers.conf
|
||||
# and is not enabled by default.
|
||||
PACKAGECONFIG:append:pn-openvino-inference-engine = " opencl"
|
||||
# This adds OpenVINO samples in the target image.
|
||||
CORE_IMAGE_EXTRA_INSTALL:append = " openvino-inference-engine-samples"
|
||||
|
||||
# Enable building OpenVINO Python API.
|
||||
# This requires meta-python layer to be included in bblayers.conf.
|
||||
PACKAGECONFIG:append:pn-openvino-inference-engine = " python3"
|
||||
# Include OpenVINO Python API package in the target image.
|
||||
CORE_IMAGE_EXTRA_INSTALL:append = " openvino-inference-engine-python3"
|
||||
|
||||
# This adds OpenVINO related libraries in the target image.
|
||||
CORE_IMAGE_EXTRA_INSTALL:append = " openvino-inference-engine"
|
||||
# Enable MYRIAD plugin
|
||||
CORE_IMAGE_EXTRA_INSTALL:append = " openvino-inference-engine-vpu-firmware"
|
||||
|
||||
# This adds OpenVINO samples in the target image.
|
||||
CORE_IMAGE_EXTRA_INSTALL:append = " openvino-inference-engine-samples"
|
||||
|
||||
# Include OpenVINO Python API package in the target image.
|
||||
CORE_IMAGE_EXTRA_INSTALL:append = " openvino-inference-engine-python3"
|
||||
|
||||
# Enable MYRIAD plugin
|
||||
CORE_IMAGE_EXTRA_INSTALL:append = " openvino-inference-engine-vpu-firmware"
|
||||
|
||||
# Include Model Optimizer in the target image.
|
||||
CORE_IMAGE_EXTRA_INSTALL:append = " openvino-model-optimizer"
|
||||
```
|
||||
# Include Model Optimizer in the target image.
|
||||
CORE_IMAGE_EXTRA_INSTALL:append = " openvino-model-optimizer"
|
||||
```
|
||||
|
||||
## Step 2: Build a Yocto Image with OpenVINO Packages
|
||||
|
||||
Run BitBake to build your image with OpenVINO packages. To build the minimal image, for example, run:
|
||||
Run BitBake to build your image with OpenVINO packages. For example, to build the minimal image, run the following command:
|
||||
```sh
|
||||
bitbake core-image-minimal
|
||||
```
|
||||
|
||||
## Step 3: Verify the Yocto Image with OpenVINO Packages
|
||||
> **NOTE**: For validation/testing/reviewing purposes, you may consider using the `nohup` command and ensure that your vpn/ssh connection remains uninterrupted.
|
||||
|
||||
Verify that OpenVINO packages were built successfully.
|
||||
Run the following command:
|
||||
## Step 3: Verify the Yocto Image
|
||||
|
||||
Verify that OpenVINO packages were built successfully. Run the following command:
|
||||
```sh
|
||||
oe-pkgdata-util list-pkgs | grep openvino
|
||||
```
|
||||
|
||||
If the image was built successfully, it will return the list of packages as below:
|
||||
If the image build is successful, it will return the list of packages as below:
|
||||
```sh
|
||||
openvino-inference-engine
|
||||
openvino-inference-engine-dbg
|
||||
@@ -93,3 +97,13 @@ openvino-model-optimizer
|
||||
openvino-model-optimizer-dbg
|
||||
openvino-model-optimizer-dev
|
||||
```
|
||||
|
||||
## Additional Resources
|
||||
|
||||
- [Troubleshooting Guide](openvino_docs_get_started_guide_troubleshooting_issues.html#yocto-install-issues)
|
||||
- [Yocto Project](https://docs.yoctoproject.org/) - official documentation webpage
|
||||
- [BitBake Tool](https://docs.yoctoproject.org/bitbake/)
|
||||
- [Poky](https://git.yoctoproject.org/poky)
|
||||
- [Meta-intel](https://git.yoctoproject.org/meta-intel/tree/README)
|
||||
- [Meta-openembedded](http://cgit.openembedded.org/meta-openembedded/tree/README)
|
||||
- [Meta-clang](https://github.com/kraj/meta-clang/tree/master/#readme)
|
||||
|
||||
@@ -204,3 +204,20 @@ sudo apt install mokutil
|
||||
```sh
|
||||
sudo mokutil --disable-validation
|
||||
```
|
||||
|
||||
## <a name="yocto-install-issues"></a>Issues with Creating a Yocto Image for OpenVINO
|
||||
|
||||
### Error while adding "meta-intel" layer
|
||||
|
||||
When using the `bitbake-layers add-layer meta-intel` command, the following error might occur:
|
||||
```sh
|
||||
NOTE: Starting bitbake server...
|
||||
ERROR: The following required tools (as specified by HOSTTOOLS) appear to be unavailable in PATH, please install them in order to proceed: chrpath diffstat pzstd zstd
|
||||
```
|
||||
|
||||
To resolve the issue, install the `chrpath diffstat zstd` tools:
|
||||
|
||||
```sh
|
||||
sudo apt-get install chrpath diffstat zstd
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user