Skip to content

Tasks Network Block Device

Laurie0131 edited this page Jun 29, 2017 · 1 revision

Add Network Block Device support

  • Difficulty: Medium
  • Language: C
  • Mentor:
  • Suggested by: ,

Table of Contents

Details

Test environment

Client

Server

Links for more information

Development environment

Building: This project can be completed on any edk2 supported OS or toolchain.

Sub-goals

Sub-goals:

  • Using wireshark and publically available documentation, document the client/server protocol.
    • Basic protocol.
    • [EXTRA] Named exports.
    • [EXTRA] Authentication.
  • Setup UEFI environment with working TCP/IP (can 'ping' from Shell)
  • Investigate EDK2 TcpIoLib and ecosystem.
    • Some questions to answer: how to get local IP? Study UEFI spec and EDK2 code under NetworkPkg.
    • Write an UEFI application that opens a TCP socket, writes and reads from it. Connect to a 'netcat' server. Netcat is a simple tool (like cat) that can be a TCP server or client (on Linux, alternatives exist for Windows).
    • Extend UEFI application to implement the *basic* NBD protocol - no named exports, no authentication. Be able to connect to a server and read back one block of data.
  • Understand UEFI driver model, and block protocols: EFI_BLOCK_IO_PROTOCOL and EFI_BLOCK_IO2_PROTOCOL.
    • Better understand protocols, interfaces.
    • Understanding driver binding, enumeration.
    • Implement a dummy EFI_BLOCK_IO_PROTOCOL driver that creates a sample block device that returns all zeroes for all reads.
  • NBD block I/O device.
    • Wire-in NBD support from your network application above into your block I/O driver - implement read-only support.
    • [EXTRA] Add read/write support.
    • Think about management interface - how do you specify target server/port? (assumed you hardcoded it for now).
    • [EXTRA] Write simple tool to manage NBD driver.

Further Discussion

This project would be for an edk2 based driver, so please discuss the project on edk2-devel.

See Also

Clone this wiki locally