forked from openkylin/platform_build
move module list creation outside conditionals
Currently the two special-case calls to create just a module load list (as opposed to copying a set of modules and creating a module load list) are inside checks that the related board macro for the module set is not empty. While it would be incorrect to create a non-empty module load list with an empty set of modules, this error would quickly surface at runtime. More importantly, moving these out will permit refactoring this code to clean it up. Bug: 157645635 Change-Id: I199788d49072d4c59737b3ef2c75546852cf3e36 Merged-In: I199788d49072d4c59737b3ef2c75546852cf3e36
This commit is contained in:
parent
708435b557
commit
2319129a88
|
@ -834,26 +834,26 @@ ifneq ($(strip $(BOARD_GENERIC_RAMDISK_KERNEL_MODULES)),)
|
|||
endif
|
||||
|
||||
ifneq ($(strip $(BOARD_RECOVERY_KERNEL_MODULES))$(strip $(BOARD_RECOVERY_KERNEL_MODULES_ARCHIVE)),)
|
||||
ifeq ($(BOARD_USES_RECOVERY_AS_BOOT), true)
|
||||
ifdef BOARD_GENERIC_RAMDISK_KERNEL_MODULES_LOAD
|
||||
ALL_DEFAULT_INSTALLED_MODULES += $(call copy-many-files,$(call module-load-list-copy-paths,$(call intermediates-dir-for,PACKAGING,ramdisk_modules),$(BOARD_GENERIC_RAMDISK_KERNEL_MODULES),$(BOARD_GENERIC_RAMDISK_KERNEL_MODULES_LOAD),modules.load,$(TARGET_RECOVERY_ROOT_OUT)))
|
||||
endif
|
||||
endif
|
||||
ALL_DEFAULT_INSTALLED_MODULES += $(call copy-many-files,$(call build-image-kernel-modules,$(BOARD_RECOVERY_KERNEL_MODULES),$(TARGET_RECOVERY_ROOT_OUT),,$(call intermediates-dir-for,PACKAGING,depmod_recovery),$(BOARD_RECOVERY_KERNEL_MODULES_LOAD),modules.load.recovery,$(BOARD_RECOVERY_KERNEL_MODULES_ARCHIVE),))
|
||||
endif
|
||||
ifeq ($(BOARD_USES_RECOVERY_AS_BOOT), true)
|
||||
ifdef BOARD_GENERIC_RAMDISK_KERNEL_MODULES_LOAD
|
||||
ALL_DEFAULT_INSTALLED_MODULES += $(call copy-many-files,$(call module-load-list-copy-paths,$(call intermediates-dir-for,PACKAGING,ramdisk_modules),$(BOARD_GENERIC_RAMDISK_KERNEL_MODULES),$(BOARD_GENERIC_RAMDISK_KERNEL_MODULES_LOAD),modules.load,$(TARGET_RECOVERY_ROOT_OUT)))
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(strip $(BOARD_VENDOR_RAMDISK_KERNEL_MODULES))$(strip $(BOARD_VENDOR_RAMDISK_KERNEL_MODULES_ARCHIVE)),)
|
||||
ifeq ($(BOARD_VENDOR_RAMDISK_KERNEL_MODULES_LOAD),)
|
||||
BOARD_VENDOR_RAMDISK_KERNEL_MODULES_LOAD := $(BOARD_VENDOR_RAMDISK_KERNEL_MODULES)
|
||||
endif
|
||||
ALL_DEFAULT_INSTALLED_MODULES += $(call copy-many-files,$(call build-image-kernel-modules,$(BOARD_VENDOR_RAMDISK_KERNEL_MODULES),$(TARGET_VENDOR_RAMDISK_OUT),,$(call intermediates-dir-for,PACKAGING,depmod_vendor_ramdisk),$(BOARD_VENDOR_RAMDISK_KERNEL_MODULES_LOAD),modules.load,$(BOARD_VENDOR_RAMDISK_KERNEL_MODULES_ARCHIVE),$(call intermediates-dir-for,PACKAGING,depmod_vendor_ramdisk_stripped)))
|
||||
ifneq (,$(BOARD_VENDOR_RAMDISK_RECOVERY_KERNEL_MODULES_LOAD))
|
||||
# BOARD_VENDOR_RAMDISK_KERNEL_MODULES must be the full set, or super set,
|
||||
# of copied modules represented by BOARD_VENDOR_RAMDISK_KERNEL_MODULES_LOAD
|
||||
# and BOARD_VENDOR_RAMDISK_RECOVERY_KERNEL_MODULES_LOAD which are mined
|
||||
# from modules.load which will contain relative paths, represent load order.
|
||||
ALL_DEFAULT_INSTALLED_MODULES += $(call copy-many-files,$(call module-load-list-copy-paths,$(call intermediates-dir-for,PACKAGING,depmod_vendor_recovery_ramdisk),$(BOARD_VENDOR_RAMDISK_KERNEL_MODULES),$(BOARD_VENDOR_RAMDISK_RECOVERY_KERNEL_MODULES_LOAD),modules.load.recovery,$(TARGET_VENDOR_RAMDISK_OUT)))
|
||||
endif
|
||||
endif
|
||||
ifneq (,$(BOARD_VENDOR_RAMDISK_RECOVERY_KERNEL_MODULES_LOAD))
|
||||
# BOARD_VENDOR_RAMDISK_KERNEL_MODULES must be the full set, or super set,
|
||||
# of copied modules represented by BOARD_VENDOR_RAMDISK_KERNEL_MODULES_LOAD
|
||||
# and BOARD_VENDOR_RAMDISK_RECOVERY_KERNEL_MODULES_LOAD which are mined
|
||||
# from modules.load which will contain relative paths, represent load order.
|
||||
ALL_DEFAULT_INSTALLED_MODULES += $(call copy-many-files,$(call module-load-list-copy-paths,$(call intermediates-dir-for,PACKAGING,depmod_vendor_recovery_ramdisk),$(BOARD_VENDOR_RAMDISK_KERNEL_MODULES),$(BOARD_VENDOR_RAMDISK_RECOVERY_KERNEL_MODULES_LOAD),modules.load.recovery,$(TARGET_VENDOR_RAMDISK_OUT)))
|
||||
endif
|
||||
|
||||
ifneq ($(BOARD_USES_RECOVERY_AS_BOOT), true)
|
||||
|
|
Loading…
Reference in New Issue