-
Notifications
You must be signed in to change notification settings - Fork 415
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
Add libcamera and libcamera-apps to recipes-multimedia #963
Conversation
- Add libcamera from latest commit - Add libcamera-apps from latest commit Signed-off-by: Mauro Anjo <[email protected]>
- Fix libcamera-apps license and remove comments Signed-off-by: Mauro Anjo <[email protected]>
libcamera is already in meta-multimedia layer, please update those recipes instead. meta-raspberrypi is not right destination for this but if there is anything thats RPI specific we can apply it via bbappends. |
Yes you're right, but current libcamera-apps is incompatible with the older version present in meta-multimedia, that's why i added it here, but can make a PR for meta-multimedia in openembedded, not sure though, since this repo has no tags to state stable versions yet. libcamera-apps is the new alternative to userland made by raspberry, this might be useful here no? |
is libcamera-apps specific to rpi ? or they just need libcamera in that case they are generic |
@maurosanjo We had a short chat today about this. Didn't we agree that we should start by uprev-ing meta-multimedia and add apps support as well? |
@agherzan Yeap, I misunderstood, doing a PR for meta-multimedia. @kraj the repo states libcamera-apps are apps to mimic raspicam old functionality (userland), but as it uses libcamera it might work with other cameras :) If you think raspberry/libcamera-apps recipe should be a part of meta-raspberry it should be inside recipes-multimedia ? |
It’s suitable for meta-multimedia |
Just to link these PRs together, this is the libcamera update for meta-oe: openembedded/meta-openembedded#496 and there is another article documenting recent camera changes introduced with Bullseye: this might also eventually replace old raspicam-node in ROS which was available only for 32bit rpi, because of dependency on MMAL from userland (which was available only for 32bit - at least back then, I haven't checked recently): |
libcamera recipe was made as a PR in openembedded meta-multimedia Signed-off-by: Mauro Anjo <[email protected]>
removed libcamera from this PR. libcamera-apps will be totally focused on raspberry environment and maintained inside Raspberry organization, so I believe it should not be outside of this meta-raspberry scope, what do you guys think? |
that seems to be ok to have them here I guess. |
…ngl in DISTRO_FEATURES and blacklist otherwise * now when we're building for arm with ROS DISTRO and aarch64 with webOS OSE DISTRO it fails to build raspicam-node because default DISTRO configuration doesn't have 'opengl' in DISTRO_FEATURES * fixes: NOTE: Resolving any missing task queue dependencies ERROR: Nothing PROVIDES 'userland' (but /jenkins/home/anaconda/ros1-noetic-honister/meta-ros/meta-ros1/recipes-extended/raspicam-node/raspicam-node_git.bb DEPENDS on or otherwise requires it) userland was skipped: Recipe is blacklisted: depends on libegl-mesa from mesa-gl which is not available without opengl in DISTRO_FEATURES ERROR: Nothing RPROVIDES 'raspicam-node' (but /jenkins/home/anaconda/ros1-noetic-honister/meta-ros/meta-ros-common/recipes-core/packagegroups/packagegroup-ros-turtlebot3-core.bb, /jenkins/home/anaconda/ros1-noetic-honister/meta-ros/meta-ros1/recipes-extended/raspicam-node/raspicam-node_git.bb RDEPENDS on or otherwise requires it) No eligible RPROVIDERs exist for 'raspicam-node' NOTE: Runtime target 'raspicam-node' is unbuildable, removing... Missing or unbuildable dependency chain was: ['raspicam-node'] ERROR: Nothing RPROVIDES 'packagegroup-ros-turtlebot3-core' (but /jenkins/home/anaconda/ros1-noetic-honister/meta-ros/meta-ros-common/recipes-core/packagegroups/packagegroup-ros-turtlebot3-core.bb RDEPENDS on or otherwise requires it) No eligible RPROVIDERs exist for 'packagegroup-ros-turtlebot3-core' NOTE: Runtime target 'packagegroup-ros-turtlebot3-core' is unbuildable, removing... Missing or unbuildable dependency chain was: ['packagegroup-ros-turtlebot3-core'] ERROR: Nothing RPROVIDES 'raspicam-node-dev' (but /jenkins/home/anaconda/ros1-noetic-honister/meta-ros/meta-ros1/recipes-extended/raspicam-node/raspicam-node_git.bb RDEPENDS on or otherwise requires it) No eligible RPROVIDERs exist for 'raspicam-node-dev' NOTE: Runtime target 'raspicam-node-dev' is unbuildable, removing... Missing or unbuildable dependency chain was: ['raspicam-node-dev'] * this mess with userland is hopefully temporary and turtlebot3 will eventually use the new implementation introduced in Raspberry Pi OS image based on Debian Bullseye https://www.raspberrypi.com/news/bullseye-camera-system/ there are already some changes for this in meta-raspberrypi: agherzan/meta-raspberrypi#963 and meta-oe: openembedded/meta-openembedded#496 Signed-off-by: Martin Jansa <[email protected]>
…ngl in DISTRO_FEATURES and blacklist otherwise * now when we're building for arm with ROS DISTRO and aarch64 with webOS OSE DISTRO it fails to build raspicam-node because default DISTRO configuration doesn't have 'opengl' in DISTRO_FEATURES * fixes: NOTE: Resolving any missing task queue dependencies ERROR: Nothing PROVIDES 'userland' (but /jenkins/home/anaconda/ros1-noetic-honister/meta-ros/meta-ros1/recipes-extended/raspicam-node/raspicam-node_git.bb DEPENDS on or otherwise requires it) userland was skipped: Recipe is blacklisted: depends on libegl-mesa from mesa-gl which is not available without opengl in DISTRO_FEATURES ERROR: Nothing RPROVIDES 'raspicam-node' (but /jenkins/home/anaconda/ros1-noetic-honister/meta-ros/meta-ros-common/recipes-core/packagegroups/packagegroup-ros-turtlebot3-core.bb, /jenkins/home/anaconda/ros1-noetic-honister/meta-ros/meta-ros1/recipes-extended/raspicam-node/raspicam-node_git.bb RDEPENDS on or otherwise requires it) No eligible RPROVIDERs exist for 'raspicam-node' NOTE: Runtime target 'raspicam-node' is unbuildable, removing... Missing or unbuildable dependency chain was: ['raspicam-node'] ERROR: Nothing RPROVIDES 'packagegroup-ros-turtlebot3-core' (but /jenkins/home/anaconda/ros1-noetic-honister/meta-ros/meta-ros-common/recipes-core/packagegroups/packagegroup-ros-turtlebot3-core.bb RDEPENDS on or otherwise requires it) No eligible RPROVIDERs exist for 'packagegroup-ros-turtlebot3-core' NOTE: Runtime target 'packagegroup-ros-turtlebot3-core' is unbuildable, removing... Missing or unbuildable dependency chain was: ['packagegroup-ros-turtlebot3-core'] ERROR: Nothing RPROVIDES 'raspicam-node-dev' (but /jenkins/home/anaconda/ros1-noetic-honister/meta-ros/meta-ros1/recipes-extended/raspicam-node/raspicam-node_git.bb RDEPENDS on or otherwise requires it) No eligible RPROVIDERs exist for 'raspicam-node-dev' NOTE: Runtime target 'raspicam-node-dev' is unbuildable, removing... Missing or unbuildable dependency chain was: ['raspicam-node-dev'] * this mess with userland is hopefully temporary and turtlebot3 will eventually use the new implementation introduced in Raspberry Pi OS image based on Debian Bullseye https://www.raspberrypi.com/news/bullseye-camera-system/ there are already some changes for this in meta-raspberrypi: agherzan/meta-raspberrypi#963 and meta-oe: openembedded/meta-openembedded#496 Signed-off-by: Martin Jansa <[email protected]>
…ngl in DISTRO_FEATURES and blacklist otherwise * now when we're building for arm with ROS DISTRO and aarch64 with webOS OSE DISTRO it fails to build raspicam-node because default DISTRO configuration doesn't have 'opengl' in DISTRO_FEATURES * fixes: NOTE: Resolving any missing task queue dependencies ERROR: Nothing PROVIDES 'userland' (but /jenkins/home/anaconda/ros1-noetic-honister/meta-ros/meta-ros1/recipes-extended/raspicam-node/raspicam-node_git.bb DEPENDS on or otherwise requires it) userland was skipped: Recipe is blacklisted: depends on libegl-mesa from mesa-gl which is not available without opengl in DISTRO_FEATURES ERROR: Nothing RPROVIDES 'raspicam-node' (but /jenkins/home/anaconda/ros1-noetic-honister/meta-ros/meta-ros-common/recipes-core/packagegroups/packagegroup-ros-turtlebot3-core.bb, /jenkins/home/anaconda/ros1-noetic-honister/meta-ros/meta-ros1/recipes-extended/raspicam-node/raspicam-node_git.bb RDEPENDS on or otherwise requires it) No eligible RPROVIDERs exist for 'raspicam-node' NOTE: Runtime target 'raspicam-node' is unbuildable, removing... Missing or unbuildable dependency chain was: ['raspicam-node'] ERROR: Nothing RPROVIDES 'packagegroup-ros-turtlebot3-core' (but /jenkins/home/anaconda/ros1-noetic-honister/meta-ros/meta-ros-common/recipes-core/packagegroups/packagegroup-ros-turtlebot3-core.bb RDEPENDS on or otherwise requires it) No eligible RPROVIDERs exist for 'packagegroup-ros-turtlebot3-core' NOTE: Runtime target 'packagegroup-ros-turtlebot3-core' is unbuildable, removing... Missing or unbuildable dependency chain was: ['packagegroup-ros-turtlebot3-core'] ERROR: Nothing RPROVIDES 'raspicam-node-dev' (but /jenkins/home/anaconda/ros1-noetic-honister/meta-ros/meta-ros1/recipes-extended/raspicam-node/raspicam-node_git.bb RDEPENDS on or otherwise requires it) No eligible RPROVIDERs exist for 'raspicam-node-dev' NOTE: Runtime target 'raspicam-node-dev' is unbuildable, removing... Missing or unbuildable dependency chain was: ['raspicam-node-dev'] * this mess with userland is hopefully temporary and turtlebot3 will eventually use the new implementation introduced in Raspberry Pi OS image based on Debian Bullseye https://www.raspberrypi.com/news/bullseye-camera-system/ there are already some changes for this in meta-raspberrypi: agherzan/meta-raspberrypi#963 and meta-oe: openembedded/meta-openembedded#496 Signed-off-by: Martin Jansa <[email protected]>
…ngl in DISTRO_FEATURES and blacklist otherwise * now when we're building for arm with ROS DISTRO and aarch64 with webOS OSE DISTRO it fails to build raspicam-node because default DISTRO configuration doesn't have 'opengl' in DISTRO_FEATURES * fixes: NOTE: Resolving any missing task queue dependencies ERROR: Nothing PROVIDES 'userland' (but /jenkins/home/anaconda/ros1-noetic-honister/meta-ros/meta-ros1/recipes-extended/raspicam-node/raspicam-node_git.bb DEPENDS on or otherwise requires it) userland was skipped: Recipe is blacklisted: depends on libegl-mesa from mesa-gl which is not available without opengl in DISTRO_FEATURES ERROR: Nothing RPROVIDES 'raspicam-node' (but /jenkins/home/anaconda/ros1-noetic-honister/meta-ros/meta-ros-common/recipes-core/packagegroups/packagegroup-ros-turtlebot3-core.bb, /jenkins/home/anaconda/ros1-noetic-honister/meta-ros/meta-ros1/recipes-extended/raspicam-node/raspicam-node_git.bb RDEPENDS on or otherwise requires it) No eligible RPROVIDERs exist for 'raspicam-node' NOTE: Runtime target 'raspicam-node' is unbuildable, removing... Missing or unbuildable dependency chain was: ['raspicam-node'] ERROR: Nothing RPROVIDES 'packagegroup-ros-turtlebot3-core' (but /jenkins/home/anaconda/ros1-noetic-honister/meta-ros/meta-ros-common/recipes-core/packagegroups/packagegroup-ros-turtlebot3-core.bb RDEPENDS on or otherwise requires it) No eligible RPROVIDERs exist for 'packagegroup-ros-turtlebot3-core' NOTE: Runtime target 'packagegroup-ros-turtlebot3-core' is unbuildable, removing... Missing or unbuildable dependency chain was: ['packagegroup-ros-turtlebot3-core'] ERROR: Nothing RPROVIDES 'raspicam-node-dev' (but /jenkins/home/anaconda/ros1-noetic-honister/meta-ros/meta-ros1/recipes-extended/raspicam-node/raspicam-node_git.bb RDEPENDS on or otherwise requires it) No eligible RPROVIDERs exist for 'raspicam-node-dev' NOTE: Runtime target 'raspicam-node-dev' is unbuildable, removing... Missing or unbuildable dependency chain was: ['raspicam-node-dev'] * this mess with userland is hopefully temporary and turtlebot3 will eventually use the new implementation introduced in Raspberry Pi OS image based on Debian Bullseye https://www.raspberrypi.com/news/bullseye-camera-system/ there are already some changes for this in meta-raspberrypi: agherzan/meta-raspberrypi#963 and meta-oe: openembedded/meta-openembedded#496 Signed-off-by: Martin Jansa <[email protected]>
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.
Can you also please rebase/squash everything into one commit that has the common git log format (https://meta-raspberrypi.readthedocs.io/en/latest/contributing.html#formatting-patches).
inherit cmake pkgconfig | ||
|
||
# Specify extra options: | ||
# EXTRA_OECMAKE = "-DENABLE_DRM=0 -DENABLE_X11=0 -DENABLE_QT=0 -DENABLE_OPENCV=1 -DENABLE_TFLITE=0" |
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.
Clean up this comment.
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.
Remove it you mean?
Letting user know options to bbapend and customize the build makes sense as a comment?
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.
I'm not sure what this is all about. Could you explain what did you mean by this comment block?
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.
This are cmake options for libcamera-apps, that are documented here:
https://www.raspberrypi.com/documentation/accessories/camera.html#building-libcamera-apps
We can check automatically for this options, if opencv, tensorflow, qt, x11 are present, and -DENABLE_COMPILE_FLAGS_FOR_TARGET=armv8-neon when building for Pi 3 and Pi 4 in 32 bit.
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.
That's what we should do. Based on distro features.
Add recipe to build raspberry camera apps that uses libcamera and are replacements for userland raspstill and raspvid. Signed-off-by: Mauro Anjo <[email protected]>
…ta-raspberrypi into add_libcamera_apps
Ops, when rebasing and squashing i did something wrong. Updated the libcamera-apps commit source because newest version of libcamera would crash the build. Also tried to add changes requested by @agherzan , I'm still finding my way around yocto, so please check if this will do. |
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.
Please also:
- rename the recipe to
rpi-libcamera-apps_git.bb
. This fixes the version in this way and it is clear that the component is from RPI foundation. - squash all commits - the PR should have one and only one commit given what your content is:
libcamera-apps: Add recipe for raspberry camera apps
S = "${WORKDIR}/git" | ||
|
||
DEPENDS = "libcamera opencv boost libjpeg-turbo libexif tiff" | ||
RDEPENDS:${PN} = "libcamera opencv boost libjpeg-turbo libexif tiff python3-core" |
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.
Do we need these RDEPENDS? The packaging should be able to infer them without having them explicit. Any issues with that?
|
||
SRC_URI = "git://github.com/raspberrypi/libcamera-apps.git;branch=main;protocol=https" | ||
|
||
PV = "1.0+git${SRCPV}" |
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.
There is no such version as far as I can see. I don't see any 1.0 tags in the repo. Just use git
in the recipe filename.
${@bb.utils.contains("MACHINE", "raspberrypi4", "-DENABLE_COMPILE_FLAGS_FOR_TARGET=armv8-neon", "", d)} \ | ||
" | ||
|
||
PACKAGECONFIG[qt] = "-DENABLE_QT=1" |
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.
Can we have the explicit disable as well for all these PACKAGECONFIG entries?
eg: PACKAGECONFIG[qt] = "-DENABLE_QT=1, -DENABLE_QT=0"
|
||
inherit cmake pkgconfig | ||
|
||
EXTRA_OECMAKE = "${@bb.utils.contains("DISTRO_FEATURES", "x11", "-DENABLE_X11=1", "-DENABLE_X11=0", d)} \ |
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.
This would be nicer to handle as a PACKAGECONFIG
. And you enable it by default for the right DISTRO_FEATURES
match.
|
||
COMPATIBLE_MACHINE = "^rpi$" | ||
|
||
FILES:${PN}-dev = "${includedir} ${libdir}/pkgconfig" |
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.
This should be in by default hence not needed.
COMPATIBLE_MACHINE = "^rpi$" | ||
|
||
FILES:${PN}-dev = "${includedir} ${libdir}/pkgconfig" | ||
FILES:${PN} += "${libdir}/libpreview.so" |
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.
We can remove this and all the following using SOLIBS = ".so"
. I assume the package provides unversioned libraries only.
Hello, libcamera and libcamera-apps are making a lot of important, and also breaking, changes on last commits. Now the recipe in openembedded for libcamera is no longer compatible with this layer due to meson build options that do not enable raspberry pi libcamera pipelines and ipas. we need to add raspberrypi to -Dpipelines and -Dipas for it to work properly. This should be done inside meta-raspberry pi as a custom recipe for libcamera right? |
Indeed. That sounds like a bbappend here. |
Hi @maurosanjo. Any updates on this? I'm tempted to close the MR but it would be a bit of a waste unless you are not onto it anymore. |
Closing for now but feel free to comment if you manage to pick it up. |
Enables use of new approach to handle cameras in Raspberry pi boards.