From af3839c3456493025dd57a6ca5dcffd1a457e455 Mon Sep 17 00:00:00 2001 From: Navya Vemula Date: Wed, 31 Jul 2024 15:13:40 +0530 Subject: [PATCH] build: bazel: Enable compilation for Seraph SoC Add initial files to build Seraph with bazel. Change-Id: I5e9677c43a0a31ddec8c0808c22af7f054b8107c Signed-off-by: Navya Vemula --- arch/arm64/Kconfig.platforms | 9 +++ arch/arm64/configs/vendor/seraph_GKI.config | 4 ++ .../configs/vendor/seraph_consolidate.config | 14 ++++ build.config.msm.seraph | 33 ++++++++++ build.targets | 1 + modules.list.msm.seraph | 2 + modules.systemdlkm_blocklist.msm.seraph | 2 + modules.vendor_blocklist.msm.seraph | 65 +++++++++++++++++++ msm_platforms.bzl | 2 + seraph.bzl | 52 +++++++++++++++ target_variants.bzl | 1 + 11 files changed, 185 insertions(+) create mode 100644 arch/arm64/configs/vendor/seraph_GKI.config create mode 100644 arch/arm64/configs/vendor/seraph_consolidate.config create mode 100644 build.config.msm.seraph create mode 100644 modules.list.msm.seraph create mode 100644 modules.systemdlkm_blocklist.msm.seraph create mode 100644 modules.vendor_blocklist.msm.seraph create mode 100644 seraph.bzl diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms index d24aaf2497dd..cb891bacc422 100644 --- a/arch/arm64/Kconfig.platforms +++ b/arch/arm64/Kconfig.platforms @@ -268,6 +268,15 @@ config ARCH_NIOBE chipset. If you do not wish to build a kernel that runs on this chipset or if you are unsure, say 'N' here. +config ARCH_SERAPH + bool "Enable support for Qualcomm Technologies, Inc. Seraph" + depends on ARCH_QCOM + help + This enables support for Qualcomm Technologies, Inc. Seraph + chipset. If you do not wish to build a kernel that runs on this + chipset or if you are unsure, + say 'N' here. + config ARCH_MONACO_AUTO bool "Enable Support for Qualcomm Technologies, Inc. MONACO_AUTO" depends on ARCH_QCOM diff --git a/arch/arm64/configs/vendor/seraph_GKI.config b/arch/arm64/configs/vendor/seraph_GKI.config new file mode 100644 index 000000000000..96ca36750dce --- /dev/null +++ b/arch/arm64/configs/vendor/seraph_GKI.config @@ -0,0 +1,4 @@ +CONFIG_ARCH_QCOM=y +CONFIG_ARCH_SERAPH=y +CONFIG_LOCALVERSION="-gki" +# CONFIG_MODULE_SIG_ALL is not set diff --git a/arch/arm64/configs/vendor/seraph_consolidate.config b/arch/arm64/configs/vendor/seraph_consolidate.config new file mode 100644 index 000000000000..c555bb67b4aa --- /dev/null +++ b/arch/arm64/configs/vendor/seraph_consolidate.config @@ -0,0 +1,14 @@ +CONFIG_ATOMIC64_SELFTEST=m +CONFIG_CMA_DEBUG=y +CONFIG_CMA_DEBUGFS=y +CONFIG_DEBUG_PAGEALLOC=y +CONFIG_DEBUG_PAGEALLOC_ENABLE_DEFAULT=y +CONFIG_DEBUG_SPINLOCK=y +CONFIG_DETECT_HUNG_TASK=y +CONFIG_LKDTM=m +CONFIG_LOCALVERSION="-consolidate" +CONFIG_LOCK_TORTURE_TEST=m +CONFIG_PAGE_OWNER=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_RUNTIME_TESTING_MENU=y +CONFIG_TEST_USER_COPY=m diff --git a/build.config.msm.seraph b/build.config.msm.seraph new file mode 100644 index 000000000000..ab9adc2330b0 --- /dev/null +++ b/build.config.msm.seraph @@ -0,0 +1,33 @@ +################################################################################ +## Inheriting configs from ACK +. ${ROOT_DIR}/msm-kernel/build.config.common +. ${ROOT_DIR}/msm-kernel/build.config.aarch64 + +################################################################################ +## Variant setup +MSM_ARCH=seraph +VARIANTS=(consolidate gki) +[ -z "${VARIANT}" ] && VARIANT=consolidate + +ABL_SRC=bootable/bootloader/edk2 +BOOT_IMAGE_HEADER_VERSION=4 +BASE_ADDRESS=0x80000000 +PAGE_SIZE=4096 +BUILD_VENDOR_DLKM=1 +PREPARE_SYSTEM_DLKM=1 +SYSTEM_DLKM_MODULES_LIST=${ROOT_DIR}/${KERNEL_DIR}/android/gki_system_dlkm_modules +SUPER_IMAGE_SIZE=0x10000000 +TRIM_UNUSED_MODULES=1 +BUILD_INIT_BOOT_IMG=1 +[ -z "${DT_OVERLAY_SUPPORT}" ] && DT_OVERLAY_SUPPORT=1 + +if [ "${KERNEL_CMDLINE_CONSOLE_AUTO}" != "0" ]; then + KERNEL_VENDOR_CMDLINE+='console=ttyMSM0,115200n8 earlycon' +fi + +KERNEL_VENDOR_CMDLINE+=' bootconfig ' + +################################################################################ +## Inheriting MSM configs +. ${KERNEL_DIR}/build.config.msm.common +. ${KERNEL_DIR}/build.config.msm.gki diff --git a/build.targets b/build.targets index e7fc99f9fff3..60d6a4389d3e 100644 --- a/build.targets +++ b/build.targets @@ -3,6 +3,7 @@ build.config.msm.autoghgvm build.config.msm.pineapple build.config.msm.anorak build.config.msm.niobe +build.config.msm.seraph build.config.msm.kalama build.config.msm.pineapple.vm build.config.msm.kalama.vm diff --git a/modules.list.msm.seraph b/modules.list.msm.seraph new file mode 100644 index 000000000000..5f22fd052ba6 --- /dev/null +++ b/modules.list.msm.seraph @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: GPL-2.0-only +# Copyright (c) 2024, Qualcomm Innovation Center, Inc. All rights reserved. diff --git a/modules.systemdlkm_blocklist.msm.seraph b/modules.systemdlkm_blocklist.msm.seraph new file mode 100644 index 000000000000..5f22fd052ba6 --- /dev/null +++ b/modules.systemdlkm_blocklist.msm.seraph @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: GPL-2.0-only +# Copyright (c) 2024, Qualcomm Innovation Center, Inc. All rights reserved. diff --git a/modules.vendor_blocklist.msm.seraph b/modules.vendor_blocklist.msm.seraph new file mode 100644 index 000000000000..c1ea82573d9d --- /dev/null +++ b/modules.vendor_blocklist.msm.seraph @@ -0,0 +1,65 @@ +# SPDX-License-Identifier: GPL-2.0-only +# Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved. + +blocklist 8250_of +blocklist adc-tm +blocklist atomic64_test +blocklist can-bcm +blocklist can-gw +blocklist can-raw +blocklist dummy-cpufreq +blocklist dummy_hcd +blocklist dummy_hcd +blocklist e4000 +blocklist failover +blocklist fc0011 +blocklist fc0012 +blocklist fc0013 +blocklist fc2580 +blocklist it913x +blocklist kheaders +blocklist limits_stat +blocklist lkdtm +blocklist llcc_perfmon +blocklist locktorture +blocklist m88rs6000t +blocklist max2165 +blocklist mc44s803 +blocklist mmrm_test_module +blocklist msi001 +blocklist mt2060 +blocklist mt2063 +blocklist mt20xx +blocklist mt2131 +blocklist mt2266 +blocklist mxl301rf +blocklist net_failover +blocklist qca_cld3_kiwi +blocklist qm1d1b0004 +blocklist qm1d1c0042 +blocklist qt1010 +blocklist r820t +blocklist rcutorture +blocklist rtc-test +blocklist si2157 +blocklist tda18212 +blocklist tda18218 +blocklist tda18250 +blocklist tda18271 +blocklist tda827x +blocklist tda8290 +blocklist tda9887 +blocklist tea5761 +blocklist tea5767 +blocklist test_user_copy +blocklist torture +blocklist tua9001 +blocklist tuner-simple +blocklist tuner-types +blocklist tuner-xc2028 +blocklist vmw_vsock_virtio_transport +blocklist vmw_vsock_virtio_transport_common +blocklist vsock +blocklist vsock_diag +blocklist xc4000 +blocklist xc5000 diff --git a/msm_platforms.bzl b/msm_platforms.bzl index 5f52e19c379b..517c21a67aa9 100644 --- a/msm_platforms.bzl +++ b/msm_platforms.bzl @@ -6,6 +6,7 @@ load(":gen4auto_lxc.bzl", "define_gen4auto_lxc") load(":sdmsteppeauto.bzl", "define_sdmsteppeauto") load(":pineapple.bzl", "define_pineapple") load(":niobe.bzl", "define_niobe") +load(":seraph.bzl", "define_seraph") load(":pineapple_tuivm.bzl", "define_pineapple_tuivm") load(":pineapple_oemvm.bzl", "define_pineapple_oemvm") load(":pineapple_vms.bzl", "define_pineapple_vms") @@ -28,6 +29,7 @@ def define_msm_platforms(): define_sdmsteppeauto() define_pineapple() define_niobe() + define_seraph() define_pineapple_tuivm() define_pineapple_oemvm() define_pineapple_allyes() diff --git a/seraph.bzl b/seraph.bzl new file mode 100644 index 000000000000..5f1e2ec93d8f --- /dev/null +++ b/seraph.bzl @@ -0,0 +1,52 @@ +load(":target_variants.bzl", "la_variants") +load(":msm_kernel_la.bzl", "define_msm_la") +load(":image_opts.bzl", "boot_image_opts") + +target_name = "seraph" + +def define_seraph(): + _seraph_in_tree_modules = [ + # keep sorted + # TODO: Need to add GKI modules + ] + + _seraph_consolidate_in_tree_modules = _seraph_in_tree_modules + [ + # keep sorted + "drivers/misc/lkdtm/lkdtm.ko", + "kernel/locking/locktorture.ko", + "kernel/rcu/rcutorture.ko", + "kernel/torture.ko", + "lib/atomic64_test.ko", + "lib/test_user_copy.ko", + ] + + kernel_vendor_cmdline_extras = [ + # do not sort + "console=ttyMSM0,115200n8", + "qcom_geni_serial.con_enabled=1", + "bootconfig", + ] + + board_kernel_cmdline_extras = [] + board_bootconfig_extras = [] + + for variant in la_variants: + if variant == "consolidate": + mod_list = _seraph_consolidate_in_tree_modules + else: + mod_list = _seraph_in_tree_modules + board_kernel_cmdline_extras += ["nosoftlockup"] + kernel_vendor_cmdline_extras += ["nosoftlockup"] + board_bootconfig_extras += ["androidboot.console=0"] + + define_msm_la( + msm_target = target_name, + variant = variant, + in_tree_module_list = mod_list, + boot_image_opts = boot_image_opts( + earlycon_addr = "qcom_geni,0x00884000", + kernel_vendor_cmdline_extras = kernel_vendor_cmdline_extras, + board_kernel_cmdline_extras = board_kernel_cmdline_extras, + board_bootconfig_extras = board_bootconfig_extras, + ), + ) diff --git a/target_variants.bzl b/target_variants.bzl index 1b5644c46507..c38817de6f60 100644 --- a/target_variants.bzl +++ b/target_variants.bzl @@ -8,6 +8,7 @@ la_targets = [ "pineapple", "pitti", "sdmsteppeauto", + "seraph", ] la_variants = [