sm8350-common: Replace Android.mk modules copy with BOOT_KERNEL_MODULES

Hacky copy rules were prone to fail because of some kind of race
condition.

Change-Id: I30d50a9dd87de9d57a583968f9936b84ac16cfca
This commit is contained in:
LuK1337 2022-03-25 20:58:27 +01:00
parent 4e0ca25a66
commit ef4792c2db
2 changed files with 1 additions and 13 deletions

View file

@ -96,18 +96,5 @@ $(WIFI_FIRMWARE_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
$(hide) ln -sf /vendor/etc/wifi/WCNSS_qcom_cfg.ini $@/WCNSS_qcom_cfg.ini $(hide) ln -sf /vendor/etc/wifi/WCNSS_qcom_cfg.ini $@/WCNSS_qcom_cfg.ini
$(hide) ln -sf /mnt/vendor/persist/wlan_mac.bin $@/wlan_mac.bin $(hide) ln -sf /mnt/vendor/persist/wlan_mac.bin $@/wlan_mac.bin
VENDOR_RAMDISK_KERNEL_MODULES := $(addprefix $(TARGET_VENDOR_RAMDISK_OUT)/lib/modules/,$(shell cat device/oneplus/sm8350-common/modules.load.recovery))
INSTALLED_KERNEL_TARGET := $(PRODUCT_OUT)/kernel
INTERNAL_VENDOR_RAMDISK_TARGET := $(call intermediates-dir-for,PACKAGING,vendor_boot)/vendor_ramdisk.cpio.gz
$(VENDOR_RAMDISK_KERNEL_MODULES): $(INSTALLED_KERNEL_TARGET)
@echo "Copying kernel modules to vendor ramdisk: $@"
@mkdir -p $(dir $@)
cp $(@F:%=$(TARGET_OUT_VENDOR_DLKM)/lib/modules/%) $(TARGET_VENDOR_RAMDISK_OUT)/lib/modules/
cp $(TARGET_OUT_VENDOR_DLKM)/lib/modules/modules.dep $(TARGET_VENDOR_RAMDISK_OUT)/lib/modules/
sed -i "s/\/vendor_dlkm//g" $(TARGET_VENDOR_RAMDISK_OUT)/lib/modules/modules.dep
$(INTERNAL_VENDOR_RAMDISK_TARGET): $(VENDOR_RAMDISK_KERNEL_MODULES)
ALL_DEFAULT_INSTALLED_MODULES += $(RFS_MSM_ADSP_SYMLINKS) $(RFS_MSM_CDSP_SYMLINKS) $(RFS_MSM_MPSS_SYMLINKS) $(RFS_MSM_SLPI_SYMLINKS) $(WIFI_FIRMWARE_SYMLINKS) ALL_DEFAULT_INSTALLED_MODULES += $(RFS_MSM_ADSP_SYMLINKS) $(RFS_MSM_CDSP_SYMLINKS) $(RFS_MSM_MPSS_SYMLINKS) $(RFS_MSM_SLPI_SYMLINKS) $(WIFI_FIRMWARE_SYMLINKS)
endif endif

View file

@ -55,6 +55,7 @@ TARGET_KERNEL_CONFIG := vendor/lahaina-qgki_defconfig
# Kernel modules # Kernel modules
BOARD_VENDOR_KERNEL_MODULES_LOAD := $(strip $(shell cat $(COMMON_PATH)/modules.load)) BOARD_VENDOR_KERNEL_MODULES_LOAD := $(strip $(shell cat $(COMMON_PATH)/modules.load))
BOARD_VENDOR_RAMDISK_RECOVERY_KERNEL_MODULES_LOAD := $(strip $(shell cat $(COMMON_PATH)/modules.load.recovery)) BOARD_VENDOR_RAMDISK_RECOVERY_KERNEL_MODULES_LOAD := $(strip $(shell cat $(COMMON_PATH)/modules.load.recovery))
BOOT_KERNEL_MODULES := $(BOARD_VENDOR_RAMDISK_RECOVERY_KERNEL_MODULES_LOAD)
# Platform # Platform
BOARD_USES_QCOM_HARDWARE := true BOARD_USES_QCOM_HARDWARE := true