I am new to Yocto project. I am using SAM9X60-EK as my target, and I want to add opencv to my image.
I noticed that there is opencv
included with meta-oe
but when I add IMAGE_INSTALL:append = " opencv"
to my core-image-sato.bbaappend
file it gives me error, so I decided to write a recipee to download and install from source distribution.
我已把必要的扶养安排如下:
IMAGE_INSTALL:append = " python3"
IMAGE_INSTALL:append = " python3-pip"
IMAGE_INSTALL:append = " python3-numpy"
IMAGE_INSTALL:append = " opencv"
页: 1
SRC_URI = "file://opencv-python-4.8.0.76.tar.gz"
S = "${WORKDIR}"
# Add Python as a dependency
DEPENDS += "python3 cmake python3-pip"
do_unpack() {
tar -xvf ${FILE_DIRNAME}/opencv-python-4.8.0.76.tar.gz -C ${S}
}
do_install() {
install -d ${D}${bindir}
cp -r ${S}/opencv-python-4.8.0.76/* ${D}${bindir}
# Run the setup.py script for installation
cd ${D}${bindir}
python3 setup.py install --root=${D}
}
PACKAGES =+ "opencv_python"
FILES_${PN} += "${bindir}/setup.py"
页: 1 我发现以下错误:
DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing shell function do_install
| /usr/lib/python3/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
| warnings.warn(
| Traceback (most recent call last):
| File "/home/snishuz/.local/lib/python3.10/site-packages/skbuild/setuptools_wrap.py", line 645, in setup
| cmkr = cmaker.CMaker(cmake_executable)
| File "/home/snishuz/.local/lib/python3.10/site-packages/skbuild/cmaker.py", line 148, in __init__
| self.cmake_version = get_cmake_version(self.cmake_executable)
| File "/home/snishuz/.local/lib/python3.10/site-packages/skbuild/cmaker.py", line 105, in get_cmake_version
| raise SKBuildError(msg) from err
|
| Problem with the CMake installation, aborting build. CMake executable is cmake
| WARNING: exit code 1 from a shell command.
Edit:
在@skandigraun评论之后 我尝试使用载于<代码>meta-oe中的收件人。
下面是error。