-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathMakefile
111 lines (90 loc) · 2.7 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#
# Copyright (C) 2013 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=ath79-i2s
PKG_RELEASE:=1
include $(INCLUDE_DIR)/package.mk
define KernelPackage/ath79-i2s
SUBMENU:=i2s alsa modules
TITLE:=Atheros 933X I2S module
DEPENDS:=@AUDIO_SUPPORT +kmod-sound-soc-core +kmod-ath79-i2s-dev
FILES:=$(PKG_BUILD_DIR)/ath79-i2s.ko
KCONFIG:=
endef
define KernelPackage/ath79-i2s/description
Kernel module for atheros ar933x i2s support
endef
define KernelPackage/ath79-pcm
SUBMENU:=i2s alsa modules
TITLE:=Atheros 933X PCM module
DEPENDS:=@AUDIO_SUPPORT +kmod-sound-soc-core +kmod-ath79-i2s +kmod-ath79-i2s-dev
FILES:=$(PKG_BUILD_DIR)/ath79-pcm-mbox.ko
KCONFIG:=
endef
define KernelPackage/ath79-pcm/description
Kernel module for atheros ar933x pcm support
endef
define KernelPackage/ath79-i2s-dev
SUBMENU:=i2s alsa modules
TITLE:=Atheros 933X I2S DEV module
DEPENDS:=@AUDIO_SUPPORT
FILES:=$(PKG_BUILD_DIR)/dev-audio.ko
KCONFIG:=
endef
define KernelPackage/ath79-i2s/description
Kernel module for atheros ar933x i2s dev support
endef
define KernelPackage/ath79-wm8727
SUBMENU:=i2s alsa modules
TITLE:=Atheros 933X wm8727 codec
DEPENDS:=@AUDIO_SUPPORT +kmod-ath79-i2s +kmod-ath79-pcm
FILES:=$(PKG_BUILD_DIR)/wm8727.ko
KCONFIG:=
endef
define KernelPackage/ath79-wm8727/description
Kernel module for atheros ar933x wm8727 codec support
endef
define KernelPackage/ath79-carambola2
SUBMENU:=i2s alsa modules
TITLE:=Atheros 933X carambola 2 clue code
DEPENDS:=@AUDIO_SUPPORT +kmod-ath79-i2s +kmod-ath79-pcm +kmod-ath79-wm8727
FILES:=$(PKG_BUILD_DIR)/ath-carambola2.ko
KCONFIG:=
endef
define KernelPackage/ath79-ath-carambola2/description
Kernel module for atheros ar933x ath-carambola2 clue code
endef
EXTRA_KCONFIG:= \
CONFIG_AR9331_PCM=m \
CONFIG_AR9331_I2S=m \
CONFIG_AR9331_I2S_DEV=m \
CONFIG_AR9331_WM8727=m \
CONFIG_AR9331_CARAMBOLA2=m
EXTRA_CFLAGS:= \
$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=m,%,$(filter %=m,$(EXTRA_KCONFIG)))) \
$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) \
MAKE_OPTS:= \
ARCH="$(LINUX_KARCH)" \
CROSS_COMPILE="$(TARGET_CROSS)" \
SUBDIRS="$(PKG_BUILD_DIR)" \
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
$(EXTRA_KCONFIG)
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
$(CP) ./src/* $(PKG_BUILD_DIR)/
endef
define Build/Compile
$(MAKE) -C "$(LINUX_DIR)" \
$(MAKE_OPTS) \
modules
endef
$(eval $(call KernelPackage,ath79-pcm))
$(eval $(call KernelPackage,ath79-i2s))
$(eval $(call KernelPackage,ath79-i2s-dev))
$(eval $(call KernelPackage,ath79-wm8727))
$(eval $(call KernelPackage,ath79-carambola2))