-
Notifications
You must be signed in to change notification settings - Fork 14
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
Use firmware path from sysfs #12
Use firmware path from sysfs #12
Conversation
looks good at first sight, left some minor comments |
strcat(path, "/"); | ||
strcat(path, dirname(firmware_value)); | ||
strcat(path, "/"); | ||
strcat(path, file); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a perfect usecase for asprintf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
asprintf/vasprintf is non-standard GNU/BSD extension and existing code around already uses strcpy/strcat everywhere. I can try though to use it here if you insist
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I don't.
Some linux distributions adjust path fro kernel to load firmware from using /sys/module/firmware_class/parameters/path. Kernel supports it, teach tqftpserv to respect it too. Signed-off-by: Alexey Minnekhanov <[email protected]>
c58ac26
to
a4c755d
Compare
Some linux distributions adjust path fro kernel to load firmware from using
/sys/module/firmware_class/parameters/path
. Kernel supports it, teach tqftpserv to respect it too.Kernel supports only single firmware path specified in firmware_class path. In postmarketOS we created a service script msm-firmware-loader that runs in early boot stage and symlinks all firmware it can find on various device partitions into a single directory, which is then written into
/sys/module/firmware_class/parameters/path
.With this patch tqftpserv is able, for example, to successfully serve
wlanmdsp.mbn
file when modem remoteproc is started.Can be used to solve #7