Skip to content

Commit

Permalink
make.py,soc_linux.py: fix build when board has ethernet capability: l…
Browse files Browse the repository at this point in the history
…ocal_ip constant is automatically applied by soc -> add_ethernet (#394)
  • Loading branch information
trabucayre committed Jun 14, 2024
1 parent ea17e31 commit 6f65868
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion make.py
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,7 @@ def main():
if "sdcard" in board.soc_capabilities:
soc.add_sdcard()
if "ethernet" in board.soc_capabilities:
soc.configure_ethernet(local_ip=args.local_ip, remote_ip=args.remote_ip)
soc.configure_ethernet(remote_ip=args.remote_ip)
#if "leds" in board.soc_capabilities:
# soc.add_leds()
if "rgb_led" in board.soc_capabilities:
Expand Down
8 changes: 1 addition & 7 deletions soc_linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,9 @@ def add_mmcm(self, nclkout):
self.comb += self.mmcm.reset.eq(self.mmcm.drp_reset.re)

# Ethernet configuration -------------------------------------------------------------------
def configure_ethernet(self, local_ip, remote_ip):
local_ip = local_ip.split(".")
def configure_ethernet(self, remote_ip):
remote_ip = remote_ip.split(".")

self.add_constant("LOCALIP1", int(local_ip[0]))
self.add_constant("LOCALIP2", int(local_ip[1]))
self.add_constant("LOCALIP3", int(local_ip[2]))
self.add_constant("LOCALIP4", int(local_ip[3]))

self.add_constant("REMOTEIP1", int(remote_ip[0]))
self.add_constant("REMOTEIP2", int(remote_ip[1]))
self.add_constant("REMOTEIP3", int(remote_ip[2]))
Expand Down

0 comments on commit 6f65868

Please sign in to comment.