export modules=; \
probe_module() { \
local mods="$$$$$$$$1"; \
+ params="$$$$$$$$3"; \
local boot="$$$$$$$$2"; \
local mod; \
- shift 2; \
+ shift 3; \
for mod in $$$$$$$$mods; do \
mkdir -p $(2)/etc/modules.d; \
- echo "$$$$$$$$mod" >> $(2)/etc/modules.d/$(1); \
+ if [ -n "$$$$$$$$params" ]; then \
+ echo "$$$$$$$$mod $$$$$$$$params" >> $(2)/etc/modules.d/$(1); \
+ else \
+ echo "$$$$$$$$mod" >> $(2)/etc/modules.d/$(1); \
+ fi; \
done; \
if [ -e $(2)/etc/modules.d/$(1) ]; then \
if [ "$$$$$$$$boot" = "1" -a ! -e $(2)/etc/modules-boot.d/$(1) ]; then \
local priority="$$$$$$$$1"; \
local mods="$$$$$$$$2"; \
local boot="$$$$$$$$3"; \
+ params="$$$$$$$$4"; \
local mod; \
- shift 3; \
+ shift 4; \
for mod in $$$$$$$$mods; do \
mkdir -p $(2)/etc/modules.d; \
- echo "$$$$$$$$mod" >> $(2)/etc/modules.d/$$$$$$$$priority-$(1); \
+ if [ -n "$$$$$$$$params" ]; then \
+ echo "$$$$$$$$mod $$$$$$$$params" >> $(2)/etc/modules.d/$$$$$$$$priority-$(1); \
+ else \
+ echo "$$$$$$$$mods" >> $(2)/etc/modules.d/$$$$$$$$priority-$(1); \
+ fi; \
done; \
if [ -e $(2)/etc/modules.d/$$$$$$$$priority-$(1) ]; then \
if [ "$$$$$$$$boot" = "1" -a ! -e $(2)/etc/modules-boot.d/$$$$$$$$priority-$(1) ]; then \
version_filter=$(if $(findstring @,$(1)),$(shell $(SCRIPT_DIR)/package-metadata.pl version_filter $(KERNEL_PATCHVER) $(1)),$(1))
define AutoLoad
- add_module "$(1)" "$(call version_filter,$(2))" "$(3)";
+ add_module "$(1)" "$(call version_filter,$(2))" "$(3)" "$(4)";
endef
define AutoProbe
- probe_module "$(call version_filter,$(1))" "$(2)";
+ probe_module "$(call version_filter,$(1))" "$(2)" "$(3)";
endef
version_field=$(if $(word $(1),$(2)),$(word $(1),$(2)),0)