Annotation of /trunk/core/grub/grub-0.97-r16.smage2
Parent Directory | Revision Log
Revision 5463 -
(hide annotations)
(download)
Fri Jun 25 10:59:38 2010 UTC (14 years ago) by niro
File size: 3814 byte(s)
Fri Jun 25 10:59:38 2010 UTC (14 years ago) by niro
File size: 3814 byte(s)
-added support for dynamic inode sizes
1 | niro | 5461 | # $Id$ |
2 | |||
3 | PNAME="grub" | ||
4 | PVER="0.97" | ||
5 | PBUILD="r16" | ||
6 | |||
7 | PCATEGORIE="sys-apps" | ||
8 | STATE="unstable" | ||
9 | |||
10 | DESCRIPTION="GNU GRUB boot loader." | ||
11 | HOMEPAGE="http://www.gnu.org/software/grub/" | ||
12 | |||
13 | DEPEND=">= sys-libs/ncurses-5.7" | ||
14 | |||
15 | SDEPEND=">= sys-dev/automake-4 | ||
16 | >= sys-dev/autoconf-5" | ||
17 | |||
18 | SRCFILE="${PNAME}-${PVER}.tar.gz" | ||
19 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" | ||
20 | |||
21 | sminclude mtools | ||
22 | |||
23 | SRC_URI=( | ||
24 | ftp://alpha.gnu.org/gnu/${PNAME}/${SRCFILE} | ||
25 | mirror://${PNAME}/${SRCFILE} | ||
26 | mirror://${PNAME}/${PNAME}-${PVER}-splash.patch | ||
27 | mirror://${PNAME}/${PNAME}-${PVER}-pic.patch | ||
28 | mirror://${PNAME}/${PNAME}-${PVER}-initrdmax.patch | ||
29 | mirror://${PNAME}/${PNAME}-${PVER}-nxstack.patch | ||
30 | mirror://${PNAME}/${PNAME}-${PVER}-unsigned-addresses.patch | ||
31 | mirror://${PNAME}/${PNAME}-${PVER}-ext4-4.patch | ||
32 | mirror://${PNAME}/${PNAME}-${PVER}-virtio-blk-support-2.patch | ||
33 | mirror://${PNAME}/${PNAME}-${PVER}-gpt.patch | ||
34 | mirror://${PNAME}/${PNAME}-${PVER}-i2o.patch | ||
35 | mirror://${PNAME}/${PNAME}-${PVER}-intelmac.patch | ||
36 | mirror://${PNAME}/${PNAME}-${PVER}-more-raid.patch | ||
37 | mirror://${PNAME}/${PNAME}-${PVER}-special-devices.patch | ||
38 | niro | 5462 | mirror://${PNAME}/${PNAME}-${PVER}-inode-size.patch |
39 | niro | 5461 | ) |
40 | |||
41 | # get only 0.xx versions! | ||
42 | UP2DATE="updatecmd ftp://alpha.gnu.org/gnu/${PNAME} | grep -- -0.[0-9].* | lasttarball gz" | ||
43 | |||
44 | # grub doesn't like CFLAG optimation, | ||
45 | # and do you really want that at your bootloader ?? | ||
46 | unset CFLAGS | ||
47 | unset CXXFLAGS | ||
48 | |||
49 | src_prepare() | ||
50 | { | ||
51 | munpack ${SRCFILE} || die | ||
52 | cd ${SRCDIR} | ||
53 | |||
54 | # splash support | ||
55 | mpatch ${PNAME}-${PVER}-splash.patch || die | ||
56 | |||
57 | # fix pic issues | ||
58 | mpatch ${PNAME}-${PVER}-pic.patch || die | ||
59 | |||
60 | # do not check initrdmax -> we are using more than 4mb | ||
61 | mpatch ${PNAME}-${PVER}-initrdmax.patch || die | ||
62 | |||
63 | # fix nx issues on x86_64 | ||
64 | mpatch ${PNAME}-${PVER}-nxstack.patch || die | ||
65 | |||
66 | # fix issues on systems with more than 2gb of ram | ||
67 | mpatch ${PNAME}-${PVER}-unsigned-addresses.patch || die | ||
68 | |||
69 | # support booting from ext4 filesystems | ||
70 | mpatch ${PNAME}-${PVER}-ext4-4.patch || die | ||
71 | |||
72 | # handle virtio_blk device names in grub-install | ||
73 | mpatch ${PNAME}-${PVER}-virtio-blk-support-2.patch || die | ||
74 | |||
75 | # support gpt partition tables | ||
76 | mpatch ${PNAME}-${PVER}-gpt.patch || die | ||
77 | |||
78 | # support I2O disks | ||
79 | mpatch ${PNAME}-${PVER}-i2o.patch || die | ||
80 | |||
81 | # support Intel Macs (gateA20) | ||
82 | mpatch ${PNAME}-${PVER}-intelmac.patch || die | ||
83 | |||
84 | # support cciss and other raid devices | ||
85 | mpatch ${PNAME}-${PVER}-more-raid.patch || die | ||
86 | |||
87 | # support dev/{ida,cciss,ataraid,rd} devices names | ||
88 | mpatch ${PNAME}-${PVER}-special-devices.patch || die | ||
89 | |||
90 | niro | 5463 | # support bigger inode sizes (dynamic/V2 inodes) |
91 | niro | 5462 | mpatch ${PNAME}-${PVER}-inode-size.patch || die |
92 | |||
93 | niro | 5461 | # rebuild makefiles |
94 | autoreconf --install --force || die | ||
95 | } | ||
96 | |||
97 | src_compile() | ||
98 | niro | 5463 | { |
99 | niro | 5461 | cd ${SRCDIR} |
100 | |||
101 | # fixes compilation on x86_64; grub cannot build natively on 64bit | ||
102 | # building a static grub, with -m32 in this case | ||
103 | if [[ ${ARCH} = x86_64 ]] | ||
104 | then | ||
105 | export CC="gcc -m32" | ||
106 | export LDFLAGS="-static" | ||
107 | fi | ||
108 | |||
109 | mconfigure || die | ||
110 | mmake || die | ||
111 | } | ||
112 | |||
113 | src_install() | ||
114 | { | ||
115 | cd ${SRCDIR} | ||
116 | |||
117 | # needed directories | ||
118 | minstalldir /boot/grub || die | ||
119 | |||
120 | mmake DESTDIR=${BINDIR} install || die | ||
121 | |||
122 | # stage file locations have changed to /usr/lib | ||
123 | # now copying all stage files | ||
124 | for i in ${BINDIR}/usr/$(mlibdir)/grub/*/* | ||
125 | do | ||
126 | [ -f ${i} ] && cp -p ${i} ${BINDIR}/boot/grub || die ${i} | ||
127 | done | ||
128 | } | ||
129 | |||
130 | preinstall() | ||
131 | { | ||
132 | mount /boot &> /dev/null | ||
133 | } | ||
134 | |||
135 | postinstall() | ||
136 | { | ||
137 | # creates some essential links | ||
138 | if [ ! -e ${MROOT}/boot/boot ] | ||
139 | then | ||
140 | ln -sf . ${MROOT}/boot/boot | ||
141 | fi | ||
142 | |||
143 | if [ ! -e ${MROOT}/boot/grub/menu.lst ] | ||
144 | then | ||
145 | ln -sf /boot/grub/grub.conf ${MROOT}/boot/grub/menu.lst | ||
146 | fi | ||
147 | |||
148 | # creates example grub.conf | ||
149 | if [ ! -e ${MROOT}/boot/grub/grub.conf.example ] | ||
150 | then | ||
151 | cat > ${MROOT}/boot/grub/grub.conf.example << "EOF" | ||
152 | default 0 | ||
153 | timeout 30 | ||
154 | |||
155 | title Magellan-Linux | ||
156 | root (hd0,0) | ||
157 | kernel (hd0,0)/boot/bzImage root=/dev/hda1 | ||
158 | EOF | ||
159 | fi | ||
160 | |||
161 | # update grub | ||
162 | grub --batch --device-map=/boot/grub/device.map </boot/grub/grub.conf >&/dev/null; | ||
163 | } |
Properties
Name | Value |
---|---|
svn:keywords | Id |