2

Is it possible to configure TFTP statically, without using DHCP? I am not allowed to run DHCP server in the network where my Pis will be sitting, because it may interfere with other users activity. Maybe there is an option similar to the RPi4's TFTP_IP parameter?

I don't mind having some code on the SD card, just the bootable image must be externalized.

  • What has TFTP to do with DHCP? – Ingo Dec 18 '19 at 11:25
  • 4
    DHCP (or BOOTP) is a standard way to tell client where TFTP is. At the beginning of its boot process RPi sends a BOOTP/DHCP broadcast request. If the network boot is assumed, an DHCP offer must include TFTP, PXE and PRi-specific vendor DHCP "options". – rapucha Dec 18 '19 at 13:35
2

According to the Pi 4 Bootloader Configuration documentation you can patch the boot ROM to preset various configuration values, and one of them is the TFTP server address using TFTP_IP (since EEPROM version 2020-04-16).

You can also configure a static IP address to avoid relying on DHCP just to reach the TFTP server.

If TFTP_IP and the following options are set then DHCP is skipped and the static IP configuration is applied.

The static IP options are CLIENT_IP, SUBNET (optional), GATEWAY (optional).

You'll need to follow the instructions at that link as they are a bit long to repost here, but the gist of it is:

cp /lib/firmware/raspberrypi/bootloader/beta/pieeprom-2019-09-23.bin pieeprom.bin
rpi-eeprom-config pieeprom.bin > bootconf.txt
# Edit bootconf.txt and set TFTP_IP=1.2.3.4
rpi-eeprom-config --out pieeprom-netboot.bin --config bootconf.txt pieeprom.bin
sudo rpi-eeprom-update -d -f ./pieeprom-netboot.bin   # Flash updated boot ROM

Basically you extract the boot ROM config into a text file, edit it, then merge it back to the ROM file and reflash it.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.