summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUsama Arif <usama.arif@arm.com>2020-08-26 10:48:19 +0100
committerTushar Khandelwal <tushar.khandelwal@arm.com>2020-09-04 11:50:19 +0100
commita4a3af1593bff7c2d35c6d47881877c126671f17 (patch)
tree4c9f531ef81c0956bc354c29b21993b3356604d8
parentf63c8703f7983e3507702282da7ed0eb2fd4a910 (diff)
tc0: cleanup device profile
- Dont check android version as only android 10 is supported. - Remove version.mk. - Remove unused make variables and comments. Change-Id: Ie677b82ebd1ea7399ba8afd954f2e6cbea46224b Signed-off-by: Usama Arif <usama.arif@arm.com>
-rw-r--r--tc0/BoardConfig-partitions.mk11
-rw-r--r--tc0/BoardConfig_common.mk14
-rw-r--r--tc0/device.mk9
-rw-r--r--tc0/init.common.rc22
-rw-r--r--tc0/nano_art_minimal.mk16
-rw-r--r--tc0/nano_core.mk51
-rw-r--r--tc0/tc0_nano.mk2
-rw-r--r--tc0/tc0_swr.mk30
-rw-r--r--tc0/ueventd.common.rc3
-rw-r--r--tc0/utils.mk30
-rw-r--r--tc0/version.mk66
11 files changed, 12 insertions, 242 deletions
diff --git a/tc0/BoardConfig-partitions.mk b/tc0/BoardConfig-partitions.mk
index 11fb88e..79f2d85 100644
--- a/tc0/BoardConfig-partitions.mk
+++ b/tc0/BoardConfig-partitions.mk
@@ -14,15 +14,10 @@
# limitations under the License.
#
-include device/arm/tc0/version.mk
-
TARGET_USERIMAGES_USE_EXT4 := true
# We need normal images, not sparse images.
TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true
-ifneq ($(call arm-platform-min-level, 10),)
-# Arm platform support level >= 10
-
# See https://source.android.com/devices/bootloader/system-as-root
BOARD_BUILD_SYSTEM_ROOT_IMAGE := false
BOARD_USES_RECOVERY_AS_BOOT := false
@@ -35,11 +30,7 @@ BOARD_USES_RECOVERY_AS_BOOT := false
BOARD_USES_OEMIMAGE := true
BOARD_OEMIMAGE_FILE_SYSTEM_TYPE := ext4
-endif
-
-# Choose smaller partition sizes for nanodroid builds, which is essential for
-# some fsram platforms due to time of uploading to RAM and also amount of RAM
-# used
+# Choose smaller partition sizes for nanodroid builds.
ifeq (,$(filter %_nano, $(TARGET_PRODUCT)))
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1342177280 # 1.25 GB
BOARD_USERDATAIMAGE_PARTITION_SIZE := 576716800 # 550 MB
diff --git a/tc0/BoardConfig_common.mk b/tc0/BoardConfig_common.mk
index a54f5b1..5509018 100644
--- a/tc0/BoardConfig_common.mk
+++ b/tc0/BoardConfig_common.mk
@@ -33,17 +33,3 @@ endif
# Include configuration of partitions.
include device/arm/tc0/BoardConfig-partitions.mk
-
-# Some platforms need to refer to paths under $(PRODUCT_OUT) in their
-# BoardConfig.mk.
-# Unfortunately, at this point, this variable isn't defined yet (it is defined
-# just after in build/core/envsetup.mk).
-# We cannot use $(ANDROID_PRODUCT_OUT) (exported by envsetup.sh) from Android 9
-# onwards either, see:
-# https://android.googlesource.com/platform/build/+/28142690/Changes.md#deprecating-obsoleting-envsetup_sh-variables-in-makefiles
-# We do however have access to all the variables making up $(PRODUCT_OUT) in
-# BoardConfig.mk, so let's define it locally.
-local_product_out := $(OUT_DIR)/target/product/$(TARGET_DEVICE)
-
-# Enable MTE if it is available in code and in the device.
-TARGET_EXPERIMENTAL_MTE := true
diff --git a/tc0/device.mk b/tc0/device.mk
index fd3cbd4..dd83b28 100644
--- a/tc0/device.mk
+++ b/tc0/device.mk
@@ -14,11 +14,6 @@
# limitations under the License.
#
-include $(LOCAL_PATH)/utils.mk
-
PRODUCT_COPY_FILES += \
- $(call arm-fstab-copy, $(LOCAL_PATH)/fstab.total_compute, fstab.total_compute)
-
-# FVP-specific tools
-PRODUCT_PACKAGES += \
- toggle_mti
+ $(LOCAL_PATH)/fstab.total_compute:$(TARGET_COPY_OUT_RAMDISK)/fstab.total_compute \
+ $(LOCAL_PATH)/fstab.total_compute:$(TARGET_COPY_OUT_ROOT)/fstab.total_compute
diff --git a/tc0/init.common.rc b/tc0/init.common.rc
index b347c4a..e45fa18 100644
--- a/tc0/init.common.rc
+++ b/tc0/init.common.rc
@@ -20,30 +20,8 @@ on early-init
on fs
mount_all /fstab.${ro.hardware}
-on post-fs-data
- # When zygote is not started (Nanodroid), the arm64 subfolder will not be
- # created, which will make dex2oat unhappy when trying to compile a .dex
- # file.
- mkdir /data/dalvik-cache/arm64 0711 root root
- setprop vold.post_fs_data_done 1
-
on post-fs
- mount rootfs rootfs / rw remount
- mkdir /mnt 0775 root system
- mkdir /storage 0755 system system
-
setprop sys.usb.config adb
- # adjust devices permissions
- chmod 0666 /dev/ump
- chmod 0666 /dev/ion
- chmod 0666 /dev/graphics/fb0
write /sys/class/vtconsole/vtcon0/bind 0
write /sys/class/vtconsole/vtcon1/bind 0
-
-on boot
- # Disable the bootanimation to speed things up.
- # Bootanimation is a GLES1.x program and is not supported by GGA and
- # therefore must be disabled for fvp targets. This doesn't affect other
- # targets.
- setprop debug.sf.nobootanimation 1
diff --git a/tc0/nano_art_minimal.mk b/tc0/nano_art_minimal.mk
index 291f546..a284a44 100644
--- a/tc0/nano_art_minimal.mk
+++ b/tc0/nano_art_minimal.mk
@@ -14,25 +14,9 @@
# limitations under the License.
#
-include $(LOCAL_PATH)/version.mk
-
# A drastically stripped down version of build/target/product/runtime_libart.mk,
# providing the bare minimum for running simple Java programs with ART.
-ifeq ($(call arm-platform-min-level, 10),)
-# Arm platform support level < 10
-
-# These packages depend on libc, libm, etc.
-# In Android-10 such libraries are prohibited to be put on /system.
-# Instead, these packages are included in com.android.runtime APEX.
-PRODUCT_PACKAGES += \
- dex2oat \
- dalvikvm \
- libjavacore \
- libopenjdk
-
-endif
-
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
dalvik.vm.image-dex2oat-Xms=64m \
dalvik.vm.image-dex2oat-Xmx=64m \
diff --git a/tc0/nano_core.mk b/tc0/nano_core.mk
index 6c3de2a..275884f 100644
--- a/tc0/nano_core.mk
+++ b/tc0/nano_core.mk
@@ -14,24 +14,13 @@
# limitations under the License.
#
-include $(LOCAL_PATH)/version.mk
-
# This is based on build/target/product/embedded.mk, with an even smaller
# set of dependencies.
PRODUCT_COPY_FILES += \
- $(LOCAL_PATH)/init.common.rc:root/init.common.rc
-
-# Virtually none of the platforms can reliably generate enough entropy for the
-# crng pool to be always ready before some process makes a blocking getrandom()
-# call. Since we are not really concerned about the amount of entropy provided
-# by getrandom(), let's always include the crng_init service to initialise the
-# crng pool early enough.
-PRODUCT_PACKAGES += \
- crng_init
+ $(LOCAL_PATH)/init.common.rc:root/init.common.rc \
+ $(LOCAL_PATH)/ueventd.common.rc:root/ueventd.common.rc
-ifneq ($(call arm-platform-min-level, 10),)
-# Arm platform support level >= 10
# https://source.android.com/devices/tech/ota/apex#configuring_system_to_support_apex_updates
$(call inherit-product, $(SRC_TARGET_DIR)/product/updatable_apex.mk)
@@ -40,7 +29,6 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/updatable_apex.mk)
# https://source.android.com/devices/tech/ota/dynamic_partitions/implement#adb-remount
PRODUCT_USE_DYNAMIC_PARTITIONS := false
-endif
# bionic
PRODUCT_PACKAGES += \
libstdc++ \
@@ -88,21 +76,8 @@ PRODUCT_PACKAGES += \
# SELinux packages
PRODUCT_PACKAGES += \
- nonplat_mac_permissions.xml \
- nonplat_property_contexts \
- nonplat_seapp_contexts \
- nonplat_service_contexts \
- nonplat_hwservice_contexts \
- plat_mac_permissions.xml \
- plat_property_contexts \
- plat_seapp_contexts \
- plat_service_contexts \
- plat_hwservice_contexts \
- selinux_policy \
- vndservice_contexts
-
-ifneq ($(call arm-platform-min-level, 10),)
-# Arm platform support level >= 10
+ selinux_policy_nonsystem \
+ selinux_policy_system
# First and second stage inits.
PRODUCT_PACKAGES += \
@@ -125,16 +100,6 @@ PRODUCT_HOST_PACKAGES += \
adb \
fastboot
-else
-# Arm platform support level < 10
-
-# Required host packages
-PRODUCT_PACKAGES += \
- adb \
- fastboot
-
-endif
-
# Ensure that this property is always defined so that bionic_systrace.cpp
# can rely on it being initially set by init.
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
@@ -162,14 +127,6 @@ TARGET_SUPPORTS_64_BIT_APPS := true
# Never build test modules, as they pull a huge number of dependencies.
ANDROID_NO_TEST_CHECK := true
-# Save some time by not checking the SDK API (there is no point in doing that
-# in a nano build where the whole API is not even guaranteed to work, and this
-# step takes quite a long time as it can't be sped up by CCache).
-WITHOUT_CHECK_API := true
-
-# Use our hack in build/core/main.mk: we want to be able to build
-# userdebug/eng variants without building modules tagged as debug or eng.
-ANDROID_NO_TAGGED_MODULE := true
# Don't use the precollected boot image profile for generating boot image
PRODUCT_USE_PROFILE_FOR_BOOT_IMAGE := false
diff --git a/tc0/tc0_nano.mk b/tc0/tc0_nano.mk
index 42074ca..848e1bb 100644
--- a/tc0/tc0_nano.mk
+++ b/tc0/tc0_nano.mk
@@ -14,8 +14,6 @@
# limitations under the License.
#
-include $(LOCAL_PATH)/version.mk
-
$(call inherit-product, $(LOCAL_PATH)/nano_core.mk)
$(call inherit-product, $(LOCAL_PATH)/nano_art_minimal.mk)
$(call inherit-product, $(LOCAL_PATH)/device.mk)
diff --git a/tc0/tc0_swr.mk b/tc0/tc0_swr.mk
index a273acd..6a611b2 100644
--- a/tc0/tc0_swr.mk
+++ b/tc0/tc0_swr.mk
@@ -14,9 +14,6 @@
# limitations under the License.
#
-include $(LOCAL_PATH)/version.mk
-include $(LOCAL_PATH)/utils.mk
-
$(call inherit-product, $(LOCAL_PATH)/device.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk)
@@ -26,10 +23,6 @@ PRODUCT_MANUFACTURER := Arm
PRODUCT_DEVICE := tc0_swr
PRODUCT_MODEL := Total Compute Fast Model (S/W rendering build)
-# FVP-specific tools
-PRODUCT_PACKAGES += \
- toggle_mti
-
DEVICE_MANIFEST_FILE := $(LOCAL_PATH)/tc0_swr/manifest.xml
PRODUCT_PACKAGES += \
@@ -100,9 +93,6 @@ MULTILIB_BUILD := true
# See https://source.android.com/devices/tech/dalvik/configure
WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY := false
-ifneq ($(call arm-platform-min-level, 10),)
-# Arm platform support level >= 10
-
# https://source.android.com/devices/tech/ota/apex#configuring_system_to_support_apex_updates
$(call inherit-product, $(SRC_TARGET_DIR)/product/updatable_apex.mk)
@@ -110,18 +100,14 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/updatable_apex.mk)
# https://source.android.com/devices/tech/ota/dynamic_partitions/implement#adb-remount
PRODUCT_USE_DYNAMIC_PARTITIONS := false
-endif
-
PRODUCT_COPY_FILES += \
- $(LOCAL_PATH)/init.common.rc:root/init.common.rc
+ $(LOCAL_PATH)/init.common.rc:root/init.common.rc \
+ $(LOCAL_PATH)/ueventd.common.rc:root/ueventd.common.rc
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/tc0_swr/init.tc0_swr.rc:root/init.total_compute.rc
PRODUCT_PACKAGES += \
- crng_init
-
-PRODUCT_PACKAGES += \
libEGL_swiftshader \
libGLESv1_CM_swiftshader \
libGLESv2_swiftshader
@@ -132,15 +118,3 @@ PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
PRODUCT_REQUIRES_INSECURE_EXECMEM_FOR_SWIFTSHADER := true
-ifneq ($(call arm-platform-min-level, 10),)
-# Arm platform support level >= 10
-
-# Not important but let's be correct.
-# See https://source.android.com/devices/graphics/implement-opengl-es#driver_emun
-# debug.hwui prperties are defined in frameworks/base/libs/hwui/Properties.h
-PRODUCT_PROPERTY_OVERRIDES += \
- debug.hwui.use_buffer_age=false \
- debug.hwui.use_partial_updates=false \
- debug.hwui.skip_empty_damage=false
-
-endif
diff --git a/tc0/ueventd.common.rc b/tc0/ueventd.common.rc
new file mode 100644
index 0000000..0494c9f
--- /dev/null
+++ b/tc0/ueventd.common.rc
@@ -0,0 +1,3 @@
+/dev/ump 0666 system system
+/dev/ion 0666 system system
+/dev/graphics/fb0 0666 system system
diff --git a/tc0/utils.mk b/tc0/utils.mk
deleted file mode 100644
index 70433c0..0000000
--- a/tc0/utils.mk
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# Copyright (C) 2019 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.
-#
-
-include $(LOCAL_PATH)/version.mk
-
-# Copies an fstab file to the correct location(s) depending on Android version.
-# Parameters:
-# $1: Path to source fstab file.
-# $2: Destination name of fstab file.
-# Version-specific behavior:
-# - Android 10: copies $(1) to root/$(2) and ramdisk/$(2)
-# - Android 9: copies $(1) to root/$(2)
-define arm-fstab-copy
-$(if $(call arm-platform-min-level,10), \
- $(strip $(1)):$(TARGET_COPY_OUT_RAMDISK)/$(strip $(2)),) \
-$(strip $(1)):$(TARGET_COPY_OUT_ROOT)/$(strip $(2))
-endef
diff --git a/tc0/version.mk b/tc0/version.mk
deleted file mode 100644
index ae21e3e..0000000
--- a/tc0/version.mk
+++ /dev/null
@@ -1,66 +0,0 @@
-#
-# Copyright (C) 2019 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.
-#
-
-# Find out the current support level required.
-# This is the major nmber of the platform version.
-# Only release versions are recognized, e.g. 10, 9.0, 8.1.0.
-ARM_PLATFORM_SUPPORT_LEVEL := $(word 1, $(subst ., ,$(PLATFORM_VERSION)))
-
-# The fallback platform support level if PLATFORM_VERSION is not recognized.
-# For example, if building master the platform version is an uppercase letter.
-ARM_PLATFORM_FALLBACK_SUPPORT_LEVEL := 10
-
-# If platform support level is not recognized then use the fallback level.
-ifneq ($(shell [ $(ARM_PLATFORM_SUPPORT_LEVEL) -eq $(ARM_PLATFORM_SUPPORT_LEVEL) ] 2>/dev/null && echo "true"), true)
- # Print warning only once during build.
- ifndef ARM_PLATFORM_SUPPORT_LEVEL_CHECKED
- $(shell echo -e "\e[1;33mWARNING:\e[0m \
- Platform support level $(ARM_PLATFORM_SUPPORT_LEVEL) is not recognized. \
- Falling back to platform level $(ARM_PLATFORM_FALLBACK_SUPPORT_LEVEL)." >&2)
- ARM_PLATFORM_SUPPORT_LEVEL_CHECKED := true
- endif
- # Above we want to warn only once but since ARM_PLATFORM_SUPPORT_LEVEL is
- # always set at line 20 we need to always override it here.
- ARM_PLATFORM_SUPPORT_LEVEL := $(ARM_PLATFORM_FALLBACK_SUPPORT_LEVEL)
-endif
-
-# Returns "true" if the current platform support level is $1, otherwise an
-# empty string is returned.
-# Parameters:
-# $1: Platform support level to check for.
-define arm-platform-level
-$(shell [ $(ARM_PLATFORM_SUPPORT_LEVEL) -eq $(1) ] && echo "true")
-endef
-
-# Returns "true" if the current platform support level is $1 or greater,
-# otherwise an empty string is returned.
-# Parameters:
-# $1: Minimum platform support level to check for.
-define arm-platform-min-level
-$(shell [ $(ARM_PLATFORM_SUPPORT_LEVEL) -ge $(1) ] && echo "true")
-endef
-
-# Example to use version helper functions
-
-# ifneq ($(call arm-platform-min-level, 12),)
-# Match for platform version 12 and newer.
-# else ifneq ($(call arm-platform-min-level, 10),)
-# Match for platform version 10 and newer. Matches 11 and 10 in this case.
-# else ifneq ($(call arm-platform-level, 9),)
-# Match for platform version 9 only.
-# else
-# Match for platform versions other than 12 and newer, 10 and 9 in this case.
-# endif