• This repository has been archived on 28/Nov/2018
  • Stars
    star
    142
  • Rank 258,495 (Top 6 %)
  • Language
    C
  • License
    BSD 3-Clause "New...
  • Created about 10 years ago
  • Updated over 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A quick port of lwIP running on top of BareMetal.

lwIP on BareMetal

A lightweight TCP/IP stack running on an ultra-lightweight kernel

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.

Building the web server

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.

Running the web server

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

Changing the web content

The web page content is in httpd_raw/fs/ so make all changes there.

cd httpd_raw
perl makefsdata/makefsdata -s
cd ..
make