From 888a98b872ed88f70b76103a95ef5d4140cfe2d7 Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Sun, 13 Mar 2016 13:00:43 -0600 Subject: payloads: add iPXE 'payload' build We already have the ability to add a pxe rom to cbfs, but it needs to be configured and built separately. This moves the existing Kconfig options for PXE from device/Kconfig and the top level Makefile.inc to payloads, and adds the option to download and build iPXE as part of the coreboot build process. This configures the serial output of iPXE to match coreboot's serial port configuration by editing the .h files. iPXE doesn't give any real build-time method of setting these configuration options. Change-Id: I3d77b2c6845b7f5f644440f6910c3b4533a0d415 Signed-off-by: Martin Roth Reviewed-on: https://review.coreboot.org/14085 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi --- payloads/external/Makefile.inc | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'payloads/external/Makefile.inc') diff --git a/payloads/external/Makefile.inc b/payloads/external/Makefile.inc index 5335db9c91..8825129b55 100644 --- a/payloads/external/Makefile.inc +++ b/payloads/external/Makefile.inc @@ -112,3 +112,31 @@ payloads/external/Memtest86Plus/memtest86plus/memtest: $(top)/$(DOTCONFIG) AS="$(AS_x86_32)" \ $(MEMTEST_SERIAL_OPTIONS) \ MFLAGS= MAKEFLAGS= + +PXE_ROM_PCI_ID:=$(subst $(comma),,$(CONFIG_PXE_ROM_ID)) + +ifeq ($(CONFIG_PXE_ROM),y) +PXE_ROM_FILE:=$(CONFIG_PXE_ROM_FILE) +endif +ifeq ($(CONFIG_BUILD_IPXE),y) +PXE_ROM_FILE:=payloads/external/iPXE/ipxe/ipxe.rom +endif + +ifeq ($(CONFIG_CONSOLE_SERIAL)$(CONFIG_DRIVERS_UART_8250IO),yy) +IPXE_UART=COM$(call int-add,$(CONFIG_UART_FOR_CONSOLE) 1) +endif + +cbfs-files-$(CONFIG_PXE_ROM)$(CONFIG_BUILD_IPXE) += pci$(CONFIG_PXE_ROM_ID).rom +pci$(CONFIG_PXE_ROM_ID).rom-file := $(PXE_ROM_FILE) +pci$(CONFIG_PXE_ROM_ID).rom-type := raw + +payloads/external/iPXE/ipxe/ipxe.rom ipxe: $(top)/$(DOTCONFIG) + $(MAKE) -C payloads/external/iPXE all \ + CROSS_COMPILE="$(CROSS_COMPILE_$(ARCH-ramstage-y))" \ + PXE_ROM_PCI_ID=$(PXE_ROM_PCI_ID) \ + CONFIG_IPXE_MASTER=$(CONFIG_IPXE_MASTER) \ + CONFIG_IPXE_STABLE=$(CONFIG_IPXE_STABLE) \ + CONSOLE_SERIAL=$(CONFIG_CONSOLE_SERIAL)$(CONFIG_DRIVERS_UART_8250IO) \ + IPXE_UART=$(IPXE_UART) \ + CONFIG_TTYS0_BAUD=$(CONFIG_TTYS0_BAUD) \ + MFLAGS= MAKEFLAGS= -- cgit v1.2.3