From 3c9461520f734b92f27345da515160d8522eeda6 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Sat, 4 Nov 2017 03:14:03 +0900 Subject: [PATCH] uniphier: make sure to create build directory before ROT key Building the UniPhier platform in parallel with TRUSTED_BOARD_BOOT=1 could fail due to non-existing directory. It might be difficult to reproduce, but here is an easier way to trigger the problem: $ make PLAT=uniphier TRUSTED_BOARD_BOOT=1 MBEDTLS_DIR=mbedtls certificates OPENSSL build/uniphier/release/rot_key.pem /bin/sh: 1: cannot create build/uniphier/release/rot_key.pem: Directory nonexistent make: *** [build/uniphier/release/rot_key.pem] Error 2 The $(ROT_KEY) must depend on $(BUILD_PLAT) so that the build directory is created before the key. Signed-off-by: Masahiro Yamada --- plat/socionext/uniphier/platform.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plat/socionext/uniphier/platform.mk b/plat/socionext/uniphier/platform.mk index e6f510e0e..c91abb6be 100644 --- a/plat/socionext/uniphier/platform.mk +++ b/plat/socionext/uniphier/platform.mk @@ -101,7 +101,7 @@ $(BUILD_PLAT)/bl1/uniphier_rotpk.o: $(ROTPK_HASH) $(BUILD_PLAT)/bl2/uniphier_rotpk.o: $(ROTPK_HASH) certificates: $(ROT_KEY) -$(ROT_KEY): +$(ROT_KEY): | $(BUILD_PLAT) @echo " OPENSSL $@" $(Q)openssl genrsa 2048 > $@ 2>/dev/null -- GitLab