Sean Rhodes | 38c99b5 | 2022-07-13 10:11:44 +0100 | [diff] [blame] | 1 | if PAYLOAD_EDK2 |
Stefan Reinauer | 1a8b7bf | 2015-06-30 15:58:56 -0700 | [diff] [blame] | 2 | |
| 3 | config PAYLOAD_FILE |
Sean Rhodes | 38c99b5 | 2022-07-13 10:11:44 +0100 | [diff] [blame] | 4 | string "edk2 binary" |
Sean Rhodes | 91564fc | 2022-07-22 10:10:38 +0100 | [diff] [blame] | 5 | default "$(obj)/UEFIPAYLOAD.fd" if EDK2_UEFIPAYLOAD |
Stefan Reinauer | 1a8b7bf | 2015-06-30 15:58:56 -0700 | [diff] [blame] | 6 | help |
Matt DeVillier | d3b49b4 | 2021-05-10 11:02:13 -0500 | [diff] [blame] | 7 | The result of a UefiPayloadPkg build |
Stefan Reinauer | 1a8b7bf | 2015-06-30 15:58:56 -0700 | [diff] [blame] | 8 | |
Sean Rhodes | 91564fc | 2022-07-22 10:10:38 +0100 | [diff] [blame] | 9 | config EDK2_UEFIPAYLOAD |
| 10 | bool "Build UefiPayloadPkg" |
| 11 | default y |
| 12 | help |
| 13 | Build the standard UefiPayloadPkg |
| 14 | |
Martin Roth | 4769cc3 | 2016-06-02 16:42:29 -0600 | [diff] [blame] | 15 | choice |
Sean Rhodes | 38c99b5 | 2022-07-13 10:11:44 +0100 | [diff] [blame] | 16 | prompt "Tianocore's EDK II payload" |
Sean Rhodes | 91564fc | 2022-07-22 10:10:38 +0100 | [diff] [blame] | 17 | default EDK2_REPO_MRCHROMEBOX |
Martin Roth | 4769cc3 | 2016-06-02 16:42:29 -0600 | [diff] [blame] | 18 | help |
Sean Rhodes | 38c99b5 | 2022-07-13 10:11:44 +0100 | [diff] [blame] | 19 | Select which type of payload edk2 will build (default is UefiPayload) |
| 20 | UefiPayload: MrChromebox's customized fork of edk2 which works on most |
Matt DeVillier | d3b49b4 | 2021-05-10 11:02:13 -0500 | [diff] [blame] | 21 | x86_64 devices |
Sean Rhodes | 38c99b5 | 2022-07-13 10:11:44 +0100 | [diff] [blame] | 22 | Upstream: Use upstream edk2 payload from https://github.com/tianocore/edk2 |
Martin Roth | 4769cc3 | 2016-06-02 16:42:29 -0600 | [diff] [blame] | 23 | |
Sean Rhodes | 91564fc | 2022-07-22 10:10:38 +0100 | [diff] [blame] | 24 | config EDK2_REPO_MRCHROMEBOX |
| 25 | bool "MrChromebox' edk2 fork" |
Martin Roth | 4769cc3 | 2016-06-02 16:42:29 -0600 | [diff] [blame] | 26 | help |
Sean Rhodes | 38c99b5 | 2022-07-13 10:11:44 +0100 | [diff] [blame] | 27 | Select this option to build using MrChromebox's custom edk2 fork, |
Matt DeVillier | d3b49b4 | 2021-05-10 11:02:13 -0500 | [diff] [blame] | 28 | which incorporates fixes/improvements from System 76's and 9elements' trees. |
| 29 | |
Sean Rhodes | 91564fc | 2022-07-22 10:10:38 +0100 | [diff] [blame] | 30 | config EDK2_REPO_OFFICIAL |
| 31 | bool "Official edk2 repository" |
Matt DeVillier | d3b49b4 | 2021-05-10 11:02:13 -0500 | [diff] [blame] | 32 | help |
Sean Rhodes | 91564fc | 2022-07-22 10:10:38 +0100 | [diff] [blame] | 33 | Select this option if you want to use the official edk2 repository to build |
| 34 | edk2. |
Martin Roth | 4769cc3 | 2016-06-02 16:42:29 -0600 | [diff] [blame] | 35 | |
Sean Rhodes | d750875 | 2022-09-22 21:40:08 +0100 | [diff] [blame] | 36 | Please note, this option will not work on any SOC without modification. |
| 37 | |
Sean Rhodes | 91564fc | 2022-07-22 10:10:38 +0100 | [diff] [blame] | 38 | config EDK2_REPO_CUSTOM |
| 39 | bool "Specify your own repository" |
Sean Rhodes | 0884f210 | 2022-02-04 07:41:16 +0000 | [diff] [blame] | 40 | help |
| 41 | Specify your own edk2 repository and branch to use. |
| 42 | |
Martin Roth | 4769cc3 | 2016-06-02 16:42:29 -0600 | [diff] [blame] | 43 | endchoice |
| 44 | |
Sean Rhodes | 38c99b5 | 2022-07-13 10:11:44 +0100 | [diff] [blame] | 45 | config EDK2_REPOSITORY |
Sean Rhodes | 0884f210 | 2022-02-04 07:41:16 +0000 | [diff] [blame] | 46 | string "URL to git repository for edk2" |
Sean Rhodes | 91564fc | 2022-07-22 10:10:38 +0100 | [diff] [blame] | 47 | default "https://github.com/mrchromebox/edk2" if EDK2_REPO_MRCHROMEBOX |
| 48 | default "https://github.com/tianocore/edk2" if EDK2_REPO_OFFICIAL |
| 49 | default "" if EDK2_REPO_CUSTOM |
Martin Roth | 4769cc3 | 2016-06-02 16:42:29 -0600 | [diff] [blame] | 50 | help |
Sean Rhodes | 0884f210 | 2022-02-04 07:41:16 +0000 | [diff] [blame] | 51 | coreboot supports an array of build options which can be found below. These options |
| 52 | will only have an effect if the relevant options exist in the target repository. |
| 53 | |
Sean Rhodes | 38c99b5 | 2022-07-13 10:11:44 +0100 | [diff] [blame] | 54 | config EDK2_TAG_OR_REV |
Sean Rhodes | 0884f210 | 2022-02-04 07:41:16 +0000 | [diff] [blame] | 55 | string "Insert a commit's SHA-1 or a branch name" |
Matt DeVillier | b8fd41b | 2023-04-30 15:21:20 -0500 | [diff] [blame] | 56 | default "origin/uefipayload_202304" if EDK2_REPO_MRCHROMEBOX |
Sean Rhodes | 91564fc | 2022-07-22 10:10:38 +0100 | [diff] [blame] | 57 | default "origin/master" if EDK2_REPO_OFFICIAL |
| 58 | default "" if EDK2_REPO_CUSTOM |
Sean Rhodes | 0884f210 | 2022-02-04 07:41:16 +0000 | [diff] [blame] | 59 | help |
| 60 | The commit's SHA-1 or branch name of the revision to use. This must exist in |
Sean Rhodes | 38c99b5 | 2022-07-13 10:11:44 +0100 | [diff] [blame] | 61 | EDK2_REPOSITORY, and in the case of a branch name, prefixed with origin i.e. |
Sean Rhodes | 0884f210 | 2022-02-04 07:41:16 +0000 | [diff] [blame] | 62 | "origin/uefipayload_202202" |
Martin Roth | 4769cc3 | 2016-06-02 16:42:29 -0600 | [diff] [blame] | 63 | |
Michał Żygowski | 82d814a | 2022-10-26 11:32:54 +0200 | [diff] [blame] | 64 | config EDK2_USE_EDK2_PLATFORMS |
| 65 | bool "Use edk2-platforms repository" |
| 66 | default n |
| 67 | help |
| 68 | Clone edk2-platforms repository to the edk2 workspace for additional modules. |
| 69 | |
| 70 | if EDK2_USE_EDK2_PLATFORMS |
| 71 | |
| 72 | config EDK2_PLATFORMS_REPOSITORY |
| 73 | string "URL to git repository for edk2-platforms" |
| 74 | default "https://github.com/tianocore/edk2-platforms" |
| 75 | help |
| 76 | URL to the edk2-platfors repository to clone. |
| 77 | |
| 78 | config EDK2_PLATFORMS_TAG_OR_REV |
| 79 | string "Insert a commit's SHA-1 or a branch name" |
| 80 | default "origin/master" |
| 81 | help |
| 82 | The commit's SHA-1 or branch name of the revision to use. This must exist in |
| 83 | EDK2_PLATFORMS_REPOSITORY, and in the case of a branch name, prefixed with |
| 84 | origin i.e. "origin/master" |
| 85 | |
| 86 | endif |
| 87 | |
Martin Roth | 4769cc3 | 2016-06-02 16:42:29 -0600 | [diff] [blame] | 88 | choice |
Sean Rhodes | 38c99b5 | 2022-07-13 10:11:44 +0100 | [diff] [blame] | 89 | prompt "edk2 build" |
| 90 | default EDK2_RELEASE |
Martin Roth | 4769cc3 | 2016-06-02 16:42:29 -0600 | [diff] [blame] | 91 | help |
| 92 | Select whether to generate a debug or release build for |
Sean Rhodes | 38c99b5 | 2022-07-13 10:11:44 +0100 | [diff] [blame] | 93 | edk2; default is to generate a release build. |
Martin Roth | 4769cc3 | 2016-06-02 16:42:29 -0600 | [diff] [blame] | 94 | |
Sean Rhodes | 38c99b5 | 2022-07-13 10:11:44 +0100 | [diff] [blame] | 95 | config EDK2_DEBUG |
| 96 | bool "Generate edk2 debug build" |
Martin Roth | 4769cc3 | 2016-06-02 16:42:29 -0600 | [diff] [blame] | 97 | help |
| 98 | Generate a debug build. |
| 99 | |
Sean Rhodes | 38c99b5 | 2022-07-13 10:11:44 +0100 | [diff] [blame] | 100 | config EDK2_RELEASE |
| 101 | bool "Generate edk2 release build" |
Martin Roth | 4769cc3 | 2016-06-02 16:42:29 -0600 | [diff] [blame] | 102 | help |
| 103 | Generate a release build. |
| 104 | |
| 105 | endchoice |
| 106 | |
Sean Rhodes | 38c99b5 | 2022-07-13 10:11:44 +0100 | [diff] [blame] | 107 | config EDK2_BOOTSPLASH_FILE |
| 108 | string "edk2 Bootsplash path and filename" |
Matt DeVillier | 7b087c0 | 2022-07-25 23:27:19 -0500 | [diff] [blame] | 109 | default "Documentation/coreboot_logo.bmp" |
Matt DeVillier | ff79341 | 2019-02-21 22:41:59 -0600 | [diff] [blame] | 110 | help |
Sean Rhodes | 108e537 | 2022-07-15 13:58:52 +0100 | [diff] [blame] | 111 | The path and filename of the file to use as graphical bootsplash |
| 112 | image. If this option is not configured, the default |
Matt DeVillier | ff79341 | 2019-02-21 22:41:59 -0600 | [diff] [blame] | 113 | coreboot logo (European Brown Hare) will used. |
| 114 | |
Sean Rhodes | 108e537 | 2022-07-15 13:58:52 +0100 | [diff] [blame] | 115 | You can use any image format supported by imagemagick, a list of which |
| 116 | can be found [here](https://imagemagick.org/script/formats.php). |
Sean Rhodes | 0884f210 | 2022-02-04 07:41:16 +0000 | [diff] [blame] | 117 | |
Sean Rhodes | 108e537 | 2022-07-15 13:58:52 +0100 | [diff] [blame] | 118 | The build process will automatically convert this to the format that |
Sean Rhodes | 38c99b5 | 2022-07-13 10:11:44 +0100 | [diff] [blame] | 119 | edk2 requires, which is an uncompressed BMP, in BMP3 format. It does |
Sean Rhodes | 108e537 | 2022-07-15 13:58:52 +0100 | [diff] [blame] | 120 | this using imagemagick (`convert splosh.bmp BMP3:splash.bmp`). |
| 121 | |
| 122 | The newly formatted file will be the dimensions size as the original |
| 123 | one. |
| 124 | |
| 125 | The build process will automatically do this conversion, so it can |
| 126 | be supplied with any format that imagemagick can process (which is |
| 127 | pretty much any!). |
Felix Friedlander | 45ce841 | 2021-01-08 16:37:40 +1100 | [diff] [blame] | 128 | |
| 129 | This image will also be used as the BGRT boot image, which may |
Sean Rhodes | 0884f210 | 2022-02-04 07:41:16 +0000 | [diff] [blame] | 130 | persist through your OS boot process. |
Felix Friedlander | 45ce841 | 2021-01-08 16:37:40 +1100 | [diff] [blame] | 131 | |
| 132 | See ACPI spec 6.3, 5.2.22 Boot Graphics Resource Table (BGRT), and |
| 133 | Microsoft's documentation on BGRT positioning: |
| 134 | Docs/Windows/Windows Drivers/Bring up guide/Boot screen components |
| 135 | |
| 136 | Accordingly, the image used should be no taller/wider than 40% of |
| 137 | the display panel's native pixel height/width (or resolution set). |
Matt DeVillier | ff79341 | 2019-02-21 22:41:59 -0600 | [diff] [blame] | 138 | |
| 139 | If an absolute path is not given, the path will assumed to be |
| 140 | relative to the coreboot root directory. |
| 141 | |
Sean Rhodes | 38c99b5 | 2022-07-13 10:11:44 +0100 | [diff] [blame] | 142 | config EDK2_BOOT_MANAGER_ESCAPE |
Sean Rhodes | c8decce | 2022-02-09 08:25:39 +0000 | [diff] [blame] | 143 | bool "Use Escape key for Boot Manager" |
| 144 | default n |
| 145 | help |
| 146 | Use Escape as the hot-key to access the Boot Manager. This replaces |
| 147 | the default key of F2. |
| 148 | |
Sean Rhodes | 38c99b5 | 2022-07-13 10:11:44 +0100 | [diff] [blame] | 149 | config EDK2_BOOT_TIMEOUT |
Sean Rhodes | 63c6d81 | 2022-03-03 08:05:12 +0000 | [diff] [blame] | 150 | int "Set the timeout for boot menu prompt" |
Sean Rhodes | 0884f210 | 2022-02-04 07:41:16 +0000 | [diff] [blame] | 151 | default 2 |
Sean Rhodes | 766e481 | 2021-07-12 19:35:51 +0100 | [diff] [blame] | 152 | help |
Sean Rhodes | 0884f210 | 2022-02-04 07:41:16 +0000 | [diff] [blame] | 153 | The length of time in seconds for which the boot splash/menu prompt will be displayed. |
| 154 | For boards with an internal display, the default value of 2s is generally sufficient. |
| 155 | For boards with an external display, a value of 5s is generally sufficient. |
Sean Rhodes | 766e481 | 2021-07-12 19:35:51 +0100 | [diff] [blame] | 156 | |
Sean Rhodes | 38c99b5 | 2022-07-13 10:11:44 +0100 | [diff] [blame] | 157 | config EDK2_CBMEM_LOGGING |
| 158 | bool "Enable edk2 logging to CBMEM" |
Sean Rhodes | 0884f210 | 2022-02-04 07:41:16 +0000 | [diff] [blame] | 159 | help |
Sean Rhodes | 38c99b5 | 2022-07-13 10:11:44 +0100 | [diff] [blame] | 160 | Select this option if you want to enable edk2 logging to CBMEM. |
Sean Rhodes | 0884f210 | 2022-02-04 07:41:16 +0000 | [diff] [blame] | 161 | You may want to increase the default cbmem buffer size when selecting |
| 162 | this option, especially if using a debug (vs release) build. |
| 163 | Selecting this option will increase the payload size in CBFS by 0x10000. |
Sean Rhodes | 766e481 | 2021-07-12 19:35:51 +0100 | [diff] [blame] | 164 | |
Sean Rhodes | 7bbc9a5 | 2022-07-18 11:31:00 +0100 | [diff] [blame] | 165 | config EDK2_CPU_TIMER_LIB |
| 166 | bool |
| 167 | default n |
| 168 | help |
| 169 | For recent Intel and AMD CPUs, the 0x15 CPUID instruction will return Time |
| 170 | Stamp Counter Frequence. For CPUs that do not support this instruction, |
| 171 | EDK2 must include a different library which is the reason why this must be |
| 172 | configured at build time. |
| 173 | |
| 174 | If this is enabled, and the CPU doesn't support 0x15, it will fail to |
| 175 | boot. If it is not enabled, and the CPU does support 0x15, it will still |
| 176 | boot but without support for the leaf. Consequently, it is disabled by |
| 177 | default. |
| 178 | |
Sean Rhodes | 38c99b5 | 2022-07-13 10:11:44 +0100 | [diff] [blame] | 179 | config EDK2_FOLLOW_BGRT_SPEC |
Sean Rhodes | 14d67b3 | 2022-02-09 08:27:29 +0000 | [diff] [blame] | 180 | bool "Center logo 38.2% from the top of screen" |
| 181 | default n |
| 182 | help |
| 183 | Follow the BGRT Specification implemented by Microsoft and |
Sean Rhodes | f33ddb3 | 2022-02-09 08:30:07 +0000 | [diff] [blame] | 184 | the Boot Logo 38.2% will be vertically centered 38.2% from |
| 185 | the top of the display. |
| 186 | |
Sean Rhodes | 38c99b5 | 2022-07-13 10:11:44 +0100 | [diff] [blame] | 187 | config EDK2_FULL_SCREEN_SETUP |
Sean Rhodes | c14bbbc | 2022-07-26 16:50:00 +0100 | [diff] [blame] | 188 | bool "Use the full screen for the edk2 frontpage" |
| 189 | default y |
| 190 | help |
| 191 | Allow edk2 to use the full screen to display the frontpage |
| 192 | (aka "Boot Menu"). With this option disable, it will be |
| 193 | limited to 640x480. |
| 194 | |
Sean Rhodes | 38c99b5 | 2022-07-13 10:11:44 +0100 | [diff] [blame] | 195 | config EDK2_HAVE_EFI_SHELL |
Sean Rhodes | f33ddb3 | 2022-02-09 08:30:07 +0000 | [diff] [blame] | 196 | bool "Include EFI Shell" |
| 197 | default y |
| 198 | help |
| 199 | Include the EFI shell Binary |
Sean Rhodes | 14d67b3 | 2022-02-09 08:27:29 +0000 | [diff] [blame] | 200 | |
Sean Rhodes | 38c99b5 | 2022-07-13 10:11:44 +0100 | [diff] [blame] | 201 | config EDK2_PRIORITIZE_INTERNAL |
Sean Rhodes | 3f3a3ee | 2022-02-10 09:21:50 +0000 | [diff] [blame] | 202 | bool "Prioritize internal boot devices" |
| 203 | default y |
| 204 | help |
| 205 | Prioritize internal boot devices over external devices |
| 206 | |
Sean Rhodes | 38c99b5 | 2022-07-13 10:11:44 +0100 | [diff] [blame] | 207 | config EDK2_PS2_SUPPORT |
Sean Rhodes | 4600c25 | 2022-02-09 08:31:24 +0000 | [diff] [blame] | 208 | bool "Support PS/2 Keyboards" |
| 209 | default y |
| 210 | help |
| 211 | Include support for PS/2 keyboards |
| 212 | |
Sean Rhodes | 38c99b5 | 2022-07-13 10:11:44 +0100 | [diff] [blame] | 213 | config EDK2_SD_MMC_TIMEOUT |
Sean Rhodes | 8f29603 | 2022-07-13 08:09:59 +0100 | [diff] [blame] | 214 | int "Timeout in ms for initializing SD and eMMC devices" |
| 215 | default 10 |
Sean Rhodes | 4a9be9f | 2022-02-13 21:19:19 +0000 | [diff] [blame] | 216 | help |
| 217 | The amount of time allowed to initialize the SD Card reader and/or eMMC drive. |
Sean Rhodes | 8f29603 | 2022-07-13 08:09:59 +0100 | [diff] [blame] | 218 | Most only require 10ms, but certain readers can take 1s. |
Sean Rhodes | 4a9be9f | 2022-02-13 21:19:19 +0000 | [diff] [blame] | 219 | |
Sean Rhodes | 38c99b5 | 2022-07-13 10:11:44 +0100 | [diff] [blame] | 220 | config EDK2_SERIAL_SUPPORT |
Sean Rhodes | 8e10a48 | 2022-07-04 17:01:09 +0100 | [diff] [blame] | 221 | bool "Support serial output" |
Sean Rhodes | 38c99b5 | 2022-07-13 10:11:44 +0100 | [diff] [blame] | 222 | default y if EDK2_DEBUG |
Sean Rhodes | 8e10a48 | 2022-07-04 17:01:09 +0100 | [diff] [blame] | 223 | default n |
| 224 | help |
| 225 | Enable serial port output in edk2. Serial output limits the performance of edk2's |
| 226 | FrontPage. |
| 227 | |
Matt DeVillier | a38e248 | 2023-04-30 15:10:57 -0500 | [diff] [blame] | 228 | config EDK2_SECURE_BOOT_SUPPORT |
| 229 | bool "Enable UEFI Secure Boot support" |
| 230 | depends on EDK2_REPO_MRCHROMEBOX && SMMSTORE_V2 |
| 231 | default y if EDK2_REPO_MRCHROMEBOX && SMMSTORE_V2 |
| 232 | help |
| 233 | Select this option to enable UEFI SecureBoot support in edk2. |
| 234 | UEFI SecureBoot will be disabled by default and can be enabled from the menu option. |
| 235 | |
Sean Rhodes | 38c99b5 | 2022-07-13 10:11:44 +0100 | [diff] [blame] | 236 | config EDK2_CUSTOM_BUILD_PARAMS |
| 237 | string "edk2 additional custom build parameters" |
Sean Rhodes | 91564fc | 2022-07-22 10:10:38 +0100 | [diff] [blame] | 238 | default "-D VARIABLE_SUPPORT=SMMSTORE" if EDK2_REPO_MRCHROMEBOX && SMMSTORE_V2 |
Michał Żygowski | ba08c49 | 2022-02-23 16:55:24 +0100 | [diff] [blame] | 239 | help |
Sean Rhodes | c505588 | 2022-07-27 21:41:54 +0100 | [diff] [blame] | 240 | edk2 has build options that are not modified by coreboot, and these can be |
| 241 | found in `UefiPayloadPkg/UefiPayloadPkg.dsc`. Forks may also support |
| 242 | additional build options that should have been upstreamed but have not. |
Michał Żygowski | ba08c49 | 2022-02-23 16:55:24 +0100 | [diff] [blame] | 243 | |
Sean Rhodes | c505588 | 2022-07-27 21:41:54 +0100 | [diff] [blame] | 244 | This option can support both macros `-D` and Pcds `--pcd`. |
Michał Żygowski | ba08c49 | 2022-02-23 16:55:24 +0100 | [diff] [blame] | 245 | |
Stefan Reinauer | 1a8b7bf | 2015-06-30 15:58:56 -0700 | [diff] [blame] | 246 | endif |