From ca4cdd44b32dc2f7ddfcae8837c47ffecddeac55 Mon Sep 17 00:00:00 2001 From: "sungmok.shin" Date: Wed, 2 Feb 2022 19:58:58 +0900 Subject: [PATCH] Enhance build script for webOS example * Do not use 'sudo' when installing webOS NDK, but use '-d' to designate the install path as non-root path. * Do not 'wget' webOS SDK, but include it as git submodule --- scripts/examples/webos_example.sh | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/scripts/examples/webos_example.sh b/scripts/examples/webos_example.sh index 58a1f1d0c3efd2..3b178126bdde18 100755 --- a/scripts/examples/webos_example.sh +++ b/scripts/examples/webos_example.sh @@ -1,7 +1,6 @@ #!/usr/bin/env bash - # -# Copyright (c) 2021 Project CHIP Authors +# Copyright (c) 2022 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. @@ -16,26 +15,22 @@ # limitations under the License. # -# Download webOS OSE NDK -echo "##### Download webOS OSE NDK #####" -wget https://sourceforge.net/projects/webos-iotivity-patches/files/webos-sdk-x86_64-cortexa7t2hf-neon-vfpv4-toolchain-2.14.1.g.sh -wget https://sourceforge.net/projects/webos-iotivity-patches/files/webos-sdk-x86_64-cortexa7t2hf-neon-vfpv4-toolchain-2.14.1.g.host.manifest -wget https://sourceforge.net/projects/webos-iotivity-patches/files/webos-sdk-x86_64-cortexa7t2hf-neon-vfpv4-toolchain-2.14.1.g.target.manifest -wget https://sourceforge.net/projects/webos-iotivity-patches/files/webos-sdk-x86_64-cortexa7t2hf-neon-vfpv4-toolchain-2.14.1.g.testdata.json +# Activating connectedhomeip build environment +source scripts/activate.sh + +# Extract webOS SDK +cat third_party/webos_sdk/v2.14.1/webos_sdk.tar* | (cd third_party/webos_sdk/v2.14.1/;tar xvzf -) # Grant execute permission for NDK install script -chmod 555 webos-sdk-x86_64-cortexa7t2hf-neon-vfpv4-toolchain-2.14.1.g.sh +chmod 555 third_party/webos_sdk/v2.14.1/webos-sdk-x86_64-cortexa7t2hf-neon-vfpv4-toolchain-2.14.1.g.sh # Install webOS OSE NDK echo "##### Install webOS OSE NDK #####" -sudo ./webos-sdk-x86_64-cortexa7t2hf-neon-vfpv4-toolchain-2.14.1.g.sh - -# Activating connectedhomeip build environment -source scripts/activate.sh +third_party/webos_sdk/v2.14.1/webos-sdk-x86_64-cortexa7t2hf-neon-vfpv4-toolchain-2.14.1.g.sh -d third_party/webos_sdk/v2.14.1 -y # Activating webOS NDK build environment echo "##### Activating webOS NDK build environment #####" -source /opt/webos-sdk-x86_64/environment-setup-cortexa7t2hf-neon-vfpv4-webos-linux-gnueabi +source third_party/webos_sdk/v2.14.1/environment-setup-cortexa7t2hf-neon-vfpv4-webos-linux-gnueabi echo "" # Build webos example @@ -45,9 +40,3 @@ gn gen out/host --args="is_debug=false target_os=\"webos\" target_cpu=\"arm\" ch echo "##### Building by ninja #####" ninja -C out/host - -# Remove webOS OSE NDK archive -rm -rf webos-sdk-x86_64-cortexa7t2hf-neon-vfpv4-toolchain-2.14.1.g.host.manifest -rm -rf webos-sdk-x86_64-cortexa7t2hf-neon-vfpv4-toolchain-2.14.1.g.sh -rm -rf webos-sdk-x86_64-cortexa7t2hf-neon-vfpv4-toolchain-2.14.1.g.target.manifest -rm -rf webos-sdk-x86_64-cortexa7t2hf-neon-vfpv4-toolchain-2.14.1.g.testdata.json