blob: 6dca09730b761be24574323f373838a8fd0b4cc0 [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
Stefan Reinauer1a8b7bf2015-06-30 15:58:56 -07006 help
Matt DeVillierd3b49b42021-05-10 11:02:13 -05007 The result of a UefiPayloadPkg build
Stefan Reinauer1a8b7bf2015-06-30 15:58:56 -07008
Sean Rhodes91564fc2022-07-22 10:10:38 +01009config EDK2_UEFIPAYLOAD
10 bool "Build UefiPayloadPkg"
11 default y
12 help
13 Build the standard UefiPayloadPkg
14
Martin Roth4769cc32016-06-02 16:42:29 -060015choice
Sean Rhodes38c99b52022-07-13 10:11:44 +010016 prompt "Tianocore's EDK II payload"
Sean Rhodes91564fc2022-07-22 10:10:38 +010017 default EDK2_REPO_MRCHROMEBOX
Martin Roth4769cc32016-06-02 16:42:29 -060018 help
Sean Rhodes38c99b52022-07-13 10:11:44 +010019 Select which type of payload edk2 will build (default is UefiPayload)
20 UefiPayload: MrChromebox's customized fork of edk2 which works on most
Matt DeVillierd3b49b42021-05-10 11:02:13 -050021 x86_64 devices
Sean Rhodes38c99b52022-07-13 10:11:44 +010022 Upstream: Use upstream edk2 payload from https://github.com/tianocore/edk2
Martin Roth4769cc32016-06-02 16:42:29 -060023
Sean Rhodes91564fc2022-07-22 10:10:38 +010024config EDK2_REPO_MRCHROMEBOX
25 bool "MrChromebox' edk2 fork"
Martin Roth4769cc32016-06-02 16:42:29 -060026 help
Sean Rhodes38c99b52022-07-13 10:11:44 +010027 Select this option to build using MrChromebox's custom edk2 fork,
Matt DeVillierd3b49b42021-05-10 11:02:13 -050028 which incorporates fixes/improvements from System 76's and 9elements' trees.
29
Sean Rhodes91564fc2022-07-22 10:10:38 +010030config EDK2_REPO_OFFICIAL
31 bool "Official edk2 repository"
Matt DeVillierd3b49b42021-05-10 11:02:13 -050032 help
Sean Rhodes91564fc2022-07-22 10:10:38 +010033 Select this option if you want to use the official edk2 repository to build
34 edk2.
Martin Roth4769cc32016-06-02 16:42:29 -060035
Sean Rhodesd7508752022-09-22 21:40:08 +010036 Please note, this option will not work on any SOC without modification.
37
Sean Rhodes91564fc2022-07-22 10:10:38 +010038config EDK2_REPO_CUSTOM
39 bool "Specify your own repository"
Sean Rhodes0884f2102022-02-04 07:41:16 +000040 help
41 Specify your own edk2 repository and branch to use.
42
Martin Roth4769cc32016-06-02 16:42:29 -060043endchoice
44
Sean Rhodes38c99b52022-07-13 10:11:44 +010045config EDK2_REPOSITORY
Sean Rhodes0884f2102022-02-04 07:41:16 +000046 string "URL to git repository for edk2"
Sean Rhodes91564fc2022-07-22 10:10:38 +010047 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 Roth4769cc32016-06-02 16:42:29 -060050 help
Sean Rhodes0884f2102022-02-04 07:41:16 +000051 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 Rhodes38c99b52022-07-13 10:11:44 +010054config EDK2_TAG_OR_REV
Sean Rhodes0884f2102022-02-04 07:41:16 +000055 string "Insert a commit's SHA-1 or a branch name"
Matt DeVillierb8fd41b2023-04-30 15:21:20 -050056 default "origin/uefipayload_202304" if EDK2_REPO_MRCHROMEBOX
Sean Rhodes91564fc2022-07-22 10:10:38 +010057 default "origin/master" if EDK2_REPO_OFFICIAL
58 default "" if EDK2_REPO_CUSTOM
Sean Rhodes0884f2102022-02-04 07:41:16 +000059 help
60 The commit's SHA-1 or branch name of the revision to use. This must exist in
Sean Rhodes38c99b52022-07-13 10:11:44 +010061 EDK2_REPOSITORY, and in the case of a branch name, prefixed with origin i.e.
Sean Rhodes0884f2102022-02-04 07:41:16 +000062 "origin/uefipayload_202202"
Martin Roth4769cc32016-06-02 16:42:29 -060063
Michał Żygowski82d814a2022-10-26 11:32:54 +020064config 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
70if EDK2_USE_EDK2_PLATFORMS
71
72config 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
78config 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
86endif
87
Martin Roth4769cc32016-06-02 16:42:29 -060088choice
Sean Rhodes38c99b52022-07-13 10:11:44 +010089 prompt "edk2 build"
90 default EDK2_RELEASE
Martin Roth4769cc32016-06-02 16:42:29 -060091 help
92 Select whether to generate a debug or release build for
Sean Rhodes38c99b52022-07-13 10:11:44 +010093 edk2; default is to generate a release build.
Martin Roth4769cc32016-06-02 16:42:29 -060094
Sean Rhodes38c99b52022-07-13 10:11:44 +010095config EDK2_DEBUG
96 bool "Generate edk2 debug build"
Martin Roth4769cc32016-06-02 16:42:29 -060097 help
98 Generate a debug build.
99
Sean Rhodes38c99b52022-07-13 10:11:44 +0100100config EDK2_RELEASE
101 bool "Generate edk2 release build"
Martin Roth4769cc32016-06-02 16:42:29 -0600102 help
103 Generate a release build.
104
105endchoice
106
Sean Rhodes38c99b52022-07-13 10:11:44 +0100107config EDK2_BOOTSPLASH_FILE
108 string "edk2 Bootsplash path and filename"
Matt DeVillier7b087c02022-07-25 23:27:19 -0500109 default "Documentation/coreboot_logo.bmp"
Matt DeVillierff793412019-02-21 22:41:59 -0600110 help
Sean Rhodes108e5372022-07-15 13:58:52 +0100111 The path and filename of the file to use as graphical bootsplash
112 image. If this option is not configured, the default
Matt DeVillierff793412019-02-21 22:41:59 -0600113 coreboot logo (European Brown Hare) will used.
114
Sean Rhodes108e5372022-07-15 13:58:52 +0100115 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 Rhodes0884f2102022-02-04 07:41:16 +0000117
Sean Rhodes108e5372022-07-15 13:58:52 +0100118 The build process will automatically convert this to the format that
Sean Rhodes38c99b52022-07-13 10:11:44 +0100119 edk2 requires, which is an uncompressed BMP, in BMP3 format. It does
Sean Rhodes108e5372022-07-15 13:58:52 +0100120 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 Friedlander45ce8412021-01-08 16:37:40 +1100128
129 This image will also be used as the BGRT boot image, which may
Sean Rhodes0884f2102022-02-04 07:41:16 +0000130 persist through your OS boot process.
Felix Friedlander45ce8412021-01-08 16:37:40 +1100131
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 DeVillierff793412019-02-21 22:41:59 -0600138
139 If an absolute path is not given, the path will assumed to be
140 relative to the coreboot root directory.
141
Sean Rhodes38c99b52022-07-13 10:11:44 +0100142config EDK2_BOOT_MANAGER_ESCAPE
Sean Rhodesc8decce2022-02-09 08:25:39 +0000143 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 Rhodes38c99b52022-07-13 10:11:44 +0100149config EDK2_BOOT_TIMEOUT
Sean Rhodes63c6d812022-03-03 08:05:12 +0000150 int "Set the timeout for boot menu prompt"
Sean Rhodes0884f2102022-02-04 07:41:16 +0000151 default 2
Sean Rhodes766e4812021-07-12 19:35:51 +0100152 help
Sean Rhodes0884f2102022-02-04 07:41:16 +0000153 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 Rhodes766e4812021-07-12 19:35:51 +0100156
Sean Rhodes38c99b52022-07-13 10:11:44 +0100157config EDK2_CBMEM_LOGGING
158 bool "Enable edk2 logging to CBMEM"
Sean Rhodes0884f2102022-02-04 07:41:16 +0000159 help
Sean Rhodes38c99b52022-07-13 10:11:44 +0100160 Select this option if you want to enable edk2 logging to CBMEM.
Sean Rhodes0884f2102022-02-04 07:41:16 +0000161 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 Rhodes766e4812021-07-12 19:35:51 +0100164
Sean Rhodes7bbc9a52022-07-18 11:31:00 +0100165config 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 Rhodes38c99b52022-07-13 10:11:44 +0100179config EDK2_FOLLOW_BGRT_SPEC
Sean Rhodes14d67b32022-02-09 08:27:29 +0000180 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 Rhodesf33ddb32022-02-09 08:30:07 +0000184 the Boot Logo 38.2% will be vertically centered 38.2% from
185 the top of the display.
186
Sean Rhodes38c99b52022-07-13 10:11:44 +0100187config EDK2_FULL_SCREEN_SETUP
Sean Rhodesc14bbbc2022-07-26 16:50:00 +0100188 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 Rhodes38c99b52022-07-13 10:11:44 +0100195config EDK2_HAVE_EFI_SHELL
Sean Rhodesf33ddb32022-02-09 08:30:07 +0000196 bool "Include EFI Shell"
197 default y
198 help
199 Include the EFI shell Binary
Sean Rhodes14d67b32022-02-09 08:27:29 +0000200
Sean Rhodes38c99b52022-07-13 10:11:44 +0100201config EDK2_PRIORITIZE_INTERNAL
Sean Rhodes3f3a3ee2022-02-10 09:21:50 +0000202 bool "Prioritize internal boot devices"
203 default y
204 help
205 Prioritize internal boot devices over external devices
206
Sean Rhodes38c99b52022-07-13 10:11:44 +0100207config EDK2_PS2_SUPPORT
Sean Rhodes4600c252022-02-09 08:31:24 +0000208 bool "Support PS/2 Keyboards"
209 default y
210 help
211 Include support for PS/2 keyboards
212
Sean Rhodes38c99b52022-07-13 10:11:44 +0100213config EDK2_SD_MMC_TIMEOUT
Sean Rhodes8f296032022-07-13 08:09:59 +0100214 int "Timeout in ms for initializing SD and eMMC devices"
215 default 10
Sean Rhodes4a9be9f2022-02-13 21:19:19 +0000216 help
217 The amount of time allowed to initialize the SD Card reader and/or eMMC drive.
Sean Rhodes8f296032022-07-13 08:09:59 +0100218 Most only require 10ms, but certain readers can take 1s.
Sean Rhodes4a9be9f2022-02-13 21:19:19 +0000219
Sean Rhodes38c99b52022-07-13 10:11:44 +0100220config EDK2_SERIAL_SUPPORT
Sean Rhodes8e10a482022-07-04 17:01:09 +0100221 bool "Support serial output"
Sean Rhodes38c99b52022-07-13 10:11:44 +0100222 default y if EDK2_DEBUG
Sean Rhodes8e10a482022-07-04 17:01:09 +0100223 default n
224 help
225 Enable serial port output in edk2. Serial output limits the performance of edk2's
226 FrontPage.
227
Matt DeVilliera38e2482023-04-30 15:10:57 -0500228config 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 Rhodes38c99b52022-07-13 10:11:44 +0100236config EDK2_CUSTOM_BUILD_PARAMS
237 string "edk2 additional custom build parameters"
Sean Rhodes91564fc2022-07-22 10:10:38 +0100238 default "-D VARIABLE_SUPPORT=SMMSTORE" if EDK2_REPO_MRCHROMEBOX && SMMSTORE_V2
Michał Żygowskiba08c492022-02-23 16:55:24 +0100239 help
Sean Rhodesc5055882022-07-27 21:41:54 +0100240 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ł Żygowskiba08c492022-02-23 16:55:24 +0100243
Sean Rhodesc5055882022-07-27 21:41:54 +0100244 This option can support both macros `-D` and Pcds `--pcd`.
Michał Żygowskiba08c492022-02-23 16:55:24 +0100245
Stefan Reinauer1a8b7bf2015-06-30 15:58:56 -0700246endif