Skip to content
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 usage in Pi Zero #1902

Closed
H-xie opened this issue May 14, 2021 · 10 comments
Closed

libcamera usage in Pi Zero #1902

H-xie opened this issue May 14, 2021 · 10 comments

Comments

@H-xie
Copy link

H-xie commented May 14, 2021

Hi, I'm afraid we've only ever run libcamera ourselves on a Pi 3 or 4, my apologies for not making this clearer on the instructions page. libcamera moves a lot of the processing load formerly on the Broadcom GPU onto the ARM cores, so it helps if they are reasonably capable. It may be that it optimises by default for a more powerful type of ARM processor than you have, so you could try deleting and remaking the build directory, and running cmake like this:
cmake -DENABLE_COMPILE_FLAGS_FOR_TARGET=none ..
Unfortunately, I would expect that you may encounter further problems down the line.

Hi, I'm afraid we've only ever run libcamera ourselves on a Pi 3 or 4, my apologies for not making this clearer on the instructions page. libcamera moves a lot of the processing load formerly on the Broadcom GPU onto the ARM cores, so it helps if they are reasonably capable. It may be that it optimises by default for a more powerful type of ARM processor than you have, so you could try deleting and remaking the build directory, and running cmake like this:
cmake -DENABLE_COMPILE_FLAGS_FOR_TARGET=none ..
Unfortunately, I would expect that you may encounter further problems down the line.

Originally posted by @davidplowman in raspberrypi/rpicam-apps#31 (comment)


cmake -DENABLE_COMPILE_FLAGS_FOR_TARGET=none .. for Pi Zero
Could this information be added to the document?
Maybe this page

@H-xie H-xie closed this as completed May 14, 2021
@H-xie H-xie changed the title Hi, I'm afraid we've only ever run libcamera ourselves on a Pi 3 or 4, my apologies for not making this clearer on the instructions page. libcamera moves a lot of the processing load formerly on the Broadcom GPU onto the ARM cores, so it helps if they are reasonably capable. It may be that it optimises by default for a more powerful type of ARM processor than you have, so you could try deleting and remaking the build directory, and running cmake like this: libcamera usage in Pi Zero May 14, 2021
@H-xie H-xie reopened this May 14, 2021
@lurch
Copy link
Contributor

lurch commented May 14, 2021

If it affects the Pi Zero, I suspect it'll also affect the Pi 1 too, so we need someone to experiment and test where the cut-off lies, e.g. does the Pi2 also need cmake -DENABLE_COMPILE_FLAGS_FOR_TARGET=none .. ? 🤷
(unfortunately I don't have the time for this myself)

@davidplowman
Copy link
Contributor

I probably need to look up exactly how I tell the different kinds of Pi apart. The build script is for Cortex A-53 (or later) systems, but I think that's a better fix than changing the documentation.

@davidplowman
Copy link
Contributor

That fix has been merged now and should resolve the problem. We should be able to close this issue now, though please advise if there are still problems.

@lurch
Copy link
Contributor

lurch commented May 17, 2021

Thanks @davidplowman , closing this issue as requested.

@H-xie Please let us know if you're still having problems with the latest version of libcamera.

@lurch lurch closed this as completed May 17, 2021
@H-xie
Copy link
Author

H-xie commented May 18, 2021

Thank you for the responses.
No further problems for now.

@raffaeler
Copy link

@davidplowman I just installed bullseye (and fully updated) on a RPi zero W2 and libcamera-hello fails with a failed to import fd 19.
Is the RPi zero W2 supposed to work with libcamera?

@davidplowman
Copy link
Contributor

Hi, this is a closed documentation issue, so it might be better to file a bug report on the libcamera-apps repo. Before doing that, maybe just double-check the documentation. Thanks very much!

@raffaeler
Copy link

Hi @davidplowman I already checked the documentation but the only phrase about the zero is the following:

It may perform better on Raspberry Pi 2 and Raspberry Pi Zero devices, as it offloads more to the GPU and is less dependent on the ARM cores.

Unfortunately it does not specify to the Zero 1 or Zero 2, which is why I asked here if it is supposed to work.
With regards to the error, I will ask in the other repo only if it is expected to work.

Thank you

@lurch
Copy link
Contributor

lurch commented Jun 17, 2022

"Raspberry Pi Zero" by itself always refers to the "Zero 1".
Our official naming is "Raspberry Pi Zero" and "Raspberry Pi Zero 2 W". In software-terms, I believe the Zero 2 should behave like a Pi 3, just with less RAM.

@raffaeler
Copy link

Thank you @lurch.
I would suggest to specify the supported devices at the beginning of each article.
From your answer I assume that libcamera should work on the Zero 2, therefore I will ask on the other repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants