Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing dependencies break parallel fTPM builds #96

Open
jan-kiszka opened this issue Jul 21, 2023 · 1 comment
Open

Missing dependencies break parallel fTPM builds #96

jan-kiszka opened this issue Jul 21, 2023 · 1 comment

Comments

@jan-kiszka
Copy link

It seems we need

--- a/Samples/ARM32-FirmwareTPM/optee_ta/fTPM/lib/wolf/sub.mk
+++ b/Samples/ARM32-FirmwareTPM/optee_ta/fTPM/lib/wolf/sub.mk
@@ -56,3 +56,5 @@ srcs-y += wolf_symlink/wolfcrypt/src/tfm.c
 srcs-y += wolf_symlink/wolfcrypt/src/wolfmath.c
 srcs-y += wolf_symlink/wolfcrypt/src/des3.c
 srcs-y += wolf_symlink/wolfcrypt/src/random.c
+
+$(srcs-y): wolf_symlink

to fix sporadic build failures on larger build machines, see also https://groups.google.com/d/msgid/isar-users/424e2519-2dfa-5379-a16e-ca505e6135fe%40siemens.com.

This is more to help others as I can't open a PR before I figured out how to deal with https://opensource.microsoft.com/cla/ on the Siemens side (CLAs are complex to handle, and this process here is seems to be even more complex).

@jan-kiszka
Copy link
Author

That change didn't help, this one does:

diff --git a/Samples/ARM32-FirmwareTPM/optee_ta/Makefile b/Samples/ARM32-FirmwareTPM/optee_ta/Makefile
index ddf6784..cef0c6f 100644
--- a/Samples/ARM32-FirmwareTPM/optee_ta/Makefile
+++ b/Samples/ARM32-FirmwareTPM/optee_ta/Makefile
@@ -3,8 +3,15 @@ export V?=0
 
 .PHONY: all
 all:
+	#
+	# Link the required external code into the libraries folder. OP-TEE
+	# build does not work well when accessing anything below the root
+	# directory. Use symlinks to trick it.
+	#
+	$(MAKE) -C fTPM CROSS_COMPILE=$(TA_CROSS_COMPILE) create_lib_symlinks
+	# Run the actual build
 	$(MAKE) -C fTPM CROSS_COMPILE=$(TA_CROSS_COMPILE)
 
 .PHONY: clean
 clean:
-	$(MAKE) -C fTPM clean
\ No newline at end of file
+	$(MAKE) -C fTPM clean
diff --git a/Samples/ARM32-FirmwareTPM/optee_ta/fTPM/sub.mk b/Samples/ARM32-FirmwareTPM/optee_ta/fTPM/sub.mk
index 2d9ba24..4eaf286 100644
--- a/Samples/ARM32-FirmwareTPM/optee_ta/fTPM/sub.mk
+++ b/Samples/ARM32-FirmwareTPM/optee_ta/fTPM/sub.mk
@@ -36,12 +36,6 @@ cflags-y += -Os
 cflags-y += -DNDEBUG
 endif
 
-#
-# Link the required external code into the libraries folder. OP-TEE build
-# does not work well when accessing anything below the root directory. Use
-# symlinks to trick it.
-#
-all: create_lib_symlinks
 clean: clean_lib_symlinks
 
 subdirs-y += lib

Maybe there is an even more elegant way to declare dependencies of all ta_dev_kit source, but I didn't find it yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant