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