payloads/ipxe/kconfig: Fix option name prefix
[coreboot.git] / payloads / external / Makefile.mk
blob53693f59174c36b57b4d482e61c03fdb6823d1d1
1 ## SPDX-License-Identifier: GPL-2.0-only
3 # set up payload config and version files for later inclusion
4 ifeq ($(CONFIG_PAYLOAD_BUILD_SEABIOS),y)
5 PAYLOAD_CONFIG=payloads/external/SeaBIOS/seabios/.config
6 PAYLOAD_VERSION=payloads/external/SeaBIOS/seabios/out/autoversion.h
7 endif
8 ifeq ($(CONFIG_PAYLOAD_FILO),y)
9 PAYLOAD_CONFIG=payloads/external/FILO/filo/.config
10 PAYLOAD_VERSION=payloads/external/FILO/filo/build/version.h
11 endif
12 ifeq ($(CONFIG_PAYLOAD_DEPTHCHARGE),y)
13 PAYLOAD_CONFIG=payloads/external/depthcharge/depthcharge/.config
14 $(PAYLOAD_CONFIG): payloads/external/depthcharge/depthcharge/build/depthcharge.elf
15 ifeq ($(call strip_quotes,$(CONFIG_MAINBOARD_DEPTHCHARGE)),)
16 BOARD=$(call ws_to_under,$(call strip_quotes,$(call tolower,$(CONFIG_MAINBOARD_PART_NUMBER))))
17 else
18 BOARD=$(CONFIG_MAINBOARD_DEPTHCHARGE)
19 endif
20 #TODO: Figure out version
21 endif
23 ifeq ($(CONFIG_PAYLOAD_LINUX)$(CONFIG_PAYLOAD_LINUXBOOT),y)
24 ifneq ($(strip $(call strip_quotes,$(CONFIG_LINUX_COMMAND_LINE))),)
25 ADDITIONAL_PAYLOAD_CONFIG+=-C $(CONFIG_LINUX_COMMAND_LINE)
26 endif
27 ifneq ($(strip $(call strip_quotes,$(CONFIG_LINUX_INITRD)$(CONFIG_LINUXBOOT_INITRAMFS_PATH))),)
28 ifneq ($(CONFIG_LINUXBOOT_ARM64),y)
29 ADDITIONAL_PAYLOAD_CONFIG+=-I $(CONFIG_LINUX_INITRD)$(CONFIG_LINUXBOOT_INITRAMFS_PATH)$(CONFIG_LINUXBOOT_INITRAMFS_SUFFIX)
30 prebuilt-files += $(strip $(call strip_quotes,$(CONFIG_LINUX_INITRD)$(CONFIG_LINUXBOOT_INITRAMFS)))
31 endif
32 endif
33 endif
34 ifneq ($(strip $(call strip_quotes,$(CONFIG_PAYLOAD_OPTIONS))),)
35 ADDITIONAL_PAYLOAD_CONFIG+=$(strip $(call strip_quotes,$(CONFIG_PAYLOAD_OPTIONS)))
36 endif
38 cbfs-files-y += $(CONFIG_CBFS_PREFIX)/payload
39 $(CONFIG_CBFS_PREFIX)/payload-file := $(CONFIG_PAYLOAD_FILE)
40 ifeq ($(CONFIG_PAYLOAD_IS_FLAT_BINARY),y)
41 $(CONFIG_CBFS_PREFIX)/payload-type := flat-binary
42 else
43 $(CONFIG_CBFS_PREFIX)/payload-type := payload
44 endif
45 $(CONFIG_CBFS_PREFIX)/payload-compression := $(CBFS_PAYLOAD_COMPRESS_FLAG)
46 $(CONFIG_CBFS_PREFIX)/payload-options := $(ADDITIONAL_PAYLOAD_CONFIG)
48 cbfs-files-$(CONFIG_INCLUDE_CONFIG_FILE) += payload_config
49 payload_config-file := $(PAYLOAD_CONFIG)
50 payload_config-type := raw
52 cbfs-files-$(CONFIG_INCLUDE_CONFIG_FILE) += payload_revision
53 payload_revision-file := $(PAYLOAD_VERSION)
54 payload_revision-type := raw
56 cbfs-files-$(CONFIG_GRUB2_INCLUDE_RUNTIME_CONFIG_FILE) += etc/grub.cfg
57 etc/grub.cfg-file := $(CONFIG_GRUB2_RUNTIME_CONFIG_FILE)
58 etc/grub.cfg-type := raw
59 etc/grub.cfg-required := the GRUB runtime configuration file ($(CONFIG_GRUB2_RUNTIME_CONFIG_FILE))
61 # SeaBIOS
63 SEABIOS_CC_OFFSET=$(if $(filter %ccache,$(HOSTCC)),2,1)
64 SEABIOS_TARGET_PATH=payloads/external/SeaBIOS/seabios/out/bios.bin.elf
65 $(SEABIOS_TARGET_PATH): $(DOTCONFIG)
66 $(MAKE) -C payloads/external/SeaBIOS \
67 HOSTCC="$(HOSTCC)" \
68 CC=$(word $(SEABIOS_CC_OFFSET),$(CC_x86_32)) \
69 CFLAGS="$(patsubst $(word $(SEABIOS_CC_OFFSET),$(CC_x86_32))%,,$(wordlist $(SEABIOS_CC_OFFSET),9999,$(CC_x86_32)))" \
70 LD=$(word 1,$(LD_x86_32)) LDFLAGS="$(patsubst $(word 1,$(LD_x86_32))%,,$(LD_x86_32))" \
71 OBJDUMP="$(OBJDUMP_x86_32)" \
72 OBJCOPY="$(OBJCOPY_x86_32)" STRIP="$(STRIP_x86_32)" \
73 AS="$(AS_x86_32)" IASL="$(IASL)" \
74 CONFIG_SEABIOS_MASTER=$(CONFIG_SEABIOS_MASTER) \
75 CONFIG_SEABIOS_STABLE=$(CONFIG_SEABIOS_STABLE) \
76 CONFIG_SEABIOS_REVISION=$(CONFIG_SEABIOS_REVISION) \
77 CONFIG_SEABIOS_REVISION_ID=$(CONFIG_SEABIOS_REVISION_ID) \
78 CONFIG_PAYLOAD_CONFIGFILE=$(CONFIG_PAYLOAD_CONFIGFILE) \
79 CONFIG_SEABIOS_THREAD_OPTIONROMS=$(CONFIG_SEABIOS_THREAD_OPTIONROMS) \
80 CONFIG_SEABIOS_VGA_COREBOOT=$(CONFIG_SEABIOS_VGA_COREBOOT) \
81 CONFIG_DRIVERS_UART_8250IO=$(CONFIG_DRIVERS_UART_8250IO) \
82 CONFIG_DRIVERS_UART_8250MEM=$(CONFIG_DRIVERS_UART_8250MEM) \
83 CONFIG_HUDSON_UART=$(CONFIG_HUDSON_UART) \
84 CONFIG_CONSOLE_SERIAL=$(CONFIG_CONSOLE_SERIAL) \
85 CONFIG_TTYS0_BASE=$(CONFIG_TTYS0_BASE) \
86 CONFIG_SEABIOS_DEBUG_LEVEL=$(CONFIG_SEABIOS_DEBUG_LEVEL) \
87 CONFIG_DRIVERS_UART_8250MEM_32=$(CONFIG_DRIVERS_UART_8250MEM_32) \
88 CONFIG_ENABLE_HSUART=$(CONFIG_ENABLE_HSUART) \
89 CONFIG_CONSOLE_UART_BASE_ADDRESS=$(CONFIG_CONSOLE_UART_BASE_ADDRESS) \
90 CONFIG_SEABIOS_HARDWARE_IRQ=$(CONFIG_SEABIOS_HARDWARE_IRQ)
92 payloads/external/SeaBIOS/seabios/out/vgabios.bin: $(SEABIOS_TARGET_PATH)
93 payloads/external/SeaBIOS/seabios/.config: $(SEABIOS_TARGET_PATH)
94 payloads/external/SeaBIOS/seabios/out/autoversion.h: $(SEABIOS_TARGET_PATH)
96 cbfs-files-$(CONFIG_SEABIOS_SECONDARY_PAYLOAD) += img/seabios
97 img/seabios-file := $(SEABIOS_TARGET_PATH)
98 img/seabios-type := payload
99 img/seabios-compression := $(CBFS_SECONDARY_PAYLOAD_COMPRESS_FLAG)
101 # add a SeaBIOS bootorder file
102 ifneq ($(strip $(CONFIG_SEABIOS_BOOTORDER_FILE)),)
103 cbfs-files-y += bootorder
104 bootorder-file := $(strip $(CONFIG_SEABIOS_BOOTORDER_FILE))
105 bootorder-type := raw
106 endif
108 ifneq ($(CONFIG_SEABIOS_PS2_TIMEOUT),)
109 ifneq ($(CONFIG_SEABIOS_PS2_TIMEOUT),0)
110 $(call add_intermediate, seabios_ps2_timeout, $(CBFSTOOL))
111 @printf " SeaBIOS Wait up to $(CONFIG_SEABIOS_PS2_TIMEOUT) ms for PS/2 keyboard controller initialization\n"
112 $(if $(CONFIG_UPDATE_IMAGE),-$(CBFSTOOL) $< remove -n etc/ps2-keyboard-spinup 2>/dev/null)
113 $(CBFSTOOL) $< add-int -i $(CONFIG_SEABIOS_PS2_TIMEOUT) -n etc/ps2-keyboard-spinup
114 endif
115 endif
117 ifeq ($(CONFIG_SEABIOS_ADD_SERCON_PORT_FILE),y)
118 $(call add_intermediate, seabios_sercon, $(CBFSTOOL))
119 @printf " SeaBIOS Add sercon-port file\n"
120 $(if $(CONFIG_UPDATE_IMAGE),-$(CBFSTOOL) $< remove -n etc/sercon-port 2>/dev/null)
121 $(CBFSTOOL) $< add-int -i $(CONFIG_SEABIOS_SERCON_PORT_ADDR) -n etc/sercon-port
122 endif
124 ifeq ($(CONFIG_SEABIOS_THREAD_OPTIONROMS),y)
125 $(call add_intermediate, seabios_thread_optionroms, $(CBFSTOOL))
126 @printf " SeaBIOS Thread optionroms\n"
127 $(if $(CONFIG_UPDATE_IMAGE),-$(CBFSTOOL) $< remove -n etc/threads 2>/dev/null)
128 $(CBFSTOOL) $< add-int -i 2 -n etc/threads
129 endif
131 ifeq ($(CONFIG_PAYLOAD_SEAGRUB),y)
132 ifneq ($(CONFIG_SEAGRUB_ALLOW_SEABIOS_BOOTMENU),y)
133 $(call add_intermediate, seabios_bootmenu, $(CBFSTOOL))
134 @printf " SeaBIOS Disable boot menu\n"
135 $(if $(CONFIG_UPDATE_IMAGE),-$(CBFSTOOL) $< remove -n etc/show-boot-menu 2>/dev/null)
136 $(CBFSTOOL) $< add-int -i 0 -n etc/show-boot-menu
137 else
138 $(call add_intermediate, seabios_bootmenu, $(CBFSTOOL))
139 $(if $(CONFIG_UPDATE_IMAGE),-$(CBFSTOOL) $< remove -n etc/show-boot-menu 2>/dev/null)
140 endif
141 endif
143 # Depthcharge
145 payloads/external/depthcharge/depthcharge/build/depthcharge.elf depthcharge: $(DOTCONFIG) $(CBFSTOOL)
146 $(MAKE) -C payloads/external/depthcharge \
147 BOARD=$(BOARD) \
148 MFLAGS= MAKEFLAGS= \
149 DEPTHCHARGE_REPO=$(CONFIG_DEPTHCHARGE_REPO) \
150 DEPTHCHARGE_BRANCH=$(CONFIG_DEPTHCHARGE_BRANCH) \
151 DEPTHCHARGE_MASTER=$(CONFIG_DEPTHCHARGE_MASTER) \
152 DEPTHCHARGE_STABLE=$(CONFIG_DEPTHCHARGE_STABLE) \
153 DEPTHCHARGE_REVISION=$(CONFIG_DEPTHCHARGE_REVISION) \
154 DEPTHCHARGE_REVISION_ID=$(CONFIG_DEPTHCHARGE_REVISION_ID) \
155 OVERRIDE_DEFCONFIG=$(CONFIG_LP_DEFCONFIG_OVERRIDE)
157 # edk2
159 $(obj)/UEFIPAYLOAD.fd: $(DOTCONFIG)
160 $(MAKE) -C payloads/external/edk2 UefiPayloadPkg \
161 HOSTCC="$(HOSTCC)" \
162 CC="$(HOSTCC)" \
163 CONFIG_EDK2_REPOSITORY=$(CONFIG_EDK2_REPOSITORY) \
164 CONFIG_EDK2_TAG_OR_REV=$(CONFIG_EDK2_TAG_OR_REV) \
165 CONFIG_EDK2_UEFIPAYLOAD=$(CONFIG_EDK2_UEFIPAYLOAD) \
166 CONFIG_EDK2_UNIVERSAL_PAYLOAD=$(CONFIG_EDK2_UNIVERSAL_PAYLOAD) \
167 CONFIG_EDK2_REPO_OFFICIAL=$(CONFIG_EDK2_REPO_OFFICIAL) \
168 CONFIG_EDK2_REPO_MRCHROMEBOX=$(CONFIG_EDK2_REPO_MRCHROMEBOX) \
169 CONFIG_EDK2_REPO_CUSTOM=$(CONFIG_EDK2_REPO_CUSTOM) \
170 CONFIG_EDK2_CPU_TIMER_LIB=$(CONFIG_EDK2_CPU_TIMER_LIB) \
171 CONFIG_EDK2_CUSTOM_BUILD_PARAMS=$(CONFIG_EDK2_CUSTOM_BUILD_PARAMS) \
172 CONFIG_EDK2_USE_EDK2_PLATFORMS=$(CONFIG_EDK2_USE_EDK2_PLATFORMS) \
173 CONFIG_EDK2_PLATFORMS_REPOSITORY=$(CONFIG_EDK2_PLATFORMS_REPOSITORY) \
174 CONFIG_EDK2_PLATFORMS_TAG_OR_REV=$(CONFIG_EDK2_PLATFORMS_TAG_OR_REV) \
175 CONFIG_EDK2_DEBUG=$(CONFIG_EDK2_DEBUG) \
176 CONFIG_EDK2_RELEASE=$(CONFIG_EDK2_RELEASE) \
177 CONFIG_EDK2_BOOTSPLASH_FILE=$(CONFIG_EDK2_BOOTSPLASH_FILE) \
178 CONFIG_EDK2_BOOT_MANAGER_ESCAPE=$(CONFIG_EDK2_BOOT_MANAGER_ESCAPE) \
179 CONFIG_EDK2_BOOT_TIMEOUT=$(CONFIG_EDK2_BOOT_TIMEOUT) \
180 CONFIG_EDK2_CBMEM_LOGGING=$(CONFIG_EDK2_CBMEM_LOGGING) \
181 CONFIG_EDK2_FOLLOW_BGRT_SPEC=$(CONFIG_EDK2_FOLLOW_BGRT_SPEC) \
182 CONFIG_EDK2_FULL_SCREEN_SETUP=$(CONFIG_EDK2_FULL_SCREEN_SETUP) \
183 CONFIG_EDK2_HAVE_EFI_SHELL=$(CONFIG_EDK2_HAVE_EFI_SHELL) \
184 CONFIG_EDK2_PRIORITIZE_INTERNAL=$(CONFIG_EDK2_PRIORITIZE_INTERNAL) \
185 CONFIG_EDK2_PS2_SUPPORT=$(CONFIG_EDK2_PS2_SUPPORT) \
186 CONFIG_EDK2_SERIAL_SUPPORT=$(CONFIG_EDK2_SERIAL_SUPPORT) \
187 CONFIG_EDK2_SD_MMC_TIMEOUT=$(CONFIG_EDK2_SD_MMC_TIMEOUT) \
188 CONFIG_ECAM_MMCONF_BASE_ADDRESS=$(CONFIG_ECAM_MMCONF_BASE_ADDRESS) \
189 CONFIG_ECAM_MMCONF_LENGTH=$(CONFIG_ECAM_MMCONF_LENGTH) \
190 CONFIG_PCIEXP_SUPPORT_RESIZABLE_BARS=$(CONFIG_PCIEXP_SUPPORT_RESIZABLE_BARS) \
191 CONFIG_CPU_XTAL_HZ=$(CONFIG_CPU_XTAL_HZ) \
192 CONFIG_SMMSTORE_V2=$(CONFIG_SMMSTORE_V2) \
193 CONFIG_EDK2_SECURE_BOOT_SUPPORT=$(CONFIG_EDK2_SECURE_BOOT_SUPPORT) \
194 CONFIG_EDK2_GOP_DRIVER=$(CONFIG_EDK2_GOP_DRIVER) \
195 CONFIG_EDK2_GOP_FILE=$(CONFIG_EDK2_GOP_FILE) \
196 CONFIG_INTEL_GMA_VBT_FILE=$(CONFIG_INTEL_GMA_VBT_FILE) \
197 CONFIG_EDK2_DISABLE_TPM=$(CONFIG_EDK2_DISABLE_TPM) \
198 CONFIG_EDK2_UFS_ENABLE=$(CONFIG_EDK2_UFS_ENABLE) \
199 CONFIG_EDK2_PCO_MMIO_EMMC=$(CONFIG_EDK2_PCO_MMIO_EMMC) \
200 CONFIG_EDK2_USE_LAPIC_TIMER=$(CONFIG_EDK2_USE_LAPIC_TIMER) \
201 GCC_CC_x86_32=$(GCC_CC_x86_32) \
202 GCC_CC_x86_64=$(GCC_CC_x86_64) \
203 GCC_CC_arm=$(GCC_CC_arm) \
204 GCC_CC_arm64=$(GCC_CC_arm64) \
205 OBJCOPY_x86_32=$(OBJCOPY_x86_32) \
206 OBJCOPY_x86_64=$(OBJCOPY_x86_64) \
207 OBJCOPY_arm=$(OBJCOPY_arm) \
208 OBJCOPY_arm64=$(OBJCOPY_arm64) \
209 MFLAGS= MAKEFLAGS=
211 $(obj)/ShimmedUniversalPayload.elf: $(DOTCONFIG)
212 $(MAKE) -C payloads/external/edk2 UniversalPayload \
213 HOSTCC="$(HOSTCC)" \
214 CC="$(HOSTCC)" \
215 CONFIG_EDK2_REPOSITORY=$(CONFIG_EDK2_REPOSITORY) \
216 CONFIG_EDK2_TAG_OR_REV=$(CONFIG_EDK2_TAG_OR_REV) \
217 CONFIG_EDK2_UEFIPAYLOAD=$(CONFIG_EDK2_UEFIPAYLOAD) \
218 CONFIG_EDK2_UNIVERSAL_PAYLOAD=$(CONFIG_EDK2_UNIVERSAL_PAYLOAD) \
219 CONFIG_EDK2_REPO_OFFICIAL=$(CONFIG_EDK2_REPO_OFFICIAL) \
220 CONFIG_EDK2_REPO_MRCHROMEBOX=$(CONFIG_EDK2_REPO_MRCHROMEBOX) \
221 CONFIG_EDK2_REPO_CUSTOM=$(CONFIG_EDK2_REPO_CUSTOM) \
222 CONFIG_EDK2_CPU_TIMER_LIB=$(CONFIG_EDK2_CPU_TIMER_LIB) \
223 CONFIG_EDK2_CUSTOM_BUILD_PARAMS=$(CONFIG_EDK2_CUSTOM_BUILD_PARAMS) \
224 CONFIG_EDK2_DEBUG=$(CONFIG_EDK2_DEBUG) \
225 CONFIG_EDK2_RELEASE=$(CONFIG_EDK2_RELEASE) \
226 CONFIG_EDK2_BOOTSPLASH_FILE=$(CONFIG_EDK2_BOOTSPLASH_FILE) \
227 CONFIG_EDK2_BOOT_MANAGER_ESCAPE=$(CONFIG_EDK2_BOOT_MANAGER_ESCAPE) \
228 CONFIG_EDK2_BOOT_TIMEOUT=$(CONFIG_EDK2_BOOT_TIMEOUT) \
229 CONFIG_EDK2_CBMEM_LOGGING=$(CONFIG_EDK2_CBMEM_LOGGING) \
230 CONFIG_EDK2_FOLLOW_BGRT_SPEC=$(CONFIG_EDK2_FOLLOW_BGRT_SPEC) \
231 CONFIG_EDK2_FULL_SCREEN_SETUP=$(CONFIG_EDK2_FULL_SCREEN_SETUP) \
232 CONFIG_EDK2_HAVE_EFI_SHELL=$(CONFIG_EDK2_HAVE_EFI_SHELL) \
233 CONFIG_EDK2_PRIORITIZE_INTERNAL=$(CONFIG_EDK2_PRIORITIZE_INTERNAL) \
234 CONFIG_EDK2_PS2_SUPPORT=$(CONFIG_EDK2_PS2_SUPPORT) \
235 CONFIG_EDK2_SERIAL_SUPPORT=$(CONFIG_EDK2_SERIAL_SUPPORT) \
236 CONFIG_EDK2_SD_MMC_TIMEOUT=$(CONFIG_EDK2_SD_MMC_TIMEOUT) \
237 CONFIG_EDK2_UNIVERSAL_PAYLOAD=$(CONFIG_EDK2_UNIVERSAL_PAYLOAD) \
238 CONFIG_ECAM_MMCONF_BASE_ADDRESS=$(CONFIG_ECAM_MMCONF_BASE_ADDRESS) \
239 CONFIG_ECAM_MMCONF_LENGTH=$(CONFIG_ECAM_MMCONF_LENGTH) \
240 CONFIG_CPU_XTAL_HZ=$(CONFIG_CPU_XTAL_HZ) \
241 CONFIG_SMMSTORE_V2=$(CONFIG_SMMSTORE_V2) \
242 GCC_CC_x86_32=$(GCC_CC_x86_32) \
243 GCC_CC_x86_64=$(GCC_CC_x86_64) \
244 GCC_CC_arm=$(GCC_CC_arm) \
245 GCC_CC_arm64=$(GCC_CC_arm64) \
246 OBJCOPY_x86_32=$(OBJCOPY_x86_32) \
247 OBJCOPY_x86_64=$(OBJCOPY_x86_64) \
248 OBJCOPY_arm=$(OBJCOPY_arm) \
249 OBJCOPY_arm64=$(OBJCOPY_arm64) \
250 MFLAGS= MAKEFLAGS=
252 # FILO
254 filo:
255 $(MAKE) -C payloads/external/FILO \
256 HOSTCC="$(HOSTCC)" \
257 CC="$(CC_x86_32)" LD="$(LD_x86_32)" OBJDUMP="$(OBJDUMP_x86_32)" \
258 OBJCOPY="$(OBJCOPY_x86_32)" STRIP="$(STRIP_x86_32)" \
259 CONFIG_FILO_MASTER=$(CONFIG_FILO_MASTER) \
260 CONFIG_FILO_STABLE=$(CONFIG_FILO_STABLE) \
261 CONFIG_FILO_USE_AUTOBOOT=$(CONFIG_FILO_USE_AUTOBOOT) \
262 CONFIG_FILO_AUTOBOOT_FILE=$(CONFIG_FILO_AUTOBOOT_FILE) \
263 CONFIG_FILO_AUTOBOOT_DELAY=$(CONFIG_FILO_AUTOBOOT_DELAY)
265 payloads/external/FILO/filo/build/filo.elf: filo
266 payloads/external/FILO/filo/.config: filo
267 payloads/external/FILO/filo/build/version.h: filo
269 # Grub
271 GRUB_TARGET_PATH=payloads/external/GRUB2/grub2/build/default_payload.elf
273 cbfs-files-$(CONFIG_GRUB2_SECONDARY_PAYLOAD) += img/grub2
274 img/grub2-file := $(GRUB_TARGET_PATH)
275 img/grub2-type := payload
276 img/grub2-compression := $(CBFS_SECONDARY_PAYLOAD_COMPRESS_FLAG)
278 grub2: $(obj)/config.h
279 $(MAKE) -C payloads/external/GRUB2 \
280 HOSTCC="$(HOSTCC)" \
281 CC="$(CC_x86_32)" LD="$(LD_x86_32)" \
282 OBJCOPY="$(OBJCOPY_x86_32)" STRIP="$(STRIP_x86_32)" \
283 CONFIG_DEP="$(abspath $(obj)/config.h)" \
284 CONFIG_GRUB2_STABLE=$(CONFIG_GRUB2_STABLE) \
285 CONFIG_GRUB2_MASTER=$(CONFIG_GRUB2_MASTER) \
286 CONFIG_GRUB2_REVISION=$(CONFIG_GRUB2_REVISION) \
287 CONFIG_GRUB2_REVISION_ID=$(CONFIG_GRUB2_REVISION_ID) \
288 CONFIG_GRUB2_EXTRA_MODULES=$(CONFIG_GRUB2_EXTRA_MODULES)
290 $(GRUB_TARGET_PATH): grub2
292 # U-Boot
294 payloads/external/U-Boot/build/u-boot.bin u-boot: $(DOTCONFIG)
295 $(MAKE) -C payloads/external/U-Boot \
296 STABLE_COMMIT_ID=$(CONFIG_UBOOT_STABLE_COMMIT_ID) \
297 CONFIG_UBOOT_MASTER=$(CONFIG_UBOOT_MASTER) \
298 CONFIG_UBOOT_STABLE=$(CONFIG_UBOOT_STABLE)
300 # TINT
302 payloads/external/tint/tint/tint.elf tint:
303 $(MAKE) -C payloads/external/tint
305 cbfs-files-$(CONFIG_TINT_SECONDARY_PAYLOAD) += img/tint
306 img/tint-file := payloads/external/tint/tint/tint.elf
307 img/tint-type := payload
308 img/tint-compression := $(CBFS_SECONDARY_PAYLOAD_COMPRESS_FLAG)
310 # Memtest86+
312 ifeq ($(CONFIG_MEMTEST86PLUS_V6),y)
313 memtest_dir:=memtest86plus_v6
314 else
315 memtest_dir:=memtest86plus_v5
316 endif
318 cbfs-files-$(CONFIG_MEMTEST_SECONDARY_PAYLOAD) += img/memtest
319 img/memtest-file := payloads/external/Memtest86Plus/$(memtest_dir)/memtest
320 img/memtest-type := payload
321 img/memtest-compression := $(CBFS_SECONDARY_PAYLOAD_COMPRESS_FLAG)
323 ifeq ($(CONFIG_CONSOLE_SERIAL)$(CONFIG_DRIVERS_UART_8250IO),yy)
324 MEMTEST_SERIAL_OPTIONS=SERIAL_CONSOLE_DEFAULT=1 \
325 SERIAL_TTY=$(CONFIG_UART_FOR_CONSOLE) \
326 SERIAL_BAUD_RATE=$(CONFIG_TTYS0_BAUD)
327 endif
329 payloads/external/Memtest86Plus/$(memtest_dir)/memtest: $(DOTCONFIG)
330 $(MAKE) -C payloads/external/Memtest86Plus all \
331 CC="$(CC_x86_32)" \
332 LD="$(LD_x86_32)" \
333 OBJCOPY="$(OBJCOPY_x86_32)" \
334 AS="$(AS_x86_32)" \
335 CONFIG_MEMTEST_REVISION=$(CONFIG_MEMTEST_REVISION) \
336 CONFIG_MEMTEST_REVISION_ID=$(CONFIG_MEMTEST_REVISION_ID) \
337 CONFIG_MEMTEST_MAIN=$(CONFIG_MEMTEST_MAIN) \
338 CONFIG_MEMTEST_STABLE=$(CONFIG_MEMTEST_STABLE) \
339 CONFIG_MEMTEST86PLUS_V5=$(CONFIG_MEMTEST86PLUS_V5) \
340 CONFIG_MEMTEST86PLUS_V6=$(CONFIG_MEMTEST86PLUS_V6) \
341 $(MEMTEST_SERIAL_OPTIONS) \
342 MFLAGS= MAKEFLAGS=
344 # iPXE
346 PXE_ROM_PCI_ID:=$(subst $(comma),,$(CONFIG_PXE_ROM_ID))
348 ifeq ($(CONFIG_PXE_ROM),y)
349 PXE_ROM_FILE:=$(call strip_quotes,$(CONFIG_PXE_ROM_FILE))
350 endif
351 ifeq ($(CONFIG_BUILD_IPXE),y)
352 PXE_ROM_FILE:=payloads/external/iPXE/ipxe/ipxe.rom
353 endif
354 ifeq ($(CONFIG_IPXE_ADD_SCRIPT),y)
355 IPXE_CONFIG_SCRIPT:=$(abspath $(patsubst "%",%,$(CONFIG_IPXE_SCRIPT)))
356 endif
357 ifeq ($(CONFIG_CONSOLE_SERIAL)$(CONFIG_DRIVERS_UART_8250IO),yy)
358 IPXE_UART=COM$(call int-add,$(CONFIG_UART_FOR_CONSOLE) 1)
359 endif
361 ifeq ($(CONFIG_IPXE_SERIAL_CONSOLE),y)
362 IPXE_SERIAL_CONSOLE = $(CONFIG_CONSOLE_SERIAL)$(CONFIG_DRIVERS_UART_8250IO)
363 else
364 IPXE_SERIAL_CONSOLE = n
365 endif
367 cbfs-files-$(CONFIG_PXE_ROM)$(CONFIG_BUILD_IPXE) += pci$(CONFIG_PXE_ROM_ID).rom
368 pci$(CONFIG_PXE_ROM_ID).rom-file := $(PXE_ROM_FILE)
369 pci$(CONFIG_PXE_ROM_ID).rom-type := raw
371 payloads/external/iPXE/ipxe/ipxe.rom ipxe: $(DOTCONFIG) $(IPXE_CONFIG_SCRIPT)
372 $(MAKE) -C payloads/external/iPXE all \
373 CROSS_COMPILE="$(CROSS_COMPILE_$(ARCH-ramstage-y))" \
374 PXE_ROM_PCI_ID=$(PXE_ROM_PCI_ID) \
375 CONFIG_IPXE_MASTER=$(CONFIG_IPXE_MASTER) \
376 CONFIG_IPXE_STABLE=$(CONFIG_IPXE_STABLE) \
377 CONSOLE_SERIAL=$(IPXE_SERIAL_CONSOLE) \
378 IPXE_UART=$(IPXE_UART) \
379 CONFIG_TTYS0_BAUD=$(CONFIG_TTYS0_BAUD) \
380 CONFIG_SCRIPT=$(IPXE_CONFIG_SCRIPT) \
381 CONFIG_HAS_SCRIPT=$(CONFIG_IPXE_ADD_SCRIPT) \
382 CONFIG_IPXE_NO_PROMPT=$(CONFIG_IPXE_NO_PROMPT) \
383 CONFIG_IPXE_HAS_HTTPS=$(CONFIG_IPXE_HAS_HTTPS) \
384 CONFIG_IPXE_TRUST_CMD=$(CONFIG_IPXE_TRUST_CMD)
386 # LinuxBoot
387 LINUXBOOT_CROSS_COMPILE_ARCH-$(CONFIG_LINUXBOOT_X86) = x86_32
388 LINUXBOOT_CROSS_COMPILE_ARCH-$(CONFIG_LINUXBOOT_X86_64) = x86_64
389 LINUXBOOT_CROSS_COMPILE_ARCH-$(CONFIG_LINUXBOOT_ARM) = arm
390 LINUXBOOT_CROSS_COMPILE_ARCH-$(CONFIG_LINUXBOOT_ARM64) = arm64
391 LINUXBOOT_CROSS_COMPILE_ARCH-$(CONFIG_LINUXBOOT_RISCV_RV32) = riscv
392 LINUXBOOT_CROSS_COMPILE_ARCH-$(CONFIG_LINUXBOOT_RISCV_RV64) = riscv
393 ifeq ($(CONFIG_LINUXBOOT_CROSS_COMPILE),"")
394 CONFIG_LINUXBOOT_CROSS_COMPILE=$(CROSS_COMPILE_$(LINUXBOOT_CROSS_COMPILE_ARCH-y))
395 endif
396 .PHONY: linuxboot
397 payloads/external/LinuxBoot/build/Image linuxboot:
398 $(MAKE) -C payloads/external/LinuxBoot \
399 CPUS=$(CPUS) \
400 CONFIG_LINUXBOOT_X86_64=$(CONFIG_LINUXBOOT_X86_64) \
401 CONFIG_LINUXBOOT_X86=$(CONFIG_LINUXBOOT_X86) \
402 CONFIG_LINUXBOOT_ARM=$(CONFIG_LINUXBOOT_ARM) \
403 CONFIG_LINUXBOOT_ARM64=$(CONFIG_LINUXBOOT_ARM64) \
404 CONFIG_LINUXBOOT_RISCV_RV32=$(CONFIG_LINUXBOOT_RISCV_RV32) \
405 CONFIG_LINUXBOOT_RISCV_RV64=$(CONFIG_LINUXBOOT_RISCV_RV64) \
406 CONFIG_LINUXBOOT_CROSS_COMPILE=$(CONFIG_LINUXBOOT_CROSS_COMPILE) \
407 CONFIG_LINUXBOOT_BUILD_INITRAMFS=$(CONFIG_LINUXBOOT_BUILD_INITRAMFS) \
408 CONFIG_LINUXBOOT_INITRAMFS_PATH=$(CONFIG_LINUXBOOT_INITRAMFS_PATH) \
409 CONFIG_LINUXBOOT_INITRAMFS_SUFFIX=$(CONFIG_LINUXBOOT_INITRAMFS_SUFFIX) \
410 CONFIG_LINUXBOOT_INITRAMFS_COMPRESSION_XZ=$(CONFIG_LINUXBOOT_INITRAMFS_COMPRESSION_XZ) \
411 CONFIG_LINUXBOOT_COMPILE_KERNEL=$(CONFIG_LINUXBOOT_COMPILE_KERNEL) \
412 CONFIG_LINUXBOOT_KERNEL_PATH=$(CONFIG_LINUXBOOT_KERNEL_PATH) \
413 CONFIG_LINUXBOOT_KERNEL_VERSION=$(CONFIG_LINUXBOOT_KERNEL_VERSION) \
414 CONFIG_LINUXBOOT_KERNEL_BZIMAGE=$(CONFIG_LINUXBOOT_KERNEL_BZIMAGE) \
415 CONFIG_LINUXBOOT_KERNEL_UIMAGE=$(CONFIG_LINUXBOOT_KERNEL_UIMAGE) \
416 CONFIG_LINUXBOOT_KERNEL_CONFIGFILE=$(CONFIG_LINUXBOOT_KERNEL_CONFIGFILE) \
417 CONFIG_LINUXBOOT_UROOT=$(CONFIG_LINUXBOOT_UROOT) \
418 CONFIG_LINUXBOOT_UROOT_VERSION=$(CONFIG_LINUXBOOT_UROOT_VERSION) \
419 CONFIG_LINUXBOOT_UROOT_FORMAT=$(CONFIG_LINUXBOOT_UROOT_FORMAT) \
420 CONFIG_LINUXBOOT_UROOT_INITCMD=$(CONFIG_LINUXBOOT_UROOT_INITCMD) \
421 CONFIG_LINUXBOOT_UROOT_UINITCMD=$(CONFIG_LINUXBOOT_UROOT_UINITCMD) \
422 CONFIG_LINUXBOOT_UROOT_SHELL=$(CONFIG_LINUXBOOT_UROOT_SHELL) \
423 CONFIG_LINUXBOOT_UROOT_COMMANDS=$(CONFIG_LINUXBOOT_UROOT_COMMANDS) \
424 CONFIG_LINUXBOOT_UROOT_FILES=$(CONFIG_LINUXBOOT_UROOT_FILES) \
425 CONFIG_LINUXBOOT_DTS_FILE=$(CONFIG_LINUXBOOT_DTS_FILE)
427 # BOOTBOOT
429 payloads/external/BOOTBOOT/bootboot/dist/bootbootcb.elf:
430 $(MAKE) -C payloads/external/BOOTBOOT all
432 # skiboot
434 payloads/external/skiboot/build/skiboot.elf:
435 $(MAKE) -C payloads/external/skiboot all \
436 CONFIG_SKIBOOT_GIT_REPO=$(CONFIG_SKIBOOT_GIT_REPO) \
437 CONFIG_SKIBOOT_REVISION=$(CONFIG_SKIBOOT_REVISION)
439 # leanefi
441 payloads/external/leanefi/leanefi/build/leanefi.elf: FORCE $(DOTCONFIG)
442 $(MAKE) -C payloads/external/leanefi
443 FORCE: ;
445 # COREDOOM
447 payloads/external/coreDOOM/coredoom/doomgeneric/coredoom.elf coredoom:
448 $(MAKE) -C payloads/external/coreDOOM
450 cbfs-files-$(CONFIG_COREDOOM_SECONDARY_PAYLOAD) += img/coreDOOM
451 img/coreDOOM-file := payloads/external/coreDOOM/coredoom/doomgeneric/coredoom.elf
452 img/coreDOOM-type := payload
453 img/coreDOOM-compression := $(CBFS_SECONDARY_PAYLOAD_COMPRESS_FLAG)
454 # WAD file
455 ifneq ($(strip $(CONFIG_COREDOOM_WAD_FILE)),)
456 cbfs-files-y += doom.wad
457 doom.wad-file := $(strip $(CONFIG_COREDOOM_WAD_FILE))
458 doom.wad-type := raw
459 doom.wad-compression := $(CBFS_SECONDARY_PAYLOAD_COMPRESS_FLAG)
460 endif