[fpga-miniconf] Final Reminder of FPGA Miniconf prework and other notes....

Daryl Tester dt-lca2018 at handcraftedcomputers.com.au
Sun Jan 21 23:47:16 AEDT 2018


On 21/01/18 22:37, Daryl Tester wrote:

(note: platform is debian stretch).

Okay, a while since I touched Makefiles, but ...

> + make tftpd_start
> mkdir -p build/tftpd/
> Cannot find an appropriate tftpd binary to launch the server.
> Makefile:337: recipe for target 'tftpd_start' failed
> make: *** [tftpd_start] Error 1
> $

--- a/Makefile
+++ b/Makefile
@@ -314,11 +314,11 @@ bios-flash: $(BIOS_FILE) bios-flash-$(PLATFORM)
  # We can run the TFTP server as the user if port >= 1024
  # otherwise we need to run as root using sudo
  
-ATFTPD=$(shell which atftpd)
+ATFTPD=$(shell sudo which atftpd)
  ATFTPD?=/usr/sbin/atftpd
  
-IN_TFTPD=$(shell which in.tfptd)
-IN_TFTPD=?=/usr/sbin/in.tftpd
+IN_TFTPD=$(shell sudo which in.tfptd)
+IN_TFTPD?=/usr/sbin/in.tftpd
  
  tftp: $(FIRMWARE_FILEBASE).bin
         mkdir -p $(TFTPD_DIR)
@@ -339,6 +339,8 @@ tftpd_start:
                 echo "Root required to run TFTP Server, will use sudo"; \
                 sudo true; \
         fi
+       echo "ATFTPD: $(ATFTPD)"
+       echo "IN_TFTPD: $(IN_TFTPD)"
         @if [ -x "$(ATFTPD)" ]; then \
                 echo "Starting aftpd"; \
                 if [ $(TFTP_SERVER_PORT) -lt 1024 ]; then \


Typo in "IN_TFTPD=?=/usr/sbin/in.tftpd", but ?= doesn't work anyway as
according to GNU Makefile manual:

"Note that a variable set to an empty value is still defined, so ‘?=’
  will not set that variable."

Non-sudo path doesn't include /sbin:/usr/sbin so "sudo which" is used
to pick up the path to the tftpd binary (and the ?= is superfluous).

I get to BIOS boot from tftpd now and it hangs:

Booting from network...
Local IP : 192.168.100.50
Remote IP: 192.168.100.100
Fetching from: UDP/6069

Then nothing.  I can't see anything with tcpdump across the tap0
interface (which is what I did last time to debug tftpd issues).

-- 
Regards,
    Daryl Tester
    Handcrafted Computers Pty. Ltd.


More information about the fpga-miniconf mailing list