Add wpa_supplicant update to core28
[people/teissler/ipfire-2.x.git] / lfs / linux
CommitLineData
df5e82b3 1###############################################################################
df5e82b3 2# #
70df8302
MT
3# IPFire.org - A linux based firewall #
4# Copyright (C) 2007 Michael Tremer & Christian Schmidt #
5# #
6# This program is free software: you can redistribute it and/or modify #
df5e82b3 7# it under the terms of the GNU General Public License as published by #
70df8302 8# the Free Software Foundation, either version 3 of the License, or #
df5e82b3
MT
9# (at your option) any later version. #
10# #
70df8302 11# This program is distributed in the hope that it will be useful, #
df5e82b3
MT
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 #
70df8302 17# along with this program. If not, see <http://www.gnu.org/licenses/>. #
df5e82b3 18# #
df5e82b3
MT
19###############################################################################
20
21###############################################################################
22# Definitions
23###############################################################################
24
25include Config
26
e4766bc5
MT
27PATCHLEVEL = .20
28VER = 2.6.25.20
df5e82b3
MT
29
30THISAPP = linux-$(VER)
376e42ce 31DL_FILE = $(THISAPP).tar.bz2
a2cb3a33 32DL_FROM = $(URL_IPFIRE)
df5e82b3
MT
33DIR_APP = $(DIR_SRC)/$(THISAPP)
34CFLAGS =
35CXXFLAGS =
36
3a1019f6 37# Normal build or SMP build.
df5e82b3 38#
3a1019f6 39ifeq "$(SMP)" "1"
376e42ce 40 TARGET = $(DIR_INFO)/linux-$(VER)-smp
3a1019f6 41else
376e42ce 42 TARGET = $(DIR_INFO)/linux-$(VER)
df5e82b3 43endif
6230f0da 44
df5e82b3
MT
45###############################################################################
46# Top-level Rules
47###############################################################################
48objects =$(DL_FILE) \
c1a265fc 49 mISDN.git-12dca7cf4cf38590d30cdeaf8ced30aaca6d875f.tar.gz \
9c534116 50 squashfs3.4.tar.gz \
d1fd2b03 51 netfilter-layer7-v2.21.tar.gz \
f418a984
AF
52 patch-2.6.16-nath323-1.3.bz2 \
53 reiser4-for-2.6.25.patch.bz2
38f05351 54
64cf4991 55$(DL_FILE) = $(URL_IPFIRE)/$(DL_FILE)
d1fd2b03 56netfilter-layer7-v2.21.tar.gz = $(URL_IPFIRE)/netfilter-layer7-v2.21.tar.gz
4ce37908 57patch-2.6.16-nath323-1.3.bz2 = $(URL_IPFIRE)/patch-2.6.16-nath323-1.3.bz2
9c534116 58squashfs3.4.tar.gz = $(URL_IPFIRE)/squashfs3.4.tar.gz
c1a265fc 59mISDN.git-12dca7cf4cf38590d30cdeaf8ced30aaca6d875f.tar.gz = $(URL_IPFIRE)/mISDN.git-12dca7cf4cf38590d30cdeaf8ced30aaca6d875f.tar.gz
f418a984 60reiser4-for-2.6.25.patch.bz2 = $(URL_IPFIRE)/reiser4-for-2.6.25.patch.bz2
4ce37908 61
e4766bc5 62$(DL_FILE)_MD5 = 0da698edccf03e2235abc2830a495114
d1fd2b03 63netfilter-layer7-v2.21.tar.gz_MD5 = 838422e7d9a06b42e682e9064e5210b5
3185932e 64patch-2.6.16-nath323-1.3.bz2_MD5 = f926409ff703a307baf54b57ab75d138
9c534116 65squashfs3.4.tar.gz_MD5 = 2a4d2995ad5aa6840c95a95ffa6b1da6
c1a265fc 66mISDN.git-12dca7cf4cf38590d30cdeaf8ced30aaca6d875f.tar.gz_MD5 = a46a2d15bd0341edfbd77d257ed3fe4d
f418a984 67reiser4-for-2.6.25.patch.bz2_MD5 = 4294bbcb39e5ee859b94b09ff4fb1e0c
df5e82b3
MT
68
69install : $(TARGET)
70
71check : $(patsubst %,$(DIR_CHK)/%,$(objects))
72
73download :$(patsubst %,$(DIR_DL)/%,$(objects))
74
75md5 : $(subst %,%_MD5,$(objects))
76
f418a984
AF
77dist:
78 @$(PAK)
df5e82b3
MT
79###############################################################################
80# Downloading, checking, md5sum
81###############################################################################
82
83$(patsubst %,$(DIR_CHK)/%,$(objects)) :
84 @$(CHECK)
85
86$(patsubst %,$(DIR_DL)/%,$(objects)) :
87 @$(LOAD)
88
89$(subst %,%_MD5,$(objects)) :
90 @$(MD5)
91
92###############################################################################
93# Installation Details
94###############################################################################
95
96$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
97 @$(PREBUILD)
f418a984 98 @rm -rf $(DIR_APP) $(DIR_SRC)/linux $(DIR_SRC)/xen-* && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
8eec2184 99 ln -s linux-$(VER) /usr/src/linux
3a1019f6 100
f418a984
AF
101 # Not report deprecated syscall 1.23 (for kudzu)
102 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.6.25.18-not_report_sysctl_1.23.patch
103
0c2b766c
AF
104 # Fix crash on Twinhead H12Y notebooks
105 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-h12y-mmio-quirks.patch
106
45ff5fa6 107 # Openswan
e4766bc5 108 #cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/openswan-2.4.x.kernel-2.6.23-natt.patch
ac1cfefa 109
44254afd 110 # Reiser4
f418a984
AF
111 cd $(DIR_APP) && bzip2 -d -c $(DIR_DL)/reiser4-for-2.6.25.patch.bz2 | patch -Np1
112
3185932e
MT
113 # SquashFS
114 cd $(DIR_SRC) && rm -rf squashfs*
9c534116 115 cd $(DIR_SRC) && tar xfz $(DIR_DL)/squashfs3.4.tar.gz
f418a984 116 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/squashfs3.4/kernel-patches/linux-2.6.25/squashfs3.4-patch
89069053 117
4f1b7a27 118 # ipp2p 0.8.2-pomng
f418a984 119 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.6.25.17-ipp2p-0.8.2-pomng.patch
4f1b7a27 120
3a1019f6 121 # Layer7-patch
d1fd2b03
AF
122 cd $(DIR_SRC) && rm -rf $(DIR_SRC)/netfilter-layer7-v2.21
123 cd $(DIR_SRC) && tar xzf $(DIR_DL)/netfilter-layer7-v2.21.tar.gz
124 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/netfilter-layer7-v2.21/kernel-2.6.25-2.6.28-layer7-2.21.patch
df5e82b3 125
6f300951 126 # Linux Intermediate Queueing Device
3185932e 127ifeq "$(XEN)" ""
f418a984 128 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.6.25-imq5.diff
3185932e 129endif
769a61c5 130
1ee8bf5d 131 # mISDN
376e42ce 132 cd $(DIR_SRC) && rm -rf mISDN-*
c1a265fc
AF
133 cd $(DIR_SRC) && tar xfz $(DIR_DL)/mISDN.git-12dca7cf4cf38590d30cdeaf8ced30aaca6d875f.tar.gz
134 cd $(DIR_SRC)/mISDN.git && yes 'yes' | ./std2kern -k /usr/src/linux
7146d4a5 135
df5e82b3
MT
136 # Cleanup kernel source
137 cd $(DIR_APP) && make mrproper
3a1019f6 138
3a1019f6 139ifeq "$(SMP)" "1"
df5e82b3 140 cp $(DIR_SRC)/config/kernel/kernel.config.$(MACHINE).smp $(DIR_APP)/.config
6230f0da
MT
141else
142 cp $(DIR_SRC)/config/kernel/kernel.config.$(MACHINE) $(DIR_APP)/.config
df5e82b3 143endif
df5e82b3
MT
144
145 cd $(DIR_APP) && make CC="$(KGCC)" oldconfig
df5e82b3 146 cd $(DIR_APP) && make CC="$(KGCC)" clean
3a1019f6 147
3a1019f6 148ifeq "$(SMP)" "1"
376e42ce 149 cd $(DIR_APP) && sed -i -e 's/EXTRAVERSION\ =.*/EXTRAVERSION\ =\ $(PATCHLEVEL)-ipfire-smp/' Makefile
872e5216
MT
150 cd $(DIR_APP) && make $(MAKETUNING) CC="$(KGCC)" bzImage
151 cd $(DIR_APP) && cp -v arch/i386/boot/bzImage /boot/vmlinuz-$(VER)-ipfire-smp
376e42ce 152 cd $(DIR_APP) && cp -v System.map /boot/System.map-$(VER)-ipfire-smp
c4166091 153 ln -sf vmlinuz-$(VER)-ipfire-smp /boot/vmlinuz-ipfire-smp
376e42ce
MT
154 cd $(DIR_APP) && make CC="$(KGCC)" $(MAKETUNING) modules
155 cd $(DIR_APP) && make CC="$(KGCC)" $(MAKETUNING) modules_install
376e42ce
MT
156else
157 cd $(DIR_APP) && sed -i -e 's/EXTRAVERSION\ =.*/EXTRAVERSION\ =\ $(PATCHLEVEL)-ipfire/' Makefile
872e5216
MT
158 cd $(DIR_APP) && make $(MAKETUNING) CC="$(KGCC)" bzImage
159 cd $(DIR_APP) && cp -v arch/i386/boot/bzImage /boot/vmlinuz-$(VER)-ipfire
376e42ce
MT
160 cd $(DIR_APP) && cp -v System.map /boot/System.map-$(VER)-ipfire
161 cd $(DIR_APP) && cp -v .config /boot/config-$(VER)-ipfire
89069053 162 ln -sf vmlinuz-$(VER)-ipfire /boot/vmlinuz-ipfire
63817c2a 163 ln -sf System.map-$(VER)-ipfire /boot/System.map-ipfire
376e42ce
MT
164 cd $(DIR_APP) && make CC="$(KGCC)" $(MAKETUNING) modules
165 cd $(DIR_APP) && make CC="$(KGCC)" $(MAKETUNING) modules_install
df5e82b3 166endif
376e42ce 167
ee78a5ef
MT
168ifeq "$(SMP)" ""
169 # Only do this once on the non-SMP pass
81e974f3 170 cd $(DIR_APP) && install -m 755 usr/gen_init_cpio /sbin/
ee78a5ef
MT
171endif
172
f418a984
AF
173 # Rename ide-cd module to match with old kernel
174 mv /lib/modules/$(VER)-ipfire/kernel/drivers/ide/ide-cd_mod.ko \
175 /lib/modules/$(VER)-ipfire/kernel/drivers/ide/ide-cd.ko
176
3185932e 177 @rm -rf $(DIR_SRC)/patch-o-matic* $(DIR_SRC)/iptables* $(DIR_SRC)/squashfs* $(DIR_SRC)/mISDN-* $(DIR_SRC)/netfilter-layer7-*
df5e82b3 178 @$(POSTBUILD)