Build project with CMake, add rpmbuild spec 92/137592/4
authorLukasz Kostyra <l.kostyra@samsung.com>
Thu, 6 Jul 2017 08:15:56 +0000 (10:15 +0200)
committerLukasz Kostyra <l.kostyra@samsung.com>
Wed, 26 Jul 2017 11:39:15 +0000 (13:39 +0200)
Change-Id: I79609fde1ed6869d30294f5264988630874e3dcf

77 files changed:
CMakeLists.txt [new file with mode: 0644]
TEECLib/.gitignore [deleted file]
TEECLib/CMakeLists.txt [new file with mode: 0644]
TEEStub/.gitignore [deleted file]
TEEStub/CMakeLists.txt [new file with mode: 0644]
TEEStub/TEEStubServer/ConnectionSession.h
TEEStub/TEEStubServer/TAProperty.cpp [deleted file]
TEEStub/TEEStubServer/TAProperty.h [deleted file]
build/TEECLib/makefile [deleted file]
build/TEECLib/objects.mk [deleted file]
build/TEECLib/sources.mk [deleted file]
build/TEECLib/src/subdir.mk [deleted file]
build/TEEStub/PropertyAccess/subdir.mk [deleted file]
build/TEEStub/TACommands/subdir.mk [deleted file]
build/TEEStub/TEEStubServer/subdir.mk [deleted file]
build/TEEStub/TaskStrategy/subdir.mk [deleted file]
build/TEEStub/makefile [deleted file]
build/TEEStub/objects.mk [deleted file]
build/TEEStub/sources.mk [deleted file]
build/TEEStub/subdir.mk [deleted file]
build/build.sh [deleted file]
build/log/makefile [deleted file]
build/log/objects.mk [deleted file]
build/log/sources.mk [deleted file]
build/log/subdir.mk [deleted file]
build/osal/makefile [deleted file]
build/osal/objects.mk [deleted file]
build/osal/sources.mk [deleted file]
build/osal/subdir.mk [deleted file]
build/simulatordaemon/makefile [deleted file]
build/simulatordaemon/objects.mk [deleted file]
build/simulatordaemon/sources.mk [deleted file]
build/simulatordaemon/src/ClientCommands/subdir.mk [deleted file]
build/simulatordaemon/src/ResponseCommands/subdir.mk [deleted file]
build/simulatordaemon/src/TABinaryManager/subdir.mk [deleted file]
build/simulatordaemon/src/subdir.mk [deleted file]
build/ssflib/dep/cryptocore/source/base/subdir.mk [deleted file]
build/ssflib/dep/cryptocore/source/middle/subdir.mk [deleted file]
build/ssflib/dep/cryptocore/source/subdir.mk [deleted file]
build/ssflib/dep/swdss/source/subdir.mk [deleted file]
build/ssflib/dep/time/subdir.mk [deleted file]
build/ssflib/dep/uci/source/subdir.mk [deleted file]
build/ssflib/makefile [deleted file]
build/ssflib/objects.mk [deleted file]
build/ssflib/sources.mk [deleted file]
build/ssflib/src/subdir.mk [deleted file]
log/.gitignore [deleted file]
log/CMakeLists.txt [new file with mode: 0644]
log/log.h
osal/.gitignore [deleted file]
osal/CMakeLists.txt [new file with mode: 0644]
osal/OsaIpc.c
packaging/tef-simulator.manifest [new file with mode: 0644]
packaging/tef-simulator.spec [new file with mode: 0644]
simulatordaemon/.gitignore [deleted file]
simulatordaemon/CMakeLists.txt [new file with mode: 0644]
simulatordaemon/inc/SecurityChecker.h
simulatordaemon/inc/TEEContext.h
simulatordaemon/src/Session.cpp
simulatordaemon/src/SimulatorDaemonServer.cpp
simulatordaemon/src/TABinaryManager/Debug/TABinaryManager [deleted file]
simulatordaemon/src/TABinaryManager/Debug/TABinaryManager.d [deleted file]
simulatordaemon/src/TABinaryManager/Debug/TAManifest.d [deleted file]
simulatordaemon/src/TABinaryManager/Debug/TAUnpack.d [deleted file]
simulatordaemon/src/TABinaryManager/Debug/TestMain.d [deleted file]
simulatordaemon/src/TABinaryManager/Debug/makefile [deleted file]
simulatordaemon/src/TABinaryManager/Debug/objects.mk [deleted file]
simulatordaemon/src/TABinaryManager/Debug/sources.mk [deleted file]
simulatordaemon/src/TABinaryManager/Debug/subdir.mk [deleted file]
simulatordaemon/src/TABinaryManager/TABinaryManager.cpp
simulatordaemon/src/TAFactory.cpp
simulatordaemon/src/security.c
ssflib/.gitignore [deleted file]
ssflib/CMakeLists.txt [new file with mode: 0644]
ssflib/dep/swdss/source/secure_file.cpp
ssflib/dep/uci/include/uci_api.h
ssflib/dep/uci/source/uci_api.c

diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644 (file)
index 0000000..f1aa4d9
--- /dev/null
@@ -0,0 +1,108 @@
+# Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
+#
+#    Licensed under the Apache License, Version 2.0 (the "License");
+#    you may not use this file except in compliance with the License.
+#    You may obtain a copy of the License at
+#
+#        http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS,
+#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#    See the License for the specific language governing permissions and
+#    limitations under the License.
+#
+# @file
+# @author  Lukasz Kostyra (l.kostyra@samsung.com)
+# @brief   Main CMakeLists for tef-simulator
+#
+
+############################# Check minimum CMake version #####################
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT("tef-simulator")
+
+############################# cmake packages ##################################
+
+INCLUDE(FindPkgConfig)
+
+############################# compiler flags ##################################
+
+# If supported for the target machine, emit position-independent code,suitable
+# for dynamic linking and avoiding any limit on the size of the global offset
+# table. This option makes a difference on the m68k, PowerPC and SPARC.
+ADD_DEFINITIONS("-fPIC")
+
+# SECOS SIM define used in the project
+ADD_DEFINITIONS("-D_SECOS_SIM_")
+
+# Disable std::array in boost - daemon is built around boost's implementation of array
+ADD_DEFINITIONS("-DBOOST_ASIO_DISABLE_STD_ARRAY")
+
+ADD_DEFINITIONS("-D_GNU_SOURCE")
+
+# Set compiler warning flags
+# TODO uncomment these when it's cleanup time
+#ADD_DEFINITIONS("-Werror")                      # Make all warnings into errors.
+#ADD_DEFINITIONS("-Wall")                        # Generate all warnings
+#ADD_DEFINITIONS("-Wextra")                      # Generate even more extra warnings
+
+
+IF (CMAKE_BUILD_TYPE MATCHES "DEBUG")
+    ADD_DEFINITIONS("-DTIZEN_DEBUG_ENABLE")
+    ADD_DEFINITIONS("-DBUILD_TYPE_DEBUG")
+    ADD_DEFINITIONS("-ggdb -O0")
+    # undefine _FORTIFY_SOURCE to supress warnings
+    ADD_COMPILE_OPTIONS("-U_FORTIFY_SOURCE")
+ENDIF (CMAKE_BUILD_TYPE MATCHES "DEBUG")
+
+############################# targets #########################################
+
+SET(TARGET_TEF_SIMULATOR tef-simulator)
+SET(TARGET_TEF_SIMULATOR_LOG ${TARGET_TEF_SIMULATOR}-log)
+SET(TARGET_TEF_SIMULATOR_OSAL ${TARGET_TEF_SIMULATOR}-osal)
+SET(TARGET_TEF_SIMULATOR_DAEMON ${TARGET_TEF_SIMULATOR}-daemon)
+SET(TARGET_TEF_SIMULATOR_SSFLIB ${TARGET_TEF_SIMULATOR}-ssflib)
+
+# below targets need different names due to linking with CAs and TAs (libteec for client)
+SET(TARGET_TEF_SIMULATOR_TEEC_LIB teec)
+SET(TARGET_TEF_SIMULATOR_TEE_STUB TEEStub)
+
+############################# sub-project paths ###############################
+
+# project root
+SET(TEF_SIMULATOR_ROOT_PATH ${PROJECT_SOURCE_DIR})
+SET(TEF_SIMULATOR_INCLUDE_PATH ${TEF_SIMULATOR_ROOT_PATH}/include)
+
+# log
+SET(LOG_PATH ${TEF_SIMULATOR_ROOT_PATH}/log)
+
+# osal
+SET(OSAL_PATH ${TEF_SIMULATOR_ROOT_PATH}/osal)
+
+# ssflib
+SET(SSFLIB_PATH ${TEF_SIMULATOR_ROOT_PATH}/ssflib)
+SET(SSFLIB_DEP_PATH ${SSFLIB_PATH}/dep)
+SET(SSFLIB_DEP_CRYPTOCORE_PATH ${SSFLIB_DEP_PATH}/cryptocore)
+SET(SSFLIB_DEP_SWDSS_PATH ${SSFLIB_DEP_PATH}/swdss)
+SET(SSFLIB_DEP_TIME_PATH ${SSFLIB_DEP_PATH}/time)
+SET(SSFLIB_DEP_UCI_PATH ${SSFLIB_DEP_PATH}/uci)
+
+# simulatordaemon
+SET(DAEMON_PATH ${TEF_SIMULATOR_ROOT_PATH}/simulatordaemon)
+
+# TEECLib
+SET(TEEC_LIB_PATH ${TEF_SIMULATOR_ROOT_PATH}/TEECLib)
+
+# TEEStub
+SET(TEE_STUB_PATH ${TEF_SIMULATOR_ROOT_PATH}/TEEStub)
+
+
+############################# subdirectories ##################################
+
+ADD_SUBDIRECTORY(log)
+ADD_SUBDIRECTORY(osal)
+ADD_SUBDIRECTORY(simulatordaemon)
+ADD_SUBDIRECTORY(ssflib)
+ADD_SUBDIRECTORY(TEECLib)
+ADD_SUBDIRECTORY(TEEStub)
diff --git a/TEECLib/.gitignore b/TEECLib/.gitignore
deleted file mode 100755 (executable)
index 3df573f..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/Debug/
diff --git a/TEECLib/CMakeLists.txt b/TEECLib/CMakeLists.txt
new file mode 100644 (file)
index 0000000..318b9da
--- /dev/null
@@ -0,0 +1,49 @@
+# Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
+#
+#    Licensed under the Apache License, Version 2.0 (the "License");
+#    you may not use this file except in compliance with the License.
+#    You may obtain a copy of the License at
+#
+#        http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS,
+#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#    See the License for the specific language governing permissions and
+#    limitations under the License.
+#
+# @file
+# @author  Lukasz Kostyra (l.kostyra@samsung.com)
+# @brief   CMakeLists for tef-simulator TEE Client library
+#
+
+FIND_PACKAGE(Threads REQUIRED)
+
+SET(TEEC_LIB_SOURCES
+    ${TEEC_LIB_PATH}/src/teec_api.c
+    ${TEEC_LIB_PATH}/src/teec_connection.c
+    )
+
+ADD_LIBRARY(${TARGET_TEF_SIMULATOR_TEEC_LIB} SHARED
+    ${TEEC_LIB_SOURCES}
+    )
+
+ADD_DEPENDENCIES(${TARGET_TEF_SIMULATOR_TEEC_LIB}
+    ${TARGET_TEF_SIMULATOR_OSAL}
+    ${TARGET_TEF_SIMULATOR_LOG}
+    )
+
+INCLUDE_DIRECTORIES(
+    ${TEEC_LIB_PATH}/inc
+    ${TEF_SIMULATOR_INCLUDE_PATH}/include
+    ${OSAL_PATH}
+    ${LOG_PATH}
+    )
+
+TARGET_LINK_LIBRARIES(${TARGET_TEF_SIMULATOR_TEEC_LIB}
+    ${CMAKE_THREAD_LIBS_INIT}
+    ${TARGET_TEF_SIMULATOR_OSAL}
+    ${TARGET_TEF_SIMULATOR_LOG}
+    )
+
+INSTALL(TARGETS ${TARGET_TEF_SIMULATOR_TEEC_LIB} DESTINATION ${LIB_INSTALL_DIR})
diff --git a/TEEStub/.gitignore b/TEEStub/.gitignore
deleted file mode 100755 (executable)
index 3df573f..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/Debug/
diff --git a/TEEStub/CMakeLists.txt b/TEEStub/CMakeLists.txt
new file mode 100644 (file)
index 0000000..d63c1aa
--- /dev/null
@@ -0,0 +1,68 @@
+# Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
+#
+#    Licensed under the Apache License, Version 2.0 (the "License");
+#    you may not use this file except in compliance with the License.
+#    You may obtain a copy of the License at
+#
+#        http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS,
+#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#    See the License for the specific language governing permissions and
+#    limitations under the License.
+#
+# @file
+# @author  Lukasz Kostyra (l.kostyra@samsung.com)
+# @brief   CMakeLists for tef-simulator TEE Stub unit
+#
+
+PKG_CHECK_MODULES(TEE_STUB_DEPS REQUIRED
+    dlog
+    )
+
+SET(TEE_STUB_SOURCES
+    ${TEE_STUB_PATH}/teestubmain.cpp
+    ${TEE_STUB_PATH}/PropertyAccess/ClientProperty.cpp
+    ${TEE_STUB_PATH}/PropertyAccess/PropertyApi.cpp
+    ${TEE_STUB_PATH}/PropertyAccess/PropertyUtility.cpp
+    ${TEE_STUB_PATH}/PropertyAccess/TAProperty.cpp
+    ${TEE_STUB_PATH}/PropertyAccess/TEEProperty.cpp
+    ${TEE_STUB_PATH}/TACommands/CommandBase.cpp
+    ${TEE_STUB_PATH}/TACommands/CommandCloseSession.cpp
+    ${TEE_STUB_PATH}/TACommands/CommandCreateEntryPoint.cpp
+    ${TEE_STUB_PATH}/TACommands/CommandDestroyEntryPoint.cpp
+    ${TEE_STUB_PATH}/TACommands/CommandInvoke.cpp
+    ${TEE_STUB_PATH}/TACommands/CommandOpenSession.cpp
+    ${TEE_STUB_PATH}/TACommands/CommandRequestCancel.cpp
+    ${TEE_STUB_PATH}/TACommands/MakeCommand.cpp
+    ${TEE_STUB_PATH}/TACommands/SharedMemoryMap.cpp
+    ${TEE_STUB_PATH}/TaskStrategy/SessionState.cpp
+    ${TEE_STUB_PATH}/TaskStrategy/TaskQueuedStrategy.cpp
+    ${TEE_STUB_PATH}/TaskStrategy/TaskStrategy.cpp
+    ${TEE_STUB_PATH}/TEEStubServer/ConnectionSession.cpp
+    ${TEE_STUB_PATH}/TEEStubServer/TEEStubServer.cpp
+    ${TEE_STUB_PATH}/TEEStubServer/TADebug.cpp
+    )
+
+ADD_LIBRARY(${TARGET_TEF_SIMULATOR_TEE_STUB} STATIC
+    ${TEE_STUB_SOURCES}
+    )
+
+INCLUDE_DIRECTORIES(
+    ${TEE_STUB_PATH}
+    ${TEF_SIMULATOR_INCLUDE_PATH}/include
+    ${OSAL_PATH}
+    ${LOG_PATH}
+    ${SSFLIB_PATH}/inc
+    )
+
+TARGET_LINK_LIBRARIES(${TARGET_TEF_SIMULATOR_TEE_STUB}
+    ${TARGET_TEF_SIMULATOR_OSAL}
+    ${TARGET_TEF_SIMULATOR_LOG}
+    ${TARGET_TEF_SIMULATOR_SSFLIB}
+    ${TEE_STUB_DEPS_LIBRARIES}
+    boost_system boost_thread
+    )
+
+INSTALL(TARGETS ${TARGET_TEF_SIMULATOR_TEE_STUB} DESTINATION ${LIB_INSTALL_DIR})
index 51a75ad..d3c55d5 100644 (file)
 /*-----------------------------------------------------------------------------
  *  Include files
  *-----------------------------------------------------------------------------*/
-#include <boost/array.hpp>
 #include <boost/bind.hpp>
 #include <boost/enable_shared_from_this.hpp>
 #include <boost/shared_ptr.hpp>
 #include <boost/asio.hpp>
+#include <boost/array.hpp>
 #include "tee_sim_command.h"
 #include "TaskStrategy/TaskStrategy.h"
 #include <vector>
diff --git a/TEEStub/TEEStubServer/TAProperty.cpp b/TEEStub/TEEStubServer/TAProperty.cpp
deleted file mode 100644 (file)
index acab173..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * =====================================================================================
- *
- *       Filename:  ConnectionSession.cpp
- *
- *    Description:  ConnectionSession class
- *
- *        Version:  1.0
- *        Created:  09 April 2015 12:41:39  IST
- *       Revision:  Original
- *       Compiler:  gcc
- *
- *         Author:  Krishna (Kr), k.devale@samsung.com
- *   Organization:  Samsung Electronics
- *
- * =====================================================================================
- */
-
-/*-----------------------------------------------------------------------------
- *  Include files
- *-----------------------------------------------------------------------------*/
-#include "TAProperty.h"
-#include <sstream>
-#include <iostream>
-
-/*-----------------------------------------------------------------------------
- *  Member functions
- *-----------------------------------------------------------------------------*/
-TAProperty::TAProperty() {
-       singleInstance = false;
-       multipleSession = false;
-       uuid.timeLow = 0x0;
-       uuid.timeMid = 0x0;
-       uuid.timeHiAndVersion = 0x0;
-       uuid.clockSeqAndNode[0] = 0x0;
-       uuid.clockSeqAndNode[1] = 0x0;
-       uuid.clockSeqAndNode[2] = 0x0;
-       uuid.clockSeqAndNode[3] = 0x0;
-       uuid.clockSeqAndNode[4] = 0x0;
-       uuid.clockSeqAndNode[5] = 0x0;
-       uuid.clockSeqAndNode[6] = 0x0;
-       uuid.clockSeqAndNode[7] = 0x0;
-}
-/**
- * Read TA properties from the TA header
- */
-void TAProperty::readProperty() {
-       //TODO: Read property from TA
-       // Test Code
-       // Hardcoding the read values
-       // UUID 79B77788-9789-4a7a-A2BE-B60155EEF5F3
-       uuid.timeLow = 0x79b77788;
-       uuid.timeMid = 0x9789;
-       uuid.timeHiAndVersion = 0x4a7a;
-       uuid.clockSeqAndNode[0] = 0xa2;
-       uuid.clockSeqAndNode[1] = 0xbe;
-       uuid.clockSeqAndNode[2] = 0xb6;
-       uuid.clockSeqAndNode[3] = 0x01;
-       uuid.clockSeqAndNode[4] = 0x55;
-       uuid.clockSeqAndNode[5] = 0xee;
-       uuid.clockSeqAndNode[6] = 0xf5;
-       uuid.clockSeqAndNode[7] = 0xf3;
-}
-
-/**
- * Converts UUID from TEE_UUID to a string
- * @return string of TEE_UUID
- */
-string TAProperty::getUUID(void) {
-       // E.g. returns a string in the format 79B77788-9789-4a7a-A2BE-B60155EEF5F3
-       std::stringstream strStream;
-       strStream << IntToHex(uuid.timeLow) << "-";
-       strStream << IntToHex(uuid.timeMid) << "-";
-       strStream << IntToHex(uuid.timeHiAndVersion) << "-";
-       strStream << IntToHex((short)uuid.clockSeqAndNode[0], 2);
-       strStream << IntToHex((short)uuid.clockSeqAndNode[1], 2);
-       strStream << "-";
-       for (int i = 2; i < 8; i++) {
-               strStream << IntToHex((short)uuid.clockSeqAndNode[i], 2);
-       }
-       return strStream.str();
-}
-
-TAProperty::~TAProperty() {
-}
diff --git a/TEEStub/TEEStubServer/TAProperty.h b/TEEStub/TEEStubServer/TAProperty.h
deleted file mode 100644 (file)
index b9c7e93..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * =====================================================================================
- *
- *       Filename:  TAProperty.h
- *
- *    Description:  TAProperty header file
- *
- *        Version:  1.0
- *        Created:  09 April 2015 12:41:39  IST
- *       Revision:  Original
- *       Compiler:  gcc
- *
- *         Author:  Krishna (Kr), k.devale@samsung.com
- *   Organization:  Samsung Electronics
- *
- * =====================================================================================
- */
-
-#ifndef TAPROPERTY_H_
-#define TAPROPERTY_H_
-
-/*-----------------------------------------------------------------------------
- *  Include files
- *-----------------------------------------------------------------------------*/
-#include "tee_internal_api.h"
-#include <string>
-#include <sstream>
-#include <iomanip>
-
-using namespace std;
-
-/*-----------------------------------------------------------------------------
- *  Class definitions
- *-----------------------------------------------------------------------------*/
-class TAProperty {
-private:
-       TEE_UUID uuid;
-       bool singleInstance;
-       bool multipleSession;
-public:
-       TAProperty();
-       void readProperty(void);
-       string getUUID(void);
-       bool isSingleInstance() {
-               return singleInstance;
-       }
-       bool isMultipleSession() {
-               return multipleSession;
-       }
-       virtual ~TAProperty();
-private:
-       template<typename T>
-       std::string IntToHex(T i, int width = sizeof(T) * 2) {
-               std::stringstream stream;
-               stream << std::setfill('0') << std::setw(width) << std::hex << i;
-               return stream.str();
-       }
-};
-
-#endif /* TAPROPERTY_H_ */
diff --git a/build/TEECLib/makefile b/build/TEECLib/makefile
deleted file mode 100755 (executable)
index 7c44a62..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-# Directory where Simulator code is placed
-
-GIT_SDK = ../../..
-TOOLCHAIN_PATH = $(GIT_SDK)/toolchain/linux
-TOOLCHAIN = $(TOOLCHAIN_PATH)/i386-linux-gnueabi-gcc-4.6/bin/i386-linux-gnueabi-
-INCLUDE = $(TOOLCHAIN_PATH)/rootstraps/mobile-2.3-emulator.core/usr/include/
-SYSROOT = --sysroot=$(TOOLCHAIN_PATH)/rootstraps/mobile-2.3-emulator.core/
-
-HOME = $(GIT_SDK)/simulator
-TEECLIB_SOURCE = $(HOME)/TEECLib
-
--include ../makefile.init
-
-RM := rm -rf
-
-# All of the sources participating in the build are defined here
--include sources.mk
--include src/subdir.mk
--include subdir.mk
--include objects.mk
-
-ifneq ($(MAKECMDGOALS),clean)
-ifneq ($(strip $(C_DEPS)),)
--include $(C_DEPS)
-endif
-endif
-
--include ../makefile.defs
-
-# Add inputs and outputs from these tool invocations to the build variables 
-
-# All Target
-all: libteec2.so
-
-# Tool invocations
-libteec2.so: $(OBJS) $(USER_OBJS)
-       @echo 'Building target: $@'
-       @echo 'Invoking: GCC C Linker'
-       $(TOOLCHAIN)g++ -L"../osal" -L"../log" -shared -o "libteec2.so" $(OBJS) $(USER_OBJS) $(LIBS) $(SYSROOT)
-       @echo 'Finished building target: $@'
-       @echo ' '
-
-# Other Targets
-clean:
-       -$(RM) $(OBJS)$(C_DEPS)$(LIBRARIES) libteec2.so
-       -@echo ' '
-
-.PHONY: all clean dependents
-.SECONDARY:
-
--include ../makefile.targets
diff --git a/build/TEECLib/objects.mk b/build/TEECLib/objects.mk
deleted file mode 100644 (file)
index 9422d85..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-################################################################################
-# Automatically-generated file. Do not edit!
-################################################################################
-
-USER_OBJS :=
-
-LIBS := -losal -lrt -llog
-
diff --git a/build/TEECLib/sources.mk b/build/TEECLib/sources.mk
deleted file mode 100644 (file)
index 1ba014d..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-################################################################################
-# Automatically-generated file. Do not edit!
-################################################################################
-
-O_SRCS := 
-C_SRCS := 
-S_UPPER_SRCS := 
-OBJ_SRCS := 
-ASM_SRCS := 
-OBJS := 
-C_DEPS := 
-LIBRARIES := 
-
-# Every subdirectory with source files must be described here
-SUBDIRS := \
-src \
-
diff --git a/build/TEECLib/src/subdir.mk b/build/TEECLib/src/subdir.mk
deleted file mode 100644 (file)
index a6539e2..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-# Add inputs and outputs from these tool invocations to the build variables
-C_SRCS += \
-$(TEECLIB_SOURCE)/src/teec_api.c \
-$(TEECLIB_SOURCE)/src/teec_connection.c
-
-OBJS += \
-./src/teec_api.o \
-./src/teec_connection.o
-
-C_DEPS += \
-./src/teec_api.d \
-./src/teec_connection.d
-
-# Each subdirectory must supply rules for building sources it contributes
-src/%.o: $(TEECLIB_SOURCE)/src/%.c
-       @echo 'Building file: $<'
-       @echo 'Invoking: GCC C Compiler'
-       $(TOOLCHAIN)g++ -I"$(HOME)/include/include" -I"$(HOME)/log" -I"$(HOME)/TEECLib/inc" -I"../../osal" -I$(INCLUDE) -O0 -g3 -Wall -Werror -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
-       @echo 'Finished building: $<'
-       @echo ' '
-
-
diff --git a/build/TEEStub/PropertyAccess/subdir.mk b/build/TEEStub/PropertyAccess/subdir.mk
deleted file mode 100644 (file)
index 89bc675..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-# Add inputs and outputs from these tool invocations to the build variables 
-CPP_SRCS += \
-$(TEESTUB_SOURCE)/PropertyAccess/ClientProperty.cpp \
-$(TEESTUB_SOURCE)/PropertyAccess/PropertyApi.cpp \
-$(TEESTUB_SOURCE)/PropertyAccess/PropertyUtility.cpp \
-$(TEESTUB_SOURCE)/PropertyAccess/TAProperty.cpp \
-$(TEESTUB_SOURCE)/PropertyAccess/TEEProperty.cpp 
-
-OBJS += \
-./PropertyAccess/ClientProperty.o \
-./PropertyAccess/PropertyApi.o \
-./PropertyAccess/PropertyUtility.o \
-./PropertyAccess/TAProperty.o \
-./PropertyAccess/TEEProperty.o 
-
-CPP_DEPS += \
-./PropertyAccess/ClientProperty.d \
-./PropertyAccess/PropertyApi.d \
-./PropertyAccess/PropertyUtility.d \
-./PropertyAccess/TAProperty.d \
-./PropertyAccess/TEEProperty.d 
-
-
-# Each subdirectory must supply rules for building sources it contributes
-PropertyAccess/%.o: $(TEESTUB_SOURCE)/PropertyAccess/%.cpp
-       @echo 'Building file: $<'
-       @echo 'Invoking: GCC C++ Compiler'
-       $(TOOLCHAIN)g++ -I"$(HOME)/include/include" -I"$(HOME)/log" -I"$(HOME)/osal" -I"$(HOME)/TEEStub/../ssflib/inc" -I"$(HOME)/TEEStub" -I$(INCLUDE) -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
-       @echo 'Finished building: $<'
-       @echo ' '
-
-
diff --git a/build/TEEStub/TACommands/subdir.mk b/build/TEEStub/TACommands/subdir.mk
deleted file mode 100644 (file)
index 9648d87..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-# Add inputs and outputs from these tool invocations to the build variables 
-CPP_SRCS += \
-$(TEESTUB_SOURCE)/TACommands/CommandBase.cpp \
-$(TEESTUB_SOURCE)/TACommands/CommandCloseSession.cpp \
-$(TEESTUB_SOURCE)/TACommands/CommandCreateEntryPoint.cpp \
-$(TEESTUB_SOURCE)/TACommands/CommandDestroyEntryPoint.cpp \
-$(TEESTUB_SOURCE)/TACommands/CommandInvoke.cpp \
-$(TEESTUB_SOURCE)/TACommands/CommandOpenSession.cpp \
-$(TEESTUB_SOURCE)/TACommands/CommandRequestCancel.cpp \
-$(TEESTUB_SOURCE)/TACommands/MakeCommand.cpp \
-$(TEESTUB_SOURCE)/TACommands/SharedMemoryMap.cpp 
-
-OBJS += \
-./TACommands/CommandBase.o \
-./TACommands/CommandCloseSession.o \
-./TACommands/CommandCreateEntryPoint.o \
-./TACommands/CommandDestroyEntryPoint.o \
-./TACommands/CommandInvoke.o \
-./TACommands/CommandOpenSession.o \
-./TACommands/CommandRequestCancel.o \
-./TACommands/MakeCommand.o \
-./TACommands/SharedMemoryMap.o 
-
-CPP_DEPS += \
-./TACommands/CommandBase.d \
-./TACommands/CommandCloseSession.d \
-./TACommands/CommandCreateEntryPoint.d \
-./TACommands/CommandDestroyEntryPoint.d \
-./TACommands/CommandInvoke.d \
-./TACommands/CommandOpenSession.d \
-./TACommands/CommandRequestCancel.d \
-./TACommands/MakeCommand.d \
-./TACommands/SharedMemoryMap.d 
-
-
-# Each subdirectory must supply rules for building sources it contributes
-TACommands/%.o: $(TEESTUB_SOURCE)/TACommands/%.cpp
-       @echo 'Building file: $<'
-       @echo 'Invoking: GCC C++ Compiler'
-       $(TOOLCHAIN)g++ -I"$(HOME)/include/include" -I"$(HOME)/log" -I"$(HOME)/osal" -I"$(HOME)/TEEStub/../ssflib/inc" -I"$(HOME)/TEEStub" -I$(INCLUDE) -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
-       @echo 'Finished building: $<'
-       @echo ' '
-
-
diff --git a/build/TEEStub/TEEStubServer/subdir.mk b/build/TEEStub/TEEStubServer/subdir.mk
deleted file mode 100644 (file)
index 9cd6bcb..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-# Add inputs and outputs from these tool invocations to the build variables
-CPP_SRCS += \
-$(TEESTUB_SOURCE)/TEEStubServer/ConnectionSession.cpp \
-$(TEESTUB_SOURCE)/TEEStubServer/TAProperty.cpp \
-$(TEESTUB_SOURCE)/TEEStubServer/TEEStubServer.cpp \
-$(TEESTUB_SOURCE)/TEEStubServer/TADebug.cpp
-
-OBJS += \
-./TEEStubServer/ConnectionSession.o \
-./TEEStubServer/TAProperty.o \
-./TEEStubServer/TEEStubServer.o \
-./TEEStubServer/TADebug.o
-
-CPP_DEPS += \
-./TEEStubServer/ConnectionSession.d \
-./TEEStubServer/TAProperty.d \
-./TEEStubServer/TEEStubServer.d \
-./TEEStubServer/TADebug.d
-
-
-# Each subdirectory must supply rules for building sources it contributes
-TEEStubServer/%.o: $(TEESTUB_SOURCE)/TEEStubServer/%.cpp
-       @echo 'Building file: $<'
-       @echo 'Invoking: GCC C++ Compiler'
-       $(TOOLCHAIN)g++ -I"$(HOME)/include/include" -I"$(HOME)/osal" -I"$(HOME)/TEEStub/../ssflib/inc" -I"$(HOME)/TEEStub" -I$(INCLUDE) -Ldlog -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
-       @echo 'Finished building: $<'
-       @echo ' '
-
-
diff --git a/build/TEEStub/TaskStrategy/subdir.mk b/build/TEEStub/TaskStrategy/subdir.mk
deleted file mode 100644 (file)
index 711898d..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-# Add inputs and outputs from these tool invocations to the build variables 
-CPP_SRCS += \
-$(TEESTUB_SOURCE)/TaskStrategy/SessionState.cpp \
-$(TEESTUB_SOURCE)/TaskStrategy/TaskQueuedStrategy.cpp \
-$(TEESTUB_SOURCE)/TaskStrategy/TaskStrategy.cpp 
-
-OBJS += \
-./TaskStrategy/SessionState.o \
-./TaskStrategy/TaskQueuedStrategy.o \
-./TaskStrategy/TaskStrategy.o 
-
-CPP_DEPS += \
-./TaskStrategy/SessionState.d \
-./TaskStrategy/TaskQueuedStrategy.d \
-./TaskStrategy/TaskStrategy.d 
-
-
-# Each subdirectory must supply rules for building sources it contributes
-TaskStrategy/%.o: $(TEESTUB_SOURCE)/TaskStrategy/%.cpp
-       @echo 'Building file: $<'
-       @echo 'Invoking: GCC C++ Compiler'
-       $(TOOLCHAIN)g++ -I"$(HOME)/include/include" -I"$(HOME)/log" -I"$(HOME)/osal" -I"$(HOME)/TEEStub/../ssflib/inc" -I"$(HOME)/TEEStub" -I$(INCLUDE) -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
-       @echo 'Finished building: $<'
-       @echo ' '
-
-
diff --git a/build/TEEStub/makefile b/build/TEEStub/makefile
deleted file mode 100755 (executable)
index e007903..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-# Directory where Simulator code is placed
-
-GIT_SDK = ../../..
-TOOLCHAIN_PATH = $(GIT_SDK)/toolchain/linux
-TOOLCHAIN = $(TOOLCHAIN_PATH)/i386-linux-gnueabi-gcc-4.6/bin/i386-linux-gnueabi-
-INCLUDE = $(TOOLCHAIN_PATH)/rootstraps/mobile-2.3-emulator.core/usr/include/
-SYSROOT = --sysroot=$(TOOLCHAIN_PATH)/rootstraps/mobile-2.3-emulator.core/usr
-
-HOME = $(GIT_SDK)/simulator
-TEESTUB_SOURCE = $(HOME)/TEEStub
-
--include ../makefile.init
-
-RM := rm -rf
-
-# All of the sources participating in the build are defined here
--include sources.mk
--include TaskStrategy/subdir.mk
--include TEEStubServer/subdir.mk
--include TACommands/subdir.mk
--include PropertyAccess/subdir.mk
--include subdir.mk
--include objects.mk
-
-ifneq ($(MAKECMDGOALS),clean)
-ifneq ($(strip $(C++_DEPS)),)
--include $(C++_DEPS)
-endif
-ifneq ($(strip $(C_DEPS)),)
--include $(C_DEPS)
-endif
-ifneq ($(strip $(CC_DEPS)),)
--include $(CC_DEPS)
-endif
-ifneq ($(strip $(CPP_DEPS)),)
--include $(CPP_DEPS)
-endif
-ifneq ($(strip $(CXX_DEPS)),)
--include $(CXX_DEPS)
-endif
-ifneq ($(strip $(C_UPPER_DEPS)),)
--include $(C_UPPER_DEPS)
-endif
-endif
-
--include ../makefile.defs
-
-# Add inputs and outputs from these tool invocations to the build variables
-
-# All Target
-all: libTEEStub.a
-
-# Tool invocations
-libTEEStub.a: $(OBJS) $(USER_OBJS)
-       @echo 'Building target: $@'
-       @echo 'Invoking: GCC Archiver'
-       $(TOOLCHAIN)ar -r  "libTEEStub.a" $(OBJS) $(USER_OBJS) $(LIBS)
-       @echo 'Finished building target: $@'
-       @echo ' '
-
-# Other Targets
-clean:
-       -$(RM) $(OBJS)$(C++_DEPS)$(C_DEPS)$(CC_DEPS)$(ARCHIVES)$(CPP_DEPS)$(CXX_DEPS)$(C_UPPER_DEPS) libTEEStub.a
-       -@echo ' '
-
-.PHONY: all clean dependents
-.SECONDARY:
-
--include ../makefile.targets
diff --git a/build/TEEStub/objects.mk b/build/TEEStub/objects.mk
deleted file mode 100644 (file)
index 742c2da..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-################################################################################
-# Automatically-generated file. Do not edit!
-################################################################################
-
-USER_OBJS :=
-
-LIBS :=
-
diff --git a/build/TEEStub/sources.mk b/build/TEEStub/sources.mk
deleted file mode 100644 (file)
index dc0c730..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-################################################################################
-# Automatically-generated file. Do not edit!
-################################################################################
-
-O_SRCS := 
-CPP_SRCS := 
-C_UPPER_SRCS := 
-C_SRCS := 
-S_UPPER_SRCS := 
-OBJ_SRCS := 
-ASM_SRCS := 
-CXX_SRCS := 
-C++_SRCS := 
-CC_SRCS := 
-OBJS := 
-C++_DEPS := 
-C_DEPS := 
-CC_DEPS := 
-ARCHIVES := 
-CPP_DEPS := 
-CXX_DEPS := 
-C_UPPER_DEPS := 
-
-# Every subdirectory with source files must be described here
-SUBDIRS := \
-. \
-TaskStrategy \
-TEEStubServer \
-TACommands \
-PropertyAccess \
-
diff --git a/build/TEEStub/subdir.mk b/build/TEEStub/subdir.mk
deleted file mode 100644 (file)
index 815be7e..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-# Add inputs and outputs from these tool invocations to the build variables 
-CPP_SRCS += \
-$(TEESTUB_SOURCE)/teestubmain.cpp 
-
-OBJS += \
-./teestubmain.o
-
-CPP_DEPS += \
-./teestubmain.d
-
-
-# Each subdirectory must supply rules for building sources it contributes
-%.o: $(TEESTUB_SOURCE)/%.cpp
-       @echo 'Building file: $<'
-       @echo 'Invoking: GCC C++ Compiler'
-       $(TOOLCHAIN)g++ -I"$(HOME)/include/include" -I"$(HOME)/osal" -I"$(HOME)/TEEStub/../ssflib/inc" -I"$(HOME)/TEEStub" -I$(INCLUDE) -O0 -g3 -Wall -Werror -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
-       @echo 'Finished building: $<'
-       @echo ' '
-
diff --git a/build/build.sh b/build/build.sh
deleted file mode 100755 (executable)
index 4eac26d..0000000
+++ /dev/null
@@ -1,173 +0,0 @@
-#!/bin/bash
-#
-# This script builds all modules in TA SDK Simulator and copies the binaries
-# in the package
-#
-# Written by Cheryl Bansal <cheryl.b@samsung.com>
-# Samsung R & D Institute, Bangalore
-# Samsung Electronics
-# 7 July, 2015
-#
-
-# Paths
-
-# build.sh path
-DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
-
-# Module Paths
-
-LOG_PATH=$DIR/log
-OSAL_PATH=$DIR/osal
-TEECLIB_PATH=$DIR/TEECLib
-SSFLIB_PATH=$DIR/ssflib
-TEESTUB_PATH=$DIR/TEEStub
-SIMDAEMON_PATH=$DIR/simulatordaemon
-Package=$2
-
-#check error case
-check_make_error()
-{
-       if [ "$?" != "0" ]; then
-       echo "BUILD ERROR! BUILD TERMINATED."
-       exit 1
-       fi
-}
-
-# Clean all modules
-clean_all()
-{
-cd $LOG_PATH
-make clean
-check_make_error
-cd $OSAL_PATH
-make clean
-check_make_error
-cd $TEECLIB_PATH
-make clean
-check_make_error
-cd $SSFLIB_PATH
-make clean
-check_make_error
-cd $TEESTUB_PATH
-make clean
-check_make_error
-cd $SIMDAEMON_PATH
-make clean
-check_make_error
-cd $DIR
-}
-
-# Build functions for each module
-
-build_log()
-{
-cd $LOG_PATH
-make clean
-check_make_error
-make
-check_make_error
-cd $DIR
-}
-
-build_osal()
-{
-cd $OSAL_PATH
-make clean
-check_make_error
-make
-check_make_error
-cd $DIR
-}
-
-build_libteec()
-{
-cd $TEECLIB_PATH
-make clean
-check_make_error
-make
-check_make_error
-echo "Copying libteec.so in Package"
-cp libteec2.so $Package/CA/simulator/usr/lib/
-check_make_error
-cd $DIR
-}
-
-build_ssflib()
-{
-cd $SSFLIB_PATH
-make clean
-check_make_error
-make
-check_make_error
-echo "Copying libssflib.so in Package"
-cp libssflib.so $Package/TA/simulator/usr/lib/
-check_make_error
-cd $DIR
-}
-
-build_teestub()
-{
-cd $TEESTUB_PATH
-make clean
-check_make_error
-make
-check_make_error
-echo "Copying libTEEStub.a in Package"
-cp libTEEStub.a $Package/TA/simulator/usr/lib/
-check_make_error
-cd $DIR
-}
-
-build_simdaemon()
-{
-cd $SIMDAEMON_PATH
-make clean
-check_make_error
-make
-check_make_error
-echo "Copying SimulatorDaemon in Package"
-cp SimulatorDaemon $Package/CA/simulator/usr/lib/
-check_make_error
-cd $DIR
-}
-
-# User help
-
-echo_invalid() {
-echo "Simulator Build script
-Invalid arguments
-Format: ./build.sh <Build Option> <Package Path>
-Example:./build.sh buildall ~/Package
-
-<Build Option>
-       log             :       Build Logger module
-       osal            :       Build OSAL module
-       TEECLib         :       Build TEE Client Library module
-       SSFLib          :       Build SSF Library module
-       TEEStub         :       Build TEE Stub module
-       SimDaemon       :       Build Simulator Daemon module
-       buildall        :       Build all modules
-       clean           :       Clean all modules
-       Exit            :       To exit this Program"
-}
-
-# Verify number of arguments to build.sh
-if [[ "$#" -ne 2 ]]; then
-       echo "Illegal number of arguments"
-       echo_invalid
-       exit 0
-fi
-
-case $1 in
-    'log') build_log ;;
-    'osal') build_osal ;;
-    'TEECLib') build_log ; build_osal ; build_libteec ;;
-    'SSFLib') build_log ; build_osal ; build_ssflib ;;
-    'TEEStub') build_log ; build_osal ; build_ssflib ; build_teestub ;;
-    'SimDaemon') build_log ; build_osal ; build_simdaemon ;;
-    'buildall') build_log ; build_osal ; build_libteec ; build_ssflib ; build_teestub ; build_simdaemon ;;
-    'clean') clean_all ;;
-    'Exit') exit 0 ;; 
-    *) echo_invalid ;;
-esac    
-
diff --git a/build/log/makefile b/build/log/makefile
deleted file mode 100755 (executable)
index c351a93..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
--include ../makefile.init
-
-GIT_SDK = ../../..
-TOOLCHAIN_PATH = $(GIT_SDK)/toolchain/linux
-TOOLCHAIN = $(TOOLCHAIN_PATH)/i386-linux-gnueabi-gcc-4.6/bin/i386-linux-gnueabi-
-INCLUDE = $(TOOLCHAIN_PATH)/rootstraps/mobile-2.3-emulator.core/usr/include/
-
-LOG_SOURCE = ../../log
-
-RM := rm -rf
-
-# All of the sources participating in the build are defined here
--include sources.mk
--include subdir.mk
--include objects.mk
-
-ifneq ($(MAKECMDGOALS),clean)
-ifneq ($(strip $(C_DEPS)),)
--include $(C_DEPS)
-endif
-endif
-
--include ../makefile.defs
-
-# Add inputs and outputs from these tool invocations to the build variables 
-
-# All Target
-all: liblog.a
-
-# Tool invocations
-liblog.a: $(OBJS) $(USER_OBJS)
-       @echo 'Building target: $@'
-       @echo 'Invoking: GCC Archiver'
-       $(TOOLCHAIN)ar -r  "liblog.a" $(OBJS) $(USER_OBJS) $(LIBS)
-       @echo 'Finished building target: $@'
-       @echo ' '
-
-# Other Targets
-clean:
-       -$(RM) $(OBJS)$(C_DEPS)$(ARCHIVES) liblog.a
-       -@echo ' '
-
-.PHONY: all clean dependents
-.SECONDARY:
-
--include ../makefile.targets
diff --git a/build/log/objects.mk b/build/log/objects.mk
deleted file mode 100644 (file)
index 742c2da..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-################################################################################
-# Automatically-generated file. Do not edit!
-################################################################################
-
-USER_OBJS :=
-
-LIBS :=
-
diff --git a/build/log/sources.mk b/build/log/sources.mk
deleted file mode 100644 (file)
index 3e7cfef..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-################################################################################
-# Automatically-generated file. Do not edit!
-################################################################################
-
-O_SRCS := 
-C_SRCS := 
-S_UPPER_SRCS := 
-OBJ_SRCS := 
-ASM_SRCS := 
-OBJS := 
-C_DEPS := 
-ARCHIVES := 
-
-# Every subdirectory with source files must be described here
-SUBDIRS := \
-. \
-
diff --git a/build/log/subdir.mk b/build/log/subdir.mk
deleted file mode 100644 (file)
index 354843c..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-# Add inputs and outputs from these tool invocations to the build variables 
-C_SRCS += \
-$(LOG_SOURCE)/log.c 
-
-OBJS += \
-./log.o 
-
-C_DEPS += \
-./log.d 
-
-# Each subdirectory must supply rules for building sources it contributes
-%.o: $(LOG_SOURCE)/%.c
-       @echo 'Building file: $<'
-       @echo 'Invoking: GCC C Compiler'
-       $(TOOLCHAIN)g++ -I$(INCLUDE) -O0 -g3 -Wall -c $(SYSROOT) -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
-       @echo 'Finished building: $<'
-       @echo ' '
-
-
diff --git a/build/osal/makefile b/build/osal/makefile
deleted file mode 100755 (executable)
index af05f50..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
--include ../makefile.init
-
-GIT_SDK = ../../..
-TOOLCHAIN_PATH = $(GIT_SDK)/toolchain/linux
-TOOLCHAIN = $(TOOLCHAIN_PATH)/i386-linux-gnueabi-gcc-4.6/bin/i386-linux-gnueabi-
-INCLUDE = $(TOOLCHAIN_PATH)/rootstraps/mobile-2.3-emulator.core/usr/include/
-
-OSAL_SOURCE = ../../osal
-
-RM := rm -rf
-
-# All of the sources participating in the build are defined here
--include sources.mk
--include subdir.mk
--include objects.mk
-
-ifneq ($(MAKECMDGOALS),clean)
-ifneq ($(strip $(C_DEPS)),)
--include $(C_DEPS)
-endif
-endif
-
--include ../makefile.defs
-
-# Add inputs and outputs from these tool invocations to the build variables 
-
-# All Target
-all: libosal.a
-
-# Tool invocations
-libosal.a: $(OBJS) $(USER_OBJS)
-       @echo 'Building target: $@'
-       @echo 'Invoking: GCC Archiver'
-       $(TOOLCHAIN)ar -r  "libosal.a" $(OBJS) $(USER_OBJS) $(LIBS)
-       @echo 'Finished building target: $@'
-       @echo ' '
-
-# Other Targets
-clean:
-       -$(RM) $(OBJS)$(C_DEPS)$(ARCHIVES) libosal.a
-       -@echo ' '
-
-.PHONY: all clean dependents
-.SECONDARY:
-
--include ../makefile.targets
diff --git a/build/osal/objects.mk b/build/osal/objects.mk
deleted file mode 100644 (file)
index 742c2da..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-################################################################################
-# Automatically-generated file. Do not edit!
-################################################################################
-
-USER_OBJS :=
-
-LIBS :=
-
diff --git a/build/osal/sources.mk b/build/osal/sources.mk
deleted file mode 100644 (file)
index 3e7cfef..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-################################################################################
-# Automatically-generated file. Do not edit!
-################################################################################
-
-O_SRCS := 
-C_SRCS := 
-S_UPPER_SRCS := 
-OBJ_SRCS := 
-ASM_SRCS := 
-OBJS := 
-C_DEPS := 
-ARCHIVES := 
-
-# Every subdirectory with source files must be described here
-SUBDIRS := \
-. \
-
diff --git a/build/osal/subdir.mk b/build/osal/subdir.mk
deleted file mode 100644 (file)
index 4f05c36..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-# Add inputs and outputs from these tool invocations to the build variables 
-C_SRCS += \
-$(OSAL_SOURCE)/OsaCommon.c \
-$(OSAL_SOURCE)/OsaIpc.c \
-$(OSAL_SOURCE)/OsaQueue.c \
-$(OSAL_SOURCE)/OsaSem.c \
-$(OSAL_SOURCE)/OsaSignal.c \
-$(OSAL_SOURCE)/OsaTask.c 
-
-OBJS += \
-./OsaCommon.o \
-./OsaIpc.o \
-./OsaQueue.o \
-./OsaSem.o \
-./OsaSignal.o \
-./OsaTask.o 
-
-C_DEPS += \
-./OsaCommon.d \
-./OsaIpc.d \
-./OsaQueue.d \
-./OsaSem.d \
-./OsaSignal.d \
-./OsaTask.d 
-
-
-# Each subdirectory must supply rules for building sources it contributes
-%.o: $(OSAL_SOURCE)/%.c
-       @echo 'Building file: $<'
-       @echo 'Invoking: GCC C Compiler'
-       $(TOOLCHAIN)g++ -I$(INCLUDE) -O0 -g3 -Wall -c -fmessage-length=0 -lrt -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
-       @echo 'Finished building: $<'
-       @echo ' '
-
-
diff --git a/build/simulatordaemon/makefile b/build/simulatordaemon/makefile
deleted file mode 100755 (executable)
index 7e56eaa..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-# Directory where Simulator code is placed
-
-GIT_SDK = ../../..
-TOOLCHAIN_PATH = $(GIT_SDK)/toolchain/linux
-TOOLCHAIN = $(TOOLCHAIN_PATH)/i386-linux-gnueabi-gcc-4.6/bin/i386-linux-gnueabi-
-INCLUDE = $(TOOLCHAIN_PATH)/rootstraps/mobile-2.3-emulator.core/usr/include/
-SYSROOT = --sysroot=$(TOOLCHAIN_PATH)/rootstraps/mobile-2.3-emulator.core/
-
-HOME = $(GIT_SDK)/simulator
-SIMDAEMON_SOURCE = $(HOME)/simulatordaemon
-
--include ../makefile.init
-
-RM := rm -rf
-
-# All of the sources participating in the build are defined here
--include sources.mk
--include src/TABinaryManager/subdir.mk
--include src/ResponseCommands/subdir.mk
--include src/ClientCommands/subdir.mk
--include src/subdir.mk
--include subdir.mk
--include objects.mk
-
-ifneq ($(MAKECMDGOALS),clean)
-ifneq ($(strip $(C++_DEPS)),)
--include $(C++_DEPS)
-endif
-ifneq ($(strip $(C_DEPS)),)
--include $(C_DEPS)
-endif
-ifneq ($(strip $(CC_DEPS)),)
--include $(CC_DEPS)
-endif
-ifneq ($(strip $(CPP_DEPS)),)
--include $(CPP_DEPS)
-endif
-ifneq ($(strip $(CXX_DEPS)),)
--include $(CXX_DEPS)
-endif
-ifneq ($(strip $(C_UPPER_DEPS)),)
--include $(C_UPPER_DEPS)
-endif
-endif
-
--include ../makefile.defs
-
-# Add inputs and outputs from these tool invocations to the build variables 
-
-# All Target
-all: SimulatorDaemon
-
-# Tool invocations
-SimulatorDaemon: $(OBJS) $(USER_OBJS)
-       @echo 'Building target: $@'
-       @echo 'Invoking: GCC C++ Linker'
-       $(TOOLCHAIN)g++ -L"../log" -L"../osal" -o "SimulatorDaemon" $(SYSROOT) $(OBJS) $(USER_OBJS) $(LIBS)
-       @echo 'Finished building target: $@'
-       @echo ' '
-
-# Other Targets
-clean:
-       -$(RM) $(OBJS)$(C++_DEPS)$(C_DEPS)$(CC_DEPS)$(CPP_DEPS)$(EXECUTABLES)$(CXX_DEPS)$(C_UPPER_DEPS) SimulatorDaemon
-       -@echo ' '
-
-.PHONY: all clean dependents
-.SECONDARY:
-
--include ../makefile.targets
diff --git a/build/simulatordaemon/objects.mk b/build/simulatordaemon/objects.mk
deleted file mode 100644 (file)
index f8a3a8b..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-################################################################################
-# Automatically-generated file. Do not edit!
-################################################################################
-
-USER_OBJS :=
-
-LIBS := -lrt -llog -losal -lpthread -lboost_system -lboost_thread
-
diff --git a/build/simulatordaemon/sources.mk b/build/simulatordaemon/sources.mk
deleted file mode 100644 (file)
index e2a915a..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-################################################################################
-# Automatically-generated file. Do not edit!
-################################################################################
-
-O_SRCS := 
-CPP_SRCS := 
-C_UPPER_SRCS := 
-C_SRCS := 
-S_UPPER_SRCS := 
-OBJ_SRCS := 
-ASM_SRCS := 
-CXX_SRCS := 
-C++_SRCS := 
-CC_SRCS := 
-OBJS := 
-C++_DEPS := 
-C_DEPS := 
-CC_DEPS := 
-CPP_DEPS := 
-EXECUTABLES := 
-CXX_DEPS := 
-C_UPPER_DEPS := 
-
-# Every subdirectory with source files must be described here
-SUBDIRS := \
-src \
-src/TABinaryManager \
-src/ResponseCommands \
-src/ClientCommands \
-
diff --git a/build/simulatordaemon/src/ClientCommands/subdir.mk b/build/simulatordaemon/src/ClientCommands/subdir.mk
deleted file mode 100644 (file)
index a099059..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-# Add inputs and outputs from these tool invocations to the build variables 
-CPP_SRCS += \
-$(SIMDAEMON_SOURCE)/src/ClientCommands/CommandCloseSession.cpp \
-$(SIMDAEMON_SOURCE)/src/ClientCommands/CommandCloseTASession.cpp \
-$(SIMDAEMON_SOURCE)/src/ClientCommands/CommandFinContext.cpp \
-$(SIMDAEMON_SOURCE)/src/ClientCommands/CommandInitContext.cpp \
-$(SIMDAEMON_SOURCE)/src/ClientCommands/CommandInvokeCommand.cpp \
-$(SIMDAEMON_SOURCE)/src/ClientCommands/CommandInvokeTACommand.cpp \
-$(SIMDAEMON_SOURCE)/src/ClientCommands/CommandOpenSession.cpp \
-$(SIMDAEMON_SOURCE)/src/ClientCommands/CommandOpenTASession.cpp \
-$(SIMDAEMON_SOURCE)/src/ClientCommands/CommandPanic.cpp \
-$(SIMDAEMON_SOURCE)/src/ClientCommands/CommandRegSharedMem.cpp \
-$(SIMDAEMON_SOURCE)/src/ClientCommands/CommandRelSharedMem.cpp \
-$(SIMDAEMON_SOURCE)/src/ClientCommands/CommandReqCancellation.cpp \
-$(SIMDAEMON_SOURCE)/src/ClientCommands/MakeCommand.cpp 
-
-OBJS += \
-./src/ClientCommands/CommandCloseSession.o \
-./src/ClientCommands/CommandCloseTASession.o \
-./src/ClientCommands/CommandFinContext.o \
-./src/ClientCommands/CommandInitContext.o \
-./src/ClientCommands/CommandInvokeCommand.o \
-./src/ClientCommands/CommandInvokeTACommand.o \
-./src/ClientCommands/CommandOpenSession.o \
-./src/ClientCommands/CommandOpenTASession.o \
-./src/ClientCommands/CommandPanic.o \
-./src/ClientCommands/CommandRegSharedMem.o \
-./src/ClientCommands/CommandRelSharedMem.o \
-./src/ClientCommands/CommandReqCancellation.o \
-./src/ClientCommands/MakeCommand.o 
-
-CPP_DEPS += \
-./src/ClientCommands/CommandCloseSession.d \
-./src/ClientCommands/CommandCloseTASession.d \
-./src/ClientCommands/CommandFinContext.d \
-./src/ClientCommands/CommandInitContext.d \
-./src/ClientCommands/CommandInvokeCommand.d \
-./src/ClientCommands/CommandInvokeTACommand.d \
-./src/ClientCommands/CommandOpenSession.d \
-./src/ClientCommands/CommandOpenTASession.d \
-./src/ClientCommands/CommandPanic.d \
-./src/ClientCommands/CommandRegSharedMem.d \
-./src/ClientCommands/CommandRelSharedMem.d \
-./src/ClientCommands/CommandReqCancellation.d \
-./src/ClientCommands/MakeCommand.d 
-
-# Each subdirectory must supply rules for building sources it contributes
-src/ClientCommands/%.o: $(SIMDAEMON_SOURCE)/src/ClientCommands/%.cpp
-       @echo 'Building file: $<'
-       @echo 'Invoking: GCC C++ Compiler'
-       $(TOOLCHAIN)g++ -I"$(HOME)/include/include" -I"$(HOME)/log" -I"$(HOME)/osal" -I"$(HOME)/simulatordaemon/src/TABinaryManager" -I"$(HOME)/simulatordaemon/inc" -I$(INCLUDE) -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
-       @echo 'Finished building: $<'
-       @echo ' '
-
-
diff --git a/build/simulatordaemon/src/ResponseCommands/subdir.mk b/build/simulatordaemon/src/ResponseCommands/subdir.mk
deleted file mode 100644 (file)
index be7554c..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-# Add inputs and outputs from these tool invocations to the build variables 
-CPP_SRCS += \
-$(SIMDAEMON_SOURCE)/src/ResponseCommands/ResCommandCloseSession.cpp \
-$(SIMDAEMON_SOURCE)/src/ResponseCommands/ResCommandInvokeCommand.cpp \
-$(SIMDAEMON_SOURCE)/src/ResponseCommands/ResCommandOpenSession.cpp \
-$(SIMDAEMON_SOURCE)/src/ResponseCommands/ResCommandReqCancellation.cpp \
-$(SIMDAEMON_SOURCE)/src/ResponseCommands/ResMakeCommand.cpp 
-
-OBJS += \
-./src/ResponseCommands/ResCommandCloseSession.o \
-./src/ResponseCommands/ResCommandInvokeCommand.o \
-./src/ResponseCommands/ResCommandOpenSession.o \
-./src/ResponseCommands/ResCommandReqCancellation.o \
-./src/ResponseCommands/ResMakeCommand.o 
-
-CPP_DEPS += \
-./src/ResponseCommands/ResCommandCloseSession.d \
-./src/ResponseCommands/ResCommandInvokeCommand.d \
-./src/ResponseCommands/ResCommandOpenSession.d \
-./src/ResponseCommands/ResCommandReqCancellation.d \
-./src/ResponseCommands/ResMakeCommand.d 
-
-
-# Each subdirectory must supply rules for building sources it contributes
-src/ResponseCommands/%.o: $(SIMDAEMON_SOURCE)/src/ResponseCommands/%.cpp
-       @echo 'Building file: $<'
-       @echo 'Invoking: GCC C++ Compiler'
-       $(TOOLCHAIN)g++ -I"$(HOME)/include/include" -I"$(HOME)/log" -I"$(HOME)/osal" -I"$(HOME)/simulatordaemon/src/TABinaryManager" -I"$(HOME)/simulatordaemon/inc" -I$(INCLUDE) -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
-       @echo 'Finished building: $<'
-       @echo ' '
-
-
diff --git a/build/simulatordaemon/src/TABinaryManager/subdir.mk b/build/simulatordaemon/src/TABinaryManager/subdir.mk
deleted file mode 100644 (file)
index de7446e..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-# Add inputs and outputs from these tool invocations to the build variables 
-CPP_SRCS += \
-$(SIMDAEMON_SOURCE)/src/TABinaryManager/TABinaryManager.cpp \
-$(SIMDAEMON_SOURCE)/src/TABinaryManager/TAManifest.cpp \
-$(SIMDAEMON_SOURCE)/src/TABinaryManager/TAUnpack.cpp \
-$(SIMDAEMON_SOURCE)/src/TABinaryManager/TestMain.cpp 
-
-OBJS += \
-./src/TABinaryManager/TABinaryManager.o \
-./src/TABinaryManager/TAManifest.o \
-./src/TABinaryManager/TAUnpack.o \
-./src/TABinaryManager/TestMain.o 
-
-CPP_DEPS += \
-./src/TABinaryManager/TABinaryManager.d \
-./src/TABinaryManager/TAManifest.d \
-./src/TABinaryManager/TAUnpack.d \
-./src/TABinaryManager/TestMain.d 
-
-
-# Each subdirectory must supply rules for building sources it contributes
-src/TABinaryManager/%.o: $(SIMDAEMON_SOURCE)/src/TABinaryManager/%.cpp
-       @echo 'Building file: $<'
-       @echo 'Invoking: GCC C++ Compiler'
-       $(TOOLCHAIN)g++ -I"$(HOME)/include/include" -I"$(HOME)/log" -I"$(HOME)/osal" -I"$(HOME)/simulatordaemon/src/TABinaryManager" -I"$(HOME)/simulatordaemon/inc" -I$(INCLUDE) -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
-       @echo 'Finished building: $<'
-       @echo ' '
-
-
diff --git a/build/simulatordaemon/src/subdir.mk b/build/simulatordaemon/src/subdir.mk
deleted file mode 100644 (file)
index 3ce8aac..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-# Add inputs and outputs from these tool invocations to the build variables 
-CPP_SRCS += \
-$(SIMDAEMON_SOURCE)/src/ConnectionSession.cpp \
-$(SIMDAEMON_SOURCE)/src/Session.cpp \
-$(SIMDAEMON_SOURCE)/src/SimulatorDaemon.cpp \
-$(SIMDAEMON_SOURCE)/src/SimulatorDaemonServer.cpp \
-$(SIMDAEMON_SOURCE)/src/TAFactory.cpp \
-$(SIMDAEMON_SOURCE)/src/TAInstance.cpp \
-$(SIMDAEMON_SOURCE)/src/TEEContext.cpp \
-$(SIMDAEMON_SOURCE)/src/ioService.cpp 
-
-OBJS += \
-./src/ConnectionSession.o \
-./src/Session.o \
-./src/SimulatorDaemon.o \
-./src/SimulatorDaemonServer.o \
-./src/TAFactory.o \
-./src/TAInstance.o \
-./src/TEEContext.o \
-./src/ioService.o
-
-CPP_DEPS += \
-./src/ConnectionSession.d \
-./src/Session.d \
-./src/SimulatorDaemon.d \
-./src/SimulatorDaemonServer.d \
-./src/TAFactory.d \
-./src/TAInstance.d \
-./src/TEEContext.d \
-./src/ioService.d
-
-
-# Each subdirectory must supply rules for building sources it contributes
-src/%.o: $(SIMDAEMON_SOURCE)/src/%.cpp
-       @echo 'Building file: $<'
-       @echo 'Invoking: GCC C++ Compiler'
-       $(TOOLCHAIN)g++ -I"$(HOME)/include/include" -I"$(HOME)/log" -I"$(HOME)/osal" -I"$(HOME)/simulatordaemon/src/TABinaryManager" -I"$(HOME)/simulatordaemon/inc" -I$(INCLUDE) -O0 -g3 -Wall -Werror -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
-       @echo 'Finished building: $<'
-       @echo ' '
-
-
diff --git a/build/ssflib/dep/cryptocore/source/base/subdir.mk b/build/ssflib/dep/cryptocore/source/base/subdir.mk
deleted file mode 100644 (file)
index 5f01c31..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-# Add inputs and outputs from these tool invocations to the build variables 
-C_SRCS += \
-$(SSFLIB_SOURCE)/dep/cryptocore/source/base/cc_ANSI_x931.c \
-$(SSFLIB_SOURCE)/dep/cryptocore/source/base/cc_aes.c \
-$(SSFLIB_SOURCE)/dep/cryptocore/source/base/cc_bignum.c \
-$(SSFLIB_SOURCE)/dep/cryptocore/source/base/cc_des.c \
-$(SSFLIB_SOURCE)/dep/cryptocore/source/base/cc_ecc.c \
-$(SSFLIB_SOURCE)/dep/cryptocore/source/base/cc_fast_math.c \
-$(SSFLIB_SOURCE)/dep/cryptocore/source/base/cc_hash.c \
-$(SSFLIB_SOURCE)/dep/cryptocore/source/base/cc_md5.c \
-$(SSFLIB_SOURCE)/dep/cryptocore/source/base/cc_moo.c \
-$(SSFLIB_SOURCE)/dep/cryptocore/source/base/cc_pkcs1_v21.c \
-$(SSFLIB_SOURCE)/dep/cryptocore/source/base/cc_rc4.c \
-$(SSFLIB_SOURCE)/dep/cryptocore/source/base/cc_sha1.c \
-$(SSFLIB_SOURCE)/dep/cryptocore/source/base/cc_sha2.c \
-$(SSFLIB_SOURCE)/dep/cryptocore/source/base/cc_snow2.c 
-
-OBJS += \
-./dep/cryptocore/source/base/cc_ANSI_x931.o \
-./dep/cryptocore/source/base/cc_aes.o \
-./dep/cryptocore/source/base/cc_bignum.o \
-./dep/cryptocore/source/base/cc_des.o \
-./dep/cryptocore/source/base/cc_ecc.o \
-./dep/cryptocore/source/base/cc_fast_math.o \
-./dep/cryptocore/source/base/cc_hash.o \
-./dep/cryptocore/source/base/cc_md5.o \
-./dep/cryptocore/source/base/cc_moo.o \
-./dep/cryptocore/source/base/cc_pkcs1_v21.o \
-./dep/cryptocore/source/base/cc_rc4.o \
-./dep/cryptocore/source/base/cc_sha1.o \
-./dep/cryptocore/source/base/cc_sha2.o \
-./dep/cryptocore/source/base/cc_snow2.o 
-
-C_DEPS += \
-./dep/cryptocore/source/base/cc_ANSI_x931.d \
-./dep/cryptocore/source/base/cc_aes.d \
-./dep/cryptocore/source/base/cc_bignum.d \
-./dep/cryptocore/source/base/cc_des.d \
-./dep/cryptocore/source/base/cc_ecc.d \
-./dep/cryptocore/source/base/cc_fast_math.d \
-./dep/cryptocore/source/base/cc_hash.d \
-./dep/cryptocore/source/base/cc_md5.d \
-./dep/cryptocore/source/base/cc_moo.d \
-./dep/cryptocore/source/base/cc_pkcs1_v21.d \
-./dep/cryptocore/source/base/cc_rc4.d \
-./dep/cryptocore/source/base/cc_sha1.d \
-./dep/cryptocore/source/base/cc_sha2.d \
-./dep/cryptocore/source/base/cc_snow2.d 
-
-
-# Each subdirectory must supply rules for building sources it contributes
-dep/cryptocore/source/base/%.o: $(SSFLIB_SOURCE)/dep/cryptocore/source/base/%.c
-       @echo 'Building file: $<'
-       @echo 'Invoking: GCC C Compiler'
-       $(TOOLCHAIN)g++ -D_SECOS_SIM_ -D__DEBUG__ -I"$(HOME)/ssflib/dep/cryptocore/include" -I"$(HOME)/log" -I"$(HOME)/osal" -I"$(HOME)/include/include" -I"$(HOME)/ssflib/dep/cryptocore/include/base" -I"$(HOME)/ssflib/dep/cryptocore/include/middle" -I"$(HOME)/ssflib/dep/swdss/include" -I"$(HOME)/ssflib/dep/uci/include" -I"$(HOME)/ssflib/inc" -I$(INCLUDE) -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
-       @echo 'Finished building: $<'
-       @echo ' '
-
-
diff --git a/build/ssflib/dep/cryptocore/source/middle/subdir.mk b/build/ssflib/dep/cryptocore/source/middle/subdir.mk
deleted file mode 100644 (file)
index 73d96ca..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-# Add inputs and outputs from these tool invocations to the build variables 
-C_SRCS += \
-$(SSFLIB_SOURCE)/dep/cryptocore/source/middle/cc_cmac.c \
-$(SSFLIB_SOURCE)/dep/cryptocore/source/middle/cc_dh.c \
-$(SSFLIB_SOURCE)/dep/cryptocore/source/middle/cc_dsa.c \
-$(SSFLIB_SOURCE)/dep/cryptocore/source/middle/cc_ecdh.c \
-$(SSFLIB_SOURCE)/dep/cryptocore/source/middle/cc_ecdsa.c \
-$(SSFLIB_SOURCE)/dep/cryptocore/source/middle/cc_hmac.c \
-$(SSFLIB_SOURCE)/dep/cryptocore/source/middle/cc_rng.c \
-$(SSFLIB_SOURCE)/dep/cryptocore/source/middle/cc_rsa.c \
-$(SSFLIB_SOURCE)/dep/cryptocore/source/middle/cc_symmetric.c \
-$(SSFLIB_SOURCE)/dep/cryptocore/source/middle/cc_tdes.c 
-
-OBJS += \
-./dep/cryptocore/source/middle/cc_cmac.o \
-./dep/cryptocore/source/middle/cc_dh.o \
-./dep/cryptocore/source/middle/cc_dsa.o \
-./dep/cryptocore/source/middle/cc_ecdh.o \
-./dep/cryptocore/source/middle/cc_ecdsa.o \
-./dep/cryptocore/source/middle/cc_hmac.o \
-./dep/cryptocore/source/middle/cc_rng.o \
-./dep/cryptocore/source/middle/cc_rsa.o \
-./dep/cryptocore/source/middle/cc_symmetric.o \
-./dep/cryptocore/source/middle/cc_tdes.o 
-
-C_DEPS += \
-./dep/cryptocore/source/middle/cc_cmac.d \
-./dep/cryptocore/source/middle/cc_dh.d \
-./dep/cryptocore/source/middle/cc_dsa.d \
-./dep/cryptocore/source/middle/cc_ecdh.d \
-./dep/cryptocore/source/middle/cc_ecdsa.d \
-./dep/cryptocore/source/middle/cc_hmac.d \
-./dep/cryptocore/source/middle/cc_rng.d \
-./dep/cryptocore/source/middle/cc_rsa.d \
-./dep/cryptocore/source/middle/cc_symmetric.d \
-./dep/cryptocore/source/middle/cc_tdes.d 
-
-
-# Each subdirectory must supply rules for building sources it contributes
-dep/cryptocore/source/middle/%.o: $(SSFLIB_SOURCE)/dep/cryptocore/source/middle/%.c
-       @echo 'Building file: $<'
-       @echo 'Invoking: GCC C Compiler'
-       $(TOOLCHAIN)g++ -D_SECOS_SIM_ -D__DEBUG__ -I"$(HOME)/ssflib/dep/cryptocore/include" -I"$(HOME)/log" -I"$(HOME)/osal" -I"$(HOME)/include/include" -I"$(HOME)/ssflib/dep/cryptocore/include/base" -I"$(HOME)/ssflib/dep/cryptocore/include/middle" -I"$(HOME)/ssflib/dep/swdss/include" -I"$(HOME)/ssflib/dep/uci/include" -I"$(HOME)/ssflib/inc" -I$(INCLUDE) -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
-       @echo 'Finished building: $<'
-       @echo ' '
-
-
diff --git a/build/ssflib/dep/cryptocore/source/subdir.mk b/build/ssflib/dep/cryptocore/source/subdir.mk
deleted file mode 100644 (file)
index 0b82019..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-# Add inputs and outputs from these tool invocations to the build variables 
-C_SRCS += \
-$(SSFLIB_SOURCE)/dep/cryptocore/source/CC_API.c 
-
-OBJS += \
-./dep/cryptocore/source/CC_API.o 
-
-C_DEPS += \
-./dep/cryptocore/source/CC_API.d 
-
-
-# Each subdirectory must supply rules for building sources it contributes
-dep/cryptocore/source/%.o: $(SSFLIB_SOURCE)/dep/cryptocore/source/%.c
-       @echo 'Building file: $<'
-       @echo 'Invoking: GCC C Compiler'
-       $(TOOLCHAIN)g++ -D_SECOS_SIM_ -D__DEBUG__ -I"$(HOME)/ssflib/dep/cryptocore/include" -I"$(HOME)/log" -I"$(HOME)/osal" -I"$(HOME)/include/include" -I"$(HOME)/ssflib/dep/cryptocore/include/base" -I"$(HOME)/ssflib/dep/cryptocore/include/middle" -I"$(HOME)/ssflib/dep/swdss/include" -I"$(HOME)/ssflib/dep/uci/include" -I"$(HOME)/ssflib/inc" -I$(INCLUDE) -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
-       @echo 'Finished building: $<'
-       @echo ' '
-
-
diff --git a/build/ssflib/dep/swdss/source/subdir.mk b/build/ssflib/dep/swdss/source/subdir.mk
deleted file mode 100644 (file)
index fd93294..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-# Add inputs and outputs from these tool invocations to the build variables 
-CPP_SRCS += \
-$(SSFLIB_SOURCE)/dep/swdss/source/file_op.cpp \
-$(SSFLIB_SOURCE)/dep/swdss/source/secure_file.cpp \
-$(SSFLIB_SOURCE)/dep/swdss/source/ss_api.cpp \
-$(SSFLIB_SOURCE)/dep/swdss/source/ss_crypto.cpp \
-$(SSFLIB_SOURCE)/dep/swdss/source/ss_misc.cpp \
-$(SSFLIB_SOURCE)/dep/swdss/source/ss_temp_store.cpp 
-
-OBJS += \
-./dep/swdss/source/file_op.o \
-./dep/swdss/source/secure_file.o \
-./dep/swdss/source/ss_api.o \
-./dep/swdss/source/ss_crypto.o \
-./dep/swdss/source/ss_misc.o \
-./dep/swdss/source/ss_temp_store.o 
-
-CPP_DEPS += \
-./dep/swdss/source/file_op.d \
-./dep/swdss/source/secure_file.d \
-./dep/swdss/source/ss_api.d \
-./dep/swdss/source/ss_crypto.d \
-./dep/swdss/source/ss_misc.d \
-./dep/swdss/source/ss_temp_store.d 
-
-
-# Each subdirectory must supply rules for building sources it contributes
-dep/swdss/source/%.o: $(SSFLIB_SOURCE)/dep/swdss/source/%.cpp
-       @echo 'Building file: $<'
-       @echo 'Invoking: GCC C++ Compiler'
-       $(TOOLCHAIN)g++ -D_SECOS_SIM_ -D__DEBUG__ -I"$(HOME)/ssflib/dep/cryptocore/include" -I"$(HOME)/log" -I"$(HOME)/osal" -I"$(HOME)/include/include" -I"$(HOME)/ssflib/dep/cryptocore/include/base" -I"$(HOME)/ssflib/dep/cryptocore/include/middle" -I"$(HOME)/ssflib/dep/swdss/include" -I"$(HOME)/ssflib/dep/uci/include" -I"$(HOME)/ssflib/inc" -I$(INCLUDE) -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
-       @echo 'Finished building: $<'
-       @echo ' '
-
-
diff --git a/build/ssflib/dep/time/subdir.mk b/build/ssflib/dep/time/subdir.mk
deleted file mode 100644 (file)
index 58955f9..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-# Add inputs and outputs from these tool invocations to the build variables 
-CPP_SRCS += \
-$(SSFLIB_SOURCE)/dep/time/ssf_time.cpp 
-
-OBJS += \
-./dep/time/ssf_time.o 
-
-CPP_DEPS += \
-./dep/time/ssf_time.d 
-
-
-# Each subdirectory must supply rules for building sources it contributes
-dep/time/%.o: $(SSFLIB_SOURCE)/dep/time/%.cpp
-       @echo 'Building file: $<'
-       @echo 'Invoking: GCC C++ Compiler'
-       $(TOOLCHAIN)g++ -D_SECOS_SIM_ -D__DEBUG__ -I"$(HOME)/ssflib/dep/cryptocore/include" -I"$(HOME)/log" -I"$(HOME)/osal" -I"$(HOME)/include/include" -I"$(HOME)/ssflib/dep/cryptocore/include/base" -I"$(HOME)/ssflib/dep/cryptocore/include/middle" -I"$(HOME)/ssflib/dep/swdss/include" -I"$(HOME)/ssflib/dep/uci/include" -I"$(HOME)/ssflib/inc" -I$(INCLUDE) -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
-       @echo 'Finished building: $<'
-       @echo ' '
-
-
diff --git a/build/ssflib/dep/uci/source/subdir.mk b/build/ssflib/dep/uci/source/subdir.mk
deleted file mode 100644 (file)
index e103ce3..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-# Add inputs and outputs from these tool invocations to the build variables 
-C_SRCS += \
-$(SSFLIB_SOURCE)/dep/uci/source/uci_aes_xcbc_mac.c \
-$(SSFLIB_SOURCE)/dep/uci/source/uci_api.c \
-$(SSFLIB_SOURCE)/dep/uci/source/uci_cryptocore.c \
-$(SSFLIB_SOURCE)/dep/uci/source/uci_hwcrypto.c 
-
-OBJS += \
-./dep/uci/source/uci_aes_xcbc_mac.o \
-./dep/uci/source/uci_api.o \
-./dep/uci/source/uci_cryptocore.o \
-./dep/uci/source/uci_hwcrypto.o 
-
-C_DEPS += \
-./dep/uci/source/uci_aes_xcbc_mac.d \
-./dep/uci/source/uci_api.d \
-./dep/uci/source/uci_cryptocore.d \
-./dep/uci/source/uci_hwcrypto.d 
-
-
-# Each subdirectory must supply rules for building sources it contributes
-dep/uci/source/%.o: $(SSFLIB_SOURCE)/dep/uci/source/%.c
-       @echo 'Building file: $<'
-       @echo 'Invoking: GCC C Compiler'
-       $(TOOLCHAIN)g++ -D_SECOS_SIM_ -D__DEBUG__ -I"$(HOME)/ssflib/dep/cryptocore/include" -I"$(HOME)/log" -I"$(HOME)/osal" -I"$(HOME)/include/include" -I"$(HOME)/ssflib/dep/cryptocore/include/base" -I"$(HOME)/ssflib/dep/cryptocore/include/middle" -I"$(HOME)/ssflib/dep/swdss/include" -I"$(HOME)/ssflib/dep/uci/include" -I"$(HOME)/ssflib/inc" -I$(INCLUDE) -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
-       @echo 'Finished building: $<'
-       @echo ' '
-
-
diff --git a/build/ssflib/makefile b/build/ssflib/makefile
deleted file mode 100755 (executable)
index d979fa5..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-# Directory where Simulator code is placed
-
-GIT_SDK = ../../..
-TOOLCHAIN_PATH = $(GIT_SDK)/toolchain/linux
-TOOLCHAIN = $(TOOLCHAIN_PATH)/i386-linux-gnueabi-gcc-4.6/bin/i386-linux-gnueabi-
-INCLUDE = $(TOOLCHAIN_PATH)/rootstraps/mobile-2.3-emulator.core/usr/include/
-SYSROOT = --sysroot=$(TOOLCHAIN_PATH)/rootstraps/mobile-2.3-emulator.core/
-
-HOME = $(GIT_SDK)/simulator
-SSFLIB_SOURCE = $(HOME)/ssflib
-
--include ../makefile.init
-
-RM := rm -rf
-
-# All of the sources participating in the build are defined here
--include sources.mk
--include src/subdir.mk
--include dep/uci/source/subdir.mk
--include dep/time/subdir.mk
--include dep/swdss/source/subdir.mk
--include dep/cryptocore/source/middle/subdir.mk
--include dep/cryptocore/source/base/subdir.mk
--include dep/cryptocore/source/subdir.mk
--include subdir.mk
--include objects.mk
-
-ifneq ($(MAKECMDGOALS),clean)
-ifneq ($(strip $(C++_DEPS)),)
--include $(C++_DEPS)
-endif
-ifneq ($(strip $(C_DEPS)),)
--include $(C_DEPS)
-endif
-ifneq ($(strip $(CC_DEPS)),)
--include $(CC_DEPS)
-endif
-ifneq ($(strip $(CPP_DEPS)),)
--include $(CPP_DEPS)
-endif
-ifneq ($(strip $(CXX_DEPS)),)
--include $(CXX_DEPS)
-endif
-ifneq ($(strip $(C_UPPER_DEPS)),)
--include $(C_UPPER_DEPS)
-endif
-endif
-
--include ../makefile.defs
-
-# Add inputs and outputs from these tool invocations to the build variables 
-
-# All Target
-all: libssflib.so
-
-# Tool invocations
-libssflib.so: $(OBJS) $(USER_OBJS)
-       @echo 'Building target: $@'
-       @echo 'Invoking: GCC C++ Linker'
-       $(TOOLCHAIN)g++ -L"../log" -L"../osal" $(SYSROOT) -fmessage-length=0 -shared -o "libssflib.so" $(OBJS) $(USER_OBJS) $(LIBS)
-       @echo 'Finished building target: $@'
-       @echo ' '
-
-# Other Targets
-clean:
-       -$(RM) $(OBJS)$(C++_DEPS)$(C_DEPS)$(CC_DEPS)$(LIBRARIES)$(CPP_DEPS)$(CXX_DEPS)$(C_UPPER_DEPS) libssflib.so
-       -@echo ' '
-
-.PHONY: all clean dependents
-.SECONDARY:
-
--include ../makefile.targets
diff --git a/build/ssflib/objects.mk b/build/ssflib/objects.mk
deleted file mode 100644 (file)
index cc72611..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-################################################################################
-# Automatically-generated file. Do not edit!
-################################################################################
-
-USER_OBJS :=
-
-LIBS := -lboost_thread -llog -losal -lrt
-
diff --git a/build/ssflib/sources.mk b/build/ssflib/sources.mk
deleted file mode 100644 (file)
index 7ed1286..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-################################################################################
-# Automatically-generated file. Do not edit!
-################################################################################
-
-O_SRCS := 
-CPP_SRCS := 
-C_UPPER_SRCS := 
-C_SRCS := 
-S_UPPER_SRCS := 
-OBJ_SRCS := 
-ASM_SRCS := 
-CXX_SRCS := 
-C++_SRCS := 
-CC_SRCS := 
-OBJS := 
-C++_DEPS := 
-C_DEPS := 
-CC_DEPS := 
-LIBRARIES := 
-CPP_DEPS := 
-CXX_DEPS := 
-C_UPPER_DEPS := 
-
-# Every subdirectory with source files must be described here
-SUBDIRS := \
-src \
-dep/uci/source \
-dep/time \
-dep/swdss/source \
-dep/cryptocore/source/middle \
-dep/cryptocore/source/base \
-dep/cryptocore/source \
-
diff --git a/build/ssflib/src/subdir.mk b/build/ssflib/src/subdir.mk
deleted file mode 100644 (file)
index 15bb64c..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-# Add inputs and outputs from these tool invocations to the build variables
-C_SRCS += \
-$(SSFLIB_SOURCE)/src/ssf_arithmetic.cpp \
-$(SSFLIB_SOURCE)/src/ssf_client.cpp \
-$(SSFLIB_SOURCE)/src/ssf_crypto.cpp \
-$(SSFLIB_SOURCE)/src/ssf_lib.cpp \
-$(SSFLIB_SOURCE)/src/ssf_malloc.cpp \
-$(SSFLIB_SOURCE)/src/ssf_panic.cpp \
-$(SSFLIB_SOURCE)/src/ssf_storage.cpp \
-$(SSFLIB_SOURCE)/src/ssf_taentrypoint.cpp \
-$(SSFLIB_SOURCE)/src/ssf_permission.cpp \
-$(SSFLIB_SOURCE)/src/app_debug.cpp
-
-OBJS += \
-./src/ssf_arithmetic.o \
-./src/ssf_client.o \
-./src/ssf_crypto.o \
-./src/ssf_lib.o \
-./src/ssf_malloc.o \
-./src/ssf_panic.o \
-./src/ssf_storage.o \
-./src/ssf_taentrypoint.o \
-./src/ssf_permission.o \
-./src/app_debug.o
-
-C_DEPS += \
-./src/ssf_arithmetic.d \
-./src/ssf_client.d \
-./src/ssf_crypto.d \
-./src/ssf_lib.d \
-./src/ssf_malloc.d \
-./src/ssf_panic.d \
-./src/ssf_storage.d \
-./src/ssf_taentrypoint.d \
-./src/ssf_permission.d \
-./src/app_debug.d
-
-
-# Each subdirectory must supply rules for building sources it contributes
-src/%.o: $(SSFLIB_SOURCE)/src/%.cpp
-       @echo 'Building file: $<'
-       @echo 'Invoking: GCC C Compiler'
-       $(TOOLCHAIN)g++ -D_SECOS_SIM_ -D__DEBUG__ -I"$(HOME)/ssflib/dep/cryptocore/include" -I"$(HOME)/log" -I"$(HOME)/osal" -I"$(HOME)/include/include" -I"$(HOME)/ssflib/dep/cryptocore/include/base" -I"$(HOME)/ssflib/dep/cryptocore/include/middle" -I"$(HOME)/ssflib/dep/swdss/include" -I"$(HOME)/ssflib/dep/uci/include" -I"$(HOME)/ssflib/inc" -I$(INCLUDE) -O2 -g2 -Wall -Werror -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
-       @echo 'Finished building: $<'
-       @echo ' '
-
-
diff --git a/log/.gitignore b/log/.gitignore
deleted file mode 100755 (executable)
index 3df573f..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/Debug/
diff --git a/log/CMakeLists.txt b/log/CMakeLists.txt
new file mode 100644 (file)
index 0000000..7f7c19d
--- /dev/null
@@ -0,0 +1,26 @@
+# Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
+#
+#    Licensed under the Apache License, Version 2.0 (the "License");
+#    you may not use this file except in compliance with the License.
+#    You may obtain a copy of the License at
+#
+#        http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS,
+#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#    See the License for the specific language governing permissions and
+#    limitations under the License.
+#
+# @file
+# @author  Lukasz Kostyra (l.kostyra@samsung.com)
+# @brief   CMakeLists for tef-simulator log unit
+#
+
+SET(LOG_SOURCES
+    ${LOG_PATH}/log.c
+    )
+
+ADD_LIBRARY(${TARGET_TEF_SIMULATOR_LOG} ${LOG_SOURCES})
+
+INSTALL(TARGETS ${TARGET_TEF_SIMULATOR_LOG} LIBRARY DESTINATION ${LIB_INSTALL_DIR})
index c88baab..db87ebc 100644 (file)
--- a/log/log.h
+++ b/log/log.h
@@ -83,14 +83,14 @@ typedef enum {
 
 #ifdef _LOGGING
 
-#define _LOG(module_level,debug_level,...) PrintLog(__FUNCTION__,__LINE__,module_level,debug_level,__VA_ARGS__)
+#define _LOG(module_level,debug_level,...) PrintLog(__FUNCTION__,__LINE__,module_level,debug_level,##__VA_ARGS__)
 
-#define LOGE(module_level,...) PrintLog(__FUNCTION__,__LINE__,module_level,ERROR_LEVEL_LOG,__VA_ARGS__)
-#define LOGV(module_level,...) PrintLog(__FUNCTION__,__LINE__,module_level,VERBOSE_LEVEL_LOG,__VA_ARGS__)
-#define LOGD(module_level,...) PrintLog(__FUNCTION__,__LINE__,module_level,DEBUG_LEVEL_LOG,__VA_ARGS__)
-#define LOGI(module_level,...) PrintLog(__FUNCTION__,__LINE__,module_level,SECURED_LEVEL_LOG,__VA_ARGS__)
-#define LOGS(module_level,...) PrintLog(__FUNCTION__,__LINE__,module_level,INFO_LEVEL_LOG,__VA_ARGS__)
-#define LOGP(module_level,...) PrintLog(__FUNCTION__,__LINE__,module_level,PACKET_LEVEL_LOG,__VA_ARGS__)
+#define LOGE(module_level,...) PrintLog(__FUNCTION__,__LINE__,module_level,ERROR_LEVEL_LOG,##__VA_ARGS__)
+#define LOGV(module_level,...) PrintLog(__FUNCTION__,__LINE__,module_level,VERBOSE_LEVEL_LOG,##__VA_ARGS__)
+#define LOGD(module_level,...) PrintLog(__FUNCTION__,__LINE__,module_level,DEBUG_LEVEL_LOG,##__VA_ARGS__)
+#define LOGI(module_level,...) PrintLog(__FUNCTION__,__LINE__,module_level,SECURED_LEVEL_LOG,##__VA_ARGS__)
+#define LOGS(module_level,...) PrintLog(__FUNCTION__,__LINE__,module_level,INFO_LEVEL_LOG,##__VA_ARGS__)
+#define LOGP(module_level,...) PrintLog(__FUNCTION__,__LINE__,module_level,PACKET_LEVEL_LOG,##__VA_ARGS__)
 
 #else //ifdef _LOGGING
 
@@ -103,6 +103,10 @@ typedef enum {
 
 #endif //ifdef _LOGGING
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
 /*
  * This method is to get debug level set
  *
@@ -161,4 +165,8 @@ void PrintLog(IN const char* function_name, IN const int32_t line_no,
     IN int32_t module_level, IN int32_t debug_level, IN const char* message,
     ...);
 
+#if defined(__cplusplus)
+} // extern "C"
+#endif
+
 #endif
diff --git a/osal/.gitignore b/osal/.gitignore
deleted file mode 100755 (executable)
index 3df573f..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/Debug/
diff --git a/osal/CMakeLists.txt b/osal/CMakeLists.txt
new file mode 100644 (file)
index 0000000..1ff385c
--- /dev/null
@@ -0,0 +1,31 @@
+# Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
+#
+#    Licensed under the Apache License, Version 2.0 (the "License");
+#    you may not use this file except in compliance with the License.
+#    You may obtain a copy of the License at
+#
+#        http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS,
+#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#    See the License for the specific language governing permissions and
+#    limitations under the License.
+#
+# @file
+# @author  Lukasz Kostyra (l.kostyra@samsung.com)
+# @brief   CMakeLists for tef-simulator osal unit
+#
+
+SET(OSAL_SOURCES
+    ${OSAL_PATH}/OsaCommon.c
+    ${OSAL_PATH}/OsaIpc.c
+    ${OSAL_PATH}/OsaQueue.c
+    ${OSAL_PATH}/OsaSem.c
+    ${OSAL_PATH}/OsaSignal.c
+    ${OSAL_PATH}/OsaTask.c
+    )
+
+ADD_LIBRARY(${TARGET_TEF_SIMULATOR_OSAL} ${OSAL_SOURCES})
+
+INSTALL(TARGETS ${TARGET_TEF_SIMULATOR_OSAL} LIBRARY DESTINATION ${LIB_INSTALL_DIR})
index 57bb384..489f82b 100644 (file)
@@ -180,7 +180,7 @@ static int UlOsaNamedSemCreate(const char pcName[10], int iCount,
        return iRetVal;
 }
 
-#if 0  // unused funciton Á¦°Å.
+#if 0  // unused funciton ����.
 static int UlOsaNamedSemDelete(unsigned int uiSmid)
 {
        UlOsaSem_t *sem = (UlOsaSem_t*)uiSmid;
diff --git a/packaging/tef-simulator.manifest b/packaging/tef-simulator.manifest
new file mode 100644 (file)
index 0000000..a76fdba
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+       <request>
+               <domain name="_" />
+       </request>
+</manifest>
diff --git a/packaging/tef-simulator.spec b/packaging/tef-simulator.spec
new file mode 100644 (file)
index 0000000..7eaea97
--- /dev/null
@@ -0,0 +1,52 @@
+Name:       tef-simulator
+Summary:    TEF TrustZone simulator and it's utilities
+Version:    0.0.1
+Release:    1
+Group:      Security
+License:    Apache-2.0 and BSD-3-Clause
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires: cmake
+BuildRequires: boost-devel
+BuildRequires: pkgconfig(dlog)
+BuildRequires: pkgconfig(openssl)
+BuildRequires: pkgconfig(cynara-client)
+BuildRequires: pkgconfig(cynara-creds-socket)
+BuildRequires: pkgconfig(libtzplatform-config)
+BuildRequires: pkgconfig(security-manager)
+
+%global bin_dir %{?TZ_SYS_BIN:%TZ_SYS_BIN}%{!?TZ_SYS_BIN:%_bindir}
+%global sbin_dir %{?TZ_SYS_SBIN:%TZ_SYS_SBIN}%{!?TZ_SYS_SBIN:%_sbindir}
+
+%description
+TEF Simulator provides a TrustZone simulated environment
+which can be used on platforms not supporting ARM TrustZone
+environment natively (ex. on an emulator).
+
+%prep
+%setup -q
+
+%build
+%cmake . \
+        -DCMAKE_BUILD_TYPE=%{?build_type:%build_type}%{!?build_type:RELEASE} \
+        -DBIN_DIR=%{bin_dir} \
+        -DSBIN_DIR=%{sbin_dir}
+make %{?silent:--silent} %{?jobs:-j%jobs}
+
+%install
+%make_install
+
+%pre
+
+%post
+
+%preun
+
+%postun
+
+%files -n tef-simulator
+%{bin_dir}/tef-simulator-daemon
+%{_libdir}/libtef-simulator-log.so
+%{_libdir}/libtef-simulator-osal.so
+%{_libdir}/libtef-simulator-ssflib.so
+%{_libdir}/libteec.so
+%{sbin_dir}/tef-simulator-update-uuid-list.sh
diff --git a/simulatordaemon/.gitignore b/simulatordaemon/.gitignore
deleted file mode 100755 (executable)
index 3df573f..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/Debug/
diff --git a/simulatordaemon/CMakeLists.txt b/simulatordaemon/CMakeLists.txt
new file mode 100644 (file)
index 0000000..8c7d710
--- /dev/null
@@ -0,0 +1,106 @@
+# Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
+#
+#    Licensed under the Apache License, Version 2.0 (the "License");
+#    you may not use this file except in compliance with the License.
+#    You may obtain a copy of the License at
+#
+#        http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS,
+#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#    See the License for the specific language governing permissions and
+#    limitations under the License.
+#
+# @file
+# @author  Lukasz Kostyra (l.kostyra@samsung.com)
+# @brief   CMakeLists for tef-simulator daemon unit
+#
+
+PKG_CHECK_MODULES(DAEMON_DEPS REQUIRED
+                  cynara-client
+                  cynara-creds-socket
+                  security-manager
+                  )
+
+FIND_PACKAGE(Threads REQUIRED)
+
+SET(DAEMON_SOURCES
+    ${DAEMON_PATH}/src/ConnectionSession.cpp
+    ${DAEMON_PATH}/src/ioService.cpp
+    # TODO change Security to cpp module
+    #${DAEMON_PATH}/src/security.c
+    # TODO lots of circular dependecies are within SecurityChecker, refactor
+    #${DAEMON_PATH}/src/SecurityChecker.cpp
+    ${DAEMON_PATH}/src/Session.cpp
+    ${DAEMON_PATH}/src/SimulatorDaemon.cpp
+    ${DAEMON_PATH}/src/SimulatorDaemonServer.cpp
+    ${DAEMON_PATH}/src/TAFactory.cpp
+    ${DAEMON_PATH}/src/TAInstance.cpp
+    ${DAEMON_PATH}/src/TEEContext.cpp
+    ${DAEMON_PATH}/src/ClientCommands/CommandCloseSession.cpp
+    ${DAEMON_PATH}/src/ClientCommands/CommandCloseTASession.cpp
+    ${DAEMON_PATH}/src/ClientCommands/CommandFinContext.cpp
+    ${DAEMON_PATH}/src/ClientCommands/CommandInitContext.cpp
+    ${DAEMON_PATH}/src/ClientCommands/CommandInvokeCommand.cpp
+    ${DAEMON_PATH}/src/ClientCommands/CommandInvokeTACommand.cpp
+    ${DAEMON_PATH}/src/ClientCommands/CommandOpenSession.cpp
+    ${DAEMON_PATH}/src/ClientCommands/CommandOpenTASession.cpp
+    ${DAEMON_PATH}/src/ClientCommands/CommandPanic.cpp
+    ${DAEMON_PATH}/src/ClientCommands/CommandRegSharedMem.cpp
+    ${DAEMON_PATH}/src/ClientCommands/CommandRelSharedMem.cpp
+    ${DAEMON_PATH}/src/ClientCommands/CommandReqCancellation.cpp
+    ${DAEMON_PATH}/src/ClientCommands/MakeCommand.cpp
+    ${DAEMON_PATH}/src/ResponseCommands/ResCommandCloseSession.cpp
+    ${DAEMON_PATH}/src/ResponseCommands/ResCommandInvokeCommand.cpp
+    ${DAEMON_PATH}/src/ResponseCommands/ResCommandOpenSession.cpp
+    ${DAEMON_PATH}/src/ResponseCommands/ResCommandReqCancellation.cpp
+    ${DAEMON_PATH}/src/ResponseCommands/ResMakeCommand.cpp
+    ${DAEMON_PATH}/src/TABinaryManager/TABinaryManager.cpp
+    ${DAEMON_PATH}/src/TABinaryManager/TAManifest.cpp
+    ${DAEMON_PATH}/src/TABinaryManager/TAUnpack.cpp
+    )
+
+
+ADD_EXECUTABLE(${TARGET_TEF_SIMULATOR_DAEMON}
+    ${DAEMON_SOURCES}
+    )
+
+ADD_DEPENDENCIES(${TARGET_TEF_SIMULATOR_DAEMON}
+    ${TARGET_TEF_SIMULATOR_OSAL}
+    ${TARGET_TEF_SIMULATOR_LOG}
+    )
+
+INCLUDE_DIRECTORIES(
+    ${DAEMON_PATH}/inc
+    ${DAEMON_PATH}/inc/ClientCommands
+    ${DAEMON_PATH}/inc/ResponseCommands
+    # TODO move TABinaryManager headers to inc directory
+    ${DAEMON_PATH}/src/TABinaryManager/
+    ${TEF_SIMULATOR_INCLUDE_PATH}/include
+    ${LOG_PATH}
+    ${OSAL_PATH}
+    ${DAEMON_DEPS_INCLUDE_DIRS}
+    )
+
+LINK_DIRECTORIES(
+    ${LOG_PATH}
+    )
+
+SET_TARGET_PROPERTIES(
+    ${TARGET_TEF_SIMULATOR_DAEMON}
+    PROPERTIES
+        COMPILE_FLAGS "-U_FORTIFY_SOURCE"
+    )
+
+TARGET_LINK_LIBRARIES(${TARGET_TEF_SIMULATOR_DAEMON}
+    ${CMAKE_THREAD_LIBS_INIT}
+    ${DAEMON_DEPS_LIBRARIES}
+    ${TARGET_TEF_SIMULATOR_LOG}
+    ${TARGET_TEF_SIMULATOR_OSAL}
+    boost_system
+    )
+
+INSTALL(TARGETS ${TARGET_TEF_SIMULATOR_DAEMON} DESTINATION ${BIN_DIR})
+INSTALL(PROGRAMS ${DAEMON_PATH}/src/scripts/update_uuid_list.sh DESTINATION ${SBIN_DIR}
+        RENAME ${TARGET_TEF_SIMULATOR}-update-uuid-list.sh)
index e040afa..a030d72 100644 (file)
@@ -26,8 +26,9 @@
 
 
 using std::string;
+class ConnectionSession;
 
-class SecurityChecker{
+class SecurityChecker {
 private:
     ConnectionSession* mConnSess;
 
@@ -38,7 +39,7 @@ public:
     static bool clientHasAccessToTa(ConnectionSession *ses, string taName);
     static bool clientHasCynaraPermission(ConnectionSession *ses, string privelege);
 
-    bool clientHasAccessToTa(string taName); 
+    bool clientHasAccessToTa(string taName);
     bool clientHasCynaraPermission(string privelege);
 
     ~SecurityChecker();
index c1fc73b..79212de 100644 (file)
@@ -53,6 +53,10 @@ public:
        IConnectionSession* mConnSess;
        // ContextID assigned to the instance
        uint32_t mContextID;
+       /* Security checker wich can tell us if client has different Tizen's policy permissions*/
+       // TODO refactor SecurityChecker
+       //SecurityChecker mConnSecChecker;
+
        /* For TA internal APIs support, dummy Context is created and for recognizing
         * the context as dummy isInternal member variable is used
         */
index 4939b2f..f2c71df 100644 (file)
@@ -102,6 +102,13 @@ TEEC_Result Session::createSession(OpenSessionData data) {
        string TAUUID = TABin->getUUIDAsString(data.uuid);
        string argvPort = TABin->getPort(TAUUID);
 
+       /*string TAName(TAUUID);
+       std::transform(TAName.begin(), TAName.end(), TAName.begin(), ::toupper);
+       if(!mContext->mConnSecChecker.clientHasAccessToTa(TAUUID)){
+               LOGE(SIM_DAEMON, "Client has no permission for access TA: %s ", TAName.c_str());
+               return TEEC_ERROR_ACCESS_DENIED;
+       }*/
+
        if (argvPort != "") {
                pthread_rwlock_wrlock(&TAFact->mTAInstanceMapLock);
                multimap<string, TAInstancePtr>::iterator itr;
index 7d06878..6d9e746 100644 (file)
@@ -56,9 +56,17 @@ void SimulatorDaemonServer::startAccept() {
  * @param error error code if any occurred
  */
 void SimulatorDaemonServer::handleAccept(
-    ConnectionSession::session_ptr new_session,
-    const boost::system::error_code& error) {
+       ConnectionSession::session_ptr new_session,
+       const boost::system::error_code& error) {
+
+       const string privelege("http://tizen.org/privilege/account.read");
        LOGD(SIM_DAEMON, "Entry");
+       // TODO reenable after refactor
+       /*if (!SecurityChecker::clientHasCynaraPermission(new_session.get(), privelege)){
+               LOGE("Client has no permission to use TEE");
+               return;
+       }*/
+
        if (!error) {
                new_session->start();
        }
diff --git a/simulatordaemon/src/TABinaryManager/Debug/TABinaryManager b/simulatordaemon/src/TABinaryManager/Debug/TABinaryManager
deleted file mode 100755 (executable)
index 27a5b72..0000000
Binary files a/simulatordaemon/src/TABinaryManager/Debug/TABinaryManager and /dev/null differ
diff --git a/simulatordaemon/src/TABinaryManager/Debug/TABinaryManager.d b/simulatordaemon/src/TABinaryManager/Debug/TABinaryManager.d
deleted file mode 100755 (executable)
index 93160c3..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-TABinaryManager.d: ../TABinaryManager.cpp ../TABinaryManager.h \
- ../TAManifest.h ../TAUnpack.h ../Config.h \
- /home/krishna/TASDKCode/Simulator/TABinaryManager/TABinaryManager/../../include/tee_internal_api.h
-
-../TABinaryManager.h:
-
-../TAManifest.h:
-
-../TAUnpack.h:
-
-../Config.h:
-
-/home/krishna/TASDKCode/Simulator/TABinaryManager/TABinaryManager/../../include/tee_internal_api.h:
diff --git a/simulatordaemon/src/TABinaryManager/Debug/TAManifest.d b/simulatordaemon/src/TABinaryManager/Debug/TAManifest.d
deleted file mode 100755 (executable)
index aed1eaa..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-TAManifest.d: ../TAManifest.cpp ../TAManifest.h ../rapidxml/rapidxml.hpp \
- ../rapidxml/rapidxml_utils.hpp ../rapidxml/rapidxml.hpp
-
-../TAManifest.h:
-
-../rapidxml/rapidxml.hpp:
-
-../rapidxml/rapidxml_utils.hpp:
-
-../rapidxml/rapidxml.hpp:
diff --git a/simulatordaemon/src/TABinaryManager/Debug/TAUnpack.d b/simulatordaemon/src/TABinaryManager/Debug/TAUnpack.d
deleted file mode 100755 (executable)
index 3c6b7be..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-TAUnpack.d: ../TAUnpack.cpp ../TAUnpack.h
-
-../TAUnpack.h:
diff --git a/simulatordaemon/src/TABinaryManager/Debug/TestMain.d b/simulatordaemon/src/TABinaryManager/Debug/TestMain.d
deleted file mode 100755 (executable)
index 9f653a9..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-TestMain.d: ../TestMain.cpp ../TABinaryManager.h ../TAManifest.h \
- ../TAUnpack.h ../Config.h \
- /home/krishna/TASDKCode/Simulator/TABinaryManager/TABinaryManager/../../include/tee_internal_api.h
-
-../TABinaryManager.h:
-
-../TAManifest.h:
-
-../TAUnpack.h:
-
-../Config.h:
-
-/home/krishna/TASDKCode/Simulator/TABinaryManager/TABinaryManager/../../include/tee_internal_api.h:
diff --git a/simulatordaemon/src/TABinaryManager/Debug/makefile b/simulatordaemon/src/TABinaryManager/Debug/makefile
deleted file mode 100755 (executable)
index 70390a8..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-################################################################################
-# Automatically-generated file. Do not edit!
-################################################################################
-
--include ../makefile.init
-
-RM := rm -rf
-
-# All of the sources participating in the build are defined here
--include sources.mk
--include subdir.mk
--include objects.mk
-
-ifneq ($(MAKECMDGOALS),clean)
-ifneq ($(strip $(CC_DEPS)),)
--include $(CC_DEPS)
-endif
-ifneq ($(strip $(C++_DEPS)),)
--include $(C++_DEPS)
-endif
-ifneq ($(strip $(C_UPPER_DEPS)),)
--include $(C_UPPER_DEPS)
-endif
-ifneq ($(strip $(CXX_DEPS)),)
--include $(CXX_DEPS)
-endif
-ifneq ($(strip $(CPP_DEPS)),)
--include $(CPP_DEPS)
-endif
-ifneq ($(strip $(C_DEPS)),)
--include $(C_DEPS)
-endif
-endif
-
--include ../makefile.defs
-
-# Add inputs and outputs from these tool invocations to the build variables 
-
-# All Target
-all: TABinaryManager
-
-# Tool invocations
-TABinaryManager: $(OBJS) $(USER_OBJS)
-       @echo 'Building target: $@'
-       @echo 'Invoking: GCC C++ Linker'
-       g++  -o "TABinaryManager" $(OBJS) $(USER_OBJS) $(LIBS)
-       @echo 'Finished building target: $@'
-       @echo ' '
-
-# Other Targets
-clean:
-       -$(RM) $(CC_DEPS)$(C++_DEPS)$(EXECUTABLES)$(C_UPPER_DEPS)$(CXX_DEPS)$(OBJS)$(CPP_DEPS)$(C_DEPS) TABinaryManager
-       -@echo ' '
-
-.PHONY: all clean dependents
-.SECONDARY:
-
--include ../makefile.targets
diff --git a/simulatordaemon/src/TABinaryManager/Debug/objects.mk b/simulatordaemon/src/TABinaryManager/Debug/objects.mk
deleted file mode 100644 (file)
index 742c2da..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-################################################################################
-# Automatically-generated file. Do not edit!
-################################################################################
-
-USER_OBJS :=
-
-LIBS :=
-
diff --git a/simulatordaemon/src/TABinaryManager/Debug/sources.mk b/simulatordaemon/src/TABinaryManager/Debug/sources.mk
deleted file mode 100644 (file)
index a7f166f..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-################################################################################
-# Automatically-generated file. Do not edit!
-################################################################################
-
-C_UPPER_SRCS := 
-CXX_SRCS := 
-C++_SRCS := 
-OBJ_SRCS := 
-CC_SRCS := 
-ASM_SRCS := 
-CPP_SRCS := 
-C_SRCS := 
-O_SRCS := 
-S_UPPER_SRCS := 
-CC_DEPS := 
-C++_DEPS := 
-EXECUTABLES := 
-C_UPPER_DEPS := 
-CXX_DEPS := 
-OBJS := 
-CPP_DEPS := 
-C_DEPS := 
-
-# Every subdirectory with source files must be described here
-SUBDIRS := \
-. \
-
diff --git a/simulatordaemon/src/TABinaryManager/Debug/subdir.mk b/simulatordaemon/src/TABinaryManager/Debug/subdir.mk
deleted file mode 100644 (file)
index 8160197..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-################################################################################
-# Automatically-generated file. Do not edit!
-################################################################################
-
-# Add inputs and outputs from these tool invocations to the build variables 
-CPP_SRCS += \
-../TABinaryManager.cpp \
-../TAManifest.cpp \
-../TAUnpack.cpp \
-../TestMain.cpp 
-
-OBJS += \
-./TABinaryManager.o \
-./TAManifest.o \
-./TAUnpack.o \
-./TestMain.o 
-
-CPP_DEPS += \
-./TABinaryManager.d \
-./TAManifest.d \
-./TAUnpack.d \
-./TestMain.d 
-
-
-# Each subdirectory must supply rules for building sources it contributes
-%.o: ../%.cpp
-       @echo 'Building file: $<'
-       @echo 'Invoking: GCC C++ Compiler'
-       g++ -I"/home/krishna/TASDKCode/Simulator/TABinaryManager/TABinaryManager/../../include" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
-       @echo 'Finished building: $<'
-       @echo ' '
-
-
index 7c15c5a..20056f5 100644 (file)
@@ -185,14 +185,14 @@ bool TABinaryManager::readUUIDList() {
                getline(uuidFileStream, str);
                line = line + str;
        }
-       
+
        /*
        int ch = fgetc(fp);
        while ((ch != '\n') && (ch != EOF)) {
                line = line + ch;
                ch = fgetc(fp);
        }*/
-       
+
        while (line != "") {
                line = line + "\0";
                StructBinaryInfo info;
@@ -232,7 +232,7 @@ bool TABinaryManager::readUUIDList() {
 
                if(uuidFileStream) {
                        getline(uuidFileStream, str);
-                       line = line + str;      
+                       line = line + str;
                }
 
                /*
@@ -277,11 +277,11 @@ void TABinaryManager::decryptImage(StructBinaryInfo& info) {
                //cout << "line " << line << endl;
                myfile.close();
        }
-    
-    // hash of Keydata is not required.
+
+       // hash of Keydata is not required.
        string dec_command = "openssl enc " + cipher + " -d -nopad -nosalt -K " + secret
-           + " -in " + info.imagePath + " -out " + info.imagePath
-           + "_dec -iv 0000000000000000";
+               + " -in " + info.imagePath + " -out " + info.imagePath
+               + "_dec -iv 0000000000000000";
        //std::cout << dec_command << std::endl;
        system(dec_command.c_str());
        string removeEncImage = "rm -f " + info.imagePath;
index 2572bd8..57c863a 100644 (file)
@@ -95,8 +95,8 @@ TAInstancePtr TAFactory::getTAInstance(TEEC_UUID uuid, ISession* session) {
 
        // Change to upper char. TA list has upper char.
        locale loc;
-    for (size_t i=0; i<TAUUID.length(); ++i)
-       TAUUID[i] = toupper(TAUUID[i],loc);
+       for (size_t i=0; i<TAUUID.length(); ++i)
+               TAUUID[i] = toupper(TAUUID[i],loc);
 
 
        if ((!checkIfTARunning(TAUUID))
index 02e764b..bf47072 100644 (file)
@@ -17,7 +17,6 @@
  *   limitations under the License.
  */
 
-#include <teec_trace.h>
 #include <stdlib.h>
 #include <limits.h>
 #include <unistd.h>
diff --git a/ssflib/.gitignore b/ssflib/.gitignore
deleted file mode 100755 (executable)
index 3df573f..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/Debug/
diff --git a/ssflib/CMakeLists.txt b/ssflib/CMakeLists.txt
new file mode 100644 (file)
index 0000000..905ad01
--- /dev/null
@@ -0,0 +1,107 @@
+# Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
+#
+#    Licensed under the Apache License, Version 2.0 (the "License");
+#    you may not use this file except in compliance with the License.
+#    You may obtain a copy of the License at
+#
+#        http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS,
+#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#    See the License for the specific language governing permissions and
+#    limitations under the License.
+#
+# @file
+# @author  Lukasz Kostyra (l.kostyra@samsung.com)
+# @brief   CMakeLists for tef-simulator ssflib unit
+#
+
+SET(SSFLIB_CRYPTOCORE_SOURCES
+    ${SSFLIB_DEP_CRYPTOCORE_PATH}/source/CC_API.c
+    ${SSFLIB_DEP_CRYPTOCORE_PATH}/source/base/cc_ANSI_x931.c
+    ${SSFLIB_DEP_CRYPTOCORE_PATH}/source/base/cc_aes.c
+    ${SSFLIB_DEP_CRYPTOCORE_PATH}/source/base/cc_bignum.c
+    ${SSFLIB_DEP_CRYPTOCORE_PATH}/source/base/cc_des.c
+    ${SSFLIB_DEP_CRYPTOCORE_PATH}/source/base/cc_ecc.c
+    ${SSFLIB_DEP_CRYPTOCORE_PATH}/source/base/cc_fast_math.c
+    ${SSFLIB_DEP_CRYPTOCORE_PATH}/source/base/cc_hash.c
+    ${SSFLIB_DEP_CRYPTOCORE_PATH}/source/base/cc_md5.c
+    ${SSFLIB_DEP_CRYPTOCORE_PATH}/source/base/cc_moo.c
+    ${SSFLIB_DEP_CRYPTOCORE_PATH}/source/base/cc_pkcs1_v21.c
+    ${SSFLIB_DEP_CRYPTOCORE_PATH}/source/base/cc_rc4.c
+    ${SSFLIB_DEP_CRYPTOCORE_PATH}/source/base/cc_sha1.c
+    ${SSFLIB_DEP_CRYPTOCORE_PATH}/source/base/cc_sha2.c
+    ${SSFLIB_DEP_CRYPTOCORE_PATH}/source/base/cc_snow2.c
+    ${SSFLIB_DEP_CRYPTOCORE_PATH}/source/middle/cc_cmac.c
+    ${SSFLIB_DEP_CRYPTOCORE_PATH}/source/middle/cc_dh.c
+    ${SSFLIB_DEP_CRYPTOCORE_PATH}/source/middle/cc_dsa.c
+    ${SSFLIB_DEP_CRYPTOCORE_PATH}/source/middle/cc_ecdh.c
+    ${SSFLIB_DEP_CRYPTOCORE_PATH}/source/middle/cc_ecdsa.c
+    ${SSFLIB_DEP_CRYPTOCORE_PATH}/source/middle/cc_hmac.c
+    ${SSFLIB_DEP_CRYPTOCORE_PATH}/source/middle/cc_rng.c
+    ${SSFLIB_DEP_CRYPTOCORE_PATH}/source/middle/cc_rsa.c
+    ${SSFLIB_DEP_CRYPTOCORE_PATH}/source/middle/cc_symmetric.c
+    ${SSFLIB_DEP_CRYPTOCORE_PATH}/source/middle/cc_tdes.c
+    )
+
+SET(SSFLIB_SWDSS_SOURCES
+    ${SSFLIB_DEP_SWDSS_PATH}/source/file_op.cpp
+    ${SSFLIB_DEP_SWDSS_PATH}/source/secure_file.cpp
+    ${SSFLIB_DEP_SWDSS_PATH}/source/ss_api.cpp
+    ${SSFLIB_DEP_SWDSS_PATH}/source/ss_crypto.cpp
+    ${SSFLIB_DEP_SWDSS_PATH}/source/ss_misc.cpp
+    ${SSFLIB_DEP_SWDSS_PATH}/source/ss_temp_store.cpp
+   )
+
+SET(SSFLIB_TIME_SOURCES
+    ${SSFLIB_DEP_TIME_PATH}/ssf_time.cpp
+   )
+
+SET(SSFLIB_UCI_SOURCES
+    ${SSFLIB_DEP_UCI_PATH}/source/uci_aes_xcbc_mac.c
+    ${SSFLIB_DEP_UCI_PATH}/source/uci_api.c
+    ${SSFLIB_DEP_UCI_PATH}/source/uci_cryptocore.c
+    ${SSFLIB_DEP_UCI_PATH}/source/uci_hwcrypto.c
+   )
+
+SET(SSFLIB_SOURCES
+    ${SSFLIB_PATH}/src/app_debug.cpp
+    ${SSFLIB_PATH}/src/ssf_arithmetic.cpp
+    ${SSFLIB_PATH}/src/ssf_client.cpp
+    ${SSFLIB_PATH}/src/ssf_crypto.cpp
+    ${SSFLIB_PATH}/src/ssf_lib.cpp
+    ${SSFLIB_PATH}/src/ssf_malloc.cpp
+    ${SSFLIB_PATH}/src/ssf_panic.cpp
+    ${SSFLIB_PATH}/src/ssf_permission.cpp
+    ${SSFLIB_PATH}/src/ssf_storage.cpp
+    ${SSFLIB_PATH}/src/ssf_taentrypoint.cpp
+    )
+
+
+ADD_LIBRARY(${TARGET_TEF_SIMULATOR_SSFLIB} SHARED
+    ${SSFLIB_SOURCES}
+    ${SSFLIB_CRYPTOCORE_SOURCES}
+    ${SSFLIB_SWDSS_SOURCES}
+    ${SSFLIB_TIME_SOURCES}
+    ${SSFLIB_UCI_SOURCES}
+    )
+
+INCLUDE_DIRECTORIES(
+    ${SSFLIB_DEP_CRYPTOCORE_PATH}/include
+    ${SSFLIB_DEP_CRYPTOCORE_PATH}/include/base
+    ${SSFLIB_DEP_CRYPTOCORE_PATH}/include/middle
+    ${SSFLIB_DEP_SWDSS_PATH}/include
+    ${SSFLIB_DEP_UCI_PATH}/include
+    ${SSFLIB_PATH}/inc
+    ${LOG_PATH}
+    ${OSAL_PATH}
+    ${TEF_SIMULATOR_INCLUDE_PATH}/include
+    )
+
+TARGET_LINK_LIBRARIES(${TARGET_TEF_SIMULATOR_SSFLIB}
+    ${TARGET_TEF_SIMULATOR_OSAL}
+    ${TARGET_TEF_SIMULATOR_LOG}
+    )
+
+INSTALL(TARGETS ${TARGET_TEF_SIMULATOR_SSFLIB} LIBRARY DESTINATION ${LIB_INSTALL_DIR})
index 51059b3..d004504 100644 (file)
@@ -11,7 +11,7 @@
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
- * limitations under the License. 
+ * limitations under the License.
  */
 
 #include "ss_crypto.h"
@@ -293,12 +293,12 @@ int DecryptEx(uint8_t* dest, uint8_t* src, unsigned long data_len,
 }
 
 int is_valid_credential(const ss_credential_s& cred) {
-       // In its canonical form, a UUID consists of 32 hexadecimal digits, displayed in 5 groups separated by hyphens, 
+       // In its canonical form, a UUID consists of 32 hexadecimal digits, displayed in 5 groups separated by hyphens,
        // in the form 8-4-4-4-12 for a total of 36 characters(32 digits and 4 '-'). For example:
-       // 550e8400-e29b-41d4-a716-446655440000 
-       // Version 4 UUIDs use a scheme relying only on random numbers. This algorithm sets the version number as well 
-       // as two reserved bits. All other bits are set using a random or pseudorandom data source. 
-       // Version 4 UUIDs have the form xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx with hexadecimal digits x and hexadecimal 
+       // 550e8400-e29b-41d4-a716-446655440000
+       // Version 4 UUIDs use a scheme relying only on random numbers. This algorithm sets the version number as well
+       // as two reserved bits. All other bits are set using a random or pseudorandom data source.
+       // Version 4 UUIDs have the form xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx with hexadecimal digits x and hexadecimal
        // digits 8, 9, A, or B for y. e.g. f47ac10b-58cc-4372-a567-0e02b2c3d479.
        char tmp_uuid[SS_MAX_UUID_LEN + 1] = {0};
        char tmp_mn[SS_MAX_MODULE_NAME_LEN + 1] = {0};
@@ -413,7 +413,7 @@ uint32_t secure_file::transform_name_to_id(const char* data_name) {
 uint64_t secure_file::transform_id_to_name(uint64_t uDataFileID) {
        uint64_t uDataFileName;
        CBT_UINT32 uDataFileName1, uDataFileName2;
-       // the main idea of this function is to transfor initial file id into different number which 
+       // the main idea of this function is to transfor initial file id into different number which
        // hexidecimal representation will be the real file name.
        // first part
        seed_rand(uDataFileID & 0xffffffff);
@@ -430,7 +430,7 @@ uint64_t secure_file::transform_id_to_name(uint64_t uDataFileID) {
        // hexidecimal representation of return value will be the real file name.
        uDataFileName = uDataFileName1 | (((uint64_t)uDataFileName2) << 32);
 
-       SLOGI("[%s][%d] uDataFileName : %llu", __FUNCTION__, __LINE__, uDataFileName);
+       SLOGI("[%s][%d] uDataFileName : %lu", __FUNCTION__, __LINE__, uDataFileName);
        return uDataFileName;
 }
 
@@ -944,7 +944,7 @@ int secure_file::serialize_data(unsigned char** buffer,
                //SLOGE("fail to alloc memory for data.");
                return SS_RET_MALLOC_FAILED;
        }
-    
+
        memcpy(*buffer, m_write_data, m_write_data_size);
        ret_size = m_write_data_size;
        return SS_RET_SUCCESS;
index 0acb7e4..a5d6a65 100644 (file)
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
- * limitations under the License. 
+ * limitations under the License.
  */
 
-/** 
- * @file UCI_API.h 
- * @brief UCI codec. 
- * @author guoxing.xu 
- * @version 1.0 
+/**
+ * @file UCI_API.h
+ * @brief UCI codec.
+ * @author guoxing.xu
+ * @version 1.0
  * @date 2013.7
  **/
 
@@ -41,7 +41,7 @@ extern "C" {
  *
  * @param[in] algorithm, algorithm wants to use.
  * @config[in] config, config specified which function to call.
- * @retval UCI handle  if success  
+ * @retval UCI handle  if success
  * @retval UCI_ERROR if fail
  * @retval UCI_MEM_ALLOR_ERROR if allocate memory error.
  */
@@ -51,7 +51,7 @@ UCI_HANDLE uci_context_alloc(unsigned int algorithm,
 /**
  * @brief free allocated memory.
  *
- * @param[in] algorithm algorithm wants to use. 
+ * @param[in] algorithm algorithm wants to use.
  * @retval UCI_SUCCESS  If no error occurred.
  * @retval UCI_INVALID_HANDLE   If oh is not a invalid handle.
  */
@@ -70,17 +70,17 @@ int uci_md_init(UCI_HANDLE oh);
  * @brief    process a message block
  * @param[in] oh    UCI operator handle.
  * @param[in] msg   message.
- * @param[in] msglen    byte-length of msg.    
+ * @param[in] msglen    byte-length of msg.
  * @retval UCI_SUCCESS If no error occurred.
  * @retval UCI_INVALID_HANDLE  If oh is not a valid handle.
  * @retval UCI_ERROR if msg is NULL while msg_len is not 0
  */
 int uci_md_update(UCI_HANDLE oh, unsigned char *msg, unsigned int msg_len);
 
-/**    
+/**
  * @brief get hashed message
  * @param[in] oh UCI operator handle
- * @param[out] output   hashed message.    
+ * @param[out] output   hashed message.
  * @retval UCI_SUCCESS  If no error occurred.
  * @retval UCI_INVALID_HANDLE   If oh is not a valid handle.
  * @retval UCI_ERROR If operate failed. Such as output is NULL.
@@ -92,7 +92,7 @@ int uci_md_final(UCI_HANDLE oh, unsigned char * output);
  * @param[in] oh UCI operator handle
  * @param[in] msg    message
  * @param[in] msglen byte-length of msg
- * @param[out] output    hashed message.    
+ * @param[out] output    hashed message.
  * @retval UCI_SUCCESS  If no error occurred.
  * @retval UCI_INVALID_HANDLE   If oh is not a valid handle.
  * @retval UCI_ERROR if output is NULL.
@@ -149,7 +149,7 @@ int uci_mac_final(UCI_HANDLE oh, unsigned char *output,
  */
 int uci_mac_get_mac(UCI_HANDLE oh, unsigned char *key, unsigned int key_len,
     unsigned char * msg, unsigned int msg_len, unsigned char * output,
-    unsigned int * output_len);
+    size_t *output_len);
 
 /**
  * @brief    initialize crypt context for symmetric cryptography
@@ -161,7 +161,7 @@ int uci_mac_get_mac(UCI_HANDLE oh, unsigned char *key, unsigned int key_len,
  * @param[in] iv    initial vector
  * @retval UCI_SUCCESS  if no error is occured.
  * @retval UCI_INVALID_HANDLE   if oh is invalid handle.
- * @retval UCI_INVALID_ARGUMENT if one or moer parameter is ininvalid. 
+ * @retval UCI_INVALID_ARGUMENT if one or moer parameter is ininvalid.
  * @retval UCI_ERROR    if key is null. iv is null is invalid.
  */
 int uci_se_init(UCI_HANDLE oh, unsigned int mode, unsigned padding,
@@ -225,7 +225,7 @@ int uci_se_decrypt_oneblock(UCI_HANDLE oh, unsigned char * plain_text,
  * @brief    initialize crypt context for symmetric cryptography in whitebox aes
  * @param[in] oh    UCI handle
  * @param[in] flag  if flag is 1 means table was encrypted, and key is used to decrypt table. else key is set NULL.
- * @param[in]     key    key used to decrypt table 
+ * @param[in]     key    key used to decrypt table
  * @param[in] table_filepath   the file path where table stored.
  * @param[in] pencoder1    encoder instance
  * @param[in] pencoder2    encoder instance
@@ -285,7 +285,7 @@ int uci_ae_gen_keypair(UCI_HANDLE oh, uci_key_s* keymaterial,
 int uci_ae_set_keypair(UCI_HANDLE oh, uci_key_s* keymaterial,
     uci_param_s *param);
 
-/**    
+/**
  * @brief    RSA Encryption
  * @param[in] oh    UCI handle
  * @param[in] input message to encrypt
@@ -294,7 +294,7 @@ int uci_ae_set_keypair(UCI_HANDLE oh, uci_key_s* keymaterial,
  * @param[out] output_len   byte-length of output
  * @retval UCI_SUCCESS  if no error is occured.
  * @retval UCI_INVALID_HANDLE   if oh is ininvalid handle.
- * @retval UCI_MSG_TOO_LONG    the input_len is too long. The correct usage is that input_len shorter than key length. 
+ * @retval UCI_MSG_TOO_LONG    the input_len is too long. The correct usage is that input_len shorter than key length.
  * @retval UCI_ERROR    input or output is NULL..
  */
 int uci_ae_encrypt(UCI_HANDLE oh, unsigned char * input, unsigned int input_len,
@@ -309,7 +309,7 @@ int uci_ae_encrypt(UCI_HANDLE oh, unsigned char * input, unsigned int input_len,
  * @param[out]output_len    byte-length of output
  * @retval UCI_SUCCESS  if no error is occured.
  * @retval UCI_INVALID_HANDLE   if oh is invalid handle.
- * @retval UCI_MSG_TOO_LONG    the input_len is too long. The correct usage is that input_len shorter than key length. 
+ * @retval UCI_MSG_TOO_LONG    the input_len is too long. The correct usage is that input_len shorter than key length.
  * @retval UCI_ERROR    input or output is NULL.
  */
 int uci_ae_decrypt(UCI_HANDLE oh, unsigned char * input, unsigned int input_len,
@@ -324,11 +324,11 @@ int uci_ae_decrypt(UCI_HANDLE oh, unsigned char * input, unsigned int input_len,
  * @param[out]output_len    byte-length of output
  * @retval UCI_SUCCESS  if no error is occured.
  * @retval UCI_INVALID_HANDLE   if oh is invalid handle.
- * @retval UCI_MSG_TOO_LONG    the input_len is too long. The correct usage is that input_len shorter than key length. 
+ * @retval UCI_MSG_TOO_LONG    the input_len is too long. The correct usage is that input_len shorter than key length.
  * @retvla UCI_ERROR   input or output is NULL.
  */
 int uci_ae_decryptbycrt(UCI_HANDLE oh, unsigned char * input,
-    unsigned int input_len, unsigned char * output, unsigned int* output_len);
+    unsigned int input_len, unsigned char * output, size_t* output_len);
 
 /**
  * @brief    whitebox rsa encryption
@@ -367,7 +367,7 @@ int uci_wbae_decrypt(UCI_HANDLE oh, unsigned char * input,
  * @param[out]sign_len        byte-length of signature
  * @retval UCI_SUCCESS  if no error is occured.
  * @retval UCI_INVALID_HANDLE   if oh is invalid handle.
- * @retval UCI_MSG_TOO_LONG    the input_len is too long. The correct usage is that input_len shorter than key length. 
+ * @retval UCI_MSG_TOO_LONG    the input_len is too long. The correct usage is that input_len shorter than key length.
  * @retval UCI_ERROR    if hash or signature is NULL.
  */
 int uci_ds_sign(UCI_HANDLE oh, unsigned char * hash, unsigned int hash_len,
@@ -383,7 +383,7 @@ int uci_ds_sign(UCI_HANDLE oh, unsigned char * hash, unsigned int hash_len,
  * @param[out] result result of verifying signature
  * @retval UCI_SUCCESS  if no error is occured.
  * @retval UCI_INVALID_HANDLE   if oh is invalid handle.
- * @retval UCI_MSG_TOO_LONG    the input_len is too long. The correct usage is that input_len shorter than key length. 
+ * @retval UCI_MSG_TOO_LONG    the input_len is too long. The correct usage is that input_len shorter than key length.
  * @retval UCI_ERROR    If hash or signature is NULL.
  */
 int uci_ds_verify(UCI_HANDLE oh, unsigned char * hash, unsigned int hash_len,
index 15cb5fc..52ae4f8 100644 (file)
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
- * limitations under the License. 
+ * limitations under the License.
  */
-/** 
- * @file uci_api.cpp 
- * @brief UCI codec. 
- * @author guoxing.xu 
- * @version 1.0 
+/**
+ * @file uci_api.cpp
+ * @brief UCI codec.
+ * @author guoxing.xu
+ * @version 1.0
  * @date 2013.9.6
  **/
 
@@ -255,7 +255,7 @@ int uci_se_final(UCI_HANDLE oh, unsigned char *input, unsigned int input_len,
        }
        unsigned conf = SDRM_LOW_HALF(pctx->config);
        if (input != NULL && output == NULL) {
-               TZ_ERROR("UCI_ERROR error line = %d,%s,ret=%d\n", __LINE__, __func__);
+               TZ_ERROR("UCI_ERROR error line = %d,%s\n", __LINE__, __func__);
                return UCI_ERROR;
        }
        if (conf == UCI_SW_CRYPTOCORE) {
@@ -264,7 +264,7 @@ int uci_se_final(UCI_HANDLE oh, unsigned char *input, unsigned int input_len,
        if (conf == UCI_HW) {
                return hwcrypto_se_final(oh, input, input_len, output, output_len);
        }
-       TZ_ERROR("UCI_ERROR error line = %d,%s,ret=%d\n", __LINE__, __func__);
+       TZ_ERROR("UCI_ERROR error line = %d,%s\n", __LINE__, __func__);
        return UCI_ERROR;
 }
 
@@ -372,7 +372,7 @@ int uci_prng_get(UCI_HANDLE oh, unsigned int bit_len, unsigned char *data) {
 int uci_authcrypt_init(UCI_HANDLE oh, unsigned int mode, unsigned char *nonce,
     unsigned int nonce_len, unsigned int tag_len, unsigned int aad_len,
     unsigned int payload_len, unsigned char *key, unsigned int key_len) {
-#if 0 
+#if 0
        uci_context_s *pctx = (uci_context_s*)oh;
        gcm_context *gctx = NULL;
        aes_ccm_context *cctx = NULL;
@@ -439,7 +439,7 @@ int uci_authcrypt_update_aad(UCI_HANDLE oh, unsigned char *aad,
        }
 
        return UCI_SUCCESS;
-#endif 
+#endif
        return UCI_ERROR;
 }
 int uci_authcrypt_update(UCI_HANDLE oh, unsigned char *src,
@@ -521,7 +521,7 @@ int uci_authcrypt_encryptfinal(UCI_HANDLE oh, unsigned char *src,
 
        }
        return UCI_SUCCESS;
-#endif 
+#endif
        return UCI_ERROR;
 }
 int uci_authcrypt_decryptfinal(UCI_HANDLE oh, unsigned char *src,