blob: 1057c43cc06be4b5a15d0120bf832f38834014e9 [file] [log] [blame]
Sean Rhodes38c99b52022-07-13 10:11:44 +01001if PAYLOAD_EDK2
Stefan Reinauer1a8b7bf2015-06-30 15:58:56 -07002
3config PAYLOAD_FILE
Sean Rhodes38c99b52022-07-13 10:11:44 +01004 string "edk2 binary"
Sean Rhodes91564fc2022-07-22 10:10:38 +01005 default "$(obj)/UEFIPAYLOAD.fd" if EDK2_UEFIPAYLOAD
Sean Rhodes8da40ef2022-07-17 20:51:16 +01006 default "$(obj)/ShimmedUniversalPayload.elf" if EDK2_UNIVERSAL_PAYLOAD
Stefan Reinauer1a8b7bf2015-06-30 15:58:56 -07007 help
Matt DeVillierd3b49b42021-05-10 11:02:13 -05008 The result of a UefiPayloadPkg build
Stefan Reinauer1a8b7bf2015-06-30 15:58:56 -07009
Sean Rhodes8da40ef2022-07-17 20:51:16 +010010choice
11 prompt "EDK II build type"
12 default EDK2_UEFIPAYLOAD
13 help
14 Select the build type for edk2. UniversalPayload is recommended, as it is
15 replacing UefiPayloadPkg. Whilst in the transition phase between the two,
16 both options exist.
17
Sean Rhodes91564fc2022-07-22 10:10:38 +010018config EDK2_UEFIPAYLOAD
19 bool "Build UefiPayloadPkg"
Sean Rhodes91564fc2022-07-22 10:10:38 +010020 help
21 Build the standard UefiPayloadPkg
22
Sean Rhodes8da40ef2022-07-17 20:51:16 +010023config EDK2_UNIVERSAL_PAYLOAD
24 bool "Build Universal Payload"
25 help
26 Select this option if you want to build a coreboot image
27 with EDK2s Universal Payload. If you don't know what this is
28 about, just leave it enabled.
29
30 Universal Payload should ideally only be built from upstream EDK2,
31 https://github.com/tianocore/edk2, as this is regularly build tested
32 and it encourages patches to be merged upstream.
33
34 Whilst the required patches are being merged, this is pointed to
35 Star Labs GitHub repository which contains these patches and is based
36 on a known working commit.
37
38 See https://universalscalablefirmware.github.io/documentation/ for more information.
39
40endchoice
41
Martin Roth4769cc32016-06-02 16:42:29 -060042choice
Sean Rhodes38c99b52022-07-13 10:11:44 +010043 prompt "Tianocore's EDK II payload"
Sean Rhodes91564fc2022-07-22 10:10:38 +010044 default EDK2_REPO_MRCHROMEBOX
Martin Roth4769cc32016-06-02 16:42:29 -060045 help
Sean Rhodes38c99b52022-07-13 10:11:44 +010046 Select which type of payload edk2 will build (default is UefiPayload)
47 UefiPayload: MrChromebox's customized fork of edk2 which works on most
Matt DeVillierd3b49b42021-05-10 11:02:13 -050048 x86_64 devices
Sean Rhodes38c99b52022-07-13 10:11:44 +010049 Upstream: Use upstream edk2 payload from https://github.com/tianocore/edk2
Martin Roth4769cc32016-06-02 16:42:29 -060050
Sean Rhodes91564fc2022-07-22 10:10:38 +010051config EDK2_REPO_MRCHROMEBOX
52 bool "MrChromebox' edk2 fork"
Martin Roth4769cc32016-06-02 16:42:29 -060053 help
Sean Rhodes38c99b52022-07-13 10:11:44 +010054 Select this option to build using MrChromebox's custom edk2 fork,
Matt DeVillierd3b49b42021-05-10 11:02:13 -050055 which incorporates fixes/improvements from System 76's and 9elements' trees.
56
Sean Rhodes91564fc2022-07-22 10:10:38 +010057config EDK2_REPO_OFFICIAL
58 bool "Official edk2 repository"
Matt DeVillierd3b49b42021-05-10 11:02:13 -050059 help
Sean Rhodes91564fc2022-07-22 10:10:38 +010060 Select this option if you want to use the official edk2 repository to build
61 edk2.
Martin Roth4769cc32016-06-02 16:42:29 -060062
Sean Rhodesd7508752022-09-22 21:40:08 +010063 Please note, this option will not work on any SOC without modification.
64
Sean Rhodes91564fc2022-07-22 10:10:38 +010065config EDK2_REPO_CUSTOM
66 bool "Specify your own repository"
Sean Rhodes0884f2102022-02-04 07:41:16 +000067 help
68 Specify your own edk2 repository and branch to use.
69
Martin Roth4769cc32016-06-02 16:42:29 -060070endchoice
71
Sean Rhodes38c99b52022-07-13 10:11:44 +010072config EDK2_REPOSITORY
Sean Rhodes0884f2102022-02-04 07:41:16 +000073 string "URL to git repository for edk2"
Sean Rhodes8da40ef2022-07-17 20:51:16 +010074 default "https://github.com/starlabsltd/edk2" if EDK2_UNIVERSAL_PAYLOAD
Sean Rhodes91564fc2022-07-22 10:10:38 +010075 default "https://github.com/mrchromebox/edk2" if EDK2_REPO_MRCHROMEBOX
76 default "https://github.com/tianocore/edk2" if EDK2_REPO_OFFICIAL
77 default "" if EDK2_REPO_CUSTOM
Martin Roth4769cc32016-06-02 16:42:29 -060078 help
Sean Rhodes0884f2102022-02-04 07:41:16 +000079 coreboot supports an array of build options which can be found below. These options
80 will only have an effect if the relevant options exist in the target repository.
81
Sean Rhodes38c99b52022-07-13 10:11:44 +010082config EDK2_TAG_OR_REV
Sean Rhodes0884f2102022-02-04 07:41:16 +000083 string "Insert a commit's SHA-1 or a branch name"
Matt DeVillierb8fd41b2023-04-30 15:21:20 -050084 default "origin/uefipayload_202304" if EDK2_REPO_MRCHROMEBOX
Sean Rhodes8da40ef2022-07-17 20:51:16 +010085 default "origin/universalpayload" if EDK2_UNIVERSAL_PAYLOAD
Sean Rhodes91564fc2022-07-22 10:10:38 +010086 default "origin/master" if EDK2_REPO_OFFICIAL
87 default "" if EDK2_REPO_CUSTOM
Sean Rhodes0884f2102022-02-04 07:41:16 +000088 help
89 The commit's SHA-1 or branch name of the revision to use. This must exist in
Sean Rhodes38c99b52022-07-13 10:11:44 +010090 EDK2_REPOSITORY, and in the case of a branch name, prefixed with origin i.e.
Sean Rhodes0884f2102022-02-04 07:41:16 +000091 "origin/uefipayload_202202"
Martin Roth4769cc32016-06-02 16:42:29 -060092
Michał Żygowski82d814a2022-10-26 11:32:54 +020093config EDK2_USE_EDK2_PLATFORMS
94 bool "Use edk2-platforms repository"
95 default n
96 help
97 Clone edk2-platforms repository to the edk2 workspace for additional modules.
98
99if EDK2_USE_EDK2_PLATFORMS
100
101config EDK2_PLATFORMS_REPOSITORY
102 string "URL to git repository for edk2-platforms"
103 default "https://github.com/tianocore/edk2-platforms"
104 help
105 URL to the edk2-platfors repository to clone.
106
107config EDK2_PLATFORMS_TAG_OR_REV
108 string "Insert a commit's SHA-1 or a branch name"
109 default "origin/master"
110 help
111 The commit's SHA-1 or branch name of the revision to use. This must exist in
112 EDK2_PLATFORMS_REPOSITORY, and in the case of a branch name, prefixed with
113 origin i.e. "origin/master"
114
115endif
116
Martin Roth4769cc32016-06-02 16:42:29 -0600117choice
Sean Rhodes38c99b52022-07-13 10:11:44 +0100118 prompt "edk2 build"
119 default EDK2_RELEASE
Martin Roth4769cc32016-06-02 16:42:29 -0600120 help
121 Select whether to generate a debug or release build for
Sean Rhodes38c99b52022-07-13 10:11:44 +0100122 edk2; default is to generate a release build.
Martin Roth4769cc32016-06-02 16:42:29 -0600123
Sean Rhodes38c99b52022-07-13 10:11:44 +0100124config EDK2_DEBUG
125 bool "Generate edk2 debug build"
Martin Roth4769cc32016-06-02 16:42:29 -0600126 help
127 Generate a debug build.
128
Sean Rhodes38c99b52022-07-13 10:11:44 +0100129config EDK2_RELEASE
130 bool "Generate edk2 release build"
Martin Roth4769cc32016-06-02 16:42:29 -0600131 help
132 Generate a release build.
133
134endchoice
135
Sean Rhodes38c99b52022-07-13 10:11:44 +0100136config EDK2_BOOTSPLASH_FILE
137 string "edk2 Bootsplash path and filename"
Matt DeVillier7b087c02022-07-25 23:27:19 -0500138 default "Documentation/coreboot_logo.bmp"
Matt DeVillierff793412019-02-21 22:41:59 -0600139 help
Sean Rhodes108e5372022-07-15 13:58:52 +0100140 The path and filename of the file to use as graphical bootsplash
141 image. If this option is not configured, the default
Matt DeVillierff793412019-02-21 22:41:59 -0600142 coreboot logo (European Brown Hare) will used.
143
Sean Rhodes108e5372022-07-15 13:58:52 +0100144 You can use any image format supported by imagemagick, a list of which
145 can be found [here](https://imagemagick.org/script/formats.php).
Sean Rhodes0884f2102022-02-04 07:41:16 +0000146
Sean Rhodes108e5372022-07-15 13:58:52 +0100147 The build process will automatically convert this to the format that
Sean Rhodes38c99b52022-07-13 10:11:44 +0100148 edk2 requires, which is an uncompressed BMP, in BMP3 format. It does
Sean Rhodes108e5372022-07-15 13:58:52 +0100149 this using imagemagick (`convert splosh.bmp BMP3:splash.bmp`).
150
151 The newly formatted file will be the dimensions size as the original
152 one.
153
154 The build process will automatically do this conversion, so it can
155 be supplied with any format that imagemagick can process (which is
156 pretty much any!).
Felix Friedlander45ce8412021-01-08 16:37:40 +1100157
158 This image will also be used as the BGRT boot image, which may
Sean Rhodes0884f2102022-02-04 07:41:16 +0000159 persist through your OS boot process.
Felix Friedlander45ce8412021-01-08 16:37:40 +1100160
161 See ACPI spec 6.3, 5.2.22 Boot Graphics Resource Table (BGRT), and
162 Microsoft's documentation on BGRT positioning:
163 Docs/Windows/Windows Drivers/Bring up guide/Boot screen components
164
165 Accordingly, the image used should be no taller/wider than 40% of
166 the display panel's native pixel height/width (or resolution set).
Matt DeVillierff793412019-02-21 22:41:59 -0600167
168 If an absolute path is not given, the path will assumed to be
169 relative to the coreboot root directory.
170
Sean Rhodes38c99b52022-07-13 10:11:44 +0100171config EDK2_BOOT_MANAGER_ESCAPE
Sean Rhodesc8decce2022-02-09 08:25:39 +0000172 bool "Use Escape key for Boot Manager"
173 default n
174 help
175 Use Escape as the hot-key to access the Boot Manager. This replaces
176 the default key of F2.
177
Sean Rhodes38c99b52022-07-13 10:11:44 +0100178config EDK2_BOOT_TIMEOUT
Sean Rhodes63c6d812022-03-03 08:05:12 +0000179 int "Set the timeout for boot menu prompt"
Sean Rhodes0884f2102022-02-04 07:41:16 +0000180 default 2
Sean Rhodes766e4812021-07-12 19:35:51 +0100181 help
Sean Rhodes0884f2102022-02-04 07:41:16 +0000182 The length of time in seconds for which the boot splash/menu prompt will be displayed.
183 For boards with an internal display, the default value of 2s is generally sufficient.
184 For boards with an external display, a value of 5s is generally sufficient.
Sean Rhodes766e4812021-07-12 19:35:51 +0100185
Sean Rhodes38c99b52022-07-13 10:11:44 +0100186config EDK2_CBMEM_LOGGING
187 bool "Enable edk2 logging to CBMEM"
Sean Rhodes0884f2102022-02-04 07:41:16 +0000188 help
Sean Rhodes38c99b52022-07-13 10:11:44 +0100189 Select this option if you want to enable edk2 logging to CBMEM.
Sean Rhodes0884f2102022-02-04 07:41:16 +0000190 You may want to increase the default cbmem buffer size when selecting
191 this option, especially if using a debug (vs release) build.
192 Selecting this option will increase the payload size in CBFS by 0x10000.
Sean Rhodes766e4812021-07-12 19:35:51 +0100193
Sean Rhodes7bbc9a52022-07-18 11:31:00 +0100194config EDK2_CPU_TIMER_LIB
195 bool
196 default n
197 help
198 For recent Intel and AMD CPUs, the 0x15 CPUID instruction will return Time
199 Stamp Counter Frequence. For CPUs that do not support this instruction,
200 EDK2 must include a different library which is the reason why this must be
201 configured at build time.
202
203 If this is enabled, and the CPU doesn't support 0x15, it will fail to
204 boot. If it is not enabled, and the CPU does support 0x15, it will still
205 boot but without support for the leaf. Consequently, it is disabled by
206 default.
207
Sean Rhodes38c99b52022-07-13 10:11:44 +0100208config EDK2_FOLLOW_BGRT_SPEC
Sean Rhodes14d67b32022-02-09 08:27:29 +0000209 bool "Center logo 38.2% from the top of screen"
210 default n
211 help
212 Follow the BGRT Specification implemented by Microsoft and
Sean Rhodesf33ddb32022-02-09 08:30:07 +0000213 the Boot Logo 38.2% will be vertically centered 38.2% from
214 the top of the display.
215
Sean Rhodes38c99b52022-07-13 10:11:44 +0100216config EDK2_FULL_SCREEN_SETUP
Sean Rhodesc14bbbc2022-07-26 16:50:00 +0100217 bool "Use the full screen for the edk2 frontpage"
218 default y
219 help
220 Allow edk2 to use the full screen to display the frontpage
221 (aka "Boot Menu"). With this option disable, it will be
222 limited to 640x480.
223
Sean Rhodes38c99b52022-07-13 10:11:44 +0100224config EDK2_HAVE_EFI_SHELL
Sean Rhodesf33ddb32022-02-09 08:30:07 +0000225 bool "Include EFI Shell"
226 default y
227 help
228 Include the EFI shell Binary
Sean Rhodes14d67b32022-02-09 08:27:29 +0000229
Sean Rhodes38c99b52022-07-13 10:11:44 +0100230config EDK2_PRIORITIZE_INTERNAL
Sean Rhodes3f3a3ee2022-02-10 09:21:50 +0000231 bool "Prioritize internal boot devices"
232 default y
233 help
234 Prioritize internal boot devices over external devices
235
Sean Rhodes38c99b52022-07-13 10:11:44 +0100236config EDK2_PS2_SUPPORT
Sean Rhodes4600c252022-02-09 08:31:24 +0000237 bool "Support PS/2 Keyboards"
238 default y
239 help
240 Include support for PS/2 keyboards
241
Sean Rhodes38c99b52022-07-13 10:11:44 +0100242config EDK2_SD_MMC_TIMEOUT
Sean Rhodes8f296032022-07-13 08:09:59 +0100243 int "Timeout in ms for initializing SD and eMMC devices"
244 default 10
Sean Rhodes4a9be9f2022-02-13 21:19:19 +0000245 help
246 The amount of time allowed to initialize the SD Card reader and/or eMMC drive.
Sean Rhodes8f296032022-07-13 08:09:59 +0100247 Most only require 10ms, but certain readers can take 1s.
Sean Rhodes4a9be9f2022-02-13 21:19:19 +0000248
Sean Rhodes38c99b52022-07-13 10:11:44 +0100249config EDK2_SERIAL_SUPPORT
Sean Rhodes8e10a482022-07-04 17:01:09 +0100250 bool "Support serial output"
Sean Rhodes38c99b52022-07-13 10:11:44 +0100251 default y if EDK2_DEBUG
Sean Rhodes8e10a482022-07-04 17:01:09 +0100252 default n
253 help
254 Enable serial port output in edk2. Serial output limits the performance of edk2's
255 FrontPage.
256
Matt DeVilliera38e2482023-04-30 15:10:57 -0500257config EDK2_SECURE_BOOT_SUPPORT
258 bool "Enable UEFI Secure Boot support"
259 depends on EDK2_REPO_MRCHROMEBOX && SMMSTORE_V2
260 default y if EDK2_REPO_MRCHROMEBOX && SMMSTORE_V2
261 help
262 Select this option to enable UEFI SecureBoot support in edk2.
263 UEFI SecureBoot will be disabled by default and can be enabled from the menu option.
264
Sean Rhodes38c99b52022-07-13 10:11:44 +0100265config EDK2_CUSTOM_BUILD_PARAMS
266 string "edk2 additional custom build parameters"
Sean Rhodes91564fc2022-07-22 10:10:38 +0100267 default "-D VARIABLE_SUPPORT=SMMSTORE" if EDK2_REPO_MRCHROMEBOX && SMMSTORE_V2
Michał Żygowskiba08c492022-02-23 16:55:24 +0100268 help
Sean Rhodesc5055882022-07-27 21:41:54 +0100269 edk2 has build options that are not modified by coreboot, and these can be
270 found in `UefiPayloadPkg/UefiPayloadPkg.dsc`. Forks may also support
271 additional build options that should have been upstreamed but have not.
Michał Żygowskiba08c492022-02-23 16:55:24 +0100272
Sean Rhodesc5055882022-07-27 21:41:54 +0100273 This option can support both macros `-D` and Pcds `--pcd`.
Michał Żygowskiba08c492022-02-23 16:55:24 +0100274
Stefan Reinauer1a8b7bf2015-06-30 15:58:56 -0700275endif