From 3872295deb8e2a5a5f4ba2d4a3bb631697c7c4bf Mon Sep 17 00:00:00 2001 From: Denis 'GNUtoo' Carikli Date: Mon, 28 Mar 2022 17:17:38 +0200 Subject: envsetup: Add aosp_arm-eng target In Replicant 4.2, the full-eng target is not officially supported, and we are not aware of any person who tried to build things with it before making this commit. In all Replicant versions supported by libsamsung-ipc, the device repositories are hardcoding which libsamsung-ipc driver to use instead of letting libsamsung-ipc auto-detect it. Since we want to write scripts to build-test range of commits of libsamsung-ipc accross several Replicant versions, it would be better to be able to rely on a single build target accross different Replicant versions. Relying on an existing device target would be a bad idea as: - We might not always be able to find a device that is supported by all the Replicant versions we want to build libsamsung-ipc on. - If for some reasons we decide to not build part of the code in libsamsung-ipc, the same mechanism used to hardcode the libsamsung-ipc driver will probably be used to select what parts to build and not to build. As asop_arm-eng is already present in Replicant 6.0 and Replicant 11, it is a good idea to also expose a target with the same name. Signed-off-by: Denis 'GNUtoo' Carikli --- envsetup.sh | 1 + target/board/aosp_arm/AndroidBoard.mk | 1 + target/board/aosp_arm/BoardConfig.mk | 34 +++++++++++++++++++++++++++++++++ target/board/aosp_arm/README.txt | 3 +++ target/board/aosp_arm/device.mk | 36 +++++++++++++++++++++++++++++++++++ target/board/aosp_arm/system.prop | 6 ++++++ target/product/AndroidProducts.mk | 4 +++- target/product/aosp_arm.mk | 27 ++++++++++++++++++++++++++ 8 files changed, 111 insertions(+), 1 deletion(-) create mode 100644 target/board/aosp_arm/AndroidBoard.mk create mode 100644 target/board/aosp_arm/BoardConfig.mk create mode 100644 target/board/aosp_arm/README.txt create mode 100644 target/board/aosp_arm/device.mk create mode 100644 target/board/aosp_arm/system.prop create mode 100644 target/product/aosp_arm.mk diff --git a/envsetup.sh b/envsetup.sh index e52405f13..834645526 100644 --- a/envsetup.sh +++ b/envsetup.sh @@ -465,6 +465,7 @@ add_lunch_combo full-eng add_lunch_combo full_x86-eng add_lunch_combo vbox_x86-eng add_lunch_combo full_mips-eng +add_lunch_combo aosp_arm-eng function print_lunch_menu() { diff --git a/target/board/aosp_arm/AndroidBoard.mk b/target/board/aosp_arm/AndroidBoard.mk new file mode 100644 index 000000000..7911f6105 --- /dev/null +++ b/target/board/aosp_arm/AndroidBoard.mk @@ -0,0 +1 @@ +LOCAL_PATH := $(call my-dir) diff --git a/target/board/aosp_arm/BoardConfig.mk b/target/board/aosp_arm/BoardConfig.mk new file mode 100644 index 000000000..e68d386b0 --- /dev/null +++ b/target/board/aosp_arm/BoardConfig.mk @@ -0,0 +1,34 @@ +# config.mk +# +# aosp_arm target +# + +TARGET_NO_BOOTLOADER := true +TARGET_NO_KERNEL := true + +TARGET_ARCH := arm +TARGET_ARCH_VARIANT := armv7-a +TARGET_CPU_ABI := armeabi-v7a +TARGET_CPU_ABI2 := armeabi +ARCH_ARM_HAVE_TLS_REGISTER := true + +BOARD_USES_GENERIC_AUDIO := true + +# no hardware camera +USE_CAMERA_STUB := true + +# Enable dex-preoptimization to speed up the first boot sequence +# of an SDK AVD. Note that this operation only works on Linux for now +ifeq ($(HOST_OS),linux) + ifeq ($(WITH_DEXPREOPT),) + WITH_DEXPREOPT := true + endif +endif + +# Build OpenGLES emulation guest and host libraries +BUILD_EMULATOR_OPENGL := true +BUILD_EMULATOR_OPENGL_DRIVER := true + +# Build and enable the OpenGL ES View renderer. When running on the emulator, +# the GLES renderer disables itself if host GL acceleration isn't available. +USE_OPENGL_RENDERER := true diff --git a/target/board/aosp_arm/README.txt b/target/board/aosp_arm/README.txt new file mode 100644 index 000000000..208b43f99 --- /dev/null +++ b/target/board/aosp_arm/README.txt @@ -0,0 +1,3 @@ +The "aosp_arm" product defines a non-hardware-specific target. + +Most of the Android devices (networking, phones, sound, etc) do not work. diff --git a/target/board/aosp_arm/device.mk b/target/board/aosp_arm/device.mk new file mode 100644 index 000000000..dc9e02475 --- /dev/null +++ b/target/board/aosp_arm/device.mk @@ -0,0 +1,36 @@ +# +# Copyright (C) 2009 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. +# + +# This is a build configuration for the product aspects that +# are specific to the emulator. + +LOCAL_PATH := $(call my-dir) + +PRODUCT_PROPERTY_OVERRIDES := \ + ro.ril.hsxpa=1 \ + ro.ril.gprsclass=10 \ + ro.adb.qemud=1 + +PRODUCT_COPY_FILES := \ + device/generic/goldfish/data/etc/apns-conf.xml:system/etc/apns-conf.xml \ + device/generic/goldfish/data/etc/vold.conf:system/etc/vold.conf \ + $(call add-to-product-copy-files-if-exists,development/tools/emulator/system/camera/media_profiles.xml:system/etc/media_profiles.xml) \ + $(call add-to-product-copy-files-if-exists,development/tools/emulator/system/camera/media_codecs.xml:system/etc/media_codecs.xml) \ + hardware/libhardware_legacy/audio/audio_policy.conf:system/etc/audio_policy.conf + +PRODUCT_PACKAGES := \ + audio.primary.goldfish \ + power.goldfish diff --git a/target/board/aosp_arm/system.prop b/target/board/aosp_arm/system.prop new file mode 100644 index 000000000..9a04830d7 --- /dev/null +++ b/target/board/aosp_arm/system.prop @@ -0,0 +1,6 @@ +# +# system.prop for generic aosp_arm +# + +rild.libpath=/system/lib/libreference-ril.so +rild.libargs=-d /dev/ttyS0 diff --git a/target/product/AndroidProducts.mk b/target/product/AndroidProducts.mk index 5206aa143..3d232f660 100644 --- a/target/product/AndroidProducts.mk +++ b/target/product/AndroidProducts.mk @@ -36,7 +36,8 @@ ifneq ($(TARGET_BUILD_APPS),) PRODUCT_MAKEFILES := \ $(LOCAL_DIR)/full.mk \ $(LOCAL_DIR)/full_x86.mk \ - $(LOCAL_DIR)/full_mips.mk + $(LOCAL_DIR)/full_mips.mk \ + $(LOCAL_DIR)/aosp_arm.mk else PRODUCT_MAKEFILES := \ $(LOCAL_DIR)/core.mk \ @@ -46,6 +47,7 @@ PRODUCT_MAKEFILES := \ $(LOCAL_DIR)/full.mk \ $(LOCAL_DIR)/full_x86.mk \ $(LOCAL_DIR)/full_mips.mk \ + $(LOCAL_DIR)/aosp_arm.mk \ $(LOCAL_DIR)/vbox_x86.mk \ $(LOCAL_DIR)/sdk.mk \ $(LOCAL_DIR)/sdk_x86.mk \ diff --git a/target/product/aosp_arm.mk b/target/product/aosp_arm.mk new file mode 100644 index 000000000..42324d103 --- /dev/null +++ b/target/product/aosp_arm.mk @@ -0,0 +1,27 @@ +# +# Copyright (C) 2009 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. +# + +# This is a build configuration for a full-featured build of the +# Open-Source part of the tree. It's geared toward a US-centric +# build quite specifically for the emulator, and might not be +# entirely appropriate to inherit from for on-device configurations. + +$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk) +$(call inherit-product, $(SRC_TARGET_DIR)/board/vbox_x86/device.mk) + +PRODUCT_NAME := aosp_arm +PRODUCT_DEVICE := aosp_arm +PRODUCT_MODEL := Full Android on aosp_arm -- cgit v1.2.3