Is /usr/lib/aarch64-linux-gnu/libv4l2.so open source?

Hi guys,
I need source code of libv4l2.so library for Tegra, so where can I find it ?
Thanks so much.

I don’t know specifically where to find that, probably in the sources at your L4T release (see “head -n 1 /etc/nv_tegra_release”):
https://developer.nvidia.com/linux-tegra

Note that you can use the dpkg tool to find out which package provides a file (you have to use the full path, and it has to be to the hard link, not the symbolic link). If you run this command you will find the final link (most of the time) which is a hard link and not a symbolic link:
ls -l /usr/lib/aarch64-linux-gnu/libv4l2.so*

Let’s say you then find you are looking for libv4l2.so.0.0.0:
dpkg -S /usr/lib/aarch64-linux-gnu/libv4l2.so.0.0.0

That is the package you want. You will probably find that this is distributed from Linux and that it isn’t specific to NVIDIA via package libv4l-0:aarch64. I’m only guessing, but the source is probably part of the “sources” for that L4T release, and also is part of the sample rootfs (but in binary form only in the sample rootfs).

The next useful command would be (assuming it is libv4l-0):
apt policylibv4l-0
(in a multi-arch setup you could also name the architecture)

In the above there is a URL for a package server.

You can also find some details with:
dpkg -s libv4l-0
(I am assuming that is the package name, but adjust for differences)

This last one might give you a home URL for the package, e.g.:
https://linuxtv.org/downloads/v4l-utils/

Just remember that finding the source does not necessarily tell you about which compiler or build settings the source uses. If you pull this out of a source .deb package, then chances are some configuration will exist with it. Those are usually a “-dev” version of the package headers. If you already have the debian source file repos enabled, you could do this (same thing, using that example name):
apt-get source libv4l-0

If you don’t have the repos enabled, see:
https://www.tecmint.com/fix-deb-src-uris-in-your-sources-list-error/

Basically, the sources file is just bash script, and you can uncomment the deb-src you are interested in by removing the leading #. Don’t forget that there might be build requirements, and this might be enough:
sudo apt-get build-dep libv4l-0
(requires the deb-src to be enabled first)

Sorry, I can’t give you an exact answer since I don’t know specific details myself.

hello hhami.20401,

it’s 3rdparty utility, you may refer to v4l-utils.git - media (V4L2, DVB and IR) applications and libraries for more details.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.