Skip to content

Camera, sensors: switch to main protobuf version#1580

Merged
ricardosalveti merged 4 commits intoqualcomm-linux:masterfrom
lumag:protobuf-camx-alt
Feb 18, 2026
Merged

Camera, sensors: switch to main protobuf version#1580
ricardosalveti merged 4 commits intoqualcomm-linux:masterfrom
lumag:protobuf-camx-alt

Conversation

@lumag
Copy link
Copy Markdown
Contributor

@lumag lumag commented Feb 16, 2026

Upgrade sensors and camera binaries to the version which is linked against protobuf version from meta-oe.

This is an alternative to #1571, keeping the protobuf-camx name for the sake of simplifying handling the of binary vs meta-oe handling in future. When the situation repeats there would be no need to switch between protobuf and protobuf-camx anymore.

@lumag
Copy link
Copy Markdown
Contributor Author

lumag commented Feb 16, 2026

cc @gkhose-qipl

@quaresmajose
Copy link
Copy Markdown
Contributor

The problem that led to the exchange between protobuf-camx and protobuf was the library soname versions. I don't see how the proposed solution solves the problem when it comes again without copy the downgraded recipe from meta-oe. Can you explain it please?

@lumag
Copy link
Copy Markdown
Contributor Author

lumag commented Feb 16, 2026

The problem that led to the exchange between protobuf-camx and protobuf was the library soname versions. I don't see how the proposed solution solves the problem when it comes again without copy the downgraded recipe from meta-oe. Can you explain it please?

If you take a look at #1491, we had to vendor in the version from meta-oe and change all camera / sensors recipes to use protobuf-camx. With the proposed approach in place, the only change would be to change the protobuf-camx recipe from the empty stub to the full-featured protobuf implementation and back.

koenkooi
koenkooi previously approved these changes Feb 17, 2026
@quaresmajose
Copy link
Copy Markdown
Contributor

The problem that led to the exchange between protobuf-camx and protobuf was the library soname versions. I don't see how the proposed solution solves the problem when it comes again without copy the downgraded recipe from meta-oe. Can you explain it please?

If you take a look at #1491, we had to vendor in the version from meta-oe and change all camera / sensors recipes to use protobuf-camx. With the proposed approach in place, the only change would be to change the protobuf-camx recipe from the empty stub to the full-featured protobuf implementation and back.

I think this will not work because your current protobuf-camx is empty. Therefore, it will not provide the dependencies that are necessary for its users recipes.

It seems to me that what you want to do would be easier using a virtual name with PROVIDES/RPROVIDES and flip it by the the backport from meta-oe when it breaks next time:

cat <'_EOF_' >> dynamic-layers/openembedded-layer/recipes-support/protobuf/protobuf_%.bbappend
PNCAMX:qcom = "${PN}-camx"
PROVIDES:qcom += "${PNCAMX}-compiler ${PNCAMX}-lite"
RPROVIDES:${PN}:qcom += "${PNCAMX}-compiler ${PNCAMX}-lite"
_EOF_

@lumag
Copy link
Copy Markdown
Contributor Author

lumag commented Feb 17, 2026

The problem that led to the exchange between protobuf-camx and protobuf was the library soname versions. I don't see how the proposed solution solves the problem when it comes again without copy the downgraded recipe from meta-oe. Can you explain it please?

If you take a look at #1491, we had to vendor in the version from meta-oe and change all camera / sensors recipes to use protobuf-camx. With the proposed approach in place, the only change would be to change the protobuf-camx recipe from the empty stub to the full-featured protobuf implementation and back.

I think this will not work because your current protobuf-camx is empty. Therefore, it will not provide the dependencies that are necessary for its users recipes.

The (empty) protobuf-camx recipe will pull in protobuf recipe, adding protobuf library to the sysroot. Then, when building packages, OE will correctly identify packages providing those libs and add them to RDEPENDS.

It seems to me that what you want to do would be easier using a virtual name with PROVIDES/RPROVIDES and flip it by the the backport from meta-oe when it breaks next time:

cat <'_EOF_' >> dynamic-layers/openembedded-layer/recipes-support/protobuf/protobuf_%.bbappend
PNCAMX:qcom = "${PN}-camx"
PROVIDES:qcom += "${PNCAMX}-compiler ${PNCAMX}-lite"
RPROVIDES:${PN}:qcom += "${PNCAMX}-compiler ${PNCAMX}-lite"
_EOF_

@quaresmajose
Copy link
Copy Markdown
Contributor

The (empty) protobuf-camx recipe will pull in protobuf recipe, adding protobuf library to the sysroot. Then, when building packages, OE will correctly identify packages providing those libs and add them to RDEPENDS.

The problem that led to the exchange between protobuf-camx and protobuf was the library soname versions. I don't see how the proposed solution solves the problem when it comes again without copy the downgraded recipe from meta-oe. Can you explain it please?

If you take a look at #1491, we had to vendor in the version from meta-oe and change all camera / sensors recipes to use protobuf-camx. With the proposed approach in place, the only change would be to change the protobuf-camx recipe from the empty stub to the full-featured protobuf implementation and back.

I think this will not work because your current protobuf-camx is empty. Therefore, it will not provide the dependencies that are necessary for its users recipes.

The (empty) protobuf-camx recipe will pull in protobuf recipe, adding protobuf library to the sysroot. Then, when building packages, OE will correctly identify packages providing those libs and add them to RDEPENDS.

If you say that the OE will correctly provide the RDEPENDS and will not use the protobuf-camx on that, then I take back what I said.

It seems to me that what you want to do would be easier using a virtual name with PROVIDES/RPROVIDES and flip it by the the backport from meta-oe when it breaks next time:

cat <'_EOF_' >> dynamic-layers/openembedded-layer/recipes-support/protobuf/protobuf_%.bbappend
PNCAMX:qcom = "${PN}-camx"
PROVIDES:qcom += "${PNCAMX}-compiler ${PNCAMX}-lite"
RPROVIDES:${PN}:qcom += "${PNCAMX}-compiler ${PNCAMX}-lite"
_EOF_

In any case, I still think it's more correct to do this with PROVIDES/RPROVIDES.

@koenkooi
Copy link
Copy Markdown
Contributor

The (empty) protobuf-camx recipe will pull in protobuf recipe, adding protobuf library to the sysroot. Then, when building packages, OE will correctly identify packages providing those libs and add them to RDEPENDS.

The problem that led to the exchange between protobuf-camx and protobuf was the library soname versions. I don't see how the proposed solution solves the problem when it comes again without copy the downgraded recipe from meta-oe. Can you explain it please?

If you take a look at #1491, we had to vendor in the version from meta-oe and change all camera / sensors recipes to use protobuf-camx. With the proposed approach in place, the only change would be to change the protobuf-camx recipe from the empty stub to the full-featured protobuf implementation and back.

I think this will not work because your current protobuf-camx is empty. Therefore, it will not provide the dependencies that are necessary for its users recipes.

The (empty) protobuf-camx recipe will pull in protobuf recipe, adding protobuf library to the sysroot. Then, when building packages, OE will correctly identify packages providing those libs and add them to RDEPENDS.

If you say that the OE will correctly provide the RDEPENDS and will not use the protobuf-camx on that, then I take back what I said.

DEPENDS are transitive, so the upstream protobuf libraries will be in sysroot, as @lumag pointed out above. This in turn enables the OE shlib dependency solver to see both the library and its provider to generate RDEPENDS correctly. What you list in DEPENDS has no bearing on RDEPENDS, the shlib code only looks at the sysroot.
Take glibc as an example, it's rarely listed in DEPENDS, but the shlib solver does add it to all packages needing it since it will be in the sysroot thanks to other recipes pulling it in.

What you manually list in RDEPENDS does matter, but that's not the case here.

@quaresmajose
Copy link
Copy Markdown
Contributor

Lets sopose another component/package will need the protobuf-compiler on the target and he needs to add it to his RDEPENDS. How should he do this? Should he use RDEPENDS${PN} = "protobuf-compiler" or RDEPENDS${PN} = "protobuf-camx-compiler"? or none of them will work?

@lumag
Copy link
Copy Markdown
Contributor Author

lumag commented Feb 17, 2026

Lets sopose another component/package will need the protobuf-compiler on the target and he needs to add it to his RDEPENDS. How should he do this? Should he use RDEPENDS${PN} = "protobuf-compiler" or RDEPENDS${PN} = "protobuf-camx-compiler"? or none of them will work?

Just DEPENDS += "protobuf-camx" and then link against the protobuf libs as usual.

@quaresmajose
Copy link
Copy Markdown
Contributor

Lets sopose another component/package will need the protobuf-compiler on the target and he needs to add it to his RDEPENDS. How should he do this? Should he use RDEPENDS${PN} = "protobuf-compiler" or RDEPENDS${PN} = "protobuf-camx-compiler"? or none of them will work?

Just DEPENDS += "protobuf-camx" and then link against the protobuf libs as usual.

The protobuf-compiler is a binary, so no linked. My question is, if it will be necessary on the target image and not at build time. In this case, you need to provide the RDEPENDS manually.

@lumag
Copy link
Copy Markdown
Contributor Author

lumag commented Feb 17, 2026

Lets sopose another component/package will need the protobuf-compiler on the target and he needs to add it to his RDEPENDS. How should he do this? Should he use RDEPENDS${PN} = "protobuf-compiler" or RDEPENDS${PN} = "protobuf-camx-compiler"? or none of them will work?

Just DEPENDS += "protobuf-camx" and then link against the protobuf libs as usual.

The protobuf-compiler is a binary, so no linked. My question is, if it will be necessary on the target image and not at build time. In this case, you need to provide the RDEPENDS manually.

Ah, I see your point now.

lumag and others added 4 commits February 17, 2026 19:08
The CamX and sensors stacks are upgraded to build with the latest
protobuf from meta-oe. Keep the protobuf-camx recipe name to ease
resolving this situation in future: all CamX and sensors recipes are
expected to always depend on the protobuf-camx, while that recipe will
either pull in the latest protobuf from meta-oe or provide an
implementation required by the proprietary stack.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
This update upgrades sensor binaries from 1.0.6 to 1.0.7, along with
updating the code to the latest protobuf version and incorporating the
open‑sourced utils from qcom‑sensors‑binaries.

Co-developed-by: Bhanu Vivek Matsa <bmasta@qti.qualcomm.com>
Signed-off-by: Bhanu Vivek Matsa <bmasta@qti.qualcomm.com>
Signed-off-by: Ganesh Khose <gkhose@qti.qualcomm.com>
[DB: dropped sensinghub upgrade, not required for upgrading protobuf]
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Update camxlib DEPENDS to use the latest protobuf version instead of the
old.

Signed-off-by: Ganesh Khose <gkhose@qti.qualcomm.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Update camxlib DEPENDS to use the latest protobuf version instead of the
old.

Signed-off-by: Ganesh Khose <gkhose@qti.qualcomm.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
@lumag lumag force-pushed the protobuf-camx-alt branch from 88d3356 to d007c53 Compare February 17, 2026 17:08
@lumag
Copy link
Copy Markdown
Contributor Author

lumag commented Feb 17, 2026

Lets sopose another component/package will need the protobuf-compiler on the target and he needs to add it to his RDEPENDS. How should he do this? Should he use RDEPENDS${PN} = "protobuf-compiler" or RDEPENDS${PN} = "protobuf-camx-compiler"? or none of them will work?

Just DEPENDS += "protobuf-camx" and then link against the protobuf libs as usual.

The protobuf-compiler is a binary, so no linked. My question is, if it will be necessary on the target image and not at build time. In this case, you need to provide the RDEPENDS manually.

Ah, I see your point now.

Fixed now.

@ricardosalveti ricardosalveti merged commit f0948f7 into qualcomm-linux:master Feb 18, 2026
322 of 335 checks passed
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

Successfully merging this pull request may close these issues.

5 participants