From 56159fa268ec4636734e4a4b237fac4eeef27bbd Mon Sep 17 00:00:00 2001
From: Piotr Tworek
Date: Wed, 21 Jan 2015 15:53:46 +0100
Subject: [PATCH] Add initial support for Tizen 3.0 TV platform
This patch adds initial build system support for Tizen 3.0 for TV profile.
Due to missing, or sometimes broken multimedia support in the current repos
the current build disables support for it.
The code has been run tested on odroid board.
Change-Id: I9de86728cca255565b31972025db585831176487
Signed-off-by: Piotr Tworek
Signed-off-by: Youngsoo Choi
---
tizen_src/build/build_tv.sh | 18 +++++---
tizen_src/build/common.sh | 8 ++++
tizen_src/build/gbs.conf | 20 +++++++++
tizen_src/build/gyp_chromiumefl.sh | 35 ++++++++++++---
tizen_src/impl/chromium-efl-deps.gyp | 80 +++++++++++++++++------------------
tizen_src/impl/chromium-efl.gypi | 11 +++++
tizen_src/packaging/chromium-efl.spec | 10 +++--
7 files changed, 124 insertions(+), 58 deletions(-)
diff --git a/tizen_src/build/build_tv.sh b/tizen_src/build/build_tv.sh
index eea0338..8bbae65 100755
--- a/tizen_src/build/build_tv.sh
+++ b/tizen_src/build/build_tv.sh
@@ -10,19 +10,27 @@ ${SCRIPTDIR}/apply_patches.sh ${SCRIPTDIR}/patches
# "|| :" means "or always succeeding built-in command"
PROFILE_NAME=$(echo "$@" | grep -Po "(?<=\-P\s)[^\s]*" || :)
-if [ "$PROFILE_NAME" == "" ]; then
- PROFILE_NAME=tztv_v2.2.1_prehawk
- PROFILE_FLAG="-P $PROFILE_NAME"
+TIZEN_VERSION="chromium_efl_tizen_version 2.2.1"
+if [ "$PROFILE_NAME" == "tztv_v3.0" ]; then
+ TIZEN_VERSION="chromium_efl_tizen_version 3.0"
+else
+ PROFILE_NAME="tztv_v2.2.1_prehawk"
fi
-TIZEN_VERSION="chromium_efl_tizen_version 2.2.1"
+PROFILE_FLAG="-P $PROFILE_NAME"
if [ "$USE_GLOBAL_GBS_CONF" == "" ]; then
CONF_FLAG="--conf ${SCRIPTDIR}/gbs.conf"
fi
+EXTRA_PACK_OPTS="--extra-packs python-base-x86-arm,python-x86-arm,python-xml-x86-arm"
+if [ "$PROFILE_NAME" == "tztv_v3.0" ]; then
+ EXTRA_PACK_OPTS=""
+fi
+
gbs $CONF_FLAG build $PROFILE_FLAG -A armv7l --incremental \
- --extra-packs python-base-x86-arm,python-x86-arm,python-xml-x86-arm \
+ --define 'TIZEN_PROFILE_TV 1' \
+ ${EXTRA_PACK_OPTS} \
--define "${TIZEN_VERSION}" "$@"
${SCRIPTDIR}/apply_patches.sh -r ${SCRIPTDIR}/patches
diff --git a/tizen_src/build/common.sh b/tizen_src/build/common.sh
index d2b9e4b..2356dd4 100644
--- a/tizen_src/build/common.sh
+++ b/tizen_src/build/common.sh
@@ -153,3 +153,11 @@ function error_report() {
echo "Error: File:$1 Line:$2"
exit 1
}
+
+function findElementInArray() {
+ local elm
+ for elm in "${@:2}"; do
+ [[ "$elm" = "$1" ]] && return 0;
+ done
+ return 1;
+}
diff --git a/tizen_src/build/gbs.conf b/tizen_src/build/gbs.conf
index 733730c..39a9a93 100755
--- a/tizen_src/build/gbs.conf
+++ b/tizen_src/build/gbs.conf
@@ -117,3 +117,23 @@ url = http://10.251.52.177/tizenrepo/tv_repo/tizen-2.2.1-vd-4.8_20140822.1
# which added new API (player_get_content_video_size).
# If this package will be merged, I'll change this codes
url = http://10.251.52.177/tizenrepo/tv_repo/supplement_tv_prehawk_player
+
+###############################################
+##
+## Tizen v3.0 for TV
+##
+
+[obs.tizen]
+url = https://api.tizen.org
+
+[profile.tztv_v3.0]
+obs = obs.tizen
+repos = repo.supplement, repo.tv_arm-x11
+buildroot=~/GBS-ROOT-3.0-TV
+
+# mirrored from http://download.tizen.org/snapshots/tizen/tv
+[repo.tv_arm-x11]
+url = http://10.251.52.177/tizenrepo/tv_repo/tizen-tv_v3.0/repos/arm-x11/packages
+
+[repo.supplement]
+url = http://10.251.52.177/tizenrepo/tv_repo/supplement_odroid_chromium_tizen_v3.0
diff --git a/tizen_src/build/gyp_chromiumefl.sh b/tizen_src/build/gyp_chromiumefl.sh
index 0dd2ad5..95fa3ce 100755
--- a/tizen_src/build/gyp_chromiumefl.sh
+++ b/tizen_src/build/gyp_chromiumefl.sh
@@ -4,6 +4,8 @@ source $(dirname $0)/common.sh
trap 'error_report $0 $LINENO' ERR SIGINT SIGTERM SIGQUIT
host_arch=$(getHostArch)
+supported_targets=("mobile" "tv" "desktop")
+
if [ -z "$GYP_GENERATOR_OUTPUT" ]; then
GYP_GENERATOR_OUTPUT=${TOPDIR}/"out.${host_arch}"
fi
@@ -14,12 +16,25 @@ EXTRA_GYP_ARGS="$@"
# Otherwise we are called by gbs whch already passes the correct building_for_* flag.
if [ "$__GYP_CHROMIUMEFL_TARGET" == "desktop" ]; then
target=desktop
-elif echo "$@" | grep -cq '\-\Dbuilding_for_tizen_mobile=1'; then
- target=mobile
- buildType=gbs
-elif echo "$@" | grep -cq '\-\Dbuilding_for_tizen_tv=1'; then
- target=tv
- buildType=gbs
+fi
+
+while [[ $# > 0 ]]; do
+ case "$1" in
+ -Dbuilding_for_tizen_*=1)
+ buildType="gbs"
+ target=$(echo $1 | sed -e 's#-Dbuilding_for_tizen_\([a-z]*\)\=1#\1#')
+ ;;
+ -Dchromium_efl_tizen_version=*)
+ tizen_version=$(echo $1 | sed -e 's#-Dchromium_efl_tizen_version\=\([0-9.]*\)#\1#')
+ ;;
+ esac
+ shift;
+done
+
+findElementInArray "$target" "${supported_targets[@]}"
+if [[ $? == 1 ]]; then
+ echo "Unsupported target: $target"
+ exit 1
fi
if [ "$__GYP_CHROMIUMEFL_TARGET" == "crosscompile" ]; then
@@ -40,7 +55,6 @@ fi
COMMON_GYP_PARAMETERS="
-Duse_libjpeg_turbo=1
-Dproprietary_codecs=1
- -Dtizen_multimedia_support=1
-Duse_aura=0
-Duse_efl=1
-Duse_gnome_keyring=0
@@ -52,6 +66,13 @@ if [[ $BUILD_CONTENT_SHELL == 1 ]]; then
COMMON_GYP_PARAMETERS+="-Dchromium_efl_library_type=static_library"
fi
+# FIXME: 3.0 does not have any support for multimedia, yet
+if [ "$tizen_version" == "3.0" ]; then
+ COMMON_GYP_PARAMETERS+="-Dtizen_multimedia_support=0"
+else
+ COMMON_GYP_PARAMETERS+="-Dtizen_multimedia_support=1"
+fi
+
add_desktop_flags() {
ADDITIONAL_GYP_PARAMETERS+="-Dbuilding_for_tizen=0
-Dclang=${USE_CLANG}
diff --git a/tizen_src/impl/chromium-efl-deps.gyp b/tizen_src/impl/chromium-efl-deps.gyp
index 4f9fe72..3fc835a 100644
--- a/tizen_src/impl/chromium-efl-deps.gyp
+++ b/tizen_src/impl/chromium-efl-deps.gyp
@@ -36,11 +36,15 @@
{
'target_name': 'gstreamer',
'type': 'none',
+ 'variables': {
+ 'dependent_pkgs': [
+ 'glib-2.0',
+ ],
+ },
'conditions': [
- ['building_for_tizen_mobile==1', {
+ ['chromium_efl_tizen_version == "3.0"', {
'variables': {
'dependent_pkgs': [
- 'glib-2.0',
'gstreamer-1.0',
'gstreamer-base-1.0',
'gstreamer-app-1.0',
@@ -48,47 +52,33 @@
'gstreamer-video-1.0',
],
},
- 'direct_dependent_settings': {
- 'cflags': [
- '