---?image=assets/images/gitpitch-audience.jpg
@title[UEFI_Driver_Wizard_Lab]
This slide deck has moved to:
https://gitpitch.com/tianocore-training/UEFI_Driver_Wizard_Lab/master#/
tianocore.org Note: PITCHME.md for UEFI / EDK II Training UEFI Driver Wizard Lab
Copyright (c) 2018, Intel Corporation. All rights reserved.
Redistribution and use in source (original document form) and 'compiled' forms (converted to PDF, epub, HTML and other formats) with or without modification, are permitted provided that the following conditions are met:
-
Redistributions of source code (original document form) must retain the above copyright notice, this list of conditions and the following disclaimer as the first lines of this file unmodified.
-
Redistributions in compiled form (transformed to other DTDs, converted to PDF, epub, HTML and other formats) must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS DOCUMENTATION IS PROVIDED BY TIANOCORE PROJECT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL TIANOCORE PROJECT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@title[Lesson Objective]
- @fa[certificate gp-bullet-cyan] Setup the UEFI Driver Wizard
- @fa[certificate gp-bullet-yellow] Create a UEFI Driver Template
---?image=assets/images/binary-strings-black2.jpg
@title[UEFI Driver Wizard Section ]
Creating a Template UEFI Driver with the
UEFI Driver Wizard
---?image=/assets/images/slides/Slide3.JPG
@title[UEFI Driver Wizard Overview]
UEFI Driver Wizard Overview
- ✓ Open source tool
- ✓ Based on Driver Writer’s Guide for UEFI 2.3.1 content
- ✓ Intel engineers contributed
- ✓ Located on www.TianoCore.org
Note:
---?image=/assets/images/slides/Slide5.JPG @title[Installing Python for UEFI Driver Wizard]
Installing Python for UEFI Driver Wizard
Requirements and Options- Work space must contain BaseTools, MdePkg & MdeModulePkg Packages from UDK2018 for Driver development on Tianocore.org
- Uses previous lab’s setup `$HOME/src/edk2`
- Python scripts from Github Link then use instructions from README for Python and wxPython versions to install then run
- `bash$ python launch.py`
Note:
Same as slide
---?image=/assets/images/slides/Slide7.JPG @title[Requirements for Your Driver ]
Requirements for Your Driver
@snap[north-west span-80 ]@box[bg-grey-25 text-white rounded my-box-pad2 ](
@snapend
@snap[north-west span-80 ]
Using UEFI Driver Wizard
- UEFI Device Driver
- UEFI Version 2.7 (0x00020046)
`#define EFI_2_70_SYSTEM_TABLE_REVISION ((2<<16) | (70DEC))` - Unloadable driver
- Support IA32 & x64 CPUs
- Returns component name information
- Test console device
- Option to produce strings & forms for setup
Note:
@title[Template File Contents]
Template File Contents
@snap[north-west span-60 fragment]
@box[bg-gold2 text-white rounded my-box-pad2 ](
Proper UEFI driver entry point
@snapend
@snap[north-east span-65 fragment]
Basic driver libraries/headers
@snapend
@snap[north-west span-70 fragment]
Skeletons for common driver functions
@snapend
@snap[north-east span-90 fragment]
Error values until ported EFI_UNSUPPORTED, EFI_DEVICE_ERROR
@snapend
Note:
- Establishes a proper UEFI Driver Entry Point
- References to basic driver libraries/headers based on Driver Wizard form input
- Inserted in .INF, .H and .C files
- Skeletons for common driver functions
- Includes comments based on information from the Driver Writer’s Guide for UEFI 2.3.1
- Functions may return error values until ported : (EFI_UNSUPPORTED, EFI_DEVICE_ERROR)
---?image=/assets/images/slides/Slide_LabSec.JPG
@title[Lab 1: Create a UEFI Driver section]
Lab 1: Create a UEFI Driver with the UEFI Driver Wizard
- In this lab, you'll create a new UEFI driver using the UEFI Driver Wizard.
- This will create a set of "c" code files to be used as a template UEFI Driver used in the subsequent driver labs
@title[Lab 1: Install UEFI Driver Wizard, Python & wxPython ]
Lab 1: Install UEFI Driver Wizard, Python & wxPython
- Perform Lab Setup from previous Labs
- From the `~FW/DriverWizard` folder, copy and paste folder “`~FW/DriverWizard/UefiDriverWizard`” to `~$Home`
- Check if version 2.7.x is the default of Python from Terminal Prompt
- `bash$ python –V`
- `Python 2.7.12`
- Install the wxPython (Version 3.0 )
- `bash$ sudo apt-get install python-wxgtk3.0`
Note:
same as slide
---?image=/assets/images/slides/Slide16.JPG @title[Lab 1: UefiDriverWizard -Select Work Space]
Lab 1: UefiDriverWizard -Select Work Space
Note:
-
Terminal Prompt (Cnt-Alt-T)
bash$ cd ~UefiDriverWizard
bash$ python launch.py
-
Select a Work Space
-
Control+O – to browse for a directory
-
Browse to ~src/edk2
-
Select Open
---?image=/assets/images/slides/Slide18.JPG @title[Lab 1: -Create a New UEFI Driver]
Lab 1: Create a New UEFI Driver
Note:
- Control+N – to Open Menu
---?image=/assets/images/slides/Slide20.JPG @title[Lab 1: New UEFI Driver Menu]
Lab 1:
New UEFI Driver Menu
- “UEFI Driver Path” – Type: “MyWizardDriver”
- Note: “UEFI Driver Name” is filled in
- Ensure all the forms, radio buttons, and boxes are filled in and selected exactly like the image to the right.
- Note:A new, specific driver GUID will populate, so it will be different than this image
- Click
Note:
- “UEFI Driver Version” – Type: “1.0”
- “UEFI Driver Type” – Select: “UEFI Driver Model Device Driver”
- “Opetional Features …” – Select:
-
Unloadable
-
Driver Supporte EFI Version Protocol
-
HII Packages for Strings, Fonts, or images
-
- “CPU Architecture” – Select: “IA32” and “X64”
---?image=/assets/images/slides/Slide22.JPG
@title[Lab 1: UEFI Driver Model Optional Features]
Lab 1: UEFI Driver Model Optional Features
- Ensure all the forms, radio buttons, and boxes are filled in and selected exactly like the image to the right.
- ✓ "Componnt Name 2 Prorocol”
- ✓ "Componnt Name Prorocol”
- ✓ "HII Packages for Forms . . .”
- Click
Note:
- UEFI Driver Model Opetional Features – Select:
- Componnt Name 2 Prorocol
- Componnt Name 2 Prorocol
- HII Packages for Forms and HII based configuruation
---?image=/assets/images/slides/Slide24.JPG
@title[Lab 1: UEFI Driver Consumed Protocol]
Lab 1: UEFI Driver Consumed Protocol
Select✓ "PCI Driver that consumes the PCI I/O Protocol”
- Click
Note:
Same as slide
---?image=/assets/images/slides/Slide26.JPG @title[Lab 1: UEFI Driver Produced Protocols]
Lab 1: UEFI Driver Produced Protocols
- Select
- ✓ "Byte stream device (i.e.UART)
producing Serial I/O Protocol” - Click
Note:
Same as slide
---?image=/assets/images/slides/Slide28.JPG
@title[Lab 1: UEFI Driver Created]
Lab 1: UEFI Driver Created
UEFI Driver template createdNote:
Same as slide
@title[Summary]
- @fa[certificate gp-bullet-cyan] Setup the UEFI Driver Wizard
- @fa[certificate gp-bullet-yellow] Create a UEFI Driver Template
---?image=assets/images/gitpitch-audience.jpg
@title[Questions]
---?image=assets/images/gitpitch-audience.jpg
@title[Logo Slide]
![Logo Slide](/assets/images/TianocoreLogo.png =10x)
@title[Acknowledgements]
/**
Redistribution and use in source (original document form) and 'compiled' forms (converted
to PDF, epub, HTML and other formats) with or without modification, are permitted provided
that the following conditions are met:
Redistributions of source code (original document form) must retain the above copyright
notice, this list of conditions and the following disclaimer as the first lines of this
file unmodified.
Redistributions in compiled form (transformed to other DTDs, converted to PDF, epub, HTML
and other formats) must reproduce the above copyright notice, this list of conditions and
the following disclaimer in the documentation and/or other materials provided with the
distribution.
THIS DOCUMENTATION IS PROVIDED BY TIANOCORE PROJECT "AS IS" AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL TIANOCORE PROJECT BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE.
Copyright (c) 2018, Intel Corporation. All rights reserved.
**/