Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tizen] Use docker images with Tizen Studio CLI #17321

Merged
merged 1 commit into from
May 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/examples-tizen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: connectedhomeip/chip-build-tizen:0.5.64
image: connectedhomeip/chip-build-tizen:0.5.71
options: --user root
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
Expand Down
18 changes: 18 additions & 0 deletions build/config/tizen/config.gni
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright (c) 2020 Project CHIP Authors
#
# 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.

declare_args() {
# Location of the Tizen SDK.
tizen_sdk_root = ""
}
13 changes: 8 additions & 5 deletions build/toolchain/tizen/tizen_toolchain.gni
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,26 @@

import("//build_overrides/build.gni")

import("${build_root}/config/sysroot.gni")
import("${build_root}/config/tizen/config.gni")
import("${build_root}/toolchain/gcc_toolchain.gni")

template("tizen_toolchain") {
_invoker_toolchain_args = invoker.toolchain_args

_tizen_toolchain_args = {
current_os = "tizen"
is_clang = true
is_clang = false

forward_variables_from(_invoker_toolchain_args, "*")
}

_tizen_toolchain_prefix =
"${tizen_sdk_root}/tools/arm-linux-gnueabi-gcc-9.2/bin/arm-linux-gnueabi-"

gcc_toolchain(target_name) {
toolchain_args = _tizen_toolchain_args
ar = "$sysroot/bin/arm-linux-gnueabi-ar"
cc = "$sysroot/bin/arm-linux-gnueabi-gcc"
cxx = "$sysroot/bin/arm-linux-gnueabi-g++"
ar = _tizen_toolchain_prefix + "ar"
cc = _tizen_toolchain_prefix + "gcc"
cxx = _tizen_toolchain_prefix + "g++"
}
}
17 changes: 13 additions & 4 deletions scripts/build/builders/tizen.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,17 @@ def __init__(self,
root=os.path.join(root, 'examples', app.ExampleName(), 'linux'),
runner=runner)

# Make sure that required ENV variables are defined
for env in ('TIZEN_SDK_ROOT', 'TIZEN_SDK_SYSROOT'):
if env not in os.environ:
raise Exception(
"Environment %s missing, cannot build Tizen target" % env)

self.tizen_sdk_root = os.environ['TIZEN_SDK_ROOT']
self.tizen_sdk_sysroot = os.environ['TIZEN_SDK_SYSROOT']
self.tizen_sdk_cli = os.path.join(
self.tizen_sdk_root, "tools/ide/bin/tizen")

self.app = app
self.board = board
self.extra_gn_options = []
Expand All @@ -74,13 +85,11 @@ def __init__(self,
raise Exception("TSAN sanitizer not supported by Tizen toolchain")

def GnBuildArgs(self):
if 'TIZEN_HOME' not in os.environ:
raise Exception(
"Environment TIZEN_HOME missing, cannot build Tizen target")
return self.extra_gn_options + [
'target_os="tizen"',
'target_cpu="%s"' % self.board.TargetCpuName(),
'sysroot="%s"' % os.environ['TIZEN_HOME'],
'tizen_sdk_root="%s"' % self.tizen_sdk_root,
'sysroot="%s"' % self.tizen_sdk_sysroot,
]

def build_outputs(self):
Expand Down
3 changes: 2 additions & 1 deletion scripts/build/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ def build_actual_output(root: str, out: str, args: List[str]) -> List[str]:
'PW_PROJECT_ROOT': root,
'ANDROID_NDK_HOME': 'TEST_ANDROID_NDK_HOME',
'ANDROID_HOME': 'TEST_ANDROID_HOME',
'TIZEN_HOME': 'TEST_TIZEN_HOME',
'TIZEN_SDK_ROOT': 'TEST_TIZEN_SDK_ROOT',
'TIZEN_SDK_SYSROOT': 'TEST_TIZEN_SDK_SYSROOT',
'TELINK_ZEPHYR_SDK_DIR': 'TELINK_ZEPHYR_SDK_DIR',
'SYSROOT_AARCH64': 'SYSROOT_AARCH64',
'NXP_K32W061_SDK_ROOT': 'TEST_NXP_K32W061_SDK_ROOT',
Expand Down
16 changes: 8 additions & 8 deletions scripts/build/testdata/build_all_except_host.txt
Original file line number Diff line number Diff line change
Expand Up @@ -950,28 +950,28 @@ source "$ZEPHYR_BASE/zephyr-env.sh";
west build --cmake-only -d {out}/telink-tlsr9518adk80d-light -b tlsr9518adk80d {root}/examples/lighting-app/telink'

# Generating tizen-arm-light
gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/linux '--args=target_os="tizen" target_cpu="arm" sysroot="TEST_TIZEN_HOME"' {out}/tizen-arm-light
gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/linux '--args=target_os="tizen" target_cpu="arm" tizen_sdk_root="TEST_TIZEN_SDK_ROOT" sysroot="TEST_TIZEN_SDK_SYSROOT"' {out}/tizen-arm-light

# Generating tizen-arm-light-asan
gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/linux '--args=is_asan=true target_os="tizen" target_cpu="arm" sysroot="TEST_TIZEN_HOME"' {out}/tizen-arm-light-asan
gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/linux '--args=is_asan=true target_os="tizen" target_cpu="arm" tizen_sdk_root="TEST_TIZEN_SDK_ROOT" sysroot="TEST_TIZEN_SDK_SYSROOT"' {out}/tizen-arm-light-asan

# Generating tizen-arm-light-no-ble
gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/linux '--args=chip_config_network_layer_ble=false target_os="tizen" target_cpu="arm" sysroot="TEST_TIZEN_HOME"' {out}/tizen-arm-light-no-ble
gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/linux '--args=chip_config_network_layer_ble=false target_os="tizen" target_cpu="arm" tizen_sdk_root="TEST_TIZEN_SDK_ROOT" sysroot="TEST_TIZEN_SDK_SYSROOT"' {out}/tizen-arm-light-no-ble

# Generating tizen-arm-light-no-ble-asan
gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/linux '--args=chip_config_network_layer_ble=false is_asan=true target_os="tizen" target_cpu="arm" sysroot="TEST_TIZEN_HOME"' {out}/tizen-arm-light-no-ble-asan
gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/linux '--args=chip_config_network_layer_ble=false is_asan=true target_os="tizen" target_cpu="arm" tizen_sdk_root="TEST_TIZEN_SDK_ROOT" sysroot="TEST_TIZEN_SDK_SYSROOT"' {out}/tizen-arm-light-no-ble-asan

# Generating tizen-arm-light-no-ble-no-wifi
gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/linux '--args=chip_config_network_layer_ble=false chip_enable_wifi=false target_os="tizen" target_cpu="arm" sysroot="TEST_TIZEN_HOME"' {out}/tizen-arm-light-no-ble-no-wifi
gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/linux '--args=chip_config_network_layer_ble=false chip_enable_wifi=false target_os="tizen" target_cpu="arm" tizen_sdk_root="TEST_TIZEN_SDK_ROOT" sysroot="TEST_TIZEN_SDK_SYSROOT"' {out}/tizen-arm-light-no-ble-no-wifi

# Generating tizen-arm-light-no-ble-no-wifi-asan
gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/linux '--args=chip_config_network_layer_ble=false chip_enable_wifi=false is_asan=true target_os="tizen" target_cpu="arm" sysroot="TEST_TIZEN_HOME"' {out}/tizen-arm-light-no-ble-no-wifi-asan
gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/linux '--args=chip_config_network_layer_ble=false chip_enable_wifi=false is_asan=true target_os="tizen" target_cpu="arm" tizen_sdk_root="TEST_TIZEN_SDK_ROOT" sysroot="TEST_TIZEN_SDK_SYSROOT"' {out}/tizen-arm-light-no-ble-no-wifi-asan

# Generating tizen-arm-light-no-wifi
gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/linux '--args=chip_enable_wifi=false target_os="tizen" target_cpu="arm" sysroot="TEST_TIZEN_HOME"' {out}/tizen-arm-light-no-wifi
gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/linux '--args=chip_enable_wifi=false target_os="tizen" target_cpu="arm" tizen_sdk_root="TEST_TIZEN_SDK_ROOT" sysroot="TEST_TIZEN_SDK_SYSROOT"' {out}/tizen-arm-light-no-wifi

# Generating tizen-arm-light-no-wifi-asan
gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/linux '--args=chip_enable_wifi=false is_asan=true target_os="tizen" target_cpu="arm" sysroot="TEST_TIZEN_HOME"' {out}/tizen-arm-light-no-wifi-asan
gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/linux '--args=chip_enable_wifi=false is_asan=true target_os="tizen" target_cpu="arm" tizen_sdk_root="TEST_TIZEN_SDK_ROOT" sysroot="TEST_TIZEN_SDK_SYSROOT"' {out}/tizen-arm-light-no-wifi-asan

# Building ameba-amebad-all-clusters
ninja -C {out}/ameba-amebad-all-clusters
Expand Down