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

Week-6 @RTEMS-GSoC-2025

Overview


This week, I completed the following tasks :

  • Using tests of ttcp and telnet from RTEMS Net Legacy Demos
  • Code towards completing GRETH lwIP Driver Initialization Coding part
  • Tried setting up QEMU so as to use QEMU on one end of virtual bridge and SIS with GRETH emulated, on its otehr end, for a completely virtual network

Work completed this week


  1. Using tests of ttcp and telnet from RTEMS Net Legacy Demos
    • Now, I decided to try tests available in RTEMS Net Legacy Demos for testing Legacy GRETH Driver. The tests which I tested are : ttcp and telnetd. +make and make clean commands don’t work since the Makefile requires some variables to be set. So for my project I had to use the folowing :

    >>> export RTEMS_MAKEFILE_PATH=$HOME/quick-start/rtems/7/sparc-rtems7/leon3
    >>> export PROJECT_ROOT=$HOME/quick-start/rtems/7

    • rnld_telnet_1 telnet test seem to go on smoothly and it apparently just seemed to start the telnet server and just delete the task immediately.
    • Now i went ahead to test ttcp test. However, I encountered the following errors :
      1. Floating point unit was being attempted to use in an unsupported context. rnld_ttcp_fpu It was resolved by doing the following :
        • Adding #define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT before confdefs.h is included, so that the startup task can be created along with access to use Floating Point Unit
        • Specify RTEMS_FLOATING_POINT instead of originally used RTEMS_NOFLOATING_POINT in the call to rtems_task_create() at rtems-net-legacy-demos/tcp/rtems_ttcp.c. Resolving this issue helped start the ttcp terminal. But I was unsure, after starting ttcp receiver on SIS, to which IP address sould I connect ttcp transmitter, in another terminal, to. rnld_ttcp_fpu_resolved
        • I was trying to print the IP address aand name of host. However, at that point, I was not getting where I can print them. I knew from my previous debugging time that I neded to access specific field sof struct rtems_bsdnet_config and rtems_bsdnet_ifconfig but not exactly where can I print them. (This was solved in next week)
      2. Switching from static network configuration to DHCP :
        • For using DHCP Network configuration in ttcp test I used the following settings in rtems-net-legacy, and built and installed it.:
          NET_CFG_IFACE = lo0
          NET_CFG_BOOT_PROT = dhcp
          NET_CFG_NETMASK = 255.0.0.0
          NET_CFG_MAC_ADDR = 00:00:00:00:00:00
          NET_CFG_GATEWAY_IP = 0.0.0.0
          NET_CFG_DOMAINNAME = localnet
        • Then I used the following settings in rtems-net-services, and built and installed it.:
          NET_CFG_IFACE = lo0
          NET_CFG_BOOT_PROT = dhcp
          NET_CFG_NTP_IP = 0.freebsd.pool.ntp.org
          NET_CFG_DNS_IP = 8.8.8.8
        • then i used ttcpshell01.exe and telnetd01.exe obtained after bulding rtems-net-services to check assignment of IP address but no IP address was assigned
          rnld_ttcp_no_ip
          rnld_telnet_no_ip
  2. Code towards completing GRETH lwIP Driver Initialization Coding part :
    • I resumed coding for GRETH lwIP part, aiming to complete initialization of driver.
    • As suggested my mentors, I began building GRETH lwiP i.e. RTEMS lwIP Package for GRETH driver. Ofcourse, I faced a ton of errors at the beginning, most of which were compilation errors, ome also included linker errors, syntax errors, data type errors, typos, etc.
    • I worked on resolving each one of them. all were not resolved by the end of this week, but only few remained, which were resolved the next week.
  3. Tried setting up QEMU so as to use QEMU on one end of virtual bridge and SIS with GRETH emulated, on its otehr end, for a completely virtual network
    • Actually, till now, I was working with SIS on one end of virtual bridge lxcbr0, and my host computer on the other end. However for complete freedo of communication, in some cases, we bneed to remove all restrictions, like firewalls, or use some commonly known/used ports or less secure tests, which are generally used only for testing purpose.
    • Using my host computer, which is also connected to the inetrnet, becomes bit risky for such testing purposes. So just to be on the safer side, and discussing with other mentors in the previous GSoc weekly meet, gedare Sir proposed to use QEMU on one end of lxcbr0 instead of my host computer.
    • So out of pure fascination, I tried emulating Raspberry Pi 4B and then setting network configurations on it, but was unsuccessful to set the network configurations as expected. Also unfortunately, Ethernet - GENET, used in Raspberry Pi 4B, wasn’t yet emulated in QEMU. So it was not much successful trying with Raspberry Pi 4B.

Plans for next week


  1. Work towards fulfilling midterm deliverables
  2. Work using SIS on one end of the communication and otehr end being in a virtual environment established using platforms like QEMU, for complete virtualization of netork and separation from actual internet.
  3. Try debugging GRETH Legacy Driver simulation in SIS
  4. Create blog till Week-7