]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blob - lfs/linux
Updated findutils, automake, reiser4progs and the linux kernel.
[people/ms/ipfire-3.x.git] / lfs / linux
1 ###############################################################################
2 # #
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 #
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
25 include Config
26
27 PKG_NAME = linux
28 VER = 2.6.24
29
30 THISAPP = $(PKG_NAME)-$(VER)
31 DL_FILE = $(THISAPP).tar.bz2
32 DIR_APP = $(DIR_SRC)/$(THISAPP)
33 CFLAGS =
34 CXXFLAGS =
35
36 TARGET = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP)
37
38 FULLVER = $(VER)-ipfire1
39 EXTRAVERSION = $(shell echo "$(FULLVER)" | cut -c 7-)
40
41 IPP2P = ipp2p-0.8.2-ipfire-1
42 L7VER = 2.15
43
44 ###############################################################################
45 # Top-level Rules
46 ###############################################################################
47
48 objects = $(DL_FILE) $(IPP2P).tar.bz2 layer7-kernel-$(L7VER).patch \
49 reiser4-2.6.23-2.patch
50
51 install : $(TARGET)
52
53 download :$(patsubst %,$(DIR_DL)/%,$(objects))
54
55 $(patsubst %,$(DIR_DL)/%,$(objects)) :
56 @$(LOAD)
57
58 ###############################################################################
59 # Installation Details
60 ###############################################################################
61
62 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
63 @$(PREBUILD)
64 @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
65
66 ifeq "$(STAGE)" "toolchain"
67 cd $(DIR_APP) && make mrproper
68 cd $(DIR_APP) && make headers_check
69 cd $(DIR_APP) && make INSTALL_HDR_PATH=dest headers_install
70 cd $(DIR_APP) && cp -rv dest/include/* $(TOOLS_DIR)/include
71 endif
72
73 ifeq "$(STAGE)" "base"
74 cd $(DIR_APP) && make mrproper
75 cd $(DIR_APP) && make headers_check
76 cd $(DIR_APP) && make INSTALL_HDR_PATH=dest headers_install
77 cd $(DIR_APP) && cp -rv dest/include/* /usr/include
78 endif
79
80 ifeq "$(STAGE)" "ipfire"
81
82 ### Reiser4
83 #
84 cd $(DIR_APP) && patch -Np1 < $(DIR_PATCHES)/reiser4-for-2.6.24.patch
85
86 # ip_conntrack permissions from 440 to 444
87 #cd $(DIR_APP) && patch -Np0 < $(DIR_PATCHES)/ip_conntrack_standalone-patch-for-ipfire.patch
88
89 cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/layer7-kernel-$(L7VER).patch
90
91 cd $(DIR_APP) && make mrproper
92
93 cp $(DIR_SRC)/config/kernel/kernel.config.$(MACHINE) $(DIR_APP)/.config
94 cd $(DIR_APP) && sed -i -e "s/EXTRAVERSION\ =.*/EXTRAVERSION\ =\ $(EXTRAVERSION)/" \
95 Makefile
96
97 cd $(DIR_APP) && make oldconfig
98
99 cd $(DIR_APP) && make -j $(PARALLELISM)
100 cd $(DIR_APP) && make modules_install
101
102 cd $(DIR_APP) && cp -v arch/i386/boot/bzImage /boot/ipfirekernel-$(FULLVER)
103 cd $(DIR_APP) && cp -v System.map /boot/System.map-$(FULLVER)
104
105 ln -svf ipfirekernel-$(FULLVER) /boot/ipfirekernel
106 ln -svf System.map-$(FULLVER) /boot/System.map
107
108 ### Building other modules
109 #
110 ## IPP2P
111 #cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(IPP2P).tar.bz2
112 #cd $(DIR_SRC)/$(IPP2P) && KERNEL_SRC=$(DIR_APP) make ipt_ipp2p.ko
113 #cd $(DIR_SRC)/$(IPP2P) && cp -f ipt_ipp2p.ko \
114 # /lib/modules/$(KVER)-ipfire/kernel/net/ipv4/netfilter
115 #rm -rf $(DIR_SRC)/$(IPP2P)
116 endif
117
118 @rm -rf $(DIR_APP)
119 @$(POSTBUILD)