generated from gaoyang3513/SDK_RK3288
[Mod] First commit
This commit is contained in:
@ -0,0 +1,37 @@
|
||||
From 6bd733b52f0b4039407c676cd3126a9e2f79456b Mon Sep 17 00:00:00 2001
|
||||
From: Peter Seiderer <ps.report@gmx.net>
|
||||
Date: Fri, 5 Feb 2021 18:24:08 +0100
|
||||
Subject: [PATCH] cmake: remove -Werror and -Wfatal-errors compiler command
|
||||
line option
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Fixes (with bootlin-riscv64-musl toolchain):
|
||||
|
||||
.../build/libcamera-apps-2d1009e3badcc8047361ff81149ad6cba3b911b5/core/libcamera_app.cpp:30:22: error: overflow in conversion from ‘long unsigned int’ to ‘int’ changes value from ‘2154321408’ to ‘-2140645888’ [-Werror=overflow]
|
||||
30 | int ret = ioctl(fd, VIDIOC_QUERYCAP, &caps);
|
||||
| ^~~~~~~~~~~~~~~
|
||||
cc1plus: all warnings being treated as errors
|
||||
|
||||
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
|
||||
---
|
||||
CMakeLists.txt | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 748c6dd..1ca1e39 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -11,7 +11,7 @@ endif()
|
||||
|
||||
set (CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
set (CMAKE_CXX_STANDARD 17)
|
||||
-add_compile_options(-Wall -Wextra -pedantic -Wno-unused-parameter -faligned-new -Werror -Wfatal-errors)
|
||||
+add_compile_options(-Wall -Wextra -pedantic -Wno-unused-parameter -faligned-new)
|
||||
add_definitions(-D_FILE_OFFSET_BITS=64)
|
||||
|
||||
if (CMAKE_COMPILER_IS_GNUCXX)
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@ -0,0 +1,39 @@
|
||||
From 60715769cd5368a63b2bdc2e6d6bb6df0030a54d Mon Sep 17 00:00:00 2001
|
||||
From: Peter Seiderer <ps.report@gmx.net>
|
||||
Date: Thu, 31 Mar 2022 21:44:22 +0200
|
||||
Subject: [PATCH] preview: fix egl_preview compile (conversion from Window to
|
||||
EGLNativeWindowType)
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Fixes:
|
||||
|
||||
.../build/libcamera-apps-2d1009e3badcc8047361ff81149ad6cba3b911b5/preview/egl_preview.cpp:329:69: error: invalid conversion from ‘Window’ {aka ‘long unsigned int’} to ‘EGLNativeWindowType’ {aka ‘fbdev_window*’} [-fpermissive]
|
||||
329 | egl_surface_ = eglCreateWindowSurface(egl_display_, config, window_, NULL);
|
||||
| ^~~~~~~
|
||||
| |
|
||||
| Window {aka long unsigned int}
|
||||
|
||||
[Upstream: https://github.com/raspberrypi/libcamera-apps/pull/283]
|
||||
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
|
||||
---
|
||||
preview/egl_preview.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/preview/egl_preview.cpp b/preview/egl_preview.cpp
|
||||
index b936e57..593583d 100644
|
||||
--- a/preview/egl_preview.cpp
|
||||
+++ b/preview/egl_preview.cpp
|
||||
@@ -326,7 +326,7 @@ void EglPreview::makeWindow(char const *name)
|
||||
wm_delete_window_ = XInternAtom(display_, "WM_DELETE_WINDOW", False);
|
||||
XSetWMProtocols(display_, window_, &wm_delete_window_, 1);
|
||||
|
||||
- egl_surface_ = eglCreateWindowSurface(egl_display_, config, window_, NULL);
|
||||
+ egl_surface_ = eglCreateWindowSurface(egl_display_, config, reinterpret_cast<EGLNativeWindowType>(window_), NULL);
|
||||
if (!egl_surface_)
|
||||
throw std::runtime_error("eglCreateWindowSurface failed");
|
||||
|
||||
--
|
||||
2.35.1
|
||||
|
||||
30
package/libcamera-apps/Config.in
Normal file
30
package/libcamera-apps/Config.in
Normal file
@ -0,0 +1,30 @@
|
||||
config BR2_PACKAGE_LIBCAMERA_APPS
|
||||
bool "libcamera-apps"
|
||||
depends on BR2_PACKAGE_LIBCAMERA_ARCH_SUPPORTS # libcamera
|
||||
depends on BR2_INSTALL_LIBSTDCPP # libcamera/boost
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS # libcamera/boost
|
||||
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_8 # libcamera
|
||||
depends on !BR2_STATIC_LIBS # gnutls/libcamera
|
||||
depends on BR2_USE_WCHAR # gnutls/libcamera/boost
|
||||
select BR2_PACKAGE_BOOST
|
||||
select BR2_PACKAGE_BOOST_PROGRAM_OPTIONS
|
||||
select BR2_PACKAGE_JPEG
|
||||
select BR2_PACKAGE_LIBCAMERA
|
||||
select BR2_PACKAGE_LIBEXIF
|
||||
select BR2_PACKAGE_LIBPNG
|
||||
select BR2_PACKAGE_TIFF
|
||||
select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XORG7 && (BR2_PACKAGE_HAS_LIBEGL || BR2_PACKAGE_HAS_LIBGL)
|
||||
select BR2_PACKAGE_LIBDRM if BR2_PACKAGE_XORG7 && (BR2_PACKAGE_HAS_LIBEGL || BR2_PACKAGE_HAS_LIBGL)
|
||||
select BR2_PACKAGE_LIBEPOXY if BR2_PACKAGE_XORG7 && (BR2_PACKAGE_HAS_LIBEGL || BR2_PACKAGE_HAS_LIBGL)
|
||||
select BR2_PACKAGE_QT5BASE_GUI if BR2_PACKAGE_QT5
|
||||
select BR2_PACKAGE_QT5BASE_WIDGETS if BR2_PACKAGE_QT5
|
||||
help
|
||||
This is a small suite of libcamera-based apps that aim to copy
|
||||
the functionality of the existing "raspicam" apps.
|
||||
|
||||
https://github.com/raspberrypi/libcamera-apps
|
||||
|
||||
comment "libcamera-apps needs a toolchain w/ C++, threads, wchar, dynamic library, gcc >= 8"
|
||||
depends on BR2_PACKAGE_LIBCAMERA_ARCH_SUPPORTS
|
||||
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \
|
||||
!BR2_TOOLCHAIN_GCC_AT_LEAST_8 || BR2_STATIC_LIBS || !BR2_USE_WCHAR
|
||||
3
package/libcamera-apps/libcamera-apps.hash
Normal file
3
package/libcamera-apps/libcamera-apps.hash
Normal file
@ -0,0 +1,3 @@
|
||||
# Locally computed
|
||||
sha256 611aec06dd24de6586580164d9b7c55da0698ac4cf129944b2fc41fe67210597 libcamera-apps-2d1009e3badcc8047361ff81149ad6cba3b911b5.tar.gz
|
||||
sha256 36dfed86bdef661a0a14ec1a1cc84c771d5a06b6f9b92e9ebb610ba711bd528a license.txt
|
||||
52
package/libcamera-apps/libcamera-apps.mk
Normal file
52
package/libcamera-apps/libcamera-apps.mk
Normal file
@ -0,0 +1,52 @@
|
||||
################################################################################
|
||||
#
|
||||
# libcamera-apps
|
||||
#
|
||||
################################################################################
|
||||
|
||||
LIBCAMERA_APPS_VERSION = 2d1009e3badcc8047361ff81149ad6cba3b911b5
|
||||
LIBCAMERA_APPS_SITE = $(call github,raspberrypi,libcamera-apps,$(LIBCAMERA_APPS_VERSION))
|
||||
LIBCAMERA_APPS_LICENSE = BSD-2-Clause
|
||||
LIBCAMERA_APPS_LICENSE_FILES = license.txt
|
||||
LIBCAMERA_APPS_DEPENDENCIES = \
|
||||
host-pkgconf \
|
||||
boost \
|
||||
jpeg \
|
||||
libcamera \
|
||||
libexif \
|
||||
libpng \
|
||||
tiff
|
||||
|
||||
LIBCAMERA_APPS_CONF_OPTS = \
|
||||
-DENABLE_COMPILE_FLAGS_FOR_TARGET=disabled \
|
||||
-DENABLE_OPENCV=0 \
|
||||
-DENABLE_TFLITE=0
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBDRM),y)
|
||||
LIBCAMERA_APPS_DEPENDENCIES += libdrm
|
||||
LIBCAMERA_APPS_CONF_OPTS += -DENABLE_DRM=1
|
||||
else
|
||||
LIBCAMERA_APPS_CONF_OPTS += -DENABLE_DRM=0
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_XORG7),y)
|
||||
LIBCAMERA_APPS_DEPENDENCIES += \
|
||||
$(if $(BR2_PACKAGE_LIBEPOXY),libepoxy) \
|
||||
$(if $(BR2_PACKAGE_XLIB_LIBX11),xlib_libX11)
|
||||
LIBCAMERA_APPS_CONF_OPTS += -DENABLE_X11=1
|
||||
else
|
||||
LIBCAMERA_APPS_CONF_OPTS += -DENABLE_X11=0
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_QT5),y)
|
||||
LIBCAMERA_APPS_DEPENDENCIES += qt5base
|
||||
LIBCAMERA_APPS_CONF_OPTS += -DENABLE_QT=1
|
||||
else
|
||||
LIBCAMERA_APPS_CONF_OPTS += -DENABLE_QT=0
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
|
||||
LIBCAMERA_APPS_CONF_OPTS += -DCMAKE_EXE_LINKER_FLAGS=-latomic
|
||||
endif
|
||||
|
||||
$(eval $(cmake-package))
|
||||
Reference in New Issue
Block a user