=============================================================================== UEFI Firmware Project for Intel Atom(R) Processor E3900 Series platforms Build Instructions for Open Source Release, Version 0.71, Aug 30th, 2018 ================================================================================ ================================================================================ INDEX ================================================================================ 1. HOW TO CREATE A FULL SOURCE TREE 2. HOW TO BUILD (WINDOWS ENVIRONMENT) 3. HOW TO BUILD (LINUX ENVIRONMENT) NOTE REGARDING UP SQUARED PLATFORM: The firmware provided by this project for the UP Squared maker board is not based on the official manufacturer's firmware. This project is for experimentation and is not supported by the manufacturer (Aaeon). Flashing this firmware on the UP Squared will void the manufacturer's warranty. Thanks to Aaeon for their cooperation and providing platform porting information. ================================================================================ 1. HOW TO CREATE A FULL SOURCE TREE ================================================================================ 1) Create a new folder (directory) on the root of your local development machine for use as your workspace (this example uses "C:\MyWorkspace"). NOTE: Some code paths are very long, and placing the working directory too deep below the ROOT directory may cause the path to be longer than the operating system or file system's maximum path length. NOTE: Below git commands are verified under Git Bash environment of Git for Windows. 2) Get devel-IntelAtomProcessorE3900 branch from GitHub* with the following command. a. git clone https://github.com/tianocore/edk2-platforms.git -b devel-IntelAtomProcessorE3900 b. Enter folder edk2-platforms by running "cd edk2-platforms" c. git checkout 2c15135d5d766b276bc1a6d41385230d4aeeb7ea 3) Get EDK II packages a. git clone -b vUDK2018 https://github.com/tianocore/edk2.git Once the download completes, all EDK II packages and files will be found under the "C:\MyWorkspace\edk2" directory. 4) Get the Intel(R) Firmware Support Package(Intel(R) FSP) a. git clone https://github.com/IntelFsp/FSP.git b. Enter folder FSP by running "cd FSP". c. git checkout 667eb3edc5d5cd562c33d9fbe89b9bee6a8a80ae d. Copy the ApolloLakeFspBinPkg to the folder "C:\MyWorkspace\edk2-platforms\Silicon\BroxtonSoC\BroxtonFspPkg". 5) Install UEFI UNDI driver: 5.1) Install UEFI UNDI driver for Intel i210 Ethernet Controller Download PREBOOT.EXE Version 21.1 from the "Intel® Ethernet Connections Boot Utility, Preboot Images, and EFI Drivers" page. https://downloadcenter.intel.com/download/19186/Intel-Ethernet-Connections-Boot-Utility-Preboot-Images-and-EFI-Drivers Windows user: a. Install PREBOOT.EXE into the default folder (C:\Intel21.1). b. Copy the UEFI x64 PCI-E gigabit driver (C:\Intel21.1\APPS\EFI\EFIx64\E7320X3.EFI) to the platform package directory below, create the folder if it does not exist: "C:\MyWorkspace\edk2-platforms\Platform\BroxtonPlatformPkg\Common\Binaries\UNDI\I210PcieUndiDxe" Linux user: a. Use command "unzip PREBOOT.EXE" to extract UEFI x64 PCI-E gigabit driver (preboot/APPS/EFI/EFIx64/E7320X3.EFI) b. Copy E7320X3.EFI to platform package directory below, create the folder if it does not exist: "~/src/MyWorkspace/edk2-platforms/Platform/BroxtonPlatformPkg/Common/Binaries/UNDI/I210PcieUndiDxe" 5.2) Install UNDI driver for AX88179 USB-to-LAN adapter a. Download AX88179_178A_UEFI_V2.8.0.zip from http://www.asix.com.tw/FrootAttach/driver/AX88179_178A_UEFI_V2.8.0.zip. b. Unzip AX88179_178A_UEFI_V2.8.0.zip to get AX88179_178A_UEFI_V2.8.0_X64.efi and AX88179_178A_UEFI_V2.8.0_IA32.efi. C. Copy AX88179_178A_UEFI_V2.8.0_X64.efi and AX88179_178A_UEFI_V2.8.0_IA32.efi to below directory, create the folder if it does not exist: Windows user: "C:\MyWorkspace\edk2-platforms\Platform\BroxtonPlatformPkg\Common\Binaries\UNDI\AX88179\" Linux user: "~/src/MyWorkspace/edk2-platforms/Platform/BroxtonPlatformPkg/Common/Binaries/UNDI/AX88179/" 6) Follow the instructions found in the "OpenSSL-HOWTO.txt" file located in the Workspace (e.g. "C:\MyWorkspace\edk2\CryptoPkg\Library\OpensslLib\OpenSSL-HOWTO.txt") to install the OpenSSL* source code and enable the CryptoPkg module. 7) Download "IntelAtomE3900-0.71-Binary.Objects.zip" Binary Object Modules a. Download the "IntelAtomE3900-0.71-Binary.Objects.zip" from the project page: https://firmware.intel.com/projects/IntelAtomProcessorE3900 b. Unzip and copy the folders into the directory below, and create the folder if it does not exist: "C:\MyWorkspace\edk2-platforms\Platform\BroxtonPlatformPkg\Board\" ================================================================================ 2. HOW TO BUILD (WINDOWS ENVIRONMENT) ================================================================================ Windows System Configuration: Microsoft Windows* 7 Ultimate 64-bit* Microsoft Windows* 10 Enterprise 64-bit 1) Setup Build Environment 1) Install C compiler (Visual Studio .NET* VS2013/VS2015) on the build machine. 2) Install version Python* 2.7.10 from: https://www.python.org/downloads/release/python-2710/ Make sure that a file with the extension of ".py" will be opened by Python.exe. 3) Install the NASM* assembly language compiler: a. Download NASM* 2.12.02 binaries: http://www.nasm.us/pub/nasm/releasebuilds/2.12.02/win32/nasm-2.12.02-win32.zip http://www.nasm.us/pub/nasm/releasebuilds/2.12.02/win64/nasm-2.12.02-win64.zip b. Unzip the 32-bit & 64-bit versions of nasm.exe to the directories listed below respectively, and create the folders if they do not exist: "C:\MyWorkspace\edk2-platforms\Platform\BroxtonPlatformPkg\Common\Tools\nasm\Win32" "C:\MyWorkspace\edk2-platforms\Platform\BroxtonPlatformPkg\Common\Tools\nasm\Win64" 4) Install the ACPI Source Language (ASL) compiler: a. Install the IASL 2016-09-30 compiler from acpica.org: https://acpica.org/sites/acpica/files/iasl-win-20160930.zip b. Unzip the "iasl.exe" file into the directory below, and create the folder if it does not exist: "C:\MyWorkspace\edk2-platforms\Platform\BroxtonPlatformPkg\Common\Tools\Iasl" 2) Follow the instructions of "HOW TO CREATE A FULL SOURCE TREE" (step 2 above) to create a full source tree. 3) Build 3a) Open a command prompt of Microsoft Visual Studio, such as "Developer Command Prompt for VS2013"; 3b) Type the command: "cd C:\MyWorkspace\edk2-platforms" to enter your workspace; 3c) Run below command to build: Build Command Usage: BuildBIOS.bat [Build Options] Build Options: To Select Visual Studio Version: /vs13 Set Compiler to vs2013 build (default) /vs15 Set Compiler to vs2015 build To Select CPU Arch supported by BIOS: /x64 Set Arch to X64 (default) /IA32 Set Arch to IA32 To Select Board Supported by BIOS: /MX MinnowBoard 3 Module Pre-production Board /LH Leaf Hill CRB /UP UP Squared Board To Select FAB ID supported by BIOS: /A Set FabId to A /B Set FabId to B /C Set FabId to C /D Set FabId to D To Disable flash region access permission for host CPU: /L Disable SPI Descriptor Region and TXE region access permission for host CPU PlatformName: Broxton BuildTargets: Release or Debug Examples: Minnowboard 3 Module Pre-production Board: To build release version 32-bit BIOS for Minnowboard 3 Module Pre-production Board with VS2015, BuildBIOS.bat /vs15 /MX /C /IA32 Broxton Release To build debug version 32-bit BIOS for Minnowboard 3 Module Pre-production Board with VS2015, BuildBIOS.bat /vs15 /MX /C /IA32 Broxton Debug To build release version 64-bit BIOS for Minnowboard 3 Module Pre-production Board with VS2015, BuildBIOS.bat /vs15 /MX /C /x64 Broxton Release To build debug version 64-bit BIOS for Minnowboard 3 Module Pre-production Board with VS2015, BuildBIOS.bat /vs15 /MX /C /x64 Broxton Debug To build BIOS which disables SPI Descriptor Region and TXE region access permission for host CPU. BuildBIOS.bat /vs15 /MX /C /x64 /L Broxton Release Leaf Hill CRB FAB D: To build release version 64-bit BIOS for Leaf Hill CRB with VS2015, BuildBIOS.bat /vs15 /LH /D /x64 Broxton Release To build debug version 64-bit BIOS for Leaf Hill CRB with VS2015, BuildBIOS.bat /vs15 /LH /D /x64 Broxton Debug To build BIOS which disables SPI Descriptor Region and TXE region access permission for host CPU. BuildBIOS.bat /vs15 /LH /D /x64 /L Broxton Release UP Squared: To build release version 64-bit BIOS for UP Squared with VS2015, BuildBIOS.bat /vs15 /UP /A /x64 Broxton Release To build debug version 64-bit BIOS for UP Squared with VS2015, BuildBIOS.bat /vs15 /UP /A /x64 Broxton Debug To build BIOS which disables SPI Descriptor Region and TXE region access permission for host CPU. BuildBIOS.bat /vs15 /UP /A /x64 /L Broxton Release 3d) After the build successfully completes, the 8MB firmware binary image will be located in the following location on your local hard drive: "C:\MyWorkspace\edk2-platforms\Platform\BroxtonPlatformPkg\Common\Tools\Stitch" ================================================================================ 3. HOW TO BUILD (LINUX ENVIRONMENT) ================================================================================ Linux System Configuration: Ubuntu 16.04 64-bit bash shell gcc version 5 1) Setup Build Environment Use below command to install required packages: # sudo apt-get update # sudo apt-get install nasm # sudo apt-get install iasl # sudo apt-get install build-essential # sudo apt-get install uuid-dev 2) Follow the instructions of "HOW TO CREATE A FULL SOURCE TREE" (step 2 above) to create a full source tree. 3) Build Steps (64-bit) 1) Open a command prompt, type command: "cd ~/src/MyWorkspace/edk2-platforms" to enter your workspace directory; 2) Run below command to build: Build Command Usage: BuildBIOS.bat [Build Options] Build Options: To Select Board Supported by BIOS: /MX MinnowBoard 3 Module Pre-production Board /LH Leaf Hill CRB /UP UP Squared Board To Select FAB ID supported by BIOS: /A Set FabId to A /B Set FabId to B /C Set FabId to C /D Set FabId to D To Disable SPI Descriptor Region and TXE region access permission for host CPU: /L Disable flash region access permission for host CPU PlatformName: Broxton BuildTargets: Release or Debug Examples: MinnowBoard 3 Module Pre-production Board FAB C: To build release version 64-bit BIOS for MinnowBoard 3 Module Pre-production Board, ./BuildBIOS.sh /MX /C Broxton Release To build debug version 64-bit BIOS for MinnowBoard 3 Module Pre-production Board, ./BuildBIOS.sh /MX /C Broxton Debug To build BIOS which disables SPI Descriptor Region and TXE region access permission for host CPU. ./BuildBIOS.sh /MX /C /L Broxton Release Leaf Hill CRB FAB D: To build release version 64-bit BIOS for Leaf Hill CRB, ./BuildBIOS.sh /LH /D Broxton Release To build debug version 64-bit BIOS for Leaf Hill CRB, ./BuildBIOS.sh /LH /D Broxton Debug To build BIOS which disables SPI Descriptor Region and TXE region access permission for host CPU. ./BuildBIOS.sh /LH /D /L Broxton Release UP Squared: To build release version 64-bit BIOS for UP Squared, ./BuildBIOS.sh /UP /A Broxton Release To build debug version 64-bit BIOS for UP Squared, ./BuildBIOS.sh /UP /A Broxton Debug To build BIOS which disables SPI Descriptor Region and TXE region access permission for host CPU. ./BuildBIOS.sh /UP /A /L Broxton Release 3) After the build successfully completes, the 8MB firmware binary image will be located in the following location on your local hard drive: "~/src/MyWorkspace/edk2-platforms/Platform/BroxtonPlatformPkg/Common/Tools/Stitch/"