summaryrefslogtreecommitdiff
path: root/Makefile.inc
diff options
context:
space:
mode:
authorMartin Roth <martinroth@google.com>2015-12-11 12:24:33 -0700
committerMartin Roth <martinroth@google.com>2016-02-18 20:53:42 +0100
commitdbae4d03ef6f1915a9508116e1bc9777f4ba33ec (patch)
treec3e80fb4395087c734a3bcba65120805bb966296 /Makefile.inc
parent654fd0703ad8f785faa49b22bf59036c6eb47f6c (diff)
Payloads: Add U-Boot as a coreboot-payload
- Add Kconfig and Makefile options to use U-Boot as a payload. - Add Kconfig option for extra cbfstool command line arguments. - Add Kconfig & Makefile option to load the payload as a flat binary. - Add u-boot directory to .gitignore. This is currently working for X-86 only. Graphics worked in U-Boot correctly by initializing the VBIOS and setting up a console mode. Tested in QEMU and on Minnowboard Max. Got into U-Boot, have not booted an OS yet. Change-Id: Ia122a4ad7cd7d96107c1552b0376c8106ca8fb92 Signed-off-by: Martin Roth <martinroth@google.com> Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com> Reviewed-on: https://review.coreboot.org/12714 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'Makefile.inc')
-rw-r--r--Makefile.inc15
1 files changed, 13 insertions, 2 deletions
diff --git a/Makefile.inc b/Makefile.inc
index 8f45fc29ce..b8cba07bb0 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -448,6 +448,7 @@ clean-for-update-target:
rm -f $(obj)/mainboard/$(MAINBOARDDIR)/bootblock.* $(obj)/dsdt.*
rm -f $(obj)/cpu/x86/smm/smm_bin.c $(obj)/cpu/x86/smm/smm.* $(obj)/cpu/x86/smm/smm
$(MAKE) -C payloads/external/SeaBIOS -f Makefile.inc clean
+ $(MAKE) -C payloads/external/U-Boot -f Makefile.inc clean
clean-target:
rm -f $(obj)/coreboot*
@@ -590,10 +591,13 @@ endif
# $(call cbfs-add-cmd-for-region,file in extract_nth format,region name)
define cbfs-add-cmd-for-region
$(CBFSTOOL) $@.tmp \
- add$(if $(filter stage,$(call extract_nth,3,$(1))),-stage)$(if $(filter payload,$(call extract_nth,3,$(1))),-payload) \
+ add$(if $(filter stage,$(call extract_nth,3,$(1))),-stage)$(if \
+ $(filter payload,$(call extract_nth,3,$(1))),-payload)$(if \
+ $(filter flat-binary,$(call extract_nth,3,$(1))),-flat-binary) \
-f $(call extract_nth,1,$(1)) \
-n $(call extract_nth,2,$(1)) \
- $(if $(filter-out stage,$(call extract_nth,3,$(1))),-t $(call extract_nth,3,$(1))) \
+ $(if $(filter-out flat-binary,$(filter-out stage,$(call \
+ extract_nth,3,$(1)))),-t $(call extract_nth,3,$(1))) \
$(if $(call extract_nth,4,$(1)),-c $(call extract_nth,4,$(1))) \
$(cbfs-autogen-attributes) \
-r $(2) \
@@ -730,6 +734,9 @@ ifneq ($(strip $(call strip_quotes,$(CONFIG_LINUX_INITRD))),)
ADDITIONAL_PAYLOAD_CONFIG+=-I $(CONFIG_LINUX_INITRD)
endif
endif
+ifneq ($(strip $(call strip_quotes,$(CONFIG_PAYLOAD_OPTIONS))),)
+ ADDITIONAL_PAYLOAD_CONFIG+=$(strip $(call strip_quotes,$(CONFIG_PAYLOAD_OPTIONS)))
+endif
ifeq ($(CONFIG_HAVE_REFCODE_BLOB),y)
REFCODE_BLOB=$(obj)/refcode.rmod
@@ -790,7 +797,11 @@ $(CONFIG_CBFS_PREFIX)/ramstage-compression := $(CBFS_COMPRESS_FLAG)
cbfs-files-y += $(CONFIG_CBFS_PREFIX)/payload
$(CONFIG_CBFS_PREFIX)/payload-file := $(CONFIG_PAYLOAD_FILE)
+ifeq ($(CONFIG_PAYLOAD_IS_FLAT_BINARY),y)
+$(CONFIG_CBFS_PREFIX)/payload-type := flat-binary
+else
$(CONFIG_CBFS_PREFIX)/payload-type := payload
+endif
$(CONFIG_CBFS_PREFIX)/payload-compression := $(CBFS_PAYLOAD_COMPRESS_FLAG)
$(CONFIG_CBFS_PREFIX)/payload-options := $(ADDITIONAL_PAYLOAD_CONFIG)