# Copyright 2021 The Pigweed 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 # # https://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. load("@rules_proto//proto:defs.bzl", "proto_library") load( "//pw_build:pigweed.bzl", "pw_cc_library", "pw_cc_test", ) package(default_visibility = ["//visibility:public"]) licenses(["notice"]) proto_library( name = "update_bundle_proto", srcs = [ "pw_software_update_protos/tuf.proto", "pw_software_update_protos/update_bundle.proto", ], strip_import_prefix = "//pw_software_update", ) pw_cc_library( name = "update_bundle", srcs = ["update_bundle.cc"], hdrs = [ "public/pw_software_update/bundled_update_backend.h", "public/pw_software_update/config.h", "public/pw_software_update/manifest.h", "public/pw_software_update/update_bundle.h", ], includes = ["public"], deps = [ "//pw_blob_store", "//pw_kvs", "//pw_log", "//pw_protobuf", "//pw_status", "//pw_stream", ], ) pw_cc_library( name = "update_service", srcs = ["service.cc"], hdrs = ["public/pw_software_update/service.h"], includes = ["public"], deps = [ ":update_bundle_proto", ], ) pw_cc_test( name = "update_bundle_test", srcs = ["update_bundle_test.cc"], deps = [ ":update_bundle", "//pw_kvs:fake_flash_test_key_value_store", "//pw_unit_test", ], )