Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1024d6a1 authored by Mark-PK Tsai's avatar Mark-PK Tsai
Browse files

Fix kernel module build of custom image



Correct the build-image-kernel-modules arguments then
the board can use BOARD_{CUSTOM_IMAGE}_KERNEL_MODULES
to install kernel modules.

Bug: 195888474
Change-Id: I65124acc470e7f6f701bf3c9f5481bb2d688d555
Signed-off-by: default avatarMark-PK Tsai <mark-pk.tsai@mediatek.com>
parent 3645e89d
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -57,12 +57,13 @@ $(foreach m,$(CUSTOM_IMAGE_MODULES),\
my_kernel_module_copy_files :=
my_kernel_module_copy_files :=
my_custom_image_modules_var := BOARD_$(strip $(call to-upper,$(my_custom_image_name)))_KERNEL_MODULES
my_custom_image_modules_var := BOARD_$(strip $(call to-upper,$(my_custom_image_name)))_KERNEL_MODULES
ifdef $(my_custom_image_modules_var)
ifdef $(my_custom_image_modules_var)
  my_kernel_module_copy_files += $(call build-image-kernel-modules,$(my_custom_image_modules_var),$(my_staging_dir),$(my_custom_image_name)/,$(call intermediates-dir-for,PACKAGING,depmod_$(my_custom_image_name)))
  my_kernel_module_copy_files += $(call build-image-kernel-modules,$($(my_custom_image_modules_var)),$(my_staging_dir),$(CUSTOM_IMAGE_MOUNT_POINT),$(call intermediates-dir-for,PACKAGING,depmod_$(my_custom_image_name)),$($(my_custom_image_modules_var)),modules.load,,$(call intermediates-dir-for,PACKAGING,depmod_$(my_custom_image_name)_stripped))
  my_copy_pairs += $(my_kernel_module_copy_files)
endif
endif


# Collect CUSTOM_IMAGE_COPY_FILES.
# Collect CUSTOM_IMAGE_COPY_FILES.
my_image_copy_files :=
my_image_copy_files :=
$(foreach f,$(CUSTOM_IMAGE_COPY_FILES) $(my_kernel_module_copy_files),\
$(foreach f,$(CUSTOM_IMAGE_COPY_FILES),\
  $(eval pair := $(subst :,$(space),$(f)))\
  $(eval pair := $(subst :,$(space),$(f)))\
  $(eval src := $(word 1,$(pair)))\
  $(eval src := $(word 1,$(pair)))\
  $(eval my_image_copy_files += $(src))\
  $(eval my_image_copy_files += $(src))\