]> git.proxmox.com Git - mirror_edk2.git/blame - Vlv2TbltDevicePkg/Readme.md
Vlv2TbltDevicePkg: Update Readme.md
[mirror_edk2.git] / Vlv2TbltDevicePkg / Readme.md
CommitLineData
46002a4a
ZS
1# **EDK II firmware for Minnowboard Max/Turbot which is based on Intel Valleyview2 SoC (Byatrail platform)**\r
2\r
3----------\r
62fdb9bb 4# Windows Pre-requisites\r
46002a4a
ZS
5\r
6* GIT client: Available from https://git-scm.com/downloads\r
7\r
46002a4a
ZS
8* Microsoft Visual Studio.\r
9 - Visual Studio 2015 recommended and is used in the examples below. Visual Studio 2013 is also supported.\r
62fdb9bb 10\r
46002a4a
ZS
11* WINDDK\r
12 - Download Microsoft Windows Driver Development Kit 3790.1830 and install it to C:\WINDDK\3790.1830.\r
62fdb9bb
MK
13\r
14* Python 3\r
15 - https://www.python.org/downloads/\r
46002a4a
ZS
16\r
17* Install iASL\r
18 - Install the iasl compiler by downloading iasl-win-20160527.zip from the following\r
19 location: "https://acpica.org/downloads/" and place the unzipped\r
20 content ("iasl.exe") into the directory "C:\ASL" on your local hard drive\r
21 (create the folder "C:\ASL" if it does not exist).\r
22\r
23* Install the NASM* assembly language compiler\r
62fdb9bb 24 - Download NASM* 2.12.02 binaries from\r
46002a4a
ZS
25 http://www.nasm.us/pub/nasm/releasebuilds/2.12.02/win64/nasm-2.12.02-win64.zip and place the\r
26 unzipped content ("nasm.exe") into the directory "C:\NASM" on your local hard drive\r
27 (create the folder "C:\NASM" if it does not exist). Add the path "C:\NASM\" to system environment variable **NASM_PREFIX**.\r
28\r
29* Install Openssl\r
62fdb9bb
MK
30 - Download a pre-compiled Openssl Windows binary from\r
31 https://wiki.openssl.org/index.php/Binaries. Search for a Windows binary in the list\r
32 of "Third Party OpenSSL Related Binary Distributions". Go to the third party site to\r
33 download the latest version. Download and extract to C:\Openssl, add the path of openssl.exe\r
46002a4a
ZS
34 ("C:\openssl") to system environment variable **OPENSSL_PATH**.\r
35\r
62fdb9bb
MK
36# Download and Build MinnowMax using Windows/Visual Studio\r
37\r
38Run the script below from an empty directory. The script clones the EDK II\r
39repository from GitHub and downloads and unzips the binary support files for the\r
40MinnowBoard MAX. It then sets up the environment for EDK II builds and builds\r
41the MinnowBoard MAX firmware and generates UEFI Capsules that can be used to\r
42update the MinnowBoard MAX firmware and three sample devices.\r
43\r
44```\r
45git clone --recurse-submodules https://github.com/tianocore/edk2.git\r
46\r
47powershell "& {[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
48powershell Expand-Archive openssl-1.0.2r-x64_86-win64.zip\r
49\r
50powershell "& {[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri "https://firmware.intel.com/sites/default/files/MinnowBoardMax-Development190216.zip -OutFile MinnowBoardMax-Development190216.zip"}"\r
51powershell Expand-Archive MinnowBoardMax-Development190216.zip\r
52sleep 1\r
53rename MinnowBoardMax-Development190216 Vlv2Binaries\r
54cd Vlv2Binaries\r
55powershell Expand-Archive Vlv2SocBinPkg.zip .\r
56sleep 1\r
57cd ..\r
58\r
59powershell "& {[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
60powershell Expand-Archive nasm-2.13.03-win64.zip .\r
61\r
62mkdir Conf\r
63\r
64set WORKSPACE=%CD%\r
65set EDK_TOOLS_PATH=%WORKSPACE%\edk2\BaseTools\r
66set EDK_TOOLS_BIN=%EDK_TOOLS_PATH%\BinWrappers\WindowsLike\r
67set PACKAGES_PATH=%WORKSPACE%\edk2;%WORKSPACE%\Vlv2Binaries\r
68path=%path%;%EDK_TOOLS_PATH%\Bin\Win32;%WORKSPACE%\openssl-1.0.2r-x64_86-win64\r
69set NASM_PREFIX=%WORKSPACE%\nasm-2.13.03\\r
70\r
71cd %WORKSPACE%\edk2\r
72\r
73call edkSetup.bat Rebuild\r
74\r
75cd Vlv2TbltDevicePkg\r
76\r
77Build_IFWI.bat /m /y MNW2 Debug\r
78```\r
79\r
80Once all the code and tools are downloaded and installed, only the following\r
81commands are required to setup the environment. Run these from the same\r
82directory used to install the source and binaries.\r
83\r
84```\r
85set WORKSPACE=%CD%\r
86set EDK_TOOLS_PATH=%WORKSPACE%\edk2\BaseTools\r
87set EDK_TOOLS_BIN=%EDK_TOOLS_PATH%\BinWrappers\WindowsLike\r
88set PACKAGES_PATH=%WORKSPACE%\edk2;%WORKSPACE%\Vlv2Binaries\r
89path=%path%;%EDK_TOOLS_PATH%\Bin\Win32;%WORKSPACE%\openssl-1.0.2r-x64_86-win64\r
90set NASM_PREFIX=%WORKSPACE%\nasm-2.13.03\\r
91\r
92cd %WORKSPACE%\edk2\r
93\r
94call edkSetup.bat Rebuild\r
95```\r
96\r
97Once the environment is setup, the MinnowBoard MAX firmware and capsules can be\r
98rebuilt using the following commands.\r
99\r
100* Build Debug Image\r
101\r
102```\r
103cd Vlv2TbltDevicePkg\r
104Build_IFWI.bat /m /y MNW2 Debug\r
105```\r
106\r
107* Build Release Image\r
108\r
109```\r
110cd Vlv2TbltDevicePkg\r
111Build_IFWI.bat /m /y MNW2 Release\r
112```\r
113\r
114The generated firmware image is the newest `.bin` file in `edk2/Vlv2TbltDevicePkg/Stitch`.\r
115The file is in the form `MNW2MAX1.X64.0084.D01.<DATE>.bin`.\r
116\r
117The CapsuleApp and generated UEFI Capsules are in `Build/Vlv2TbltDevicePkg/Capsules`\r
118\r
119# Linux Pre-requisites\r
120\r
121* The tool GenBiosId has a dependency on libc.so.6. Make sure it is installed.\r
122 Here are a few example installation commands:\r
123\r
124 sudo dnf install libc.so.6\r
125\r
126 apt-get install libc:i386\r
127\r
128# Download and Build MinnowMax using Linux/GCC\r
129\r
130Run the script below from an empty directory. The script clones the EDK II\r
131repository from GitHub and downloads and unzips the binary support files for the\r
132MinnowBoard MAX. It then sets up the environment for EDK II builds and builds\r
133the MinnowBoard MAX firmware and generates UEFI Capsules that can be used to\r
134update the MinnowBoard MAX firmware and three sample devices.\r
135\r
136```\r
137git clone --recurse-submodules https://github.com/tianocore/edk2.git\r
138\r
139mkdir Vlv2Binaries\r
140cd Vlv2Binaries\r
141wget https://firmware.intel.com/sites/default/files/MinnowBoardMax-Development190216.zip\r
142unzip MinnowBoardMax-Development190216.zip\r
143unzip Vlv2SocBinPkg.zip\r
144\r
145cd ..\r
146mkdir Conf\r
147\r
148export WORKSPACE=$PWD/edk2\r
149export PACKAGES_PATH=$PWD/Vlv2Binaries\r
150export EDK_TOOLS_PATH=$WORKSPACE/BaseTools\r
151\r
152cd edk2\r
153cd Vlv2TbltDevicePkg\r
154. Build_IFWI.sh MNW2 Debug\r
155```\r
156\r
157Once all the code is downloaded and installed, only the following commands are\r
158required to setup the environment. Run these from the same directory used to\r
159install the source and binaries.\r
160\r
161```\r
162export WORKSPACE=$PWD/edk2\r
163export PACKAGES_PATH=$PWD/Vlv2Binaries\r
164export EDK_TOOLS_PATH=$WORKSPACE/BaseTools\r
165\r
166cd edk2\r
167cd Vlv2TbltDevicePkg\r
168```\r
169\r
170Once the environment is setup, the MinnowBoard MAX firmware and capsules can be\r
171rebuilt using the following commands.\r
172\r
173\r
174* Build Debug Image\r
175\r
176```\r
177cd Vlv2TbltDevicePkg\r
178./Build_IFWI.sh MNW2 Debug\r
179```\r
180\r
181* Build Release Image\r
182\r
183```\r
184cd Vlv2TbltDevicePkg\r
185./Build_IFWI.sh MNW2 Release\r
186```\r
187\r
188The generated firmware image is the `MNW2MAX_X64_D_0084_01_GCC.bin` file in\r
189`edk2\Vlv2TbltDevicePkg\Stitch`\r
190\r
191The CapsuleApp and generated UEFI Capsules are in `Build\Vlv2TbltDevicePkg\Capsules`\r
192\r
193# Use DediProg to update FLASH image on a MinnowBoard MAX Target\r
194\r
195# Update MinnowBoard MAX Firmware from UEFI Capsules\r
196\r
197* Copy the `Build/Vlv2TbltDevicePkg/Capsules` directory to a USB FLASH drive\r
198* Connect USB FLASH Drive to MinnowBoard MAX\r
199* Boot MinnowBoard MAX to the Boot Manager\r
200* Boot the `EFI Internal Shell` boot option\r
201* Mount the USB FLASH Drive (usually `FS1`)\r
202* Use `cd` command to go to `Capsules/TestCert` directory\r
203* Run the following command to apply all four capsules\r
46002a4a 204\r
62fdb9bb
MK
205```\r
206CapsuleApp.efi Red.cap Green.cap Blue.cap MinnowMax.cap\r
207```\r
46002a4a 208\r
62fdb9bb
MK
209* The MinnowBoard MAX should reboot and the four capsules are applied in the\r
210 order listed. The progress bar matches the color name of the capsule.\r
211 MinnowMax.cap uses the color purple. Once all capsules are processed, the\r
212 MinnowBoard MAX should reboot again using the new firmware images.\r
46002a4a 213\r
62fdb9bb 214# Generate and Test a UX BitMap Capsule\r
46002a4a 215\r
62fdb9bb
MK
216* Use bitmap editor to generate a BMP file. Recommend resolution of 600 wide\r
217 by 100 tell and either 24 or 32 bits per pixel.\r
218* Save BMP file to USB FLASH drive\r
219* Use CapsuleApp.efi to convert BMP file to a UX Capsule\r
46002a4a 220\r
62fdb9bb
MK
221```\r
222CapsuleApp.efi -G MyImage.bmp -O MyImage.cap\r
223```\r
46002a4a 224\r
62fdb9bb
MK
225* When updating firmware using capsules, add UX capsule to the list of capsules\r
226 passed into CapsuleApp.efi.\r
46002a4a 227\r
62fdb9bb
MK
228```\r
229CapsuleApp.efi MyImage.cap Red.cap Green.cap Blue.cap MinnowMax.cap\r
230```\r
46002a4a 231\r
62fdb9bb
MK
232* When the capsules are processed the UX bitmap image should be displayed at the\r
233 bottom of the screen.\r