1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-10-01 12:28:31 +03:00

kernel: build kmod even for modules built-in

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28649 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nico 2011-10-28 13:10:43 +00:00
parent f2b25b5e18
commit 378a89660e

View File

@ -1,5 +1,5 @@
# #
# Copyright (C) 2006 OpenWrt.org # Copyright (C) 2006-2011 OpenWrt.org
# #
# This is free software, licensed under the GNU General Public License v2. # This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information. # See /LICENSE for more information.
@ -82,16 +82,18 @@ define ModuleAutoLoad
mods="$$$$$$$$2"; \ mods="$$$$$$$$2"; \
boot="$$$$$$$$3"; \ boot="$$$$$$$$3"; \
shift 3; \ shift 3; \
mkdir -p $(2)/etc/modules.d; \ for mod in $$$$$$$$mods; do \
( \ if [ -e $(2)/$(MODULES_SUBDIR)/$$$$$$$$mod.ko ]; then \
[ "$$$$$$$$boot" = "1" ] && { \ mkdir -p $(2)/etc/modules.d; \
echo '# May be required for rootfs' ; \ echo "$$$$$$$$mod" >> $(2)/etc/modules.d/$$$$$$$$priority-$(1); \
} ; \ fi; \
for mod in $$$$$$$$mods; do \ done; \
echo "$$$$$$$$mod"; \ if [ -e $(2)/etc/modules.d/$$$$$$$$priority-$(1) ]; then \
done \ if [ "$$$$$$$$boot" = "1" ]; then \
) > $(2)/etc/modules.d/$$$$$$$$priority-$(1); \ echo '# May be required for rootfs' >> $(2)/etc/modules.d/$$$$$$$$priority-$(1); \
modules="$$$$$$$${modules:+$$$$$$$$modules }$$$$$$$$priority-$(1)"; \ fi; \
modules="$$$$$$$${modules:+$$$$$$$$modules }$$$$$$$$priority-$(1)"; \
fi; \
}; \ }; \
$(3) \ $(3) \
if [ -n "$$$$$$$$modules" ]; then \ if [ -n "$$$$$$$$modules" ]; then \
@ -147,11 +149,17 @@ $(call KernelPackage/$(1)/config)
$(call KernelPackage/depends) $(call KernelPackage/depends)
ifneq ($(if $(filter-out %=y %=n %=m,$(KCONFIG)),$(filter m,$(foreach c,$(filter-out %=y %=n %=m,$(KCONFIG)),$($(c)))),.),) ifneq ($(if $(filter-out %=y %=n %=m,$(KCONFIG)),$(filter m y,$(foreach c,$(filter-out %=y %=n %=m,$(KCONFIG)),$($(c)))),.),)
ifneq ($(strip $(FILES)),) ifneq ($(strip $(FILES)),)
define Package/kmod-$(1)/install define Package/kmod-$(1)/install
mkdir -p $$(1)/$(MODULES_SUBDIR) @for mod in $$(FILES); do \
$(CP) -L $$(FILES) $$(1)/$(MODULES_SUBDIR)/ if [ -e $$$$$$$$mod ]; then \
mkdir -p $$(1)/$(MODULES_SUBDIR) ; \
$(CP) -L $$$$$$$$mod $$(1)/$(MODULES_SUBDIR)/ ; \
else \
echo "WARNING: module '$$$$$$$$mod' does not exist, is it built-in?" ; \
fi; \
done;
$(call ModuleAutoLoad,$(1),$$(1),$(AUTOLOAD)) $(call ModuleAutoLoad,$(1),$$(1),$(AUTOLOAD))
$(call KernelPackage/$(1)/install,$$(1)) $(call KernelPackage/$(1)/install,$$(1))
endef endef