X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/378a89660ea7f2c85a6e3a765898872788a838d1..15a81dae2ac4c0b4af17937969eb8799cceeddb2:/include/kernel.mk diff --git a/include/kernel.mk b/include/kernel.mk index 9e94dce3b..1af072d6b 100644 --- a/include/kernel.mk +++ b/include/kernel.mk @@ -90,7 +90,8 @@ define ModuleAutoLoad done; \ if [ -e $(2)/etc/modules.d/$$$$$$$$priority-$(1) ]; then \ if [ "$$$$$$$$boot" = "1" ]; then \ - echo '# May be required for rootfs' >> $(2)/etc/modules.d/$$$$$$$$priority-$(1); \ + mkdir -p $(2)/etc/modules-boot.d; \ + ln -s ../modules.d/$$$$$$$$priority-$(1) $(2)/etc/modules-boot.d/; \ fi; \ modules="$$$$$$$${modules:+$$$$$$$$modules }$$$$$$$$priority-$(1)"; \ fi; \ @@ -156,8 +157,15 @@ $(call KernelPackage/$(1)/config) if [ -e $$$$$$$$mod ]; then \ mkdir -p $$(1)/$(MODULES_SUBDIR) ; \ $(CP) -L $$$$$$$$mod $$(1)/$(MODULES_SUBDIR)/ ; \ + elif [ -e "$(LINUX_DIR)/modules.builtin" ]; then \ + if grep -q "$$$$$$$${mod##$(LINUX_DIR)/}" "$(LINUX_DIR)/modules.builtin"; then \ + echo "NOTICE: module '$$$$$$$$mod' is built-in."; \ + else \ + echo "ERROR: module '$$$$$$$$mod' is missing."; \ + exit 1; \ + fi; \ else \ - echo "WARNING: module '$$$$$$$$mod' does not exist, is it built-in?" ; \ + echo "WARNING: module '$$$$$$$$mod' missing and modules.builtin not available, assuming built-in."; \ fi; \ done; $(call ModuleAutoLoad,$(1),$$(1),$(AUTOLOAD))