slang: revert parallelized build
[ipfire-2.x.git] / lfs / backports
CommitLineData
91e56a59
AF
1###############################################################################
2# #
3# IPFire.org - A linux based firewall #
eee037b8 4# Copyright (C) 2007-2018 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
23588859 29VER = 4.2.6-1
91e56a59
AF
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
dc7d6b20 37#ifeq "$(BUILD_PLATFORM)" "arm"
fb90bce8
AF
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
23588859 49$(DL_FILE)_MD5 = 3f978eb56473d9289cf21ebbcb5aa80b
91e56a59
AF
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)
23588859
AF
81
82 # remove replaced kernel modules
83 rm -rf /lib/modules/$(KVER)-$(VERSUFIX)/kernel/drivers/net/wireless/rtl818x/rtl8180/rtl8180.ko
e039df86 84 rm -rf /lib/modules/$(KVER)-$(VERSUFIX)/kernel/drivers/media
23588859 85
91e56a59
AF
86 @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar Jxf $(DIR_DL)/$(DL_FILE)
87 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/backports-3.18.1-1-ipfire-build.patch
23588859
AF
88 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/backports-4.2.6-1-grsecurity.patch
89 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/backports-4.2.6-1-add_usbnet_modules.patch
dc7d6b20 90ifeq "$(BUILD_ARCH)" "x86_64"
1f2bda9b
AF
91 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/backports-3.18.1-1_no_dma_sgtable_on_x86_64.patch
92endif
91e56a59
AF
93
94 # DVB patches
95 cd $(DIR_APP) && patch -Np2 < $(DIR_SRC)/src/patches/v4l-dvb_fix_tua6034_pll.patch
96
97 # Wlan patches
98 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/compat-drivers-3.8.3-ath_ignore_eeprom_regdomain.patch
99 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-3.14.22-iwlwifi-noibss_only_on_radar_chan.patch
100 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-3.10.37-rt2800usb_add_dlink_dwa137_usbid.patch
ad592fb8 101 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/backports-3.18.1-1_rt2x00usb_suppress_queue_warnings.patch
23588859 102 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/backports-4.2.6-1-mt7601_upstream_fixes.patch
91e56a59 103 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/backports-3.18.1-1_add_libertas_uap.patch
36b2adc9 104 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/backports-4.2.6-1_ath10k_remove_logspam.patch
875bd87b 105 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/backports-4.2.6-1-ath9k_add_missing_mask_init.patch
91e56a59 106
518520ae 107 # smsc mac address patch for pandaboard and raspberry pi
2d6f40d6 108ifeq "$(KCFG)" "-multi"
2d6f40d6
AF
109 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-3.10-smsc95xx-add_mac_addr_param.patch
110endif
518520ae
AF
111ifeq "$(KCFG)" "-rpi"
112 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-3.10-smsc95xx-add_mac_addr_param.patch
113endif
114
c5c12c9c
AF
115 # Patches form stable linux updates
116 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/backports/backports-linux-upstream-1.patch
117 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/backports/backports-linux-upstream-2.patch
118 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/backports/backports-linux-upstream-3.patch
119
91e56a59
AF
120 # generate config
121 cd $(DIR_APP) && make KLIB=/lib/modules/$(KVER)-$(VERSUFIX)/ allmodconfig
122
123 # Disable some settings
124 cd $(DIR_APP) && sed -i -e "s/CPTCFG_CFG80211_DEVELOPER_WARNINGS=y/# CPTCFG_CFG80211_DEVELOPER_WARNINGS is not set/g" .config
91e56a59
AF
125 cd $(DIR_APP) && sed -i -e "s/CPTCFG_CFG80211_INTERNAL_REGDB=y/# CPTCFG_CFG80211_INTERNAL_REGDB is not set/g" .config
126 cd $(DIR_APP) && sed -i -e "s/CPTCFG_CFG80211_DEFAULT_PS=y/# CPTCFG_CFG80211_DEFAULT_PS is not set/g" .config
127 cd $(DIR_APP) && sed -i -e "s/CPTCFG_NFC=m/# CPTCFG_NFC is not set/g" .config
128
dc7d6b20 129ifeq "$(BUILD_ARCH)" "x86_64"
ba583892
MT
130 cd $(DIR_APP) && sed -i -e "s/CPTCFG_LIBERTAS_UAP=m/# CPTCFG_LIBERTAS_UAP is not set/g" .config
131endif
132
23588859
AF
133 # Disable some modules (build fail/missing symbols)
134 cd $(DIR_APP) && sed -i -e "s/CPTCFG_VIDEO_AM437X_VPFE=m/# CPTCFG_VIDEO_AM437X_VPFE is not set/g" .config
91e56a59 135 cd $(DIR_APP) && sed -i -e "s/CPTCFG_VIDEO_VIA_CAMERA=m/# CPTCFG_VIDEO_VIA_CAMERA is not set/g" .config
23588859
AF
136 cd $(DIR_APP) && sed -i -e "s/CPTCFG_VIDEO_XILINX=m/# CPTCFG_VIDEO_XILINX is not set/g" .config
137 cd $(DIR_APP) && sed -i -e "s/CPTCFG_IR_SUNXI=m/# CPTCFG_IR_SUNXI is not set/g" .config
138 cd $(DIR_APP) && sed -i -e "s/CPTCFG_BT_6LOWPAN=m/# CPTCFG_BT_6LOWPAN is not set/g" .config
91e56a59
AF
139
140 # Disable DEBUG
141 cd $(DIR_APP) && sed -i -e "s/.*DEBUG=y/# & is not set/g" .config
142 cd $(DIR_APP) && sed -i -e "s/.*DEBUGFS=y/# & is not set/g" .config
143 cd $(DIR_APP) && sed -i -e "s/=y is not set/ is not set/g" .config
144
145 cd $(DIR_APP) && make $(MAKETUNING) KLIB=/lib/modules/$(KVER)-$(VERSUFIX)/ install
146
91e56a59
AF
147 @rm -rf $(DIR_APP)
148 @$(POSTBUILD)