Store the payload config and revision in CBFS

Store the payload config and version files in CBFS if using a
SeaBIOS or filo payload if INCLUDE_CONFIG_FILE is enabled.

Change-Id: I0c1b4da8f6179b9cee06cecfa76bc631b43196e0
Signed-off-by: Martin Roth <gaumless@gmail.com>
Reviewed-on: http://review.coreboot.org/10607
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins)
diff --git a/Makefile.inc b/Makefile.inc
index 7f5563a2..1cac01b 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -647,6 +647,16 @@
 	$(CBFSTOOL) $@.tmp update-fit -n cpu_microcode_blob.bin -x $(CONFIG_CPU_INTEL_NUM_FIT_ENTRIES)
 endif
 endif
+ifeq ($(CONFIG_INCLUDE_CONFIG_FILE),y)
+	@printf "    CONFIG      $(PAYLOAD_CONFIG)\n"
+	if [ -f "$(PAYLOAD_CONFIG)" ]; then \
+		$(CBFSTOOL) $@.tmp add -f  "$(PAYLOAD_CONFIG)" -n payload_config -t raw; \
+	fi
+	@printf "    REVISION   $(PAYLOAD_VERSION)\n"
+	if [ -f "$(PAYLOAD_VERSION)" ]; then \
+		$(CBFSTOOL) $@.tmp add -f "$(PAYLOAD_VERSION)" -n payload_revision -t raw; \
+	fi
+endif
 	mv $@.tmp $@
 	@printf "    CBFSPRINT  $(subst $(obj)/,,$(@))\n\n"
 	$(CBFSTOOL) $@ print