forked from M-Labs/artiq
1
0
Fork 0

Revert "Prefer DHCP to the built-in static IPs"

This reverts commit 596b9a265c.
This commit is contained in:
Sebastien Bourdeauducq 2022-07-08 17:57:25 +08:00
parent 3adcf37625
commit c4a9fa78ee
2 changed files with 15 additions and 6 deletions

View File

@ -60,7 +60,16 @@ pub fn get_adresses() -> NetAddresses {
}
})) {
Ok(Ok(addr)) => ipv4_addr = addr,
_ => ipv4_addr = USE_DHCP,
_ => {
#[cfg(soc_platform = "kasli")]
{ ipv4_addr = IpAddress::v4(192, 168, 1, 70); }
#[cfg(soc_platform = "sayma_amc")]
{ ipv4_addr = IpAddress::v4(192, 168, 1, 60); }
#[cfg(soc_platform = "metlino")]
{ ipv4_addr = IpAddress::v4(192, 168, 1, 65); }
#[cfg(soc_platform = "kc705")]
{ ipv4_addr = IpAddress::v4(192, 168, 1, 50); }
}
}
let ipv6_ll_addr = IpAddress::v6(

View File

@ -261,18 +261,18 @@ If you purchased a Kasli device from M-Labs, it usually comes with the IP addres
and then reboot the device (with ``artiq_flash start`` or a power cycle).
If the ip config field is not set, or set to "use_dhcp" then the device will attempt to obtain an IP address using
DHCP. If a static IP address is wanted, install OpenOCD as before, and flash the IP (and, if necessary, MAC) addresses
directly: ::
In other cases, install OpenOCD as before, and flash the IP (and, if necessary, MAC) addresses directly: ::
$ artiq_mkfs flash_storage.img -s mac xx:xx:xx:xx:xx:xx -s ip xx.xx.xx.xx
$ artiq_flash -t [board] -V [variant] -f flash_storage.img storage start
For Kasli devices, flashing a MAC address is not necessary as they can obtain it from their EEPROM.
If DHCP has been used the address can be found in the console output, which can be viewed using: ::
Alternatively you can set the "ip" config field to "use_dhcp" to have the device use DHCP to obtain an IP address on
boot. e.g. ::
$ python -m misoc.tools.flterm /dev/ttyUSB2
$ artiq_mkfs flash_storage.img -s ip use_dhcp
$ artiq_flash -t [board] -V [variant] -f flash_storage.img storage start
Check that you can ping the device. If ping fails, check that the Ethernet link LED is ON - on Kasli, it is the LED next to the SFP0 connector. As a next step, look at the messages emitted on the UART during boot. Use a program such as flterm or PuTTY to connect to the device's serial port at 115200bps 8-N-1 and reboot the device. On Kasli, the serial port is on FTDI channel 2 with v1.1 hardware (with channel 0 being JTAG) and on FTDI channel 1 with v1.0 hardware.