dlkm_loader: Enable vendor_dlkm partition support
Enable vendor_dlkm partition support on DB845c target build.
It will help us load kernel modules from vendor_dlkm
partition using dlkm_loader service at boot time.
Also changed system_dlkm partition from ext4 to erofs to
maintain consistency across all the "read-only" partitions.
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Change-Id: I761e256f7ac630048ceacb7034c02f943553728d
diff --git a/db845c/BoardConfig.mk b/db845c/BoardConfig.mk
index ed58313..1d00b6c 100644
--- a/db845c/BoardConfig.mk
+++ b/db845c/BoardConfig.mk
@@ -48,8 +48,11 @@
BOARD_DB_DYNAMIC_PARTITIONS_SIZE := 12433031168 # Reserve 4M for DAP metadata
BOARD_SUPER_PARTITION_METADATA_DEVICE := super
BOARD_SUPER_IMAGE_IN_UPDATE_PACKAGE := true
-# dlkm partition
+BOARD_DB_DYNAMIC_PARTITIONS_PARTITION_LIST := system vendor system_ext product
+
+# dlkm partitions
include device/linaro/dragonboard/shared/utils/dlkm_loader/BoardConfig.mk
+BOARD_DB_DYNAMIC_PARTITIONS_PARTITION_LIST += system_dlkm vendor_dlkm
BOARD_SEPOLICY_DIRS += device/linaro/dragonboard/shared/utils/dlkm_loader/sepolicy/
# Graphics
diff --git a/fstab.common b/fstab.common
index 17994ca..cde33c2 100644
--- a/fstab.common
+++ b/fstab.common
@@ -9,4 +9,5 @@
vendor /vendor erofs ro wait,logical,first_stage_mount,slotselect
system_ext /system_ext erofs ro wait,logical,first_stage_mount,slotselect
product /product erofs ro wait,logical,first_stage_mount,slotselect
-system_dlkm /system_dlkm ext4 ro wait,logical,first_stage_mount,slotselect
+system_dlkm /system_dlkm erofs ro wait,logical,first_stage_mount,slotselect
+vendor_dlkm /vendor_dlkm erofs ro wait,logical,first_stage_mount,slotselect
diff --git a/shared/utils/dlkm_loader/BoardConfig.mk b/shared/utils/dlkm_loader/BoardConfig.mk
index 9851776..3028b37 100644
--- a/shared/utils/dlkm_loader/BoardConfig.mk
+++ b/shared/utils/dlkm_loader/BoardConfig.mk
@@ -1,5 +1,7 @@
# system_dlkm partition
BOARD_USES_SYSTEM_DLKMIMAGE := true
-BOARD_SYSTEM_DLKMIMAGE_FILE_SYSTEM_TYPE := ext4 # system_dlkm.img prebuilt from ci.android.com is ext4
+BOARD_SYSTEM_DLKMIMAGE_FILE_SYSTEM_TYPE := erofs
TARGET_COPY_OUT_SYSTEM_DLKM := system_dlkm
-BOARD_DB_DYNAMIC_PARTITIONS_PARTITION_LIST := system vendor system_ext product system_dlkm
+BOARD_USES_VENDOR_DLKMIMAGE := true
+BOARD_VENDOR_DLKMIMAGE_FILE_SYSTEM_TYPE := erofs
+TARGET_COPY_OUT_VENDOR_DLKM := vendor_dlkm
diff --git a/shared/utils/dlkm_loader/device.mk b/shared/utils/dlkm_loader/device.mk
index c1ba32e..57b951f 100644
--- a/shared/utils/dlkm_loader/device.mk
+++ b/shared/utils/dlkm_loader/device.mk
@@ -1,4 +1,4 @@
-AB_OTA_PARTITIONS += system_dlkm
+AB_OTA_PARTITIONS += system_dlkm vendor_dlkm
PRODUCT_PACKAGES += dlkm_loader
# List of modules that should not load automatically