]>
Commit | Line | Data |
---|---|---|
166a6c21 MT |
1 | ############################################################################### |
2 | # # | |
3 | # IPFire.org - A linux based firewall # | |
4 | # Copyright (C) 2007, 2008, 2009 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 | ||
a7c97434 | 25 | include $(PKGROOT)/Include |
166a6c21 MT |
26 | |
27 | PKG_NAME = linux | |
317566c1 | 28 | PKG_VER = 2.6.37.2 |
fc3440f6 | 29 | PKG_REL = 2 |
166a6c21 MT |
30 | |
31 | PKG_MAINTAINER = Michael Tremer <michael.tremer@ipfire.org> | |
bb7d617c | 32 | PKG_GROUPS = System/Kernels |
166a6c21 MT |
33 | PKG_URL = http://www.kernel.org/ |
34 | PKG_LICENSE = GPLv2 | |
35 | PKG_SUMMARY = The Linux kernel. | |
36 | ||
fcfc0d1d | 37 | PKG_BUILD_DEPS+= module-init-tools ncurses-devel perl |
56fd809a | 38 | PKG_DEPS-kernel= dracut linux-firmware |
f81ab173 | 39 | |
166a6c21 MT |
40 | define PKG_DESCRIPTION |
41 | The kernel package contains the Linux kernel (vmlinuz), the core of any \ | |
42 | Linux operating system. The kernel handles the basic functions \ | |
43 | of the operating system: memory allocation, process allocation, device \ | |
44 | input and output, etc. | |
45 | endef | |
46 | ||
166a6c21 MT |
47 | CFLAGS = |
48 | CXXFLAGS = | |
49 | ||
ac944179 | 50 | LOCALVERSION = -$(DISTRO_SNAME)$(PKG_REL) |
58c5fc13 | 51 | FULLVER = $(PKG_VER)$(LOCALVERSION) |
166a6c21 | 52 | |
17c0ee8a | 53 | PKG_TARBALL = $(THISAPP).tar.bz2 |
166a6c21 | 54 | |
9d1ca333 MT |
55 | PKG_PACKAGES += kernel-headers |
56 | ||
57 | PKG_SUMMARY-kernel-headers = Header files if the kernel release $(FULLVER). | |
58 | PKG_DESCRIPTION-kernel-headers = $(PKG_SUMMARY-kernel-headers) | |
59 | PKG_FILES-kernel-headers = /usr/include | |
166a6c21 | 60 | |
17c0ee8a | 61 | define STAGE_PREPARE_CMDS |
ac944179 | 62 | cd $(DIR_APP) && echo "$(LOCALVERSION)" > localversion-$(DISTRO_SNAME) |
166a6c21 MT |
63 | rm -f $(DIR_APP)/localversion-grsec |
64 | ||
166a6c21 MT |
65 | cd $(DIR_APP) && sed -e "s/^HOSTCFLAGS.*=.*/& -fPIC/g" -i Makefile |
66 | ||
17c0ee8a MT |
67 | #cd $(DIR_APP) && echo "source \"crypto/ocf/Kconfig\"" >> crypto/Kconfig |
68 | ||
69 | cd $(DIR_APP) && cp -vf $(DIR_SOURCE)/$(DISTRO_SNAME)_logo.ppm \ | |
70 | drivers/video/logo/logo_linux_clut224.ppm | |
166a6c21 MT |
71 | |
72 | cd $(DIR_APP) && make mrproper | |
73 | ||
66678ff4 MT |
74 | # Install configuration file |
75 | cp -f $(DIR_SOURCE)/config $(DIR_APP)/.config | |
76 | endef | |
166a6c21 | 77 | |
66678ff4 | 78 | define STAGE_BUILD |
166a6c21 | 79 | cd $(DIR_APP) && yes "" | make oldconfig |
9d1ca333 MT |
80 | |
81 | # Check headers | |
82 | cd $(DIR_APP) && make ARCH=x86 headers_check | |
83 | ||
166a6c21 | 84 | cd $(DIR_APP) && make CC="gcc -nopie" $(PARALLELISMFLAGS) |
17c0ee8a | 85 | endef |
166a6c21 | 86 | |
17c0ee8a | 87 | define STAGE_INSTALL |
990e0b86 | 88 | cd $(DIR_APP) && make modules_install INSTALL_MOD_PATH=$(BUILDROOT) |
166a6c21 | 89 | |
990e0b86 | 90 | -mkdir -pv $(BUILDROOT)/boot |
8431831e | 91 | cd $(DIR_APP) && cp -v arch/x86/boot/bzImage $(BUILDROOT)/boot/vmlinuz-$(FULLVER) |
990e0b86 | 92 | cd $(DIR_APP) && cp -v System.map $(BUILDROOT)/boot/System.map-$(FULLVER) |
166a6c21 | 93 | |
98814918 MT |
94 | -mkdir -pv $(BUILDROOT)/lib/modules/$(FULLVER)/extra |
95 | ||
96 | rm -vf $(BUILDROOT)/lib/modules/$(FULLVER)/{build,source} | |
9d1ca333 MT |
97 | |
98 | # Install the header files | |
99 | cd $(DIR_APP) && make ARCH=x86 INSTALL_HDR_PATH=dest headers_install | |
100 | -mkdir -pv $(BUILDROOT)/usr/include | |
101 | cd $(DIR_APP) && find dest/include \( -name .install -o -name ..install.cmd \) -delete | |
102 | cd $(DIR_APP) && cp -rv dest/include/* $(BUILDROOT)/usr/include | |
103 | ||
104 | # Glibc provides these headers | |
105 | rm -rfv $(BUILDROOT)/usr/include/scsi \ | |
106 | $(BUILDROOT)/usr/include/asm*/atomic.h \ | |
107 | $(BUILDROOT)/usr/include/asm*/io.h \ | |
108 | $(BUILDROOT)/usr/include/asm*/irq.h | |
17c0ee8a | 109 | endef |