Patrick Georgi has uploaded this change for review. ( https://review.coreboot.org/c/vboot/+/42931 )
Change subject: Allow building for non-CrOS environments ......................................................................
Allow building for non-CrOS environments
There's some code that is architecture specific, but looking at it, it's code for Chrome OS devices that just happens to be split along ISA lines.
When compiling with NOCROS=1, these parts are left out, which allows building on unsupported ISA (such as POWER) and probably also helps support non-Linux hosts.
The issue was reported at https://ticket.coreboot.org/issues/145 where a coreboot user wanted to build a vboot-enabled coreboot configuration (which builds futility for the signing part) on a POWER host system, which failed because we lack an implementation of the crossystem interfaces for POWER.
BUG=none BRANCH=none TEST=Built upstream coreboot with a vboot-enabled target inside qemu-user-ppc64 and https://review.coreboot.org/c/coreboot/+/42853 applied. Doing so works with these patches applied while it failed without them.
Change-Id: I4aaeb56d4521c426a520bc9a1bb49497bec86c35 Signed-off-by: Patrick Georgi pgeorgi@google.com --- M Makefile 1 file changed, 18 insertions(+), 7 deletions(-)
git pull ssh://review.coreboot.org:29418/vboot refs/changes/31/42931/1
diff --git a/Makefile b/Makefile index b35dc91..b06e841 100644 --- a/Makefile +++ b/Makefile @@ -451,9 +451,7 @@ cgpt/cgpt_repair.c \ cgpt/cgpt_show.c \ futility/dump_kernel_config_lib.c \ - host/arch/${ARCH}/lib/crossystem_arch.c \ host/lib/chromeos_config.c \ - host/lib/crossystem.c \ host/lib/crypto.c \ host/lib/file_keys.c \ host/lib/fmap.c \ @@ -471,6 +469,12 @@ host/lib21/host_misc.c \ host/lib21/host_signature.c
+ifneq (${NOCROS},1) +UTILLIB_SRCS += \ + host/arch/${ARCH}/lib/crossystem_arch.c \ + host/lib/crossystem.c +endif + UTILLIB_OBJS = ${UTILLIB_SRCS:%.c=${BUILD}/%.o} ALL_OBJS += ${UTILLIB_OBJS}
@@ -510,7 +514,6 @@ firmware/stub/vboot_api_stub_disk.c \ firmware/stub/vboot_api_stub_init.c \ futility/dump_kernel_config_lib.c \ - host/arch/${ARCH}/lib/crossystem_arch.c \ host/lib/chromeos_config.c \ host/lib/crossystem.c \ host/lib/crypto.c \ @@ -520,6 +523,10 @@ host/lib/subprocess.c \ ${TLCL_SRCS}
+ifneq (${NOCROS},1) +HOSTLIB_SRCS += host/arch/${ARCH}/lib/crossystem_arch.c +endif + HOSTLIB_OBJS = ${HOSTLIB_SRCS:%.c=${BUILD}/%.o} ALL_OBJS += ${HOSTLIB_OBJS}
@@ -631,7 +638,6 @@ futility/cmd_pcr.c \ futility/cmd_show.c \ futility/cmd_sign.c \ - futility/cmd_update.c \ futility/cmd_validate_rec_mrc.c \ futility/cmd_vbutil_firmware.c \ futility/cmd_vbutil_firmware.c \ @@ -645,12 +651,17 @@ futility/file_type_usbpd1.c \ futility/misc.c \ futility/ryu_root_header.c \ + futility/vb1_helper.c \ + futility/vb2_helper.c + +ifneq (${NOCROS},1) +FUTIL_SRCS += \ + futility/cmd_update.c \ futility/updater.c \ futility/updater_archive.c \ futility/updater_quirks.c \ - futility/updater_utils.c \ - futility/vb1_helper.c \ - futility/vb2_helper.c + futility/updater_utils.c +endif
# List of commands built in futility. FUTIL_CMD_LIST = ${BUILD}/gen/futility_cmds.c