Skip to content

recipes-support: Add new recipe for tftp-server#1445

Open
Pradeep-pvk wants to merge 4 commits intoqualcomm-linux:masterfrom
Pradeep-pvk:master
Open

recipes-support: Add new recipe for tftp-server#1445
Pradeep-pvk wants to merge 4 commits intoqualcomm-linux:masterfrom
Pradeep-pvk:master

Conversation

@Pradeep-pvk
Copy link
Copy Markdown

Add new prebuilt recipe for tftp-server to fetch Qualcomm properitary userspace application from artifactory. This application serves the Remote Files System (RFS) requests and provides additional storage space to MPSS and ADSP processors by storing data in the High Level Operating System (HLOS) fileystem.

Copy link
Copy Markdown
Contributor

@lumag lumag left a comment

Choose a reason for hiding this comment

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

It doesn't specify, why the binary is better than the open-source one
In general, I would not like to have it here.

@Pradeep-pvk
Copy link
Copy Markdown
Author

It doesn't specify, why the binary is better than the open-source one In general, I would not like to have it here.

The currently available open‑source binary “tqftpserv” does not yet support the full set of functionalities required to serve RFS requests. Development is still ongoing, and the missing features may not be completed until late this year. This delay could impact our targets and product timelines for QLI 2.0. Therefore, we propose using the downstream binary “tftp_server” from Artifactory in the interim.
Please suggest where this recipe would be best fit.

@lumag
Copy link
Copy Markdown
Contributor

lumag commented Jan 28, 2026

Please point out the ticket on tqftpserv describing the issue

@Pradeep-pvk
Copy link
Copy Markdown
Author

Please point out the ticket on tqftpserv describing the issue

Here is the ticket for the ongoing tqftpserv development work:
linux-msm/tqftpserv#29
In addition to this, there are few other items and features planned in the pipeline, such as multithreading support, TFTP windowing, and others.

@lumag
Copy link
Copy Markdown
Contributor

lumag commented Jan 28, 2026

Please point out the ticket on tqftpserv describing the issue

Here is the ticket for the ongoing tqftpserv development work: linux-msm/tqftpserv#29

It's not a ticket. It s a PR for adding syslog and a conf file, which has nothing to do with the issue that you've mentioned above:

"tqftpserv" does not yet support the full set of functionalities required to serve RFS requests

In addition to this, there are few other items and features planned in the pipeline, such as multithreading support, TFTP windowing, and others.

When you've dropped an email several days ago, you have been asked to provide description of the features you consider to be missing (your email had very brief sentences for them). As you've moved the discussion to GitHub, please fill the issues against the tqftpserv, describing the issue, impact and providing other necessary information. Until we can assess what is missing, tqftpserv is the preferred solution, the closed source implementation is rejected.

@Pradeep-pvk
Copy link
Copy Markdown
Author

Please point out the ticket on tqftpserv describing the issue

Here is the ticket for the ongoing tqftpserv development work: linux-msm/tqftpserv#29

It's not a ticket. It s a PR for adding syslog and a conf file, which has nothing to do with the issue that you've mentioned above:

i didn't get what do you mean by ticket then

"tqftpserv" does not yet support the full set of functionalities required to serve RFS requests

In addition to this, there are few other items and features planned in the pipeline, such as multithreading support, TFTP windowing, and others.

When you've dropped an email several days ago, you have been asked to provide description of the features you consider to be missing (your email had very brief sentences for them). As you've moved the discussion to GitHub, please fill the issues against the tqftpserv, describing the issue, impact and providing other necessary information. Until we can assess what is missing, tqftpserv is the preferred solution, the closed source implementation is rejected.

AFAIR, i didn't dropped any email. i will check with my team if they do. BTW, did you tested "tqftpserv" on qualcomm targets and is it serving the RFS requests from ADSP and MPSS clients in the expected way ?

@lumag
Copy link
Copy Markdown
Contributor

lumag commented Jan 28, 2026

Please point out the ticket on tqftpserv describing the issue

Here is the ticket for the ongoing tqftpserv development work: linux-msm/tqftpserv#29

It's not a ticket. It s a PR for adding syslog and a conf file, which has nothing to do with the issue that you've mentioned above:

i didn't get what do you mean by ticket then

Issue on the GitHub, describing the problem.

"tqftpserv" does not yet support the full set of functionalities required to serve RFS requests

In addition to this, there are few other items and features planned in the pipeline, such as multithreading support, TFTP windowing, and others.
When you've dropped an email several days ago, you have been asked to provide description of the features you consider to be missing (your email had very brief sentences for them). As you've moved the discussion to GitHub, please fill the issues against the tqftpserv, describing the issue, impact and providing other necessary information. Until we can assess what is missing, tqftpserv is the preferred solution, the closed source implementation is rejected.

AFAIR, i didn't dropped any email. i will check with my team if they do. BTW, did you tested "tqftpserv" on qualcomm targets and is it serving the RFS requests from ADSP and MPSS clients in the expected way ?

Dropped = sent

Up to now, tqftpserv has been working correctly enough in our environment. It has been in use by robotics platforms, by several phones, etc.

@ricardosalveti
Copy link
Copy Markdown
Contributor

Also, why are we providing it as binary while we can probably make the source code available instead?

@Pradeep-pvk
Copy link
Copy Markdown
Author

Also, why are we providing it as binary while we can probably make the source code available instead?

At present, the source code remains proprietary and is not shipped.

@Pradeep-pvk
Copy link
Copy Markdown
Author

Please point out the ticket on tqftpserv describing the issue

linux-msm/tqftpserv#33
linux-msm/tqftpserv#34

@Pradeep-pvk
Copy link
Copy Markdown
Author

Please point out the ticket on tqftpserv describing the issue

Here is the ticket for the ongoing tqftpserv development work: linux-msm/tqftpserv#29

It's not a ticket. It s a PR for adding syslog and a conf file, which has nothing to do with the issue that you've mentioned above:

i didn't get what do you mean by ticket then

Issue on the GitHub, describing the problem.

"tqftpserv" does not yet support the full set of functionalities required to serve RFS requests

In addition to this, there are few other items and features planned in the pipeline, such as multithreading support, TFTP windowing, and others.
When you've dropped an email several days ago, you have been asked to provide description of the features you consider to be missing (your email had very brief sentences for them). As you've moved the discussion to GitHub, please fill the issues against the tqftpserv, describing the issue, impact and providing other necessary information. Until we can assess what is missing, tqftpserv is the preferred solution, the closed source implementation is rejected.

AFAIR, i didn't dropped any email. i will check with my team if they do. BTW, did you tested "tqftpserv" on qualcomm targets and is it serving the RFS requests from ADSP and MPSS clients in the expected way ?

Dropped = sent

Up to now, tqftpserv has been working correctly enough in our environment. It has been in use by robotics platforms, by several phones, etc.

I was still wondering how this works—since the data is stored in /tmp (which is non‑persistent), how does it persist across reboots? Does that mean there is no real write use case executed on this platform?

@lumag
Copy link
Copy Markdown
Contributor

lumag commented Feb 4, 2026

I was still wondering how this works—since the data is stored in /tmp (which is non‑persistent), how does it persist across reboots? Does that mean there is no real write use case executed on this platform?

Yes.

@lumag
Copy link
Copy Markdown
Contributor

lumag commented Feb 4, 2026

Please point out the ticket on tqftpserv describing the issue

linux-msm/tqftpserv#33 linux-msm/tqftpserv#34

Please respond to Bjorn's questions.

@Pradeep-pvk
Copy link
Copy Markdown
Author

I was still wondering how this works—since the data is stored in /tmp (which is non‑persistent), how does it persist across reboots? Does that mean there is no real write use case executed on this platform?

Yes.

So, it is now clear that the existing tqftpserv cannot preserve data. We need an alternative until this is fixed. otherwise, targets running QLI 2.0 will be impacted. Please consider this overlay in the meantime and help with the review.

@Pradeep-pvk
Copy link
Copy Markdown
Author

Please point out the ticket on tqftpserv describing the issue

linux-msm/tqftpserv#33 linux-msm/tqftpserv#34

Please respond to Bjorn's questions.

Sure, but please do take a moment to review these changes.

@ndechesne
Copy link
Copy Markdown
Contributor

Regardless of the discussion about the open source vs closed alternative, can you please make sure the submitted PR at least passes the CI we are running? we cannot do anything with PR which fails the CI.

@lumag
Copy link
Copy Markdown
Contributor

lumag commented Feb 4, 2026

I was still wondering how this works—since the data is stored in /tmp (which is non‑persistent), how does it persist across reboots? Does that mean there is no real write use case executed on this platform?

Yes.

So, it is now clear that the existing tqftpserv cannot preserve data. We need an alternative until this is fixed. otherwise, targets running QLI 2.0 will be impacted. Please consider this overlay in the meantime and help with the review.

What is the usecase for preserving the data? Which of the services uses it in the real world?

@Pradeep-pvk
Copy link
Copy Markdown
Author

I was still wondering how this works—since the data is stored in /tmp (which is non‑persistent), how does it persist across reboots? Does that mean there is no real write use case executed on this platform?

Yes.

So, it is now clear that the existing tqftpserv cannot preserve data. We need an alternative until this is fixed. otherwise, targets running QLI 2.0 will be impacted. Please consider this overlay in the meantime and help with the review.

What is the usecase for preserving the data? Which of the services uses it in the real world?

Here are few:

  1. sensors create files and store data on those files. These are json content of sensors and their configurations.
  2. Backup MBN creation for OEMs - OEMs will place the device in LPM mode and send a QMI request from the APPS to the Modem to back up the Modem NV/EFS configuration. MCFG will then generate a backup MBN containing the current NV/EFS values and store it in the Remote FS via rfs_put()/rfs_write().

@lumag
Copy link
Copy Markdown
Contributor

lumag commented Feb 5, 2026

What is the usecase for preserving the data? Which of the services uses it in the real world?

  1. sensors create files and store data on those files. These are json content of sensors and their configurations.

This sounds like an optimization.

  1. Backup MBN creation for OEMs - OEMs will place the device in LPM mode and send a QMI request from the APPS to the Modem to back up the Modem NV/EFS configuration. MCFG will then generate a backup MBN containing the current NV/EFS values and store it in the Remote FS via rfs_put()/rfs_write().

Modem-enabled configurations are not on the top list.

In general it sounds like an important feature. Please discuss persistence at the corresponding tqftpserv ticket (and provide a suggested implementation). We will upgrade tqftpserv here as soon as it is released.

Comment thread conf/layer.conf Outdated
Comment thread recipes-support/tftp-server/tftp-server_1.0.1.bb Outdated
Comment thread recipes-support/tftp-server/tftp-server_1.0.1.bb Outdated
Comment thread recipes-support/tftp-server/tftp-server_1.0.1.bb Outdated
Comment thread recipes-support/tftp-server/tftp-server_1.0.1.bb
Comment thread recipes-support/tftp-server/tftp-server_1.0.1.bb Outdated
Comment thread recipes-support/tftp-server/tftp-server_1.0.1.bb
Comment thread recipes-support/tftp-server/tftp-server_1.0.1.bb Outdated
Comment thread recipes-support/tftp-server/tftp-server_1.0.1.bb Outdated
Comment thread conf/layer.conf Outdated
Add new prebuilt recipe for tftp-server to fetch Qualcomm
properitary userspace application from artifactory. This application
serves the Remote Files System (RFS) requests and provides additional
storage space to MPSS and ADSP processors by storing data in the High
Level Operating System (HLOS) fileystem.

Signed-off-by: Pradeep P V K <pradeep.pragallapati@oss.qualcomm.com>
Add DEFAULT_PREFERENCE for bitbake to choose the prefered
build recipe between tqftpserv and tftp-server.

Add RPROVIDES to support virtual provider pattern. This allows distro
package manager to choose between tqftpserv and tftp-server
implementations using PREFERRED_RPROVIDER_virtual-tftp-server.

Signed-off-by: Pradeep P V K <pradeep.pragallapati@oss.qualcomm.com>
Replace hardcoded tqftpserv package with virtual-tftp-server to
allow distro configuration to choose between tqftpserv and tftp-server
implementations.

Signed-off-by: Pradeep P V K <pradeep.pragallapati@oss.qualcomm.com>
Set PREFERRED_RPROVIDER_virtual-tftp-server to tqftpserv to avoid
build warnings when both tqftpserv and tftp-server are available in
the same layer. This assignment allows distros and users to override
the preference if needed.

Signed-off-by: Pradeep P V K <pradeep.pragallapati@oss.qualcomm.com>
@Pradeep-pvk
Copy link
Copy Markdown
Author

Hiding skeletons in layer.conf is bad practice, can't this be done with DEFAULT_PREFERENCE?
yes, made changes accordingly.


# Set default runtime provider for virtual-tftp-server to avoid
# warnings when both tqftpserv and tftp-server are available
PREFERRED_RPROVIDER_virtual-tftp-server ?= "tqftpserv"
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.

This should not be necessary with the DEFAULT_PROVIDER, unless I misunderstand something.

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.

It works, but bitbake will issue a note asking the user to consider setting up a PREFERRED_RPROVIDER anyway.

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.

Then do we need the DEFAULT_PROVIDER at all if we define PREFERRED_PROVIDER?

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.

That's something to check.

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.

DEFAULT_PREFERENCE allows to de-select the version provided by a specific provider. So, I think both are not same. In this case, DEFAULT_PREFERENCE might not be helpful.

@lumag
Copy link
Copy Markdown
Contributor

lumag commented Feb 28, 2026

@Pradeep-pvk what is the path mapping that is used by these binaries?

@lumag
Copy link
Copy Markdown
Contributor

lumag commented Mar 2, 2026

Also, does tftp-server support compressed firmware?

@Pradeep-pvk
Copy link
Copy Markdown
Author

@Pradeep-pvk what is the path mapping that is used by these binaries?

The current binary uses the below path mapping

For MPSS
/readonly/firmware - /etc/rfs/mdm/mpss/readonly/firmware --> /usr/lib
/readwrite/ - /etc/rfs/mdm/mpss/readwrite --> /etc/persist/rfs/mdm/mpss
/ramdumps/ - /etc/rfs/mdm/mpss/ramdumps --> /etc/tombstones/modem
/shared/ - /etc/rfs/mdm/mpss/shared --> /etc/persist/rfs/shared
/hlos - /etc/rfs/mdm/mpss/hlos --> /etc/persist/hlos_rfs/shared

For ADSP
/readonly/firmware - /etc/rfs/mdm/adsp/readonly/firmware --> /usr/lib
/readwrite/ - /etc/rfs/adsp/mpss/readwrite --> /etc/persist/rfs/mdm/adsp
/ramdumps/ - /etc/rfs/adsp/mpss/ramdumps --> /etc/tombstones/lpass
/shared/ - /etc/rfs/mdm/adsp/shared --> /etc/persist/rfs/shared
/hlos - /etc/rfs/mdm/adsp/hlos --> /etc/persist/hlos_rfs/shared

@Pradeep-pvk Pradeep-pvk requested review from anujm1 and koenkooi March 2, 2026 11:39
@Pradeep-pvk
Copy link
Copy Markdown
Author

Also, does tftp-server support compressed firmware?

yes it supports compressed reads.

@Pradeep-pvk Pradeep-pvk requested a review from lumag March 2, 2026 13:59
@lumag
Copy link
Copy Markdown
Contributor

lumag commented Mar 2, 2026

@Pradeep-pvk what is the path mapping that is used by these binaries?

The current binary uses the below path mapping

Why are you providing two paths for each entry?

For MPSS
/readonly/firmware - /etc/rfs/mdm/mpss/readonly/firmware --> /usr/lib

What kind of firmware gets requested? wlanmdsp or something else?

/readwrite/ - /etc/rfs/mdm/mpss/readwrite --> /etc/persist/rfs/mdm/mpss

This should be /var at least

/ramdumps/ - /etc/rfs/mdm/mpss/ramdumps --> /etc/tombstones/modem

Ramdumps definitely should not go to /etc.

/shared/ - /etc/rfs/mdm/mpss/shared --> /etc/persist/rfs/shared
/hlos - /etc/rfs/mdm/mpss/hlos --> /etc/persist/hlos_rfs/shared

What is the usecase for those items?

For ADSP /readonly/firmware - /etc/rfs/mdm/adsp/readonly/firmware --> /usr/lib

What kind of firmwre is being loaded by ADSP?

/readwrite/ - /etc/rfs/adsp/mpss/readwrite --> /etc/persist/rfs/mdm/adsp
/ramdumps/ - /etc/rfs/adsp/mpss/ramdumps --> /etc/tombstones/lpass
/shared/ - /etc/rfs/mdm/adsp/shared --> /etc/persist/rfs/shared
/hlos - /etc/rfs/mdm/adsp/hlos --> /etc/persist/hlos_rfs/shared

Same comments apply.

What about CDSP and SLPI?

@Pradeep-pvk
Copy link
Copy Markdown
Author

Pradeep-pvk commented Mar 2, 2026

@Pradeep-pvk what is the path mapping that is used by these binaries?

The current binary uses the below path mapping

Why are you providing two paths for each entry?

The first is the normalized path for each mapping path and the second is a symlink of the first path.

For MPSS
/readonly/firmware - /etc/rfs/mdm/mpss/readonly/firmware --> /usr/lib

What kind of firmware gets requested? wlanmdsp or something else?

it would be mostly modem firmware blobs/mbn's, oem mbn's, etc.
ex: modem_oem/qdsp6_oemsw.mbn

/readwrite/ - /etc/rfs/mdm/mpss/readwrite --> /etc/persist/rfs/mdm/mpss

This should be /var at least

yes, it was under /var initially but due to some new requirement( OSTree for performing OTA) we were asked not to install anything under /var, /opt, /mnt, /home paths.

/ramdumps/ - /etc/rfs/mdm/mpss/ramdumps --> /etc/tombstones/modem

Ramdumps definitely should not go to /etc.
yes, it is due to the above reason same comment as above.

/shared/ - /etc/rfs/mdm/mpss/shared --> /etc/persist/rfs/shared
/hlos - /etc/rfs/mdm/mpss/hlos --> /etc/persist/hlos_rfs/shared

What is the usecase for those items?

For /hlos - AFAIR, it will be will be used by location services, xtwifi download use-cases, OIS PD etc.
ex: filenames would look something like gdt/RcvdTdpFile.txt

For /shared - contents or data that can be shared among multiple subsystems would be placed under this path.
ex: handshake information server_info.txt

For ADSP /readonly/firmware - /etc/rfs/mdm/adsp/readonly/firmware --> /usr/lib

What kind of firmwre is being loaded by ADSP?

it would be audio calibration data, sensors registry etc.

/readwrite/ - /etc/rfs/adsp/mpss/readwrite --> /etc/persist/rfs/mdm/adsp
/ramdumps/ - /etc/rfs/adsp/mpss/ramdumps --> /etc/tombstones/lpass
/shared/ - /etc/rfs/mdm/adsp/shared --> /etc/persist/rfs/shared
/hlos - /etc/rfs/mdm/adsp/hlos --> /etc/persist/hlos_rfs/shared

Same comments apply.

What about CDSP and SLPI?

yes, it can have similar mappings for CDSP and SLPI as well but currently it is limited to ADSP and MPSS on QLI.

@lumag
Copy link
Copy Markdown
Contributor

lumag commented Mar 2, 2026

@Pradeep-pvk please fix rhe formatting of your comment. All your answers for stuck in the quoted text. It's hard to visually separate them.

@Pradeep-pvk
Copy link
Copy Markdown
Author

@Pradeep-pvk please fix rhe formatting of your comment. All your answers for stuck in the quoted text. It's hard to visually separate them.

yes, formatted my comment. please check and let me know, if still having the issue.

@lumag
Copy link
Copy Markdown
Contributor

lumag commented Mar 3, 2026

@Pradeep-pvk what is the path mapping that is used by these binaries?

The current binary uses the below path mapping

Why are you providing two paths for each entry?

The first is the normalized path for each mapping path and the second is a symlink of the first path.

Why do we need a symlink?

For MPSS
/readonly/firmware - /etc/rfs/mdm/mpss/readonly/firmware --> /usr/lib

What kind of firmware gets requested? wlanmdsp or something else?

it would be mostly modem firmware blobs/mbn's, oem mbn's, etc. ex: modem_oem/qdsp6_oemsw.mbn

Okay. So there are two usecases:

  • actual modems, requesting extra data
  • ath10k WiFi, requesting wlanmdsp.mbn

Loading /readonly from the fixed location breaks the latter usecase (wlanmdsp.mbn is SoC and might be machine-specific) and will most likely not work with the former usecase in case of a multi-machine rootfs configuration, which must be supported.

/readwrite/ - /etc/rfs/mdm/mpss/readwrite --> /etc/persist/rfs/mdm/mpss

This should be /var at least

yes, it was under /var initially but due to some new requirement( OSTree for performing OTA) we were asked not to install anything under /var, /opt, /mnt, /home paths.

Rootfs can be read-only. All state files must go to /var (and anyway, you are not installing anything, it gets stored there, like any other stored file).

/ramdumps/ - /etc/rfs/mdm/mpss/ramdumps --> /etc/tombstones/modem

Ramdumps definitely should not go to /etc.
yes, it is due to the above reason same comment as above.

Still, nope.

/shared/ - /etc/rfs/mdm/mpss/shared --> /etc/persist/rfs/shared
/hlos - /etc/rfs/mdm/mpss/hlos --> /etc/persist/hlos_rfs/shared

What is the usecase for those items?

For /hlos - AFAIR, it will be will be used by location services, xtwifi download use-cases, OIS PD etc. ex: filenames would look something like gdt/RcvdTdpFile.txt

I haven't seen this. Which platforms use this? Are they to be provided by the host or are they stored by the modem?

For /shared - contents or data that can be shared among multiple subsystems would be placed under this path. ex: handshake information server_info.txt

What is it? Is it stored by the modem or is it to be provided by the host?

For ADSP /readonly/firmware - /etc/rfs/mdm/adsp/readonly/firmware --> /usr/lib

What kind of firmwre is being loaded by ADSP?

it would be audio calibration data, sensors registry etc.

calibration data - unsure. Sensors registry should be loaded from /usr/share/qcom/SoC/Vendor/Device/sensors/.

/readwrite/ - /etc/rfs/adsp/mpss/readwrite --> /etc/persist/rfs/mdm/adsp
/ramdumps/ - /etc/rfs/adsp/mpss/ramdumps --> /etc/tombstones/lpass
/shared/ - /etc/rfs/mdm/adsp/shared --> /etc/persist/rfs/shared
/hlos - /etc/rfs/mdm/adsp/hlos --> /etc/persist/hlos_rfs/shared

Same comments apply.
What about CDSP and SLPI?

yes, it can have similar mappings for CDSP and SLPI as well but currently it is limited to ADSP and MPSS on QLI.

LImited by whom? We support SLPI on MSM8998-SM8450.

@Pradeep-pvk
Copy link
Copy Markdown
Author

Pradeep-pvk commented Mar 4, 2026

@Pradeep-pvk what is the path mapping that is used by these binaries?

The current binary uses the below path mapping

Why are you providing two paths for each entry?

The first is the normalized path for each mapping path and the second is a symlink of the first path.

Why do we need a symlink?

Each HLOS (LA, Windows) have their own way of storing executable-images, data, ramdumps and also their own file-access-permission modes. So the RFS-modules files location in the HLOS will vary from HLOS to HLOS and hence the symlink to the actual path on device for a given normalized rfs path.

For MPSS
/readonly/firmware - /etc/rfs/mdm/mpss/readonly/firmware --> /usr/lib

What kind of firmware gets requested? wlanmdsp or something else?

it would be mostly modem firmware blobs/mbn's, oem mbn's, etc. ex: modem_oem/qdsp6_oemsw.mbn

Okay. So there are two usecases:

  • actual modems, requesting extra data
  • ath10k WiFi, requesting wlanmdsp.mbn

Loading /readonly from the fixed location breaks the latter usecase (wlanmdsp.mbn is SoC and might be machine-specific) and will most likely not work with the former usecase in case of a multi-machine rootfs configuration, which must be supported.

The tftp_server can still support this—it is capable of handling absolute paths requested by the client, as shown in the example above (e.g., wlanmdsp.mbn), where clients prefix the request with /root//

/readwrite/ - /etc/rfs/mdm/mpss/readwrite --> /etc/persist/rfs/mdm/mpss

This should be /var at least

yes, it was under /var initially but due to some new requirement( OSTree for performing OTA) we were asked not to install anything under /var, /opt, /mnt, /home paths.

Rootfs can be read-only. All state files must go to /var (and anyway, you are not installing anything, it gets stored there, like any other stored file).

/ramdumps/ - /etc/rfs/mdm/mpss/ramdumps --> /etc/tombstones/modem

Ramdumps definitely should not go to /etc.
yes, it is due to the above reason same comment as above.

Still, nope.

/shared/ - /etc/rfs/mdm/mpss/shared --> /etc/persist/rfs/shared
/hlos - /etc/rfs/mdm/mpss/hlos --> /etc/persist/hlos_rfs/shared

What is the usecase for those items?

For /hlos - AFAIR, it will be will be used by location services, xtwifi download use-cases, OIS PD etc. ex: filenames would look something like gdt/RcvdTdpFile.txt

I haven't seen this. Which platforms use this? Are they to be provided by the host or are they stored by the modem?

AFAIK, /hlos RFS path will be used on all platforms. The above is just an example (RcvdTdpFile.txt) taken from a Pinnacles MBB target and unsure of this file presence/creation on other targets.

For /shared - contents or data that can be shared among multiple subsystems would be placed under this path. ex: handshake information server_info.txt

What is it? Is it stored by the modem or is it to be provided by the host?

/shared - This folder will be shared by all the qcom-processors (MPSS, ADSP and other peripheral processors).
i mentioned "server_info.txt" as an example, it is a handshake file created by tftp server during tftp client - server communication and will be seen on all qcom targets.

For ADSP /readonly/firmware - /etc/rfs/mdm/adsp/readonly/firmware --> /usr/lib

What kind of firmwre is being loaded by ADSP?

it would be audio calibration data, sensors registry etc.

calibration data - unsure. Sensors registry should be loaded from /usr/share/qcom/SoC/Vendor/Device/sensors/.

tftp_server can still support the above path, provided the client requests the actual absolute path prefixed with root.

/readwrite/ - /etc/rfs/adsp/mpss/readwrite --> /etc/persist/rfs/mdm/adsp
/ramdumps/ - /etc/rfs/adsp/mpss/ramdumps --> /etc/tombstones/lpass
/shared/ - /etc/rfs/mdm/adsp/shared --> /etc/persist/rfs/shared
/hlos - /etc/rfs/mdm/adsp/hlos --> /etc/persist/hlos_rfs/shared

Same comments apply.
What about CDSP and SLPI?

yes, it can have similar mappings for CDSP and SLPI as well but currently it is limited to ADSP and MPSS on QLI.

LImited by whom? We support SLPI on MSM8998-SM8450.

sorry for the confusion, yes it supports SLPI and CDSP paths too.

@lumag
Copy link
Copy Markdown
Contributor

lumag commented Mar 4, 2026

@Pradeep-pvk what is the path mapping that is used by these binaries?

The current binary uses the below path mapping

Why are you providing two paths for each entry?

The first is the normalized path for each mapping path and the second is a symlink of the first path.

Why do we need a symlink?

Each HLOS (LA, Windows) have their own way of storing executable-images, data, ramdumps and also their own file-access-permission modes. So the RFS-modules files location in the HLOS will vary from HLOS to HLOS and hence the symlink to the actual path on device for a given normalized rfs path.

Well, no. this should be handld in the server code or via runtime configuration. symlinks are an unnecessary complication.

For MPSS
/readonly/firmware - /etc/rfs/mdm/mpss/readonly/firmware --> /usr/lib

What kind of firmware gets requested? wlanmdsp or something else?

it would be mostly modem firmware blobs/mbn's, oem mbn's, etc. ex: modem_oem/qdsp6_oemsw.mbn

Okay. So there are two usecases:

  • actual modems, requesting extra data
  • ath10k WiFi, requesting wlanmdsp.mbn

Loading /readonly from the fixed location breaks the latter usecase (wlanmdsp.mbn is SoC and might be machine-specific) and will most likely not work with the former usecase in case of a multi-machine rootfs configuration, which must be supported.

The tftp_server can still support this—it is capable of handling absolute paths requested by the client, as shown in the example above (e.g., wlanmdsp.mbn), where clients prefix the request with /root//

It seems you don't understand. There are existing usecases, loading wlanmdsp.mbn. Modem DSP is not passing an absolute path. It is passing /readonly/firmware/wlanmdsp.mbn (with several variants). This must be handled by supplying the correct file (which is platform-dependent).

Not to mention, that you you didn't specify /root/ beforehand. If it is supported, it is defenitely a sandbox breach.

/readwrite/ - /etc/rfs/mdm/mpss/readwrite --> /etc/persist/rfs/mdm/mpss

This should be /var at least

yes, it was under /var initially but due to some new requirement( OSTree for performing OTA) we were asked not to install anything under /var, /opt, /mnt, /home paths.

Rootfs can be read-only. All state files must go to /var (and anyway, you are not installing anything, it gets stored there, like any other stored file).

/ramdumps/ - /etc/rfs/mdm/mpss/ramdumps --> /etc/tombstones/modem

Ramdumps definitely should not go to /etc.
yes, it is due to the above reason same comment as above.

Still, nope.

/shared/ - /etc/rfs/mdm/mpss/shared --> /etc/persist/rfs/shared
/hlos - /etc/rfs/mdm/mpss/hlos --> /etc/persist/hlos_rfs/shared

What is the usecase for those items?

For /hlos - AFAIR, it will be will be used by location services, xtwifi download use-cases, OIS PD etc. ex: filenames would look something like gdt/RcvdTdpFile.txt

I haven't seen this. Which platforms use this? Are they to be provided by the host or are they stored by the modem?

AFAIK, /hlos RFS path will be used on all platforms. The above is just an example (RcvdTdpFile.txt) taken from a Pinnacles MBB target and unsure of this file presence/creation on other targets.

Please. Come up with actual issues relevant for the QLI targets.

For /shared - contents or data that can be shared among multiple subsystems would be placed under this path. ex: handshake information server_info.txt

What is it? Is it stored by the modem or is it to be provided by the host?

/shared - This folder will be shared by all the qcom-processors (MPSS, ADSP and other peripheral processors). i mentioned "server_info.txt" as an example, it is a handshake file created by tftp server during tftp client - server communication and will be seen on all qcom targets.

I don't see it being requested on any of the systems I've tested. Could you please provide additional details?

For ADSP /readonly/firmware - /etc/rfs/mdm/adsp/readonly/firmware --> /usr/lib

What kind of firmwre is being loaded by ADSP?

it would be audio calibration data, sensors registry etc.

calibration data - unsure. Sensors registry should be loaded from /usr/share/qcom/SoC/Vendor/Device/sensors/.

tftp_server can still support the above path, provided the client requests the actual absolute path prefixed with root.

I think you are approaching it from the wrong side - the clients (sensors firmware) already exists. We must support existing systems rather than enforcing "supply this path" resrictions on them.

/readwrite/ - /etc/rfs/adsp/mpss/readwrite --> /etc/persist/rfs/mdm/adsp
/ramdumps/ - /etc/rfs/adsp/mpss/ramdumps --> /etc/tombstones/lpass
/shared/ - /etc/rfs/mdm/adsp/shared --> /etc/persist/rfs/shared
/hlos - /etc/rfs/mdm/adsp/hlos --> /etc/persist/hlos_rfs/shared

Same comments apply.
What about CDSP and SLPI?

yes, it can have similar mappings for CDSP and SLPI as well but currently it is limited to ADSP and MPSS on QLI.

LImited by whom? We support SLPI on MSM8998-SM8450.

sorry for the confusion, yes it supports SLPI and CDSP paths too.

@Pradeep-pvk
Copy link
Copy Markdown
Author

@Pradeep-pvk what is the path mapping that is used by these binaries?

The current binary uses the below path mapping

Why are you providing two paths for each entry?

The first is the normalized path for each mapping path and the second is a symlink of the first path.

Why do we need a symlink?

Each HLOS (LA, Windows) have their own way of storing executable-images, data, ramdumps and also their own file-access-permission modes. So the RFS-modules files location in the HLOS will vary from HLOS to HLOS and hence the symlink to the actual path on device for a given normalized rfs path.

Well, no. this should be handld in the server code or via runtime configuration. symlinks are an unnecessary complication.

This has been the existing approach followed in tftp_server across all qualcomm chipsets spanning multiple BUs, and it is also a commercialized solution.

For MPSS
/readonly/firmware - /etc/rfs/mdm/mpss/readonly/firmware --> /usr/lib

What kind of firmware gets requested? wlanmdsp or something else?

it would be mostly modem firmware blobs/mbn's, oem mbn's, etc. ex: modem_oem/qdsp6_oemsw.mbn

Okay. So there are two usecases:

  • actual modems, requesting extra data
  • ath10k WiFi, requesting wlanmdsp.mbn

Loading /readonly from the fixed location breaks the latter usecase (wlanmdsp.mbn is SoC and might be machine-specific) and will most likely not work with the former usecase in case of a multi-machine rootfs configuration, which must be supported.

The tftp_server can still support this—it is capable of handling absolute paths requested by the client, as shown in the example above (e.g., wlanmdsp.mbn), where clients prefix the request with /root//

It seems you don't understand. There are existing usecases, loading wlanmdsp.mbn. Modem DSP is not passing an absolute path. It is passing /readonly/firmware/wlanmdsp.mbn (with several variants). This must be handled by supplying the correct file (which is platform-dependent).

To me, this appears more like an optimization - Why is the file selection handled by the server instead of allowing the client to choose the required file?
The current tftp_server is not aware of platform types; it simply reads whatever file the client requests by resolving the normalized RFS path.
I’m curious to know whether tqftpserv provides the correct file based on the platform for all files, or only for firmware files.

Not to mention, that you you didn't specify /root/ beforehand. If it is supported, it is defenitely a sandbox breach.

/readwrite/ - /etc/rfs/mdm/mpss/readwrite --> /etc/persist/rfs/mdm/mpss

This should be /var at least

yes, it was under /var initially but due to some new requirement( OSTree for performing OTA) we were asked not to install anything under /var, /opt, /mnt, /home paths.

Rootfs can be read-only. All state files must go to /var (and anyway, you are not installing anything, it gets stored there, like any other stored file).

/ramdumps/ - /etc/rfs/mdm/mpss/ramdumps --> /etc/tombstones/modem

Ramdumps definitely should not go to /etc.
yes, it is due to the above reason same comment as above.

Still, nope.

/shared/ - /etc/rfs/mdm/mpss/shared --> /etc/persist/rfs/shared
/hlos - /etc/rfs/mdm/mpss/hlos --> /etc/persist/hlos_rfs/shared

What is the usecase for those items?

For /hlos - AFAIR, it will be will be used by location services, xtwifi download use-cases, OIS PD etc. ex: filenames would look something like gdt/RcvdTdpFile.txt

I haven't seen this. Which platforms use this? Are they to be provided by the host or are they stored by the modem?

AFAIK, /hlos RFS path will be used on all platforms. The above is just an example (RcvdTdpFile.txt) taken from a Pinnacles MBB target and unsure of this file presence/creation on other targets.

Please. Come up with actual issues relevant for the QLI targets.

Sure, i will try to provide information on QLI targets.

For /shared - contents or data that can be shared among multiple subsystems would be placed under this path. ex: handshake information server_info.txt

What is it? Is it stored by the modem or is it to be provided by the host?

/shared - This folder will be shared by all the qcom-processors (MPSS, ADSP and other peripheral processors). i mentioned "server_info.txt" as an example, it is a handshake file created by tftp client during tftp client - server communication and will be seen on all qcom targets.

I don't see it being requested on any of the systems I've tested. Could you please provide additional details?

You may be testing on systems where tqftpserv is enabled. This behavior is typically observed on systems running the tftp_server. As mentioned earlier, this file is a handshake file created by the tftp client during TFTP client–server communication.

For ADSP /readonly/firmware - /etc/rfs/mdm/adsp/readonly/firmware --> /usr/lib

What kind of firmwre is being loaded by ADSP?

it would be audio calibration data, sensors registry etc.

calibration data - unsure. Sensors registry should be loaded from /usr/share/qcom/SoC/Vendor/Device/sensors/.

tftp_server can still support the above path, provided the client requests the actual absolute path prefixed with root.

I think you are approaching it from the wrong side - the clients (sensors firmware) already exists. We must support existing systems rather than enforcing "supply this path" resrictions on them.

The current tftp_server works in this model and was a commercialized solution. The clients (sensors firmware) is responsible for supplying the correct path to enable the server to perform the requested read or write operations.
If the client (sensor firmware) does not reside under any of the RFS paths (as it is generally located in a read‑only path), it may still request the file by prefixing the path with root. The tftp_server does not maintain client‑specific hardcoded paths or perform file search on fixed directories.

/readwrite/ - /etc/rfs/adsp/mpss/readwrite --> /etc/persist/rfs/mdm/adsp
/ramdumps/ - /etc/rfs/adsp/mpss/ramdumps --> /etc/tombstones/lpass
/shared/ - /etc/rfs/mdm/adsp/shared --> /etc/persist/rfs/shared
/hlos - /etc/rfs/mdm/adsp/hlos --> /etc/persist/hlos_rfs/shared

Same comments apply.
What about CDSP and SLPI?

yes, it can have similar mappings for CDSP and SLPI as well but currently it is limited to ADSP and MPSS on QLI.

LImited by whom? We support SLPI on MSM8998-SM8450.

sorry for the confusion, yes it supports SLPI and CDSP paths too.

@lumag
Copy link
Copy Markdown
Contributor

lumag commented Mar 5, 2026

@Pradeep-pvk what is the path mapping that is used by these binaries?

The current binary uses the below path mapping

Why are you providing two paths for each entry?

The first is the normalized path for each mapping path and the second is a symlink of the first path.

Why do we need a symlink?

Each HLOS (LA, Windows) have their own way of storing executable-images, data, ramdumps and also their own file-access-permission modes. So the RFS-modules files location in the HLOS will vary from HLOS to HLOS and hence the symlink to the actual path on device for a given normalized rfs path.

Well, no. this should be handld in the server code or via runtime configuration. symlinks are an unnecessary complication.

This has been the existing approach followed in tftp_server across all qualcomm chipsets spanning multiple BUs, and it is also a commercialized solution.

-ENOTANARG. There are enough ugly solutions in the "commercialized" software. Starting from Qualcomm downstream DT files.

For MPSS
/readonly/firmware - /etc/rfs/mdm/mpss/readonly/firmware --> /usr/lib

What kind of firmware gets requested? wlanmdsp or something else?

it would be mostly modem firmware blobs/mbn's, oem mbn's, etc. ex: modem_oem/qdsp6_oemsw.mbn

Okay. So there are two usecases:

  • actual modems, requesting extra data
  • ath10k WiFi, requesting wlanmdsp.mbn

Loading /readonly from the fixed location breaks the latter usecase (wlanmdsp.mbn is SoC and might be machine-specific) and will most likely not work with the former usecase in case of a multi-machine rootfs configuration, which must be supported.

The tftp_server can still support this—it is capable of handling absolute paths requested by the client, as shown in the example above (e.g., wlanmdsp.mbn), where clients prefix the request with /root//

It seems you don't understand. There are existing usecases, loading wlanmdsp.mbn. Modem DSP is not passing an absolute path. It is passing /readonly/firmware/wlanmdsp.mbn (with several variants). This must be handled by supplying the correct file (which is platform-dependent).

To me, this appears more like an optimization - Why is the file selection handled by the server instead of allowing the client to choose the required file? The current tftp_server is not aware of platform types; it simply reads whatever file the client requests by resolving the normalized RFS path. I’m curious to know whether tqftpserv provides the correct file based on the platform for all files, or only for firmware files.

You can read the source code of tqftp server and answer your question.
Your proposal breaks existing, working usecase.

Not to mention, that you you didn't specify /root/ beforehand. If it is supported, it is defenitely a sandbox breach.

/readwrite/ - /etc/rfs/mdm/mpss/readwrite --> /etc/persist/rfs/mdm/mpss

This should be /var at least

yes, it was under /var initially but due to some new requirement( OSTree for performing OTA) we were asked not to install anything under /var, /opt, /mnt, /home paths.

Rootfs can be read-only. All state files must go to /var (and anyway, you are not installing anything, it gets stored there, like any other stored file).

/ramdumps/ - /etc/rfs/mdm/mpss/ramdumps --> /etc/tombstones/modem

Ramdumps definitely should not go to /etc.
yes, it is due to the above reason same comment as above.

Still, nope.

/shared/ - /etc/rfs/mdm/mpss/shared --> /etc/persist/rfs/shared
/hlos - /etc/rfs/mdm/mpss/hlos --> /etc/persist/hlos_rfs/shared

What is the usecase for those items?

For /hlos - AFAIR, it will be will be used by location services, xtwifi download use-cases, OIS PD etc. ex: filenames would look something like gdt/RcvdTdpFile.txt

I haven't seen this. Which platforms use this? Are they to be provided by the host or are they stored by the modem?

AFAIK, /hlos RFS path will be used on all platforms. The above is just an example (RcvdTdpFile.txt) taken from a Pinnacles MBB target and unsure of this file presence/creation on other targets.

Please. Come up with actual issues relevant for the QLI targets.

Sure, i will try to provide information on QLI targets.

For /shared - contents or data that can be shared among multiple subsystems would be placed under this path. ex: handshake information server_info.txt

What is it? Is it stored by the modem or is it to be provided by the host?

/shared - This folder will be shared by all the qcom-processors (MPSS, ADSP and other peripheral processors). i mentioned "server_info.txt" as an example, it is a handshake file created by tftp client during tftp client - server communication and will be seen on all qcom targets.

I don't see it being requested on any of the systems I've tested. Could you please provide additional details?

You may be testing on systems where tqftpserv is enabled. This behavior is typically observed on systems running the tftp_server. As mentioned earlier, this file is a handshake file created by the tftp client during TFTP client–server communication.

Again. I haven't seen the firmware requesting this file. Would you have any details on which platforms it is actually used by the DSPs?

For ADSP /readonly/firmware - /etc/rfs/mdm/adsp/readonly/firmware --> /usr/lib

What kind of firmwre is being loaded by ADSP?

it would be audio calibration data, sensors registry etc.

calibration data - unsure. Sensors registry should be loaded from /usr/share/qcom/SoC/Vendor/Device/sensors/.

tftp_server can still support the above path, provided the client requests the actual absolute path prefixed with root.

I think you are approaching it from the wrong side - the clients (sensors firmware) already exists. We must support existing systems rather than enforcing "supply this path" resrictions on them.

Exactly. The sensors registry is platform-specific, so it should go to the device-specific location, which logically fits to go together with the DSP binaries.

But.... It makes me ask a different question. On the current platforms as far as I know the registry is being loaded by the sdsprcpcd directly, without involving TQFTP. Which platforms are you talking about here?

The current tftp_server works in this model and was a commercialized solution. The clients (sensors firmware) is responsible for supplying the correct path to enable the server to perform the requested read or write operations. If the client (sensor firmware) does not reside under any of the RFS paths (as it is generally located in a read‑only path), it may still request the file by prefixing the path with root. The tftp_server does not maintain client‑specific hardcoded paths or perform file search on fixed directories.

Bingo. You didn't bother to look, how tqftpserv is integrated with the rest of the system.

/readwrite/ - /etc/rfs/adsp/mpss/readwrite --> /etc/persist/rfs/mdm/adsp
/ramdumps/ - /etc/rfs/adsp/mpss/ramdumps --> /etc/tombstones/lpass
/shared/ - /etc/rfs/mdm/adsp/shared --> /etc/persist/rfs/shared
/hlos - /etc/rfs/mdm/adsp/hlos --> /etc/persist/hlos_rfs/shared

Same comments apply.
What about CDSP and SLPI?

yes, it can have similar mappings for CDSP and SLPI as well but currently it is limited to ADSP and MPSS on QLI.

LImited by whom? We support SLPI on MSM8998-SM8450.

sorry for the confusion, yes it supports SLPI and CDSP paths too.

Copy link
Copy Markdown
Contributor

@lumag lumag left a comment

Choose a reason for hiding this comment

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

After discussion with other meta-qcom maintainers and with the platform maintainers.

  • tftpserver doesn't seem to provide benefits for the QLI platforms, which are usually modemless and load sensors registry and sensors configuration through sdsprpcd,
  • it will break the usecase of loading ath10k wlanmdsp.mbn firmware file from the existing known locations,
  • it seems to provide DSPs with the access to undocumented locations, including possibly complete rootfs access, leading to possible security implications.

As such, I'd kindly ask to continue discussion with @Bamse and @quic-kdybcio regarding missing tqftpserv features and spend efforts on improving tqftpserv instead of trying to push and plumb the tftpserver into meta-qcom.

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.

6 participants