From 7f0a5bd7677d74ea5ea2aa84be2fdf3747eb85f1 Mon Sep 17 00:00:00 2001 From: Steven Moreland Date: Wed, 3 May 2017 19:10:49 -0700 Subject: [PATCH] trusty/storage/* to Android.bp Test: links Bug: 37512442 Change-Id: I53449f572e41a24a4e49b16ef01bdbb23cc10cb5 --- trusty/Android.bp | 1 + trusty/storage/interface/Android.bp | 20 ++++++++++++++ trusty/storage/interface/Android.mk | 25 ------------------ trusty/storage/lib/Android.bp | 35 ++++++++++++++++++++++++ trusty/storage/lib/Android.mk | 37 -------------------------- trusty/storage/proxy/Android.bp | 38 ++++++++++++++++++++++++++ trusty/storage/proxy/Android.mk | 41 ----------------------------- trusty/storage/proxy/proxy.c | 1 - trusty/storage/tests/Android.bp | 36 +++++++++++++++++++++++++ trusty/storage/tests/Android.mk | 29 -------------------- 10 files changed, 130 insertions(+), 133 deletions(-) create mode 100644 trusty/storage/interface/Android.bp delete mode 100644 trusty/storage/interface/Android.mk create mode 100644 trusty/storage/lib/Android.bp delete mode 100644 trusty/storage/lib/Android.mk create mode 100644 trusty/storage/proxy/Android.bp delete mode 100644 trusty/storage/proxy/Android.mk create mode 100644 trusty/storage/tests/Android.bp delete mode 100644 trusty/storage/tests/Android.mk diff --git a/trusty/Android.bp b/trusty/Android.bp index 1b2e2c776..9681488d8 100644 --- a/trusty/Android.bp +++ b/trusty/Android.bp @@ -1,3 +1,4 @@ subdirs = [ "libtrusty", + "storage/*", ] diff --git a/trusty/storage/interface/Android.bp b/trusty/storage/interface/Android.bp new file mode 100644 index 000000000..a551c37aa --- /dev/null +++ b/trusty/storage/interface/Android.bp @@ -0,0 +1,20 @@ +// +// Copyright (C) 2015 The Android Open-Source Project +// +// 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 +// +// http://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. +// + +cc_library_static { + name: "libtrustystorageinterface", + export_include_dirs: ["include"], +} diff --git a/trusty/storage/interface/Android.mk b/trusty/storage/interface/Android.mk deleted file mode 100644 index 15cb6f3d5..000000000 --- a/trusty/storage/interface/Android.mk +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (C) 2015 The Android Open-Source Project -# -# 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 -# -# http://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. -# - -LOCAL_PATH:= $(call my-dir) - -include $(CLEAR_VARS) - -LOCAL_MODULE := libtrustystorageinterface - -LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include - -include $(BUILD_STATIC_LIBRARY) diff --git a/trusty/storage/lib/Android.bp b/trusty/storage/lib/Android.bp new file mode 100644 index 000000000..5eb3f0778 --- /dev/null +++ b/trusty/storage/lib/Android.bp @@ -0,0 +1,35 @@ +// +// Copyright (C) 2015 The Android Open-Source Project +// +// 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 +// +// http://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. +// + +cc_library_static { + name: "libtrustystorage", + + srcs: ["storage.c"], + + export_include_dirs: ["include"], + + static_libs: [ + "liblog", + "libtrusty", + "libtrustystorageinterface", + ], + + cflags: [ + "-fvisibility=hidden", + "-Wall", + "-Werror", + ] +} diff --git a/trusty/storage/lib/Android.mk b/trusty/storage/lib/Android.mk deleted file mode 100644 index 7e0fc9da4..000000000 --- a/trusty/storage/lib/Android.mk +++ /dev/null @@ -1,37 +0,0 @@ -# -# Copyright (C) 2015 The Android Open-Source Project -# -# 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 -# -# http://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. -# - -LOCAL_PATH:= $(call my-dir) - -include $(CLEAR_VARS) - -LOCAL_MODULE := libtrustystorage - -LOCAL_SRC_FILES := \ - storage.c \ - -LOCAL_CLFAGS = -fvisibility=hidden -Wall -Werror - -LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include -LOCAL_C_INCLUDES := $(LOCAL_PATH)/include - -LOCAL_STATIC_LIBRARIES := \ - liblog \ - libtrusty \ - libtrustystorageinterface - -include $(BUILD_STATIC_LIBRARY) - diff --git a/trusty/storage/proxy/Android.bp b/trusty/storage/proxy/Android.bp new file mode 100644 index 000000000..eb34df014 --- /dev/null +++ b/trusty/storage/proxy/Android.bp @@ -0,0 +1,38 @@ +// +// Copyright (C) 2016 The Android Open-Source Project +// +// 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 +// +// http://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. +// + +cc_binary { + name: "storageproxyd", + + srcs: [ + "ipc.c", + "rpmb.c", + "storage.c", + "proxy.c", + ], + + shared_libs: ["liblog"], + + static_libs: [ + "libtrustystorageinterface", + "libtrusty", + ], + + cflags: [ + "-Wall", + "-Werror", + ] +} diff --git a/trusty/storage/proxy/Android.mk b/trusty/storage/proxy/Android.mk deleted file mode 100644 index 745e302d8..000000000 --- a/trusty/storage/proxy/Android.mk +++ /dev/null @@ -1,41 +0,0 @@ -# -# Copyright (C) 2016 The Android Open-Source Project -# -# 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 -# -# http://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. -# - -LOCAL_PATH:= $(call my-dir) - -include $(CLEAR_VARS) - -LOCAL_MODULE := storageproxyd - -LOCAL_C_INCLUDES += bionic/libc/kernel/uapi - -LOCAL_SRC_FILES := \ - ipc.c \ - rpmb.c \ - storage.c \ - proxy.c - -LOCAL_CLFAGS = -Wall -Werror - -LOCAL_SHARED_LIBRARIES := \ - liblog \ - -LOCAL_STATIC_LIBRARIES := \ - libtrustystorageinterface \ - libtrusty - -include $(BUILD_EXECUTABLE) - diff --git a/trusty/storage/proxy/proxy.c b/trusty/storage/proxy/proxy.c index d645ac01c..27e58917f 100644 --- a/trusty/storage/proxy/proxy.c +++ b/trusty/storage/proxy/proxy.c @@ -229,7 +229,6 @@ static void parse_args(int argc, char *argv[]) int main(int argc, char *argv[]) { int rc; - uint retry_cnt; /* drop privileges */ if (drop_privs() < 0) diff --git a/trusty/storage/tests/Android.bp b/trusty/storage/tests/Android.bp new file mode 100644 index 000000000..3eff3f27a --- /dev/null +++ b/trusty/storage/tests/Android.bp @@ -0,0 +1,36 @@ +// +// Copyright (C) 2016 The Android Open Source Project +// +// 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 +// +// http://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. +// + +cc_test { + name: "secure-storage-unit-test", + + cflags: [ + "-g", + "-Wall", + "-Werror", + "-std=gnu++11", + "-Wno-missing-field-initializers", + ], + + static_libs: [ + "libtrustystorageinterface", + "libtrustystorage", + "libtrusty", + "liblog", + ], + + srcs: ["main.cpp"], +} diff --git a/trusty/storage/tests/Android.mk b/trusty/storage/tests/Android.mk deleted file mode 100644 index 71c904df1..000000000 --- a/trusty/storage/tests/Android.mk +++ /dev/null @@ -1,29 +0,0 @@ -# -# Copyright (C) 2016 The Android Open Source Project -# -# 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 -# -# http://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. -# - -LOCAL_PATH:= $(call my-dir) - -include $(CLEAR_VARS) -LOCAL_MODULE := secure-storage-unit-test -LOCAL_CFLAGS += -g -Wall -Werror -std=gnu++11 -Wno-missing-field-initializers -LOCAL_STATIC_LIBRARIES := \ - libtrustystorageinterface \ - libtrustystorage \ - libtrusty \ - liblog -LOCAL_SRC_FILES := main.cpp -include $(BUILD_NATIVE_TEST) -