Skip to content

qairt-sdk: upgrade 2.47.0 -> 2.50.0 and add Hamoa, Purwa, Shikra support - #3128

Open
Raja Ganapathi Busam (Raja-Ganapathi-Busam) wants to merge 1 commit into
qualcomm-linux:masterfrom
Raja-Ganapathi-Busam:upgrade_qairt_2_50
Open

Raja Ganapathi Busam (Raja-Ganapathi-Busam) wants to merge 1 commit into
qualcomm-linux:masterfrom
Raja-Ganapathi-Busam:upgrade_qairt_2_50

Conversation

@Raja-Ganapathi-Busam

Copy link
Copy Markdown
Contributor

Upgrade version from 2.47.0.260601 to 2.50.0.260828

v2.50.0 introduces libGenieService.so which has a hard DT_NEEDED on libsystemd.so.0. Restrict the recipe to systemd-based distros via REQUIRED_DISTRO_FEATURES = "systemd" since the library cannot function without it. Also add INSANE_SKIP:${PN} += "file-rdeps" to suppress the file-based dependency resolver for the libsystemd.so.0 versioned symbol, consistent with how all Hexagon sub-packages are already handled.

Add Hexagon DSP library support for three new platforms following the same install path conventions established by qcom-fastcv-binaries:

  • Hamoa IoT EVK (x1e80100): hexagon-v73 binaries installed to ${datadir}/qcom/x1e80100/Qualcomm/Hamoa-IoT-EVK/dsp/cdsp, folded into the existing ${PN}-hexagon-v73 package.
  • Purwa IoT EVK (x1p42100): shares Hamoa's v73 DSP firmware at runtime; no files are installed, consistent with the hexagon-dsp-binaries and qcom-fastcv-binaries treatment of Purwa.
  • Shikra CQS-EVK: hexagon-v66 binaries installed to ${datadir}/qcom/shikra/Qualcomm/Shikra-CQS-EVK/dsp/cdsp, folded into the existing ${PN}-hexagon-v66 package alongside QCS615-RIDE.

@Raja-Ganapathi-Busam

Copy link
Copy Markdown
Contributor Author

ERROR: qairt-sdk-2.50.0.260828-r0 do_fetch: Fetcher failure: Fetch command ['wget', '--tries=2', '--timeout=100', '--output-document=/downloads/v2.50.0.260828.zip.tmp', '--continue', '--directory-prefix=/downloads', 'https://softwarecenter.qualcomm.com/api/download/software/sdks/Qualcomm_AI_Runtime_Community/All/2.50.0.260828/v2.50.0.260828.zip', '--progress=dot', '--verbose'] failed with exit code 4, see logfile for output

The URL is accessible and we are able to fetch zip successfully.

is the failure because of the timeout?
The zip file is of 2.4 GB in size.

@lumag Dmitry Baryshkov (lumag) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, why does that library depend on systemd?

PLATFORM_DIR = "${@platform_dir(d)}"

# libGenieService.so has a hard DT_NEEDED on libsystemd.so.0 and cannot
# function without it. Restrict the recipe to systemd-based distros.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add DEPENDS on systemd too.

cp -r ${S}/lib/hexagon-v66/unsigned/* ${D}${datadir}/qcom/shikra/Qualcomm/Shikra-CQS-EVK/dsp/cdsp
cp -r ${S}/lib/hexagon-v68/unsigned/* ${D}${datadir}/qcom/qcm6490/Thundercomm/RB3gen2/dsp/cdsp
cp -r ${S}/lib/hexagon-v73/unsigned/* ${D}${datadir}/qcom/sa8775p/Qualcomm/SA8775P-RIDE/dsp/cdsp
cp -r ${S}/lib/hexagon-v73/unsigned/* ${D}${datadir}/qcom/x1e80100/Qualcomm/Hamoa-IoT-EVK/dsp/cdsp

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you force multiple copies of the libraries into the rootfs? Use symlinks between the libs.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be hexagon version specific folders would be more meaningful, along with a target to hexagon version map.
Since it involves many changes, for now, added symlinks to avoid copies.

# file-rdeps resolver may still fail to match the versioned symbol
# libsystemd.so.0(LIBSYSTEMD_209)(64bit) when systemd is not in the current
# build's pkgdata. Suppress the check; the RDEPENDS below covers it.
INSANE_SKIP:${PN} += "file-rdeps"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No random check suppressions. For the hexagon binaries it was a correct workaround since it concerned a foreign-arch libs with the actual libraries being provided by the DSP itself. In this case, no. Use DEPENDS to let OE / rpm find correct runtime dependencies.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Earlier, I thought adding DEPENDS would bring unnecessary build time dependencies. But since it is helping to resolve the runtime dependencies automatically, these skip checks can be avoided. Updated accordingly.

FILES:${PN}-hexagon-v75 += "${datadir}/qcom/qcs8300/Qualcomm/QCS8300-RIDE/dsp/cdsp"

RDEPENDS:${PN} += "fastrpc"
RDEPENDS:${PN} += "fastrpc systemd"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it in RDEPENDS?

@Raja-Ganapathi-Busam Raja Ganapathi Busam (Raja-Ganapathi-Busam) Sep 12, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't notice there is a separate package for libsystemd. Now, this is automatically handled by OE after DEPENDS on systemd.

@quaresmajose

Copy link
Copy Markdown
Contributor

ERROR: qairt-sdk-2.50.0.260828-r0 do_fetch: Fetcher failure: Fetch command ['wget', '--tries=2', '--timeout=100', '--output-document=/downloads/v2.50.0.260828.zip.tmp', '--continue', '--directory-prefix=/downloads', 'https://softwarecenter.qualcomm.com/api/download/software/sdks/Qualcomm_AI_Runtime_Community/All/2.50.0.260828/v2.50.0.260828.zip', '--progress=dot', '--verbose'] failed with exit code 4, see logfile for output

The URL is accessible and we are able to fetch zip successfully.

is the failure because of the timeout? The zip file is of 2.4 GB in size.

It's possible that this could be the problem; could you please test the following?

--- a/recipes-ml/qairt/qairt-sdk_2.50.0.260828.bb
+++ b/recipes-ml/qairt/qairt-sdk_2.50.0.260828.bb
@@ -11,6 +11,10 @@ LICENSE = "LicenseRef-qcom-ai-stack"
 LIC_FILES_CHKSUM = "file://LICENSE.pdf;md5=878b885995f453e328edbcd5a1302306"
 NO_GENERIC_LICENSE[qcom-ai-stack] = "LICENSE.pdf"
 
+# The zip file is quite large ~2.4 GB
+# Tt's better to increase the default tries from 2 and timeout from 100.
+FETCHCMD_wget = "wget --tries=5 --timeout=1000"
+
 SRC_URI = "https://softwarecenter.qualcomm.com/api/download/software/sdks/Qualcomm_AI_Runtime_Community/All/${PV}/v${PV}.zip"
 SRC_URI[sha256sum] = "a346ea0e2c8631b46d57261a4969994cd9cc34124a8355bbc7b08b2c8bd859a5"

# libGenieService.so has a hard DT_NEEDED on libsystemd.so.0 and cannot
# function without it. Restrict the recipe to systemd-based distros.
inherit features_check
REQUIRED_DISTRO_FEATURES = "systemd"

@quaresmajose Jose Quaresma (quaresmajose) Sep 12, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With systemd in DEPENDS this snip is no more required.

@ricardosalveti

Copy link
Copy Markdown
Contributor

Larger 2.50 hexagon-v73 payload pushes initramfs-kerneltest-image over INITRAMFS_MAXSIZE on iq-9075-evk and qcs9100-ride-sx, that will need a bump.

@lumag

Copy link
Copy Markdown
Contributor

Larger 2.50 hexagon-v73 payload pushes initramfs-kerneltest-image over INITRAMFS_MAXSIZE on iq-9075-evk and qcs9100-ride-sx, that will need a bump.

... and it needs to be a part of this PR (just an explanation for Raja Ganapathi Busam (@Raja-Ganapathi-Busam) ).

@Raja-Ganapathi-Busam

Copy link
Copy Markdown
Contributor Author

Larger 2.50 hexagon-v73 payload pushes initramfs-kerneltest-image over INITRAMFS_MAXSIZE on iq-9075-evk and qcs9100-ride-sx, that will need a bump.

... and it needs to be a part of this PR (just an explanation for Raja Ganapathi Busam (Raja Ganapathi Busam (@Raja-Ganapathi-Busam)) ).

Current limit for INITRAMFS_MAXSIZE is 640 MB.

When compared "image" folder from recipe workspace between 2.47.0 and 2.50.0, noticed an increase of 100 MB.

can we increase it to 740 MB to accommodate the bump in QAIRT SDK libraries while keeping the space for future growth same as now?

will it work for 1GB RAM device (db410c)?

@lumag

Copy link
Copy Markdown
Contributor

Larger 2.50 hexagon-v73 payload pushes initramfs-kerneltest-image over INITRAMFS_MAXSIZE on iq-9075-evk and qcs9100-ride-sx, that will need a bump.

... and it needs to be a part of this PR (just an explanation for Raja Ganapathi Busam (Raja Ganapathi Busam (Raja Ganapathi Busam (@Raja-Ganapathi-Busam))) ).

Current limit for INITRAMFS_MAXSIZE is 640 MB.

When compared "image" folder from recipe workspace between 2.47.0 and 2.50.0, noticed an increase of 100 MB.

can we increase it to 740 MB to accommodate the bump in QAIRT SDK libraries while keeping the space for future growth same as now?

will it work for 1GB RAM device (db410c)?

I'd rather question, why do we need QAIRT SDK Hexagon libaries in those initramfs images.

@Raja-Ganapathi-Busam

Copy link
Copy Markdown
Contributor Author

Larger 2.50 hexagon-v73 payload pushes initramfs-kerneltest-image over INITRAMFS_MAXSIZE on iq-9075-evk and qcs9100-ride-sx, that will need a bump.

... and it needs to be a part of this PR (just an explanation for Raja Ganapathi Busam (Raja Ganapathi Busam (Raja Ganapathi Busam (Raja Ganapathi Busam (@Raja-Ganapathi-Busam)))) ).

Current limit for INITRAMFS_MAXSIZE is 640 MB.
When compared "image" folder from recipe workspace between 2.47.0 and 2.50.0, noticed an increase of 100 MB.
can we increase it to 740 MB to accommodate the bump in QAIRT SDK libraries while keeping the space for future growth same as now?
will it work for 1GB RAM device (db410c)?

I'd rather question, why do we need QAIRT SDK Hexagon libaries in those initramfs images.

This I need to understand. How QAIRT SDK is getting packed to initramfs image. How to disable it.

@quaresmajose

Copy link
Copy Markdown
Contributor

Larger 2.50 hexagon-v73 payload pushes initramfs-kerneltest-image over INITRAMFS_MAXSIZE on iq-9075-evk and qcs9100-ride-sx, that will need a bump.

... and it needs to be a part of this PR (just an explanation for Raja Ganapathi Busam (Raja Ganapathi Busam (Raja Ganapathi Busam (Raja Ganapathi Busam (Raja Ganapathi Busam (@Raja-Ganapathi-Busam))))) ).

Current limit for INITRAMFS_MAXSIZE is 640 MB.
When compared "image" folder from recipe workspace between 2.47.0 and 2.50.0, noticed an increase of 100 MB.
can we increase it to 740 MB to accommodate the bump in QAIRT SDK libraries while keeping the space for future growth same as now?
will it work for 1GB RAM device (db410c)?

I'd rather question, why do we need QAIRT SDK Hexagon libaries in those initramfs images.

This I need to understand. How QAIRT SDK is getting packed to initramfs image. How to disable it.

The qairt-sdk-hexagon-vXX is in MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS of the following machines:

$ grep qairt-sdk conf -r
conf/machine/iq-8275-evk.conf:    qairt-sdk-hexagon-v75 \
conf/machine/iq-9075-evk.conf:    qairt-sdk-hexagon-v73 \
conf/machine/qcm6490-idp.conf:    qairt-sdk-hexagon-v68 \
conf/machine/qcs8300-ride-sx.conf:    qairt-sdk-hexagon-v75 \
conf/machine/qcs9100-ride-sx.conf:    qairt-sdk-hexagon-v73 \
conf/machine/rb3gen2-core-kit.conf:    qairt-sdk-hexagon-v68 \
conf/machine/iq-615-evk.conf:    qairt-sdk-hexagon-v66 \

Regarding the size occupied, we have:

$ tree /work/build/tmp/work/*/qairt-sdk/*/packages-split --du -h  | grep ^├─
├── [486M]  qairt-sdk
├── [   0]  qairt-sdk-dbg
├── [4.6M]  qairt-sdk-dev
├── [   0]  qairt-sdk-doc
├── [ 12M]  qairt-sdk-hexagon-v66
├── [ 52M]  qairt-sdk-hexagon-v68
├── [ 58M]  qairt-sdk-hexagon-v73
├── [ 47M]  qairt-sdk-hexagon-v75
├── [   0]  qairt-sdk-locale
├── [  95]  qairt-sdk.shlibdeps
├── [   0]  qairt-sdk-src

Finally, I just need to understand why qairt-sdk is installed.

@ricardosalveti

Copy link
Copy Markdown
Contributor

This is a lot, we probably don't need / want qairt in the initrds, so we will have to find another way.

@quaresmajose

Copy link
Copy Markdown
Contributor

Raja Ganapathi Busam (@Raja-Ganapathi-Busam) can you please try this extra snip?

--- a/recipes-test/images/initramfs-kerneltest-image.bb
+++ b/recipes-test/images/initramfs-kerneltest-image.bb
@@ -1,3 +1,11 @@
 require initramfs-test-image.bb
 
 PACKAGE_INSTALL += "${MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS}"
+
+python __anonymous () {
+  meer = d.getVar('MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS') or ''
+  for p in meer.split():
+    # exclude qairt-sdk-hexagon-vXX
+    if 'qairt-sdk-hexagon-v' in p:
+      d.setVar('PACKAGE_INSTALL:remove', p)
+}

@Raja-Ganapathi-Busam

Copy link
Copy Markdown
Contributor Author

The qairt-sdk-hexagon-vXX is in MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS

QAIRT was added to machine recommends to follow similar approach as FastRPC, as part of the first enablement PR.
#1412 (comment)

@Raja-Ganapathi-Busam

Copy link
Copy Markdown
Contributor Author

Raja Ganapathi Busam (Raja Ganapathi Busam (@Raja-Ganapathi-Busam)) can you please try this extra snip?

--- a/recipes-test/images/initramfs-kerneltest-image.bb
+++ b/recipes-test/images/initramfs-kerneltest-image.bb
@@ -1,3 +1,11 @@
 require initramfs-test-image.bb
 
 PACKAGE_INSTALL += "${MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS}"
+
+python __anonymous () {
+  meer = d.getVar('MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS') or ''
+  for p in meer.split():
+    # exclude qairt-sdk-hexagon-vXX
+    if 'qairt-sdk-hexagon-v' in p:
+      d.setVar('PACKAGE_INSTALL:remove', p)
+}

Let me try this.

Upgrade version from 2.47.0.260601 to 2.50.0.260828

v2.50.0 introduces libGenieService.so which has a hard DT_NEEDED on
libsystemd.so.0. Add DEPENDS on systemd.

Add Hexagon DSP library support for three new platforms following the
same install path conventions established by qcom-fastcv-binaries.
Use symlinks to avoid copies of the libraries.

- Hamoa IoT EVK (x1e80100): hexagon-v73 binaries installed to
  ${datadir}/qcom/x1e80100/Qualcomm/Hamoa-IoT-EVK/dsp/cdsp, folded
  into the existing ${PN}-hexagon-v73 package.
- Purwa IoT EVK (x1p42100): shares Hamoa's v73 DSP firmware at
  runtime; no files are installed, consistent with the
  hexagon-dsp-binaries and qcom-fastcv-binaries treatment of Purwa.
- Shikra CQS-EVK: hexagon-v66 binaries installed to
  ${datadir}/qcom/shikra/Qualcomm/Shikra-CQS-EVK/dsp/cdsp, folded
  into the existing ${PN}-hexagon-v66 package alongside QCS615-RIDE.

Exclude qairt-sdk-hexagon-vXX packages from initramfs-kerneltest-image.

Signed-off-by: Raja Ganapathi Busam <rbusam@qti.qualcomm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants