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 |
| 4 | ifeq ($(CONFIG_PAYLOAD_SEABIOS),y) |
| 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 |
| 27 | ifneq ($(strip $(call strip_quotes,$(CONFIG_LINUX_INITRD))),) |
Marcello Sylvester Bauer | 78d0256 | 2018-11-11 18:03:26 +0100 | [diff] [blame] | 28 | ifneq ($(CONFIG_LINUXBOOT_ARM64),y) |
Marcello Sylvester Bauer | e102c5d | 2018-11-21 17:45:43 +0100 | [diff] [blame] | 29 | ADDITIONAL_PAYLOAD_CONFIG+=-I $(CONFIG_LINUX_INITRD)$(CONFIG_LINUXBOOT_INITRAMFS_SUFFIX) |
Marcello Sylvester Bauer | 78d0256 | 2018-11-11 18:03:26 +0100 | [diff] [blame] | 30 | prebuilt-files += $(strip $(call strip_quotes,$(CONFIG_LINUX_INITRD))) |
| 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) |
Angel Pons | c052ba0 | 2020-03-01 19:51:13 +0100 | [diff] [blame] | 64 | payloads/external/SeaBIOS/seabios/out/bios.bin.elf: $(DOTCONFIG) |
Martin Roth | c8ed340 | 2016-03-16 10:39:30 -0600 | [diff] [blame] | 65 | $(MAKE) -C payloads/external/SeaBIOS \ |
Stefan Reinauer | 0fa5d8f | 2015-06-30 17:09:17 -0700 | [diff] [blame] | 66 | HOSTCC="$(HOSTCC)" \ |
Martin Roth | 342cf7f | 2016-03-07 22:04:01 -0700 | [diff] [blame] | 67 | CC=$(word $(SEABIOS_CC_OFFSET),$(CC_x86_32)) \ |
| 68 | 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] | 69 | LD=$(word 1,$(LD_x86_32)) LDFLAGS="$(patsubst $(word 1,$(LD_x86_32))%,,$(LD_x86_32))" \ |
| 70 | OBJDUMP="$(OBJDUMP_x86_32)" \ |
| 71 | OBJCOPY="$(OBJCOPY_x86_32)" STRIP="$(STRIP_x86_32)" \ |
| 72 | AS="$(AS_x86_32)" IASL="$(IASL)" \ |
| 73 | CONFIG_SEABIOS_MASTER=$(CONFIG_SEABIOS_MASTER) \ |
| 74 | CONFIG_SEABIOS_STABLE=$(CONFIG_SEABIOS_STABLE) \ |
Antonello Dettori | 3aa91dc | 2016-03-07 23:56:57 +0000 | [diff] [blame] | 75 | CONFIG_SEABIOS_REVISION=$(CONFIG_SEABIOS_REVISION) \ |
| 76 | CONFIG_SEABIOS_REVISION_ID=$(CONFIG_SEABIOS_REVISION_ID) \ |
Martin Roth | 99d05c7 | 2015-11-28 15:44:34 -0700 | [diff] [blame] | 77 | CONFIG_PAYLOAD_CONFIGFILE=$(CONFIG_PAYLOAD_CONFIGFILE) \ |
Stefan Reinauer | 0fa5d8f | 2015-06-30 17:09:17 -0700 | [diff] [blame] | 78 | CONFIG_SEABIOS_THREAD_OPTIONROMS=$(CONFIG_SEABIOS_THREAD_OPTIONROMS) \ |
| 79 | CONFIG_SEABIOS_VGA_COREBOOT=$(CONFIG_SEABIOS_VGA_COREBOOT) \ |
Martin Roth | f80331f | 2016-02-06 12:47:05 -0700 | [diff] [blame] | 80 | CONFIG_DRIVERS_UART_8250IO=$(CONFIG_DRIVERS_UART_8250IO) \ |
Ricardo Ribalda Delgado | 77ced40 | 2017-01-03 11:56:22 +0100 | [diff] [blame] | 81 | CONFIG_DRIVERS_UART_8250MEM=$(CONFIG_DRIVERS_UART_8250MEM) \ |
| 82 | CONFIG_HUDSON_UART=$(CONFIG_HUDSON_UART) \ |
Stefan Reinauer | 0fa5d8f | 2015-06-30 17:09:17 -0700 | [diff] [blame] | 83 | CONFIG_CONSOLE_SERIAL=$(CONFIG_CONSOLE_SERIAL) \ |
Stefan Tauner | c48d791 | 2017-01-15 11:49:25 +0100 | [diff] [blame] | 84 | CONFIG_TTYS0_BASE=$(CONFIG_TTYS0_BASE) \ |
Philipp Deppenwiese | d8b4139 | 2017-11-29 16:58:05 +0100 | [diff] [blame] | 85 | CONFIG_SEABIOS_DEBUG_LEVEL=$(CONFIG_SEABIOS_DEBUG_LEVEL) \ |
| 86 | CONFIG_DRIVERS_UART_8250MEM_32=$(CONFIG_DRIVERS_UART_8250MEM_32) \ |
| 87 | CONFIG_ENABLE_HSUART=$(CONFIG_ENABLE_HSUART) \ |
Michał Żygowski | 6d592c6 | 2020-05-07 15:14:24 +0200 | [diff] [blame] | 88 | CONFIG_CONSOLE_UART_BASE_ADDRESS=$(CONFIG_CONSOLE_UART_BASE_ADDRESS) \ |
| 89 | CONFIG_SEABIOS_HARDWARE_IRQ=$(CONFIG_SEABIOS_HARDWARE_IRQ) |
Stefan Reinauer | 0fa5d8f | 2015-06-30 17:09:17 -0700 | [diff] [blame] | 90 | |
Angel Pons | c052ba0 | 2020-03-01 19:51:13 +0100 | [diff] [blame] | 91 | payloads/external/SeaBIOS/seabios/out/vgabios.bin: payloads/external/SeaBIOS/seabios/out/bios.bin.elf |
Martin Roth | 342cf7f | 2016-03-07 22:04:01 -0700 | [diff] [blame] | 92 | payloads/external/SeaBIOS/seabios/.config: payloads/external/SeaBIOS/seabios/out/bios.bin.elf |
| 93 | payloads/external/SeaBIOS/seabios/out/autoversion.h: payloads/external/SeaBIOS/seabios/out/bios.bin.elf |
Patrick Georgi | 4013469 | 2015-11-30 20:00:33 +0100 | [diff] [blame] | 94 | |
Martin Roth | bc46ac5 | 2016-06-05 10:30:34 -0600 | [diff] [blame] | 95 | # add a SeaBIOS bootorder file |
| 96 | ifneq ($(strip $(CONFIG_SEABIOS_BOOTORDER_FILE)),) |
| 97 | cbfs-files-y += bootorder |
| 98 | bootorder-file := $(strip $(CONFIG_SEABIOS_BOOTORDER_FILE)) |
| 99 | bootorder-type := raw |
| 100 | endif |
| 101 | |
Arthur Heymans | 14ca740 | 2020-10-14 16:46:02 +0200 | [diff] [blame] | 102 | ifneq ($(CONFIG_SEABIOS_PS2_TIMEOUT),) |
| 103 | ifneq ($(CONFIG_SEABIOS_PS2_TIMEOUT),0) |
Patrick Georgi | 2cc5bcb | 2021-01-13 09:15:07 +0100 | [diff] [blame] | 104 | $(call add_intermediate, seabios_ps2_timeout, $(CBFSTOOL)) |
Arthur Heymans | 14ca740 | 2020-10-14 16:46:02 +0200 | [diff] [blame] | 105 | @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] | 106 | $(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] | 107 | $(CBFSTOOL) $< add-int -i $(CONFIG_SEABIOS_PS2_TIMEOUT) -n etc/ps2-keyboard-spinup |
| 108 | endif |
| 109 | endif |
Arthur Heymans | 14ca740 | 2020-10-14 16:46:02 +0200 | [diff] [blame] | 110 | |
| 111 | ifeq ($(CONFIG_SEABIOS_ADD_SERCON_PORT_FILE),y) |
Patrick Georgi | 2cc5bcb | 2021-01-13 09:15:07 +0100 | [diff] [blame] | 112 | $(call add_intermediate, seabios_sercon, $(CBFSTOOL)) |
Arthur Heymans | 14ca740 | 2020-10-14 16:46:02 +0200 | [diff] [blame] | 113 | @printf " SeaBIOS Add sercon-port file\n" |
Arthur Heymans | c6bdabd | 2020-12-24 12:15:38 +0100 | [diff] [blame] | 114 | $(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] | 115 | $(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] | 116 | endif |
| 117 | |
| 118 | ifeq ($(CONFIG_SEABIOS_THREAD_OPTIONROMS),y) |
Patrick Georgi | 2cc5bcb | 2021-01-13 09:15:07 +0100 | [diff] [blame] | 119 | $(call add_intermediate, seabios_thread_optionroms, $(CBFSTOOL)) |
Arthur Heymans | 14ca740 | 2020-10-14 16:46:02 +0200 | [diff] [blame] | 120 | @printf " SeaBIOS Thread optionroms\n" |
Arthur Heymans | c6bdabd | 2020-12-24 12:15:38 +0100 | [diff] [blame] | 121 | $(if $(CONFIG_UPDATE_IMAGE),-$(CBFSTOOL) $< remove -n etc/threads 2>/dev/null) |
Angel Pons | 6d4de7e | 2020-11-20 18:28:38 +0100 | [diff] [blame] | 122 | $(CBFSTOOL) $< add-int -i 2 -n etc/threads |
Arthur Heymans | 14ca740 | 2020-10-14 16:46:02 +0200 | [diff] [blame] | 123 | endif |
| 124 | |
Martin Roth | 9369e10 | 2016-10-17 10:11:10 -0600 | [diff] [blame] | 125 | # Depthcharge |
| 126 | |
Paul Kocialkowski | fde3275 | 2016-07-24 12:25:07 +0200 | [diff] [blame] | 127 | payloads/external/depthcharge/depthcharge/build/depthcharge.elf depthcharge: $(DOTCONFIG) $(CBFSTOOL) |
Martin Roth | c8ed340 | 2016-03-16 10:39:30 -0600 | [diff] [blame] | 128 | $(MAKE) -C payloads/external/depthcharge \ |
Selma BENSAID | b458a4f | 2019-09-20 17:38:59 -0700 | [diff] [blame] | 129 | BOARD=$(BOARD) \ |
Marshall Dawson | f9973b5 | 2016-12-22 18:16:48 -0500 | [diff] [blame] | 130 | MFLAGS= MAKEFLAGS= \ |
| 131 | DEPTHCHARGE_MASTER=$(CONFIG_DEPTHCHARGE_MASTER) \ |
| 132 | DEPTHCHARGE_STABLE=$(CONFIG_DEPTHCHARGE_STABLE) \ |
| 133 | DEPTHCHARGE_REVISION=$(CONFIG_DEPTHCHARGE_REVISION) \ |
Marshall Dawson | fc18507 | 2016-12-22 20:25:29 -0500 | [diff] [blame] | 134 | DEPTHCHARGE_REVISION_ID=$(CONFIG_DEPTHCHARGE_REVISION_ID) \ |
| 135 | OVERRIDE_DEFCONFIG=$(CONFIG_LP_DEFCONFIG_OVERRIDE) |
Stefan Reinauer | 9125073 | 2015-07-15 10:24:18 -0700 | [diff] [blame] | 136 | |
Martin Roth | 4769cc3 | 2016-06-02 16:42:29 -0600 | [diff] [blame] | 137 | # Tianocore |
| 138 | |
| 139 | payloads/external/tianocore/tianocore/Build/UEFIPAYLOAD.fd tianocore: $(DOTCONFIG) |
| 140 | $(MAKE) -C payloads/external/tianocore all \ |
| 141 | HOSTCC="$(HOSTCC)" \ |
| 142 | CC="$(HOSTCC)" \ |
Martin Roth | 4769cc3 | 2016-06-02 16:42:29 -0600 | [diff] [blame] | 143 | CONFIG_TIANOCORE_REVISION_ID=$(CONFIG_TIANOCORE_REVISION_ID) \ |
| 144 | CONFIG_TIANOCORE_DEBUG=$(CONFIG_TIANOCORE_DEBUG) \ |
| 145 | CONFIG_TIANOCORE_TARGET_IA32=$(CONFIG_TIANOCORE_TARGET_IA32) \ |
Lijian Zhao | cf9ea55 | 2018-09-07 17:58:08 -0700 | [diff] [blame] | 146 | CONFIG_TIANOCORE_USE_8254_TIMER=$(CONFIG_TIANOCORE_USE_8254_TIMER) \ |
Matt DeVillier | ff79341 | 2019-02-21 22:41:59 -0600 | [diff] [blame] | 147 | CONFIG_TIANOCORE_BOOTSPLASH_FILE=$(CONFIG_TIANOCORE_BOOTSPLASH_FILE) \ |
Lijian Zhao | 16562cb | 2019-07-20 13:06:03 +0800 | [diff] [blame] | 148 | CONFIG_TIANOCORE_UEFIPAYLOAD=$(CONFIG_TIANOCORE_UEFIPAYLOAD) \ |
| 149 | CONFIG_TIANOCORE_COREBOOTPAYLOAD=$(CONFIG_TIANOCORE_COREBOOTPAYLOAD) \ |
| 150 | CONFIG_MMCONF_BASE_ADDRESS=$(CONFIG_MMCONF_BASE_ADDRESS) \ |
Matt DeVillier | 61a3c8a | 2020-11-29 22:11:52 -0600 | [diff] [blame] | 151 | CONFIG_TIANOCORE_BOOT_TIMEOUT=$(CONFIG_TIANOCORE_BOOT_TIMEOUT) \ |
Martin Roth | 4769cc3 | 2016-06-02 16:42:29 -0600 | [diff] [blame] | 152 | GCC_CC_x86_32=$(GCC_CC_x86_32) \ |
| 153 | GCC_CC_x86_64=$(GCC_CC_x86_64) \ |
| 154 | GCC_CC_arm=$(GCC_CC_arm) \ |
| 155 | GCC_CC_arm64=$(GCC_CC_arm64) \ |
| 156 | OBJCOPY_x86_32=$(OBJCOPY_x86_32) \ |
| 157 | OBJCOPY_x86_64=$(OBJCOPY_x86_64) \ |
| 158 | OBJCOPY_arm=$(OBJCOPY_arm) \ |
| 159 | OBJCOPY_arm64=$(OBJCOPY_arm64) \ |
| 160 | MFLAGS= MAKEFLAGS= |
| 161 | |
Martin Roth | 9369e10 | 2016-10-17 10:11:10 -0600 | [diff] [blame] | 162 | # FILO |
| 163 | |
Stefan Reinauer | 0fa5d8f | 2015-06-30 17:09:17 -0700 | [diff] [blame] | 164 | filo: |
Martin Roth | c8ed340 | 2016-03-16 10:39:30 -0600 | [diff] [blame] | 165 | $(MAKE) -C payloads/external/FILO \ |
Stefan Reinauer | 0fa5d8f | 2015-06-30 17:09:17 -0700 | [diff] [blame] | 166 | HOSTCC="$(HOSTCC)" \ |
| 167 | CC="$(CC_x86_32)" LD="$(LD_x86_32)" OBJDUMP="$(OBJDUMP_x86_32)" \ |
| 168 | OBJCOPY="$(OBJCOPY_x86_32)" STRIP="$(STRIP_x86_32)" \ |
| 169 | CONFIG_FILO_MASTER=$(CONFIG_FILO_MASTER) \ |
| 170 | CONFIG_FILO_STABLE=$(CONFIG_FILO_STABLE) |
| 171 | |
Patrick Georgi | 864b48d | 2015-12-04 16:52:18 +0100 | [diff] [blame] | 172 | payloads/external/FILO/filo/build/filo.elf: filo |
Patrick Georgi | 67e11d1 | 2016-01-14 20:41:58 +0100 | [diff] [blame] | 173 | payloads/external/FILO/filo/.config: filo |
| 174 | payloads/external/FILO/filo/build/version.h: filo |
Stefan Reinauer | 0fa5d8f | 2015-06-30 17:09:17 -0700 | [diff] [blame] | 175 | |
Martin Roth | 9369e10 | 2016-10-17 10:11:10 -0600 | [diff] [blame] | 176 | # Grub |
| 177 | |
Nico Huber | 4ff4492 | 2017-08-14 01:58:28 +0200 | [diff] [blame] | 178 | grub2: $(obj)/config.h |
Martin Roth | c8ed340 | 2016-03-16 10:39:30 -0600 | [diff] [blame] | 179 | $(MAKE) -C payloads/external/GRUB2 \ |
Stefan Reinauer | 0fa5d8f | 2015-06-30 17:09:17 -0700 | [diff] [blame] | 180 | HOSTCC="$(HOSTCC)" \ |
Nico Huber | a2ab1fd | 2017-08-14 01:38:24 +0200 | [diff] [blame] | 181 | CC="$(CC_x86_32)" LD="$(LD_x86_32)" \ |
Stefan Reinauer | 0fa5d8f | 2015-06-30 17:09:17 -0700 | [diff] [blame] | 182 | OBJCOPY="$(OBJCOPY_x86_32)" STRIP="$(STRIP_x86_32)" \ |
Nico Huber | 4ff4492 | 2017-08-14 01:58:28 +0200 | [diff] [blame] | 183 | CONFIG_DEP="$(abspath $(obj)/config.h)" \ |
Jonathan Neuschäfer | 2eb95f3 | 2017-11-20 01:56:41 +0100 | [diff] [blame] | 184 | CONFIG_GRUB2_STABLE=$(CONFIG_GRUB2_STABLE) \ |
Benjamin Barenblat | 9993286 | 2016-06-15 12:08:06 -0700 | [diff] [blame] | 185 | CONFIG_GRUB2_MASTER=$(CONFIG_GRUB2_MASTER) \ |
Denis 'GNUtoo' Carikli | 08cf195 | 2016-09-14 14:41:36 +0200 | [diff] [blame] | 186 | CONFIG_GRUB2_REVISION=$(CONFIG_GRUB2_REVISION) \ |
| 187 | CONFIG_GRUB2_REVISION_ID=$(CONFIG_GRUB2_REVISION_ID) \ |
Benjamin Barenblat | 9993286 | 2016-06-15 12:08:06 -0700 | [diff] [blame] | 188 | CONFIG_GRUB2_EXTRA_MODULES=$(CONFIG_GRUB2_EXTRA_MODULES) |
Patrick Georgi | 864b48d | 2015-12-04 16:52:18 +0100 | [diff] [blame] | 189 | |
| 190 | payloads/external/GRUB2/grub2/build/default_payload.elf: grub2 |
Martin Roth | dbae4d0 | 2015-12-11 12:24:33 -0700 | [diff] [blame] | 191 | |
Martin Roth | 9369e10 | 2016-10-17 10:11:10 -0600 | [diff] [blame] | 192 | # U-Boot |
| 193 | |
Paul Kocialkowski | fde3275 | 2016-07-24 12:25:07 +0200 | [diff] [blame] | 194 | payloads/external/U-Boot/u-boot/u-boot-dtb.bin u-boot: $(DOTCONFIG) |
Martin Roth | c8ed340 | 2016-03-16 10:39:30 -0600 | [diff] [blame] | 195 | $(MAKE) -C payloads/external/U-Boot \ |
Martin Roth | dbae4d0 | 2015-12-11 12:24:33 -0700 | [diff] [blame] | 196 | CONFIG_UBOOT_MASTER=$(CONFIG_UBOOT_MASTER) \ |
| 197 | CONFIG_UBOOT_STABLE=$(CONFIG_UBOOT_STABLE) |
Martin Roth | be63a24 | 2016-02-28 15:56:27 -0800 | [diff] [blame] | 198 | |
Martin Roth | 9369e10 | 2016-10-17 10:11:10 -0600 | [diff] [blame] | 199 | # TINT |
| 200 | |
Antonello Dettori | 4f7d329 | 2016-05-27 23:44:47 +0200 | [diff] [blame] | 201 | payloads/external/tint/tint/tint.elf tint: |
| 202 | $(MAKE) -C payloads/external/tint |
| 203 | |
Martin Roth | 9369e10 | 2016-10-17 10:11:10 -0600 | [diff] [blame] | 204 | cbfs-files-$(CONFIG_TINT_SECONDARY_PAYLOAD) += img/tint |
| 205 | img/tint-file := payloads/external/tint/tint/tint.elf |
Ronald G. Minnich | c6d1349 | 2018-05-15 18:05:07 -0700 | [diff] [blame] | 206 | img/tint-type := payload |
Arthur Heymans | 47dd96d | 2018-02-07 13:01:43 +0100 | [diff] [blame] | 207 | img/tint-compression := $(CBFS_SECONDARY_PAYLOAD_COMPRESS_FLAG) |
Martin Roth | 9369e10 | 2016-10-17 10:11:10 -0600 | [diff] [blame] | 208 | |
| 209 | # Memtest86+ |
| 210 | |
Martin Roth | be63a24 | 2016-02-28 15:56:27 -0800 | [diff] [blame] | 211 | cbfs-files-$(CONFIG_MEMTEST_SECONDARY_PAYLOAD) += img/memtest |
| 212 | img/memtest-file := payloads/external/Memtest86Plus/memtest86plus/memtest |
Ronald G. Minnich | c6d1349 | 2018-05-15 18:05:07 -0700 | [diff] [blame] | 213 | img/memtest-type := payload |
Arthur Heymans | 47dd96d | 2018-02-07 13:01:43 +0100 | [diff] [blame] | 214 | img/memtest-compression := $(CBFS_SECONDARY_PAYLOAD_COMPRESS_FLAG) |
Martin Roth | be63a24 | 2016-02-28 15:56:27 -0800 | [diff] [blame] | 215 | |
| 216 | ifeq ($(CONFIG_CONSOLE_SERIAL)$(CONFIG_DRIVERS_UART_8250IO),yy) |
| 217 | MEMTEST_SERIAL_OPTIONS=SERIAL_CONSOLE_DEFAULT=1 \ |
| 218 | SERIAL_TTY=$(CONFIG_UART_FOR_CONSOLE) \ |
| 219 | SERIAL_BAUD_RATE=$(CONFIG_TTYS0_BAUD) |
| 220 | endif |
| 221 | |
Paul Kocialkowski | fde3275 | 2016-07-24 12:25:07 +0200 | [diff] [blame] | 222 | payloads/external/Memtest86Plus/memtest86plus/memtest: $(DOTCONFIG) |
Martin Roth | c8ed340 | 2016-03-16 10:39:30 -0600 | [diff] [blame] | 223 | $(MAKE) -C payloads/external/Memtest86Plus all \ |
Martin Roth | be63a24 | 2016-02-28 15:56:27 -0800 | [diff] [blame] | 224 | CC="$(CC_x86_32)" \ |
| 225 | LD="$(LD_x86_32)" \ |
| 226 | OBJCOPY="$(OBJCOPY_x86_32)" \ |
| 227 | AS="$(AS_x86_32)" \ |
Stefan Tauner | a07366c | 2018-08-19 17:48:53 +0200 | [diff] [blame] | 228 | CONFIG_MEMTEST_REVISION=$(CONFIG_MEMTEST_REVISION) \ |
| 229 | CONFIG_MEMTEST_REVISION_ID=$(CONFIG_MEMTEST_REVISION_ID) \ |
Martin Roth | 4005d9b | 2016-04-26 09:51:41 -0600 | [diff] [blame] | 230 | CONFIG_MEMTEST_MASTER=$(CONFIG_MEMTEST_MASTER) \ |
| 231 | CONFIG_MEMTEST_STABLE=$(CONFIG_MEMTEST_STABLE) \ |
Martin Roth | be63a24 | 2016-02-28 15:56:27 -0800 | [diff] [blame] | 232 | $(MEMTEST_SERIAL_OPTIONS) \ |
| 233 | MFLAGS= MAKEFLAGS= |
Martin Roth | 888a98b | 2016-03-13 13:00:43 -0600 | [diff] [blame] | 234 | |
Martin Roth | 9369e10 | 2016-10-17 10:11:10 -0600 | [diff] [blame] | 235 | # iPXE |
| 236 | |
Martin Roth | 888a98b | 2016-03-13 13:00:43 -0600 | [diff] [blame] | 237 | PXE_ROM_PCI_ID:=$(subst $(comma),,$(CONFIG_PXE_ROM_ID)) |
| 238 | |
| 239 | ifeq ($(CONFIG_PXE_ROM),y) |
| 240 | PXE_ROM_FILE:=$(CONFIG_PXE_ROM_FILE) |
| 241 | endif |
| 242 | ifeq ($(CONFIG_BUILD_IPXE),y) |
| 243 | PXE_ROM_FILE:=payloads/external/iPXE/ipxe/ipxe.rom |
| 244 | endif |
Patrick Rudolph | 23cb12b | 2017-07-25 19:36:25 +0200 | [diff] [blame] | 245 | ifeq ($(CONFIG_PXE_ADD_SCRIPT),y) |
| 246 | PXE_CONFIG_SCRIPT:=$(abspath $(patsubst "%",%,$(CONFIG_PXE_SCRIPT))) |
| 247 | endif |
Martin Roth | 888a98b | 2016-03-13 13:00:43 -0600 | [diff] [blame] | 248 | ifeq ($(CONFIG_CONSOLE_SERIAL)$(CONFIG_DRIVERS_UART_8250IO),yy) |
| 249 | IPXE_UART=COM$(call int-add,$(CONFIG_UART_FOR_CONSOLE) 1) |
| 250 | endif |
| 251 | |
Michał Żygowski | 9839eff | 2018-06-26 13:12:49 +0200 | [diff] [blame] | 252 | ifeq ($(CONFIG_PXE_SERIAL_CONSOLE),y) |
| 253 | IPXE_SERIAL_CONSOLE = $(CONFIG_CONSOLE_SERIAL)$(CONFIG_DRIVERS_UART_8250IO) |
| 254 | else |
| 255 | IPXE_SERIAL_CONSOLE = n |
| 256 | endif |
| 257 | |
Martin Roth | 888a98b | 2016-03-13 13:00:43 -0600 | [diff] [blame] | 258 | cbfs-files-$(CONFIG_PXE_ROM)$(CONFIG_BUILD_IPXE) += pci$(CONFIG_PXE_ROM_ID).rom |
| 259 | pci$(CONFIG_PXE_ROM_ID).rom-file := $(PXE_ROM_FILE) |
| 260 | pci$(CONFIG_PXE_ROM_ID).rom-type := raw |
| 261 | |
Patrick Rudolph | 23cb12b | 2017-07-25 19:36:25 +0200 | [diff] [blame] | 262 | payloads/external/iPXE/ipxe/ipxe.rom ipxe: $(DOTCONFIG) $(PXE_CONFIG_SCRIPT) |
Martin Roth | 888a98b | 2016-03-13 13:00:43 -0600 | [diff] [blame] | 263 | $(MAKE) -C payloads/external/iPXE all \ |
| 264 | CROSS_COMPILE="$(CROSS_COMPILE_$(ARCH-ramstage-y))" \ |
| 265 | PXE_ROM_PCI_ID=$(PXE_ROM_PCI_ID) \ |
| 266 | CONFIG_IPXE_MASTER=$(CONFIG_IPXE_MASTER) \ |
| 267 | CONFIG_IPXE_STABLE=$(CONFIG_IPXE_STABLE) \ |
Michał Żygowski | 9839eff | 2018-06-26 13:12:49 +0200 | [diff] [blame] | 268 | CONSOLE_SERIAL=$(IPXE_SERIAL_CONSOLE) \ |
Martin Roth | 888a98b | 2016-03-13 13:00:43 -0600 | [diff] [blame] | 269 | IPXE_UART=$(IPXE_UART) \ |
| 270 | CONFIG_TTYS0_BAUD=$(CONFIG_TTYS0_BAUD) \ |
Patrick Rudolph | 23cb12b | 2017-07-25 19:36:25 +0200 | [diff] [blame] | 271 | CONFIG_SCRIPT=$(PXE_CONFIG_SCRIPT) \ |
| 272 | CONFIG_HAS_SCRIPT=$(CONFIG_PXE_ADD_SCRIPT) \ |
Angel Pons | fa27686 | 2020-05-28 23:40:24 +0200 | [diff] [blame] | 273 | CONFIG_PXE_NO_PROMPT=$(CONFIG_PXE_NO_PROMPT) \ |
Felix Singer | c7f4736 | 2019-01-25 03:44:20 +0100 | [diff] [blame] | 274 | CONFIG_PXE_HAS_HTTPS=$(CONFIG_PXE_HAS_HTTPS) \ |
Martin Roth | 888a98b | 2016-03-13 13:00:43 -0600 | [diff] [blame] | 275 | MFLAGS= MAKEFLAGS= |
Philipp Deppenwiese | 0f0e4e6 | 2018-06-19 20:22:32 +0200 | [diff] [blame] | 276 | |
| 277 | # LinuxBoot |
| 278 | |
| 279 | linuxboot: |
| 280 | $(MAKE) -C payloads/external/LinuxBoot \ |
Philipp Deppenwiese | 0f0e4e6 | 2018-06-19 20:22:32 +0200 | [diff] [blame] | 281 | CPUS=$(CPUS) \ |
Marcello Sylvester Bauer | 79f9291 | 2018-12-05 08:45:26 +0100 | [diff] [blame] | 282 | CONFIG_LINUXBOOT_X86_64=$(CONFIG_LINUXBOOT_X86_64) \ |
| 283 | CONFIG_LINUXBOOT_X86=$(CONFIG_LINUXBOOT_X86) \ |
| 284 | CONFIG_LINUXBOOT_ARM64=$(CONFIG_LINUXBOOT_ARM64) \ |
Marcello Sylvester Bauer | 78d0256 | 2018-11-11 18:03:26 +0100 | [diff] [blame] | 285 | CONFIG_LINUXBOOT_KERNEL=$(CONFIG_PAYLOAD_FILE) \ |
| 286 | CONFIG_LINUXBOOT_INITRAMFS=$(CONFIG_LINUX_INITRD) \ |
Marcello Sylvester Bauer | e102c5d | 2018-11-21 17:45:43 +0100 | [diff] [blame] | 287 | CONFIG_LINUXBOOT_INITRAMFS_SUFFIX=$(CONFIG_LINUXBOOT_INITRAMFS_SUFFIX) \ |
Marcello Sylvester Bauer | 78d0256 | 2018-11-11 18:03:26 +0100 | [diff] [blame] | 288 | CONFIG_LINUXBOOT_COMPILE_KERNEL=$(CONFIG_LINUXBOOT_COMPILE_KERNEL) \ |
| 289 | CONFIG_LINUXBOOT_BUILD_INITRAMFS=$(CONFIG_LINUXBOOT_BUILD_INITRAMFS) \ |
Marcello Sylvester Bauer | 79f9291 | 2018-12-05 08:45:26 +0100 | [diff] [blame] | 290 | CONFIG_LINUXBOOT_KERNEL_MAINLINE=$(CONFIG_LINUXBOOT_KERNEL_MAINLINE) \ |
| 291 | CONFIG_LINUXBOOT_KERNEL_STABLE=$(CONFIG_LINUXBOOT_KERNEL_STABLE) \ |
| 292 | CONFIG_LINUXBOOT_KERNEL_LONGTERM=$(CONFIG_LINUXBOOT_KERNEL_LONGTERM) \ |
| 293 | CONFIG_LINUXBOOT_KERNEL_CUSTOM=$(CONFIG_LINUXBOOT_KERNEL_CUSTOM) \ |
| 294 | CONFIG_LINUXBOOT_KERNEL_CUSTOM_VERSION=$(CONFIG_LINUXBOOT_KERNEL_CUSTOM_VERSION) \ |
| 295 | CONFIG_LINUXBOOT_KERNEL_CUSTOM_CONFIG=$(CONFIG_LINUXBOOT_KERNEL_CUSTOM_CONFIG) \ |
| 296 | CONFIG_LINUXBOOT_KERNEL_BZIMAGE=$(CONFIG_LINUXBOOT_KERNEL_BZIMAGE) \ |
| 297 | CONFIG_LINUXBOOT_KERNEL_UIMAGE=$(CONFIG_LINUXBOOT_KERNEL_UIMAGE) \ |
Philipp Deppenwiese | 0f0e4e6 | 2018-06-19 20:22:32 +0200 | [diff] [blame] | 298 | CONFIG_LINUXBOOT_KERNEL_CONFIGFILE=$(CONFIG_LINUXBOOT_KERNEL_CONFIGFILE) \ |
Marcello Sylvester Bauer | e102c5d | 2018-11-21 17:45:43 +0100 | [diff] [blame] | 299 | CONFIG_LINUXBOOT_INITRAMFS_COMPRESSION_XZ=$(CONFIG_LINUXBOOT_INITRAMFS_COMPRESSION_XZ) \ |
Marcello Sylvester Bauer | 78d0256 | 2018-11-11 18:03:26 +0100 | [diff] [blame] | 300 | CONFIG_LINUXBOOT_UROOT=$(CONFIG_LINUXBOOT_UROOT) \ |
Philipp Deppenwiese | 0f0e4e6 | 2018-06-19 20:22:32 +0200 | [diff] [blame] | 301 | CONFIG_LINUXBOOT_UROOT_VERSION=$(CONFIG_LINUXBOOT_UROOT_VERSION) \ |
Marcello Sylvester Bauer | e102c5d | 2018-11-21 17:45:43 +0100 | [diff] [blame] | 302 | CONFIG_LINUXBOOT_UROOT_FORMAT=$(CONFIG_LINUXBOOT_UROOT_FORMAT) \ |
| 303 | CONFIG_LINUXBOOT_UROOT_INITCMD=$(CONFIG_LINUXBOOT_UROOT_INITCMD) \ |
| 304 | CONFIG_LINUXBOOT_UROOT_SHELL=$(CONFIG_LINUXBOOT_UROOT_SHELL) \ |
David Hendricks | fb03dd6 | 2018-08-08 19:16:55 -0700 | [diff] [blame] | 305 | CONFIG_LINUXBOOT_UROOT_COMMANDS=$(CONFIG_LINUXBOOT_UROOT_COMMANDS) \ |
Patrick Rudolph | 02c0814 | 2018-03-13 11:22:26 +0100 | [diff] [blame] | 306 | CONFIG_LINUXBOOT_UROOT_FILES=$(CONFIG_LINUXBOOT_UROOT_FILES) \ |
Marcello Sylvester Bauer | 78d0256 | 2018-11-11 18:03:26 +0100 | [diff] [blame] | 307 | CONFIG_LINUXBOOT_DTB_FILE=$(CONFIG_LINUXBOOT_DTB_FILE) |
Patrick Rudolph | 02c0814 | 2018-03-13 11:22:26 +0100 | [diff] [blame] | 308 | |
Marcello Sylvester Bauer | 78d0256 | 2018-11-11 18:03:26 +0100 | [diff] [blame] | 309 | payloads/external/LinuxBoot/linuxboot/bzImage: linuxboot |
| 310 | payloads/external/LinuxBoot/linuxboot/uImage: linuxboot |
Marcello Sylvester Bauer | e102c5d | 2018-11-21 17:45:43 +0100 | [diff] [blame] | 311 | payloads/external/LinuxBoot/linuxboot/initramfs_u-root.cpio: linuxboot |
Philipp Deppenwiese | 0f0e4e6 | 2018-06-19 20:22:32 +0200 | [diff] [blame] | 312 | |
Marcello Sylvester Bauer | 78d0256 | 2018-11-11 18:03:26 +0100 | [diff] [blame] | 313 | # Yabits |
Martin Roth | f2c3d80 | 2018-09-13 04:06:39 -0600 | [diff] [blame] | 314 | |
| 315 | payloads/external/Yabits/uefi/build/uefi.elf yabits: |
| 316 | $(MAKE) -C payloads/external/Yabits all \ |
Nico Huber | cf96c2a | 2019-07-24 20:17:14 +0200 | [diff] [blame] | 317 | XGCCPATH="$(XGCCPATH)" \ |
Martin Roth | f2c3d80 | 2018-09-13 04:06:39 -0600 | [diff] [blame] | 318 | CONFIG_YABITS_REVISION=$(CONFIG_YABITS_REVISION) \ |
| 319 | CONFIG_YABITS_REVISION_ID=$(CONFIG_YABITS_REVISION_ID) \ |
| 320 | CONFIG_YABITS_MASTER=$(CONFIG_YABITS_MASTER) \ |
| 321 | CONFIG_YABITS_STABLE=$(CONFIG_YABITS_STABLE) \ |
| 322 | MFLAGS= MAKEFLAGS= |
Zoltan Baldaszti | be58923 | 2020-09-17 19:45:21 +0200 | [diff] [blame] | 323 | |
| 324 | # BOOTBOOT |
| 325 | |
| 326 | payloads/external/BOOTBOOT/bootboot/dist/bootbootcb.elf: |
| 327 | $(MAKE) -C payloads/external/BOOTBOOT all |