0

Following the instructions on MicroPythonTestFramework/MicroPythonPkg, I can successfully run micropython.efi (using VS2015x86 instead of VS2017).

However importing the uefi module as given in the example on the above link fails:

FS0:\EFI\Python\> micropython.efi
MicroPython v1.9.4 on 2018-07-30; uefi version
Use Ctrl-D to exit, Ctrl-E for paste mode
>>> import Lib.Uefi.uefi as uefi
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: no module named 'Lib.Uefi'

MicroPythonDxe.efi is in the same folder as micropython.efi.

How do I do to compile the uefi module into MicroPythonDxe.efi?

1 Answer 1

1

In order to successfully import the Python UEFI module, you must have the UEFI Python library on your device and accessible.

The modules you are looking for are located in MicroPythonPkg/MicroPythonDxe/Lib/Uefi.

The device file system will end up looking something like below

FS0:\EFI\Python\Lib\Uefi\uefi.py
                        \features.py
                        \msr.py
                        \protocols.py
                        \register.py.... etc
1
  • That works. I was thinking that the libs are compiled into the DXE file. But looks like they aren´t. Sep 2, 2021 at 6:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.