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.
11 LINUX_VERSION?
=<LINUX_VERSION
>
13 include $(INCLUDE_DIR
)/target.mk
21 ifneq (,$(findstring uml
,$(BOARD
)))
25 KERNEL_CC
:=$(TARGET_CC
)
26 KERNEL_CROSS
:=$(TARGET_CROSS
)
29 KERNEL_BUILD_DIR
:=$(BUILD_DIR
)/linux-
$(KERNEL
)-$(BOARD
)
30 LINUX_DIR
:= $(KERNEL_BUILD_DIR
)/linux-
$(LINUX_VERSION
)
32 MODULES_SUBDIR
:=lib
/modules
/$(LINUX_VERSION
)
33 MODULES_DIR
:= $(KERNEL_BUILD_DIR
)/modules
/$(MODULES_SUBDIR
)
34 TARGET_MODULES_DIR
:= $(LINUX_TARGET_DIR
)/$(MODULES_SUBDIR
)
36 LINUX_KERNEL
:=$(KERNEL_BUILD_DIR
)/vmlinux
38 LINUX_SOURCE
:=linux-
$(LINUX_VERSION
).
tar.bz2
39 LINUX_SITE
:=http
://www.us.kernel.org
/pub
/linux
/kernel
/v
$(KERNEL
) \
40 http
://www.us.kernel.org
/pub
/linux
/kernel
/v
$(KERNEL
) \
41 http
://www.kernel.org
/pub
/linux
/kernel
/v
$(KERNEL
) \
42 http
://www.de.kernel.org
/pub
/linux
/kernel
/v
$(KERNEL
)
47 define KernelPackage
/Defaults
56 mkdir
-p
$(2)/etc
/modules.d
; \
58 for mod in
$$$$$$$$2; do \
61 ) > $(2)/etc
/modules.d
/$$$$$$$$1-$(1); \
62 modules
="$$$$$$$${modules:+$$$$$$$$modules }$$$$$$$$1-$(1)"; \
65 if
[ -n
"$$$$$$$$modules" ]; then \
66 mkdir
-p
$(2)/etc
/modules.d
; \
67 echo
"#!/bin/sh" > $(2)/CONTROL
/postinst
; \
68 echo
"[ -z \"\$$$$$$$$IPKG_INSTROOT\" ] || exit 0" >> $(2)/CONTROL
/postinst
; \
69 echo
". /etc/functions.sh" >> $(2)/CONTROL
/postinst
; \
70 echo
"load_modules $$$$$$$$modules" >> $(2)/CONTROL
/postinst
; \
71 chmod
0755 $(2)/CONTROL
/postinst
; \
78 $(eval
$(call Package
/Default
))
79 $(eval
$(call KernelPackage
/Defaults
))
80 $(eval
$(call KernelPackage
/$(1)))
81 $(eval
$(call KernelPackage
/$(1)/$(KERNEL
)))
82 $(eval
$(call KernelPackage
/$(1)/$(BOARD
)-$(KERNEL
)))
84 define Package
/kmod-
$(1)
87 CATEGORY
:=Kernel modules
88 DEFAULT
:=$(KMOD_DEFAULT
)
89 DESCRIPTION
:=$(DESCRIPTION
)
90 EXTRA_DEPENDS
:='kernel (=$(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE))'
91 $(call KernelPackage
/$(1))
92 $(call KernelPackage
/$(1)/$(KERNEL
))
93 $(call KernelPackage
/$(1)/$(BOARD
)-$(KERNEL
))
96 ifeq ($(findstring m
,$(KCONFIG
)),m
)
97 ifneq ($(strip $(FILES
)),)
98 define Package
/kmod-
$(1)/install
99 mkdir
-p
$$(1)/lib
/modules
/$(LINUX_VERSION
)
100 $(CP
) $$(FILES
) $$(1)/lib
/modules
/$(LINUX_VERSION
)/
101 $(call ModuleAutoLoad
,$(1),$$(1),$(AUTOLOAD
))
102 $(call KernelPackage
/$(1)/install,$$(1))
106 $$(eval
$$(call BuildPackage
,kmod-
$(1)))
110 add_module
$(1) "$(2)";
This page took 0.043146 seconds and 5 git commands to generate.