STOP_SH = ../scripts/swap_stop.sh
INIT_LOADER_SH = ../scripts/swap_init_loader.sh
INIT_PRELOAD_SH = ../scripts/swap_init_preload.sh
-INIT_WSP_SH = ../scripts/swap_init_wsp.sh
INIT_GTP_SH = ../scripts/swap_init_gtp.sh
LOADER_SCRIPT = ../scripts/gen_loader_header.sh
PRELOAD_SCRIPT = ../scripts/gen_preload_header.sh
$(STOP_SH) \
$(INIT_LOADER_SH) \
$(INIT_PRELOAD_SH) \
- $(INIT_WSP_SH) \
$(INIT_GTP_SH)
all: debug
DA_MANAGER = ../scripts/da_manager_root.sh
endif # SYSTEMD_SUPPORT
-# WSP
-$(INIT_WSP_SH): $(WSP_SCRIPT)
-ifeq ($(WSP_SUPPORT),y)
- bash $(WSP_SCRIPT) -s > $@
-else # WSP_SUPPORT
- echo "#!/bin/bash" > $@
- echo "PATH=/bin:/usr/bin:/sbin:/usr/sbin" >> $@
- echo "echo \"Do not init WSP!\" " >> $@
-endif # WSP_SUPPORT
-
-ifeq ($(WSP_SUPPORT),y)
- SRC_CPP += cpp/features/feature_wsp.cpp
- GENERATED_WSP_H = include/generated/wsp_data.h
- WSP_SCRIPT = ../scripts/gen_wsp_data.sh
- GENERATED_HEADERS += $(GENERATED_WSP_H)
-
- $(GENERATED_WSP_H): $(WSP_SCRIPT)
- bash $< -h > $@
-
-endif # WSP_SUPPORT
-
# NSP
ifeq ($(NSP_SUPPORT),y)
SRC_CPP += cpp/features/feature_nsp.cpp
+++ /dev/null
-/*
- * DA manager
- *
- * Copyright (c) 2015 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact:
- * Vyacheslav Cherkashin <v.cherkashin@samsung.com>
- *
- * 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.
- *
- * Contributors:
- * - Samsung RnD Institute Russia
- *
- */
-
-
-#include <string>
-#include <errno.h>
-
-#include "feature.h"
-#include "feature_manager.h"
-
-#include "common.h"
-#include "swap_debug.h"
-#include "wsp_data.h" /* auto generate */
-#include "elf/Elf.h"
-
-
-static const char path_enabled[] = "/sys/kernel/debug/swap/wsp/enabled";
-static const char path_cmd[] = "/sys/kernel/debug/swap/wsp/cmd";
-static const char chromium_path[] = "/usr/lib/libchromium-ewk.so";
-
-
-static std::string rmPlt(const std::string &name)
-{
- static const char postfix[] = "@plt";
- static const size_t postfixSize= sizeof(postfix) - 1;
-
- if (name.size() <= postfixSize)
- return std::string();
-
- if (name.find(postfix) == std::string::npos)
- return std::string();
-
- return name.substr(0, name.size() - postfixSize);
-}
-
-class FeatureWSP : public Feature
-{
- int doInit()
- {
- for (int ret, i = 0; i < wsp_data_cnt; ++i) {
- const std::string name (wsp_data[i].name);
- uint64_t addr = wsp_data[i].addr;
-
- if (addr == 0) {
- std::string str = rmPlt(name);
- addr = Elf::plt(chromium_path, str);
- }
-
- if (addr == 0) {
- LOGE("address for '%s' is not found\n", name.c_str());
- return -EINVAL;
- }
-
- const std::string cmd(addr2hex(addr) + " " + name);
-
- ret = write_to_file(path_cmd, cmd);
- if (ret < 0) {
- LOGE("write(err=%d) '%s' to %s\n", ret, cmd.c_str(), path_cmd);
- return ret;
- }
- }
-
- return 0;
- }
-
- int doEnable()
- {
- int ret(write_to_file(path_enabled, "1"));
-
- return ret > 0 ? 0 : ret;
- }
-
- int doDisable()
- {
- int ret(write_to_file(path_enabled, "0"));
-
- return ret > 0 ? 0 : ret;
- }
-};
-
-
-REGISTER_FEATURE(FeatureWSP, val2bit(FL_WEB_STARTUP_PROFILING), "WSP");
/* unsupported features */
if (feature0 & FL_WEB_PROFILING)
LOGW("FL_WEB_PROFILING is not support\n");
+ if (feature0 & FL_WEB_STARTUP_PROFILING)
+ LOGW("FL_WEB_STARTUP_PROFILING is not supported\n");
return res;
}
/* fill actual features fm suppor */
uint64_t fm_f0 = conf.use_features0
& (
- FL_APP_STARTUP |
- FL_WEB_STARTUP_PROFILING
+ FL_APP_STARTUP
);
uint64_t fm_f1 = conf.use_features1 & 0;
%define SET_TESTING 0
%define SWAP_MODULES_SUPPORT 1
%define NSP_SUPPORT 0
-%define WSP_SUPPORT 0
%define WAYLAND_SUPPORT 0
%define SYSTEMD_SUPPORT 1
# for mobile/werable/tv product
%if "%{sec_product_feature_profile_lite}" == "1" || "%{sec_product_feature_profile_wearable}" == "1" || "%{TIZEN_PRODUCT_TV}" == "1"
%define TIZEN_PRODUCT 1
-%define WSP_SUPPORT 0
%endif
%ifarch armv7l
BuildRequires: pkgconfig(tizen-extension-client)
%endif
-
-%if %{WSP_SUPPORT}
-BuildRequires: crosswalk-tizen
-%endif
-
Requires: swap-probe
Requires: swap-probe-elf
Requires: sdbd
export NSP_SUPPORT=y
%endif
-%if %{WSP_SUPPORT}
- export WSP_SUPPORT=y
-%endif
-
%if %{SYSTEMD_SUPPORT}
export SYSTEMD_SUPPORT=y
%endif
%{_bindir}/swap_stop.sh
%{_bindir}/swap_init_loader.sh
%{_bindir}/swap_init_preload.sh
-%{_bindir}/swap_init_wsp.sh
%{_bindir}/swap_init_gtp.sh
# uihv
+++ /dev/null
-#!/bin/bash
-
-output_type=$1
-script_dir=$(readlink -f $0 | xargs dirname)
-webapp_path="/sys/kernel/debug/swap/wsp/webapp_path"
-ewebkit_path="/sys/kernel/debug/swap/wsp/ewebkit_path"
-source $script_dir/dyn_vars
-
-chromium_package_name=chromium-efl
-path_libchromium=`rpm -ql $chromium_package_name | grep "libchromium-ewk.so$" | head -1`
-
-if [ "$__tizen_product__" == "1" ]; then
- path_libchromium_debuginfo=$path_libchromium
-else
- path_libchromium_debuginfo=`rpm -ql ${chromium_package_name}-debuginfo | grep "libchromium-ewk.so.debug$" | head -1`
-fi
-
-
-
-g_names=()
-g_nick_names=()
-
-g_names_plt=()
-g_nick_names_plt=()
-
-get_addrs()
-{
- param=$1
- shift
- names=($@)
- len=${#names[@]}
-
- if [[ "$param" == "plt" ]]; then
- path_lib=$path_libchromium
-
- for (( i=0; i < ${len}; ++i)); do
- names[$i]=`echo ${names[$i]} | cut -d'@' -f 1`
- done
- else
- path_lib=$path_libchromium_debuginfo
- fi
-
- for (( i=0; i < ${len}; ++i)); do
- name=${names[$i]}
- addr=$(parse_elf -f $path_lib --addr_format=swap --syms=$name | cut -f1 -d' ')
- if [ -z "$addr" -o $((16#$addr)) -eq 0 ]; then
- addr=0
- echo "ERROR: symbol '$name' not found" >&2
- fi
- echo 0x$addr
- done
-}
-
-add_func()
-{
- name=$1
- nick_name=$2
-
- g_names+=($name)
- g_nick_names+=($nick_name)
-}
-
-add_func_plt()
-{
- name=$1
- nick_name=$2
-
- g_names_plt+=($name)
- g_nick_names_plt+=($nick_name)
-}
-
-gen_array()
-{
- addrs_plt=`get_addrs plt ${g_names_plt[@]}`
- if [ $? -ne 0 ]; then
- exit 1;
- fi
-
- addrs=`get_addrs syms ${g_names[@]}`
- if [ $? -ne 0 ]; then
- exit 1;
- fi
-
- addrs=($addrs_plt $addrs)
- g_names=(${g_names_plt[@]} ${g_names[@]})
- g_nick_names=(${g_nick_names_plt[@]} ${g_nick_names[@]})
-
- len=${#g_names[@]}
- for (( i=0; i < ${len}; ++i)); do
- echo -e "\t{ \"${g_names[$i]}\", \"${g_nick_names[$i]}\", ${addrs[$i]} },"
- done
-}
-
-function gen_header_out()
-{
- add_func _ZN5blink14ResourceLoader5startEv res_will
- add_func _ZN5blink14ResourceLoader16didFinishLoadingEPNS_12WebURLLoaderEdx res_finish
- add_func _ZN7content23CompositorOutputSurface11SwapBuffersEPN2cc15CompositorFrameE redraw
-
- IFS=$'\n'
-
- array=`gen_array`
- if [ $? -ne 0 ]; then
- exit 1
- fi
-
- cat <<- EOF
-
- /*
- * Autogenerated header
- */
-
- #ifndef __WSP_DATA__
- #define __WSP_DATA__
-
- struct wsp_data {
- const char *name;
- const char *nick_name;
- unsigned long addr;
- };
-
- static struct wsp_data wsp_data[] = {
- ${array}
- };
-
- enum {
- wsp_data_cnt = sizeof(wsp_data) / sizeof(struct wsp_data)
- };
-
- #endif /* __WSP_DATA__ */
-
-EOF
-}
-
-function gen_script_out()
-{
- webapp_package_name=crosswalk-tizen
- path_webapp=`rpm -ql $webapp_package_name | grep "wrt-loader" | head -1`
-
- cat <<- EOF
-
- #!/bin/bash
-
- #WSP initialze autogenerated script
- PATH=/bin:/usr/bin:/sbin:/usr/sbin
- /bin/echo "$path_webapp" > $webapp_path
- /bin/echo "$path_libchromium" > $ewebkit_path
-
-EOF
-}
-
-if [ "$1" == "-h" ]; then
- gen_header_out
-elif [ "$1" == "-s" ]; then
- gen_script_out
-else
- exit 1
-fi
swap_fbiprobe.ko \
swap_loader.ko \
swap_preload.ko \
-swap_wsp.ko \
swap_nsp.ko \
swap_gtp.ko \
"
/usr/bin/swap_init_preload.sh
fi
-#WSP
-if [ -d /sys/kernel/debug/swap/wsp/ ]
-then
- /usr/bin/swap_init_wsp.sh
-fi
-
#GOT patcher
if [ -d /sys/kernel/debug/swap/got_patcher/ ]
then