1 ###############################################################################
3 # IPFire.org - A linux based firewall #
4 # Copyright (C) 2007, 2008, 2009 Michael Tremer & Christian Schmidt #
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. #
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. #
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/>. #
19 ###############################################################################
21 ###############################################################################
23 ###############################################################################
31 THISAPP = $(PKG_NAME)-$(PKG_VER)
32 DL_FILE = $(THISAPP).tar.gz
33 DIR_APP = $(DIR_SRC)/$(THISAPP)
35 OBJECT = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP)
43 URL = http://www.gnu.org/software/grub/
45 SHORT_DESC = Grand Unified Boot Loader.
48 GRUB (Grand Unified Boot Loader) is an experimental boot loader \
49 capable of booting into most free operating systems - Linux, FreeBSD, \
50 NetBSD, GNU Mach, and others as well as most commercial operating \
57 ###############################################################################
59 ###############################################################################
61 objects = $(DL_FILE) \
63 grub-0.95-moreraid.patch \
64 grub-0.93-special-device-names.patch \
65 grub-0.95-splash-error-term.patch \
66 grub-0.95-xpmjunk.patch \
67 grub-0.93-graphics-bootterm.patch \
68 grub-0.91-splashimagehelp.patch \
69 grub-0.95-graphics.patch \
70 $(THISAPP)-disk_geometry-1.patch \
71 grub-0.93-configfile.patch \
72 $(THISAPP)-256byte_inode-1.patch \
73 grub-0.94-installcopyonly.patch \
74 $(THISAPP)-install.in.patch
89 ###############################################################################
90 # Installation Details
91 ###############################################################################
95 @rm -rf $(DIR_APP) && cd $(DIR_SRC) && $(EXTRACTOR) $(DIR_DL)/$(DL_FILE)
96 cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-disk_geometry-1.patch
97 cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/grub-0.95-graphics.patch
98 cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/grub-0.91-splashimagehelp.patch
99 cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/grub-0.93-graphics-bootterm.patch
100 cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/grub-0.95-xpmjunk.patch
101 cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/grub-0.95-splash-error-term.patch
102 cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/grub-0.93-special-device-names.patch
103 cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/grub-0.95-moreraid.patch
104 cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/grub-0.94-i2o.patch
105 cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/grub-0.93-configfile.patch
106 cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-256byte_inode-1.patch
107 cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-install.in.patch
108 cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/grub-0.94-installcopyonly.patch
110 cd $(DIR_APP) && autoconf
113 CC="gcc -fno-stack-protector -fno-pic -fno-pie -nopie" \
118 cd $(DIR_APP) && make -j $(PRALLELISM)
119 cd $(DIR_APP) && make install
121 sed -e "s/pkgdatadir/pkglibdir/g" -i /usr/sbin/grub-install
125 for i in $(DIR_SRC)/config/bootloader/{grub.conf,splash.xpm.gz}; do \
126 [ -f $$i ] && cp -vf $$i /boot/grub; \
130 # Enable serial console on embedded build
131 sed -e "s/^#serial/serial/" \
132 -e "s/@SERIAL@/console=ttyS0,9600n8/g" \
133 -i /boot/grub/grub.conf
135 # Remove the placeholder @SERIAL@ on non-embedded build
136 sed -e "s/@SERIAL@//g" \
137 -i /boot/grub/grub.conf
140 # Grub uses anonymous mapping and will be killed by PaX.
141 # The following command changes Grub's PaX flags:
142 paxctl -spm /usr/sbin/grub