include/kernel: sort autoload modules list to fix reproducible builds
[openwrt/openwrt.git] / include / kernel.mk
index 38613756c71d8d5511a72849354bf818f57043ea..3195090a0a79795bd4f629fae963c251c6c18a4b 100644 (file)
@@ -243,7 +243,7 @@ $(call KernelPackage/$(1)/config)
                                exit 1; \
                        fi; \
                  done;
-                 $(call ModuleAutoLoad,$(1),$$(1),$(filter-out 0-,$(word 1,$(AUTOLOAD))-),$(filter-out 0,$(word 2,$(AUTOLOAD))),$(wordlist 3,99,$(AUTOLOAD)))
+                 $(call ModuleAutoLoad,$(1),$$(1),$(filter-out 0-,$(word 1,$(AUTOLOAD))-),$(filter-out 0,$(word 2,$(AUTOLOAD))),$(sort $(wordlist 3,99,$(AUTOLOAD))))
                  $(call KernelPackage/$(1)/install,$$(1))
     endef
   $(if $(CONFIG_PACKAGE_kmod-$(1)),
@@ -259,7 +259,7 @@ $(call KernelPackage/$(1)/config)
   endif
   $$(eval $$(call BuildPackage,kmod-$(1)))
 
-  $$(IPKG_kmod-$(1)): $$(wildcard $$(FILES))
+  $$(IPKG_kmod-$(1)): $$(wildcard $$(call version_filter,$$(FILES)))
 
 endef