forked from M-Labs/artiq
1
0
Fork 0

runtime: use different default IP and MAC for different kinds of boards

This helps reduce conflicts when having many boards on a development network.
This commit is contained in:
Sebastien Bourdeauducq 2018-08-07 10:30:50 +08:00
parent bbe36b94f7
commit 2008d02f4d
1 changed files with 24 additions and 2 deletions

View File

@ -207,7 +207,18 @@ fn startup_ethernet() {
info!("using MAC address {}", hardware_addr);
}
_ => {
hardware_addr = EthernetAddress([0x02, 0x00, 0x00, 0x00, 0x00, 0x01]);
#[cfg(soc_platform = "kasli")]
{
hardware_addr = EthernetAddress([0x02, 0x00, 0x00, 0x00, 0x00, 0x21]);
}
#[cfg(soc_platform = "sayma_amc")]
{
hardware_addr = EthernetAddress([0x02, 0x00, 0x00, 0x00, 0x00, 0x11]);
}
#[cfg(soc_platform = "kc705")]
{
hardware_addr = EthernetAddress([0x02, 0x00, 0x00, 0x00, 0x00, 0x01]);
}
warn!("using default MAC address {}; consider changing it", hardware_addr);
}
}
@ -219,7 +230,18 @@ fn startup_ethernet() {
info!("using IP address {}", protocol_addr);
}
_ => {
protocol_addr = IpAddress::v4(192, 168, 1, 50);
#[cfg(soc_platform = "kasli")]
{
protocol_addr = IpAddress::v4(192, 168, 1, 70);
}
#[cfg(soc_platform = "sayma_amc")]
{
protocol_addr = IpAddress::v4(192, 168, 1, 60);
}
#[cfg(soc_platform = "kc705")]
{
protocol_addr = IpAddress::v4(192, 168, 1, 50);
}
info!("using default IP address {}", protocol_addr);
}
}