2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
10 include $(INCLUDE_DIR
)/kernel.mk
13 PKG_VERSION
:=$(LINUX_VERSION
)-$(BOARD
)
16 PKG_BUILD_DIR
:=$(KERNEL_BUILD_DIR
)/packages
18 include $(INCLUDE_DIR
)/package.mk
20 -include $(LINUX_DIR
)/.config
21 include $(INCLUDE_DIR
)/netfilter.mk
25 mkdir
-p
$(PKG_BUILD_DIR
)
31 define KernelPackage
/Defaults
40 mkdir
-p
$(2)/etc
/modules.d
; \
41 echo
"$$$$$$$$2" > $(2)/etc
/modules.d
/$$$$$$$$1-$(1); \
42 modules
="$$$$$$$${modules:+$$$$$$$$modules }$$$$$$$$1-$(1)"; \
45 if
[ -n
"$$$$$$$$modules" ]; then \
46 mkdir
-p
$(2)/etc
/modules.d
; \
47 echo
"#!/bin/sh" >> $(2)/CONTROL
/postinst
; \
48 echo
"[ -z \"\$$$$$$$$IPKG_INSTROOT\" ] || exit" >> $(2)/CONTROL
/postinst
; \
49 echo
". /etc/functions.sh" >> $(2)/CONTROL
/postinst
; \
50 echo
"load_modules $$$$$$$$modules" >> $(2)/CONTROL
/postinst
; \
51 chmod
0755 $(2)/CONTROL
/postinst
; \
58 $(eval
$(call KernelPackage
/Defaults
))
59 $(eval
$(call KernelPackage
/$(1)))
60 $(eval
$(call KernelPackage
/$(1)/$(KERNEL
)))
62 ifneq ($(findstring m
,$(KCONFIG
)),m
)
63 CONFIG_PACKAGE_kmod-
$(1):=
66 define Package
/kmod-
$(1)
69 CATEGORY
:=Kernel modules
70 DESCRIPTION
:=$(DESCRIPTION
)
71 EXTRA_DEPENDS
:='kernel (=$(PKG_VERSION))'
74 define Package
/kmod-
$(1)/install
75 mkdir
-p
$$(1)/lib
/modules
/$(LINUX_VERSION
)
76 $(CP
) $(FILES
) $$(1)/lib
/modules
/$(LINUX_VERSION
)/
77 $(call ModuleAutoLoad
,$(1),$$(1),$(AUTOLOAD
))
79 $$(eval
$$(call BuildPackage
,kmod-
$(1)))
83 add_module
$(1) "$(2)";
This page took 0.043044 seconds and 5 git commands to generate.