xen-image: don't autoload all acpi modules
[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
f1bca9a7
AF
27PATCHLEVEL = .25
28VER = 2.6.27.25
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
acdf0e61 37PROG = linux-xen
6134baeb 38PAK_VER = 4
acdf0e61 39DEPS = ""
bd9921dd
MT
40
41# Normal build or XEN build.
df5e82b3 42#
572d19ed 43VERSUFIX=ipfire
2b2e03ed 44TARGET = $(DIR_INFO)/linux-$(VER)-$(VERSUFIX)
6230f0da 45
df5e82b3
MT
46###############################################################################
47# Top-level Rules
48###############################################################################
49objects =$(DL_FILE) \
9c534116 50 squashfs3.4.tar.gz \
d1fd2b03 51 netfilter-layer7-v2.21.tar.gz \
f418a984 52 patch-2.6.16-nath323-1.3.bz2 \
a3b414d3 53 reiser4-for-2.6.27.19.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
a3b414d3 59reiser4-for-2.6.27.19.patch.bz2 = $(URL_IPFIRE)/reiser4-for-2.6.27.19.patch.bz2
4ce37908 60
f1bca9a7 61$(DL_FILE)_MD5 = 5d6dcff157f30d742c9ee28ad4589779
d1fd2b03 62netfilter-layer7-v2.21.tar.gz_MD5 = 838422e7d9a06b42e682e9064e5210b5
3185932e 63patch-2.6.16-nath323-1.3.bz2_MD5 = f926409ff703a307baf54b57ab75d138
9c534116 64squashfs3.4.tar.gz_MD5 = 2a4d2995ad5aa6840c95a95ffa6b1da6
a3b414d3 65reiser4-for-2.6.27.19.patch.bz2_MD5 = 22988387f64f299489b90b484b2642cc
df5e82b3
MT
66
67install : $(TARGET)
68
69check : $(patsubst %,$(DIR_CHK)/%,$(objects))
70
71download :$(patsubst %,$(DIR_DL)/%,$(objects))
72
73md5 : $(subst %,%_MD5,$(objects))
74
f418a984
AF
75dist:
76 @$(PAK)
df5e82b3
MT
77###############################################################################
78# Downloading, checking, md5sum
79###############################################################################
80
81$(patsubst %,$(DIR_CHK)/%,$(objects)) :
82 @$(CHECK)
83
84$(patsubst %,$(DIR_DL)/%,$(objects)) :
85 @$(LOAD)
86
87$(subst %,%_MD5,$(objects)) :
88 @$(MD5)
89
90###############################################################################
91# Installation Details
92###############################################################################
93
94$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
95 @$(PREBUILD)
f418a984 96 @rm -rf $(DIR_APP) $(DIR_SRC)/linux $(DIR_SRC)/xen-* && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
8eec2184 97 ln -s linux-$(VER) /usr/src/linux
3a1019f6 98
bd9921dd 99 # Linux Intermediate Queueing Device
3a65a332 100 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.6.27.21-imq-test3.patch
bd9921dd 101
f418a984
AF
102 # Not report deprecated syscall 1.23 (for kudzu)
103 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.6.25.18-not_report_sysctl_1.23.patch
104
708a5196
AF
105 # Add Vodafone K3565-Z USB ID's to option driver
106 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.6.27.25-option_add_vf-k3565-z_usbids.patch
107
44254afd 108 # Reiser4
a3b414d3 109 cd $(DIR_APP) && bzip2 -d -c $(DIR_DL)/reiser4-for-2.6.27.19.patch.bz2 | patch -Np1
f418a984 110
3185932e
MT
111 # SquashFS
112 cd $(DIR_SRC) && rm -rf squashfs*
9c534116 113 cd $(DIR_SRC) && tar xfz $(DIR_DL)/squashfs3.4.tar.gz
a3b414d3
AF
114 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/squashfs3.4/kernel-patches/linux-2.6.27-rc4/squashfs3.4-patch
115
4f1b7a27 116 # ipp2p 0.8.2-pomng
a3b414d3 117 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.6.27.19-ipp2p-0.8.2-pomng.patch
4f1b7a27 118
3a1019f6 119 # Layer7-patch
d1fd2b03
AF
120 cd $(DIR_SRC) && rm -rf $(DIR_SRC)/netfilter-layer7-v2.21
121 cd $(DIR_SRC) && tar xzf $(DIR_DL)/netfilter-layer7-v2.21.tar.gz
122 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/netfilter-layer7-v2.21/kernel-2.6.25-2.6.28-layer7-2.21.patch
df5e82b3 123
df5e82b3
MT
124 # Cleanup kernel source
125 cd $(DIR_APP) && make mrproper
3a1019f6 126
2b2e03ed 127 cp $(DIR_SRC)/config/kernel/kernel.config.$(MACHINE)-$(VERSUFIX) $(DIR_APP)/.config
bd9921dd 128 cd $(DIR_APP) && make CC="$(KGCC)" oldconfig
df5e82b3 129 cd $(DIR_APP) && make CC="$(KGCC)" clean
2b2e03ed 130 cd $(DIR_APP) && sed -i -e 's/EXTRAVERSION\ =.*/EXTRAVERSION\ =\ $(PATCHLEVEL)-$(VERSUFIX)/' Makefile
3a1019f6 131
872e5216 132 cd $(DIR_APP) && make $(MAKETUNING) CC="$(KGCC)" bzImage
2b2e03ed
AF
133 cd $(DIR_APP) && cp -v arch/i386/boot/bzImage /boot/vmlinuz-$(VER)-$(VERSUFIX)
134 cd $(DIR_APP) && cp -v System.map /boot/System.map-$(VER)-$(VERSUFIX)
135 cd $(DIR_APP) && cp -v .config /boot/config-$(VER)-$(VERSUFIX)
136 ln -sf vmlinuz-$(VER)-$(VERSUFIX) /boot/vmlinuz-$(VERSUFIX)
137 ln -sf System.map-$(VER)-$(VERSUFIX) /boot/System.map-$(VERSUFIX)
376e42ce
MT
138 cd $(DIR_APP) && make CC="$(KGCC)" $(MAKETUNING) modules
139 cd $(DIR_APP) && make CC="$(KGCC)" $(MAKETUNING) modules_install
a3b414d3 140 cd $(DIR_APP) && make CC="$(KGCC)" $(MAKETUNING) firmware_install
376e42ce 141
bd9921dd 142 # Only do this once on the non-XEN pass
81e974f3 143 cd $(DIR_APP) && install -m 755 usr/gen_init_cpio /sbin/
ee78a5ef 144
bd9921dd 145 # Rename ide-cd module to match with old kernel
2b2e03ed
AF
146 mv /lib/modules/$(VER)-$(VERSUFIX)/kernel/drivers/ide/ide-cd_mod.ko \
147 /lib/modules/$(VER)-$(VERSUFIX)/kernel/drivers/ide/ide-cd.ko
bd9921dd
MT
148
149 # Remove mISDN modules
2b2e03ed
AF
150 rm -rvf /lib/modules/$(VER)-$(VERSUFIX)/kernel/drivers/isdn/mISDN
151 rm -rvf /lib/modules/$(VER)-$(VERSUFIX)/kernel/drivers/isdn/hardware/mISDN
d644d86f
AF
152
153 @rm -rf $(DIR_SRC)/patch-o-matic* $(DIR_SRC)/iptables* $(DIR_SRC)/squashfs* $(DIR_SRC)/netfilter-layer7-*
df5e82b3 154 @$(POSTBUILD)