sm6225-common: Initial common configuration
Change-Id: I0adf216d82eca438a4d2c76349439c46830c08e9
diff --git a/Android.bp b/Android.bp
new file mode 100644
index 0000000..9f8333c
--- /dev/null
+++ b/Android.bp
@@ -0,0 +1,7 @@
+//
+// Copyright (C) 2025 The LineageOS Project
+// SPDX-License-Identifier: Apache-2.0
+//
+
+soong_namespace {
+}
diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk
new file mode 100644
index 0000000..508639c
--- /dev/null
+++ b/BoardConfigCommon.mk
@@ -0,0 +1,31 @@
+#
+# Copyright (C) 2025 The LineageOS Project
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+
+# Inherit the proprietary files
+include vendor/xiaomi/sm6225-common/BoardConfigVendor.mk
+
+COMMON_PATH := device/xiaomi/sm6225-common
+
+# Architecture
+TARGET_ARCH := arm64
+TARGET_ARCH_VARIANT := armv8-a
+TARGET_CPU_ABI := arm64-v8a
+TARGET_CPU_ABI2 :=
+TARGET_CPU_VARIANT := generic
+
+# Bootloader
+TARGET_BOOTLOADER_BOARD_NAME := bengal
+TARGET_NO_BOOTLOADER := true
+
+# Hardware
+BOARD_USES_QCOM_HARDWARE := true
+
+# Platform
+TARGET_BOARD_PLATFORM := bengal
+TARGET_BOARD_SUFFIX := _515
+
+# Inherit the proprietary files
+include vendor/xiaomi/sm6225-common/BoardConfigVendor.mk
diff --git a/common.mk b/common.mk
new file mode 100644
index 0000000..4f49cea
--- /dev/null
+++ b/common.mk
@@ -0,0 +1,23 @@
+#
+# Copyright (C) 2025 The LineageOS Project
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+
+# Enable project quotas and casefolding for emulated storage without sdcardfs
+$(call inherit-product, $(SRC_TARGET_DIR)/product/emulated_storage.mk)
+
+# Installs gsi keys into ramdisk, to boot a GSI with verified boot.
+$(call inherit-product, $(SRC_TARGET_DIR)/product/developer_gsi_keys.mk)
+
+# Enforce generic ramdisk allow list
+$(call inherit-product, $(SRC_TARGET_DIR)/product/generic_ramdisk.mk)
+
+# Setup dalvik vm configs
+$(call inherit-product, frameworks/native/build/phone-xhdpi-6144-dalvik-heap.mk)
+
+# A/B
+$(call inherit-product, $(SRC_TARGET_DIR)/product/virtual_ab_ota/launch_with_vendor_ramdisk.mk)
+
+# Inherit from vendor blobs
+$(call inherit-product, vendor/xiaomi/sm6225-common/sm6225-common-vendor.mk)
diff --git a/extract-files.py b/extract-files.py
new file mode 100755
index 0000000..93b821b
--- /dev/null
+++ b/extract-files.py
@@ -0,0 +1,47 @@
+#!/usr/bin/env -S PYTHONPATH=../../../tools/extract-utils python3
+#
+# SPDX-FileCopyrightText: 2024 The LineageOS Project
+# SPDX-License-Identifier: Apache-2.0
+#
+
+from extract_utils.fixups_blob import (
+ blob_fixup,
+ blob_fixups_user_type,
+)
+from extract_utils.fixups_lib import (
+ lib_fixup_remove,
+ lib_fixups,
+ lib_fixups_user_type,
+)
+from extract_utils.main import (
+ ExtractUtils,
+ ExtractUtilsModule,
+)
+
+namespace_imports = [
+ 'device/xiaomi/sm6225-common',
+]
+
+
+def lib_fixup_vendor_suffix(lib: str, partition: str, *args, **kwargs):
+ return f'{lib}_{partition}' if partition == 'vendor' else None
+
+
+lib_fixups: lib_fixups_user_type = {
+ **lib_fixups,
+}
+
+blob_fixups: blob_fixups_user_type = {
+} # fmt: skip
+
+module = ExtractUtilsModule(
+ 'sm6225-common',
+ 'xiaomi',
+ blob_fixups=blob_fixups,
+ lib_fixups=lib_fixups,
+ namespace_imports=namespace_imports,
+)
+
+if __name__ == '__main__':
+ utils = ExtractUtils.device(module)
+ utils.run()
diff --git a/proprietary-files.txt b/proprietary-files.txt
new file mode 100644
index 0000000..2d9cfb1
--- /dev/null
+++ b/proprietary-files.txt
@@ -0,0 +1 @@
+# TODO: Bringup proprietary files listing
diff --git a/setup-makefiles.py b/setup-makefiles.py
new file mode 100755
index 0000000..32947cf
--- /dev/null
+++ b/setup-makefiles.py
@@ -0,0 +1 @@
+#!./extract-files.py --regenerate_makefiles