]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Vlv2TbltDevicePkg: Update Readme.md
authorMichael D Kinney <michael.d.kinney@intel.com>
Wed, 8 May 2019 22:42:07 +0000 (15:42 -0700)
committerMichael D Kinney <michael.d.kinney@intel.com>
Fri, 10 May 2019 02:58:06 +0000 (19:58 -0700)
Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Zailiang Sun <zailiang.sun@intel.com>
Vlv2TbltDevicePkg/Readme.md

index 139aa4ea6181f79c77e10401e061e5471c957f41..cbbb465b69e60e70eaa0587da88f74ca653aa982 100644 (file)
@@ -1,39 +1,18 @@
 # **EDK II firmware for Minnowboard Max/Turbot which is based on Intel Valleyview2 SoC (Byatrail platform)**\r
 \r
 ----------\r
-\r
-\r
-## **How to Create a Full Source Tree for Minnowboard Max/Turbot under Windows**\r
-### Pre-requisites\r
+# Windows Pre-requisites\r
 \r
 * GIT client: Available from https://git-scm.com/downloads\r
 \r
-### Download Source Code\r
-* Create a new directory C:\WORKSPACE as an EDK II work space.\r
-\r
-* GIT clone operations required to pull the EDK II source tree and the edk2-non-osi repository. Run below command in git bash or windows command line.\r
-\r
-  - cd C:\WORKSPACE\r
-  - git clone https://github.com/tianocore/edk2.git\r
-  - git clone https://github.com/tianocore/edk2-non-osi.git\r
-  \r
-    Note: The EDK II [Multiple Workspace](https://github.com/tianocore/tianocore.github.io/wiki/Multiple_Workspace)\r
-feature is used by this project.\r
-  \r
-* Follow the instructions found in the file "OpenSSL-HOWTO.txt" in your work space (e.g. "C:\WORKSPACE\edk2\CryptoPkg\Library\OpensslLib\OpenSSL-HOWTO.txt") to install the Openssl source code.\r
-\r
-## **Windows Build Instructions**\r
-\r
-### Pre-requisites Tools\r
-\r
 * Microsoft Visual Studio.\r
   - Visual Studio 2015 recommended and is used in the examples below. Visual Studio 2013 is also supported.\r
-  \r
+\r
 * WINDDK\r
   - Download Microsoft Windows Driver Development Kit 3790.1830 and install it to C:\WINDDK\3790.1830.\r
-  \r
-* Python 2.7\r
-  - Available from http://www.python.org. Install Python to C:\Python27, and add the path "C:\Python27" to system environment variable **PYTHON_HOME**.\r
+\r
+* Python 3\r
+  - https://www.python.org/downloads/\r
 \r
 * Install iASL\r
    - Install the iasl compiler by downloading iasl-win-20160527.zip from the following\r
@@ -42,34 +21,213 @@ feature is used by this project.
    (create the folder "C:\ASL" if it does not exist).\r
 \r
 * Install the NASM* assembly language compiler\r
-   - Download NASM* 2.12.02 binaries from \r
+   - Download NASM* 2.12.02 binaries from\r
    http://www.nasm.us/pub/nasm/releasebuilds/2.12.02/win64/nasm-2.12.02-win64.zip and place the\r
    unzipped content ("nasm.exe") into the directory "C:\NASM" on your local hard drive\r
    (create the folder "C:\NASM" if it does not exist). Add the path "C:\NASM\" to system environment variable **NASM_PREFIX**.\r
 \r
 * Install Openssl\r
-   - Download a pre-compiled Openssl Windows binary from \r
-   https://wiki.openssl.org/index.php/Binaries. Search for a Windows binary in the list \r
-   of "Third Party OpenSSL Related Binary Distributions". Go to the third party site to \r
-   download the latest version. Download and extract to C:\Openssl, add the path of openssl.exe \r
+   - Download a pre-compiled Openssl Windows binary from\r
+   https://wiki.openssl.org/index.php/Binaries. Search for a Windows binary in the list\r
+   of "Third Party OpenSSL Related Binary Distributions". Go to the third party site to\r
+   download the latest version. Download and extract to C:\Openssl, add the path of openssl.exe\r
    ("C:\openssl") to system environment variable **OPENSSL_PATH**.\r
 \r
+# Download and Build MinnowMax using Windows/Visual Studio\r
+\r
+Run the script below from an empty directory.  The script clones the EDK II\r
+repository from GitHub and downloads and unzips the binary support files for the\r
+MinnowBoard MAX.  It then sets up the environment for EDK II builds and builds\r
+the MinnowBoard MAX firmware and generates UEFI Capsules that can be used to\r
+update the MinnowBoard MAX firmware and three sample devices.\r
+\r
+```\r
+git clone --recurse-submodules https://github.com/tianocore/edk2.git\r
+\r
+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"}"\r
+powershell Expand-Archive openssl-1.0.2r-x64_86-win64.zip\r
+\r
+powershell "& {[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri "https://firmware.intel.com/sites/default/files/MinnowBoardMax-Development190216.zip -OutFile MinnowBoardMax-Development190216.zip"}"\r
+powershell Expand-Archive MinnowBoardMax-Development190216.zip\r
+sleep 1\r
+rename MinnowBoardMax-Development190216 Vlv2Binaries\r
+cd Vlv2Binaries\r
+powershell Expand-Archive Vlv2SocBinPkg.zip .\r
+sleep 1\r
+cd ..\r
+\r
+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"}"\r
+powershell Expand-Archive nasm-2.13.03-win64.zip .\r
+\r
+mkdir Conf\r
+\r
+set WORKSPACE=%CD%\r
+set EDK_TOOLS_PATH=%WORKSPACE%\edk2\BaseTools\r
+set EDK_TOOLS_BIN=%EDK_TOOLS_PATH%\BinWrappers\WindowsLike\r
+set PACKAGES_PATH=%WORKSPACE%\edk2;%WORKSPACE%\Vlv2Binaries\r
+path=%path%;%EDK_TOOLS_PATH%\Bin\Win32;%WORKSPACE%\openssl-1.0.2r-x64_86-win64\r
+set NASM_PREFIX=%WORKSPACE%\nasm-2.13.03\\r
+\r
+cd %WORKSPACE%\edk2\r
+\r
+call edkSetup.bat Rebuild\r
+\r
+cd Vlv2TbltDevicePkg\r
+\r
+Build_IFWI.bat /m /y MNW2 Debug\r
+```\r
+\r
+Once all the code and tools are downloaded and installed, only the following\r
+commands are required to setup the environment.  Run these from the same\r
+directory used to install the source and binaries.\r
+\r
+```\r
+set WORKSPACE=%CD%\r
+set EDK_TOOLS_PATH=%WORKSPACE%\edk2\BaseTools\r
+set EDK_TOOLS_BIN=%EDK_TOOLS_PATH%\BinWrappers\WindowsLike\r
+set PACKAGES_PATH=%WORKSPACE%\edk2;%WORKSPACE%\Vlv2Binaries\r
+path=%path%;%EDK_TOOLS_PATH%\Bin\Win32;%WORKSPACE%\openssl-1.0.2r-x64_86-win64\r
+set NASM_PREFIX=%WORKSPACE%\nasm-2.13.03\\r
+\r
+cd %WORKSPACE%\edk2\r
+\r
+call edkSetup.bat Rebuild\r
+```\r
+\r
+Once the environment is setup, the MinnowBoard MAX firmware and capsules can be\r
+rebuilt using the following commands.\r
+\r
+* Build Debug Image\r
+\r
+```\r
+cd Vlv2TbltDevicePkg\r
+Build_IFWI.bat /m /y MNW2 Debug\r
+```\r
+\r
+* Build Release Image\r
+\r
+```\r
+cd Vlv2TbltDevicePkg\r
+Build_IFWI.bat /m /y MNW2 Release\r
+```\r
+\r
+The generated firmware image is the newest `.bin` file in `edk2/Vlv2TbltDevicePkg/Stitch`.\r
+The file is in the form `MNW2MAX1.X64.0084.D01.<DATE>.bin`.\r
+\r
+The CapsuleApp and generated UEFI Capsules are in `Build/Vlv2TbltDevicePkg/Capsules`\r
+\r
+# Linux Pre-requisites\r
+\r
+* The tool GenBiosId has a dependency on libc.so.6.  Make sure it is installed.\r
+  Here are a few example installation commands:\r
+\r
+    sudo dnf install libc.so.6\r
+\r
+    apt-get install libc:i386\r
+\r
+# Download and Build MinnowMax using Linux/GCC\r
+\r
+Run the script below from an empty directory.  The script clones the EDK II\r
+repository from GitHub and downloads and unzips the binary support files for the\r
+MinnowBoard MAX.  It then sets up the environment for EDK II builds and builds\r
+the MinnowBoard MAX firmware and generates UEFI Capsules that can be used to\r
+update the MinnowBoard MAX firmware and three sample devices.\r
+\r
+```\r
+git clone --recurse-submodules https://github.com/tianocore/edk2.git\r
+\r
+mkdir Vlv2Binaries\r
+cd Vlv2Binaries\r
+wget https://firmware.intel.com/sites/default/files/MinnowBoardMax-Development190216.zip\r
+unzip MinnowBoardMax-Development190216.zip\r
+unzip Vlv2SocBinPkg.zip\r
+\r
+cd ..\r
+mkdir Conf\r
+\r
+export WORKSPACE=$PWD/edk2\r
+export PACKAGES_PATH=$PWD/Vlv2Binaries\r
+export EDK_TOOLS_PATH=$WORKSPACE/BaseTools\r
+\r
+cd edk2\r
+cd Vlv2TbltDevicePkg\r
+. Build_IFWI.sh MNW2 Debug\r
+```\r
+\r
+Once all the code is downloaded and installed, only the following commands are\r
+required to setup the environment.  Run these from the same directory used to\r
+install the source and binaries.\r
+\r
+```\r
+export WORKSPACE=$PWD/edk2\r
+export PACKAGES_PATH=$PWD/Vlv2Binaries\r
+export EDK_TOOLS_PATH=$WORKSPACE/BaseTools\r
+\r
+cd edk2\r
+cd Vlv2TbltDevicePkg\r
+```\r
+\r
+Once the environment is setup, the MinnowBoard MAX firmware and capsules can be\r
+rebuilt using the following commands.\r
+\r
+\r
+* Build Debug Image\r
+\r
+```\r
+cd Vlv2TbltDevicePkg\r
+./Build_IFWI.sh MNW2 Debug\r
+```\r
+\r
+* Build Release Image\r
+\r
+```\r
+cd Vlv2TbltDevicePkg\r
+./Build_IFWI.sh MNW2 Release\r
+```\r
+\r
+The generated firmware image is the `MNW2MAX_X64_D_0084_01_GCC.bin` file in\r
+`edk2\Vlv2TbltDevicePkg\Stitch`\r
+\r
+The CapsuleApp and generated UEFI Capsules are in `Build\Vlv2TbltDevicePkg\Capsules`\r
+\r
+# Use DediProg to update FLASH image on a MinnowBoard MAX Target\r
+\r
+# Update MinnowBoard MAX Firmware from UEFI Capsules\r
+\r
+* Copy the `Build/Vlv2TbltDevicePkg/Capsules` directory to a USB FLASH drive\r
+* Connect USB FLASH Drive to MinnowBoard MAX\r
+* Boot MinnowBoard MAX to the Boot Manager\r
+* Boot the `EFI Internal Shell` boot option\r
+* Mount the USB FLASH Drive (usually `FS1`)\r
+* Use `cd` command to go to `Capsules/TestCert` directory\r
+* Run the following command to apply all four capsules\r
 \r
+```\r
+CapsuleApp.efi Red.cap Green.cap Blue.cap MinnowMax.cap\r
+```\r
 \r
-### Build Commands\r
-  * cd C:\WORKSPACE\edk2\Vlv2TbltDevicePkg\r
+* The MinnowBoard MAX should reboot and the four capsules are applied in the\r
+  order listed.  The progress bar matches the color name of the capsule.\r
+  MinnowMax.cap uses the color purple.  Once all capsules are processed, the\r
+  MinnowBoard MAX should reboot again using the new firmware images.\r
 \r
-  * To build 64-bit release version image: Build_IFWI.bat MNW2 Release\r
+# Generate and Test a UX BitMap Capsule\r
 \r
-  * To build 64-bit debug version image: Build_IFWI.bat MNW2 Debug\r
-  \r
-  * To build 32-bit release version image: Build_IFWI.bat /IA32 MNW2 Release\r
+* Use bitmap editor to generate a BMP file.  Recommend resolution of 600 wide\r
+  by 100 tell and either 24 or 32 bits per pixel.\r
+* Save BMP file to USB FLASH drive\r
+* Use CapsuleApp.efi to convert BMP file to a UX Capsule\r
 \r
-  * To build 32-bit debug version image: Build_IFWI.bat /IA32 MNW2 Debug\r
+```\r
+CapsuleApp.efi -G MyImage.bmp -O MyImage.cap\r
+```\r
 \r
-### Output\r
-* After the build process successfully completes, the 8MB firmware binary image will\r
-be located in the following location on your local hard drive:\r
-"C:\WORKSPACE\edk2\Vlv2TbltDevicePkg\Stitch\"\r
+* When updating firmware using capsules, add UX capsule to the list of capsules\r
+  passed into CapsuleApp.efi.\r
 \r
+```\r
+CapsuleApp.efi MyImage.cap Red.cap Green.cap Blue.cap MinnowMax.cap\r
+```\r
 \r
+* When the capsules are processed the UX bitmap image should be displayed at the\r
+  bottom of the screen.\r