Files
tqftpserv/Makefile
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

26 lines
587 B
Makefile

TQFTPSERV := tqftpserv
CFLAGS := -Wall -g -O2
LDFLAGS := -lqrtr
prefix ?= /usr/local
bindir := $(prefix)/bin
servicedir := $(prefix)/lib/systemd/system
SRCS := tqftpserv.c translate.c
OBJS := $(SRCS:.c=.o)
$(TQFTPSERV): $(OBJS)
$(CC) -o $@ $^ $(LDFLAGS)
tqftpserv.service: tqftpserv.service.in
@sed 's+TQFTPSERV_PATH+$(bindir)+g' $< > $@
install: $(TQFTPSERV) tqftpserv.service
@install -D -m 755 $(TQFTPSERV) $(DESTDIR)$(bindir)/$(TQFTPSERV)
@install -D -m 644 tqftpserv.service $(DESTDIR)$(servicedir)/tqftpserv.service
clean:
rm -f $(TQFTPSERV) $(OBJS) tqftpserv.service