xref: /aosp_15_r20/system/security/provisioner/Android.bp (revision e1997b9af69e3155ead6e072d106a0077849ffba)
1*e1997b9aSAndroid Build Coastguard Worker//
2*e1997b9aSAndroid Build Coastguard Worker// Copyright (C) 2020 The Android Open Source Project
3*e1997b9aSAndroid Build Coastguard Worker//
4*e1997b9aSAndroid Build Coastguard Worker// Licensed under the Apache License, Version 2.0 (the "License");
5*e1997b9aSAndroid Build Coastguard Worker// you may not use this file except in compliance with the License.
6*e1997b9aSAndroid Build Coastguard Worker// You may obtain a copy of the License at
7*e1997b9aSAndroid Build Coastguard Worker//
8*e1997b9aSAndroid Build Coastguard Worker//      http://www.apache.org/licenses/LICENSE-2.0
9*e1997b9aSAndroid Build Coastguard Worker//
10*e1997b9aSAndroid Build Coastguard Worker// Unless required by applicable law or agreed to in writing, software
11*e1997b9aSAndroid Build Coastguard Worker// distributed under the License is distributed on an "AS IS" BASIS,
12*e1997b9aSAndroid Build Coastguard Worker// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13*e1997b9aSAndroid Build Coastguard Worker// See the License for the specific language governing permissions and
14*e1997b9aSAndroid Build Coastguard Worker// limitations under the License.
15*e1997b9aSAndroid Build Coastguard Worker//
16*e1997b9aSAndroid Build Coastguard Worker
17*e1997b9aSAndroid Build Coastguard Workerpackage {
18*e1997b9aSAndroid Build Coastguard Worker    default_team: "trendy_team_foundation_security_rust_pkvm_",
19*e1997b9aSAndroid Build Coastguard Worker    // See: http://go/android-license-faq
20*e1997b9aSAndroid Build Coastguard Worker    // A large-scale-change added 'default_applicable_licenses' to import
21*e1997b9aSAndroid Build Coastguard Worker    // all of the 'license_kinds' from "system_security_license"
22*e1997b9aSAndroid Build Coastguard Worker    // to get the below license kinds:
23*e1997b9aSAndroid Build Coastguard Worker    //   SPDX-license-identifier-Apache-2.0
24*e1997b9aSAndroid Build Coastguard Worker    default_applicable_licenses: ["system_security_license"],
25*e1997b9aSAndroid Build Coastguard Worker}
26*e1997b9aSAndroid Build Coastguard Worker
27*e1997b9aSAndroid Build Coastguard Workercc_defaults {
28*e1997b9aSAndroid Build Coastguard Worker    name: "rkp_factory_extraction_defaults",
29*e1997b9aSAndroid Build Coastguard Worker    defaults: [
30*e1997b9aSAndroid Build Coastguard Worker        "keymint_use_latest_hal_aidl_ndk_static",
31*e1997b9aSAndroid Build Coastguard Worker    ],
32*e1997b9aSAndroid Build Coastguard Worker    shared_libs: [
33*e1997b9aSAndroid Build Coastguard Worker        "libbinder_ndk",
34*e1997b9aSAndroid Build Coastguard Worker        "libcrypto",
35*e1997b9aSAndroid Build Coastguard Worker        "liblog",
36*e1997b9aSAndroid Build Coastguard Worker    ],
37*e1997b9aSAndroid Build Coastguard Worker    static_libs: [
38*e1997b9aSAndroid Build Coastguard Worker        "android.hardware.common-V2-ndk",
39*e1997b9aSAndroid Build Coastguard Worker        "android.hardware.drm.common-V1-ndk",
40*e1997b9aSAndroid Build Coastguard Worker        "android.hardware.drm-V1-ndk",
41*e1997b9aSAndroid Build Coastguard Worker        "android.hardware.security.rkp-V3-ndk",
42*e1997b9aSAndroid Build Coastguard Worker        "libbase",
43*e1997b9aSAndroid Build Coastguard Worker        "libcppbor",
44*e1997b9aSAndroid Build Coastguard Worker        "libcppcose_rkp",
45*e1997b9aSAndroid Build Coastguard Worker        "libjsoncpp",
46*e1997b9aSAndroid Build Coastguard Worker        "libkeymint_remote_prov_support",
47*e1997b9aSAndroid Build Coastguard Worker        "libmediadrmrkp",
48*e1997b9aSAndroid Build Coastguard Worker    ],
49*e1997b9aSAndroid Build Coastguard Worker}
50*e1997b9aSAndroid Build Coastguard Worker
51*e1997b9aSAndroid Build Coastguard Workercc_library_static {
52*e1997b9aSAndroid Build Coastguard Worker    name: "librkp_factory_extraction",
53*e1997b9aSAndroid Build Coastguard Worker    defaults: [
54*e1997b9aSAndroid Build Coastguard Worker        "rkp_factory_extraction_defaults",
55*e1997b9aSAndroid Build Coastguard Worker    ],
56*e1997b9aSAndroid Build Coastguard Worker    srcs: ["rkp_factory_extraction_lib.cpp"],
57*e1997b9aSAndroid Build Coastguard Worker    vendor_available: true,
58*e1997b9aSAndroid Build Coastguard Worker}
59*e1997b9aSAndroid Build Coastguard Worker
60*e1997b9aSAndroid Build Coastguard Workercc_test {
61*e1997b9aSAndroid Build Coastguard Worker    name: "librkp_factory_extraction_test",
62*e1997b9aSAndroid Build Coastguard Worker    defaults: [
63*e1997b9aSAndroid Build Coastguard Worker        "rkp_factory_extraction_defaults",
64*e1997b9aSAndroid Build Coastguard Worker    ],
65*e1997b9aSAndroid Build Coastguard Worker    srcs: ["rkp_factory_extraction_lib_test.cpp"],
66*e1997b9aSAndroid Build Coastguard Worker    test_suites: ["device-tests"],
67*e1997b9aSAndroid Build Coastguard Worker    static_libs: [
68*e1997b9aSAndroid Build Coastguard Worker        "libgmock",
69*e1997b9aSAndroid Build Coastguard Worker        "librkp_factory_extraction",
70*e1997b9aSAndroid Build Coastguard Worker    ],
71*e1997b9aSAndroid Build Coastguard Worker}
72*e1997b9aSAndroid Build Coastguard Worker
73*e1997b9aSAndroid Build Coastguard Workercc_binary {
74*e1997b9aSAndroid Build Coastguard Worker    name: "rkp_factory_extraction_tool",
75*e1997b9aSAndroid Build Coastguard Worker    vendor: true,
76*e1997b9aSAndroid Build Coastguard Worker    srcs: ["rkp_factory_extraction_tool.cpp"],
77*e1997b9aSAndroid Build Coastguard Worker    defaults: [
78*e1997b9aSAndroid Build Coastguard Worker        "rkp_factory_extraction_defaults",
79*e1997b9aSAndroid Build Coastguard Worker    ],
80*e1997b9aSAndroid Build Coastguard Worker    static_libs: [
81*e1997b9aSAndroid Build Coastguard Worker        "libgflags",
82*e1997b9aSAndroid Build Coastguard Worker        "librkp_factory_extraction",
83*e1997b9aSAndroid Build Coastguard Worker    ],
84*e1997b9aSAndroid Build Coastguard Worker    dist: {
85*e1997b9aSAndroid Build Coastguard Worker        targets: [
86*e1997b9aSAndroid Build Coastguard Worker            "dist_files",
87*e1997b9aSAndroid Build Coastguard Worker            "rkp_factory_extraction_tool",
88*e1997b9aSAndroid Build Coastguard Worker        ],
89*e1997b9aSAndroid Build Coastguard Worker        dest: "rkp_factory_extraction_tool",
90*e1997b9aSAndroid Build Coastguard Worker    },
91*e1997b9aSAndroid Build Coastguard Worker    compile_multilib: "both",
92*e1997b9aSAndroid Build Coastguard Worker    multilib: {
93*e1997b9aSAndroid Build Coastguard Worker        lib64: {
94*e1997b9aSAndroid Build Coastguard Worker            suffix: "64",
95*e1997b9aSAndroid Build Coastguard Worker        },
96*e1997b9aSAndroid Build Coastguard Worker    },
97*e1997b9aSAndroid Build Coastguard Worker    target: {
98*e1997b9aSAndroid Build Coastguard Worker        android_arm: {
99*e1997b9aSAndroid Build Coastguard Worker            dist: {
100*e1997b9aSAndroid Build Coastguard Worker                dir: "rkp/arm",
101*e1997b9aSAndroid Build Coastguard Worker            },
102*e1997b9aSAndroid Build Coastguard Worker        },
103*e1997b9aSAndroid Build Coastguard Worker        android_arm64: {
104*e1997b9aSAndroid Build Coastguard Worker            dist: {
105*e1997b9aSAndroid Build Coastguard Worker                dir: "rkp/arm64",
106*e1997b9aSAndroid Build Coastguard Worker            },
107*e1997b9aSAndroid Build Coastguard Worker        },
108*e1997b9aSAndroid Build Coastguard Worker        android_x86: {
109*e1997b9aSAndroid Build Coastguard Worker            dist: {
110*e1997b9aSAndroid Build Coastguard Worker                dir: "rkp/x86",
111*e1997b9aSAndroid Build Coastguard Worker            },
112*e1997b9aSAndroid Build Coastguard Worker        },
113*e1997b9aSAndroid Build Coastguard Worker        android_x86_64: {
114*e1997b9aSAndroid Build Coastguard Worker            dist: {
115*e1997b9aSAndroid Build Coastguard Worker                dir: "rkp/x86_64",
116*e1997b9aSAndroid Build Coastguard Worker            },
117*e1997b9aSAndroid Build Coastguard Worker        },
118*e1997b9aSAndroid Build Coastguard Worker    },
119*e1997b9aSAndroid Build Coastguard Worker}
120