From dad2934c4914031019c6f4b7886820d0a6a9bc4b Mon Sep 17 00:00:00 2001 From: Manish V Badarkhe Date: Thu, 3 Sep 2020 16:54:47 +0100 Subject: [PATCH] plat: Fix build issue for qemu and rpi3 platforms Coverity build periodically throws below errors(non-consistently) for 'QEMU' and 'RPI3' platforms. /bin/sh: 1: cannot create build/qemu/debug/rot_key.pem: Directory nonexistent plat/qemu/qemu/platform.mk:86: recipe for target 'build/qemu/debug/ rot_key.pem' failed make: *** [build/qemu/debug/rot_key.pem] Error 2 /bin/sh: 1: cannot create /work/workspace/workspace/tf-coverity/build /rpi3/debug/rot_key.pem: Directory nonexistent plat/rpi/rpi3/platform.mk:214: recipe for target '/work/workspace/ workspace/tf-coverity/build/rpi3/debug/rot_key.pem' failed make: *** [/work/workspace/workspace/tf-coverity/build/rpi3/debug/ rot_key.pem] Error 2 Issue seems to be occurred when 'ROT key' is generated before creating the platform build folder(for e.g.build/qemu/debug). Changes are made to fix this issue by adding orderly dependancy of the platform folder for the 'ROT key' creation which ensures that platform folder is created before generating 'ROT key'. Signed-off-by: Manish V Badarkhe Change-Id: I20c82172dde84e4c7f2373c0bd095d353f845d38 --- plat/qemu/qemu/platform.mk | 2 +- plat/rpi/rpi3/platform.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plat/qemu/qemu/platform.mk b/plat/qemu/qemu/platform.mk index 944143795..14bf049be 100644 --- a/plat/qemu/qemu/platform.mk +++ b/plat/qemu/qemu/platform.mk @@ -84,7 +84,7 @@ ifneq (${TRUSTED_BOARD_BOOT},0) certificates: $(ROT_KEY) - $(ROT_KEY): + $(ROT_KEY): | $(BUILD_PLAT) @echo " OPENSSL $@" $(Q)openssl genrsa 2048 > $@ 2>/dev/null diff --git a/plat/rpi/rpi3/platform.mk b/plat/rpi/rpi3/platform.mk index 4d627b8a5..6c239230d 100644 --- a/plat/rpi/rpi3/platform.mk +++ b/plat/rpi/rpi3/platform.mk @@ -210,7 +210,7 @@ ifneq (${TRUSTED_BOARD_BOOT},0) certificates: $(ROT_KEY) - $(ROT_KEY): + $(ROT_KEY): | $(BUILD_PLAT) @echo " OPENSSL $@" $(Q)openssl genrsa 2048 > $@ 2>/dev/null