Yu-Ping Wu has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/39390 )
Change subject: cbfstool: Add dummy vboot callback vb2ex_printf() ......................................................................
cbfstool: Add dummy vboot callback vb2ex_printf()
With CL:2084062, macro VB2_TRY() is introduced, which is used within various vboot2 APIs such as vb2_hash_verify(). vb2ex_printf() is used in this macro to print error messages, but it is not defined in cbfstool. Therefore, this patch adds a callback function vb2ex_printf(). Since vprintk() is required to implement vb2ex_printf() and it is not implemented in cbfstool, this callback is currently added as a dummy function. We also don't lose anything because no messages were printed before CL:2084062.
BRANCH=none BUG=chromium:1049032 TEST=emerge-nami coreboot-utils
Change-Id: Ifc826896d895f53d69ea559a88f75672c2ec3146 Signed-off-by: Yu-Ping Wu yupingso@chromium.org --- M util/cbfstool/Makefile.inc A util/cbfstool/vboot_lib.c 2 files changed, 25 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/90/39390/1
diff --git a/util/cbfstool/Makefile.inc b/util/cbfstool/Makefile.inc index 356b295..e2eb154 100644 --- a/util/cbfstool/Makefile.inc +++ b/util/cbfstool/Makefile.inc @@ -22,6 +22,7 @@ cbfsobj += rmodule.o cbfsobj += xdr.o cbfsobj += partitioned_file.o +cbfsobj += vboot_lib.o # COMMONLIB cbfsobj += cbfs.o cbfsobj += fsp_relocate.o @@ -77,6 +78,7 @@ ifitobj += cbfs-mkstage.o ifitobj += cbfs-mkpayload.o ifitobj += rmodule.o +ifitobj += vboot_lib.o # COMMONLIB ifitobj += cbfs.o ifitobj += mem_pool.o diff --git a/util/cbfstool/vboot_lib.c b/util/cbfstool/vboot_lib.c new file mode 100644 index 0000000..d8933e2 --- /dev/null +++ b/util/cbfstool/vboot_lib.c @@ -0,0 +1,23 @@ +/* + * This file is part of the coreboot project. + * + * Copyright 2020 Google Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include <vb2_api.h> + +#include "common.h" +#include "console/console.h" + +void vb2ex_printf(unused const char *func, unused const char *fmt, ...) +{ +}