-
Notifications
You must be signed in to change notification settings - Fork 417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Libcamera apps improvements #1205
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this broke yocto-check-layer. meta-multimedia was never a dependency of this layer. Any idea why this MR requires it?
The error is |
I think the dependency on meta-multimedia should be added here. |
I think this recipe can be made conditional. There are couple of ways.
python() {
if 'multimedia-layer' not in d.getVar('BBFILE_COLLECTIONS').split():
raise bb.parse.SkipRecipe('Requires meta-multimedia to be present.')
} or use the dynamic-layers technique, which means move the recipe into
I think second approach is better. |
I also vote for dynamic layers, but I remember that when that was introduced, there was a "chicken and the egg" with this. |
There is a dynamic-layer directory for this already as that's where libcamera bbappend is in: meta-raspberrypi/dynamic-layers/multimedia-layer/recipes-multimedia/libcamera Adding libcamera-apps there as well makes sense to me.
? I've just noticed it in my world builds. |
We need to bump SRCREV to get a fix for current libcamera from meta-oe: |
Thanks for update, I've tried to build it for rpi4-64 and fails with:
Because even for aarch64 rpi4-64 it sets cpu to armv8-neon now (as raspberrypi4-64 OVERRIDES contain raspberrypi4 as well). |
With armv8-neon being enforced for all ARM based machines, running any libcamera app on raspberrypi (e.g. Raspberry Pi B Rev 2) results in Illegal Instruction. To fix this, set armv8-neon for 32bit raspberrypi3 and raspberrypi4 but defaults to TARGET_ARCH for other non-aarch64 machines. Fixes: f162192 ("rpi-libcamera-apps: fix flags used in aarch64 builds") Signed-off-by: Vivien Didelot <[email protected]>
The 'opencv' PACKAGECONFIG entry was missing the build dependency. Signed-off-by: Vivien Didelot <[email protected]>
Add a 'drm' PACKAGECONFIG entry in order to provide support for a DRM preview window while running the libcamera apps. Signed-off-by: Vivien Didelot <[email protected]>
The 'tensorflow-lite' PACKAGECONFIG entry was missing the corresponding build dependency. In order to be consistent with the build macros, replace the feature with a 'tflite' package config entry. Signed-off-by: Vivien Didelot <[email protected]>
Even though the libcamera apps are a rewrite of the rpicam apps and maintained by the raspberry folks, switching to libcamera makes the code hardware agnostic and thus could be compiled and used on various machines featuring a camera device supported by a libcamera pipeline. For this reason, do not enforce COMPATIBLE_MACHINE. Signed-off-by: Vivien Didelot <[email protected]>
The libcamera-apps project is written in a hardware-agnostic manner thanks to libcamera, and thus isn't specific to the rpi SoC family. Moreover, the project is correctly named libcamera-apps and not rpi-libcamera-apps, so rename the recipe in order to reflect that. Signed-off-by: Vivien Didelot <[email protected]>
Move the libcamera-apps recipe to dynamic-layers/multimedia-layer alongside with its libcamera dependency. Signed-off-by: Vivien Didelot <[email protected]>
Bump libcamera to 3d9ac10 to get a fix for the current libcamera from meta-openembedded/meta-multimedia for the following issue: error: 'StreamRoles' in namespace 'libcamera' does not name a type; did you mean 'StreamRole'? 55 | using StreamRoles = libcamera::StreamRoles; | ^~~~~~~~~~~ | StreamRole Reported-by: Martin Jansa <[email protected]> Signed-off-by: Vivien Didelot <[email protected]>
Thanks, now it built OK in my world builds. LGTM Next achievement is for switching the build to meson as CMake files were removed in latest: |
CMake is removed in upstream libcamera-apps as of 9e17265, thus switch to meson to build the package from now on. Add PACKAGECONFIG entries and neon flags matching the settings project meson.build as described in the official documentation https://www.raspberrypi.com/documentation/computers/camera_software.html#building-libcamera-apps Default to "drm" for PACKAGECONFIG as it is the only option enabled in both recommended meson setup for Raspberry Pi OS and Raspberry Pi OS Lite. Signed-off-by: Vivien Didelot <[email protected]>
Now that the libcamera package from meta-multimedia has support for flicker controls and libcamera-apps uses meson, we can bump the package to its latest revision. Signed-off-by: Vivien Didelot <[email protected]>
bec7182 requires openembedded/meta-openembedded#727 to be merged first. |
Did this land? |
It's in master-next since yesterday, will probably get merged to master soon. I've already tested them together. I don't think you need to wait for meta-oe as rpi-camera-apps is already broken with the libcamera version currently in meta-oe/master (and this PR makes it compatible with master-next and future master). |
now yes. |
This will get automerged on CI pass. Thanks @vivien. |
This branch contains a few changes for the rpi-libcamera-apps package.
It fixes a runtime issue with the raspberrypi machine, adds support for DRM, and makes the package hardware-agnostic as it should be.