device-common: Do not enable UFS in builds booting from sdcard
To simplify sdcard based testing in lab, we do not ship UFS
driver module in vendor_dlkm.img anymore. This will help in
the LKFT testing where we only need to update boot.img now
and not touch userspace images anymore.
The downside is that if we are not shipping UFS driver as a
vendor_dlkm kernel module then we can not ship it in our
build at all because if we ship UFS driver in ramdisk then
the AOSP's first_stage_init will probe UFS first and try to
mount it as the boot block device, irrespective of the
androidboot.boot_devices bootarg value.
Test: built db845c-trunk_staging-userdebug lunch target with
TARGET_SDCARD_BOOT=true and booted it from an mmc-sdcard.
Fixes: dc57023acdbd ("db845c: Enable booting from mmc-sdcard")
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Change-Id: I3002025392eb31c84459e09568944d76f20d34c8
diff --git a/device-common.mk b/device-common.mk
index 960c2ae..e144ea3 100644
--- a/device-common.mk
+++ b/device-common.mk
@@ -20,9 +20,10 @@
BOARD_DO_NOT_STRIP_VENDOR_RAMDISK_MODULES := true
BOARD_DO_NOT_STRIP_GENERIC_RAMDISK_MODULES := true
ifeq ($(TARGET_SDCARD_BOOT), true)
+ # Do not copy UFS kernel module in vendor_dlkm.img
# UFS module filename varies from ufs_qcom.ko to ufs-qcom.ko across different kernel versions
- BOARD_VENDOR_KERNEL_MODULES := $(wildcard $(TARGET_KERNEL_DIR)/ufs*qcom.ko)
- BOARD_GENERIC_RAMDISK_KERNEL_MODULES := $(filter-out $(BOARD_VENDOR_KERNEL_MODULES),$(TARGET_MODS))
+ UFS_MODULE := $(wildcard $(TARGET_KERNEL_DIR)/ufs*qcom.ko)
+ BOARD_GENERIC_RAMDISK_KERNEL_MODULES := $(filter-out $(UFS_MODULE),$(TARGET_MODS))
else ifeq ($(TARGET_USES_LMP), true)
include device/linaro/dragonboard/shared/utils/dlkm_loader/vendor.modules.list.mk
BOARD_VENDOR_KERNEL_MODULES := $(patsubst %,$(TARGET_KERNEL_DIR)/%,$(VENDOR_DLKM_KERNEL_MODULES_LIST))