From 5e0ff33d0f8d4d4da269b4f2cf4395ffcaca1f7b Mon Sep 17 00:00:00 2001 From: Steve Muckle Date: Thu, 20 Feb 2020 10:19:06 -0800 Subject: [PATCH] do not clear output kernel module directory When using an archive to provide kernel modules, the archive is directly expanded into the output directory. The output directory is currently removed prior to that to ensure no stale modules are present if they were removed as part of a change in an incremental build. Unfortunately if kernel modules are also provided via the regular BOARD_*_KERNEL_MODULES macros, the removal of the output kernel module directory will race with the copying of kernel modules in BOARD_*_KERNEL_MODULES, resulting in some of those kernel modules not being present in the output. Kernel modules removed from BOARD_*_KERNEL_MODULES do not currently get removed from the output directory in an incremental build anyway. So in order to support using BOARD_*_KERNEL_MODULES and BOARD_*_KERNEL_MODULES_ARCHIVE conurrently, take out the removal of the output directory prior to archive expansion. Bug: 149866863 Change-Id: Ib373650ddcb0fb5782a13d68a8869a9117e42ccc --- core/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/core/Makefile b/core/Makefile index c862e97c7..33146d5d9 100644 --- a/core/Makefile +++ b/core/Makefile @@ -734,7 +734,6 @@ $(3)/$(DEPMOD_STAGING_SUBDIR)/modules.dep: $(1) $(6) $(if $(6),\ unzip -qo -d $$(PRIVATE_MODULE_DIR) $$(PRIVATE_MODULE_ARCHIVE); \ mkdir -p $$(PRIVATE_OUTPUT_DIR)/lib; \ - rm -rf $$(PRIVATE_OUTPUT_DIR)/lib/modules; \ cp -r $$(PRIVATE_MODULE_DIR) $$(PRIVATE_OUTPUT_DIR)/lib/; \ find $$(PRIVATE_MODULE_DIR) -type f -name *.ko | xargs basename -a > $$(PRIVATE_LOAD_FILE); \ )