Skip to content

Releases: tianocore/edk2-libc

PyUEFI Interpreter v3.6.8.1

04 Jul 05:02
Compare
Choose a tag to compare

Python UEFI Interpreter release version 3.6.8.1

The Python interpreter for UEFI shell is based on the standard C-Python version 3.6.8. It has been ported to UEFI shell and enhanced with basic capabilities required for interacting with the UEFI platform. This includes the register read/write of various types of registers such as MSR, MMIO, CPUID, PCIe, IO Port registers and etc. Python scripting on UEFI could be used for developing debug, diagnostic tools, validation tools, automation of Silicon, Firmware and platform related tests from UEFI shell. This brings the power of Python scripting on UEFI shell providing a way to leverage some of the existing tools from OS space to run on UEFI with little or no changes. Currently it has been supported for X64 and x86 platforms and the compilation of the source code is supported with VS2019 and the GCC tool chains.

The chipsec - an open source platform security analysis framework written in Python 3.x leverages the Python UEFI capabilities to run on UEFI shell. You may get more details about the project by visiting the link - https://github.com/chipsec/chipsec

Release Summary
The first release of the Python UEFI version 3.6.8.1 which is based on the standard C-Python version 3.6.8. Built using the 64 bit versions of the tool chains such as VS2019 and GCC.
The last digit in the version will be increased each time we make a release of Python UEFI from this repository.

Changelog
Below are the list of Bugzilla tickets that went into this release.

ID Summary
3549 Update edk2-libc to build with edk2/master and address VS2017/VS2019 compatibility issues
3588 Add Python 3 support for UEFI shell through edk2-libc project
3589 Remove the older versions of Python 2.7 port from edk2-libc
3626 AppPkg: Add support for atexit builtin module in Py 3.6.8
3638 edk2-libc: Enhance the python 3 efi package creation supporting script with IA32 support
3779 edk2-libc: Enhance Py3 to build with latest version of GCC tool chain on Linux
3780 edk2-libc: Enhance Py3 to build with latest version of Clang compiler tool chain
3899 edk2-libc: uuid.py script needs porting to UEFI as it is one of the key modules required for chipsec open source tool
4124 edk2-libc : Remove substring 368 from the name of python interpreter application built from edk2-libc
4161 edk2-libc : merge the chipsec specific enhancements done for edk2 module to edk2-libc
4506 edk2-libc - uninitialized global variable _res in file res_init.c of BsdSockeLib
4529 edk2-libc - file descriptor leak in rename()
4531 edk2-libc : Fix console jump to 0, 0 on lseek(fd, position=0, SEEK_CUR)
4545 ek2-libc: socket module of python UEFI interpreter fails to compile with GCC tool chain
4574 edk2-libc - realpath function signature doesn't match the standard
4576 edk2-libc: The definition of the constant nanf is missing in StdiLib
4579 edk2-libc: Fix typo issues in StdLib comments
4580 edk2-libc Python: Provide sample python scripts to demonstrate socket client capabilities on UEFI shell
4619 edk2-libc: writeio function in edk2module.c not working as expected
4668 edk2 - Compilation error due to arithmetic operation on void pointer in EmbeddedPkg
4745 edk2-libc : wrmsr function available in edk2module is not working as expected
4746 edk2-libc : add rdmsr_ex and wrmsr_ex function to read/write of msrs from specific cpu
4749 edk2-libc : add cpuid_ex api to execute the CPUID instructions on specific CPU
4788 edk2-libc - add github actions workflow to build Python UEFI interpreter with VS2019
4789 edk2-libc : make python368.inf compile conditionally in AppPkg.dsc file
4791 edk2-libc : update python UEFI build and package creation scripts to take edk2-libc path as environment variable
4794 edk2-libc : add github actions workflow to build Python UEFI interpreter with GCC

Download Links
The release binaries are available at the below links for downloading:

  1. Artifacts built using VS2019 tool chain : https://github.com/tianocore/edk2-libc/actions/runs/9788764204/artifacts/1666612053
  2. Artifacts built using GCC tool chain : https://github.com/tianocore/edk2-libc/actions/runs/9788764199/artifacts/1666613814

You may use one of these packages for your work from UEFI shell using the Python programming language.

Usage Instructions:

  1. Download the zipped artifact from one of the above paths.
  2. Unzip the zip file using any of the standard zip utilities
  3. Copy the EFI folder from the unzipped folder to a USB thumb drive, ensure that EFI folder is available at the root of the thumb drive.
  4. Ensure that the thumb drive is formatted with FA32 file system before copying the EFI folder.
  5. Connect / insert the thumb drive to a system under test (SUT) and boot the SUT to UEFI shell.
  6. Switch to the right file system such as FS0: or FS1: and so on depending on how your USB thumb drive has been enumerated by the shell.
  7. Start using the Python interpreter in interactive mode or in command line mode.

Alternatively you could create a FAT32 partition on your system and copy the contents of the EFI folder from the above package to this partition. This partition will be visible to the UEFI shell as a file system such as FS1 / FS2 depending on how the UEFI environment enumerates.