From 9a5cc9558616def2054d71f6ce82a7350b24e4b9 Mon Sep 17 00:00:00 2001 From: Maciej Pijanowski Date: Wed, 29 May 2024 13:28:14 +0200 Subject: [PATCH] util/smmstoretool: explain what happens when no store is found We are going to expose ths tool to end users, and want to take care that the presented information can be consumed by them. The current code simply prints below warnings if we use release binary available for end-user to download: No firmware volume header present No valid firmware volume was found It will be concerning and not clear to end users, they might not understant why it happens, what are the implications, and whether it is something that they should worry about. This commit tries to explain what actually happens here. Change-Id: Iaa2678f5ae7c243811484c0567ced97ae0b3fc0a Signed-off-by: Maciej Pijanowski Reviewed-on: https://review.coreboot.org/c/coreboot/+/82692 Tested-by: build bot (Jenkins) Reviewed-by: Sergii Dmytruk --- util/smmstoretool/storage.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/util/smmstoretool/storage.c b/util/smmstoretool/storage.c index 8a02384108..87284f7bf3 100644 --- a/util/smmstoretool/storage.c +++ b/util/smmstoretool/storage.c @@ -50,6 +50,12 @@ bool storage_open(const char store_file[], struct storage_t *storage, bool rw) goto error; } + fprintf(stderr, + "\nThe variable store has not been found in the ROM image\n" + "and is about to be initialized. This situation is normal\n" + "for a release image, as the variable store is usually\n" + "initialized on the first boot of the platform.\n\n"); + if (!fv_init(storage->region)) { fprintf(stderr, "Failed to create variable store in \"%s\"\n",