12 Commits

Author SHA1 Message Date
Amit Pundir
783425b550 ANDROID: Add Android.bp makefile
Add Android.bp makefile to build tqftpserv for AOSP.

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
v1.0
2020-02-07 10:43:39 -08:00
Khem Raj
2324458f18 include limits.h for PATH_MAX
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-12-02 13:45:16 -08:00
Bjorn Andersson
fe53d2a810 tqftpserv: Implement path translation
The tftp clients in the modem requests files from either /readwrite or
/readonly/firmware/image, but as the wlanmdsp.mbn file requested is
signed with a vendor specific key these paths needs to be translated.

/readwrite is translated to /tmp/tqftpserv for now and the
/readonly/firmware/image is translated to a search for the requested
file alongside any of the remoteproc firmware files. The result is that
the wlanmdsp.mbn can be stored in linux-firmware alongside it's
device/vendor specific modem firmware.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2019-10-26 11:14:03 -07:00
Bjorn Andersson
75a7a89398 tqftpserv.service: Add systemd service
Add tqftpserv.service and install this.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2019-07-25 11:36:16 -07:00
Bjorn Andersson
6348c52f20 tqftpserv: Remove the spamming of stdout
Some mechanism for toggling the verbosity of the prints should be
introduced, but for now just comment out all the debug prints.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2019-06-10 16:40:11 -07:00
Bjorn Andersson
7167c88ead tqftpserv: Don't close socket at EOF
When during a read we close the socket as we send the last block the
remote will be notified about the closure and consider the transfer
incomplete. Leave the socket open until we receive a EOF error from the
remote side.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2019-06-10 16:36:13 -07:00
Bjorn Andersson
2ae2758cba Add LICENSE file
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2019-03-15 11:34:42 -07:00
Ben Chan
4fa490847a tqftpserv: fix memory leak in tftp_send_error() v0.0 2018-07-26 06:10:31 -07:00
Ben Chan
a175e68796 tqftpserv: remove duplicated initialization in handle_rrq() 2018-07-26 06:09:47 -07:00
Bjorn Andersson
9c4bc44c44 tqftpserv: Fix invalid include directives
The two include files was dropped during development but lingered in my
repository, remove the include of them - and define MAX(x, y).

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2018-07-10 19:02:52 -07:00
Bjorn Andersson
e4894436dd tqftpserv: Initial prototype implementation
Introduce a prototype of the tqftpserv, a server implementing trivial
file transfer protocol over AF_QIPCRTR.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2018-06-29 15:57:40 -07:00
Bjorn Andersson
73a4053779 ... 2018-06-29 15:54:40 -07:00