Author: jogo
Date: 2015-07-05 23:31:34 +0200 (Sun, 05 Jul 2015)
New Revision: 46182

Modified:
   trunk/include/kernel.mk
Log:
kernel: assume modules.builtin is always present

We do not support old kernel versions not generating modules.builtin
anymore, so assume it will always be present and check for modules
to be built in first.

This prevents old modules being packages up after changing the kernel
config to include them in the kernel without cleaning the kernel tree.

Signed-off-by: Jonas Gorski <[email protected]>

Modified: trunk/include/kernel.mk
===================================================================
--- trunk/include/kernel.mk     2015-07-05 11:28:46 UTC (rev 46181)
+++ trunk/include/kernel.mk     2015-07-05 21:31:34 UTC (rev 46182)
@@ -181,18 +181,14 @@
     ifneq ($(if $(SDK),$(filter-out $(LINUX_DIR)/%.ko,$(FILES)),$(strip 
$(FILES))),)
       define Package/kmod-$(1)/install
                  @for mod in $$(call version_filter,$$(FILES)); do \
-                       if [ -e $$$$$$$$mod ]; then \
+                       if grep -q "$$$$$$$${mod##$(LINUX_DIR)/}" 
"$(LINUX_DIR)/modules.builtin"; then \
+                               echo "NOTICE: module '$$$$$$$$mod' is 
built-in."; \
+                       elif [ -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." >&2; \
-                                       exit 1; \
-                               fi; \
                        else \
-                               echo "WARNING: module '$$$$$$$$mod' missing and 
modules.builtin not available, assuming built-in." >&2; \
+                               echo "ERROR: module '$$$$$$$$mod' is missing." 
>&2; \
+                               exit 1; \
                        fi; \
                  done;
                  $(call ModuleAutoLoad,$(1),$$(1),$(AUTOLOAD))
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to