]>
Commit | Line | Data |
---|---|---|
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 | |
38 | Run the script below from an empty directory. The script clones the EDK II\r | |
39 | repository from GitHub and downloads and unzips the binary support files for the\r | |
40 | MinnowBoard MAX. It then sets up the environment for EDK II builds and builds\r | |
41 | the MinnowBoard MAX firmware and generates UEFI Capsules that can be used to\r | |
42 | update the MinnowBoard MAX firmware and three sample devices.\r | |
43 | \r | |
44 | ```\r | |
45 | git clone --recurse-submodules https://github.com/tianocore/edk2.git\r | |
46 | \r | |
47 | 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 | |
48 | powershell Expand-Archive openssl-1.0.2r-x64_86-win64.zip\r | |
49 | \r | |
50 | 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 | |
51 | powershell Expand-Archive MinnowBoardMax-Development190216.zip\r | |
52 | sleep 1\r | |
53 | rename MinnowBoardMax-Development190216 Vlv2Binaries\r | |
54 | cd Vlv2Binaries\r | |
55 | powershell Expand-Archive Vlv2SocBinPkg.zip .\r | |
56 | sleep 1\r | |
57 | cd ..\r | |
58 | \r | |
59 | 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 | |
60 | powershell Expand-Archive nasm-2.13.03-win64.zip .\r | |
61 | \r | |
62 | mkdir Conf\r | |
63 | \r | |
64 | set WORKSPACE=%CD%\r | |
65 | set EDK_TOOLS_PATH=%WORKSPACE%\edk2\BaseTools\r | |
66 | set EDK_TOOLS_BIN=%EDK_TOOLS_PATH%\BinWrappers\WindowsLike\r | |
67 | set PACKAGES_PATH=%WORKSPACE%\edk2;%WORKSPACE%\Vlv2Binaries\r | |
68 | path=%path%;%EDK_TOOLS_PATH%\Bin\Win32;%WORKSPACE%\openssl-1.0.2r-x64_86-win64\r | |
69 | set NASM_PREFIX=%WORKSPACE%\nasm-2.13.03\\r | |
70 | \r | |
71 | cd %WORKSPACE%\edk2\r | |
72 | \r | |
73 | call edkSetup.bat Rebuild\r | |
74 | \r | |
75 | cd Vlv2TbltDevicePkg\r | |
76 | \r | |
77 | Build_IFWI.bat /m /y MNW2 Debug\r | |
78 | ```\r | |
79 | \r | |
80 | Once all the code and tools are downloaded and installed, only the following\r | |
81 | commands are required to setup the environment. Run these from the same\r | |
82 | directory used to install the source and binaries.\r | |
83 | \r | |
84 | ```\r | |
85 | set WORKSPACE=%CD%\r | |
86 | set EDK_TOOLS_PATH=%WORKSPACE%\edk2\BaseTools\r | |
87 | set EDK_TOOLS_BIN=%EDK_TOOLS_PATH%\BinWrappers\WindowsLike\r | |
88 | set PACKAGES_PATH=%WORKSPACE%\edk2;%WORKSPACE%\Vlv2Binaries\r | |
89 | path=%path%;%EDK_TOOLS_PATH%\Bin\Win32;%WORKSPACE%\openssl-1.0.2r-x64_86-win64\r | |
90 | set NASM_PREFIX=%WORKSPACE%\nasm-2.13.03\\r | |
91 | \r | |
92 | cd %WORKSPACE%\edk2\r | |
93 | \r | |
94 | call edkSetup.bat Rebuild\r | |
95 | ```\r | |
96 | \r | |
97 | Once the environment is setup, the MinnowBoard MAX firmware and capsules can be\r | |
98 | rebuilt using the following commands.\r | |
99 | \r | |
100 | * Build Debug Image\r | |
101 | \r | |
102 | ```\r | |
103 | cd Vlv2TbltDevicePkg\r | |
104 | Build_IFWI.bat /m /y MNW2 Debug\r | |
105 | ```\r | |
106 | \r | |
107 | * Build Release Image\r | |
108 | \r | |
109 | ```\r | |
110 | cd Vlv2TbltDevicePkg\r | |
111 | Build_IFWI.bat /m /y MNW2 Release\r | |
112 | ```\r | |
113 | \r | |
114 | The generated firmware image is the newest `.bin` file in `edk2/Vlv2TbltDevicePkg/Stitch`.\r | |
115 | The file is in the form `MNW2MAX1.X64.0084.D01.<DATE>.bin`.\r | |
116 | \r | |
117 | The 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 | |
130 | Run the script below from an empty directory. The script clones the EDK II\r | |
131 | repository from GitHub and downloads and unzips the binary support files for the\r | |
132 | MinnowBoard MAX. It then sets up the environment for EDK II builds and builds\r | |
133 | the MinnowBoard MAX firmware and generates UEFI Capsules that can be used to\r | |
134 | update the MinnowBoard MAX firmware and three sample devices.\r | |
135 | \r | |
136 | ```\r | |
137 | git clone --recurse-submodules https://github.com/tianocore/edk2.git\r | |
138 | \r | |
139 | mkdir Vlv2Binaries\r | |
140 | cd Vlv2Binaries\r | |
141 | wget https://firmware.intel.com/sites/default/files/MinnowBoardMax-Development190216.zip\r | |
142 | unzip MinnowBoardMax-Development190216.zip\r | |
143 | unzip Vlv2SocBinPkg.zip\r | |
144 | \r | |
145 | cd ..\r | |
146 | mkdir Conf\r | |
147 | \r | |
148 | export WORKSPACE=$PWD/edk2\r | |
149 | export PACKAGES_PATH=$PWD/Vlv2Binaries\r | |
150 | export EDK_TOOLS_PATH=$WORKSPACE/BaseTools\r | |
151 | \r | |
152 | cd edk2\r | |
153 | cd Vlv2TbltDevicePkg\r | |
154 | . Build_IFWI.sh MNW2 Debug\r | |
155 | ```\r | |
156 | \r | |
157 | Once all the code is downloaded and installed, only the following commands are\r | |
158 | required to setup the environment. Run these from the same directory used to\r | |
159 | install the source and binaries.\r | |
160 | \r | |
161 | ```\r | |
162 | export WORKSPACE=$PWD/edk2\r | |
163 | export PACKAGES_PATH=$PWD/Vlv2Binaries\r | |
164 | export EDK_TOOLS_PATH=$WORKSPACE/BaseTools\r | |
165 | \r | |
166 | cd edk2\r | |
167 | cd Vlv2TbltDevicePkg\r | |
168 | ```\r | |
169 | \r | |
170 | Once the environment is setup, the MinnowBoard MAX firmware and capsules can be\r | |
171 | rebuilt using the following commands.\r | |
172 | \r | |
173 | \r | |
174 | * Build Debug Image\r | |
175 | \r | |
176 | ```\r | |
177 | cd Vlv2TbltDevicePkg\r | |
178 | ./Build_IFWI.sh MNW2 Debug\r | |
179 | ```\r | |
180 | \r | |
181 | * Build Release Image\r | |
182 | \r | |
183 | ```\r | |
184 | cd Vlv2TbltDevicePkg\r | |
185 | ./Build_IFWI.sh MNW2 Release\r | |
186 | ```\r | |
187 | \r | |
188 | The generated firmware image is the `MNW2MAX_X64_D_0084_01_GCC.bin` file in\r | |
189 | `edk2\Vlv2TbltDevicePkg\Stitch`\r | |
190 | \r | |
191 | The 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 |
206 | CapsuleApp.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 |
222 | CapsuleApp.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 |
229 | CapsuleApp.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 |