From d921c96ffdfe5a15fba39252759a720b2724f7d4 Mon Sep 17 00:00:00 2001 From: Arian Date: Sat, 20 Jan 2024 14:13:43 +0100 Subject: [PATCH] sm8450-common: Configure kernel build Change-Id: I478751631d78ce70f2032ad376ef017bfed39f78 --- BoardConfigCommon.mk | 68 +++++++++++ modules.list.second_stage | 232 ++++++++++++++++++++++++++++++++++++++ modules.list.vendor_dlkm | 54 +++++++++ 3 files changed, 354 insertions(+) create mode 100644 modules.list.second_stage create mode 100644 modules.list.vendor_dlkm diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk index 26b340b..ed285ce 100644 --- a/BoardConfigCommon.mk +++ b/BoardConfigCommon.mk @@ -76,6 +76,74 @@ NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3 # Filesystem TARGET_FS_CONFIG_GEN := $(COMMON_PATH)/configs/config.fs +# Kernel +BOARD_INCLUDE_DTB_IN_BOOTIMG := true +BOARD_RAMDISK_USE_LZ4 := true +BOARD_USES_GENERIC_KERNEL_IMAGE := true +BOARD_USES_QCOM_MERGE_DTBS_SCRIPT := true +TARGET_NEEDS_DTBOIMAGE := true + +BOARD_KERNEL_BASE := 0x00000000 +BOARD_KERNEL_PAGESIZE := 4096 +BOARD_KERNEL_IMAGE_NAME := Image + +TARGET_KERNEL_ADDITIONAL_FLAGS := TARGET_PRODUCT=$(PRODUCT_DEVICE) +TARGET_KERNEL_SOURCE := kernel/xiaomi/sm8450 +TARGET_KERNEL_CONFIG := \ + gki_defconfig \ + vendor/waipio_GKI.config \ + vendor/xiaomi_GKI.config \ + vendor/$(PRODUCT_DEVICE)_GKI.config + +BOARD_BOOT_HEADER_VERSION := 4 +BOARD_MKBOOTIMG_ARGS := --header_version $(BOARD_BOOT_HEADER_VERSION) + +BOARD_VENDOR_RAMDISK_FRAGMENTS := dlkm +BOARD_VENDOR_RAMDISK_FRAGMENT.dlkm.KERNEL_MODULE_DIRS := top + +BOARD_KERNEL_CMDLINE := \ + video=vfb:640x400,bpp=32,memsize=3072000 \ + disable_dma32=on \ + mtdoops.fingerprint=$(LINEAGE_VERSION) +BOARD_BOOTCONFIG := \ + androidboot.hardware=qcom \ + androidboot.memcg=1 \ + androidboot.usbcontroller=a600000.dwc3 + +# Kernel modules +first_stage_modules := $(strip $(shell cat $(TARGET_KERNEL_SOURCE)/modules.list.msm.waipio)) +second_stage_modules := $(strip $(shell cat $(COMMON_PATH)/modules.list.second_stage)) +vendor_dlkm_exclusive_modules := $(strip $(shell cat $(COMMON_PATH)/modules.list.vendor_dlkm)) + +BOARD_VENDOR_RAMDISK_KERNEL_MODULES_LOAD := $(first_stage_modules) +BOARD_VENDOR_RAMDISK_RECOVERY_KERNEL_MODULES_LOAD := $(first_stage_modules) $(second_stage_modules) +BOARD_VENDOR_KERNEL_MODULES_LOAD := $(second_stage_modules) $(vendor_dlkm_exclusive_modules) + +BOOT_KERNEL_MODULES := $(first_stage_modules) $(second_stage_modules) + +BOARD_VENDOR_KERNEL_MODULES_BLOCKLIST_FILE := $(TARGET_KERNEL_SOURCE)/modules.vendor_blocklist.msm.waipio +BOARD_VENDOR_RAMDISK_KERNEL_MODULES_BLOCKLIST_FILE := $(BOARD_VENDOR_KERNEL_MODULES_BLOCKLIST_FILE) + +TARGET_KERNEL_EXT_MODULE_ROOT := kernel/xiaomi/sm8450-modules +TARGET_KERNEL_EXT_MODULES := \ + qcom/opensource/mmrm-driver \ + qcom/opensource/audio-kernel \ + qcom/opensource/camera-kernel \ + qcom/opensource/cvp-kernel \ + qcom/opensource/dataipa/drivers/platform/msm \ + qcom/opensource/datarmnet/core \ + qcom/opensource/datarmnet-ext/aps \ + qcom/opensource/datarmnet-ext/offload \ + qcom/opensource/datarmnet-ext/shs \ + qcom/opensource/datarmnet-ext/perf \ + qcom/opensource/datarmnet-ext/perf_tether \ + qcom/opensource/datarmnet-ext/sch \ + qcom/opensource/datarmnet-ext/wlan \ + qcom/opensource/display-drivers/msm \ + qcom/opensource/eva-kernel \ + qcom/opensource/video-driver \ + qcom/opensource/wlan/qcacld-3.0/.qca6490 + # Metadata BOARD_USES_METADATA_PARTITION := true diff --git a/modules.list.second_stage b/modules.list.second_stage new file mode 100644 index 0000000..df2597f --- /dev/null +++ b/modules.list.second_stage @@ -0,0 +1,232 @@ +msm_sysstats.ko +zsmalloc.ko +lzo.ko +lzo-rle.ko +msm_show_resume_irq.ko +mhi_cntrl_qcom.ko +mhi.ko +mhi_dev_uci.ko +mhi_dev_netdev.ko +mhi_dev_dtr.ko +phy-qcom-ufs-qmp-v4-lahaina.ko +phy-qcom-ufs-qmp-v4-parrot.ko +phy-qcom-ufs-qmp-v4-anarok.ko +phy-qcom-ufs-qmp-v3.ko +phy-qcom-ufs-qmp-14nm.ko +pinctrl-spmi-gpio.ko +pinctrl-spmi-mpp.ko +pwm-qti-lpg.ko +pci-msm-drv.ko +camcc-waipio.ko +camcc-diwali.ko +debugcc-diwali.ko +videocc-waipio.ko +gpucc-waipio.ko +debugcc-waipio.ko +gpucc-diwali.ko +videocc-diwali.ko +bam_dma.ko +gpi.ko +pci-edma.ko +qcom_cpuss_sleep_stats.ko +mdt_loader.ko +cdsp-loader.ko +qcom_ramdump.ko +pdr_interface.ko +qmi_helpers.ko +heap_mem_ext_v01.ko +msm_memshare.ko +boot_stats.ko +smp2p.ko +subsystem_sleep_stats.ko +adsp_sleepmon.ko +sysmon_subsystem_stats.ko +qsee_ipc_irq_bridge.ko +core_hang_detect.ko +soc_sleep_stats.ko +rq_stats.ko +dcc_v2.ko +smcinvoke_mod.ko +microdump_collector.ko +llcc_perfmon.ko +smp2p_sleepstate.ko +sensors_ssc.ko +glink_pkt.ko +glink_probe.ko +pmic_glink.ko +qti_battery_debug.ko +charger-ulog-glink.ko +altmode-glink.ko +pmic-pon-log.ko +msm_performance.ko +qpnp-pbs.ko +cdsprm.ko +fsa4480-i2c.ko +msm_show_epoch.ko +eud.ko +guestvm_loader.ko +hyp_core_ctl.ko +qbt_handler.ko +qcom_soc_wdt.ko +sys_pm_vx.ko +msm_ext_display.ko +icnss2.ko +rimps_log.ko +plh_scmi.ko +gplaf_scmi.ko +shared_rail_scmi.ko +qdss_bridge.ko +memlat.ko +qcom_logbuf_vendor_hooks.ko +panel_event_notifier.ko +qcom_sync_file.ko +hung_task_enh.ko +qfprom-sys.ko +qpnp-amoled-regulator.ko +hvc_gunyah.ko +msm_rng.ko +frpc-adsprpc.ko +rdbg.ko +qcom_iommu_debug.ko +lt9611uxc.ko +msm_kgsl.ko +zram.ko +hdcp.ko +qseecom-mod.ko +wl2866d.ko +qcom-i2c-pmic.ko +sg.ko +spi-msm-geni.ko +spmi-pmic-arb-debug.ko +spmi-glink-debug.ko +cnss2.ko +cnss_utils.ko +wlan_firmware_service.ko +cnss_plat_ipc_qmi_svc.ko +cnss_nl.ko +cnss_prealloc.ko +asix.ko +ax88179_178a.ko +msm_sharedmem.ko +phy-qcom-emu.ko +phy-msm-ssusb-qmp.ko +phy-msm-snps-hs.ko +phy-msm-snps-eusb2.ko +dwc3-msm.ko +ehset.ko +lvstest.ko +usb_f_diag.ko +usb_f_qdss.ko +usb_f_ccid.ko +usb_f_cdev.ko +usb_f_gsi.ko +f_fs_ipc_log.ko +ucsi_glink.ko +repeater.ko +repeater-i2c-eusb2.ko +redriver.ko +nb7vpq904m.ko +atmel_mxt_ts.ko +focaltech_fts.ko +synaptics_dsx.ko +xiaomi_touch.ko +nt36xxx-i2c.ko +nt36xxx-spi.ko +goodix_core.ko +pm8941-pwrkey.ko +qcom-hv-haptics.ko +goodix_fod.ko +i2c-msm-geni.ko +i3c-master-msm-geni.ko +ir-spi.ko +qcom_ipc_lite.ko +synx-driver.ko +radio-i2c-rtc6226-qca.ko +qcom-pon.ko +qti_battery_charger_main.ko +qcom-spmi-temp-alarm.ko +qti-adc-tm.ko +qti_qmi_sensor_v2.ko +qti_qmi_cdev.ko +bcl_soc.ko +msm_lmh_dcvs.ko +cpu_voltage_cooling.ko +policy_engine.ko +sdpm_clk.ko +ddr_cdev.ko +qti_userspace_cdev.ko +qti_cpufreq_cdev.ko +qti_devfreq_cdev.ko +btpower.ko +bt_fm_slim.ko +qcom_edac.ko +qcom-cpufreq-hw-debug.ko +qcom_lpm.ko +sdhci-msm.ko +leds-qti-flash.ko +leds-qti-tri-led.ko +leds-qpnp-vibrator-ldo.ko +plh_vendor.ko +gplaf_vendor.ko +shared_rail_vendor.ko +tz_log.ko +qce50.ko +qcedev-mod.ko +ipa_fmwk.ko +usb_bam.ko +sps_drv.ko +ep_pcie_drv.ko +mhi_dev_drv.ko +mhi_dev_net.ko +qcom_pil_info.ko +rproc_qcom_common.ko +qcom_q6v5.ko +qcom_q6v5_pas.ko +qcom_esoc.ko +qcom_sysmon.ko +qcom_glink.ko +qcom_glink_smem.ko +qcom_smd.ko +gh_irq_lend.ko +gh_mem_notifier.ko +gh_virtio_backend.ko +qcom-spmi-adc5.ko +qcom-vadc-common.ko +nvmem_qfprom.ko +icc-test.ko +qnoc-parrot.ko +ofpart.ko +chipreg.ko +block2mtd.ko +mtd.ko +mtd_blkdevs.ko +mtdblock.ko +mtdoops.ko +slimbus.ko +slim-qcom-ngd-ctrl.ko +hwmon.ko +qti_amoled_ecm.ko +coresight.ko +coresight-tmc.ko +coresight-funnel.ko +coresight-replicator.ko +coresight-stm.ko +coresight-cti.ko +coresight-tpda.ko +coresight-tpdm.ko +coresight-csr.ko +coresight-dummy.ko +coresight-remote-etm.ko +coresight-tgu.ko +coresight-hwevent.ko +stm_core.ko +stm_p_basic.ko +stm_p_ost.ko +stm_console.ko +stm_ftrace.ko +snd-usb-audio-qmi.ko +qrtr-smd.ko +qrtr-mhi.ko +qrtr-gunyah.ko +msm_drm.ko +msm-mmrm.ko diff --git a/modules.list.vendor_dlkm b/modules.list.vendor_dlkm new file mode 100644 index 0000000..5f96008 --- /dev/null +++ b/modules.list.vendor_dlkm @@ -0,0 +1,54 @@ +q6_notifier_dlkm.ko +spf_core_dlkm.ko +audpkt_ion_dlkm.ko +gpr_dlkm.ko +audio_pkt_dlkm.ko +q6_dlkm.ko +adsp_loader_dlkm.ko +audio_prm_dlkm.ko +q6_pdr_dlkm.ko +pinctrl_lpi_dlkm.ko +swr_dlkm.ko +swr_ctrl_dlkm.ko +snd_event_dlkm.ko +wcd_core_dlkm.ko +mbhc_dlkm.ko +swr_dmic_dlkm.ko +wcd9xxx_dlkm.ko +swr_haptics_dlkm.ko +stub_dlkm.ko +machine_dlkm.ko +lpass_cdc_wsa2_macro_dlkm.ko +lpass_cdc_wsa_macro_dlkm.ko +lpass_cdc_va_macro_dlkm.ko +lpass_cdc_rx_macro_dlkm.ko +lpass_cdc_tx_macro_dlkm.ko +lpass_cdc_dlkm.ko +wsa883x_dlkm.ko +wcd938x_dlkm.ko +wcd938x_slave_dlkm.ko +cs35l43_dlkm.ko +aw882xx_dlkm.ko +wcd937x_dlkm.ko +wcd937x_slave_dlkm.ko +hdmi_dlkm.ko +camera.ko +cameralog.ko +msm-cvp.ko +gsim.ko +ipam.ko +ipanetm.ko +rndisipam.ko +ipa_clientsm.ko +rmnet_offload.ko +rmnet_perf_tether.ko +rmnet_perf.ko +rmnet_shs.ko +rmnet_wlan.ko +rmnet_aps.ko +rmnet_sch.ko +rmnet_core.ko +rmnet_ctl.ko +msm-eva.ko +msm_video.ko +qca_cld3_qca6490.ko