Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 46410 | Differences between
and this patch

Collapse All | Expand All

(-)./grub-0.94.orig/config.h.in (+6 lines)
Lines 50-55 Link Here
50
/* Define to 1 if you have the <inttypes.h> header file. */
50
/* Define to 1 if you have the <inttypes.h> header file. */
51
#undef HAVE_INTTYPES_H
51
#undef HAVE_INTTYPES_H
52
52
53
/* Define to 1 if you have the `aal-alone' library (-laal-alone). */
54
#undef HAVE_LIBAAL_ALONE
55
56
/* Define to 1 if you have the `reiser4-alone' library (-lreiser4-alone). */
57
#undef HAVE_LIBREISER4_ALONE
58
53
/* Define to 1 if you have the <memory.h> header file. */
59
/* Define to 1 if you have the <memory.h> header file. */
54
#undef HAVE_MEMORY_H
60
#undef HAVE_MEMORY_H
55
61
(-)./grub-0.94.orig/configure.ac (+71 lines)
Lines 241-246 Link Here
241
  FSYS_CFLAGS="$FSYS_CFLAGS -DFSYS_REISERFS=1"
241
  FSYS_CFLAGS="$FSYS_CFLAGS -DFSYS_REISERFS=1"
242
fi
242
fi
243
243
244
dnl Checking for reiser4
245
REISER4_LIBS=""
246
REISER4_CFLAGS=""
247
248
OLD_LIBS=$LIBS
249
OLD_CFLAGS=$CFLAGS
250
LIBS=""
251
CFLAGS=""
252
253
AC_ARG_ENABLE(reiser4,
254
  [  --disable-reiser4       disable Reiser4 support in Stage 2])
255
256
enable_reiser4_support=yes
257
 
258
AC_CHECK_LIB(aal-alone, aal_mem_init, , 
259
  AC_MSG_WARN(
260
Reiser4 support is disabled due to inability find libaal-alone with 
261
memory manager support turned on.)
262
  enable_reiser4_support=no
263
)
264
265
if test x"$enable_reiser4_support" != xno; then
266
  AC_CHECK_HEADER(aal/libaal.h, ,
267
  AC_MSG_WARN(
268
Libaal header files are not found. Reiser4 support is disabled
269
  )
270
  enable_reiser4_support=no)
271
fi
272
  
273
if test x"$enable_reiser4_support" != xno; then
274
  AC_CHECK_LIB(reiser4-alone, reiser4_fs_open, , 
275
  AC_MSG_WARN(
276
Reiser4 support is disabled due to inability find valid libreiser4-alone.)
277
    enable_reiser4_support=no, 
278
    -laal-alone
279
  )
280
fi
281
282
if test x"$enable_reiser4_support" != xno; then
283
  AC_CHECK_HEADER(reiser4/libreiser4.h, ,
284
  AC_MSG_WARN(
285
Reiser4 header files are not found. Reiser4 support is disabled.
286
  )
287
  enable_reiser4_support=no)
288
fi
289
290
if test x"$enable_reiser4_support" != xno; then
291
  REISER4_CFLAGS="$REISER4_CFLAGS -DFSYS_REISER4=1"
292
  REISER4_LIBS=$LIBS
293
fi
294
295
if test x"$enable_reiser4_support" != xno; then
296
  AC_CHECK_LIB(reiser4-alone, __sym40_plug_init, 
297
    REISER4_CFLAGS="$REISER4_CFLAGS -DENABLE_SYMLINKS=1",
298
AC_MSG_WARN(Reiser4 symlinks support is disabled.), 
299
    -laal-alone
300
  )
301
fi
302
303
LIBS=$OLD_LIBS
304
CFLAGS=$OLD_CFLAGS
305
306
if test x"$enable_reiser4" != xno; then
307
  (test x"$enable_reiser4_support" != xno) &&
308
    FSYS_CFLAGS="$FSYS_CFLAGS $REISER4_CFLAGS"
309
fi
310
311
AC_SUBST(REISER4_LIBS)
312
AC_SUBST(REISER4_CFLAGS)
313
AM_CONDITIONAL(ENABLE_REISER4_SUPPORT, test x"$enable_reiser4_support" != xno)
314
244
AC_ARG_ENABLE(vstafs,
315
AC_ARG_ENABLE(vstafs,
245
  [  --disable-vstafs        disable VSTa FS support in Stage 2])
316
  [  --disable-vstafs        disable VSTa FS support in Stage 2])
246
317
(-)./grub-0.94.orig/docs/grub.texi (-1 / +2 lines)
Lines 277-283 Link Here
277
Support multiple filesystem types transparently, plus a useful explicit
277
Support multiple filesystem types transparently, plus a useful explicit
278
blocklist notation. The currently supported filesystem types are
278
blocklist notation. The currently supported filesystem types are
279
@dfn{BSD FFS}, @dfn{DOS FAT16 and FAT32}, @dfn{Minix fs}, @dfn{Linux
279
@dfn{BSD FFS}, @dfn{DOS FAT16 and FAT32}, @dfn{Minix fs}, @dfn{Linux
280
ext2fs}, @dfn{ReiserFS}, @dfn{JFS}, @dfn{XFS}, and @dfn{VSTa
280
ext2fs}, @dfn{ReiserFS}, @dfn{Reiser4}, @dfn{JFS}, @dfn{XFS}, and @dfn{VSTa
281
fs}. @xref{Filesystem}, for more information.
281
fs}. @xref{Filesystem}, for more information.
282
282
283
@item Support automatic decompression
283
@item Support automatic decompression
Lines 1528-1533 Link Here
1528
@itemx jfs_stage1_5
1528
@itemx jfs_stage1_5
1529
@itemx minix_stage1_5
1529
@itemx minix_stage1_5
1530
@itemx reiserfs_stage1_5
1530
@itemx reiserfs_stage1_5
1531
@itemx reiser4_stage1_5
1531
@itemx vstafs_stage1_5
1532
@itemx vstafs_stage1_5
1532
@itemx xfs_stage1_5
1533
@itemx xfs_stage1_5
1533
1534
(-)./grub-0.94.orig/grub/Makefile.am (-1 / +1 lines)
Lines 14-17 Link Here
14
AM_CFLAGS = $(GRUB_CFLAGS) -fwritable-strings
14
AM_CFLAGS = $(GRUB_CFLAGS) -fwritable-strings
15
15
16
grub_SOURCES = main.c asmstub.c
16
grub_SOURCES = main.c asmstub.c
17
grub_LDADD = ../stage2/libgrub.a  ../lib/libcommon.a $(GRUB_LIBS)
17
grub_LDADD = ../stage2/libgrub.a ../lib/libcommon.a $(GRUB_LIBS) $(REISER4_LIBS) 
(-)./grub-0.94.orig/INSTALL (+3 lines)
Lines 207-212 Link Here
207
`--disable-reiserfs'
207
`--disable-reiserfs'
208
     Omit the ReiserFS support in Stage 2.
208
     Omit the ReiserFS support in Stage 2.
209
209
210
`--disable-reiser4'
211
     Omit the Reiser4 support in Stage 2.
212
210
`--disable-vstafs'
213
`--disable-vstafs'
211
     Omit the VSTa filesystem support in Stage 2.
214
     Omit the VSTa filesystem support in Stage 2.
212
215
(-)./grub-0.94.orig/stage2/builtins.c (+1 lines)
Lines 3751-3756 Link Here
3751
    {"jfs",      "/jfs_stage1_5"},
3751
    {"jfs",      "/jfs_stage1_5"},
3752
    {"minix",    "/minix_stage1_5"},
3752
    {"minix",    "/minix_stage1_5"},
3753
    {"reiserfs", "/reiserfs_stage1_5"},
3753
    {"reiserfs", "/reiserfs_stage1_5"},
3754
    {"reiser4",  "/reiser4_stage1_5"},
3754
    {"vstafs",   "/vstafs_stage1_5"},
3755
    {"vstafs",   "/vstafs_stage1_5"},
3755
    {"xfs",      "/xfs_stage1_5"}
3756
    {"xfs",      "/xfs_stage1_5"}
3756
  };
3757
  };
(-)./grub-0.94.orig/stage2/disk_io.c (+3 lines)
Lines 63-68 Link Here
63
# ifdef FSYS_REISERFS
63
# ifdef FSYS_REISERFS
64
  {"reiserfs", reiserfs_mount, reiserfs_read, reiserfs_dir, 0, reiserfs_embed},
64
  {"reiserfs", reiserfs_mount, reiserfs_read, reiserfs_dir, 0, reiserfs_embed},
65
# endif
65
# endif
66
# ifdef FSYS_REISER4
67
  {"reiser4", reiser4_mount, reiser4_read, reiser4_dir, 0, reiser4_embed},
68
# endif
66
# ifdef FSYS_VSTAFS
69
# ifdef FSYS_VSTAFS
67
  {"vstafs", vstafs_mount, vstafs_read, vstafs_dir, 0, 0},
70
  {"vstafs", vstafs_mount, vstafs_read, vstafs_dir, 0, 0},
68
# endif
71
# endif
(-)./grub-0.94.orig/stage2/filesys.h (-2 / +12 lines)
Lines 67-72 Link Here
67
#define FSYS_REISERFS_NUM 0
67
#define FSYS_REISERFS_NUM 0
68
#endif
68
#endif
69
69
70
#ifdef FSYS_REISER4
71
#define FSYS_REISER4_NUM 1
72
int reiser4_mount (void);
73
int reiser4_read (char *buf, int len);
74
int reiser4_dir (char *dirname);
75
int reiser4_embed (int *start_sector, int needed_sectors);
76
#else
77
#define FSYS_REISER4_NUM 0
78
#endif
79
70
#ifdef FSYS_VSTAFS
80
#ifdef FSYS_VSTAFS
71
#define FSYS_VSTAFS_NUM 1
81
#define FSYS_VSTAFS_NUM 1
72
int vstafs_mount (void);
82
int vstafs_mount (void);
Lines 108-115 Link Here
108
#ifndef NUM_FSYS
118
#ifndef NUM_FSYS
109
#define NUM_FSYS	\
119
#define NUM_FSYS	\
110
  (FSYS_FFS_NUM + FSYS_FAT_NUM + FSYS_EXT2FS_NUM + FSYS_MINIX_NUM	\
120
  (FSYS_FFS_NUM + FSYS_FAT_NUM + FSYS_EXT2FS_NUM + FSYS_MINIX_NUM	\
111
   + FSYS_REISERFS_NUM + FSYS_VSTAFS_NUM + FSYS_JFS_NUM + FSYS_XFS_NUM	\
121
   + FSYS_REISERFS_NUM + FSYS_REISER4_NUM + FSYS_VSTAFS_NUM + FSYS_JFS_NUM \
112
   + FSYS_TFTP_NUM)
122
   + FSYS_XFS_NUM + FSYS_TFTP_NUM)
113
#endif
123
#endif
114
124
115
/* defines for the block filesystem info area */
125
/* defines for the block filesystem info area */
(-)./grub-0.94.orig/stage2/fsys_reiser4.c (+245 lines)
Line 0 Link Here
1
/* 
2
 *  fsys_reiser4.c -- reiser4 filesystem support.
3
 *  Copyright (C) 2001, 2002, 2003 Hans Reiser.
4
 *  
5
 *  GRUB  --  GRand Unified Bootloader
6
 *
7
 *  This program is free software; you can redistribute it and/or modify
8
 *  it under the terms of the GNU General Public License as published by
9
 *  the Free Software Foundation; either version 2 of the License, or
10
 *  (at your option) any later version.
11
 *
12
 *  This program is distributed in the hope that it will be useful,
13
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 *  GNU General Public License for more details.
16
 *
17
 *  You should have received a copy of the GNU General Public License
18
 *  along with this program; if not, write to the Free Software
19
 *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20
*/
21
22
#ifdef FSYS_REISER4
23
#include "shared.h"
24
#include "filesys.h"
25
26
#define ENABLE_STAND_ALONE
27
#include <reiser4/libreiser4.h>
28
29
static reiser4_fs_t *fs = NULL;
30
static aal_device_t *dev = NULL;
31
static reiser4_object_t *object = NULL;
32
33
/* Read callback of grub specific device. It uses devread() for reading passed
34
   @count of device blocks starting from @blk to passed @buff. */
35
static errno_t grub_dev_read(aal_device_t *device,
36
			     void *buff, blk_t blk,
37
			     count_t count)
38
{
39
	unsigned int size;
40
	unsigned int factor;
41
	unsigned int sector;
42
43
	/* Calculating actual sector and size in bytes to be read from
44
	   device. */
45
	factor = device->blksize / SECTOR_SIZE;
46
	sector = (unsigned int)blk << aal_log2(factor);
47
	size = (unsigned int)count * (SECTOR_SIZE * factor);
48
	
49
	/* Reading from the current device */
50
        if (!devread(sector, 0, size, buff))
51
    	        return -EIO;
52
		
53
	return 0;
54
}
55
56
/* Length callback of grub device */
57
static count_t grub_dev_len(aal_device_t *device) {
58
	unsigned int factor;
59
60
	/* Getting partition length in device blocks */
61
	factor = device->blksize / SECTOR_SIZE;
62
	return (part_length >> aal_log2(factor));
63
}
64
65
/*
66
  Initializing grub device abstraction instance. It will use devread and friends
67
  for providing needed functionality.
68
*/
69
struct aal_device_ops grub_dev_ops = {
70
	.read   = grub_dev_read,
71
	.len    = grub_dev_len
72
};
73
74
/* Initializes reiser4 */
75
static int reiser4_init(void) {
76
	extern aal_hash_table_t *plugins;
77
	
78
	plugins = NULL;
79
80
	/* Initializing memory manager */
81
	aal_mem_init((void *)FSYS_BUF, FSYS_BUFLEN);
82
83
	/* Initializing device abstraction on current device GRUB uses. */
84
	if (!(dev = aal_device_open(&grub_dev_ops, NULL,
85
				    SECTOR_SIZE, 0)))
86
	{
87
		return 0;
88
	}
89
90
	/* Initializing libreiser4 (plugins, etc) */
91
	return !libreiser4_init();
92
}
93
94
#define MEMORY_WATERMARK 8192
95
96
/* Memory pressure detect function. */
97
static int mpressure_detect(reiser4_tree_t *tree) {
98
	return (aal_mem_free() <= MEMORY_WATERMARK);
99
}
100
101
/* Reiser4 mount() routine */
102
int reiser4_mount(void) {
103
	
104
	/* Initialize all reiser4 related stuff first */
105
	if (!reiser4_init())
106
		return 0;
107
	
108
	/* Open filesystem on @dev. */
109
	if (!(fs = reiser4_fs_open(dev, 0)))
110
		return 0;
111
112
	fs->tree->mpc_func = mpressure_detect;
113
	
114
	object = NULL;
115
	return 1;
116
}
117
118
/* Reiser4 read() handler */
119
int reiser4_read(char *buf, int len) {
120
	int64_t read;
121
122
	if (object == NULL)
123
		return 0;
124
125
	/* Seet at current position denoted by @filepos */
126
	reiser4_object_seek(object, filepos);
127
	
128
	/* Reading current file data starting from @filepos */
129
        disk_read_func = disk_read_hook;
130
	read = reiser4_object_read(object, buf, len);
131
        disk_read_func = NULL;
132
133
	if (read < 0) {
134
		errnum = ERR_FSYS_CORRUPT;
135
		return 0;
136
	}
137
138
    	filepos += read;
139
	return read;
140
}
141
142
/* Reiser4 file open() routine */
143
int reiser4_dir(char *dirname) {
144
	char *ch;
145
	
146
	if (fs == NULL)
147
		return 0;
148
149
	if (object != NULL) {
150
		reiser4_object_close(object);
151
		object = NULL;
152
	}
153
154
	/* Cutting out string after first space character */
155
    	if ((ch = aal_strchr(dirname, ' ')))
156
		*ch = '\0';
157
		
158
	/* This function is also called for getting directory list for
159
	   maintaining the bash-like completion. */
160
#ifndef STAGE1_5
161
	if (print_possibilities) {
162
		char entry[256];
163
		entry_hint_t entry_hint;
164
		
165
		/* Getting last part of name (jsut after last '/') */
166
		if (*(dirname + aal_strlen(dirname) - 1) != '/') {
167
		
168
			if (!(ch = aal_strrchr(dirname, '/'))) {
169
				errnum = ERR_BAD_FILETYPE;
170
				return 0;
171
			}
172
173
			aal_strncpy(entry, ch + 1, sizeof(entry));
174
			*(ch + 1) = '\0';
175
		} else {
176
			aal_memset(entry, 0, sizeof(entry));
177
		}
178
179
		/* Open obejct by @dirname */
180
		if (!(object = reiser4_object_open(fs->tree, dirname, 1))) {
181
			errnum = ERR_FILE_NOT_FOUND;
182
			return 0;
183
		}
184
185
		/* Checking if it is a directory object */
186
		if (object->entity->plug->id.group != DIR_OBJECT) {
187
188
			/* If not, cutting out last '/' character */
189
    			if ((ch = aal_strrchr(dirname, '/')))
190
				*ch = '\0';
191
192
			/* Close current object */
193
			reiser4_object_close(object);
194
			
195
			/* Getting out */
196
			return 0;
197
		}
198
		
199
		/* Reading opened directory in order to build completion
200
		   list. */
201
		while (reiser4_object_readdir(object, &entry_hint) > 0) {
202
			if (substring(entry, entry_hint.name) <= 0) {
203
204
				if (print_possibilities > 0)
205
					print_possibilities = -print_possibilities;
206
				
207
				print_a_completion(entry_hint.name);
208
			}
209
		}
210
	} else {
211
#endif
212
		/* This is the case when resier4_dir() is called for open the
213
		   file @dirname, not for building completion list. */
214
		if (!(object = reiser4_object_open(fs->tree, dirname, 1))) {
215
			errnum = ERR_FILE_NOT_FOUND;
216
			return 0;
217
		}
218
		
219
		if (object->entity->plug->id.group != REG_OBJECT) {
220
			errnum = ERR_BAD_FILETYPE;
221
			return 0;
222
		}
223
		
224
		/* Initializing GRUB global variables @filepos and @filemax. */
225
		filepos = 0;
226
		filemax = reiser4_object_size(object);
227
	
228
		return 1;
229
#ifndef STAGE1_5
230
	}
231
232
	return 1;
233
#endif
234
235
	errnum = ERR_FILE_NOT_FOUND;
236
	return 0;
237
}
238
239
/* Returns how many sectors may be used for embeding reiser4_stage1_5 in teh
240
   case of installing GRUB to partition instead of MBR. */
241
int reiser4_embed (int *start_sector, int needed_sectors) {
242
	*start_sector = 1;
243
	return needed_sectors <= ((REISER4_MASTER_OFFSET >> SECTOR_BITS) - 1);
244
}
245
#endif /* FSYS_REISER4 */
(-)./grub-0.94.orig/stage2/Makefile.am (-14 / +34 lines)
Lines 13-28 Link Here
13
# For <stage1.h>.
13
# For <stage1.h>.
14
INCLUDES = -I$(top_srcdir)/stage1
14
INCLUDES = -I$(top_srcdir)/stage1
15
15
16
if ENABLE_REISER4_SUPPORT
17
REISER4_STAGE1_5 = reiser4_stage1_5
18
REISER4_STAGE1_5_EXEC = reiser4_stage1_5.exec
19
else
20
REISER4_STAGE1_5 =
21
REISER4_STAGE1_5_EXEC =
22
endif
23
16
# The library for /sbin/grub.
24
# The library for /sbin/grub.
17
noinst_LIBRARIES = libgrub.a
25
noinst_LIBRARIES = libgrub.a
18
libgrub_a_SOURCES = boot.c builtins.c char_io.c cmdline.c common.c \
26
libgrub_a_SOURCES = boot.c builtins.c char_io.c cmdline.c common.c \
19
	disk_io.c fsys_ext2fs.c fsys_fat.c fsys_ffs.c fsys_jfs.c \
27
	disk_io.c fsys_ext2fs.c fsys_fat.c fsys_ffs.c fsys_jfs.c \
20
	fsys_minix.c fsys_reiserfs.c fsys_vstafs.c fsys_xfs.c gunzip.c \
28
	fsys_minix.c fsys_reiserfs.c fsys_reiser4.c fsys_vstafs.c \
21
	md5.c serial.c stage2.c terminfo.c tparm.c graphics.c
29
	fsys_xfs.c gunzip.c md5.c serial.c stage2.c terminfo.c tparm.c graphics.c
22
libgrub_a_CFLAGS = $(GRUB_CFLAGS) -I$(top_srcdir)/lib \
30
libgrub_a_CFLAGS = $(GRUB_CFLAGS) -I$(top_srcdir)/lib \
23
	-DGRUB_UTIL=1 -DFSYS_EXT2FS=1 -DFSYS_FAT=1 -DFSYS_FFS=1 \
31
	-DGRUB_UTIL=1 -DFSYS_EXT2FS=1 -DFSYS_FAT=1 -DFSYS_FFS=1 \
24
	-DFSYS_JFS=1 -DFSYS_MINIX=1 -DFSYS_REISERFS=1 -DFSYS_VSTAFS=1 \
32
	-DFSYS_JFS=1 -DFSYS_MINIX=1 -DFSYS_REISERFS=1 $(REISER4_CFLAGS) \
25
	-DFSYS_XFS=1 -DUSE_MD5_PASSWORDS=1 \
33
	-DFSYS_VSTAFS=1 -DFSYS_XFS=1 -DUSE_MD5_PASSWORDS=1 \
26
	-DSUPPORT_SERIAL=1 -DSUPPORT_HERCULES=1 -fwritable-strings
34
	-DSUPPORT_SERIAL=1 -DSUPPORT_HERCULES=1 -fwritable-strings
27
35
28
# Stage 2 and Stage 1.5's.
36
# Stage 2 and Stage 1.5's.
Lines 32-53 Link Here
32
40
33
if DISKLESS_SUPPORT
41
if DISKLESS_SUPPORT
34
pkgdata_DATA = stage2 e2fs_stage1_5 fat_stage1_5 ffs_stage1_5 \
42
pkgdata_DATA = stage2 e2fs_stage1_5 fat_stage1_5 ffs_stage1_5 \
35
	jfs_stage1_5 minix_stage1_5 reiserfs_stage1_5 vstafs_stage1_5 \
43
	jfs_stage1_5 minix_stage1_5 reiserfs_stage1_5 $(REISER4_STAGE1_5) \
36
	xfs_stage1_5 nbgrub pxegrub
44
	vstafs_stage1_5 xfs_stage1_5 nbgrub pxegrub
37
noinst_DATA = pre_stage2 start nbloader pxeloader diskless
45
noinst_DATA = pre_stage2 start nbloader pxeloader diskless
38
noinst_PROGRAMS = pre_stage2.exec start.exec e2fs_stage1_5.exec \
46
noinst_PROGRAMS = pre_stage2.exec start.exec e2fs_stage1_5.exec \
39
	fat_stage1_5.exec ffs_stage1_5.exec jfs_stage1_5.exec \
47
	fat_stage1_5.exec ffs_stage1_5.exec jfs_stage1_5.exec \
40
	minix_stage1_5.exec reiserfs_stage1_5.exec \
48
	minix_stage1_5.exec reiserfs_stage1_5.exec $(REISER4_STAGE1_5_EXEC) \
41
	vstafs_stage1_5.exec xfs_stage1_5.exec nbloader.exec \
49
	vstafs_stage1_5.exec xfs_stage1_5.exec nbloader.exec \
42
	pxeloader.exec diskless.exec
50
	pxeloader.exec diskless.exec
43
else
51
else
44
pkgdata_DATA = stage2 e2fs_stage1_5 fat_stage1_5 ffs_stage1_5 \
52
pkgdata_DATA = stage2 e2fs_stage1_5 fat_stage1_5 ffs_stage1_5 \
45
	jfs_stage1_5 minix_stage1_5 reiserfs_stage1_5 vstafs_stage1_5 \
53
	jfs_stage1_5 minix_stage1_5 reiserfs_stage1_5 $(REISER4_STAGE1_5) \
46
	xfs_stage1_5
54
	vstafs_stage1_5 xfs_stage1_5
47
noinst_DATA = pre_stage2 start
55
noinst_DATA = pre_stage2 start
48
noinst_PROGRAMS = pre_stage2.exec start.exec e2fs_stage1_5.exec \
56
noinst_PROGRAMS = pre_stage2.exec start.exec e2fs_stage1_5.exec \
49
	fat_stage1_5.exec ffs_stage1_5.exec jfs_stage1_5.exec \
57
	fat_stage1_5.exec ffs_stage1_5.exec jfs_stage1_5.exec \
50
	minix_stage1_5.exec reiserfs_stage1_5.exec \
58
	minix_stage1_5.exec reiserfs_stage1_5.exec $(REISER4_STAGE1_5_EXEC) \
51
	vstafs_stage1_5.exec xfs_stage1_5.exec
59
	vstafs_stage1_5.exec xfs_stage1_5.exec
52
endif
60
endif
53
MOSTLYCLEANFILES = $(noinst_PROGRAMS)
61
MOSTLYCLEANFILES = $(noinst_PROGRAMS)
Lines 75-81 Link Here
75
HERCULES_FLAGS =
83
HERCULES_FLAGS =
76
endif
84
endif
77
85
78
STAGE2_COMPILE = $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
86
STAGE2_COMPILE = $(STAGE2_CFLAGS) -fno-builtin \
79
	$(NETBOOT_FLAGS) $(SERIAL_FLAGS) $(HERCULES_FLAGS) $(GRAPHICS_FLAGS)
87
	$(NETBOOT_FLAGS) $(SERIAL_FLAGS) $(HERCULES_FLAGS) $(GRAPHICS_FLAGS)
80
88
81
STAGE1_5_LINK = -nostdlib -Wl,-N -Wl,-Ttext -Wl,2000
89
STAGE1_5_LINK = -nostdlib -Wl,-N -Wl,-Ttext -Wl,2000
Lines 85-98 Link Here
85
pre_stage2_exec_SOURCES = asm.S bios.c boot.c builtins.c char_io.c \
93
pre_stage2_exec_SOURCES = asm.S bios.c boot.c builtins.c char_io.c \
86
	cmdline.c common.c console.c disk_io.c fsys_ext2fs.c \
94
	cmdline.c common.c console.c disk_io.c fsys_ext2fs.c \
87
	fsys_fat.c fsys_ffs.c fsys_jfs.c fsys_minix.c fsys_reiserfs.c \
95
	fsys_fat.c fsys_ffs.c fsys_jfs.c fsys_minix.c fsys_reiserfs.c \
88
	fsys_vstafs.c fsys_xfs.c gunzip.c hercules.c md5.c serial.c \
96
	fsys_reiser4.c fsys_vstafs.c fsys_xfs.c gunzip.c hercules.c \
89
	smp-imps.c stage2.c terminfo.c tparm.c graphics.c
97
	md5.c serial.c smp-imps.c stage2.c terminfo.c tparm.c graphics.c
90
pre_stage2_exec_CFLAGS = $(STAGE2_COMPILE) $(FSYS_CFLAGS)
98
pre_stage2_exec_CFLAGS = $(STAGE2_COMPILE) $(FSYS_CFLAGS)
91
pre_stage2_exec_CCASFLAGS = $(STAGE2_COMPILE) $(FSYS_CFLAGS)
99
pre_stage2_exec_CCASFLAGS = $(STAGE2_COMPILE) $(FSYS_CFLAGS)
92
pre_stage2_exec_LDFLAGS = $(PRE_STAGE2_LINK)
100
pre_stage2_exec_LDFLAGS = $(PRE_STAGE2_LINK)
93
101
94
if NETBOOT_SUPPORT
102
if NETBOOT_SUPPORT
95
pre_stage2_exec_LDADD = ../netboot/libdrivers.a
103
pre_stage2_exec_LDADD = ../netboot/libdrivers.a $(REISER4_LIBS)
104
else
105
pre_stage2_exec_LDADD = $(REISER4_LIBS)
96
endif
106
endif
97
107
98
if DISKLESS_SUPPORT
108
if DISKLESS_SUPPORT
Lines 167-172 Link Here
167
	-DNO_BLOCK_FILES=1
177
	-DNO_BLOCK_FILES=1
168
reiserfs_stage1_5_exec_LDFLAGS = $(STAGE1_5_LINK)
178
reiserfs_stage1_5_exec_LDFLAGS = $(STAGE1_5_LINK)
169
179
180
# For reiser4_stage1_5 target.
181
reiser4_stage1_5_exec_SOURCES = start.S asm.S common.c char_io.c \
182
	disk_io.c stage1_5.c fsys_reiser4.c bios.c
183
reiser4_stage1_5_exec_CFLAGS = $(STAGE1_5_COMPILE) $(REISER4_CFLAGS) \
184
	-DNO_BLOCK_FILES=1
185
reiser4_stage1_5_exec_CCASFLAGS = $(STAGE1_5_COMPILE) $(REISER4_CFLAGS) \
186
	-DNO_BLOCK_FILES=1
187
reiser4_stage1_5_exec_LDFLAGS = $(STAGE1_5_LINK)
188
reiser4_stage1_5_exec_LDADD = $(REISER4_LIBS)
189
170
# For vstafs_stage1_5 target.
190
# For vstafs_stage1_5 target.
171
vstafs_stage1_5_exec_SOURCES = start.S asm.S common.c char_io.c \
191
vstafs_stage1_5_exec_SOURCES = start.S asm.S common.c char_io.c \
172
	disk_io.c stage1_5.c fsys_vstafs.c bios.c
192
	disk_io.c stage1_5.c fsys_vstafs.c bios.c
(-)./grub-0.94.orig/stage2/shared.h (-3 / +6 lines)
Lines 202-210 Link Here
202
#define STAGE2_ID_FAT_STAGE1_5		3
202
#define STAGE2_ID_FAT_STAGE1_5		3
203
#define STAGE2_ID_MINIX_STAGE1_5	4
203
#define STAGE2_ID_MINIX_STAGE1_5	4
204
#define STAGE2_ID_REISERFS_STAGE1_5	5
204
#define STAGE2_ID_REISERFS_STAGE1_5	5
205
#define STAGE2_ID_VSTAFS_STAGE1_5	6
205
#define STAGE2_ID_REISER4_STAGE1_5	6
206
#define STAGE2_ID_JFS_STAGE1_5		7
206
#define STAGE2_ID_VSTAFS_STAGE1_5	7
207
#define STAGE2_ID_XFS_STAGE1_5		8
207
#define STAGE2_ID_JFS_STAGE1_5		8
208
#define STAGE2_ID_XFS_STAGE1_5		9
208
209
209
#ifndef STAGE1_5
210
#ifndef STAGE1_5
210
# define STAGE2_ID	STAGE2_ID_STAGE2
211
# define STAGE2_ID	STAGE2_ID_STAGE2
Lines 219-224 Link Here
219
#  define STAGE2_ID	STAGE2_ID_MINIX_STAGE1_5
220
#  define STAGE2_ID	STAGE2_ID_MINIX_STAGE1_5
220
# elif defined(FSYS_REISERFS)
221
# elif defined(FSYS_REISERFS)
221
#  define STAGE2_ID	STAGE2_ID_REISERFS_STAGE1_5
222
#  define STAGE2_ID	STAGE2_ID_REISERFS_STAGE1_5
223
# elif defined(FSYS_REISER4)
224
#  define STAGE2_ID	STAGE2_ID_REISER4_STAGE1_5
222
# elif defined(FSYS_VSTAFS)
225
# elif defined(FSYS_VSTAFS)
223
#  define STAGE2_ID	STAGE2_ID_VSTAFS_STAGE1_5
226
#  define STAGE2_ID	STAGE2_ID_VSTAFS_STAGE1_5
224
# elif defined(FSYS_JFS)
227
# elif defined(FSYS_JFS)

Return to bug 46410