Friday, April 22, 2016

EfiPy build environment

For re-building EfiPy from sourceforge, it uses EDKII official code.
https://svn.code.sf.net/p/edk2/code/branches/UDK2015 rev: 20289

It means it get something wrong in Python package if following happen in standard output
  File "/Efi/StdLib/lib/python.27/site.py", line 69, in <module>
ImportError: No module named os

9 comments:

  1. Hi,
    As I understood your post, if I see error of type "ImportError: No module named XXX", in my case XXX is "site", I should rebuild project.
    If so, is it producible to provide detailed instructions to build EfiPy.

    What kind of compiler I should use, and per-requisits.

    Thanx in advance.
    Maxim

    ReplyDelete
  2. Hi,

    I am failed to find any readme for building of EfiPy.
    If such file exists, could you please point to it.

    Thanx in advance.
    Maxim

    ReplyDelete
    Replies
    1. Hi Maxim,

      Why this blog provides rebuild project svn revision?
      It needs EDKII official Python code to rebuild EfiPy.
      Some people feedback that they have this error in their environment after rebuild project, on both virtual machine and real machine.
      After understanding, they get Python code from https://svn.code.sf.net/p/edk2/code/trunk/edk2
      Python code which is get from this folder makes this error with some revision.
      This blog provides workable svn folder and its revision for your reference (https://svn.code.sf.net/p/edk2/code/branches/UDK2015).

      README file, it is good question. It will be published ASAP.
      EfiPy is developed with Visual Studio 2012.
      Trying to build EfiPy...
      Shortly, merge EfiPy_r0.1.0(20289)\Src\AppPkg with EDKII AppPkg, and try to build EfiPy.inf and PythonCore.inf in AppPkg\Applications\Python.
      Here is workable EfiPy and its package, EfiPy_r0.1.0(20289)\Disk

      Thanks

      Delete
  3. Hi,

    Will try your suggestion
    >>Here is workable EfiPy and its package, EfiPy_r0.1.0(20289)\Disk
    Do you mean this one?
    "C:\EfiPy_r0.1.1(20289)\Disk\EFI\Tools\Python.efi".
    Once I ran on my machine i have error:ImportError: No module named site.

    Thanx
    Maxim

    ReplyDelete
    Replies
    1. Hi Maxim,

      You could try these procedure for run EfiPy, quickly.
      On host
      1. plug boot device in host and assume its device letter is "X" on your PC.
      1. Copy "EfiPy_r0.1.0(20289)\Disk" into "X:\".
      2. Copy BootX64.efi into X:\EFI\Boot (it your target machine does not have internal shell)
      Move boot device to Target machine
      1. plug boot device from host into target machine
      1. power on target machine
      2. Changing working device to "fsX:" (assume fsX is boot device)
      3. Changing working folder to "fsX:\EFI\Tools"
      4. Run this command "Python.efi EfiPyShell.py"
      result:
      EfiPyShell prompt will show on screen.

      Thanks

      Delete
  4. This comment has been removed by the author.

    ReplyDelete
  5. Hi,

    Thanx for support, issue was in path to site-packages
    After moving EFI\... to \, all OK.

    Thanx again
    Maxim

    ReplyDelete
    Replies
    1. Hi Maxim,

      Yes, It does. And enjoy UEFI Application without compiling source code.

      Thanks.

      Delete