litex icon indicating copy to clipboard operation
litex copied to clipboard

software/bios: Add option to obtain IP address from DHCP server

Open Meet909 opened this issue 4 years ago • 3 comments

That PR allows to obtain IP address automatically from DHCP server using eth_dhcp command. That command is only available when with_dhcp argument is set in litex/soc/integration/soc.py. dhcp_get_ip function in litex/soc/software/bios/boot.c invokes dhcp_resolve function with MAC address as parameter. That PR is associated with litex-hub/litex-boards#206.

Meet909 avatar Apr 28 '21 15:04 Meet909

Is there a way to generate a reproducible MAC address based on some information in the FPGA or SPI-NOR? For example a serial number?

jluebbe avatar Apr 28 '21 19:04 jluebbe

@jluebbe -- Depends on the FPGA and board, some FPGAs have a "device DNA" that could potentially be used to randomly generate a MAC address. Some FPGA boards have an EEPROM with a MAC address encoded in them (like the Numato Opsis), others have an EEPROM embedded in the Ethernet PHY.

mithro avatar Apr 28 '21 19:04 mithro

Thanks @MateuszKosmala, this is a very interesting feature. I'll try to review it very soon.

enjoy-digital avatar May 06 '21 06:05 enjoy-digital