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

Commit c4624460 authored by Rashid Zaman's avatar Rashid Zaman
Browse files

Quote pattern in 'find' command used to generate modules.load



When a kernel module archive is specified via
BOARD_*_KERNEL_MODULES_ARCHIVE an unquoted wildcard pattern in the
'find' command used to find modules to add to modules.load can result
in a build failure due to shell expansion. Fix this by quoting the
pattern so that kernel modules in $ANDROID_BUILD_TOP don't cause
unexpected build failures.

Bug: 289887845
Test: Define BOARD_VENDOR_KERNEL_MODULES_ARCHIVE for
aosp_cf_x86_64_phone, touch foo.ko &&
lunch aosp_cf_x86_64_phone-userdebug && m succeeds.

Change-Id: I8122afc6bbbb5df6e3b11922b2be38129addeda0
Signed-off-by: default avatarRashid Zaman <rashidz@meta.com>
parent 235662f1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -412,7 +412,7 @@ $(3)/$(DEPMOD_STAGING_SUBDIR)/modules.dep: $(1) $(6)
	  unzip -qoDD -d $$(PRIVATE_MODULE_DIR) $$(PRIVATE_MODULE_ARCHIVE); \
	  mkdir -p $$(PRIVATE_OUTPUT_DIR)/lib; \
	  cp -r  $(3)/$(DEPMOD_STAGING_SUBDIR)/$(2)/lib/modules $$(PRIVATE_OUTPUT_DIR)/lib/; \
	  find $$(PRIVATE_MODULE_DIR) -type f -name *.ko | xargs basename -a > $$(PRIVATE_LOAD_FILE); \
	  find $$(PRIVATE_MODULE_DIR) -type f -name '*.ko' | xargs basename -a > $$(PRIVATE_LOAD_FILE); \
	)
	$(if $(1),\
	  cp $$(PRIVATE_MODULES) $$(PRIVATE_MODULE_DIR)/; \