Skip to content

Lichtso/UnikernelExperiments

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UnikernelExperiments

TCP/IPv6-enabled Pine64+ bootloader

This project provides you with the toolchain and resources needed to start developing your own unikernel. It is completely written from scratch and is thus still well structured without legacy code.

Getting started

You will need:

  • Make
  • LLVM 3.9 or higher: Clang, LLD, llvm-objdump (optional)
  • Rust
  • Pine64+ with 2GB (other versions are untested)
  • Mirco-SD-card to store the bootloader
  • Micro-USB-cable for power supply
  • RJ45-cable for data transfer
  • UART for debugging (optional)
make build/Bootloader.bin
dd if=build/Bootloader.bin of=/dev/[Mirco-SD-Card]
tools/screen /dev/[UART-USB]
ping6 FE80::34C9:E3FF:FEF1:B805%[Interface]
make build/Kernel.bin
nc FE80::34C9:E3FF:FEF1:B805%[Interface] 1337 < build/Kernel.bin

Example Use Cases

  • (Self)-Education: Learn or teach how low level software works
  • Experimental development: Develop your own unikernel easily
  • Internet of Things: Leave behind all the bloatware
  • Security: Less code -> less breaches

State of Affairs / Features

  • Hardware Driver

    • UART ✓
    • RSB ✓
    • AXP803 ✓
    • DRAM
      • 2GB ✓
      • Auto size detection
    • Ethernet ✓
    • High Speed Timer ✓
    • Timer
    • Real Time Clock
    • Interrupt Controller
    • SD-Card
    • Thermal Sensors
    • DVFS
  • Software Driver

    • 64 Bit: ARMv8 / ARM64 / AArch64 ✓
    • Floating point unit ✓
    • Caches ✓
    • MMU
    • Interrupt Handling
    • Multi threading
    • IPv4 / ICMPv4
    • IPv6 / ICMPv6, implemented features:
      • Echo ✓
      • Neighbor solicitation and advertisement ✓
    • UDP ✓
    • TCP
      • IPv4
      • IPv6 ✓
      • Receiving payload ✓
      • Sending payload
      • Connect / Listen / Close ✓
      • Sequence number overflow
      • Receive and transmit ring buffer
      • Timestamps
      • Selective acknowledgment
      • Initial sequence numbers
      • Correct timings
      • Multiple connections

Communication Interfaces

UART is a nice and easy interface for debugging and as a interactive console. But it is too slow to upload large binaries. The firmware comes with a USB-OTG boot option but:

  • The protocol is complicated and badly documented
  • Ethernet can be faster: Up to 1 GBit/s instead of 0.48 GBits/s of USB2
  • RJ45-cables are more common than USB-OTG-TypeA-cables
  • You probably want to connect the board to a network anyway and thus don't need a extra USB connection only for booting

References

Wiki

Tutorials

Code

Docs

Releases

No releases published

Packages

No packages published

Languages