From: Anatolii Nikulin Date: Wed, 29 Jun 2016 13:54:11 +0000 (+0300) Subject: [FIX] change nsp functions X-Git-Tag: accepted/tizen/common/20160701.193153~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=89ce871cedfb9f277e82b3464cc117884f9fede4;p=platform%2Fcore%2Fsystem%2Fswap-manager.git [FIX] change nsp functions Change-Id: I6457058d3c1120fc0c378cd65426aac8e6edb691 Signed-off-by: Anatolii Nikulin --- diff --git a/daemon/cpp/features/feature_nsp.cpp b/daemon/cpp/features/feature_nsp.cpp index 43c846a..680b046 100644 --- a/daemon/cpp/features/feature_nsp.cpp +++ b/daemon/cpp/features/feature_nsp.cpp @@ -126,18 +126,9 @@ static uint32_t getAddrPlt(const char *path, const char *name) static int initLibAppCore() { - uint32_t appcoreInitAddr = ADDR_APPCORE_INIT_PLT ? - ADDR_APPCORE_INIT_PLT : - 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_LIBAPPCORE_EFL, "elm_run"); + getAddrPlt(PATH_LIBCAPI_APPFW_APPLICATION, "elm_run"); if (elmRunAddr == 0) { LOGE("not found 'elm_run@plt' addr in '%s'\n", PATH_LIBAPPCORE_EFL); @@ -145,13 +136,14 @@ static int initLibAppCore() } - /* cmd: "l appcore_efl_main:__do_app:appcore_init@plt:elm_run@plt:lib_path" */ + /* cmd: "l appcore_efl_init:__do_app:libappcore-efl.so ui_app_init:elm_run@plt:libcapi-appfw-application.so" */ std::string cmd = "l " - + addr2hex(ADDR_APPCORE_EFL_MAIN) + ":" + + addr2hex(ADDR_APPCORE_EFL_INIT) + ":" + addr2hex(ADDR_DO_APP) + ":" - + addr2hex(appcoreInitAddr) + ":" + + PATH_LIBAPPCORE_EFL + " " + + addr2hex(ADDR_APPCORE_INIT) + ":" + addr2hex(elmRunAddr) + ":" - + PATH_LIBAPPCORE_EFL; + + PATH_LIBCAPI_APPFW_APPLICATION; int ret = write_to_file(path_cmd, cmd); if (ret < 0) { diff --git a/packaging/swap-manager.spec b/packaging/swap-manager.spec index 71012fd..b3e2faa 100644 --- a/packaging/swap-manager.spec +++ b/packaging/swap-manager.spec @@ -29,11 +29,13 @@ BuildRequires: pkgconfig(json-c) BuildRequires: pkgconfig(ecore) BuildRequires: launchpad BuildRequires: app-core-efl +BuildRequires: capi-appfw-application BuildRequires: libwayland-egl BuildRequires: evas-devel BuildRequires: elementary-devel %if "%{TIZEN_PRODUCT_TV}" != "1" BuildRequires: app-core-efl-debuginfo +BuildRequires: capi-appfw-application-debuginfo %endif BuildRequires: swap-probe-devel BuildRequires: swap-probe-elf diff --git a/scripts/gen_nsp_data.sh b/scripts/gen_nsp_data.sh index f066d34..1ece5e9 100755 --- a/scripts/gen_nsp_data.sh +++ b/scripts/gen_nsp_data.sh @@ -45,6 +45,19 @@ 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 + dpath_capi_appfw_application=$path_app_core_efl +else + dpath_capi_appfw_application=$(rpm -ql capi-appfw-application-debuginfo | grep "libcapi-appfw-application\.so.*\.debug$" | head -1) +fi +check_null_or_exit dpath_capi_appfw_application + # get launchpad path if [ "$__tizen_product_2_4_wearable__" == "1" ]; then path_launchpad=$(rpm -ql launchpad-loader | grep launchpad-loader | head -1) @@ -53,40 +66,35 @@ else path_launchpad=$(rpm -ql launchpad | grep launchpad-loader | head -1) path_launchpad=${path_launchpad:-$(rpm -ql launchpad | grep launchpad-process-pool | head -1)} fi - - check_null_or_exit path_launchpad -# get appcore_efl_main addr -addr_appcore_efl_main=$(parse_elf ${path_app_core_efl} -s appcore_efl_main) -check_null_or_exit addr_appcore_efl_main +# get appcore_efl_init addr +addr_appcore_efl_init=$(parse_elf ${dpath_app_core_efl} -s appcore_efl_init) +check_null_or_exit addr_appcore_efl_init # get __do_app addr addr_do_app=$(parse_elf ${dpath_app_core_efl} -s __do_app) check_null_or_exit addr_do_app - -tmp=$(mktemp) - -# libappcore-efl.so -addr_appcore_init_plt=$(parse_elf $path_app_core_efl -r appcore_init) -addr_elm_run_plt=$(parse_elf $path_app_core_efl -r elm_run) - +# libcapi-appfw-application.so +addr_appcore_init=$(parse_elf $dpath_capi_appfw_application -s ui_app_init) +addr_elm_run_plt=$(parse_elf $path_capi_appfw_application -r elm_run) # PLT addr_dlopen_plt=0 addr_dlsym_plt=0 -addr_appcore_init_plt=${addr_appcore_init_plt:-0} addr_elm_run_plt=${addr_elm_run_plt:-0} # libappcore-efl PATH_LIBAPPCORE_EFL=$(gen_define_str PATH_LIBAPPCORE_EFL $path_app_core_efl) -ADDR_APPCORE_EFL_MAIN=$(gen_define ADDR_APPCORE_EFL_MAIN 0x$addr_appcore_efl_main) -ADDR_APPCORE_INIT_PLT=$(gen_define ADDR_APPCORE_INIT_PLT 0x$addr_appcore_init_plt) -ADDR_ELM_RUN_PLT=$(gen_define ADDR_ELM_RUN_PLT 0x$addr_elm_run_plt) +ADDR_APPCORE_EFL_INIT=$(gen_define ADDR_APPCORE_EFL_INIT 0x$addr_appcore_efl_init) ADDR_DO_APP=$(gen_define ADDR_DO_APP 0x$addr_do_app) +PATH_LIBCAPI_APPFW_APPLICATION=$(gen_define_str PATH_LIBCAPI_APPFW_APPLICATION $path_capi_appfw_application) +ADDR_APPCORE_INIT=$(gen_define ADDR_APPCORE_INIT 0x$addr_appcore_init) +ADDR_ELM_RUN_PLT=$(gen_define ADDR_ELM_RUN_PLT 0x$addr_elm_run_plt) + # launchpad PATH_LAUNCHPAD=$(gen_define_str PATH_LAUNCHPAD $path_launchpad) ADDR_DLOPEN_PLT_LPAD=$(gen_define ADDR_DLOPEN_PLT_LPAD 0x$addr_dlopen_plt) @@ -96,9 +104,10 @@ ADDR_DLSYM_PLT_LPAD=$(gen_define ADDR_DLSYM_PLT_LPAD 0x$addr_dlsym_plt) NSP_DEFINES=" /* libappcore-efl */ $PATH_LIBAPPCORE_EFL -$ADDR_APPCORE_EFL_MAIN +$ADDR_APPCORE_EFL_INIT $ADDR_DO_APP -$ADDR_APPCORE_INIT_PLT +$PATH_LIBCAPI_APPFW_APPLICATION +$ADDR_APPCORE_INIT $ADDR_ELM_RUN_PLT /* launchpad */