Patrick Georgi | 8480c0b | 2020-05-08 22:50:46 +0200 | [diff] [blame] | 1 | ## SPDX-License-Identifier: GPL-2.0-only |
Stefan Reinauer | 0fa5d8f | 2015-06-30 17:09:17 -0700 | [diff] [blame] | 2 | |
Martin Roth | 7b928cd | 2015-06-19 20:50:59 -0600 | [diff] [blame] | 3 | # set up payload config and version files for later inclusion |
Bill XIE | 3dda4da | 2022-01-01 11:56:00 +0800 | [diff] [blame] | 4 | ifeq ($(CONFIG_PAYLOAD_BUILD_SEABIOS),y) |
Martin Roth | 7b928cd | 2015-06-19 20:50:59 -0600 | [diff] [blame] | 5 | PAYLOAD_CONFIG=payloads/external/SeaBIOS/seabios/.config |
Martin Roth | 886f478 | 2015-11-28 13:23:48 -0700 | [diff] [blame] | 6 | PAYLOAD_VERSION=payloads/external/SeaBIOS/seabios/out/autoversion.h |
Martin Roth | 7b928cd | 2015-06-19 20:50:59 -0600 | [diff] [blame] | 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 |
Stefan Reinauer | 9125073 | 2015-07-15 10:24:18 -0700 | [diff] [blame] | 12 | ifeq ($(CONFIG_PAYLOAD_DEPTHCHARGE),y) |
| 13 | PAYLOAD_CONFIG=payloads/external/depthcharge/depthcharge/.config |
Nico Huber | 45ccab3 | 2017-10-23 14:53:52 +0200 | [diff] [blame] | 14 | $(PAYLOAD_CONFIG): payloads/external/depthcharge/depthcharge/build/depthcharge.elf |
Selma BENSAID | a3a8ff9 | 2019-11-15 13:01:32 -0800 | [diff] [blame] | 15 | ifeq ($(call strip_quotes,$(CONFIG_MAINBOARD_DEPTHCHARGE)),) |
Selma BENSAID | b458a4f | 2019-09-20 17:38:59 -0700 | [diff] [blame] | 16 | BOARD=$(call ws_to_under,$(call strip_quotes,$(call tolower,$(CONFIG_MAINBOARD_PART_NUMBER)))) |
Selma BENSAID | 6aa81fa | 2019-10-25 11:36:17 -0700 | [diff] [blame] | 17 | else |
| 18 | BOARD=$(CONFIG_MAINBOARD_DEPTHCHARGE) |
Selma BENSAID | b458a4f | 2019-09-20 17:38:59 -0700 | [diff] [blame] | 19 | endif |
Stefan Reinauer | 9125073 | 2015-07-15 10:24:18 -0700 | [diff] [blame] | 20 | #TODO: Figure out version |
| 21 | endif |
Martin Roth | 7b928cd | 2015-06-19 20:50:59 -0600 | [diff] [blame] | 22 | |
Marcello Sylvester Bauer | a426669 | 2018-11-06 12:32:14 +0100 | [diff] [blame] | 23 | ifeq ($(CONFIG_PAYLOAD_LINUX)$(CONFIG_PAYLOAD_LINUXBOOT),y) |
Stefan Reinauer | 785a31d | 2016-04-13 13:13:02 -0700 | [diff] [blame] | 24 | ifneq ($(strip $(call strip_quotes,$(CONFIG_LINUX_COMMAND_LINE))),) |
| 25 | ADDITIONAL_PAYLOAD_CONFIG+=-C $(CONFIG_LINUX_COMMAND_LINE) |
| 26 | endif |
Patrick Rudolph | 354a245 | 2023-08-24 10:33:56 +0200 | [diff] [blame] | 27 | ifneq ($(strip $(call strip_quotes,$(CONFIG_LINUX_INITRD)$(CONFIG_LINUXBOOT_INITRAMFS_PATH))),) |
Marcello Sylvester Bauer | 78d0256 | 2018-11-11 18:03:26 +0100 | [diff] [blame] | 28 | ifneq ($(CONFIG_LINUXBOOT_ARM64),y) |
Patrick Rudolph | 354a245 | 2023-08-24 10:33:56 +0200 | [diff] [blame] | 29 | ADDITIONAL_PAYLOAD_CONFIG+=-I $(CONFIG_LINUX_INITRD)$(CONFIG_LINUXBOOT_INITRAMFS_PATH)$(CONFIG_LINUXBOOT_INITRAMFS_SUFFIX) |
Maximilian Brune | c202be7 | 2023-06-26 20:04:47 +0200 | [diff] [blame] | 30 | prebuilt-files += $(strip $(call strip_quotes,$(CONFIG_LINUX_INITRD)$(CONFIG_LINUXBOOT_INITRAMFS))) |
Marcello Sylvester Bauer | 78d0256 | 2018-11-11 18:03:26 +0100 | [diff] [blame] | 31 | endif |
Stefan Reinauer | 785a31d | 2016-04-13 13:13:02 -0700 | [diff] [blame] | 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 |
| 37 | |
Werner Zeh | bc2d151 | 2016-05-03 09:52:12 +0200 | [diff] [blame] | 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 |
Ronald G. Minnich | c6d1349 | 2018-05-15 18:05:07 -0700 | [diff] [blame] | 43 | $(CONFIG_CBFS_PREFIX)/payload-type := payload |
Werner Zeh | bc2d151 | 2016-05-03 09:52:12 +0200 | [diff] [blame] | 44 | endif |
| 45 | $(CONFIG_CBFS_PREFIX)/payload-compression := $(CBFS_PAYLOAD_COMPRESS_FLAG) |
| 46 | $(CONFIG_CBFS_PREFIX)/payload-options := $(ADDITIONAL_PAYLOAD_CONFIG) |
| 47 | |
Martin Roth | d4c2484 | 2015-12-16 16:09:11 -0700 | [diff] [blame] | 48 | cbfs-files-$(CONFIG_INCLUDE_CONFIG_FILE) += payload_config |
| 49 | payload_config-file := $(PAYLOAD_CONFIG) |
| 50 | payload_config-type := raw |
| 51 | |
| 52 | cbfs-files-$(CONFIG_INCLUDE_CONFIG_FILE) += payload_revision |
| 53 | payload_revision-file := $(PAYLOAD_VERSION) |
| 54 | payload_revision-type := raw |
| 55 | |
Denis 'GNUtoo' Carikli | 8fb72c9 | 2017-01-08 06:43:01 +0100 | [diff] [blame] | 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)) |
| 60 | |
Martin Roth | 9369e10 | 2016-10-17 10:11:10 -0600 | [diff] [blame] | 61 | # SeaBIOS |
| 62 | |
Patrick Georgi | c983671 | 2015-08-08 21:35:38 +0200 | [diff] [blame] | 63 | SEABIOS_CC_OFFSET=$(if $(filter %ccache,$(HOSTCC)),2,1) |
Bill XIE | 3dda4da | 2022-01-01 11:56:00 +0800 | [diff] [blame] | 64 | SEABIOS_TARGET_PATH=payloads/external/SeaBIOS/seabios/out/bios.bin.elf |
| 65 | $(SEABIOS_TARGET_PATH): $(DOTCONFIG) |
Martin Roth | c8ed340 | 2016-03-16 10:39:30 -0600 | [diff] [blame] | 66 | $(MAKE) -C payloads/external/SeaBIOS \ |
Stefan Reinauer | 0fa5d8f | 2015-06-30 17:09:17 -0700 | [diff] [blame] | 67 | HOSTCC="$(HOSTCC)" \ |
Martin Roth | 342cf7f | 2016-03-07 22:04:01 -0700 | [diff] [blame] | 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)))" \ |
Stefan Reinauer | 0fa5d8f | 2015-06-30 17:09:17 -0700 | [diff] [blame] | 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) \ |
Antonello Dettori | 3aa91dc | 2016-03-07 23:56:57 +0000 | [diff] [blame] | 76 | CONFIG_SEABIOS_REVISION=$(CONFIG_SEABIOS_REVISION) \ |
| 77 | CONFIG_SEABIOS_REVISION_ID=$(CONFIG_SEABIOS_REVISION_ID) \ |
Martin Roth | 99d05c7 | 2015-11-28 15:44:34 -0700 | [diff] [blame] | 78 | CONFIG_PAYLOAD_CONFIGFILE=$(CONFIG_PAYLOAD_CONFIGFILE) \ |
Stefan Reinauer | 0fa5d8f | 2015-06-30 17:09:17 -0700 | [diff] [blame] | 79 | CONFIG_SEABIOS_THREAD_OPTIONROMS=$(CONFIG_SEABIOS_THREAD_OPTIONROMS) \ |
| 80 | CONFIG_SEABIOS_VGA_COREBOOT=$(CONFIG_SEABIOS_VGA_COREBOOT) \ |
Martin Roth | f80331f | 2016-02-06 12:47:05 -0700 | [diff] [blame] | 81 | CONFIG_DRIVERS_UART_8250IO=$(CONFIG_DRIVERS_UART_8250IO) \ |
Ricardo Ribalda Delgado | 77ced40 | 2017-01-03 11:56:22 +0100 | [diff] [blame] | 82 | CONFIG_DRIVERS_UART_8250MEM=$(CONFIG_DRIVERS_UART_8250MEM) \ |
| 83 | CONFIG_HUDSON_UART=$(CONFIG_HUDSON_UART) \ |
Stefan Reinauer | 0fa5d8f | 2015-06-30 17:09:17 -0700 | [diff] [blame] | 84 | CONFIG_CONSOLE_SERIAL=$(CONFIG_CONSOLE_SERIAL) \ |
Stefan Tauner | c48d791 | 2017-01-15 11:49:25 +0100 | [diff] [blame] | 85 | CONFIG_TTYS0_BASE=$(CONFIG_TTYS0_BASE) \ |
Philipp Deppenwiese | d8b4139 | 2017-11-29 16:58:05 +0100 | [diff] [blame] | 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) \ |
Michał Żygowski | 6d592c6 | 2020-05-07 15:14:24 +0200 | [diff] [blame] | 89 | CONFIG_CONSOLE_UART_BASE_ADDRESS=$(CONFIG_CONSOLE_UART_BASE_ADDRESS) \ |
| 90 | CONFIG_SEABIOS_HARDWARE_IRQ=$(CONFIG_SEABIOS_HARDWARE_IRQ) |
Stefan Reinauer | 0fa5d8f | 2015-06-30 17:09:17 -0700 | [diff] [blame] | 91 | |
Bill XIE | 3dda4da | 2022-01-01 11:56:00 +0800 | [diff] [blame] | 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) |
| 95 | |
| 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) |
Patrick Georgi | 4013469 | 2015-11-30 20:00:33 +0100 | [diff] [blame] | 100 | |
Martin Roth | bc46ac5 | 2016-06-05 10:30:34 -0600 | [diff] [blame] | 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 |
| 107 | |
Arthur Heymans | 14ca740 | 2020-10-14 16:46:02 +0200 | [diff] [blame] | 108 | ifneq ($(CONFIG_SEABIOS_PS2_TIMEOUT),) |
| 109 | ifneq ($(CONFIG_SEABIOS_PS2_TIMEOUT),0) |
Patrick Georgi | 2cc5bcb | 2021-01-13 09:15:07 +0100 | [diff] [blame] | 110 | $(call add_intermediate, seabios_ps2_timeout, $(CBFSTOOL)) |
Arthur Heymans | 14ca740 | 2020-10-14 16:46:02 +0200 | [diff] [blame] | 111 | @printf " SeaBIOS Wait up to $(CONFIG_SEABIOS_PS2_TIMEOUT) ms for PS/2 keyboard controller initialization\n" |
Arthur Heymans | c6bdabd | 2020-12-24 12:15:38 +0100 | [diff] [blame] | 112 | $(if $(CONFIG_UPDATE_IMAGE),-$(CBFSTOOL) $< remove -n etc/ps2-keyboard-spinup 2>/dev/null) |
Arthur Heymans | 14ca740 | 2020-10-14 16:46:02 +0200 | [diff] [blame] | 113 | $(CBFSTOOL) $< add-int -i $(CONFIG_SEABIOS_PS2_TIMEOUT) -n etc/ps2-keyboard-spinup |
| 114 | endif |
| 115 | endif |
Arthur Heymans | 14ca740 | 2020-10-14 16:46:02 +0200 | [diff] [blame] | 116 | |
| 117 | ifeq ($(CONFIG_SEABIOS_ADD_SERCON_PORT_FILE),y) |
Patrick Georgi | 2cc5bcb | 2021-01-13 09:15:07 +0100 | [diff] [blame] | 118 | $(call add_intermediate, seabios_sercon, $(CBFSTOOL)) |
Arthur Heymans | 14ca740 | 2020-10-14 16:46:02 +0200 | [diff] [blame] | 119 | @printf " SeaBIOS Add sercon-port file\n" |
Arthur Heymans | c6bdabd | 2020-12-24 12:15:38 +0100 | [diff] [blame] | 120 | $(if $(CONFIG_UPDATE_IMAGE),-$(CBFSTOOL) $< remove -n etc/sercon-port 2>/dev/null) |
Angel Pons | 6d4de7e | 2020-11-20 18:28:38 +0100 | [diff] [blame] | 121 | $(CBFSTOOL) $< add-int -i $(CONFIG_SEABIOS_SERCON_PORT_ADDR) -n etc/sercon-port |
Arthur Heymans | 14ca740 | 2020-10-14 16:46:02 +0200 | [diff] [blame] | 122 | endif |
| 123 | |
| 124 | ifeq ($(CONFIG_SEABIOS_THREAD_OPTIONROMS),y) |
Patrick Georgi | 2cc5bcb | 2021-01-13 09:15:07 +0100 | [diff] [blame] | 125 | $(call add_intermediate, seabios_thread_optionroms, $(CBFSTOOL)) |
Arthur Heymans | 14ca740 | 2020-10-14 16:46:02 +0200 | [diff] [blame] | 126 | @printf " SeaBIOS Thread optionroms\n" |
Arthur Heymans | c6bdabd | 2020-12-24 12:15:38 +0100 | [diff] [blame] | 127 | $(if $(CONFIG_UPDATE_IMAGE),-$(CBFSTOOL) $< remove -n etc/threads 2>/dev/null) |
Angel Pons | 6d4de7e | 2020-11-20 18:28:38 +0100 | [diff] [blame] | 128 | $(CBFSTOOL) $< add-int -i 2 -n etc/threads |
Arthur Heymans | 14ca740 | 2020-10-14 16:46:02 +0200 | [diff] [blame] | 129 | endif |
| 130 | |
Bill XIE | 3dda4da | 2022-01-01 11:56:00 +0800 | [diff] [blame] | 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 |
| 142 | |
Martin Roth | 9369e10 | 2016-10-17 10:11:10 -0600 | [diff] [blame] | 143 | # Depthcharge |
| 144 | |
Paul Kocialkowski | fde3275 | 2016-07-24 12:25:07 +0200 | [diff] [blame] | 145 | payloads/external/depthcharge/depthcharge/build/depthcharge.elf depthcharge: $(DOTCONFIG) $(CBFSTOOL) |
Martin Roth | c8ed340 | 2016-03-16 10:39:30 -0600 | [diff] [blame] | 146 | $(MAKE) -C payloads/external/depthcharge \ |
Selma BENSAID | b458a4f | 2019-09-20 17:38:59 -0700 | [diff] [blame] | 147 | BOARD=$(BOARD) \ |
Marshall Dawson | f9973b5 | 2016-12-22 18:16:48 -0500 | [diff] [blame] | 148 | MFLAGS= MAKEFLAGS= \ |
Cliff Huang | fa97970 | 2024-02-22 15:45:26 -0800 | [diff] [blame] | 149 | DEPTHCHARGE_REPO=$(CONFIG_DEPTHCHARGE_REPO) \ |
| 150 | DEPTHCHARGE_BRANCH=$(CONFIG_DEPTHCHARGE_BRANCH) \ |
Marshall Dawson | f9973b5 | 2016-12-22 18:16:48 -0500 | [diff] [blame] | 151 | DEPTHCHARGE_MASTER=$(CONFIG_DEPTHCHARGE_MASTER) \ |
| 152 | DEPTHCHARGE_STABLE=$(CONFIG_DEPTHCHARGE_STABLE) \ |
| 153 | DEPTHCHARGE_REVISION=$(CONFIG_DEPTHCHARGE_REVISION) \ |
Marshall Dawson | fc18507 | 2016-12-22 20:25:29 -0500 | [diff] [blame] | 154 | DEPTHCHARGE_REVISION_ID=$(CONFIG_DEPTHCHARGE_REVISION_ID) \ |
| 155 | OVERRIDE_DEFCONFIG=$(CONFIG_LP_DEFCONFIG_OVERRIDE) |
Stefan Reinauer | 9125073 | 2015-07-15 10:24:18 -0700 | [diff] [blame] | 156 | |
Sean Rhodes | 38c99b5 | 2022-07-13 10:11:44 +0100 | [diff] [blame] | 157 | # edk2 |
Martin Roth | 4769cc3 | 2016-06-02 16:42:29 -0600 | [diff] [blame] | 158 | |
Sean Rhodes | 306550d | 2022-08-02 09:12:13 +0100 | [diff] [blame] | 159 | $(obj)/UEFIPAYLOAD.fd: $(DOTCONFIG) |
| 160 | $(MAKE) -C payloads/external/edk2 UefiPayloadPkg \ |
Martin Roth | 4769cc3 | 2016-06-02 16:42:29 -0600 | [diff] [blame] | 161 | HOSTCC="$(HOSTCC)" \ |
| 162 | CC="$(HOSTCC)" \ |
Sean Rhodes | 38c99b5 | 2022-07-13 10:11:44 +0100 | [diff] [blame] | 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) \ |
Sean Rhodes | 8da40ef | 2022-07-17 20:51:16 +0100 | [diff] [blame] | 166 | CONFIG_EDK2_UNIVERSAL_PAYLOAD=$(CONFIG_EDK2_UNIVERSAL_PAYLOAD) \ |
Sean Rhodes | 91564fc | 2022-07-22 10:10:38 +0100 | [diff] [blame] | 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) \ |
Sean Rhodes | 7bbc9a5 | 2022-07-18 11:31:00 +0100 | [diff] [blame] | 170 | CONFIG_EDK2_CPU_TIMER_LIB=$(CONFIG_EDK2_CPU_TIMER_LIB) \ |
Sean Rhodes | 38c99b5 | 2022-07-13 10:11:44 +0100 | [diff] [blame] | 171 | CONFIG_EDK2_CUSTOM_BUILD_PARAMS=$(CONFIG_EDK2_CUSTOM_BUILD_PARAMS) \ |
Michał Żygowski | 82d814a | 2022-10-26 11:32:54 +0200 | [diff] [blame] | 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) \ |
Sean Rhodes | 38c99b5 | 2022-07-13 10:11:44 +0100 | [diff] [blame] | 175 | CONFIG_EDK2_DEBUG=$(CONFIG_EDK2_DEBUG) \ |
| 176 | CONFIG_EDK2_RELEASE=$(CONFIG_EDK2_RELEASE) \ |
Sean Rhodes | 38c99b5 | 2022-07-13 10:11:44 +0100 | [diff] [blame] | 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) \ |
Sean Rhodes | 0884f210 | 2022-02-04 07:41:16 +0000 | [diff] [blame] | 188 | CONFIG_ECAM_MMCONF_BASE_ADDRESS=$(CONFIG_ECAM_MMCONF_BASE_ADDRESS) \ |
Sean Rhodes | 5a26d81 | 2022-07-04 21:44:32 +0100 | [diff] [blame] | 189 | CONFIG_ECAM_MMCONF_LENGTH=$(CONFIG_ECAM_MMCONF_LENGTH) \ |
Lean Sheng Tan | 829b228 | 2023-05-03 15:27:21 +0200 | [diff] [blame] | 190 | CONFIG_PCIEXP_SUPPORT_RESIZABLE_BARS=$(CONFIG_PCIEXP_SUPPORT_RESIZABLE_BARS) \ |
Sean Rhodes | 7bbc9a5 | 2022-07-18 11:31:00 +0100 | [diff] [blame] | 191 | CONFIG_CPU_XTAL_HZ=$(CONFIG_CPU_XTAL_HZ) \ |
Sean Rhodes | 15d75aa | 2023-07-06 11:00:06 +0100 | [diff] [blame] | 192 | CONFIG_SMMSTORE_V2=$(CONFIG_SMMSTORE_V2) \ |
Matt DeVillier | a38e248 | 2023-04-30 15:10:57 -0500 | [diff] [blame] | 193 | CONFIG_EDK2_SECURE_BOOT_SUPPORT=$(CONFIG_EDK2_SECURE_BOOT_SUPPORT) \ |
Matt DeVillier | 64262a6 | 2022-08-18 18:05:54 -0500 | [diff] [blame] | 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) \ |
Matt DeVillier | fd42148 | 2023-09-20 11:27:20 -0500 | [diff] [blame] | 197 | CONFIG_EDK2_DISABLE_TPM=$(CONFIG_EDK2_DISABLE_TPM) \ |
Matt DeVillier | 71d8f7c | 2024-03-09 09:20:18 -0600 | [diff] [blame] | 198 | CONFIG_EDK2_UFS_ENABLE=$(CONFIG_EDK2_UFS_ENABLE) \ |
Matt DeVillier | 63359d1 | 2024-04-12 11:20:54 -0500 | [diff] [blame] | 199 | CONFIG_EDK2_PCO_MMIO_EMMC=$(CONFIG_EDK2_PCO_MMIO_EMMC) \ |
Jean Lucas | 63ca402 | 2024-04-19 10:31:43 -0400 | [diff] [blame] | 200 | CONFIG_EDK2_USE_LAPIC_TIMER=$(CONFIG_EDK2_USE_LAPIC_TIMER) \ |
Martin Roth | 4769cc3 | 2016-06-02 16:42:29 -0600 | [diff] [blame] | 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= |
| 210 | |
Sean Rhodes | 27c8bf0 | 2022-07-17 19:01:29 +0100 | [diff] [blame] | 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) \ |
Sean Rhodes | 8da40ef | 2022-07-17 20:51:16 +0100 | [diff] [blame] | 218 | CONFIG_EDK2_UNIVERSAL_PAYLOAD=$(CONFIG_EDK2_UNIVERSAL_PAYLOAD) \ |
Sean Rhodes | 27c8bf0 | 2022-07-17 19:01:29 +0100 | [diff] [blame] | 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) \ |
Sean Rhodes | 7bbc9a5 | 2022-07-18 11:31:00 +0100 | [diff] [blame] | 222 | CONFIG_EDK2_CPU_TIMER_LIB=$(CONFIG_EDK2_CPU_TIMER_LIB) \ |
Sean Rhodes | 27c8bf0 | 2022-07-17 19:01:29 +0100 | [diff] [blame] | 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) \ |
Sean Rhodes | 27c8bf0 | 2022-07-17 19:01:29 +0100 | [diff] [blame] | 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) \ |
Sean Rhodes | 7bbc9a5 | 2022-07-18 11:31:00 +0100 | [diff] [blame] | 240 | CONFIG_CPU_XTAL_HZ=$(CONFIG_CPU_XTAL_HZ) \ |
Sean Rhodes | 15d75aa | 2023-07-06 11:00:06 +0100 | [diff] [blame] | 241 | CONFIG_SMMSTORE_V2=$(CONFIG_SMMSTORE_V2) \ |
Sean Rhodes | 27c8bf0 | 2022-07-17 19:01:29 +0100 | [diff] [blame] | 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= |
| 251 | |
Martin Roth | 9369e10 | 2016-10-17 10:11:10 -0600 | [diff] [blame] | 252 | # FILO |
| 253 | |
Stefan Reinauer | 0fa5d8f | 2015-06-30 17:09:17 -0700 | [diff] [blame] | 254 | filo: |
Martin Roth | c8ed340 | 2016-03-16 10:39:30 -0600 | [diff] [blame] | 255 | $(MAKE) -C payloads/external/FILO \ |
Stefan Reinauer | 0fa5d8f | 2015-06-30 17:09:17 -0700 | [diff] [blame] | 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) \ |
Paul Menzel | f72568c | 2021-07-08 19:16:17 +0200 | [diff] [blame] | 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) |
Stefan Reinauer | 0fa5d8f | 2015-06-30 17:09:17 -0700 | [diff] [blame] | 264 | |
Patrick Georgi | 864b48d | 2015-12-04 16:52:18 +0100 | [diff] [blame] | 265 | payloads/external/FILO/filo/build/filo.elf: filo |
Patrick Georgi | 67e11d1 | 2016-01-14 20:41:58 +0100 | [diff] [blame] | 266 | payloads/external/FILO/filo/.config: filo |
| 267 | payloads/external/FILO/filo/build/version.h: filo |
Stefan Reinauer | 0fa5d8f | 2015-06-30 17:09:17 -0700 | [diff] [blame] | 268 | |
Martin Roth | 9369e10 | 2016-10-17 10:11:10 -0600 | [diff] [blame] | 269 | # Grub |
| 270 | |
Bill XIE | 3dda4da | 2022-01-01 11:56:00 +0800 | [diff] [blame] | 271 | GRUB_TARGET_PATH=payloads/external/GRUB2/grub2/build/default_payload.elf |
| 272 | |
| 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) |
| 277 | |
Nico Huber | 4ff4492 | 2017-08-14 01:58:28 +0200 | [diff] [blame] | 278 | grub2: $(obj)/config.h |
Martin Roth | c8ed340 | 2016-03-16 10:39:30 -0600 | [diff] [blame] | 279 | $(MAKE) -C payloads/external/GRUB2 \ |
Stefan Reinauer | 0fa5d8f | 2015-06-30 17:09:17 -0700 | [diff] [blame] | 280 | HOSTCC="$(HOSTCC)" \ |
Nico Huber | a2ab1fd | 2017-08-14 01:38:24 +0200 | [diff] [blame] | 281 | CC="$(CC_x86_32)" LD="$(LD_x86_32)" \ |
Stefan Reinauer | 0fa5d8f | 2015-06-30 17:09:17 -0700 | [diff] [blame] | 282 | OBJCOPY="$(OBJCOPY_x86_32)" STRIP="$(STRIP_x86_32)" \ |
Nico Huber | 4ff4492 | 2017-08-14 01:58:28 +0200 | [diff] [blame] | 283 | CONFIG_DEP="$(abspath $(obj)/config.h)" \ |
Jonathan Neuschäfer | 2eb95f3 | 2017-11-20 01:56:41 +0100 | [diff] [blame] | 284 | CONFIG_GRUB2_STABLE=$(CONFIG_GRUB2_STABLE) \ |
Benjamin Barenblat | 9993286 | 2016-06-15 12:08:06 -0700 | [diff] [blame] | 285 | CONFIG_GRUB2_MASTER=$(CONFIG_GRUB2_MASTER) \ |
Denis 'GNUtoo' Carikli | 08cf195 | 2016-09-14 14:41:36 +0200 | [diff] [blame] | 286 | CONFIG_GRUB2_REVISION=$(CONFIG_GRUB2_REVISION) \ |
| 287 | CONFIG_GRUB2_REVISION_ID=$(CONFIG_GRUB2_REVISION_ID) \ |
Benjamin Barenblat | 9993286 | 2016-06-15 12:08:06 -0700 | [diff] [blame] | 288 | CONFIG_GRUB2_EXTRA_MODULES=$(CONFIG_GRUB2_EXTRA_MODULES) |
Patrick Georgi | 864b48d | 2015-12-04 16:52:18 +0100 | [diff] [blame] | 289 | |
Bill XIE | 3dda4da | 2022-01-01 11:56:00 +0800 | [diff] [blame] | 290 | $(GRUB_TARGET_PATH): grub2 |
Martin Roth | dbae4d0 | 2015-12-11 12:24:33 -0700 | [diff] [blame] | 291 | |
Martin Roth | 9369e10 | 2016-10-17 10:11:10 -0600 | [diff] [blame] | 292 | # U-Boot |
| 293 | |
Bill XIE | d85cee8 | 2021-12-11 17:37:57 +0800 | [diff] [blame] | 294 | payloads/external/U-Boot/build/u-boot.bin u-boot: $(DOTCONFIG) |
Martin Roth | c8ed340 | 2016-03-16 10:39:30 -0600 | [diff] [blame] | 295 | $(MAKE) -C payloads/external/U-Boot \ |
Bill XIE | d85cee8 | 2021-12-11 17:37:57 +0800 | [diff] [blame] | 296 | STABLE_COMMIT_ID=$(CONFIG_UBOOT_STABLE_COMMIT_ID) \ |
Martin Roth | dbae4d0 | 2015-12-11 12:24:33 -0700 | [diff] [blame] | 297 | CONFIG_UBOOT_MASTER=$(CONFIG_UBOOT_MASTER) \ |
| 298 | CONFIG_UBOOT_STABLE=$(CONFIG_UBOOT_STABLE) |
Martin Roth | be63a24 | 2016-02-28 15:56:27 -0800 | [diff] [blame] | 299 | |
Martin Roth | 9369e10 | 2016-10-17 10:11:10 -0600 | [diff] [blame] | 300 | # TINT |
| 301 | |
Antonello Dettori | 4f7d329 | 2016-05-27 23:44:47 +0200 | [diff] [blame] | 302 | payloads/external/tint/tint/tint.elf tint: |
| 303 | $(MAKE) -C payloads/external/tint |
| 304 | |
Martin Roth | 9369e10 | 2016-10-17 10:11:10 -0600 | [diff] [blame] | 305 | cbfs-files-$(CONFIG_TINT_SECONDARY_PAYLOAD) += img/tint |
| 306 | img/tint-file := payloads/external/tint/tint/tint.elf |
Ronald G. Minnich | c6d1349 | 2018-05-15 18:05:07 -0700 | [diff] [blame] | 307 | img/tint-type := payload |
Arthur Heymans | 47dd96d | 2018-02-07 13:01:43 +0100 | [diff] [blame] | 308 | img/tint-compression := $(CBFS_SECONDARY_PAYLOAD_COMPRESS_FLAG) |
Martin Roth | 9369e10 | 2016-10-17 10:11:10 -0600 | [diff] [blame] | 309 | |
| 310 | # Memtest86+ |
| 311 | |
Martin Roth | 8fc6d18f | 2022-11-07 11:33:58 -0700 | [diff] [blame] | 312 | ifeq ($(CONFIG_MEMTEST86PLUS_V6),y) |
| 313 | memtest_dir:=memtest86plus_v6 |
| 314 | else |
| 315 | memtest_dir:=memtest86plus_v5 |
| 316 | endif |
| 317 | |
Martin Roth | be63a24 | 2016-02-28 15:56:27 -0800 | [diff] [blame] | 318 | cbfs-files-$(CONFIG_MEMTEST_SECONDARY_PAYLOAD) += img/memtest |
Martin Roth | 8fc6d18f | 2022-11-07 11:33:58 -0700 | [diff] [blame] | 319 | img/memtest-file := payloads/external/Memtest86Plus/$(memtest_dir)/memtest |
Ronald G. Minnich | c6d1349 | 2018-05-15 18:05:07 -0700 | [diff] [blame] | 320 | img/memtest-type := payload |
Arthur Heymans | 47dd96d | 2018-02-07 13:01:43 +0100 | [diff] [blame] | 321 | img/memtest-compression := $(CBFS_SECONDARY_PAYLOAD_COMPRESS_FLAG) |
Martin Roth | be63a24 | 2016-02-28 15:56:27 -0800 | [diff] [blame] | 322 | |
| 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 |
| 328 | |
Martin Roth | 8fc6d18f | 2022-11-07 11:33:58 -0700 | [diff] [blame] | 329 | payloads/external/Memtest86Plus/$(memtest_dir)/memtest: $(DOTCONFIG) |
Martin Roth | c8ed340 | 2016-03-16 10:39:30 -0600 | [diff] [blame] | 330 | $(MAKE) -C payloads/external/Memtest86Plus all \ |
Martin Roth | be63a24 | 2016-02-28 15:56:27 -0800 | [diff] [blame] | 331 | CC="$(CC_x86_32)" \ |
| 332 | LD="$(LD_x86_32)" \ |
| 333 | OBJCOPY="$(OBJCOPY_x86_32)" \ |
| 334 | AS="$(AS_x86_32)" \ |
Stefan Tauner | a07366c | 2018-08-19 17:48:53 +0200 | [diff] [blame] | 335 | CONFIG_MEMTEST_REVISION=$(CONFIG_MEMTEST_REVISION) \ |
| 336 | CONFIG_MEMTEST_REVISION_ID=$(CONFIG_MEMTEST_REVISION_ID) \ |
Nicholas Chin | 981ef52 | 2023-06-25 09:54:00 -0600 | [diff] [blame] | 337 | CONFIG_MEMTEST_MAIN=$(CONFIG_MEMTEST_MAIN) \ |
Martin Roth | 4005d9b | 2016-04-26 09:51:41 -0600 | [diff] [blame] | 338 | CONFIG_MEMTEST_STABLE=$(CONFIG_MEMTEST_STABLE) \ |
Martin Roth | 8fc6d18f | 2022-11-07 11:33:58 -0700 | [diff] [blame] | 339 | CONFIG_MEMTEST86PLUS_V5=$(CONFIG_MEMTEST86PLUS_V5) \ |
| 340 | CONFIG_MEMTEST86PLUS_V6=$(CONFIG_MEMTEST86PLUS_V6) \ |
Martin Roth | be63a24 | 2016-02-28 15:56:27 -0800 | [diff] [blame] | 341 | $(MEMTEST_SERIAL_OPTIONS) \ |
| 342 | MFLAGS= MAKEFLAGS= |
Martin Roth | 888a98b | 2016-03-13 13:00:43 -0600 | [diff] [blame] | 343 | |
Martin Roth | 9369e10 | 2016-10-17 10:11:10 -0600 | [diff] [blame] | 344 | # iPXE |
| 345 | |
Martin Roth | 888a98b | 2016-03-13 13:00:43 -0600 | [diff] [blame] | 346 | PXE_ROM_PCI_ID:=$(subst $(comma),,$(CONFIG_PXE_ROM_ID)) |
| 347 | |
| 348 | ifeq ($(CONFIG_PXE_ROM),y) |
Nico Huber | 28a147e | 2024-04-16 23:35:28 +0200 | [diff] [blame] | 349 | PXE_ROM_FILE:=$(call strip_quotes,$(CONFIG_PXE_ROM_FILE)) |
Martin Roth | 888a98b | 2016-03-13 13:00:43 -0600 | [diff] [blame] | 350 | endif |
| 351 | ifeq ($(CONFIG_BUILD_IPXE),y) |
| 352 | PXE_ROM_FILE:=payloads/external/iPXE/ipxe/ipxe.rom |
| 353 | endif |
Felix Singer | 238ff1e | 2023-11-05 02:09:34 +0000 | [diff] [blame] | 354 | ifeq ($(CONFIG_IPXE_ADD_SCRIPT),y) |
| 355 | IPXE_CONFIG_SCRIPT:=$(abspath $(patsubst "%",%,$(CONFIG_IPXE_SCRIPT))) |
Patrick Rudolph | 23cb12b | 2017-07-25 19:36:25 +0200 | [diff] [blame] | 356 | endif |
Martin Roth | 888a98b | 2016-03-13 13:00:43 -0600 | [diff] [blame] | 357 | ifeq ($(CONFIG_CONSOLE_SERIAL)$(CONFIG_DRIVERS_UART_8250IO),yy) |
| 358 | IPXE_UART=COM$(call int-add,$(CONFIG_UART_FOR_CONSOLE) 1) |
| 359 | endif |
| 360 | |
Felix Singer | 238ff1e | 2023-11-05 02:09:34 +0000 | [diff] [blame] | 361 | ifeq ($(CONFIG_IPXE_SERIAL_CONSOLE),y) |
Michał Żygowski | 9839eff | 2018-06-26 13:12:49 +0200 | [diff] [blame] | 362 | IPXE_SERIAL_CONSOLE = $(CONFIG_CONSOLE_SERIAL)$(CONFIG_DRIVERS_UART_8250IO) |
| 363 | else |
| 364 | IPXE_SERIAL_CONSOLE = n |
| 365 | endif |
| 366 | |
Martin Roth | 888a98b | 2016-03-13 13:00:43 -0600 | [diff] [blame] | 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 |
| 370 | |
Felix Singer | 238ff1e | 2023-11-05 02:09:34 +0000 | [diff] [blame] | 371 | payloads/external/iPXE/ipxe/ipxe.rom ipxe: $(DOTCONFIG) $(IPXE_CONFIG_SCRIPT) |
Martin Roth | 888a98b | 2016-03-13 13:00:43 -0600 | [diff] [blame] | 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) \ |
Michał Żygowski | 9839eff | 2018-06-26 13:12:49 +0200 | [diff] [blame] | 377 | CONSOLE_SERIAL=$(IPXE_SERIAL_CONSOLE) \ |
Martin Roth | 888a98b | 2016-03-13 13:00:43 -0600 | [diff] [blame] | 378 | IPXE_UART=$(IPXE_UART) \ |
| 379 | CONFIG_TTYS0_BAUD=$(CONFIG_TTYS0_BAUD) \ |
Felix Singer | 238ff1e | 2023-11-05 02:09:34 +0000 | [diff] [blame] | 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) \ |
Maciej Pijanowski | 0306cc2 | 2023-12-21 21:38:03 +0100 | [diff] [blame] | 384 | CONFIG_PXE_TRUST_CMD=$(CONFIG_PXE_TRUST_CMD) \ |
Martin Roth | 888a98b | 2016-03-13 13:00:43 -0600 | [diff] [blame] | 385 | MFLAGS= MAKEFLAGS= |
Philipp Deppenwiese | 0f0e4e6 | 2018-06-19 20:22:32 +0200 | [diff] [blame] | 386 | |
| 387 | # LinuxBoot |
Maximilian Brune | c202be7 | 2023-06-26 20:04:47 +0200 | [diff] [blame] | 388 | LINUXBOOT_CROSS_COMPILE_ARCH-$(CONFIG_LINUXBOOT_X86) = x86_32 |
| 389 | LINUXBOOT_CROSS_COMPILE_ARCH-$(CONFIG_LINUXBOOT_X86_64) = x86_64 |
| 390 | LINUXBOOT_CROSS_COMPILE_ARCH-$(CONFIG_LINUXBOOT_ARM) = arm |
| 391 | LINUXBOOT_CROSS_COMPILE_ARCH-$(CONFIG_LINUXBOOT_ARM64) = arm64 |
| 392 | LINUXBOOT_CROSS_COMPILE_ARCH-$(CONFIG_LINUXBOOT_RISCV_RV32) = riscv |
| 393 | LINUXBOOT_CROSS_COMPILE_ARCH-$(CONFIG_LINUXBOOT_RISCV_RV64) = riscv |
Maximilian Brune | 7266319 | 2023-08-11 01:05:19 +0200 | [diff] [blame] | 394 | ifeq ($(CONFIG_LINUXBOOT_CROSS_COMPILE),"") |
Maximilian Brune | c202be7 | 2023-06-26 20:04:47 +0200 | [diff] [blame] | 395 | CONFIG_LINUXBOOT_CROSS_COMPILE=$(CROSS_COMPILE_$(LINUXBOOT_CROSS_COMPILE_ARCH-y)) |
| 396 | endif |
Arthur Heymans | 6f1b7d7 | 2023-04-12 11:03:56 +0200 | [diff] [blame] | 397 | .PHONY: linuxboot |
Maximilian Brune | c202be7 | 2023-06-26 20:04:47 +0200 | [diff] [blame] | 398 | payloads/external/LinuxBoot/build/Image linuxboot: |
Philipp Deppenwiese | 0f0e4e6 | 2018-06-19 20:22:32 +0200 | [diff] [blame] | 399 | $(MAKE) -C payloads/external/LinuxBoot \ |
Philipp Deppenwiese | 0f0e4e6 | 2018-06-19 20:22:32 +0200 | [diff] [blame] | 400 | CPUS=$(CPUS) \ |
Marcello Sylvester Bauer | 79f9291 | 2018-12-05 08:45:26 +0100 | [diff] [blame] | 401 | CONFIG_LINUXBOOT_X86_64=$(CONFIG_LINUXBOOT_X86_64) \ |
| 402 | CONFIG_LINUXBOOT_X86=$(CONFIG_LINUXBOOT_X86) \ |
Maximilian Brune | c202be7 | 2023-06-26 20:04:47 +0200 | [diff] [blame] | 403 | CONFIG_LINUXBOOT_ARM=$(CONFIG_LINUXBOOT_ARM) \ |
Marcello Sylvester Bauer | 79f9291 | 2018-12-05 08:45:26 +0100 | [diff] [blame] | 404 | CONFIG_LINUXBOOT_ARM64=$(CONFIG_LINUXBOOT_ARM64) \ |
Maximilian Brune | c202be7 | 2023-06-26 20:04:47 +0200 | [diff] [blame] | 405 | CONFIG_LINUXBOOT_RISCV_RV32=$(CONFIG_LINUXBOOT_RISCV_RV32) \ |
| 406 | CONFIG_LINUXBOOT_RISCV_RV64=$(CONFIG_LINUXBOOT_RISCV_RV64) \ |
| 407 | CONFIG_LINUXBOOT_CROSS_COMPILE=$(CONFIG_LINUXBOOT_CROSS_COMPILE) \ |
Marcello Sylvester Bauer | 78d0256 | 2018-11-11 18:03:26 +0100 | [diff] [blame] | 408 | CONFIG_LINUXBOOT_BUILD_INITRAMFS=$(CONFIG_LINUXBOOT_BUILD_INITRAMFS) \ |
Maximilian Brune | c202be7 | 2023-06-26 20:04:47 +0200 | [diff] [blame] | 409 | CONFIG_LINUXBOOT_INITRAMFS_PATH=$(CONFIG_LINUXBOOT_INITRAMFS_PATH) \ |
| 410 | CONFIG_LINUXBOOT_INITRAMFS_SUFFIX=$(CONFIG_LINUXBOOT_INITRAMFS_SUFFIX) \ |
| 411 | CONFIG_LINUXBOOT_INITRAMFS_COMPRESSION_XZ=$(CONFIG_LINUXBOOT_INITRAMFS_COMPRESSION_XZ) \ |
| 412 | CONFIG_LINUXBOOT_COMPILE_KERNEL=$(CONFIG_LINUXBOOT_COMPILE_KERNEL) \ |
| 413 | CONFIG_LINUXBOOT_KERNEL_PATH=$(CONFIG_LINUXBOOT_KERNEL_PATH) \ |
| 414 | CONFIG_LINUXBOOT_KERNEL_VERSION=$(CONFIG_LINUXBOOT_KERNEL_VERSION) \ |
Marcello Sylvester Bauer | 79f9291 | 2018-12-05 08:45:26 +0100 | [diff] [blame] | 415 | CONFIG_LINUXBOOT_KERNEL_BZIMAGE=$(CONFIG_LINUXBOOT_KERNEL_BZIMAGE) \ |
| 416 | CONFIG_LINUXBOOT_KERNEL_UIMAGE=$(CONFIG_LINUXBOOT_KERNEL_UIMAGE) \ |
Philipp Deppenwiese | 0f0e4e6 | 2018-06-19 20:22:32 +0200 | [diff] [blame] | 417 | CONFIG_LINUXBOOT_KERNEL_CONFIGFILE=$(CONFIG_LINUXBOOT_KERNEL_CONFIGFILE) \ |
Marcello Sylvester Bauer | 78d0256 | 2018-11-11 18:03:26 +0100 | [diff] [blame] | 418 | CONFIG_LINUXBOOT_UROOT=$(CONFIG_LINUXBOOT_UROOT) \ |
Philipp Deppenwiese | 0f0e4e6 | 2018-06-19 20:22:32 +0200 | [diff] [blame] | 419 | CONFIG_LINUXBOOT_UROOT_VERSION=$(CONFIG_LINUXBOOT_UROOT_VERSION) \ |
Marcello Sylvester Bauer | e102c5d | 2018-11-21 17:45:43 +0100 | [diff] [blame] | 420 | CONFIG_LINUXBOOT_UROOT_FORMAT=$(CONFIG_LINUXBOOT_UROOT_FORMAT) \ |
| 421 | CONFIG_LINUXBOOT_UROOT_INITCMD=$(CONFIG_LINUXBOOT_UROOT_INITCMD) \ |
Maximilian Brune | c202be7 | 2023-06-26 20:04:47 +0200 | [diff] [blame] | 422 | CONFIG_LINUXBOOT_UROOT_UINITCMD=$(CONFIG_LINUXBOOT_UROOT_UINITCMD) \ |
Marcello Sylvester Bauer | e102c5d | 2018-11-21 17:45:43 +0100 | [diff] [blame] | 423 | CONFIG_LINUXBOOT_UROOT_SHELL=$(CONFIG_LINUXBOOT_UROOT_SHELL) \ |
David Hendricks | fb03dd6 | 2018-08-08 19:16:55 -0700 | [diff] [blame] | 424 | CONFIG_LINUXBOOT_UROOT_COMMANDS=$(CONFIG_LINUXBOOT_UROOT_COMMANDS) \ |
Patrick Rudolph | 02c0814 | 2018-03-13 11:22:26 +0100 | [diff] [blame] | 425 | CONFIG_LINUXBOOT_UROOT_FILES=$(CONFIG_LINUXBOOT_UROOT_FILES) \ |
Maximilian Brune | c202be7 | 2023-06-26 20:04:47 +0200 | [diff] [blame] | 426 | CONFIG_LINUXBOOT_DTS_FILE=$(CONFIG_LINUXBOOT_DTS_FILE) |
Philipp Deppenwiese | 0f0e4e6 | 2018-06-19 20:22:32 +0200 | [diff] [blame] | 427 | |
Zoltan Baldaszti | be58923 | 2020-09-17 19:45:21 +0200 | [diff] [blame] | 428 | # BOOTBOOT |
| 429 | |
| 430 | payloads/external/BOOTBOOT/bootboot/dist/bootbootcb.elf: |
| 431 | $(MAKE) -C payloads/external/BOOTBOOT all |
Sergii Dmytruk | a816c29 | 2021-10-27 00:23:14 +0300 | [diff] [blame] | 432 | |
| 433 | # skiboot |
| 434 | |
| 435 | payloads/external/skiboot/build/skiboot.elf: |
| 436 | $(MAKE) -C payloads/external/skiboot all \ |
| 437 | CONFIG_SKIBOOT_GIT_REPO=$(CONFIG_SKIBOOT_GIT_REPO) \ |
| 438 | CONFIG_SKIBOOT_REVISION=$(CONFIG_SKIBOOT_REVISION) |
Maximilian Brune | b62f86b | 2023-11-05 19:29:14 +0100 | [diff] [blame^] | 439 | |
| 440 | # leanefi |
| 441 | |
| 442 | payloads/external/leanefi/leanefi/build/leanefi.elf: FORCE $(DOTCONFIG) |
| 443 | $(MAKE) -C payloads/external/leanefi |
| 444 | FORCE: ; |
| 445 | |
Nicholas Chin | 8d88557 | 2021-08-28 09:40:41 -0600 | [diff] [blame] | 446 | # COREDOOM |
| 447 | |
| 448 | payloads/external/coreDOOM/coredoom/doomgeneric/coredoom.elf coredoom: |
| 449 | $(MAKE) -C payloads/external/coreDOOM |
| 450 | |
| 451 | cbfs-files-$(CONFIG_COREDOOM_SECONDARY_PAYLOAD) += img/coreDOOM |
| 452 | img/coreDOOM-file := payloads/external/coreDOOM/coredoom/doomgeneric/coredoom.elf |
| 453 | img/coreDOOM-type := payload |
| 454 | img/coreDOOM-compression := $(CBFS_SECONDARY_PAYLOAD_COMPRESS_FLAG) |
| 455 | # WAD file |
| 456 | ifneq ($(strip $(CONFIG_COREDOOM_WAD_FILE)),) |
| 457 | cbfs-files-y += doom.wad |
| 458 | doom.wad-file := $(strip $(CONFIG_COREDOOM_WAD_FILE)) |
| 459 | doom.wad-type := raw |
| 460 | doom.wad-compression := $(CBFS_SECONDARY_PAYLOAD_COMPRESS_FLAG) |
| 461 | endif |