boot/optee-os: fix TA files installation
authorEtienne Carriere <etienne.carriere@linaro.org>
Tue, 14 May 2019 08:53:13 +0000 (10:53 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Tue, 14 May 2019 15:45:53 +0000 (17:45 +0200)
This change fixes the TA binary files install sequence that were
previously install in target filesystem though
OPTEE_OS_INSTALL_IMAGES_CMDS instead of expected
OPTEE_OS_INSTALL_TARGET_CMDS.

This change removes useless mkdir prior call to $(INSTALL) that
already handles parent directory creation when needed.

This change conditions the .ta files installation upon their
availability as they may exist or not depending on the exact OPTEE
version/configuration selected.

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
boot/optee-os/optee-os.mk

index 6da20a9f3ebb29dfe485cd41eb9b0c6ed6fb256d..b22f560ba7fd2185f789f128c38300cda79d6810 100644 (file)
@@ -75,10 +75,10 @@ endef
 endif # BR2_TARGET_OPTEE_OS_CORE
 
 ifeq ($(BR2_TARGET_OPTEE_OS_SERVICES),y)
-define OPTEE_OS_INSTALL_IMAGES_SERVICES
-       mkdir -p $(TARGET_DIR)/lib/optee_armtz
-       $(INSTALL) -D -m 444 -t $(TARGET_DIR)/lib/optee_armtz \
-               $(@D)/$(OPTEE_OS_BUILDDIR_OUT)/ta/*/*.ta
+define OPTEE_OS_INSTALL_TARGET_CMDS
+       $(if $(wildcard $(@D)/$(OPTEE_OS_BUILDDIR_OUT)/ta/*/*.ta),
+               $(INSTALL) -D -m 444 -t $(TARGET_DIR)/lib/optee_armtz \
+                       $(@D)/$(OPTEE_OS_BUILDDIR_OUT)/ta/*/*.ta)
 endef
 endif # BR2_TARGET_OPTEE_OS_SERVICES