+# 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