backports: rpi need smsc mac parameter patch too.
[ipfire-2.x.git] / lfs / backports
CommitLineData
91e56a59
AF
1###############################################################################
2# #
3# IPFire.org - A linux based firewall #
fb90bce8 4# Copyright (C) 2007-2015 IPFire Team <info@ipfire.org> #
91e56a59
AF
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
25include Config
26
27VERSUFIX = ipfire$(KCFG)
28
29VER = 3.18.1-1
30
31THISAPP = backports-$(VER)
32DL_FILE = $(THISAPP).tar.xz
33DL_FROM = $(URL_IPFIRE)
34DIR_APP = $(DIR_SRC)/$(THISAPP)
35TARGET = $(DIR_INFO)/$(THISAPP)-kmod-$(KVER)-$(VERSUFIX)
36
fb90bce8
AF
37#ifeq "$(MACHINE_TYPE)" "arm"
38CFLAGS += -fno-PIC
39#endif
40
91e56a59
AF
41###############################################################################
42# Top-level Rules
43###############################################################################
44
45objects = $(DL_FILE)
46
47$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
48
49$(DL_FILE)_MD5 = 6cef5f2c800e12441d2cba9fa42b6a5b
50
51install : $(TARGET)
52
53check : $(patsubst %,$(DIR_CHK)/%,$(objects))
54
55download :$(patsubst %,$(DIR_DL)/%,$(objects))
56
57md5 : $(subst %,%_MD5,$(objects))
58
59dist:
60 $(PAK)
61
62###############################################################################
63# Downloading, checking, md5sum
64###############################################################################
65
66$(patsubst %,$(DIR_CHK)/%,$(objects)) :
67 @$(CHECK)
68
69$(patsubst %,$(DIR_DL)/%,$(objects)) :
70 @$(LOAD)
71
72$(subst %,%_MD5,$(objects)) :
73 @$(MD5)
74
75###############################################################################
76# Installation Details
77###############################################################################
78
79$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
80 @$(PREBUILD)
81 @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar Jxf $(DIR_DL)/$(DL_FILE)
82 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/backports-3.18.1-1-ipfire-build.patch
83 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/backports-3.18.1-1-grsecurity.patch
82bcc200 84 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/backports-3.18.1-1-add_usbnet_modules.patch
91e56a59
AF
85
86 # DVB patches
87 cd $(DIR_APP) && patch -Np2 < $(DIR_SRC)/src/patches/v4l-dvb_fix_tua6034_pll.patch
88
89 # Wlan patches
90 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/compat-drivers-3.8.3-ath_ignore_eeprom_regdomain.patch
91 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-3.14.22-iwlwifi-noibss_only_on_radar_chan.patch
92 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-3.10.37-rt2800usb_add_dlink_dwa137_usbid.patch
93 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/backports-3.18.1-1_add_libertas_uap.patch
94
518520ae 95 # smsc mac address patch for pandaboard and raspberry pi
2d6f40d6 96ifeq "$(KCFG)" "-multi"
2d6f40d6
AF
97 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-3.10-smsc95xx-add_mac_addr_param.patch
98endif
518520ae
AF
99ifeq "$(KCFG)" "-rpi"
100 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-3.10-smsc95xx-add_mac_addr_param.patch
101endif
102
91e56a59
AF
103 # generate config
104 cd $(DIR_APP) && make KLIB=/lib/modules/$(KVER)-$(VERSUFIX)/ allmodconfig
105
106 # Disable some settings
107 cd $(DIR_APP) && sed -i -e "s/CPTCFG_CFG80211_DEVELOPER_WARNINGS=y/# CPTCFG_CFG80211_DEVELOPER_WARNINGS is not set/g" .config
108 cd $(DIR_APP) && sed -i -e "s/CPTCFG_CFG80211_CERTIFICATION_ONUS=y/# CPTCFG_CFG80211_CERTIFICATION_ONUS is not set/g" .config
109 cd $(DIR_APP) && sed -i -e "s/CPTCFG_CFG80211_REG_CELLULAR_HINTS=y/# CPTCFG_CFG80211_REG_CELLULAR_HINTS is not set/g" .config
110 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
111 cd $(DIR_APP) && sed -i -e "s/CPTCFG_CFG80211_INTERNAL_REGDB=y/# CPTCFG_CFG80211_INTERNAL_REGDB is not set/g" .config
112 cd $(DIR_APP) && sed -i -e "s/CPTCFG_CFG80211_DEFAULT_PS=y/# CPTCFG_CFG80211_DEFAULT_PS is not set/g" .config
113 cd $(DIR_APP) && sed -i -e "s/CPTCFG_NFC=m/# CPTCFG_NFC is not set/g" .config
114
115 # Disable some modules (build fail)
116 cd $(DIR_APP) && sed -i -e "s/CPTCFG_VIDEO_VIA_CAMERA=m/# CPTCFG_VIDEO_VIA_CAMERA is not set/g" .config
117
118 # Disable DEBUG
119 cd $(DIR_APP) && sed -i -e "s/.*DEBUG=y/# & is not set/g" .config
120 cd $(DIR_APP) && sed -i -e "s/.*DEBUGFS=y/# & is not set/g" .config
121 cd $(DIR_APP) && sed -i -e "s/=y is not set/ is not set/g" .config
122
fe0c6a62
AF
123 # Disable OF_GRAPH (not supported by kernel 3.14)
124 cd $(DIR_APP) && sed -i -e "s/CONFIG_OF/CONFIG_OF_IGNORE/g" include/linux/of_graph.h
125
91e56a59
AF
126 cd $(DIR_APP) && make $(MAKETUNING) KLIB=/lib/modules/$(KVER)-$(VERSUFIX)/ install
127
128 # Remove vsp1 module (not mach to our platforms)
129 rm -rf /lib/modules/$(KVER)-$(VERSUFIX)/kernel/drivers/media/platform/vsp1
130
131 @rm -rf $(DIR_APP)
132 @$(POSTBUILD)