Felix Held submitted this change.

View Change

Approvals: build bot (Jenkins): Verified Nico Huber: Looks good to me, approved Angel Pons: Looks good to me, approved Tim Wawrzynczak: Looks good to me, but someone else must approve
payloads/Makefile.inc: Add warning for image built with no payload

Writing a coreboot image without a payload to a board's flash chip will
result in a non-bootable system, so warn the user if this is the case.

Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
Change-Id: I15ae9548a45e9f566c84db41e8e171c6bc179057
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60025
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
---
M payloads/Makefile.inc
1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/payloads/Makefile.inc b/payloads/Makefile.inc
index d89b5ba..83194c2 100644
--- a/payloads/Makefile.inc
+++ b/payloads/Makefile.inc
@@ -48,5 +48,16 @@
print-repo-info-payloads:
-$(foreach payload, $(PAYLOADS_LIST), $(MAKE) -C $(payload) print-repo-info 2>/dev/null; )

+ifeq ($(CONFIG_PAYLOAD_NONE),y)
+files_added:: warn_no_payload
+endif
+
+warn_no_payload:
+ printf "\n\t** WARNING **\n"
+ printf "coreboot has been built without a payload. Writing\n"
+ printf "a coreboot image without a payload to your board's\n"
+ printf "flash chip will result in a non-booting system. You\n"
+ printf "can use cbfstool to add a payload to the image.\n\n"
+
.PHONY: force-payload coreinfo nvramcui
-.PHONY: clean-payloads distclean-payloads print-repo-info-payloads
+.PHONY: clean-payloads distclean-payloads print-repo-info-payloads warn_no_payload

To view, visit change 60025. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I15ae9548a45e9f566c84db41e8e171c6bc179057
Gerrit-Change-Number: 60025
Gerrit-PatchSet: 4
Gerrit-Owner: Nicholas Chin
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: AreYouLoco? <areyouloco@paranoici.org>
Gerrit-Reviewer: Felix Held <felix-coreboot@felixheld.de>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Paul Menzel <paulepanter@mailbox.org>
Gerrit-Reviewer: Raul Rangel <rrangel@chromium.org>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak@chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-MessageType: merged