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
)
14 PKG_RELEASE
:=$(LINUX_RELEASE
)
16 PKG_BUILD_DIR
:=$(KERNEL_BUILD_DIR
)/packages
18 include $(INCLUDE_DIR
)/package.mk
20 -include $(LINUX_DIR
)/.config
22 include $(INCLUDE_DIR
)/netfilter.mk
26 mkdir
-p
$(PKG_BUILD_DIR
)
32 define KernelPackage
/Defaults
41 mkdir
-p
$(2)/etc
/modules.d
; \
42 echo
"$$$$$$$$2" > $(2)/etc
/modules.d
/$$$$$$$$1-$(1); \
43 modules
="$$$$$$$${modules:+$$$$$$$$modules }$$$$$$$$1-$(1)"; \
46 if
[ -n
"$$$$$$$$modules" ]; then \
47 mkdir
-p
$(2)/etc
/modules.d
; \
48 echo
"#!/bin/sh" > $(2)/CONTROL
/postinst
; \
49 echo
"[ -z \"\$$$$$$$$IPKG_INSTROOT\" ] || exit 0" >> $(2)/CONTROL
/postinst
; \
50 echo
". /etc/functions.sh" >> $(2)/CONTROL
/postinst
; \
51 echo
"load_modules $$$$$$$$modules" >> $(2)/CONTROL
/postinst
; \
52 chmod
0755 $(2)/CONTROL
/postinst
; \
59 $(eval
$(call KernelPackage
/Defaults
))
60 $(eval
$(call KernelPackage
/$(1)))
61 $(eval
$(call KernelPackage
/$(1)/$(KERNEL
)))
63 define Package
/kmod-
$(1)
66 CATEGORY
:=Kernel modules
68 DESCRIPTION
:=$(DESCRIPTION
)
69 EXTRA_DEPENDS
:='kernel (=$(PKG_VERSION)-$(PKG_RELEASE))'
70 $(call KernelPackage
/$(1))
71 $(call KernelPackage
/$(1)/$(KERNEL
))
72 $(call KernelPackage
/$(1)/$(BOARD
)-$(KERNEL
))
75 ifeq ($(findstring m
,$(KCONFIG
)),m
)
76 ifneq ($(strip $(FILES
)),)
77 define Package
/kmod-
$(1)/install
78 mkdir
-p
$$(1)/lib
/modules
/$(LINUX_VERSION
)
79 $(CP
) $$(FILES
) $$(1)/lib
/modules
/$(LINUX_VERSION
)/
80 $(call ModuleAutoLoad
,$(1),$$(1),$(AUTOLOAD
))
84 $$(eval
$$(call BuildPackage
,kmod-
$(1)))
88 add_module
$(1) "$(2)";
91 include .
/modules
/*.mk
This page took 0.039495 seconds and 5 git commands to generate.