Skip to content

Commit

Permalink
[hotfix] fix tv-server build failed issue on arm and added CI for it (#…
Browse files Browse the repository at this point in the history
…12656)

* fix tv serve arm build error ( CI code error )

* fix BLE crash issue on armv7

* fix restyled-io and ci errors
  • Loading branch information
xylophone21 authored and pull[bot] committed Apr 27, 2022
1 parent 374bc54 commit de5e0bc
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion scripts/build/build/targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ def AndroidTargets():
yield target.Extend('androidstudio-x86-chip-tool', board=AndroidBoard.AndroidStudio_X86, app=AndroidApp.CHIP_TOOL)
yield target.Extend('androidstudio-x64-chip-tool', board=AndroidBoard.AndroidStudio_X64, app=AndroidApp.CHIP_TOOL)
yield target.Extend('arm64-chip-tvserver', board=AndroidBoard.ARM64, app=AndroidApp.CHIP_TVServer)
yield target.Extend('arm-chip-tvserver', board=AndroidBoard.ARM64, app=AndroidApp.CHIP_TVServer)
yield target.Extend('arm-chip-tvserver', board=AndroidBoard.ARM, app=AndroidApp.CHIP_TVServer)


def MbedTargets():
Expand Down
10 changes: 5 additions & 5 deletions scripts/build/testdata/build_all_except_host.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ python3 build/chip/java/tests/generate_jars_for_test.py
python3 third_party/android_deps/set_up_android_deps.py

# Generating android-arm-chip-tvserver
gn gen --check --fail-on-unused-args {out}/android-arm-chip-tvserver '--args=target_os="android" target_cpu="arm64" android_ndk_root="TEST_ANDROID_NDK_HOME" android_sdk_root="TEST_ANDROID_HOME" chip_config_network_layer_ble=false ' --root={root}/examples/tv-app/android/
gn gen --check --fail-on-unused-args {out}/android-arm-chip-tvserver '--args=target_os="android" target_cpu="arm" android_ndk_root="TEST_ANDROID_NDK_HOME" android_sdk_root="TEST_ANDROID_HOME" chip_config_network_layer_ble=false ' --root={root}/examples/tv-app/android/

# Accepting NDK licenses @ tools
bash -c 'yes | TEST_ANDROID_HOME/tools/bin/sdkmanager --licenses >/dev/null'
Expand Down Expand Up @@ -619,13 +619,13 @@ cp {out}/android-arm-chip-tool/lib/src/platform/android/AndroidPlatform.jar {roo
ninja -C {out}/android-arm-chip-tvserver

# Prepare Native libs android-arm-chip-tvserver
mkdir -p {root}/examples/tv-app/android/App/app/libs/jniLibs/arm64-v8a
mkdir -p {root}/examples/tv-app/android/App/app/libs/jniLibs/armeabi-v7a

cp {out}/android-arm-chip-tvserver/lib/jni/arm64-v8a/libSetupPayloadParser.so {root}/examples/tv-app/android/App/app/libs/jniLibs/arm64-v8a/libSetupPayloadParser.so
cp {out}/android-arm-chip-tvserver/lib/jni/armeabi-v7a/libSetupPayloadParser.so {root}/examples/tv-app/android/App/app/libs/jniLibs/armeabi-v7a/libSetupPayloadParser.so

cp {out}/android-arm-chip-tvserver/lib/jni/arm64-v8a/libc++_shared.so {root}/examples/tv-app/android/App/app/libs/jniLibs/arm64-v8a/libc++_shared.so
cp {out}/android-arm-chip-tvserver/lib/jni/armeabi-v7a/libc++_shared.so {root}/examples/tv-app/android/App/app/libs/jniLibs/armeabi-v7a/libc++_shared.so

cp {out}/android-arm-chip-tvserver/lib/jni/arm64-v8a/libTvApp.so {root}/examples/tv-app/android/App/app/libs/jniLibs/arm64-v8a/libTvApp.so
cp {out}/android-arm-chip-tvserver/lib/jni/armeabi-v7a/libTvApp.so {root}/examples/tv-app/android/App/app/libs/jniLibs/armeabi-v7a/libTvApp.so

cp {out}/android-arm-chip-tvserver/lib/third_party/connectedhomeip/src/setup_payload/java/SetupPayloadParser.jar {root}/examples/tv-app/android/App/app/libs/SetupPayloadParser.jar

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ class GeneralDiagnosticsDelegate : public DeviceLayer::ConnectivityManagerDelega
MatterReportingAttributeChangeCallback(endpoint, GeneralDiagnostics::Id, static_cast<AttributeId>(context));
return Loop::Continue;
},
attribute);
static_cast<intptr_t>(attribute));
}

// Gets called when any network interface on the Node is updated.
Expand Down
4 changes: 2 additions & 2 deletions src/platform/android/BLEManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ CHIP_ERROR BLEManagerImpl::CancelConnection()
CHIP_ERROR BLEManagerImpl::HasFlag(BLEManagerImpl::Flags flag, bool & has)
{
chip::DeviceLayer::StackUnlock unlock;
long f = static_cast<long>(flag);
jlong f = static_cast<jlong>(flag);

VerifyOrReturnLogError(mBLEManagerObject != nullptr, CHIP_ERROR_INCORRECT_STATE);
VerifyOrReturnLogError(mHasFlagMethod != nullptr, CHIP_ERROR_INCORRECT_STATE);
Expand All @@ -525,7 +525,7 @@ CHIP_ERROR BLEManagerImpl::HasFlag(BLEManagerImpl::Flags flag, bool & has)
CHIP_ERROR BLEManagerImpl::SetFlag(BLEManagerImpl::Flags flag, bool isSet)
{
chip::DeviceLayer::StackUnlock unlock;
long jFlag = static_cast<long>(flag);
jlong jFlag = static_cast<jlong>(flag);
jboolean jIsSet = static_cast<jboolean>(isSet);

VerifyOrReturnLogError(mBLEManagerObject != nullptr, CHIP_ERROR_INCORRECT_STATE);
Expand Down

0 comments on commit de5e0bc

Please sign in to comment.