Zhiguang Liu fe8456c90f Vlv2TbltDevicePkg: Delete UefiCpuLib usage 1 year ago
..
AcpiPlatform e9241770e8 Vlv2TbltDevicePkg: Remove __GNUC__ specific #ifdefs 4 years ago
Application 391ef3d7bd Vlv2TbltDevicePkg: Use safe string and PCD functions 3 years ago
Feature 1a9cbd7fe9 Vlv2TbltDevicePkg/FmpDeviceLib: Add LastAttemptStatus compatibility 3 years ago
FvInfoPei 31a2b7d34b Platform/Vlv2TbltDevicePkg: Import Vlv2TbltDevicePkg from edk2 5 years ago
FvbRuntimeDxe 31a2b7d34b Platform/Vlv2TbltDevicePkg: Import Vlv2TbltDevicePkg from edk2 5 years ago
Include 3326c46733 Vlv2TbltDevicePkg: Clean up all build scripts 4 years ago
IntelGopDepex 31a2b7d34b Platform/Vlv2TbltDevicePkg: Import Vlv2TbltDevicePkg from edk2 5 years ago
Library 8eb3b2f8be Platform/Intel: Remove All UGA Support 2 years ago
Logo 31a2b7d34b Platform/Vlv2TbltDevicePkg: Import Vlv2TbltDevicePkg from edk2 5 years ago
MonoStatusCode 46cb139d9d Vlv2TbltDevicePkg: Fix spelling errors 3 years ago
PciPlatform dbc210212e Vlv2TbltDevicePkg: Fix XCODE5 build errors 4 years ago
PcuSio 8a0a748aec Vlv2TbltDevicePkg: Switch from ISA to SIO modules 4 years ago
PlatformCpuInfoDxe 0fb81280a3 Vlv2TbltDevicePkg: Switch to CPU I/O 2 Protocol 4 years ago
PlatformDxe f113e9cca2 Vlv2TbltDevicePkg/PlatformDxe: Use S3BootScriptWidth enums 4 years ago
PlatformGopPolicy 0fb81280a3 Vlv2TbltDevicePkg: Switch to CPU I/O 2 Protocol 4 years ago
PlatformInfoDxe 31a2b7d34b Platform/Vlv2TbltDevicePkg: Import Vlv2TbltDevicePkg from edk2 5 years ago
PlatformInitPei 391ef3d7bd Vlv2TbltDevicePkg: Use safe string and PCD functions 3 years ago
PlatformPei 71d1dbdaa7 Vlv2TbltDevicePkg: Remove non ASCII characters from source files 4 years ago
PlatformSetupDxe 391ef3d7bd Vlv2TbltDevicePkg: Use safe string and PCD functions 3 years ago
PlatformSmm 4cf750e42e Vlv2TbltDevicePkg/PlatformSmm: Switch to PI SMM Protocols 4 years ago
PpmPolicy 6a728b4b7d Vlv2TbltDevicePkg: Add GCC IA32 build support 4 years ago
SaveMemoryConfig 31a2b7d34b Platform/Vlv2TbltDevicePkg: Import Vlv2TbltDevicePkg from edk2 5 years ago
SmBiosMiscDxe 6c467df5ea Vlv2TbltDevicePkg/SmBiosMiscDxe: Update SMBIOS Type 4 field name 3 years ago
Stitch 6738c654c8 Vlv2TbltDevicePkg: Convert use of FCE tool to Structured PCD 4 years ago
VlvPlatformInitDxe 391ef3d7bd Vlv2TbltDevicePkg: Use safe string and PCD functions 3 years ago
FmpBlueSampleDevice.dsc 2fcfe47630 Vlv2TbltDevicePkg: Add missing FMP dependency libs 3 years ago
FmpCertificate.dsc 31a2b7d34b Platform/Vlv2TbltDevicePkg: Import Vlv2TbltDevicePkg from edk2 5 years ago
FmpGreenSampleDevice.dsc 2fcfe47630 Vlv2TbltDevicePkg: Add missing FMP dependency libs 3 years ago
FmpMinnowMaxSystem.dsc 2fcfe47630 Vlv2TbltDevicePkg: Add missing FMP dependency libs 3 years ago
FmpRedSampleDevice.dsc 2fcfe47630 Vlv2TbltDevicePkg: Add missing FMP dependency libs 3 years ago
PlatformPkg.dec 6738c654c8 Vlv2TbltDevicePkg: Convert use of FCE tool to Structured PCD 4 years ago
PlatformPkg.fdf 0faad02bdb Vlv2TbltDevicePkg: Add the missing BootManagerMenuApp 4 years ago
PlatformPkgConfig.dsc 3326c46733 Vlv2TbltDevicePkg: Clean up all build scripts 4 years ago
PlatformPkgIA32.dsc fe8456c90f Vlv2TbltDevicePkg: Delete UefiCpuLib usage 1 year ago
PlatformPkgX64.dsc fe8456c90f Vlv2TbltDevicePkg: Delete UefiCpuLib usage 1 year ago
PlatformSetupDefaults.dsc 6738c654c8 Vlv2TbltDevicePkg: Convert use of FCE tool to Structured PCD 4 years ago
PreBuild.py bb67f29e01 Vlv2Tbl2DevicePkg: Convert BAT/sh Build scripts to Python 4 years ago
Readme.md bb67f29e01 Vlv2Tbl2DevicePkg: Convert BAT/sh Build scripts to Python 4 years ago

Readme.md

EDK II firmware for Minnowboard Max/Turbot which is based on Intel Valleyview2 SoC (Byatrail platform)


Windows Pre-requisites

  • GIT client: Available from https://git-scm.com/downloads

  • Microsoft Visual Studio.

    • Visual Studio 2015 recommended and is used in the examples below. Visual Studio 2013 is also supported.
  • WINDDK

    • Download Microsoft Windows Driver Development Kit 3790.1830 and install it to C:\WINDDK\3790.1830.
  • Python 3

  • Install iASL

    • Install the iasl compiler by downloading iasl-win-20160527.zip from the following location: «https://acpica.org/downloads/" and place the unzipped content («iasl.exe») into the directory «C:\ASL» on your local hard drive (create the folder «C:\ASL» if it does not exist).
  • Install the NASM* assembly language compiler

  • Install Openssl

    • Download a pre-compiled Openssl Windows binary from https://wiki.openssl.org/index.php/Binaries. Search for a Windows binary in the list of «Third Party OpenSSL Related Binary Distributions». Go to the third party site to download the latest version. Download and extract to C:\Openssl, add the path of openssl.exe («C:\openssl») to system environment variable OPENSSL_PATH.

Download and Build MinnowMax using Windows/Visual Studio

Run the script below from an empty directory. The script clones the EDK II repository from GitHub and downloads and unzips the binary support files for the MinnowBoard MAX. It then sets up the environment for EDK II builds and builds the MinnowBoard MAX firmware and generates UEFI Capsules that can be used to update the MinnowBoard MAX firmware and three sample devices.

git clone https://github.com/tianocore/edk2.git
cd edk2
git submodule update --init
cd ..
git clone https://github.com/tianocore/edk2-platforms.git
git clone https://github.com/tianocore/edk2-non-osi.git

powershell "& {[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri "https://indy.fulgan.com/SSL/openssl-1.0.2r-x64_86-win64.zip -OutFile openssl-1.0.2r-x64_86-win64.zip"}"
powershell Expand-Archive openssl-1.0.2r-x64_86-win64.zip

powershell "& {[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri "https://www.nasm.us/pub/nasm/releasebuilds/2.13.03/win64/nasm-2.13.03-win64.zip -OutFile nasm-2.13.03-win64.zip"}"
powershell Expand-Archive nasm-2.13.03-win64.zip .

set WORKSPACE=%CD%
set PACKAGES_PATH=%WORKSPACE%\edk2;%WORKSPACE%\edk2-platforms\Silicon\Intel;%WORKSPACE%\edk2-platforms\Platform\Intel;%WORKSPACE%\edk2-non-osi\Silicon\Intel
set EDK_TOOLS_PATH=%WORKSPACE%\edk2\BaseTools
path=%path%;%WORKSPACE%\openssl-1.0.2r-x64_86-win64
set NASM_PREFIX=%WORKSPACE%\nasm-2.13.03\

cd %WORKSPACE%\edk2

edksetup.bat Rebuild

build -a IA32 -a X64 -n 5 -t VS2015x86 -b DEBUG -p Vlv2TbltDevicePkg\PlatformPkgX64.dsc

Once all the code and tools are downloaded and installed, only the following commands are required to setup the environment. Run these from the same directory used to install the source and binaries.

set WORKSPACE=%CD%
set PACKAGES_PATH=%WORKSPACE%\edk2;%WORKSPACE%\edk2-platforms\Silicon\Intel;%WORKSPACE%\edk2-platforms\Platform\Intel;%WORKSPACE%\edk2-non-osi\Silicon\Intel
set EDK_TOOLS_PATH=%WORKSPACE%\edk2\BaseTools
path=%path%;%WORKSPACE%\openssl-1.0.2r-x64_86-win64
set NASM_PREFIX=%WORKSPACE%\nasm-2.13.03\

cd %WORKSPACE%\edk2

edksetup.bat Rebuild

Once the environment is setup, the MinnowBoard MAX firmware and capsules can be rebuilt using the following commands.

  • Build X64 Debug Image with report file

    build -a IA32 -a X64 -n 5 -t VS2015x86 -b DEBUG -p Vlv2TbltDevicePkg\PlatformPkgX64.dsc -y Vlv.report
    
  • Build X64 Release Image with build log

    build -a IA32 -a X64 -n 5 -t VS2015x86 -b RELEASE Vlv2TbltDevicePkg\PlatformPkgX64.dsc -j Vlv.log
    
  • Build IA32 Debug Image

    build -a IA32 -n 5 -t VS2015x86 -b DEBUG -p Vlv2TbltDevicePkg\PlatformPkgIA32.dsc
    

The generated firmware image is the build output directory below WORKSPACE. For exampple, the X64 Debug Image is at:

Build\Vlv2TbltDevicePkgX64\DEBUG_VS2015x86\FV\Vlv.fd

And the IA32 Release image is at:

Build\Vlv2TbltDevicePkgIA32\RELEASE_VS2015x86\FV\Vlv.fd

The X64 CapsuleApp and generated UEFI Capsules are in the directory

Build\Vlv2TbltDevicePkgX64\Capsules

Linux Pre-requisites

  • git
  • python
  • iasl
  • nasm
  • openssl
  • gcab

Download and Build MinnowMax using Linux/GCC

Run the script below from an empty directory. The script clones the EDK II repository from GitHub and downloads and unzips the binary support files for the MinnowBoard MAX. It then sets up the environment for EDK II builds and builds the MinnowBoard MAX firmware and generates UEFI Capsules that can be used to update the MinnowBoard MAX firmware and three sample devices.

git clone https://github.com/tianocore/edk2.git
cd edk2
git submodule update --init
cd ..
git clone https://github.com/tianocore/edk2-platforms.git
git clone https://github.com/tianocore/edk2-non-osi.git

export WORKSPACE=$PWD
export PACKAGES_PATH=$WORKSPACE/edk2:$WORKSPACE/edk2-platforms/Silicon/Intel:$WORKSPACE/edk2-platforms/Platform/Intel:$WORKSPACE/edk2-non-osi/Silicon/Intel
cd $WORKSPACE/edk2

. edksetup.sh

build -a IA32 -a X64 -n 5 -t GCC5 -b DEBUG -p Vlv2TbltDevicePkg/PlatformPkgX64.dsc

Once all the code is downloaded and installed, only the following commands are required to setup the environment. Run these from the same directory used to install the source and binaries.

export WORKSPACE=$PWD
export PACKAGES_PATH=$WORKSPACE/edk2:$WORKSPACE/edk2-platforms/Silicon/Intel:$WORKSPACE/edk2-platforms/Platform/Intel:$WORKSPACE/edk2-non-osi/Silicon/Intel
cd $WORKSPACE/edk2

. edksetup.sh

Once the environment is setup, the MinnowBoard MAX firmware and capsules can be rebuilt using the following commands.

  • Build X64 Debug Image with report file

    build -a IA32 -a X64 -n 5 -t GCC5 -b DEBUG -p Vlv2TbltDevicePkg/PlatformPkgX64.dsc -y Vlv.report
    
  • Build X64 Release Image with build log

    build -a IA32 -a X64 -n 5 -t GCC5 -b RELEASE -p Vlv2TbltDevicePkg/PlatformPkgX64.dsc -j Vlv.log
    
  • Build IA32 Debug Image

    build -a IA32 -n 5 -t GCC5 -b DEBUG -p Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
    

The generated firmware image is the build output directory below WORKSPACE. For exampple, the X64 Debug Image is at:

Build/Vlv2TbltDevicePkgX64/DEBUG_GCC5/FV/Vlv.fd

And the IA32 Release image is at:

Build/Vlv2TbltDevicePkgIA32/RELEASE_GCC5/FV/Vlv.fd

The X64 CapsuleApp and generated UEFI Capsules are in the directory

Build/Vlv2TbltDevicePkgX64/Capsules

Use DediProg to update FLASH image on a MinnowBoard MAX Target

Update MinnowBoard MAX Firmware from UEFI Capsules

  • Copy the Build/Vlv2TbltDevicePkg/Capsules directory to a USB FLASH drive
  • Connect USB FLASH Drive to MinnowBoard MAX
  • Boot MinnowBoard MAX to the Boot Manager
  • Boot the EFI Internal Shell boot option
  • Mount the USB FLASH Drive (usually FS1)
  • Use cd command to go to Capsules/TestCert_* directory
  • Run the following command to apply all four capsules

    CapsuleApp.efi Red.cap Green.cap Blue.cap MinnowMax.cap
    
  • The MinnowBoard MAX should reboot and the four capsules are applied in the order listed. The progress bar matches the color name of the capsule. MinnowMax.cap uses the color purple. Once all capsules are processed, the MinnowBoard MAX should reboot again using the new firmware images.

Generate and Test a UX BitMap Capsule

  • Use bitmap editor to generate a BMP file. Recommend resolution of 600 wide by 100 tell and either 24 or 32 bits per pixel.
  • Save BMP file to USB FLASH drive
  • Use CapsuleApp.efi to convert BMP file to a UX Capsule

    CapsuleApp.efi -G MyImage.bmp -O MyImage.cap
    
  • When updating firmware using capsules, add UX capsule to the list of capsules passed into CapsuleApp.efi.

    CapsuleApp.efi MyImage.cap Red.cap Green.cap Blue.cap MinnowMax.cap
    
  • When the capsules are processed the UX bitmap image should be displayed at the bottom of the screen.