summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Collingbourne <pcc@google.com>2022-02-02 11:25:06 -0800
committerPeter Collingbourne <pcc@google.com>2022-02-18 20:03:12 -0800
commitc7a8d59d894f572da1a519970897c2a99d120523 (patch)
tree1ccb8fdf62aba0f8fe44d53890ea7cbf7ff47103
parente8b96e36869eae7f4bef8d6616429ad0c0d92d74 (diff)
Create a mini configuration for the dragonboards.
The goal of the mini configuration is to define a device configuration with minimal driver dependencies. The only strict requirements are storage (UFS) and USB which provides an ADB connection. This also implies software crypto for userdata because drivers for the hardware crypto engine are not necessarily available. This allows for development of low level pieces of the stack such as the kernel and libc on hardware which does not have a full set of drivers available in the mainline kernel. Currently this implies no zygote because of a lack of support for headless mode. This limits the amount of testing possible but if this becomes possible in the future we could add the zygote to the mini configuration. To show what this would look like for existing devices, add db845c_mini and rb5_mini targets. Bug: 217455793 Tested: db845c and db845c_mini boot tested, rb5 and rb5_mini build tested Change-Id: I8f8b467a4dfad68f6e2e53954b5944c6155de782
-rw-r--r--AndroidProducts.mk2
-rw-r--r--build/tasks/kernel.mk2
-rw-r--r--db845c_mini.mk7
-rw-r--r--mini-manifest.xml2
-rw-r--r--mini.mk44
-rw-r--r--rb5_mini.mk7
6 files changed, 63 insertions, 1 deletions
diff --git a/AndroidProducts.mk b/AndroidProducts.mk
index 3982277..485438f 100644
--- a/AndroidProducts.mk
+++ b/AndroidProducts.mk
@@ -11,7 +11,9 @@
PRODUCT_MAKEFILES := \
$(LOCAL_DIR)/db845c.mk \
+ $(LOCAL_DIR)/db845c_mini.mk \
$(LOCAL_DIR)/rb5.mk \
+ $(LOCAL_DIR)/rb5_mini.mk \
COMMON_LUNCH_CHOICES := \
db845c-userdebug \
diff --git a/build/tasks/kernel.mk b/build/tasks/kernel.mk
index a16c54f..7723dc3 100644
--- a/build/tasks/kernel.mk
+++ b/build/tasks/kernel.mk
@@ -1,4 +1,4 @@
-ifneq ($(filter db845c, $(TARGET_DEVICE)),)
+ifneq ($(filter db845c db845c_mini, $(TARGET_DEVICE)),)
$(PRODUCT_OUT)/dtb.img: $(TARGET_KERNEL_DIR)/sdm845-db845c.dtb $(wildcard $(TARGET_KERNEL_DIR)/qrb5165-rb5.dtb)
cat $^ > $@
diff --git a/db845c_mini.mk b/db845c_mini.mk
new file mode 100644
index 0000000..01ff129
--- /dev/null
+++ b/db845c_mini.mk
@@ -0,0 +1,7 @@
+$(call inherit-product, device/linaro/dragonboard/mini.mk)
+$(call inherit-product, device/linaro/dragonboard/db845c/device.mk)
+
+# Product overrides
+PRODUCT_NAME := db845c_mini
+PRODUCT_DEVICE := db845c
+PRODUCT_BRAND := Android
diff --git a/mini-manifest.xml b/mini-manifest.xml
new file mode 100644
index 0000000..6d93a06
--- /dev/null
+++ b/mini-manifest.xml
@@ -0,0 +1,2 @@
+<manifest version="1.0" type="device" target-level="4">
+</manifest>
diff --git a/mini.mk b/mini.mk
new file mode 100644
index 0000000..eb2d366
--- /dev/null
+++ b/mini.mk
@@ -0,0 +1,44 @@
+#
+# Copyright (C) 2022 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, $(SRC_TARGET_DIR)/product/core_no_zygote.mk)
+$(call inherit-product, device/generic/goldfish/minimal_system.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/runtime_libart.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/updatable_apex.mk)
+
+PRODUCT_PACKAGES += \
+ android.hardware.keymaster@4.1-service \
+ android.hidl.allocator@1.0-service \
+ android.system.suspend@1.0-service \
+ com.android.i18n \
+ com.android.runtime \
+ keystore2 \
+ init_vendor \
+ libstatshidl \
+ mediaserver \
+ selinux_policy_nonsystem \
+ system_compatibility_matrix.xml \
+ system_manifest.xml \
+ tune2fs \
+ vdc \
+ vendor_compatibility_matrix.xml \
+ vendor_manifest.xml \
+
+# Disable vintf manifest checking. The mini targets do not have the usual
+# set of hardware interfaces, some of which are required by the vintf
+# compatibility matrix.
+PRODUCT_ENFORCE_VINTF_MANIFEST_OVERRIDE := false
+DEVICE_MANIFEST_FILE := device/linaro/dragonboard/mini-manifest.xml
diff --git a/rb5_mini.mk b/rb5_mini.mk
new file mode 100644
index 0000000..302e217
--- /dev/null
+++ b/rb5_mini.mk
@@ -0,0 +1,7 @@
+$(call inherit-product, device/linaro/dragonboard/mini.mk)
+$(call inherit-product, device/linaro/dragonboard/rb5/device.mk)
+
+# Product overrides
+PRODUCT_NAME := rb5_mini
+PRODUCT_DEVICE := rb5
+PRODUCT_BRAND := Android