]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blame - lfs/linux
Add a patch for H12Y crashes
[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
202f35e2
AF
27PATCHLEVEL = .17
28VER = 2.6.23.17
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###############################################################################
47# Top-level Rules
48###############################################################################
49objects =$(DL_FILE) \
64cf4991 50 mISDN-1_1_8.tar.gz \
4ce37908 51 squashfs3.3.tgz \
a6e9d42e 52 netfilter-layer7-v2.18.tar.gz \
38f05351
AF
53 patch-2.6.16-nath323-1.3.bz2
54
64cf4991 55$(DL_FILE) = $(URL_IPFIRE)/$(DL_FILE)
a6e9d42e 56netfilter-layer7-v2.18.tar.gz = $(URL_IPFIRE)/netfilter-layer7-v2.18.tar.gz
4ce37908
MT
57patch-2.6.16-nath323-1.3.bz2 = $(URL_IPFIRE)/patch-2.6.16-nath323-1.3.bz2
58squashfs3.3.tgz = $(URL_IPFIRE)/squashfs3.3.tgz
64cf4991 59mISDN-1_1_8.tar.gz = $(URL_IPFIRE)/mISDN-1_1_8.tar.gz
4ce37908 60
202f35e2 61$(DL_FILE)_MD5 = a0300a393ac91ce9c64bf31522b45e2e
a6e9d42e 62netfilter-layer7-v2.18.tar.gz_MD5 = 8d2e2c00f5c20e8c0852998035aeffd2
3185932e 63patch-2.6.16-nath323-1.3.bz2_MD5 = f926409ff703a307baf54b57ab75d138
4ce37908 64squashfs3.3.tgz_MD5 = 95c40fca0d886893631b5de14a0af25b
64cf4991 65mISDN-1_1_8.tar.gz_MD5 = 29c55ffe0b35668a41eaed3b1c3ddfe2
df5e82b3
MT
66
67install : $(TARGET)
68
69check : $(patsubst %,$(DIR_CHK)/%,$(objects))
70
71download :$(patsubst %,$(DIR_DL)/%,$(objects))
72
73md5 : $(subst %,%_MD5,$(objects))
74
75###############################################################################
76# Downloading, checking, md5sum
77###############################################################################
78
79$(patsubst %,$(DIR_CHK)/%,$(objects)) :
80 @$(CHECK)
81
82$(patsubst %,$(DIR_DL)/%,$(objects)) :
83 @$(LOAD)
84
85$(subst %,%_MD5,$(objects)) :
86 @$(MD5)
87
88###############################################################################
89# Installation Details
90###############################################################################
91
92$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
93 @$(PREBUILD)
3185932e 94 @rm -rf $(DIR_APP) $(DIR_SRC)/linux $(DIR_SRC)/xen-* && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
8eec2184 95 ln -s linux-$(VER) /usr/src/linux
3a1019f6 96
aaf38362 97 # Security fix for CIFS & Netfilter SNMP
f110a344 98 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.6.20.21-additional_check_on_BER_decoding.patch
aaf38362 99
f36f5b08
AF
100 # Add devolo MicroLink ADSL Fun USB ID's to ueagle-atm
101 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.6.23-ueagle-atm-devolo_usb_id.patch
102
0c2b766c
AF
103 # Fix crash on Twinhead H12Y notebooks
104 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-h12y-mmio-quirks.patch
105
45ff5fa6 106 # Openswan
202f35e2 107 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/openswan-2.4.x.kernel-2.6.23-natt.patch
ac1cfefa 108
44254afd 109 # Reiser4
202f35e2 110 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/reiser4-for-2.6.23.patch
3185932e
MT
111
112 # SquashFS
113 cd $(DIR_SRC) && rm -rf squashfs*
4ce37908 114 cd $(DIR_SRC) && tar xfz $(DIR_DL)/squashfs3.3.tgz
202f35e2 115 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/squashfs3.3/kernel-patches/linux-2.6.23/squashfs3.3-patch
89069053 116
56b548f1 117 # ip_conntrack permissions from 440 to 444
64cf4991 118# cd $(DIR_APP) && patch -Np0 < $(DIR_SRC)/src/patches/ip_conntrack_standalone-patch-for-ipfire.patch
3185932e 119
3a1019f6 120 # Layer7-patch
a6e9d42e
AF
121 cd $(DIR_SRC) && rm -rf $(DIR_SRC)/netfilter-layer7-v2.18
122 cd $(DIR_SRC) && tar xzf $(DIR_DL)/netfilter-layer7-v2.18.tar.gz
64cf4991 123 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/netfilter-layer7-v2.18/for_older_kernels/kernel-2.6.22-2.6.24-layer7-2.18.patch
df5e82b3 124
6f300951 125 # Linux Intermediate Queueing Device
3185932e 126ifeq "$(XEN)" ""
202f35e2 127 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.6.23-imq.diff
3185932e 128endif
769a61c5 129
1ee8bf5d 130 # mISDN
376e42ce 131 cd $(DIR_SRC) && rm -rf mISDN-*
64cf4991
AF
132 cd $(DIR_SRC) && tar xfz $(DIR_DL)/mISDN-1_1_8.tar.gz
133 cd $(DIR_SRC)/mISDN-1_1_8 && yes 'yes' | ./std2kern -k /usr/src/linux
7146d4a5
MT
134
135 cd $(DIR_APP)/drivers/isdn/hardware/mISDN && patch -Np0 < $(DIR_SRC)/src/patches/mISDN-avmfritz.patch
3185932e 136
df5e82b3
MT
137 # Cleanup kernel source
138 cd $(DIR_APP) && make mrproper
3a1019f6 139
3a1019f6 140ifeq "$(SMP)" "1"
df5e82b3 141 cp $(DIR_SRC)/config/kernel/kernel.config.$(MACHINE).smp $(DIR_APP)/.config
6230f0da
MT
142else
143 cp $(DIR_SRC)/config/kernel/kernel.config.$(MACHINE) $(DIR_APP)/.config
df5e82b3 144endif
df5e82b3
MT
145
146 cd $(DIR_APP) && make CC="$(KGCC)" oldconfig
df5e82b3 147 cd $(DIR_APP) && make CC="$(KGCC)" clean
3a1019f6 148
3a1019f6 149ifeq "$(SMP)" "1"
376e42ce 150 cd $(DIR_APP) && sed -i -e 's/EXTRAVERSION\ =.*/EXTRAVERSION\ =\ $(PATCHLEVEL)-ipfire-smp/' Makefile
872e5216
MT
151 cd $(DIR_APP) && make $(MAKETUNING) CC="$(KGCC)" bzImage
152 cd $(DIR_APP) && cp -v arch/i386/boot/bzImage /boot/vmlinuz-$(VER)-ipfire-smp
376e42ce 153 cd $(DIR_APP) && cp -v System.map /boot/System.map-$(VER)-ipfire-smp
c4166091 154 ln -sf vmlinuz-$(VER)-ipfire-smp /boot/vmlinuz-ipfire-smp
376e42ce
MT
155 cd $(DIR_APP) && make CC="$(KGCC)" $(MAKETUNING) modules
156 cd $(DIR_APP) && make CC="$(KGCC)" $(MAKETUNING) modules_install
376e42ce
MT
157else
158 cd $(DIR_APP) && sed -i -e 's/EXTRAVERSION\ =.*/EXTRAVERSION\ =\ $(PATCHLEVEL)-ipfire/' Makefile
872e5216
MT
159 cd $(DIR_APP) && make $(MAKETUNING) CC="$(KGCC)" bzImage
160 cd $(DIR_APP) && cp -v arch/i386/boot/bzImage /boot/vmlinuz-$(VER)-ipfire
376e42ce
MT
161 cd $(DIR_APP) && cp -v System.map /boot/System.map-$(VER)-ipfire
162 cd $(DIR_APP) && cp -v .config /boot/config-$(VER)-ipfire
89069053 163 ln -sf vmlinuz-$(VER)-ipfire /boot/vmlinuz-ipfire
63817c2a 164 ln -sf System.map-$(VER)-ipfire /boot/System.map-ipfire
376e42ce
MT
165 cd $(DIR_APP) && make CC="$(KGCC)" $(MAKETUNING) modules
166 cd $(DIR_APP) && make CC="$(KGCC)" $(MAKETUNING) modules_install
df5e82b3 167endif
376e42ce 168
ee78a5ef
MT
169ifeq "$(SMP)" ""
170 # Only do this once on the non-SMP pass
81e974f3 171 cd $(DIR_APP) && install -m 755 usr/gen_init_cpio /sbin/
ee78a5ef
MT
172endif
173
3185932e 174 @rm -rf $(DIR_SRC)/patch-o-matic* $(DIR_SRC)/iptables* $(DIR_SRC)/squashfs* $(DIR_SRC)/mISDN-* $(DIR_SRC)/netfilter-layer7-*
df5e82b3 175 @$(POSTBUILD)
64cf4991 176