]>
Commit | Line | Data |
---|---|---|
91e56a59 AF |
1 | ############################################################################### |
2 | # # | |
3 | # IPFire.org - A linux based firewall # | |
4 | # Copyright (C) 2007-2014 IPFire Team <info@ipfire.org> # | |
5 | # # | |
6 | # This program is free software: you can redistribute it and/or modify # | |
7 | # it under the terms of the GNU General Public License as published by # | |
8 | # the Free Software Foundation, either version 3 of the License, or # | |
9 | # (at your option) any later version. # | |
10 | # # | |
11 | # This program is distributed in the hope that it will be useful, # | |
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # | |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # | |
14 | # GNU General Public License for more details. # | |
15 | # # | |
16 | # You should have received a copy of the GNU General Public License # | |
17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. # | |
18 | # # | |
19 | ############################################################################### | |
20 | ||
21 | ############################################################################### | |
22 | # Definitions | |
23 | ############################################################################### | |
24 | ||
25 | include Config | |
26 | ||
27 | VERSUFIX = ipfire$(KCFG) | |
28 | ||
29 | VER = 3.18.1-1 | |
30 | ||
31 | THISAPP = backports-$(VER) | |
32 | DL_FILE = $(THISAPP).tar.xz | |
33 | DL_FROM = $(URL_IPFIRE) | |
34 | DIR_APP = $(DIR_SRC)/$(THISAPP) | |
35 | TARGET = $(DIR_INFO)/$(THISAPP)-kmod-$(KVER)-$(VERSUFIX) | |
36 | ||
37 | ############################################################################### | |
38 | # Top-level Rules | |
39 | ############################################################################### | |
40 | ||
41 | objects = $(DL_FILE) | |
42 | ||
43 | $(DL_FILE) = $(DL_FROM)/$(DL_FILE) | |
44 | ||
45 | $(DL_FILE)_MD5 = 6cef5f2c800e12441d2cba9fa42b6a5b | |
46 | ||
47 | install : $(TARGET) | |
48 | ||
49 | check : $(patsubst %,$(DIR_CHK)/%,$(objects)) | |
50 | ||
51 | download :$(patsubst %,$(DIR_DL)/%,$(objects)) | |
52 | ||
53 | md5 : $(subst %,%_MD5,$(objects)) | |
54 | ||
55 | dist: | |
56 | $(PAK) | |
57 | ||
58 | ############################################################################### | |
59 | # Downloading, checking, md5sum | |
60 | ############################################################################### | |
61 | ||
62 | $(patsubst %,$(DIR_CHK)/%,$(objects)) : | |
63 | @$(CHECK) | |
64 | ||
65 | $(patsubst %,$(DIR_DL)/%,$(objects)) : | |
66 | @$(LOAD) | |
67 | ||
68 | $(subst %,%_MD5,$(objects)) : | |
69 | @$(MD5) | |
70 | ||
71 | ############################################################################### | |
72 | # Installation Details | |
73 | ############################################################################### | |
74 | ||
75 | $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) | |
76 | @$(PREBUILD) | |
77 | @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar Jxf $(DIR_DL)/$(DL_FILE) | |
78 | cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/backports-3.18.1-1-ipfire-build.patch | |
79 | cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/backports-3.18.1-1-grsecurity.patch | |
80 | ||
81 | # DVB patches | |
82 | cd $(DIR_APP) && patch -Np2 < $(DIR_SRC)/src/patches/v4l-dvb_fix_tua6034_pll.patch | |
83 | ||
84 | # Wlan patches | |
85 | cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/compat-drivers-3.8.3-ath_ignore_eeprom_regdomain.patch | |
86 | cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-3.14.22-iwlwifi-noibss_only_on_radar_chan.patch | |
87 | cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-3.10.37-rt2800usb_add_dlink_dwa137_usbid.patch | |
88 | cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/backports-3.18.1-1_add_libertas_uap.patch | |
89 | ||
90 | # generate config | |
91 | cd $(DIR_APP) && make KLIB=/lib/modules/$(KVER)-$(VERSUFIX)/ allmodconfig | |
92 | ||
93 | # Disable some settings | |
94 | cd $(DIR_APP) && sed -i -e "s/CPTCFG_CFG80211_DEVELOPER_WARNINGS=y/# CPTCFG_CFG80211_DEVELOPER_WARNINGS is not set/g" .config | |
95 | cd $(DIR_APP) && sed -i -e "s/CPTCFG_CFG80211_CERTIFICATION_ONUS=y/# CPTCFG_CFG80211_CERTIFICATION_ONUS is not set/g" .config | |
96 | cd $(DIR_APP) && sed -i -e "s/CPTCFG_CFG80211_REG_CELLULAR_HINTS=y/# CPTCFG_CFG80211_REG_CELLULAR_HINTS is not set/g" .config | |
97 | cd $(DIR_APP) && sed -i -e "s/CPTCFG_CFG80211_REG_RELAX_NO_IR=y/# CPTCFG_CFG80211_REG_RELAX_NO_IR is not set/g" .config | |
98 | cd $(DIR_APP) && sed -i -e "s/CPTCFG_CFG80211_INTERNAL_REGDB=y/# CPTCFG_CFG80211_INTERNAL_REGDB is not set/g" .config | |
99 | cd $(DIR_APP) && sed -i -e "s/CPTCFG_CFG80211_DEFAULT_PS=y/# CPTCFG_CFG80211_DEFAULT_PS is not set/g" .config | |
100 | cd $(DIR_APP) && sed -i -e "s/CPTCFG_NFC=m/# CPTCFG_NFC is not set/g" .config | |
101 | ||
102 | # Disable some modules (build fail) | |
103 | cd $(DIR_APP) && sed -i -e "s/CPTCFG_VIDEO_VIA_CAMERA=m/# CPTCFG_VIDEO_VIA_CAMERA is not set/g" .config | |
104 | ||
105 | # Disable DEBUG | |
106 | cd $(DIR_APP) && sed -i -e "s/.*DEBUG=y/# & is not set/g" .config | |
107 | cd $(DIR_APP) && sed -i -e "s/.*DEBUGFS=y/# & is not set/g" .config | |
108 | cd $(DIR_APP) && sed -i -e "s/=y is not set/ is not set/g" .config | |
109 | ||
110 | cd $(DIR_APP) && make $(MAKETUNING) KLIB=/lib/modules/$(KVER)-$(VERSUFIX)/ install | |
111 | ||
112 | # Remove vsp1 module (not mach to our platforms) | |
113 | rm -rf /lib/modules/$(KVER)-$(VERSUFIX)/kernel/drivers/media/platform/vsp1 | |
114 | ||
115 | @rm -rf $(DIR_APP) | |
116 | @$(POSTBUILD) |