]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blame - pkgs/core/kernel/kernel.nm
kernel: Update to 2.6.36.
[people/ms/ipfire-3.x.git] / pkgs / core / kernel / kernel.nm
CommitLineData
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 25include $(PKGROOT)/Include
166a6c21
MT
26
27PKG_NAME = linux
6892158b
MT
28PKG_VER = 2.6.36
29PKG_REL = 0
166a6c21
MT
30
31PKG_MAINTAINER = Michael Tremer <michael.tremer@ipfire.org>
32PKG_GROUP = System/Kernels
33PKG_URL = http://www.kernel.org/
34PKG_LICENSE = GPLv2
35PKG_SUMMARY = The Linux kernel.
36
fcfc0d1d
MT
37PKG_BUILD_DEPS+= module-init-tools ncurses-devel perl
38PKG_DEPS-kernel= dracut
f81ab173 39
166a6c21
MT
40define 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.
45endef
46
166a6c21
MT
47CFLAGS =
48CXXFLAGS =
49
ac944179 50LOCALVERSION = -$(DISTRO_SNAME)$(PKG_REL)
58c5fc13 51FULLVER = $(PKG_VER)$(LOCALVERSION)
166a6c21 52
17c0ee8a 53PKG_TARBALL = $(THISAPP).tar.bz2
166a6c21 54
9d1ca333
MT
55PKG_PACKAGES += kernel-headers
56
57PKG_SUMMARY-kernel-headers = Header files if the kernel release $(FULLVER).
58PKG_DESCRIPTION-kernel-headers = $(PKG_SUMMARY-kernel-headers)
59PKG_FILES-kernel-headers = /usr/include
166a6c21 60
17c0ee8a 61define 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
76endef
166a6c21 77
66678ff4 78define 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 85endef
166a6c21 86
17c0ee8a 87define 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 109endef