hikey: uefi-tools: Update UEFI tools to match updated UEFI sources

Copied over from https://github.com/96boards-hikey/uefi-tools
SHA1: 42eac07beb4da42a182d2a87d6b2e928fc9a31cf

Change-Id: Iee58d079ee565bbb83849d357caac2b21b9be043
Signed-off-by: John Stultz <john.stultz@linaro.org>
diff --git a/uefi-tools/opteed-build.sh b/uefi-tools/opteed-build.sh
index 3c759eb..702860e 100755
--- a/uefi-tools/opteed-build.sh
+++ b/uefi-tools/opteed-build.sh
@@ -7,7 +7,6 @@
 # parse-platforms.py and platforms.config.
 #
 
-TOOLS_DIR="`dirname $0`"
 . "$TOOLS_DIR"/common-functions
 
 export CFG_TEE_CORE_LOG_LEVEL=2  # 0=none 1=err 2=info 3=debug 4=flow
@@ -100,10 +99,11 @@
 		#
 		# Copy resulting images to UEFI image dir
 		#
+		TOS_BIN="`$TOOLS_DIR/parse-platforms.py $PLATFORM_CONFIG -p $1 get -o tos_bin`"
 		if [ $VERBOSE -eq 1 ]; then
-			echo "Copying tee.bin to "$EDK2_DIR/Build/$PLATFORM_IMAGE_DIR/$BUILD_PROFILE/FV/""
+			echo "Copying '$TOS_BIN' to '$EDK2_DIR/Build/$PLATFORM_IMAGE_DIR/$BUILD_PROFILE/FV/'"
 		fi
-		cp -a out/arm-plat-"$TOS_PLATFORM"/core/tee.bin "$EDK2_DIR/Build/$PLATFORM_IMAGE_DIR/$BUILD_PROFILE/FV/"
+		cp -a out/arm-plat-"$TOS_PLATFORM"/core/"$TOS_BIN" "$EDK2_DIR/Build/$PLATFORM_IMAGE_DIR/$BUILD_PROFILE/FV/"
 	else
 		return 1
 	fi