“Buildroot trouble shootings”的版本间的差异
来自个人维基
free6d1823(讨论 | 贡献) (以“1. toolchain-external-custom Configuring Incorrect selection of kernel headers: expected 4.10.x, got 4.20.x => toolchain 配置错误, modify configd/defconfig <...”为内容创建页面) |
free6d1823(讨论 | 贡献) |
||
(未显示1个用户的1个中间版本) | |||
第23行: | 第23行: | ||
<source lang="java"> | <source lang="java"> | ||
BR2_DL_DIR="/data/download_cache/buildroot" | BR2_DL_DIR="/data/download_cache/buildroot" | ||
+ | </source> | ||
+ | |||
+ | 3. add OpenCV4 into rootfs | ||
+ | vi package/opencv4/opencv4.mk | ||
+ | <source lang="java"> | ||
+ | #with Qt5 | ||
+ | ifeq ($(BR2_PACKAGE_OPENCV4_WITH_QT5),y) | ||
+ | OPENCV4_CONF_OPTS += -DWITH_QT=5 | ||
+ | OPENCV4_DEPENDENCIES += qt5base | ||
+ | else | ||
+ | OPENCV4_CONF_OPTS += -DWITH_QT=OFF | ||
+ | endif | ||
+ | |||
+ | #add gapi | ||
+ | OPENCV4_CONF_OPTS += -DBUILD_opencv_gapi=ON | ||
+ | |||
+ | #with OPENCL | ||
+ | OPENCV4_CONF_OPTS += \ | ||
+ | -DWITH_OPENCL=ON \ | ||
+ | -DWITH_OPENCL_SVM=OFF \ | ||
+ | -DWITH_OPENCLAMDBLAS=ON \ | ||
+ | -DWITH_OPENCLAMDFFT=ON | ||
+ | |||
+ | </source> | ||
+ | in .config [[文件:Opencv4.png]] | ||
+ | <source lang="java"> | ||
+ | BR2_PACKAGE_OPENCV4=y | ||
+ | # | ||
+ | # OpenCV modules | ||
+ | # | ||
+ | BR2_PACKAGE_OPENCV4_LIB_CALIB3D=y | ||
+ | BR2_PACKAGE_OPENCV4_LIB_DNN=y | ||
+ | BR2_PACKAGE_OPENCV4_LIB_FEATURES2D=y | ||
+ | BR2_PACKAGE_OPENCV4_LIB_FLANN=y | ||
+ | BR2_PACKAGE_OPENCV4_LIB_HIGHGUI=y | ||
+ | BR2_PACKAGE_OPENCV4_WITH_QT5=y | ||
+ | |||
+ | # | ||
+ | # opengl support needs an OpenGL provider | ||
+ | # | ||
+ | BR2_PACKAGE_OPENCV4_LIB_IMGCODECS=y | ||
+ | BR2_PACKAGE_OPENCV4_LIB_IMGPROC=y | ||
+ | BR2_PACKAGE_OPENCV4_LIB_ML=y | ||
+ | BR2_PACKAGE_OPENCV4_LIB_OBJDETECT=y | ||
+ | BR2_PACKAGE_OPENCV4_LIB_PHOTO=y | ||
+ | BR2_PACKAGE_OPENCV4_LIB_SHAPE=y | ||
+ | BR2_PACKAGE_OPENCV4_LIB_STITCHING=y | ||
+ | # BR2_PACKAGE_OPENCV4_LIB_SUPERRES is not set | ||
+ | # BR2_PACKAGE_OPENCV4_LIB_TS is not set | ||
+ | BR2_PACKAGE_OPENCV4_LIB_VIDEOIO=y | ||
+ | BR2_PACKAGE_OPENCV4_LIB_VIDEO=y | ||
+ | BR2_PACKAGE_OPENCV4_LIB_VIDEOSTAB=y | ||
+ | # | ||
+ | # 3rd party support | ||
+ | # | ||
+ | BR2_PACKAGE_OPENCV4_WITH_FFMPEG=y | ||
+ | BR2_PACKAGE_OPENCV4_WITH_GSTREAMER1=y | ||
+ | BR2_PACKAGE_OPENCV4_JPEG2000_NONE=y | ||
+ | # BR2_PACKAGE_OPENCV4_JPEG2000_WITH_JASPER is not set | ||
+ | # BR2_PACKAGE_OPENCV4_JPEG2000_WITH_OPENJPEG is not set | ||
+ | # BR2_PACKAGE_OPENCV4_WITH_JPEG is not set | ||
+ | # BR2_PACKAGE_OPENCV4_WITH_PNG is not set | ||
+ | BR2_PACKAGE_OPENCV4_WITH_PROTOBUF=y | ||
+ | # BR2_PACKAGE_OPENCV4_WITH_TBB is not set | ||
+ | # BR2_PACKAGE_OPENCV4_WITH_TIFF is not set | ||
+ | BR2_PACKAGE_OPENCV4_WITH_V4L=y | ||
+ | # BR2_PACKAGE_OPENCV4_WITH_WEBP is not set | ||
+ | |||
</source> | </source> |
2023年6月29日 (四) 16:22的最后版本
1. toolchain-external-custom Configuring
Incorrect selection of kernel headers: expected 4.10.x, got 4.20.x
=> toolchain 配置错误, modify configd/defconfig
BR2_TOOLCHAIN_EXTERNAL=y BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y BR2_TOOLCHAIN_EXTERNAL_PATH="/opt/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu" BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="aarch64-linux-gnu" BR2_TOOLCHAIN_EXTERNAL_GCC_7=y BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_10=y BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y BR2_TOOLCHAIN_EXTERNAL_CXX=y
To check kernel headers version of the toolchain:
cat /opt/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/libc/usr/include/linux/version.h
#define LINUX_VERSION_CODE 264707 (=0x040a03)
Match the required version 4.10
2. Download package too slow
Use download_cache, add
BR2_DL_DIR="/data/download_cache/buildroot"
3. add OpenCV4 into rootfs
vi package/opencv4/opencv4.mk
#with Qt5 ifeq ($(BR2_PACKAGE_OPENCV4_WITH_QT5),y) OPENCV4_CONF_OPTS += -DWITH_QT=5 OPENCV4_DEPENDENCIES += qt5base else OPENCV4_CONF_OPTS += -DWITH_QT=OFF endif #add gapi OPENCV4_CONF_OPTS += -DBUILD_opencv_gapi=ON #with OPENCL OPENCV4_CONF_OPTS += \ -DWITH_OPENCL=ON \ -DWITH_OPENCL_SVM=OFF \ -DWITH_OPENCLAMDBLAS=ON \ -DWITH_OPENCLAMDFFT=ON
BR2_PACKAGE_OPENCV4=y # # OpenCV modules # BR2_PACKAGE_OPENCV4_LIB_CALIB3D=y BR2_PACKAGE_OPENCV4_LIB_DNN=y BR2_PACKAGE_OPENCV4_LIB_FEATURES2D=y BR2_PACKAGE_OPENCV4_LIB_FLANN=y BR2_PACKAGE_OPENCV4_LIB_HIGHGUI=y BR2_PACKAGE_OPENCV4_WITH_QT5=y # # opengl support needs an OpenGL provider # BR2_PACKAGE_OPENCV4_LIB_IMGCODECS=y BR2_PACKAGE_OPENCV4_LIB_IMGPROC=y BR2_PACKAGE_OPENCV4_LIB_ML=y BR2_PACKAGE_OPENCV4_LIB_OBJDETECT=y BR2_PACKAGE_OPENCV4_LIB_PHOTO=y BR2_PACKAGE_OPENCV4_LIB_SHAPE=y BR2_PACKAGE_OPENCV4_LIB_STITCHING=y # BR2_PACKAGE_OPENCV4_LIB_SUPERRES is not set # BR2_PACKAGE_OPENCV4_LIB_TS is not set BR2_PACKAGE_OPENCV4_LIB_VIDEOIO=y BR2_PACKAGE_OPENCV4_LIB_VIDEO=y BR2_PACKAGE_OPENCV4_LIB_VIDEOSTAB=y # # 3rd party support # BR2_PACKAGE_OPENCV4_WITH_FFMPEG=y BR2_PACKAGE_OPENCV4_WITH_GSTREAMER1=y BR2_PACKAGE_OPENCV4_JPEG2000_NONE=y # BR2_PACKAGE_OPENCV4_JPEG2000_WITH_JASPER is not set # BR2_PACKAGE_OPENCV4_JPEG2000_WITH_OPENJPEG is not set # BR2_PACKAGE_OPENCV4_WITH_JPEG is not set # BR2_PACKAGE_OPENCV4_WITH_PNG is not set BR2_PACKAGE_OPENCV4_WITH_PROTOBUF=y # BR2_PACKAGE_OPENCV4_WITH_TBB is not set # BR2_PACKAGE_OPENCV4_WITH_TIFF is not set BR2_PACKAGE_OPENCV4_WITH_V4L=y # BR2_PACKAGE_OPENCV4_WITH_WEBP is not set