DEV Community

nikeasyanzi
nikeasyanzi

Posted on • Edited on

Hosting a HTTP server over UEFI

HTTP-UEFI

This is a Python script to host an HTTP server under UEFI for remote testing purposes.

It is built against Python 3.6.8 provided on EDK II.

It supports operations such as file upload, test utility run, and log read to facilitate the testing process.

How to use

  • Copy the built Python libraries which are folders Tools and StdLib and the http_uefi.py in this repo under your UEFI environment

For Python 3 enablement on UEFI, please refer to https://github.com/tianocore/edk2-libc/releases/tag/v3.6.8.1 provided by Jayaprakash Nevara

If you want to build by yourself, please refer to https://github.com/tianocore/edk2-libc/blob/master/AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt

image

  • Run the HTTP server

image

Operation supported and Usage

Assume we set TARGETURL=http://192.168.100.108:8080. The following commands demonstrate a simple test scenario from a test utility upload to the test result retrieval.

  • Upload where it creates an uploads folder automatically and place the uploaded files

curl -X POST -H "Content-Type: multipart/form-data" -F "file=@my_wake_test.efi" ${TARGETURL}

  • List list dir with the custom path

curl -H "Content-Type: application/json" -X POST --data '{"operation":"listdir","path":"FS0:\uploads"}' ${TARGETURLi}/listdir

curl ${TARGETURL}/getfilelist

  • Run run the efi test utility

curl ${TARGETURL}/run/my_wake_test.efi

  • ReadLog with the customized path Image description

It is built against Python 3.6.8 provided on EDK II.

It supports operations such as file upload, test utility run, and log read to facilitate the testing process.

Check this out!
https://github.com/nikeasyanzi/http_uefi

Do your career a big favor. Join DEV. (The website you're on right now)

It takes one minute, it's free, and is worth it for your career.

Get started

Community matters

Top comments (0)

Image of Timescale

Timescale – the developer's data platform for modern apps, built on PostgreSQL

Timescale Cloud is PostgreSQL optimized for speed, scale, and performance. Over 3 million IoT, AI, crypto, and dev tool apps are powered by Timescale. Try it free today! No credit card required.

Try free

👋 Kindness is contagious

Immerse yourself in a wealth of knowledge with this piece, supported by the inclusive DEV Community—every developer, no matter where they are in their journey, is invited to contribute to our collective wisdom.

A simple “thank you” goes a long way—express your gratitude below in the comments!

Gathering insights enriches our journey on DEV and fortifies our community ties. Did you find this article valuable? Taking a moment to thank the author can have a significant impact.

Okay