Intrdocution
It is short description for Python package file structure.Assume following folder structure in boot device
FSx: Efi
├── Apps
│ ├── CorepySample
│ └── EfiPy2Sample
├── BOOT
│ └── BOOTX64.EFI
├── lib
├── StdLib
│ ├── etc
│ └── lib
│ └── python36.8
│ ├── corepy
│ ├── ctypes
│ ├── EfiPy2
│ │ ├── Lib
│ │ ├── MdePkg
│ │ │ ├── Base.py
│ │ │ ├── Guid
│ │ │ ├── IndustryStandard
│ │ │ ├── Library
│ │ │ ├── Pi
│ │ │ ├── Ppi
│ │ │ ├── Protocol
│ │ │ ├── Register
│ │ │ │ ├── Amd
│ │ │ │ └── Intel
│ │ │ │ ├── Microcode.py
│ │ │ │ └── Msr
│ │ │ └── Uefi
│ │ └── ShellPkg
│ │ ├── Guid
│ │ └── Protocol
│ └ ... <<Python linraries>>
└── Tools
└── Python.efi
1. EfiPy2 self-defined modules are at FSx:\Efi\StdLib\lib\python36.8\EfiPy2\Lib
2. Executable python tool is at FSx:\EFI\Tools.
Any python scripts which using EfiPy2 packages in FS0:\EFI\Apps need to have import statement.
import EfiPy2
or
import EfiPy2 as EfiPy
Example
Example
This script file "Startup.nsh" run "CpuIdBasic.py", automatically, while system boot into shell.
(Assume python and its related packages are installed in fs0)
Python.efi fs0:\Efi\Apps\EfiPy2Sample\CpuIdBasic.py
Python.efi fs0:\Efi\Apps\EfiPy2Sample\CpuIdBasic.py
No comments:
Post a Comment