This is a quick and simple proof of concept web server running on top of the lightweight TCP/IP stack lwIP, which in turn is running on top of BareMetal. The BareMetal binary is a mere 16,384 bytes and the web server application is appoximately 170,000 bytes.
BareMetal is a new Exokernel for 64-bit x86-based systems. The kernel, as well as its various device drivers, are written entirely in Assembly for optimal speed, simplicity, and manageability of the code. BareMetal provides raw access to the underlying hardware in order to allow for maximum performance. Applications can be specifically tailored to focus on where performance is needed the most.
More information about BareMetal can be found on the BareMetal homepage at Return Infinity. The source code is available for viewing on GitHub.
lwIP is an open source implementation of the TCP/IP protocol suite that was originally written by Adam Dunkels of the Swedish Institute of Computer Science but now is being actively improved upon by a team of developers throughout the world.
More information about lwIP can be found at the lwIP homepage.
git clone https://github.com/ReturnInfinity/BareMetal-lwIP.git
cd BareMetal-lwIP
make
The resulting httpd.app
binary can be added to the BareMetal OS disk iamge.
httpd.app
takes 3 arguments - IP address, subnet, and gateway.
> httpd.app 10.0.0.100 255.255.255.0 10.0.0.1
Without arguments the app will use the following:
- IP: 192.168.242.2
- SN: 255.255.255.0
- GW: 192.168.242.1
The web page content is in httpd_raw/fs/ so make all changes there.
cd httpd_raw
perl makefsdata/makefsdata -s
cd ..
make