summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan Campbell2016-11-07 11:27:51 -0600
committerRyan Campbell2016-11-10 11:19:43 -0600
commit548f2a000a88a4f1d64972583dc25ae725ee21fd (patch)
tree4f5439b387c1802b3d279febb95728c2fa3ea52c /boot/1.0/vts
parentad36c620ccdff1fcc658fc53b687001c804377a5 (diff)
downloadplatform-hardware-interfaces-548f2a000a88a4f1d64972583dc25ae725ee21fd.tar.gz
platform-hardware-interfaces-548f2a000a88a4f1d64972583dc25ae725ee21fd.tar.xz
platform-hardware-interfaces-548f2a000a88a4f1d64972583dc25ae725ee21fd.zip
VTS driver files for boot control HAL.
Test: manual Change-Id: Ib9b459321002d249c487628028ac8e90e91bffbf
Diffstat (limited to 'boot/1.0/vts')
-rw-r--r--boot/1.0/vts/Android.mk86
-rw-r--r--boot/1.0/vts/BootControl.vts93
-rw-r--r--boot/1.0/vts/types.vts42
3 files changed, 221 insertions, 0 deletions
diff --git a/boot/1.0/vts/Android.mk b/boot/1.0/vts/Android.mk
new file mode 100644
index 00000000..16b92c15
--- /dev/null
+++ b/boot/1.0/vts/Android.mk
@@ -0,0 +1,86 @@
1#
2# Copyright (C) 2016 The Android Open Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16
17LOCAL_PATH := $(call my-dir)
18
19# build VTS driver for Boot Control v1.0.
20include $(CLEAR_VARS)
21
22LOCAL_MODULE := libvts_driver_hidl_boot@1.0
23
24LOCAL_SRC_FILES := \
25 BootControl.vts \
26 types.vts \
27
28LOCAL_C_INCLUDES := \
29 android.hardware.boot@1.0\
30 system/core/base/include \
31 system/core/include \
32
33LOCAL_SHARED_LIBRARIES += \
34 android.hardware.boot@1.0 \
35 libbase \
36 libutils \
37 libcutils \
38 liblog \
39 libhidl \
40 libhwbinder \
41 libprotobuf-cpp-full \
42 libvts_common \
43 libvts_datatype \
44 libvts_measurement \
45 libvts_multidevice_proto \
46
47LOCAL_CFLAGS += -DENABLE_TREBLE
48
49LOCAL_STATIC_LIBRARIES := \
50
51LOCAL_PROTOC_OPTIMIZE_TYPE := full
52
53LOCAL_MULTILIB := both
54
55include $(BUILD_SHARED_LIBRARY)
56
57# build profiler for boot.
58include $(CLEAR_VARS)
59
60LOCAL_MODULE := libvts_profiler_hidl_boot@1.0
61
62LOCAL_SRC_FILES := \
63 BootControl.vts \
64 types.vts \
65
66LOCAL_C_INCLUDES += \
67 test/vts/drivers/libprofiling \
68
69LOCAL_VTS_MODE := PROFILER
70
71LOCAL_SHARED_LIBRARIES := \
72 android.hardware.boot@1.0 \
73 libbase \
74 libcutils \
75 liblog \
76 libhidl \
77 libhwbinder \
78 libprotobuf-cpp-full \
79 libvts_common \
80 libvts_multidevice_proto \
81 libvts_profiling \
82 libutils \
83
84LOCAL_PROTOC_OPTIMIZE_TYPE := full
85
86include $(BUILD_SHARED_LIBRARY)
diff --git a/boot/1.0/vts/BootControl.vts b/boot/1.0/vts/BootControl.vts
new file mode 100644
index 00000000..384ae509
--- /dev/null
+++ b/boot/1.0/vts/BootControl.vts
@@ -0,0 +1,93 @@
1component_class: HAL_HIDL
2component_type_version: 1.0
3component_name: "IBootControl"
4
5package: "android.hardware.boot"
6
7import: "android.hardware.boot@1.0::types"
8
9interface: {
10 api: {
11 name: "getNumberSlots"
12 return_type_hidl: {
13 type: TYPE_SCALAR
14 scalar_type: "uint32_t"
15 }
16 }
17
18 api: {
19 name: "getCurrentSlot"
20 return_type_hidl: {
21 type: TYPE_SCALAR
22 scalar_type: "uint32_t"
23 }
24 }
25
26 api: {
27 name: "markBootSuccessful"
28 return_type_hidl: {
29 type: TYPE_STRUCT
30 predefined_type: "::android::hardware::boot::V1_0::CommandResult"
31 }
32 }
33
34 api: {
35 name: "setActiveBootSlot"
36 return_type_hidl: {
37 type: TYPE_STRUCT
38 predefined_type: "::android::hardware::boot::V1_0::CommandResult"
39 }
40 arg: {
41 type: TYPE_SCALAR
42 scalar_type: "uint32_t"
43 }
44 }
45
46 api: {
47 name: "setSlotAsUnbootable"
48 return_type_hidl: {
49 type: TYPE_STRUCT
50 predefined_type: "::android::hardware::boot::V1_0::CommandResult"
51 }
52 arg: {
53 type: TYPE_SCALAR
54 scalar_type: "uint32_t"
55 }
56 }
57
58 api: {
59 name: "isSlotBootable"
60 return_type_hidl: {
61 type: TYPE_ENUM
62 predefined_type: "::android::hardware::boot::V1_0::BoolResult"
63 }
64 arg: {
65 type: TYPE_SCALAR
66 scalar_type: "uint32_t"
67 }
68 }
69
70 api: {
71 name: "isSlotMarkedSuccessful"
72 return_type_hidl: {
73 type: TYPE_ENUM
74 predefined_type: "::android::hardware::boot::V1_0::BoolResult"
75 }
76 arg: {
77 type: TYPE_SCALAR
78 scalar_type: "uint32_t"
79 }
80 }
81
82 api: {
83 name: "getSuffix"
84 return_type_hidl: {
85 type: TYPE_STRING
86 }
87 arg: {
88 type: TYPE_SCALAR
89 scalar_type: "uint32_t"
90 }
91 }
92
93}
diff --git a/boot/1.0/vts/types.vts b/boot/1.0/vts/types.vts
new file mode 100644
index 00000000..ebeaa60d
--- /dev/null
+++ b/boot/1.0/vts/types.vts
@@ -0,0 +1,42 @@
1component_class: HAL_HIDL
2component_type_version: 1.0
3component_name: "types"
4
5package: "android.hardware.boot"
6
7
8attribute: {
9 name: "::android::hardware::boot::V1_0::CommandResult"
10 type: TYPE_STRUCT
11 struct_value: {
12 name: "success"
13 type: TYPE_SCALAR
14 scalar_type: "bool_t"
15 }
16 struct_value: {
17 name: "errMsg"
18 type: TYPE_STRING
19 }
20}
21
22attribute: {
23 name: "::android::hardware::boot::V1_0::BoolResult"
24 type: TYPE_ENUM
25 enum_value: {
26 scalar_type: "int32_t"
27
28 enumerator: "FALSE"
29 scalar_value: {
30 int32_t: 0
31 }
32 enumerator: "TRUE"
33 scalar_value: {
34 int32_t: 1
35 }
36 enumerator: "INVALID_SLOT"
37 scalar_value: {
38 int32_t: -1
39 }
40 }
41}
42