| 1 |
## SPDX-License-Identifier: GPL-2.0-only |
| 2 |
|
| 3 |
if PAYLOAD_EDK2 |
| 4 |
|
| 5 |
config PAYLOAD_FILE |
| 6 |
string "edk2 binary" |
| 7 |
default "$(obj)/UEFIPAYLOAD.fd" if EDK2_UEFIPAYLOAD |
| 8 |
default "$(obj)/ShimmedUniversalPayload.elf" if EDK2_UNIVERSAL_PAYLOAD |
| 9 |
help |
| 10 |
The result of a UefiPayloadPkg build |
| 11 |
|
| 12 |
choice |
| 13 |
prompt "EDK II build type" |
| 14 |
default EDK2_UEFIPAYLOAD |
| 15 |
help |
| 16 |
Select the build type for edk2. UniversalPayload is recommended, as it is |
| 17 |
replacing UefiPayloadPkg. Whilst in the transition phase between the two, |
| 18 |
both options exist. |
| 19 |
|
| 20 |
config EDK2_UEFIPAYLOAD |
| 21 |
bool "Build UefiPayloadPkg" |
| 22 |
help |
| 23 |
Build the standard UefiPayloadPkg |
| 24 |
|
| 25 |
config EDK2_UNIVERSAL_PAYLOAD |
| 26 |
bool "Build Universal Payload" |
| 27 |
help |
| 28 |
Select this option if you want to build a coreboot image |
| 29 |
with EDK2s Universal Payload. If you don't know what this is |
| 30 |
about, just leave it enabled. |
| 31 |
|
| 32 |
Universal Payload should ideally only be built from upstream EDK2, |
| 33 |
https://github.com/tianocore/edk2, as this is regularly build tested |
| 34 |
and it encourages patches to be merged upstream. |
| 35 |
|
| 36 |
Whilst the required patches are being merged, this is pointed to |
| 37 |
Star Labs GitHub repository which contains these patches and is based |
| 38 |
on a known working commit. |
| 39 |
|
| 40 |
See https://universalscalablefirmware.github.io/documentation/ for more information. |
| 41 |
|
| 42 |
endchoice |
| 43 |
|
| 44 |
choice |
| 45 |
prompt "Tianocore's EDK II payload" |
| 46 |
default EDK2_REPO_CUSTOM if EDK2_UNIVERSAL_PAYLOAD |
| 47 |
default EDK2_REPO_MRCHROMEBOX |
| 48 |
help |
| 49 |
Select which type of payload edk2 will build (default is UefiPayload) |
| 50 |
UefiPayload: MrChromebox's customized fork of edk2 which works on most |
| 51 |
x86_64 devices |
| 52 |
Upstream: Use upstream edk2 payload from https://github.com/tianocore/edk2 |
| 53 |
|
| 54 |
config EDK2_REPO_MRCHROMEBOX |
| 55 |
bool "MrChromebox' edk2 fork" |
| 56 |
help |
| 57 |
Select this option to build using MrChromebox's custom edk2 fork, |
| 58 |
which incorporates fixes/improvements from System 76's and 9elements' trees. |
| 59 |
|
| 60 |
config EDK2_REPO_OFFICIAL |
| 61 |
bool "Official edk2 repository" |
| 62 |
help |
| 63 |
Select this option if you want to use the official edk2 repository to build |
| 64 |
edk2. |
| 65 |
|
| 66 |
Please note, commit c4fdec0a83d6 ("UefiCpuPkg/MtrrLib: Improve MtrrDebugPrintAllMtrrsWorker"), |
| 67 |
and the preceding MTRR patches, must be in the branch used or edk2 will not boot due |
| 68 |
to trampling MTRRs set up by coreboot. |
| 69 |
|
| 70 |
config EDK2_REPO_CUSTOM |
| 71 |
bool "Specify your own repository" |
| 72 |
help |
| 73 |
Specify your own edk2 repository and branch to use. |
| 74 |
|
| 75 |
endchoice |
| 76 |
|
| 77 |
config EDK2_REPOSITORY |
| 78 |
string "URL to git repository for edk2" |
| 79 |
default "https://github.com/starlabsltd/edk2" if EDK2_UNIVERSAL_PAYLOAD |
| 80 |
default "https://github.com/mrchromebox/edk2" if EDK2_REPO_MRCHROMEBOX |
| 81 |
default "https://github.com/tianocore/edk2" if EDK2_REPO_OFFICIAL |
| 82 |
default "" if EDK2_REPO_CUSTOM |
| 83 |
help |
| 84 |
coreboot supports an array of build options which can be found below. These options |
| 85 |
will only have an effect if the relevant options exist in the target repository. |
| 86 |
|
| 87 |
config EDK2_TAG_OR_REV |
| 88 |
string "Insert a commit's SHA-1 or a branch name" |
| 89 |
default "origin/uefipayload_2502" if EDK2_REPO_MRCHROMEBOX |
| 90 |
default "origin/universalpayload" if EDK2_UNIVERSAL_PAYLOAD |
| 91 |
default "origin/master" if EDK2_REPO_OFFICIAL |
| 92 |
default "" if EDK2_REPO_CUSTOM |
| 93 |
help |
| 94 |
The commit's SHA-1 or branch name of the revision to use. This must exist in |
| 95 |
EDK2_REPOSITORY, and in the case of a branch name, prefixed with origin i.e. |
| 96 |
"origin/uefipayload_202202" |
| 97 |
|
| 98 |
config EDK2_USE_EDK2_PLATFORMS |
| 99 |
bool "Use edk2-platforms repository" |
| 100 |
default n |
| 101 |
help |
| 102 |
Clone edk2-platforms repository to the edk2 workspace for additional modules. |
| 103 |
|
| 104 |
if EDK2_USE_EDK2_PLATFORMS |
| 105 |
|
| 106 |
config EDK2_PLATFORMS_REPOSITORY |
| 107 |
string "URL to git repository for edk2-platforms" |
| 108 |
default "https://github.com/tianocore/edk2-platforms" |
| 109 |
help |
| 110 |
URL to the edk2-platfors repository to clone. |
| 111 |
|
| 112 |
config EDK2_PLATFORMS_TAG_OR_REV |
| 113 |
string "Insert a commit's SHA-1 or a branch name" |
| 114 |
default "origin/master" |
| 115 |
help |
| 116 |
The commit's SHA-1 or branch name of the revision to use. This must exist in |
| 117 |
EDK2_PLATFORMS_REPOSITORY, and in the case of a branch name, prefixed with |
| 118 |
origin i.e. "origin/master" |
| 119 |
|
| 120 |
endif |
| 121 |
|
| 122 |
choice |
| 123 |
prompt "edk2 build" |
| 124 |
default EDK2_RELEASE |
| 125 |
help |
| 126 |
Select whether to generate a debug or release build for |
| 127 |
edk2; default is to generate a release build. |
| 128 |
|
| 129 |
config EDK2_DEBUG |
| 130 |
bool "Generate edk2 debug build" |
| 131 |
help |
| 132 |
Generate a debug build. |
| 133 |
|
| 134 |
config EDK2_RELEASE |
| 135 |
bool "Generate edk2 release build" |
| 136 |
help |
| 137 |
Generate a release build. |
| 138 |
|
| 139 |
endchoice |
| 140 |
|
| 141 |
config EDK2_BOOTSPLASH_FILE |
| 142 |
string "edk2 Bootsplash path and filename" |
| 143 |
default "Documentation/coreboot_logo.bmp" |
| 144 |
help |
| 145 |
The path and filename of the file to use as graphical bootsplash |
| 146 |
image. If this option is not configured, the default |
| 147 |
coreboot logo (European Brown Hare) will used. |
| 148 |
|
| 149 |
You can use any image format supported by imagemagick, a list of which |
| 150 |
can be found [here](https://imagemagick.org/script/formats.php). |
| 151 |
|
| 152 |
The build process will automatically convert this to the format that |
| 153 |
edk2 requires, which is an uncompressed BMP, in BMP3 format. It does |
| 154 |
this using imagemagick (`convert splosh.bmp BMP3:splash.bmp`). |
| 155 |
|
| 156 |
The newly formatted file will be the dimensions size as the original |
| 157 |
one. |
| 158 |
|
| 159 |
The build process will automatically do this conversion, so it can |
| 160 |
be supplied with any format that imagemagick can process (which is |
| 161 |
pretty much any!). |
| 162 |
|
| 163 |
This image will also be used as the BGRT boot image, which may |
| 164 |
persist through your OS boot process. |
| 165 |
|
| 166 |
See ACPI spec 6.3, 5.2.22 Boot Graphics Resource Table (BGRT), and |
| 167 |
Microsoft's documentation on BGRT positioning: |
| 168 |
Docs/Windows/Windows Drivers/Bring up guide/Boot screen components |
| 169 |
|
| 170 |
Accordingly, the image used should be no taller/wider than 40% of |
| 171 |
the display panel's native pixel height/width (or resolution set). |
| 172 |
|
| 173 |
If an absolute path is not given, the path will assumed to be |
| 174 |
relative to the coreboot root directory. |
| 175 |
|
| 176 |
config EDK2_BOOT_MANAGER_ESCAPE |
| 177 |
bool "Use Escape key for Boot Manager" |
| 178 |
default n |
| 179 |
help |
| 180 |
Use Escape as the hot-key to access the Boot Manager. This replaces |
| 181 |
the default key of F2. |
| 182 |
|
| 183 |
config EDK2_BOOT_TIMEOUT |
| 184 |
int "Set the timeout for boot menu prompt" |
| 185 |
default 2 |
| 186 |
help |
| 187 |
The length of time in seconds for which the boot splash/menu prompt will be displayed. |
| 188 |
For boards with an internal display, the default value of 2s is generally sufficient. |
| 189 |
For boards with an external display, a value of 5s is generally sufficient. |
| 190 |
|
| 191 |
config EDK2_CBMEM_LOGGING |
| 192 |
bool "Enable edk2 logging to CBMEM" |
| 193 |
help |
| 194 |
Select this option if you want to enable edk2 logging to CBMEM. |
| 195 |
You may want to increase the default cbmem buffer size when selecting |
| 196 |
this option, especially if using a debug (vs release) build. |
| 197 |
Selecting this option will increase the payload size in CBFS by 0x10000. |
| 198 |
|
| 199 |
config EDK2_CPU_TIMER_LIB |
| 200 |
bool |
| 201 |
default n |
| 202 |
help |
| 203 |
For recent Intel and AMD CPUs, the 0x15 CPUID instruction will return Time |
| 204 |
Stamp Counter Frequence. For CPUs that do not support this instruction, |
| 205 |
EDK2 must include a different library which is the reason why this must be |
| 206 |
configured at build time. |
| 207 |
|
| 208 |
If this is enabled, and the CPU doesn't support 0x15, it will fail to |
| 209 |
boot. If it is not enabled, and the CPU does support 0x15, it will still |
| 210 |
boot but without support for the leaf. Consequently, it is disabled by |
| 211 |
default. |
| 212 |
|
| 213 |
config EDK2_FOLLOW_BGRT_SPEC |
| 214 |
bool "Center logo 38.2% from the top of screen" |
| 215 |
depends on EDK2_REPO_MRCHROMEBOX |
| 216 |
default n |
| 217 |
help |
| 218 |
Follow the BGRT Specification implemented by Microsoft and |
| 219 |
the Boot Logo 38.2% will be vertically centered 38.2% from |
| 220 |
the top of the display. |
| 221 |
|
| 222 |
config EDK2_FULL_SCREEN_SETUP |
| 223 |
bool "Use the full screen for the edk2 frontpage" |
| 224 |
default y |
| 225 |
help |
| 226 |
Allow edk2 to use the full screen to display the frontpage |
| 227 |
(aka "Boot Menu"). With this option disable, it will be |
| 228 |
limited to 640x480. |
| 229 |
|
| 230 |
config EDK2_HAVE_EFI_SHELL |
| 231 |
bool "Include EFI Shell" |
| 232 |
default y |
| 233 |
help |
| 234 |
Include the EFI shell Binary |
| 235 |
|
| 236 |
config EDK2_PRIORITIZE_INTERNAL |
| 237 |
bool "Prioritize internal boot devices" |
| 238 |
depends on EDK2_REPO_MRCHROMEBOX |
| 239 |
default y |
| 240 |
help |
| 241 |
Prioritize internal boot devices over external devices |
| 242 |
|
| 243 |
config EDK2_LOAD_OPTION_ROMS |
| 244 |
bool "Load and Execute OpROMs on PCIe devices" |
| 245 |
depends on EDK2_REPO_MRCHROMEBOX |
| 246 |
default n |
| 247 |
help |
| 248 |
Load and execute OpROMs on PCIe devices. |
| 249 |
Select this option to support use of an external dGPU. |
| 250 |
|
| 251 |
config EDK2_PS2_SUPPORT |
| 252 |
bool "Support PS/2 Keyboards" |
| 253 |
default y |
| 254 |
help |
| 255 |
Include support for PS/2 keyboards |
| 256 |
|
| 257 |
config EDK2_SD_MMC_TIMEOUT |
| 258 |
int "Timeout in ms for initializing SD and eMMC devices" |
| 259 |
default 10 |
| 260 |
help |
| 261 |
The amount of time allowed to initialize the SD Card reader and/or eMMC drive. |
| 262 |
Most only require 10ms, but certain readers can take 1s. |
| 263 |
|
| 264 |
config EDK2_SERIAL_SUPPORT |
| 265 |
bool "Support serial output" |
| 266 |
default y if EDK2_DEBUG |
| 267 |
default n |
| 268 |
help |
| 269 |
Enable serial port output in edk2. Serial output limits the performance of edk2's |
| 270 |
FrontPage. |
| 271 |
|
| 272 |
config EDK2_SECURE_BOOT_SUPPORT |
| 273 |
bool "Enable UEFI Secure Boot support" |
| 274 |
depends on EDK2_REPO_MRCHROMEBOX && SMMSTORE_V2 |
| 275 |
default y if EDK2_REPO_MRCHROMEBOX && SMMSTORE_V2 |
| 276 |
help |
| 277 |
Select this option to enable UEFI SecureBoot support in edk2. |
| 278 |
UEFI SecureBoot will be disabled by default and can be enabled from the menu option. |
| 279 |
|
| 280 |
config EDK2_GOP_DRIVER |
| 281 |
bool "Add a GOP driver to the Tianocore build" |
| 282 |
depends on INTEL_GMA_ADD_VBT && NO_GFX_INIT && EDK2_REPO_MRCHROMEBOX |
| 283 |
default y if INTEL_GMA_ADD_VBT && NO_GFX_INIT && EDK2_REPO_MRCHROMEBOX |
| 284 |
help |
| 285 |
Select this option to have edk2 use an external GOP driver for display init. |
| 286 |
|
| 287 |
config EDK2_GOP_FILE |
| 288 |
string "GOP driver file" |
| 289 |
depends on EDK2_GOP_DRIVER |
| 290 |
default "IntelGopDriver.efi" |
| 291 |
help |
| 292 |
The name of the GOP driver file passed to edk2. |
| 293 |
|
| 294 |
config EDK2_DISABLE_TPM |
| 295 |
bool "Disable TPM support in edk2" |
| 296 |
default y if EDK2_REPO_MRCHROMEBOX && TPM_GOOGLE_CR50 && SOC_AMD_COMMON |
| 297 |
help |
| 298 |
Select this option to disable TPM support in edk2. This is necessary to avoid boot |
| 299 |
hangs on some boards with a CR50 TPM, particularly those with an AMD Zen SoC. |
| 300 |
|
| 301 |
config EDK2_UFS_ENABLE |
| 302 |
bool "Enable UFS DXE driver in edk2" |
| 303 |
depends on EDK2_REPO_MRCHROMEBOX |
| 304 |
default n |
| 305 |
help |
| 306 |
Select this option to enable the UFS DXE driver in MrChromebox's fork of edk2. |
| 307 |
It is needed for boards with UFS storage, but can cause issues with other boards, |
| 308 |
so should only be enabled when needed. |
| 309 |
|
| 310 |
config EDK2_PCO_MMIO_EMMC |
| 311 |
bool "Enable MMIO eMMC driver for AMD Picasso boards in edk2" |
| 312 |
depends on EDK2_REPO_MRCHROMEBOX |
| 313 |
default n |
| 314 |
help |
| 315 |
Select this option to enable the MMIO eMMC DXE driver in MrChromebox's fork of edk2. |
| 316 |
It is needed for AMD Picasso boards with eMMC storage, but will conflict with the |
| 317 |
PCI-based eMMC driver, so should only be enabled for AMD Picasso boards. |
| 318 |
|
| 319 |
config EDK2_USE_LAPIC_TIMER |
| 320 |
bool "Use LAPIC timer instead of HPET" |
| 321 |
default n |
| 322 |
help |
| 323 |
Select this option to use the LAPIC timer instead of HPET in edk2. The LAPIC is closer |
| 324 |
to the CPU than the HPET (on the PCH), resulting in lower latency / higher resolution. |
| 325 |
This setting is at least needed for platforms with Core 2 processors, which are reported |
| 326 |
to have issues with HPET. |
| 327 |
|
| 328 |
config EDK2_CUSTOM_BUILD_PARAMS |
| 329 |
string "edk2 additional custom build parameters" |
| 330 |
default "" |
| 331 |
help |
| 332 |
edk2 has build options that are not modified by coreboot, and these can be |
| 333 |
found in `UefiPayloadPkg/UefiPayloadPkg.dsc`. Forks may also support |
| 334 |
additional build options that should have been upstreamed but have not. |
| 335 |
|
| 336 |
This option can support both macros `-D` and Pcds `--pcd`. |
| 337 |
|
| 338 |
endif |