From 82996e4bbc98692083f0b17473a772990850855d Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Wed, 25 Nov 2020 11:51:49 +0000 Subject: [PATCH] Add devices suitable for single-arch module builds Prior to this the generic_* devices were typically used for this purpose. There are a few reasons to create new specific ones: - the generic_arm64 device has a hack specifically for building multi-arch packages that we want to avoid - the generic_* devices include a bunch of emulator config that does not make sense for unbundled builds Bug: 172256440 Test: verify unbundled builds migrated from generic_* don't change Change-Id: Ia937461aa24a5d5b542f8688a1b71ac3fdeb596b --- target/board/module_arm/BoardConfig.mk | 20 ++++++++++++++++++ target/board/module_arm/README.md | 2 ++ target/board/module_arm/device.mk | 18 ++++++++++++++++ target/board/module_arm64/BoardConfig.mk | 25 +++++++++++++++++++++++ target/board/module_arm64/README.md | 3 +++ target/board/module_arm64/device.mk | 19 +++++++++++++++++ target/board/module_x86/BoardConfig.mk | 18 ++++++++++++++++ target/board/module_x86/README.md | 2 ++ target/board/module_x86/device.mk | 18 ++++++++++++++++ target/board/module_x86_64/BoardConfig.mk | 22 ++++++++++++++++++++ target/board/module_x86_64/README.md | 3 +++ target/board/module_x86_64/device.mk | 19 +++++++++++++++++ 12 files changed, 169 insertions(+) create mode 100644 target/board/module_arm/BoardConfig.mk create mode 100644 target/board/module_arm/README.md create mode 100644 target/board/module_arm/device.mk create mode 100644 target/board/module_arm64/BoardConfig.mk create mode 100644 target/board/module_arm64/README.md create mode 100644 target/board/module_arm64/device.mk create mode 100644 target/board/module_x86/BoardConfig.mk create mode 100644 target/board/module_x86/README.md create mode 100644 target/board/module_x86/device.mk create mode 100644 target/board/module_x86_64/BoardConfig.mk create mode 100644 target/board/module_x86_64/README.md create mode 100644 target/board/module_x86_64/device.mk diff --git a/target/board/module_arm/BoardConfig.mk b/target/board/module_arm/BoardConfig.mk new file mode 100644 index 0000000000..565efc8425 --- /dev/null +++ b/target/board/module_arm/BoardConfig.mk @@ -0,0 +1,20 @@ +# Copyright (C) 2020 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. +# + +TARGET_ARCH := arm +TARGET_ARCH_VARIANT := armv7-a-neon +TARGET_CPU_VARIANT := generic +TARGET_CPU_ABI := armeabi-v7a +TARGET_CPU_ABI2 := armeabi diff --git a/target/board/module_arm/README.md b/target/board/module_arm/README.md new file mode 100644 index 0000000000..b893573bd1 --- /dev/null +++ b/target/board/module_arm/README.md @@ -0,0 +1,2 @@ +This device is suitable for an unbundled module targeted specifically to an arm +device. diff --git a/target/board/module_arm/device.mk b/target/board/module_arm/device.mk new file mode 100644 index 0000000000..7cac5f8430 --- /dev/null +++ b/target/board/module_arm/device.mk @@ -0,0 +1,18 @@ +# +# Copyright (C) 2020 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. +# + +$(call inherit-product, build/make/target/product/bootclasspath.mk) +$(call inherit-product, build/make/target/product/languages_default.mk) diff --git a/target/board/module_arm64/BoardConfig.mk b/target/board/module_arm64/BoardConfig.mk new file mode 100644 index 0000000000..66e3792640 --- /dev/null +++ b/target/board/module_arm64/BoardConfig.mk @@ -0,0 +1,25 @@ +# Copyright (C) 2020 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. +# + +TARGET_ARCH := arm64 +TARGET_ARCH_VARIANT := armv8-a +TARGET_CPU_VARIANT := generic +TARGET_CPU_ABI := arm64-v8a + +TARGET_2ND_ARCH := arm +TARGET_2ND_ARCH_VARIANT := armv8-a +TARGET_2ND_CPU_ABI := armeabi-v7a +TARGET_2ND_CPU_ABI2 := armeabi +TARGET_2ND_CPU_VARIANT := generic diff --git a/target/board/module_arm64/README.md b/target/board/module_arm64/README.md new file mode 100644 index 0000000000..cb36fbf258 --- /dev/null +++ b/target/board/module_arm64/README.md @@ -0,0 +1,3 @@ +This device is suitable for an unbundled module targeted specifically to an +arm64 device. 32 bit binaries built with this product will not be suitable for a +32-bit arm device. diff --git a/target/board/module_arm64/device.mk b/target/board/module_arm64/device.mk new file mode 100644 index 0000000000..9065d4b66d --- /dev/null +++ b/target/board/module_arm64/device.mk @@ -0,0 +1,19 @@ +# +# Copyright (C) 2020 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. +# + +$(call inherit-product, build/make/target/product/bootclasspath.mk) +$(call inherit-product, build/make/target/product/core_64_bit.mk) +$(call inherit-product, build/make/target/product/languages_default.mk) diff --git a/target/board/module_x86/BoardConfig.mk b/target/board/module_x86/BoardConfig.mk new file mode 100644 index 0000000000..af3fffd067 --- /dev/null +++ b/target/board/module_x86/BoardConfig.mk @@ -0,0 +1,18 @@ +# Copyright (C) 2020 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. +# + +TARGET_CPU_ABI := x86 +TARGET_ARCH := x86 +TARGET_ARCH_VARIANT := x86 diff --git a/target/board/module_x86/README.md b/target/board/module_x86/README.md new file mode 100644 index 0000000000..10866b7c5f --- /dev/null +++ b/target/board/module_x86/README.md @@ -0,0 +1,2 @@ +This device is suitable for an unbundled module targeted specifically to an +x86 device. diff --git a/target/board/module_x86/device.mk b/target/board/module_x86/device.mk new file mode 100644 index 0000000000..7cac5f8430 --- /dev/null +++ b/target/board/module_x86/device.mk @@ -0,0 +1,18 @@ +# +# Copyright (C) 2020 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. +# + +$(call inherit-product, build/make/target/product/bootclasspath.mk) +$(call inherit-product, build/make/target/product/languages_default.mk) diff --git a/target/board/module_x86_64/BoardConfig.mk b/target/board/module_x86_64/BoardConfig.mk new file mode 100644 index 0000000000..1ada02729e --- /dev/null +++ b/target/board/module_x86_64/BoardConfig.mk @@ -0,0 +1,22 @@ +# Copyright (C) 2020 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. +# + +TARGET_CPU_ABI := x86_64 +TARGET_ARCH := x86_64 +TARGET_ARCH_VARIANT := x86_64 + +TARGET_2ND_CPU_ABI := x86 +TARGET_2ND_ARCH := x86 +TARGET_2ND_ARCH_VARIANT := x86_64 diff --git a/target/board/module_x86_64/README.md b/target/board/module_x86_64/README.md new file mode 100644 index 0000000000..3377baad2a --- /dev/null +++ b/target/board/module_x86_64/README.md @@ -0,0 +1,3 @@ +This device is suitable for an unbundled module targeted specifically to an +x86_64 device. 32 bit binaries built with this product will not be suitable for +a 32-bit x86 device. diff --git a/target/board/module_x86_64/device.mk b/target/board/module_x86_64/device.mk new file mode 100644 index 0000000000..9065d4b66d --- /dev/null +++ b/target/board/module_x86_64/device.mk @@ -0,0 +1,19 @@ +# +# Copyright (C) 2020 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. +# + +$(call inherit-product, build/make/target/product/bootclasspath.mk) +$(call inherit-product, build/make/target/product/core_64_bit.mk) +$(call inherit-product, build/make/target/product/languages_default.mk)