Add variant configuration for tinysys

Bug: 252874047
Test: compiling with CHRE_VARIANT_MK_INCLUDES set to
      variant/tinysys/variant.mk
Change-Id: Ic0dde40c4797dd9804762587bc796ef008073cd7
diff --git a/variant/tinysys/static_nanoapps.cc b/variant/tinysys/static_nanoapps.cc
new file mode 100644
index 0000000..0f7eccf
--- /dev/null
+++ b/variant/tinysys/static_nanoapps.cc
@@ -0,0 +1,41 @@
+/*
+ * 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.
+ */
+
+#include "chre/core/static_nanoapps.h"
+#include "chre/apps/apps.h"
+#include "chre/util/macros.h"
+
+namespace chre {
+
+//! The default list of static nanoapps to load.
+const StaticNanoappInitFunction kStaticNanoappList[] = {
+    //  initializeStaticNanoappAudioWorld,
+    //  initializeStaticNanoappDebugDumpWorld,
+    //  initializeStaticNanoappGnssWorld,
+    //  initializeStaticNanoappHelloWorld,
+    //  initializeStaticNanoappMessageWorld,
+    //  initializeStaticNanoappSensorWorld,
+    //  initializeStaticNanoappSpammer,
+    //  initializeStaticNanoappTimerWorld,
+    //  initializeStaticNanoappUnloadTester,
+    //  initializeStaticNanoappWifiWorld,
+    //  initializeStaticNanoappWwanWorld,
+};
+
+//! The size of the default static nanoapp list.
+const size_t kStaticNanoappCount = ARRAY_SIZE(kStaticNanoappList);
+
+}  // namespace chre
diff --git a/variant/tinysys/variant.mk b/variant/tinysys/variant.mk
new file mode 100644
index 0000000..e6199bb
--- /dev/null
+++ b/variant/tinysys/variant.mk
@@ -0,0 +1,41 @@
+
+ifeq ($(ANDROID_BUILD_TOP),)
+$(error "You should supply an ANDROID_BUILD_TOP environment variable \
+         containing a path to the Android source tree. This is typically \
+         provided by initializing the Android build environment.")
+endif
+
+# Variant Prefix ###############################################################
+
+VARIANT_PREFIX = $(ANDROID_BUILD_TOP)/system/chre/variant
+
+# Chre Version String ##########################################################
+
+COMMIT_HASH_COMMAND = git describe --always --long --dirty
+COMMIT_HASH = $(shell $(COMMIT_HASH_COMMAND))
+
+COMMON_CFLAGS += -DCHRE_VERSION_STRING="\"chre=tinysys@$(COMMIT_HASH)\""
+
+# Common Compiler Flags ########################################################
+
+# Supply a symbol to indicate that the build variant supplies the static
+# nanoapp list.
+COMMON_CFLAGS += -DCHRE_VARIANT_SUPPLIES_STATIC_NANOAPP_LIST
+
+# CHRE event count #############################################################
+
+TINYSYS_CFLAGS += -DCHRE_MAX_EVENT_COUNT=128
+TINYSYS_CFLAGS += -DCHRE_MAX_UNSCHEDULED_EVENT_COUNT=128
+
+# Optional Features ############################################################
+
+CHRE_AUDIO_SUPPORT_ENABLED = false
+CHRE_GNSS_SUPPORT_ENABLED = false
+CHRE_SENSORS_SUPPORT_ENABLED = false
+CHRE_WIFI_SUPPORT_ENABLED = false
+CHRE_WWAN_SUPPORT_ENABLED = false
+CHRE_BLE_SUPPORT_ENABLED = false
+
+# Common Source Files ##########################################################
+
+COMMON_SRCS += $(VARIANT_PREFIX)/tinysys/static_nanoapps.cc