Skip to content

Commit

Permalink
Fix build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
restyled-commits authored and Damian-Nordic committed Dec 10, 2021
1 parent fda711c commit 5b4edac
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 10 deletions.
7 changes: 0 additions & 7 deletions examples/ota-requestor-app/ota-requestor-common/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,6 @@ chip_data_model("ota-requestor-common") {

deps = [ "${chip_root}/src/lib" ]

sources = [
"${chip_root}/src/app/clusters/ota-requestor/BDXDownloader.cpp",
"${chip_root}/src/app/clusters/ota-requestor/BDXDownloader.h",
"${chip_root}/src/app/clusters/ota-requestor/ClusterInterface.cpp",
"${chip_root}/src/app/clusters/ota-requestor/OTARequestor.cpp",
]

is_server = true

public_configs = [ ":config" ]
Expand Down
9 changes: 9 additions & 0 deletions src/app/chip_data_model.gni
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,15 @@ template("chip_data_model") {
"${_app_root}/util/ContentApp.cpp",
"${_app_root}/util/ContentAppPlatform.cpp",
]
} else if (cluster == "ota-requestor") {
sources += [
"${_app_root}/clusters/${cluster}/BDXDownloader.cpp",
"${_app_root}/clusters/${cluster}/BDXDownloader.h",
"${_app_root}/clusters/${cluster}/ClusterInterface.cpp",
"${_app_root}/clusters/${cluster}/OTADownloader.h",
"${_app_root}/clusters/${cluster}/OTARequestor.cpp",
"${_app_root}/clusters/${cluster}/OTARequestor.h",
]
} else {
sources += [ "${_app_root}/clusters/${cluster}/${cluster}.cpp" ]
}
Expand Down
4 changes: 2 additions & 2 deletions src/app/zap_cluster_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
'OPERATIONAL_CREDENTIALS_CLUSTER': ['operational-credentials-server'],
'OTA_BOOTLOAD_CLUSTER': [],
'OTA_PROVIDER_CLUSTER': ['ota-provider'],
'OTA_REQUESTOR_CLUSTER': [],
'OTA_REQUESTOR_CLUSTER': ['ota-requestor'],
'POWER_SOURCE_CLUSTER': [],
'POWER_SOURCE_CONFIGURATION_CLUSTER': ['power-source-configuration-server'],
'POLL_CONTROL_CLUSTER': [],
Expand Down Expand Up @@ -138,7 +138,7 @@
'ON_OFF_SWITCH_CONFIG_CLUSTER': [],
'OPERATIONAL_CREDENTIALS_CLUSTER': [],
'OTA_BOOTLOAD_CLUSTER': [],
'OTA_PROVIDER_CLUSTER': ['ota-requestor'],
'OTA_PROVIDER_CLUSTER': [],
'OTA_REQUESTOR_CLUSTER': [],
'POLL_CONTROL_CLUSTER': [],
'POWER_CONFIG_CLUSTER': [],
Expand Down
1 change: 1 addition & 0 deletions src/lib/shell/commands/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ source_set("commands") {
if (chip_enable_ota_requestor && chip_device_platform != "none") {
sources += [ "Ota.cpp" ]
public_deps += [ "${chip_root}/src/app/clusters/ota-requestor:headers" ]

# TODO: remove dependency of OTA shell on controller-clusters
include_dirs = [ "${chip_root}/zzz_generated/controller-clusters" ]
}
Expand Down
1 change: 1 addition & 0 deletions src/lib/shell/commands/Ota.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ namespace {
class DummyOTARequestorDriver : public OTARequestorDriver
{
bool CheckImageDownloadAllowed() override { return true; }
UserConsentAction RequestUserConsent() override { return ImmediateYes; }
void ImageDownloadComplete() override {}
} sOTARequestorDriver;

Expand Down
2 changes: 1 addition & 1 deletion src/platform/nrfconnect/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ static_library("nrfconnect") {

if (chip_enable_ota_requestor) {
sources += [
"OTAImageProcessorImpl.h",
"OTAImageProcessorImpl.cpp",
"OTAImageProcessorImpl.h",
]
}
}

0 comments on commit 5b4edac

Please sign in to comment.