I'm trying to run some network program (like nginx) on RISC-V.
I'm not aware of network devices available on RISC-V, and I don't want to implement it myself, so I'm looking for the other way.
First I tried running simple program that send HTTP request to the given address. It resolves the IP address using gethostbyname
and sends a HTTP request.
I successfully ran riscv-linux on spike simulator, and compiled the program and ran it. gethostbyname
returns Unknown server error
, and when I use IP address directly, connect
returns Network is unreachable
error.
I found that the front end server fesvr
can handle system calls that is forwarded from the RISC-V processor, and thought maybe it will handle network related system calls. I also found fesvr-eth
and thought maybe it is something related to handling network services, but according to this link it is just for connecting fesvr
running on PC to the development board by ethernet. Also fesvr-eth
has been removed from the latest git repo.
So now I want to look and risc-v linux and see how it actually handle network system calls like connect
. I'm thinking maybe if the network operations are only done inside localhost
, it can be handled properly without a network device. Or there can be easy way to extend fesvr
to handle network services.
Summarizing the questions:
- is there a way to run network applications in RISC-V, that I missed?
- can network services be actually handled if the request is from within the same host, even if there is no network devices?
- any other comments or references that can be helpful?