Platform Build Lab Up Xtreme - Windows
tianocore.org
- Download Minplatform Using Git Bash
- Build a EDK II Platform using Up Xtreme Aaeon board
- Open "Git Bash"
- Linux like commands "/" for dirs.
- Use "/c" to go to C: in Windows, etc.
- Cd to the Work Space:
$ cd /c/fw
$ mkdir UpX
$ cd UpX
In the Git Bash command line window Do the following:
May need to Set PROXYS FIRST (below is an example for Intel Corporation)
$ git config --global https.proxy proxy-dmz.intel.com:912
$ git config --global http.proxy proxy-dmz.intel.com:911
Edk2 Download with tag edk2-stable202108
$ git clone https://github.com/tianocore/edk2.git
$ cd edk2
$ git checkout 7b4a99be8a39c12d3a7fc4b8db9f0eab4ac688d5
$ git submodule update --init
$ cd ..
Edk2-platforms Download with tag Aug 2021
$ git clone https://github.com/tianocore/edk2-platforms.git
$ cd edk2-platforms
$ git checkout 40609743565da879078e6f91da76fc58a35ecaf7
$ cd ..
Edk2-non-osi
$ git clone https://github.com/tianocore/edk2-non-osi.git
FSP
$ git clone https://github.com/Intel/FSP.git
Download the PlatformBuildLab_MinPlatform_FW.zip from : github.com PlatformBuildLab2_FW.zip
OR
Use git clone to download the PlatformBuildLab_MinPlatform_FW
$ git clone https://github.com/tianocore-training/PlatformBuildLab_MinPlatform_FW.git
Directory PlatformBuildLab_MinPlatform_FW will be created
/FW
/MinPlatformBuild
- asl - Asl Compiler - Readme has download info
- FTDI-Driver - Serial / USB cable - Readme has download info
- UpX_Lab - Lab Material and Lab Guide
- TeraTerm - Terminal app - Readme has download info
- Nasm - Nasm Assembler - Readme has download info
How to Download & Build: Open Source MinPlatform Readme.md
Directory C:\MinPlatformBuildLab_FW\FW\MinPlatformBuildLab from Download or zip
or Download Asl compiler described in the Readme.txt (Windows)
Copy \asl Folder to C:\
Directory C:\MinPlatformBuildLab_FW\FW\MinPlatformBuildLab from Download or zip
or Download Nasm Assembler described in the Readme.txt (Windows)
Copy \Nasm Folder to C:\
edk2/ https://github.com/tianocore/edk2
. . .
edk2-platforms/ https://github.com/tianocore/edk2-platforms
Platform/
Intel/ -----------------------------Invoke the build_bios.py form here
BoardModulePkg
WhiskeylakeOpenBoardPkg
UpXtreme -------------------- Platform DSC & FDF here
MinPlatformPkg
Silicon/
Intel/
CoffeelakeSiliconPkg
. . .
Features/Intel
AdvancedFeaturePkg
edk2-non-osi/ https://github.com/tianocore/edk2-non-osi
Silicon/
Intel/
CoffeelakeSiliconBinPkg
FSP/ https://github.com/IntelFsp/FSP
CoffeelakeFspBinPkg
Follow Steps from here to Pin the Visual Studio Command Prompt to the Windows Task Bar
Open a Visual Studio Command prompt
Cd to the Min Platform Build directory
$> cd \
$> cd Fw\UpX\edk2-platforms\Platform\Intel
Check the python version
$> python --version
Make sure that the PYTHON_HOME
is in the environment settings
If it is not, use the following (Windows) (Note for Python v 3.8.n)
set PYTHON_HOME=%USERPROFILE%\AppData\Local\Programs\Python\Python38-32
Check for platforms that are MinPlatform capable
$> python build_bios.py -l
Build the Up Xtreme
Invoke the Python Build script for Up Xtreme (example with VS2017)
$> python build_bios.py -p UpXtreme -t VS2017
- note use "
-t VS2017
" or "-t VS2019
" at end of next command if VS is not VS2015
VS2015 is the default so the following will work
$> python build_bios.py -p UpXtreme
Many Platforms have a bash, bat or Python script file to pre or post process the EDK II build process
For MinPlatform platform specific config Build processing: Build_config.cfg – Lists directories required for the build and build settings
Link to Up Xtreme Build_config.cfg
The build command was the following Python script to preform the build
Python build_bios.py -p UpXtreme
The build script will call the following executable to perform the build
. . .
Calling $ build -n 0 --log=Build.log --report-file=BuildReport.log
and from UpX\conf\target.txt
Variable | Value | Description |
---|---|---|
TARGET | DEBUG | Build Mode |
TARGET_ARCH | IA32 X64 | CPU Architecture |
TOOL_CHAIN_TAG | VS2015 | VS Tool Chain |
ACTIVE_PLATFORM | \WhiskylakeOpenBoardPkg\ UpXtreme\OpenBoardPkg.dsc | Platform DSC file |
Repor file created(via Python script | BuildReport.log | PCDs, Libs, etc. |
Many Platform Parameters are defined in a top .DSC file that controls PCD and build switches
For Up Xtreme : edk2-platforms\Platform\Intel\WhiskeylakeOpenBoardPkg\UpXtreme OpenBoardPkgPcd.dsc and OpenBoardPkgBuildOption.dsc
Example:
# Define Build Options both for EDK and EDKII drivers.
DEFINE DSC_S3_BUILD_OPTIONS =
DEFINE DSC_CSM_BUILD_OPTIONS =
!if gSiPkgTokenSpaceGuid.PcdAcpiEnable == TRUE
DEFINE DSC_ACPI_BUILD_OPTIONS = -DACPI_SUPPORT=1
!else
DEFINE DSC_ACPI_BUILD_OPTIONS =
!endif
DEFINE BIOS_GUARD_BUILD_OPTIONS =
DEFINE OVERCLOCKING_BUILD_OPTION =
Invoke the Python Build script for Up Xtreme for building a RELEASE version of the IFWI.
Only the -r
is added to the previous DEBUG build.
DEBUG Build is the default
$> python build_bios.py -p UpXtreme -r -t VS2017
Note: -t VS2017
, use the correct VS Version
- Contains detailed debug strings that show the boot process, along with various ASSERT/TRACE errors
- Uses the serial port for debug string output
- Larger image than RELEASE, due to the embedded debug info
- Slower boot than RELEASE, due to the time it takes to display the debug info
- Does not contain the debug strings
- Does not use the serial port for debug output
- Smaller image than DEBUG
- Faster boot than DEBUG
In the Directory C:\MinPlatformBuildLab_FW\FW\MinPlatformBuildLab\UpX_Lab
There is a file: Logo.bmp
OR
Create a .BMP with Windows Paint and save to the name `Logo.bmp
Copy Logo.bmp
to C:\FW\UpX\edk2\MdeModulePkg\Logo
and overwrite existing file
See . . . WhiskeylakeOpenBoardPkg\UpXtreme\OpenBoardPkg.fdf
Approx. line 285 where the logo file is directly included into the IFWI image.
Invoke the Python Build script for Up Xtreme for building a new Logo.bmp
$> python build_bios.py -p UpXtreme -t VS2017
Note: -t VS2017
, use the correct VS Version
Locate the build .fd images
Note that the script displays the location of the final .fd files
Done
Fd file can be found at C:\FW\UpX\Build\WhiskeylakeOpenBoardPkg\UpXtreme\DEBUG_VS2017\FV\UPXTREME.fd
This file is what will be used to flash into the Up Xtreme board.
After the build is complete use dediprog to flash into the Up Xtreme system
Note: This lab does not have these details at this time.
To flash the .fd file on the Up Xtreme a tool similar to a Dediprog can be used to flash the image into the upper region of the flash device on the board.
IT IS IMPORTANT not to overwrite the lower sections of the flash device since it contains the IFWI Flash layout descriptor and if it is overwriten the board will not execute ANY of the Firmware image.
- Download Minplatform Using Git Bash
- Build a EDK II Platform using Up Xtreme Aaeon board
Questions
Return to Main Training Page
Return to Training Table of contents for next presentation link
/**
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) 2021-2022, Intel Corporation. All rights reserved.
**/