summaryrefslogtreecommitdiff
path: root/meta-raspberrypi
diff options
context:
space:
mode:
Diffstat (limited to 'meta-raspberrypi')
-rw-r--r--meta-raspberrypi/recipes-core/udev/udev-rules-rpi.bb7
-rw-r--r--meta-raspberrypi/recipes-core/udev/udev-rules-rpi/99-com.rules21
-rw-r--r--meta-raspberrypi/recipes-multimedia/libcamera-apps/rpi-libcamera-apps/0001-utils-version.py-use-usr-bin-env-in-shebang.patch42
-rw-r--r--meta-raspberrypi/recipes-multimedia/libcamera-apps/rpi-libcamera-apps_git.bb16
4 files changed, 54 insertions, 32 deletions
diff --git a/meta-raspberrypi/recipes-core/udev/udev-rules-rpi.bb b/meta-raspberrypi/recipes-core/udev/udev-rules-rpi.bb
index 42cfcdd4d5..3ae43856fe 100644
--- a/meta-raspberrypi/recipes-core/udev/udev-rules-rpi.bb
+++ b/meta-raspberrypi/recipes-core/udev/udev-rules-rpi.bb
@@ -3,16 +3,17 @@ LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
SRC_URI = " \
- file://99-com.rules \
+ git://github.com/RPi-Distro/raspberrypi-sys-mods;protocol=https;branch=master \
file://can.rules \
"
+SRCREV = "5ce3ef2b7f377c23fea440ca9df0e30f3f8447cf"
-S = "${WORKDIR}"
+S = "${WORKDIR}/git"
INHIBIT_DEFAULT_DEPS = "1"
do_install () {
install -d ${D}${sysconfdir}/udev/rules.d
- install -m 0644 ${WORKDIR}/99-com.rules ${D}${sysconfdir}/udev/rules.d/
+ install -m 0644 ${S}/etc.armhf/udev/rules.d/99-com.rules ${D}${sysconfdir}/udev/rules.d/
install -m 0644 ${WORKDIR}/can.rules ${D}${sysconfdir}/udev/rules.d/
}
diff --git a/meta-raspberrypi/recipes-core/udev/udev-rules-rpi/99-com.rules b/meta-raspberrypi/recipes-core/udev/udev-rules-rpi/99-com.rules
deleted file mode 100644
index ddd1e1743e..0000000000
--- a/meta-raspberrypi/recipes-core/udev/udev-rules-rpi/99-com.rules
+++ /dev/null
@@ -1,21 +0,0 @@
-KERNEL=="ttyAMA[01]", PROGRAM="/bin/sh -c '\
- ALIASES=/proc/device-tree/aliases; \
- if cmp -s $$ALIASES/uart0 $$ALIASES/serial0; then \
- echo 0;\
- elif cmp -s $$ALIASES/uart0 $$ALIASES/serial1; then \
- echo 1; \
- else \
- exit 1; \
- fi\
-'", SYMLINK+="serial%c"
-
-KERNEL=="ttyS0", PROGRAM="/bin/sh -c '\
- ALIASES=/proc/device-tree/aliases; \
- if cmp -s $$ALIASES/uart1 $$ALIASES/serial0; then \
- echo 0; \
- elif cmp -s $$ALIASES/uart1 $$ALIASES/serial1; then \
- echo 1; \
- else \
- exit 1; \
- fi \
-'", SYMLINK+="serial%c"
diff --git a/meta-raspberrypi/recipes-multimedia/libcamera-apps/rpi-libcamera-apps/0001-utils-version.py-use-usr-bin-env-in-shebang.patch b/meta-raspberrypi/recipes-multimedia/libcamera-apps/rpi-libcamera-apps/0001-utils-version.py-use-usr-bin-env-in-shebang.patch
new file mode 100644
index 0000000000..4c066dee38
--- /dev/null
+++ b/meta-raspberrypi/recipes-multimedia/libcamera-apps/rpi-libcamera-apps/0001-utils-version.py-use-usr-bin-env-in-shebang.patch
@@ -0,0 +1,42 @@
+From 738f530829fb5ee37d74191d34f75d72921284ca Mon Sep 17 00:00:00 2001
+From: Martin Jansa <Martin.Jansa@gmail.com>
+Date: Thu, 4 May 2023 18:07:16 +0000
+Subject: [PATCH] utils/version.py: use /usr/bin/env in shebang
+
+* it uses subprocess text=True which is available only since python-3.7
+ when running on host with python-3.6 it fails with:
+Traceback (most recent call last):
+ File "TOPDIR/BUILD/work/raspberrypi4_64-oe-linux/rpi-libcamera-apps/git-r0/git/utils/version.py", line 19, in generate_version
+ stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, text=True)
+ File "/usr/lib/python3.6/subprocess.py", line 423, in run
+ with Popen(*popenargs, **kwargs) as process:
+TypeError: __init__() got an unexpected keyword argument 'text'
+
+During handling of the above exception, another exception occurred:
+
+Traceback (most recent call last):
+ File "TOPDIR/BUILD/work/raspberrypi4_64-oe-linux/rpi-libcamera-apps/git-r0/git/utils/version.py", line 52, in <module>
+ generate_version()
+ File "TOPDIR/BUILD/work/raspberrypi4_64-oe-linux/rpi-libcamera-apps/git-r0/git/utils/version.py", line 48, in generate_version
+ print(f'{commit} {datetime.now().strftime("%d-%m-%Y (%H:%M:%S)")}', end="")
+UnboundLocalError: local variable 'commit' referenced before assignment
+Generating version string:
+
+ even when newer python3 is in PATH (either from buildtools or from python3native)
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+Upstream-Status: Pending
+---
+ utils/version.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/utils/version.py b/utils/version.py
+index fc2d431..1400eed 100755
+--- a/utils/version.py
++++ b/utils/version.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/env python3
+
+ # Copyright (C) 2021, Raspberry Pi (Trading) Limited
+ # Generate version information for libcamera-apps
diff --git a/meta-raspberrypi/recipes-multimedia/libcamera-apps/rpi-libcamera-apps_git.bb b/meta-raspberrypi/recipes-multimedia/libcamera-apps/rpi-libcamera-apps_git.bb
index 073105dffd..062ded9a18 100644
--- a/meta-raspberrypi/recipes-multimedia/libcamera-apps/rpi-libcamera-apps_git.bb
+++ b/meta-raspberrypi/recipes-multimedia/libcamera-apps/rpi-libcamera-apps_git.bb
@@ -9,8 +9,10 @@ LIC_FILES_CHKSUM = "file://license.txt;md5=a0013d1b383d72ba4bdc5b750e7d1d77"
SRC_URI = "\
git://github.com/raspberrypi/libcamera-apps.git;protocol=https;branch=main \
+ file://0001-utils-version.py-use-usr-bin-env-in-shebang.patch \
"
-SRCREV = "22a52590c33a813743b4e6337478c208201c77b1"
+PV = "1.1.2+git${SRCPV}"
+SRCREV = "12098520a3dec36ba796655baac7efece457f8d8"
S = "${WORKDIR}/git"
@@ -26,19 +28,17 @@ EXTRA_OECMAKE = "\
-DCMAKE_LIBRARY_PATH=${STAGING_LIBDIR} \
"
-EXTRA_OECMAKE:append:raspberrypi3 = " -DENABLE_COMPILE_FLAGS_FOR_TARGET=armv8-neon"
-EXTRA_OECMAKE:append:raspberrypi4 = " -DENABLE_COMPILE_FLAGS_FOR_TARGET=armv8-neon"
+LIBCAMERA_ARCH = "${TARGET_ARCH}"
+LIBCAMERA_ARCH:aarch64 = "arm64"
+LIBCAMERA_ARCH:arm = "armv8-neon"
+EXTRA_OECMAKE += "-DENABLE_COMPILE_FLAGS_FOR_TARGET=${LIBCAMERA_ARCH}"
PACKAGECONFIG[x11] = "-DENABLE_X11=1,-DENABLE_X11=0"
PACKAGECONFIG[qt] = "-DENABLE_QT=1,-DENABLE_QT=0"
PACKAGECONFIG[opencv] = "-DENABLE_OPENCV=1,-DENABLE_OPENCV=0"
PACKAGECONFIG[tensorflow-lite] = "-DENABLE_TFLITE=1,-DENABLE_TFLITE=0"
-# Build does not version solibs so we need to change the suffix
-SOLIBS = ".so"
-FILES_SOLIBSDEV = ""
-
do_install:append() {
# Requires python3-core which not all systems may have
- rm ${D}/${bindir}/camera-bug-report
+ rm -v ${D}/${bindir}/camera-bug-report
}