/PugPkg

A sandbox package to build UEFI drivers using a front-end script

Primary LanguagePythonBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

Pug

"Pug, the UDK Guide dog" is a front-end to build a standalone UDK/EDK2 driver using .C source files and a .PY as the config file.

  • The UDK build process is automated and simplified by Pug, so the user does not need to tackle the tedious details in .INF/.DSC files when she/he is simply intent to write a tiny driver for proof-of-concept.
  • Since only .C and .PY files are created or touched, the user can easily deliver those touched files to peers/repositories for reviewing/archiving purpose.
  • Pug runs with MSVC(Windows) or GCC(Linux) or Xcode(Mac)

Prerequisites:

  1. Python 2.7.x or Python 3.7.x
  2. git 2.17.x

Generic prerequisites for the UDK build:

  1. Reference:
  2. nasm (2.0 or above)
  3. iasl (version 2018xxxx or later)
  4. MSVC(Windows) or Xcode(Mac) or GCC(Open-source Posix)
  5. build-essential uuid-dev (Posix)
  6. pip2 install future (Python 2.7.x)
  7. motc (Xcode)

Tool installation hints for any Debian-Based Linux:

$ sudo apt update ; sudo apt install nasm iasl build-essential uuid-dev

Usage:

  1. Change-directory to folder Pug .
  2. (Optional) Edit config.py for the settings accordingly in: WORKSPACE, PLATFORM, TARGET_TXT.
  3. (Optional) Edit CODETREE in config.py to specify where to place the downloaded source files of the UDK git repo or any other additional respos.
  4. (Optional) Edit COMPONENTS in config.py for the target entry(-ies) to be built.
  5. Run ./pug.py
    pug.py would automatically try to git-clone the edk2 code tree and the submodule, openssl for the 1st time.
  6. Browse folder _pug_ for the temporary files (.dsc/.inf) and folder _pug_/Conf for CONF_PATH setting files.
  7. Browse folder ../Build for the build results.
  8. Run ./pug.py clean or ./pug.py cleanall to clean (all) the artifact files.

Additional use cases:

  1. To build an edk2 package: (Taking OvmfPkg and ShellPkg for examples.)
    $ ./pug.py -p OvmfPkg/OvmfPkgX64.dsc
    $ ./pug.py -p ShellPkg/ShellPkg.dsc