Avatar Blogs during GSoC-2025 period at RTEMS for the project - Providing SPARC GRETH Network Drivers for lwIP

Week-3 @RTEMS-GSoC-2025

Overview


This week is the third week working with RTEMS as a GSoC Contributor. This week wholly lies in the Coding Period of GSoC. This week, I completed the following tasks :

  • Able to start GRETH Simulation in RTEMS-SIS Terminal
  • Continued coding for GRETH lwIP
  • Created Blog post for Week-3

Work completed this week


  1. Able to start simulation of GRETH Legacy Network Driver in RTEMS-SIS, after a long wait.

    • First I started lxcbr0 bridge in one terminal using these commands :
      >>> sudo systemctl enable lxc-net.service
      >>> sudo systemctl start lxc-net.service

      and start SIS in another terminal, ttcpshell01.exe being present at rtems-net-services/build/sparc-rtems7-leon3/ and being generated after building RTEMS Net Services. Starting-SIS-terminal-for-LEON3

    • But, I got this error indicating that the network stack is not able to obtain network configuration via BOOTP Protocol and hence the network device (GRETH) is not configured properly. BOOTP_error
    • Also, unexpectedly, no tap interface was automatically created in spite of GRETH being enabled. lxcbr0_no_tap
    • So, I decided to go with assigning Static IP to the GRETH Driver. Upon exploring further, I learnt that setting required configuration in config.inc file of RTEMS Net Services then building RTEMS Net Services would set this configuration in hence generated ttcpshell01.exe. In addition, I decided to set configuration for GRETH Driver using custom rtems_bsdnet_ifconfig struct and rtems_bsdnet_config struct at rtems-net-services/net/legacy/net_adapter.c; however, on doing this, sometimes I was getting BOOTP error again in some cases, and in some other cases, different types of errors occured, one of them indicating that invalid address is present in a register. instruction_trap_error
    • Lastly, I thought of restarting my approach again; so I just set the configuration of my virtual network in config.inc file of RTEMS Net Services to :
      NET_CFG_IFACE = greth0
      NET_CFG_BOOT_PROT = static

    NET_CFG_SELF_IP = 10.0.3.2
    NET_CFG_NETMASK = 255.255.255.0
    NET_CFG_MAC_ADDR = 82:99:91:91:91:91
    NET_CFG_GATEWAY_IP = 10.0.3.1
    NET_CFG_DNS_IP = 10.0.3.1
    NET_CFG_DOMAINNAME = localnet
    NET_CFG_NTP_IP = 10.0.3.1

    and built it, avoiding using custom rtems_bsdnet_ifconfig and rtems_bsdnet_config structs…and…the shell started inside SIS where I was able to run ttcp commands! SIS_TTCP_working

    • tap0 interface was also created successfully when TTCP was running. tap0_interface_created
    • However, apparently the traffic in TTCP was too overwhelming causing it to crash unexpectedly or just stay still, without any action as shown above. So, according to the suggestion of my mentors, I am planning too check with Telnet and/or TCP Echo Server, or rather even UDP Echo Server.
  2. Continued coding for GRETH lwIP Port
    • This week, I was not able to devote much time for coding for GRETH lwIP Port
    • However I studied further studied esecially memory mapping for GRETH.
  3. Created Blog post for current week (Week-3)

Plans for next week


  1. Explore options for TCP Echo Server / Telnet / UDP Server for GRETH Legacy Networking Driver Simulation
  2. Create blogs till Week-4 by end of week
  3. Continue on GRETH lwIP Code