From dca3848bfe6ff8308f939159ccc0ce521a86ab7a Mon Sep 17 00:00:00 2001 From: "dandan.sun" Date: Thu, 8 Aug 2019 18:04:58 +0800 Subject: [PATCH] MA-15263-1 convert Android.mk to Android.bp convert all the Android.mk to Android.bp under vendor/nxp-opensource/fsl_imx_demo remove "LOCAL_SDK_VERSION := current" in some apks for build error no need to add resource_dirs: ["res"] Change-Id: I85f67c3f92e4a38be42f8c72616ba93bce356440 Signed-off-by: dandan.sun Reviewed-on: http://androidsource.ap.freescale.net/project/9713 Reviewed-by: zhang sanshan --- Android.bp | 15 +++++++++++ Android.mk | 2 -- AudioRoute/Android.bp | 20 ++++++++++++++ AudioRoute/Android.mk | 15 ----------- AudioTimeStampTest/Android.bp | 22 ++++++++++++++++ AudioTimeStampTest/Android.mk | 15 ----------- DirectAudioPlayer/Android.bp | 24 +++++++++++++++++ DirectAudioPlayer/Android.mk | 17 ------------ Ethernet/Android.bp | 45 ++++++++++++++++++++++++++++++++ Ethernet/Android.mk | 21 --------------- Ethernet/ethernet.go | 49 +++++++++++++++++++++++++++++++++++ FSLOta/Android.bp | 23 ++++++++++++++++ FSLOta/Android.mk | 14 ---------- HdmiDualVideo/Android.bp | 20 ++++++++++++++ HdmiDualVideo/Android.mk | 14 ---------- SleepAwakeAutoTest/Android.bp | 31 ++++++++++++++++++++++ SleepAwakeAutoTest/Android.mk | 25 ------------------ Test_DualPlayback/Android.bp | 21 +++++++++++++++ Test_DualPlayback/Android.mk | 14 ---------- 19 files changed, 270 insertions(+), 137 deletions(-) create mode 100644 Android.bp delete mode 100644 Android.mk create mode 100755 AudioRoute/Android.bp delete mode 100644 AudioRoute/Android.mk create mode 100755 AudioTimeStampTest/Android.bp delete mode 100755 AudioTimeStampTest/Android.mk create mode 100755 DirectAudioPlayer/Android.bp delete mode 100755 DirectAudioPlayer/Android.mk create mode 100755 Ethernet/Android.bp delete mode 100644 Ethernet/Android.mk create mode 100755 Ethernet/ethernet.go create mode 100755 FSLOta/Android.bp delete mode 100644 FSLOta/Android.mk create mode 100755 HdmiDualVideo/Android.bp delete mode 100755 HdmiDualVideo/Android.mk create mode 100755 SleepAwakeAutoTest/Android.bp delete mode 100644 SleepAwakeAutoTest/Android.mk create mode 100755 Test_DualPlayback/Android.bp delete mode 100644 Test_DualPlayback/Android.mk diff --git a/Android.bp b/Android.bp new file mode 100644 index 0000000..169e2b7 --- /dev/null +++ b/Android.bp @@ -0,0 +1,15 @@ +// Copyright 2019 NXP +// +// 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. + +subdirs = ["*"] diff --git a/Android.mk b/Android.mk deleted file mode 100644 index 59a75de..0000000 --- a/Android.mk +++ /dev/null @@ -1,2 +0,0 @@ -#Copyright (c) 2011 Freescale Semiconductor, Inc. -include $(call all-subdir-makefiles) diff --git a/AudioRoute/Android.bp b/AudioRoute/Android.bp new file mode 100755 index 0000000..0e6d208 --- /dev/null +++ b/AudioRoute/Android.bp @@ -0,0 +1,20 @@ +// Copyright 2019 NXP +// +// 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. + +// This is the NXP AudioRoute APP for i.MX. + +android_app { + name: "AudioRoute", + srcs: ["src/**/*.java"], +} diff --git a/AudioRoute/Android.mk b/AudioRoute/Android.mk deleted file mode 100644 index 5932634..0000000 --- a/AudioRoute/Android.mk +++ /dev/null @@ -1,15 +0,0 @@ -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_MODULE_TAGS := optional - -LOCAL_SRC_FILES := $(call all-java-files-under, src) - -LOCAL_SDK_VERSION := current - -LOCAL_PACKAGE_NAME := AudioRoute - -include $(BUILD_PACKAGE) - -# Use the folloing include to make our test apk. -include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/AudioTimeStampTest/Android.bp b/AudioTimeStampTest/Android.bp new file mode 100755 index 0000000..40fc558 --- /dev/null +++ b/AudioTimeStampTest/Android.bp @@ -0,0 +1,22 @@ +// Copyright 2019 NXP +// +// 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. + +// This is the NXP AudioTimeStampTest APP for i.MX. + +android_app { + name: "AudioTimeStampTest", + srcs: ["com/**/*.java"], + sdk_version: "current", + certificate: "platform", +} diff --git a/AudioTimeStampTest/Android.mk b/AudioTimeStampTest/Android.mk deleted file mode 100755 index f4c4903..0000000 --- a/AudioTimeStampTest/Android.mk +++ /dev/null @@ -1,15 +0,0 @@ -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_MODULE_TAGS := optional - -LOCAL_SRC_FILES := $(call all-java-files-under, com) - -LOCAL_SDK_VERSION := current -LOCAL_PACKAGE_NAME := AudioTimeStampTest -LOCAL_CERTIFICATE := platform - -include $(BUILD_PACKAGE) - -# Use the folloing include to make our test apk. -include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/DirectAudioPlayer/Android.bp b/DirectAudioPlayer/Android.bp new file mode 100755 index 0000000..06364cf --- /dev/null +++ b/DirectAudioPlayer/Android.bp @@ -0,0 +1,24 @@ +// Copyright 2019 NXP +// +// 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. + +// This is the NXP DirectAudioPlayer APP for i.MX. + +android_app { + name: "DirectAudioPlayer", + srcs: ["java/**/*.java"], + sdk_version: "current", + certificate: "platform", + product_specific: true, + static_libs: ["android-support-v4"], +} diff --git a/DirectAudioPlayer/Android.mk b/DirectAudioPlayer/Android.mk deleted file mode 100755 index 0b4b903..0000000 --- a/DirectAudioPlayer/Android.mk +++ /dev/null @@ -1,17 +0,0 @@ -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_MODULE_TAGS := optional - -LOCAL_SRC_FILES := $(call all-java-files-under, java) - -LOCAL_SDK_VERSION := current -LOCAL_PACKAGE_NAME := DirectAudioPlayer -LOCAL_CERTIFICATE := platform -LOCAL_PRODUCT_MODULE := true -LOCAL_STATIC_JAVA_LIBRARIES := android-support-v4 - -include $(BUILD_PACKAGE) - -# Use the folloing include to make our test apk. -include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/Ethernet/Android.bp b/Ethernet/Android.bp new file mode 100755 index 0000000..0ab07b7 --- /dev/null +++ b/Ethernet/Android.bp @@ -0,0 +1,45 @@ +// Copyright 2019 NXP +// +// 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. + +// This is the NXP ethernet APP for i.MX. + +ethernet_defaults { + name: "ethernet_default", +} + +android_app { + name: "ethernet", + defaults: ["ethernet_default"], + srcs: ["com/**/*.java"], + product_specific: true, + platform_apis: true, + certificate: "platform", +} + +bootstrap_go_package { + name: "soong-ethernet", + pkgPath: "android/soong/vendor/nxp-opensource/fsl_imx_demo/Ethernet", + deps: [ + "blueprint", + "blueprint-pathtools", + "soong", + "soong-android", + "soong-cc", + "soong-genrule", + ], + srcs: [ + "ethernet.go", + ], + pluginFor: ["soong_build"], +} diff --git a/Ethernet/Android.mk b/Ethernet/Android.mk deleted file mode 100644 index 9ceb1ba..0000000 --- a/Ethernet/Android.mk +++ /dev/null @@ -1,21 +0,0 @@ -ifeq ($(PRODUCT_MANUFACTURER),freescale) -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_MODULE_TAGS := optional - -LOCAL_SRC_FILES := $(call all-java-files-under, com) - -LOCAL_PRIVATE_PLATFORM_APIS := current - -LOCAL_PACKAGE_NAME := ethernet - -LOCAL_CERTIFICATE := platform - -LOCAL_PRODUCT_MODULE := true - -include $(BUILD_PACKAGE) - -# Use the folloing include to make our test apk. -include $(call all-makefiles-under,$(LOCAL_PATH)) -endif diff --git a/Ethernet/ethernet.go b/Ethernet/ethernet.go new file mode 100755 index 0000000..c8caa83 --- /dev/null +++ b/Ethernet/ethernet.go @@ -0,0 +1,49 @@ +// Copyright 2019 NXP +// +// 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. + +package ethernet + +import ( + "android/soong/android" + "android/soong/cc" + "github.com/google/blueprint/proptools" +) + +func init() { + android.RegisterModuleType("ethernet_defaults", ethernetDefaultsFactory) +} + +func ethernetDefaultsFactory() (android.Module) { + module := cc.DefaultsFactory() + android.AddLoadHook(module, ethernetDefaults) + return module +} + +func ethernetDefaults(ctx android.LoadHookContext) { + type props struct { + Target struct { + Android struct { + Enabled *bool + } + } + } + + p := &props{} + if ctx.Config().VendorConfig("IMXPLUGIN").String("PRODUCT_MANUFACTURER") == "freescale" { + p.Target.Android.Enabled = proptools.BoolPtr(true) + } else { + p.Target.Android.Enabled = proptools.BoolPtr(false) + } + ctx.AppendProperties(p) +} diff --git a/FSLOta/Android.bp b/FSLOta/Android.bp new file mode 100755 index 0000000..4613512 --- /dev/null +++ b/FSLOta/Android.bp @@ -0,0 +1,23 @@ +// Copyright 2019 NXP +// +// 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. + +// This is the NXP FSLOta APP for i.MX. + +android_app { + name: "FSLOta", + srcs: ["src/**/*.java"], + platform_apis: true, + privileged: true, + product_specific: true, +} diff --git a/FSLOta/Android.mk b/FSLOta/Android.mk deleted file mode 100644 index 9049ac8..0000000 --- a/FSLOta/Android.mk +++ /dev/null @@ -1,14 +0,0 @@ -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_MODULE_TAGS := optional -LOCAL_SRC_FILES := $(call all-java-files-under, src) -LOCAL_PRIVATE_PLATFORM_APIS := current -LOCAL_PACKAGE_NAME := FSLOta -LOCAL_PRIVILEGED_MODULE := true -LOCAL_PRODUCT_MODULE := true - -include $(BUILD_PACKAGE) - -# Use the folloing include to make our test apk. -include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/HdmiDualVideo/Android.bp b/HdmiDualVideo/Android.bp new file mode 100755 index 0000000..8eb4846 --- /dev/null +++ b/HdmiDualVideo/Android.bp @@ -0,0 +1,20 @@ +// Copyright 2019 NXP +// +// 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. + +// This is the NXP HdmiDualPlayback APP for i.MX. + +android_app { + name: "HdmiDualPlayback", + srcs: ["src/**/*.java"], +} diff --git a/HdmiDualVideo/Android.mk b/HdmiDualVideo/Android.mk deleted file mode 100755 index 882203f..0000000 --- a/HdmiDualVideo/Android.mk +++ /dev/null @@ -1,14 +0,0 @@ -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_MODULE_TAGS := optional - -LOCAL_SDK_VERSION := current -LOCAL_SRC_FILES := $(call all-java-files-under, src) - -LOCAL_PACKAGE_NAME := HdmiDualPlayback - -include $(BUILD_PACKAGE) - -# Use the folloing include to make our test apk. -include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/SleepAwakeAutoTest/Android.bp b/SleepAwakeAutoTest/Android.bp new file mode 100755 index 0000000..818d642 --- /dev/null +++ b/SleepAwakeAutoTest/Android.bp @@ -0,0 +1,31 @@ +// Copyright 2019 NXP +// +// 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. + +// This is the NXP SleepAwakeAutoTest APP for i.MX. + +subdirs = ["frameworks/opt/setupwizard/navigationbar/common.mk"] + +android_app { + name: "SleepAwakeAutoTest", + static_libs: [ + "android-support-v4", + "android-support-v13", + "jsr305", + ], + srcs: ["src/**/*.java"], + resource_dirs: ["res"], + sdk_version: "current", + certificate: "platform", + privileged: true, +} diff --git a/SleepAwakeAutoTest/Android.mk b/SleepAwakeAutoTest/Android.mk deleted file mode 100644 index aeca42a..0000000 --- a/SleepAwakeAutoTest/Android.mk +++ /dev/null @@ -1,25 +0,0 @@ -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_STATIC_JAVA_LIBRARIES := android-support-v4 android-support-v13 jsr305 - -LOCAL_MODULE_TAGS := optional - -LOCAL_SRC_FILES := $(call all-java-files-under, src) -LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res -LOCAL_SDK_VERSION := current - -LOCAL_PACKAGE_NAME := SleepAwakeAutoTest -LOCAL_CERTIFICATE := platform -LOCAL_PRIVILEGED_MODULE := true - -#LOCAL_PROGUARD_FLAG_FILES := proguard.flags - -include frameworks/opt/setupwizard/navigationbar/common.mk - -include $(BUILD_PACKAGE) - -# Use the following include to make our test apk. -ifeq (,$(ONE_SHOT_MAKEFILE)) -include $(call all-makefiles-under,$(LOCAL_PATH)) -endif diff --git a/Test_DualPlayback/Android.bp b/Test_DualPlayback/Android.bp new file mode 100755 index 0000000..faa64b8 --- /dev/null +++ b/Test_DualPlayback/Android.bp @@ -0,0 +1,21 @@ +// Copyright 2019 NXP +// +// 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. + +// This is the NXP Test_DualPlayback APP for i.MX. + +android_app { + name: "Test_DualPlayback", + srcs: ["src/**/*.java"], + sdk_version: "current", +} diff --git a/Test_DualPlayback/Android.mk b/Test_DualPlayback/Android.mk deleted file mode 100644 index af54ef5..0000000 --- a/Test_DualPlayback/Android.mk +++ /dev/null @@ -1,14 +0,0 @@ -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_MODULE_TAGS := optional - -LOCAL_SRC_FILES := $(call all-java-files-under, src) -LOCAL_SDK_VERSION := current - -LOCAL_PACKAGE_NAME := Test_DualPlayback - -include $(BUILD_PACKAGE) - -# Use the folloing include to make our test apk. -include $(call all-makefiles-under,$(LOCAL_PATH))