[FIX] nsp functions for TV 55/77855/3
authorAnatolii Nikulin <nikulin.a@samsung.com>
Fri, 1 Jul 2016 09:19:52 +0000 (12:19 +0300)
committerDmitry Kovalenko <d.kovalenko@samsung.com>
Fri, 1 Jul 2016 11:22:47 +0000 (04:22 -0700)
Change-Id: Ica29ab2c335c13c09fd03cb4fe199015cc673f83
Signed-off-by: Anatolii Nikulin <nikulin.a@samsung.com>
daemon/cpp/features/feature_nsp.cpp
scripts/gen_nsp_data.sh

index 680b046..a1bb13e 100644 (file)
@@ -126,6 +126,14 @@ static uint32_t getAddrPlt(const char *path, const char *name)
 
 static int initLibAppCore()
 {
+    uint32_t appcoreInitAddr = ADDR_APPCORE_INIT ?
+                               ADDR_APPCORE_INIT :
+                               getAddrPlt(PATH_LIBAPPCORE_EFL, "appcore_init");
+    if (appcoreInitAddr == 0) {
+        LOGE("not found 'appcore_init@plt' addr in '%s'\n", PATH_LIBAPPCORE_EFL);
+        return -EINVAL;
+    }
+
     uint32_t elmRunAddr = ADDR_ELM_RUN_PLT ?
                             ADDR_ELM_RUN_PLT :
                             getAddrPlt(PATH_LIBCAPI_APPFW_APPLICATION, "elm_run");
@@ -141,7 +149,7 @@ static int initLibAppCore()
                     + addr2hex(ADDR_APPCORE_EFL_INIT) + ":"
                     + addr2hex(ADDR_DO_APP) + ":"
                     + PATH_LIBAPPCORE_EFL + " "
-                    + addr2hex(ADDR_APPCORE_INIT) + ":"
+                    + addr2hex(appcoreInitAddr) + ":"
                     + addr2hex(elmRunAddr) + ":"
                     + PATH_LIBCAPI_APPFW_APPLICATION;
 
index 1ece5e9..bf83167 100755 (executable)
@@ -45,17 +45,16 @@ else
 fi
 check_null_or_exit dpath_app_core_efl
 
-
-# get libcapi-appfw-application.so path
-path_capi_appfw_application=$(rpm -ql capi-appfw-application  | grep libcapi-appfw-application | head -1)
-check_null_or_exit path_capi_appfw_application
-
 # get libcapi-appfw-application.so debug_path
 if [ "$__tizen_product_tv__" == "1" ]; then
+        path_capi_appfw_application=$path_app_core_efl
        dpath_capi_appfw_application=$path_app_core_efl
 else
+       # get libcapi-appfw-application.so path
+       path_capi_appfw_application=$(rpm -ql capi-appfw-application  | grep libcapi-appfw-application | head -1)
        dpath_capi_appfw_application=$(rpm -ql capi-appfw-application-debuginfo | grep "libcapi-appfw-application\.so.*\.debug$" | head -1)
 fi
+check_null_or_exit path_capi_appfw_application
 check_null_or_exit dpath_capi_appfw_application
 
 # get launchpad path
@@ -78,7 +77,12 @@ addr_do_app=$(parse_elf ${dpath_app_core_efl} -s __do_app)
 check_null_or_exit addr_do_app
 
 # libcapi-appfw-application.so
-addr_appcore_init=$(parse_elf $dpath_capi_appfw_application -s ui_app_init)
+if [ "$__tizen_product_tv__" == "1" ]; then
+       addr_appcore_init=$(parse_elf $dpath_capi_appfw_application -r appcore_init)
+       addr_appcore_init=${addr_appcore_init_plt:-0}
+else
+       addr_appcore_init=$(parse_elf $dpath_capi_appfw_application -s ui_app_init)
+fi
 addr_elm_run_plt=$(parse_elf $path_capi_appfw_application -r elm_run)
 
 # PLT