]> git.proxmox.com Git - grub2.git/blame - ChangeLog
2009-11-18 Robert Millan <rmh.grub@aybabtu.com>
[grub2.git] / ChangeLog
CommitLineData
633877cb
RM
12009-11-18 Robert Millan <rmh.grub@aybabtu.com>
2
3 * po/POTFILES-shell: New file. List `util/grub.d/10_kfreebsd.in'
4 and `util/grub.d/10_linux.in'.
5 * Makefile.in (po/$(PACKAGE).pot): Process `po/POTFILES-shell' for
6 translatable Shell files.
7
af1c0c85
RM
82009-11-18 Robert Millan <rmh.grub@aybabtu.com>
9
10 * Makefile.in ($(srcdir)/aclocal.m4): New target.
11
769ae37b
RM
122009-11-17 Robert Millan <rmh.grub@aybabtu.com>
13
14 * INSTALL: Document Automake is needed for bootstrap.
15 * po/ca.po: Fix PO-Revision-Date and Language-Team fields.
16 * util/grub.d/10_kfreebsd.in (bindir): New variable.
17 Add gettext initialization.
18 (kfreebsd_entry): Make menuentry output translatable.
19
202009-11-17 Robert Millan <rmh.grub@aybabtu.com>
21
22 * Makefile.in (XGETTEXT, MSGMERGE, MSGFMT): New variables.
23 (po/$(PACKAGE).pot): Replace `xgettext' with `$(XGETTEXT)'.
24 (po/*.po): Replace `msgmerge' with `$(MSGMERGE)'.
25 (po/%.mo): Replace `msgfmt' with `$(MSGFMT)'.
26 (LINGUAS): Auto-generate using `po/LINGUAS'.
27 * po/LINGUAS: New file.
28
292009-11-17 Robert Millan <rmh.grub@aybabtu.com>
30
31 * configure.ac: Call AM_GNU_GETTEXT() (defines localedir, among
32 other things).
33 * Makefile.in (CPPFLAGS): Add `-DLOCALEDIR=\"$(localedir)\"'.
34 * util/i386/pc/grub-mkimage.c (main): Issue setlocale() and
35 bindtextdomain() calls for gettext initialization.
36
372009-11-17 Robert Millan <rmh.grub@aybabtu.com>
38
39 * gnulib/progname.c: New file (imported from Gnulib).
40 * gnulib/progname.h: Likewise.
41 * conf/i386-pc.rmk (grub_mkimage_SOURCES): Add `gnulib/progname.c'.
42 * util/i386/pc/grub-mkimage.c: Include `"progname.h"'.
43 (usage): Replace `progname' with `program_name'.
44 (main): Use set_program_name() for program name initialization.
45
462009-11-17 Robert Millan <rmh.grub@aybabtu.com>
47
48 * conf/common.rmk (grub_mkisofs_CFLAGS): Move `-I$(srcdir)/gnulib'
49 from here ...
50 * Makefile.in (CPPFLAGS): ... to here.
51
522009-11-16 Robert Millan <rmh.grub@aybabtu.com>
53
54 * aclocal.m4: Move from here ...
55 * acinclude.m4: ... to here.
56 * autogen.sh: Add call to `aclocal'.
57 * configure.ac: Add AM_INIT_AUTOMAKE() after AC_INIT() call.
58
592009-11-16 Robert Millan <rmh.grub@aybabtu.com>
60
61 * Makefile.in (CLEANFILES): Add `po/*.mo'.
62 (LINGUAS): New variable.
63 (all-local): Add `$(foreach lang, $(LINGUAS), po/$(lang).mo)'.
64 (install-local): Install MO files.
65 (po/$(PACKAGE).pot, po/*.po, po/%.mo): New rules.
66 * include/grub/i18n.h: New file.
67 * po/POTFILES: New file.
68 * po/ca.po: New file.
69 * util/grub.d/10_linux.in (bindir): New variable.
70 Add gettext initialization.
71 (linux_entry): Make menuentry output translatable.
72 * util/i386/pc/grub-mkimage.c: Include `<grub/i18n.h>'.
73 (usage): Make --help output translatable.
74 (main): Initialize gettext.
75
02c0a6ad
RM
762009-11-17 Robert Millan <rmh.grub@aybabtu.com>
77
78 * import_gcry.py: New file (written by Vladimir with minor
79 adjustments).
80 * autogen.sh: Use import_gcry.py to auto-generate GRUB-ified
81 ciphers.
82 * INSTALL: Document that Python is required for bootstrap.
83
842009-11-17 Robert Millan <rmh.grub@aybabtu.com>
85
86 Import ciphers from libgcrypt 1.4.4.
87
88 * lib/libgcrypt/cipher/ChangeLog
89 * lib/libgcrypt/cipher/ac.c
90 * lib/libgcrypt/cipher/arcfour.c
91 * lib/libgcrypt/cipher/bithelp.h
92 * lib/libgcrypt/cipher/blowfish.c
93 * lib/libgcrypt/cipher/camellia-glue.c
94 * lib/libgcrypt/cipher/camellia.c
95 * lib/libgcrypt/cipher/camellia.h
96 * lib/libgcrypt/cipher/cast5.c
97 * lib/libgcrypt/cipher/cipher.c
98 * lib/libgcrypt/cipher/crc.c
99 * lib/libgcrypt/cipher/des.c
100 * lib/libgcrypt/cipher/dsa.c
101 * lib/libgcrypt/cipher/ecc.c
102 * lib/libgcrypt/cipher/elgamal.c
103 * lib/libgcrypt/cipher/hash-common.c
104 * lib/libgcrypt/cipher/hash-common.h
105 * lib/libgcrypt/cipher/hmac-tests.c
106 * lib/libgcrypt/cipher/md.c
107 * lib/libgcrypt/cipher/md4.c
108 * lib/libgcrypt/cipher/md5.c
109 * lib/libgcrypt/cipher/primegen.c
110 * lib/libgcrypt/cipher/pubkey.c
111 * lib/libgcrypt/cipher/rfc2268.c
112 * lib/libgcrypt/cipher/rijndael-tables.h
113 * lib/libgcrypt/cipher/rijndael.c
114 * lib/libgcrypt/cipher/rmd.h
115 * lib/libgcrypt/cipher/rmd160.c
116 * lib/libgcrypt/cipher/rsa.c
117 * lib/libgcrypt/cipher/seed.c
118 * lib/libgcrypt/cipher/serpent.c
119 * lib/libgcrypt/cipher/sha1.c
120 * lib/libgcrypt/cipher/sha256.c
121 * lib/libgcrypt/cipher/sha512.c
122 * lib/libgcrypt/cipher/tiger.c
123 * lib/libgcrypt/cipher/twofish.c
124 * lib/libgcrypt/cipher/whirlpool.c
125
af2f93ac
RM
1262009-11-16 Robert Millan <rmh.grub@aybabtu.com>
127
128 Fix build for systems without error().
129
130 * gnulib/error.c: New file (imported from Gnulib).
131 * gnulib/error.h: Likewise.
132 * conf/common.rmk (grub_mkisofs_SOURCES): Add `gnulib/error.c'.
133 * util/mkisofs/mkisofs.c (program_name): Remove `static' qualifier
134 (this variable is now used by error()).
135
73fb3dd5
FZ
1362009-11-16 Felix Zielcke <fzielcke@z-51.de>
137
814f5e96
FZ
138 * util/mkisofs/name.c (iso9660_file_length): Use isascii macro
139 instead of relying that char is signed.
73fb3dd5 140
a691ca33
VS
1412009-11-16 Vladimir Serbinenko <phcoder@gmail.com>
142
143 * fs/i386/pc/pxe.c (grub_pxefs_open): Correctly handle PXE choosing
144 blocksize different from specified.
145 (grub_pxefs_read): Likewise.
146
2af8f0f4
FZ
1472009-11-16 Felix Zielcke <fzielcke@z-51.de>
148
149 Enable ata.mod on x86_64-efi, i386-efi and i386-ieee1275.
150
151 * disk/ata.c (grub_ata_dumpinfo): Add a cast.
152 (grub_ata_readwrite): Likewise. Update 2 format strings.
153 (grub_atapi_read): Likewise.
154
155 * conf/i386-coreboot.rmk (pkglib_MODULES): Move `ata.mod' from here ...
156 * conf/i386.rmk (pkglib_MODULES): ... to here ...
157 * conf/x86_64-efi.rmk (pkglib_MODULES): ... and here.
158 * conf/i386-coreboot.rmk (ata_mod_SOURCES, ata_mod_CFLAGS)
159 (ata_mod_LDFLAGS): Move from here ...
160 * conf/i386.rmk: ... to here ...
161 * conf/x86_64-efi.rmk: ... and here.
162 * conf/i386-pc.rmk (pkglib_MODULES): Remove `ata.mod'
163 (ata_mod_SOURCES, ata_mod_CFLAGS, ata_mod_LDFLAGS): Remove.
164
83bdecaf
RM
1652009-11-16 Robert Millan <rmh.grub@aybabtu.com>
166
167 Relicense multiboot.h, with RMS' blessing.
168
169 * include/multiboot.h: Change to X11 license.
170
fd6fd3d7
RM
1712009-11-15 Robert Millan <rmh.grub@aybabtu.com>
172
173 Support --version in grub-mkisofs.
174
175 * util/mkisofs/mkisofs.c (rcsid): Remove variable.
176 (OPTION_VERSION): New macro.
177 (ld_options): Recognize --version.
178 (usage): Move `program_name' from here ...
179 (program_name): ... to here. Add `static' qualifier.
180 (main): Recognize `OPTION_VERSION'.
181
16a88c49
FZ
1822009-11-15 Felix Zielcke <fzielcke@z-51.de>
183
184 * Makefile.in (TARGET_CPPFLAGS): Replace `-isystem=$(srcdir)/include'
185 with `-nostdinc -isystem $(shell $(TARGET_CC) -print-file-name=include)'.
186
a4158476
RM
1872009-11-14 Robert Millan <rmh.grub@aybabtu.com>
188
189 Fix help2man generation for mkisofs.
190
191 * util/mkisofs/mkisofs.c (ld_options): Recognize --help.
192 (usage): Send output to stdout (rather than stderr).
193
fc2208b0
RM
1942009-11-14 Robert Millan <rmh.grub@aybabtu.com>
195
196 * conf/i386-coreboot.rmk (grub_mkrescue_SOURCES): Replace
197 `util/i386/coreboot/grub-mkrescue.in' with `util/grub-mkrescue.in'.
198 * conf/i386-pc.rmk (grub_mkrescue_SOURCES): Replace
199 `util/i386/pc/grub-mkrescue.in' with `util/grub-mkrescue.in'.
200 (bin_SCRIPTS): Add `grub-mkfloppy'.
201 (grub_mkfloppy_SOURCES): New variable.
202
203 * util/grub-mkrescue.in: New file.
204 * util/i386/pc/grub-mkfloppy.in: New file.
205
206 * util/i386/coreboot/grub-mkrescue.in: Remove.
207 * util/i386/pc/grub-mkrescue.in: Remove.
208
8d0edf4a
RM
2092009-11-13 Robert Millan <rmh.grub@aybabtu.com>
210
211 * include/grub/multiboot.h (struct grub_multiboot_header): Move
212 from here ...
213 * include/multiboot.h (struct multiboot_header): ... to here. Update
214 all users.
215 * include/grub/multiboot.h (struct grub_multiboot_info): Move
216 from here ...
217 * include/multiboot.h (struct multiboot_info): ... to here. Update
218 all users.
219 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): Move
220 from here ...
221 * include/multiboot.h (struct multiboot_mmap_entry): ... to here.
222 Update all users.
223 * include/grub/multiboot.h (struct grub_mod_list): Move
224 from here ...
225 * include/multiboot.h (struct multiboot_mod_list): ... to here.
226 Update all users.
227
a73f5969
RM
2282009-11-13 Robert Millan <rmh.grub@aybabtu.com>
229
230 * include/multiboot2.h (multiboot_word): Rename from this ...
231 (multiboot2_word): ... to this. Update all users.
232 (multiboot_header): Rename from this ...
233 (multiboot2_header): ... to this. Update all users.
234 (multiboot_tag_header): Rename from this ...
235 (multiboot2_tag_header): ... to this. Update all users.
236 (multiboot_tag_start): Rename from this ...
237 (multiboot2_tag_start): ... to this. Update all users.
238 (multiboot_tag_name): Rename from this ...
239 (multiboot2_tag_name): ... to this. Update all users.
240 (multiboot_tag_module): Rename from this ...
241 (multiboot2_tag_module): ... to this. Update all users.
242 (multiboot_tag_memory): Rename from this ...
243 (multiboot2_tag_memory): ... to this. Update all users.
244 (multiboot_tag_unused): Rename from this ...
245 (multiboot2_tag_unused): ... to this. Update all users.
246 (multiboot_tag_end): Rename from this ...
247 (multiboot2_tag_end): ... to this. Update all users.
248
1c8927f0
RM
2492009-11-13 Robert Millan <rmh.grub@aybabtu.com>
250
251 Disable Multiboot2 in i386-ieee1275. It didn't actually work, and on
252 this platform we should support Multiboot1 first.
253
254 * conf/i386-ieee1275.rmk (pkglib_MODULES): Remove `multiboot.mod'.
255 (multiboot_mod_SOURCES, multiboot_mod_CFLAGS)
256 (multiboot_mod_LDFLAGS, multiboot_mod_ASFLAGS): Remove.
257
6e1e0d89
RM
2582009-11-12 Robert Millan <rmh.grub@aybabtu.com>
259
260 * util/mkisofs/eltorito.c (init_boot_catalog): Handle return code
261 of write calls (converting them to fwrite() if they aren't already).
262 (get_torito_desc): Likewise.
263 * util/mkisofs/rock.c (generate_rock_ridge_attributes): Likewise.
264
7f2b34d8
RM
2652009-11-12 Robert Millan <rmh.grub@aybabtu.com>
266
267 * util/i386/pc/grub-install.in: Move from here ...
268 * util/grub-install.in: ... to here. Update all users.
269
c0ef3311
CW
2702009-11-11 Colin Watson <cjwatson@ubuntu.com>
271
272 * util/powerpc/ieee1275/grub-mkrescue.in: Fix --version output.
273
e1f240ff
RM
2742009-11-11 Robert Millan <rmh.grub@aybabtu.com>
275
276 Support for El Torito without floppy emulation.
277
278 * util/mkisofs/eltorito.c: Include `<errno.h>'.
279 (init_boot_catalog): Improve error handling.
280 (get_torito_desc): Don't use floppy emulation unless requested by
281 user. Patch boot information table when requested via
282 `-boot-info-table'.
283 * util/mkisofs/iso9660.h (struct eltorito_boot_info): New struct.
284 * util/mkisofs/mkisofs.c (use_eltorito_emul_floppy)
285 (use_boot_info_table): New variables.
286 (OPTION_BOOT_INFO_TABLE, OPTION_NO_EMUL_BOOT)
287 (OPTION_ELTORITO_EMUL_FLOPPY): New macros.
288 (ld_options): Handle `-boot-info-table', `-no-emul-boot' and
289 `--eltorito-emul-floppy'.
290 (main): Handle `OPTION_BOOT_INFO_TABLE', `OPTION_NO_EMUL_BOOT'
291 and `OPTION_ELTORITO_EMUL_FLOPPY'.
292 * util/mkisofs/mkisofs.h (use_eltorito_emul_floppy)
293 (use_boot_info_table, get_731): New prototypes.
294 * util/mkisofs/write.c (get_731): New function.
295
af7d4de5
FZ
2962009-11-11 Felix Zielcke <fzielcke@z-51.de>
297
298 Fix the generation of the man page.
299
300 * util/pc/i386/grub-install.in: Source
301 `${libdir}/grub/grub-mkconfig_lib' after options have been parsed.
302
2c55dbc0
RM
3032009-11-11 Robert Millan <rmh.grub@aybabtu.com>
304
305 Large file support for grub-mkisofs.
306
307 * conf/common.rmk (grub_mkisofs_CFLAGS): Add `-D_FILE_OFFSET_BITS=64'.
308 * util/mkisofs/mkisofs.c (next_extent, last_extent)
309 (session_start): Upgrade type to `uint64_t'. Update all users.
310 * util/mkisofs/mkisofs.h: Include `<stdint.h>'.
311 (struct directory_entry): Upgrade type of `starting_block' and
312 `size' to `uint64_t'. Update all users.
313 (struct deferred): Remove unused structure.
314 (xfwrite): Upgrade type of `count' and `size' to `uint64_t'.
315 Update all users.
316 * util/mkisofs/tree.c (stat_filter, lstat_filter): Return -1 when
317 file is larger than `UINT32_MAX'.
318 * util/mkisofs/write.c (xfwrite): Upgrade type of `count' and
319 `size' to `uint64_t'. Update all users. Fix handling of fwrite()
320 return value.
321 (struct deferred_write): Upgrade type of `extent' and `size' to
322 `uint64_t'. Update all users.
323 (last_extent_written): Upgrade type to `uint64_t'. Update all
324 users.
325 (write_one_file): Upgrade type of `count' and `size' to `uint64_t'.
326 Update all users. Upgrade type of `remain' to `int64_t' and
327 `use' to `size_t'. Use error() to handle fread() errors.
328 (write_files): Rely on write_one_file() rather than calling
329 xfwrite() directly.
330
6a9cead5
FZ
3312009-11-09 Felix Zielcke <fzielcke@z-51.de>
332
333 * util/mkisofs/mkisofs.c (ld_options): Fix a spelling mistake.
334
4825d790
RM
3352009-11-09 Robert Millan <rmh.grub@aybabtu.com>
336
337 * util/mkisofs/fnmatch.c: Remove.
338 * util/mkisofs/getopt1.c: Likewise.
339 * util/mkisofs/getopt.c: Likewise.
340 * conf/common.rmk (grub_mkisofs_SOURCES): Replace
341 `util/mkisofs/fnmatch.c', `util/mkisofs/getopt1.c' and
342 `util/mkisofs/getopt.c' with `gnulib/fnmatch.c',
343 `gnulib/getopt1.c' and `gnulib/getopt.c'.
344 (grub_mkisofs_CFLAGS): Add `-I$(srcdir)/gnulib'.
345
346 * configure.ac: Detect `mingw32msvc' host_os.
347 Check for lstat(), getuid() and getgid().
348
349 * util/mkisofs/joliet.c: Include `<stdint.h>'. Replace all
350 instances of `u_char' with `uint8_t'.
351
352 * util/mkisofs/mkisofs.h: Include `<sys/stat.h>'.
353 [!HAVE_GETUID] (getuid): New function (stub).
354 [!HAVE_GETGID] (getgid): Likewise.
355 [!HAVE_LSTAT] (lstat): Likewise.
356 [!S_IROTH] (S_IROTH): New macro (dummy).
357 [!S_IRGRP] (S_IRGRP): Likewise.
358
84b860d8
RM
3592009-11-09 Robert Millan <rmh.grub@aybabtu.com>
360
361 * gnulib/fnmatch_loop.c (EXT): Fix warning (signed and unsigned type in
362 conditional expression).
363
66e9b712
RM
3642009-11-09 Robert Millan <rmh.grub@aybabtu.com>
365
366 Import from Gnulib.
367
368 * gnulib/fnmatch.c: New file.
369 * gnulib/fnmatch.h: Likewise.
370 * gnulib/fnmatch_loop.c: Likewise.
371 * gnulib/getopt.c: Likewise.
372 * gnulib/getopt.h: Likewise.
373 * gnulib/getopt1.c: Likewise.
374 * gnulib/getopt_int.h: Likewise.
375 * gnulib/gettext.h: Likewise.
376
34f4a5b0
RM
3772009-11-09 Robert Millan <rmh.grub@aybabtu.com>
378
379 * normal/dyncmd.c (read_command_list): Replace `0' with `NULL'.
380 * normal/handler.c (read_handler_list): Likewise.
381
ac451143
RM
3822009-11-09 Robert Millan <rmh.grub@aybabtu.com>
383
384 Misc cleanup.
385
386 * kern/command.c (grub_register_command_prio): Use
387 grub_zalloc() instead of explicitly zeroing data.
388 * kern/list.c: Include `<grub/mm.h>'.
389 (grub_named_list_find): Replace `0' with `NULL'.
390 * normal/autofs.c (struct grub_fs_module_list): Remove ad-hoc type.
391 (fs_module_list): Change type to `grub_named_list_t'. Update all
392 users.
393 * normal/dyncmd.c (read_command_list): Add space between function
394 call and parenthesis.
395 * normal/handler.c (read_handler_list): Likewise.
396
4089b167
RM
3972009-11-09 Robert Millan <rmh.grub@aybabtu.com>
398
399 * normal/auth.c (punishment_delay): Moved from here ...
400 (grub_auth_strcmp): ... to here (inside function).
401
325f5037
RM
4022009-11-09 Robert Millan <rmh.grub@aybabtu.com>
403
404 * include/grub/list.h (struct grub_named_list): Remove `const'
405 qualifier from `name'.
406 (struct grub_prio_list): Likewise.
407
7aea29a3
RM
4082009-11-09 Robert Millan <rmh.grub@aybabtu.com>
409
410 * normal/auth.c: Include `<grub/time.h>'.
411 (grub_auth_strcmp): Replace `strcmp' with `grub_strcmp'.
412
3fd6f044
RM
4132009-11-09 Robert Millan <rmh.grub@aybabtu.com>
414
415 * normal/auth.c (punishment_delay): New variable.
416 (grub_auth_strcmp): Rewrite using grub_get_time_ms ().
417 (grub_auth_check_authentication): Punish failed login attempts with
418 an incremental (2^N) delay.
419
a4cd68e4
RM
4202009-11-09 Robert Millan <rmh.grub@aybabtu.com>
421
422 * conf/common.rmk (grub_mkisofs_CFLAGS): Prefix include
423 path with $(srcdir).
424
7ad12f43
VS
4252009-11-09 Vladimir Serbinenko <phcoder@gmail.com>
426
427 * normal/auth.c (grub_auth_strcmp): Fixed incorrect variable usage.
428
c1129f03
RM
4292009-11-09 Robert Millan <rmh.grub@aybabtu.com>
430
431 * util/i386/coreboot/grub-mkrescue.in: New file.
432 * conf/i386-coreboot.rmk (bin_SCRIPTS, grub_mkrescue_SOURCES): New
433 variables.
434
435 * conf/common.rmk (bin_UTILITIES): Add `grub-mkisofs'.
436 (grub_mkisofs_SOURCES, grub_mkisofs_CFLAGS): New variables.
437 * configure.ac: Add header and function checks to satisfy grub-mkisofs
438 requirements.
439 * util/mkisofs/defaults.h: New file.
440 * util/mkisofs/eltorito.c: Likewise.
441 * util/mkisofs/exclude.h: Likewise.
442 * util/mkisofs/fnmatch.c: Likewise.
443 * util/mkisofs/getopt.c: Likewise.
444 * util/mkisofs/getopt1.c: Likewise.
445 * util/mkisofs/hash.c: Likewise.
446 * util/mkisofs/include/fctldefs.h: Likewise.
447 * util/mkisofs/include/mconfig.h: Likewise.
448 * util/mkisofs/include/prototyp.h: Likewise.
449 * util/mkisofs/include/statdefs.h: Likewise.
450 * util/mkisofs/iso9660.h: Likewise.
451 * util/mkisofs/joliet.c: Likewise.
452 * util/mkisofs/match.c: Likewise.
453 * util/mkisofs/match.h: Likewise.
454 * util/mkisofs/mkisofs.c: Likewise.
455 * util/mkisofs/mkisofs.h: Likewise.
456 * util/mkisofs/multi.c: Likewise.
457 * util/mkisofs/name.c: Likewise.
458 * util/mkisofs/rock.c: Likewise.
459 * util/mkisofs/tree.c: Likewise.
460 * util/mkisofs/write.c: Likewise.
461
ec8bb77d
VS
4622009-11-09 Vladimir Serbinenko <phcoder@gmail.com>
463
464 * normal/auth.c (grub_auth_strcmp): Fix bug which resulted in function
465 being insecure.
466
3716b12c
RM
4672009-11-08 Robert Millan <rmh.grub@aybabtu.com>
468
469 * util/i386/pc/grub-mkrescue.in: Fix miss-identification as
470 `grub-mkimage' (and use $0 when possible).
471
b97b7b91
RM
4722009-11-08 Robert Millan <rmh.grub@aybabtu.com>
473
474 * kern/i386/multiboot_mmap.c (grub_machine_mmap_init): Improve
475 error message for excessively large memory map.
476
04114812
RM
4772009-11-08 Robert Millan <rmh.grub@aybabtu.com>
478
479 * autogen.sh: Use `sh gendistlist.sh' to avoid reliing on
480 executable bit.
481
e4eb2373
RM
4822009-11-08 Robert Millan <rmh.grub@aybabtu.com>
483
484 * kern/i386/multiboot_mmap.c (grub_machine_mmap_init): Improve error
485 message for coreboot users.
486
c926e1d5 4872009-11-07 Robert Millan <rmh.grub@aybabtu.com>
488
489 Fix build with GNU gold.
490
491 * conf/i386-pc.rmk (boot_img_LDFLAGS, pxeboot_img_LDFLAGS)
492 (diskboot_img_LDFLAGS, lnxboot_img_LDFLAGS)
493 (cdboot_img_LDFLAGS): Prepend `0x' qualifier to hexadecimal
494 link addresses.
495 * aclocal.m4: Likewise.
496
86e5b1db 4972009-11-04 Felix Zielcke <fzielcke@z-51.de>
498
499 * configure.ac (AC_PREREQ): Bump to 2.59d.
500 * INSTALL: Make it more clear when Autoconf and Ruby are
501 needed and when to run `./autogen.sh'.
502
246cd78f 5032009-11-03 Samuel Thibault <samuel.thibault@ens-lyon.org>
504
505 * util/grub.d/30_os-prober.in: Restore default behavior for unsupported
506 OSes.
507
4f9dfb37 5082009-11-02 Samuel Thibault <samuel.thibault@ens-lyon.org>
509
510 * util/grub.d/30_os-prober.in: Add GNU/Hurd support
511
b82bd5e1 5122009-11-02 Samuel Thibault <samuel.thibault@ens-lyon.org>
513
514 * util/grub.d/10_hurd.in: Drop /dev/ prefix from root device path before
515 giving it to GNU Mach.
516
ff1a9bca 5172009-11-02 Samuel Thibault <samuel.thibault@ens-lyon.org>
518
519 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): Subtract 1 from
520 GNU partition number to get internal GRUB partition number.
521
61697d9c 5222009-11-02 Samuel Thibault <samuel.thibault@ens-lyon.org>
523
524 * util/grub.d/10_hurd.in: Call prepare_grub_to_access_device
525 ${GRUB_DEVICE_BOOT} before loading /boot kernel.
526
a50569e1 5272009-11-01 Robert Millan <rmh.grub@aybabtu.com>
528
529 Based on patch from BVK Chaitanya <bvk.groups@gmail.com>
530 * kern/misc.c (grub_strchr, grub_strrchr): Fix to handle c == '\0'
531 case.
532
5b153867 5332009-11-01 Felix Zielcke <fzielcke@z-51.de>
534
535 * Makefile.in (TARGET_CPPFLAGS): Add `-I$(srcdir)/include'.
536
d9e2cd70 5372009-10-30 Robert Millan <rmh.grub@aybabtu.com>
538
539 Fix build problem.
540
541 * Makefile.in (TARGET_CPPFLAGS): Replace `-nostdinc' with
542 `-isystem=$(srcdir)/include'.
543
805111a4 5442009-10-30 Robert Millan <rmh.grub@aybabtu.com>
545
546 * util/i386/pc/grub-install.in: Remove hint that device.map should be
547 checked (grub-install doesn't currently rely on it).
548
fa6e945f 5492009-10-29 Robert Millan <rmh.grub@aybabtu.com>
550
551 Revert SVN r2660.
552
553 * conf/common.rmk (script/sh/lexer.c_DEPENDENCIES): Moved from here ...
554 * conf/i386-coreboot.rmk (script/sh/lexer.c_DEPENDENCIES): ... to here.
555 * conf/i386-efi.rmk (script/sh/lexer.c_DEPENDENCIES): ... and here.
556 * conf/i386-ieee1275.rmk: Likewise.
557 * conf/i386-pc.rmk: Likewise.
558 * conf/powerpc-ieee1275.rmk: Likewise.
559 * conf/sparc64-ieee1275.rmk: Likewise.
560 * conf/x86_64-efi.rmk: Likewise.
561
cee15086 5622009-10-28 Robert Millan <rmh.grub@aybabtu.com>
563
564 * Makefile.in (TARGET_CPPFLAGS): Add `-nostdinc'.
565
95b9239e 5662009-10-28 Robert Millan <rmh.grub@aybabtu.com>
567
568 * include/grub/misc.h: Stop checking for APPLE_CC.
569
2ed19dfd 5702009-10-28 Robert Millan <rmh.grub@aybabtu.com>
571
572 * kern/i386/coreboot/init.c (grub_exit): Reimplement in a way that
573 doesn't cause an infinite call loop.
574
fdcdde19 5752009-10-28 Felix Zielcke <fzielcke@z-51.de>
576
577 * commands/acpi.c (grub_cmd_acpi): Fix the out of memory error
578 strings.
579
cefabfe1 5802009-10-26 Robert Millan <rmh.grub@aybabtu.com>
581
582 * autogen.sh: Support addition of external modules via `GRUB_CONTRIB'
583 variable.
584 * Makefile.in: Likewise.
585
ed96ab6d 5862009-10-26 Robert Millan <rmh.grub@aybabtu.com>
587
588 * gendistlist.sh: Simplify .svn check. Skip .bzr as well.
589
0579b753 5902009-10-26 Robert Millan <rmh.grub@aybabtu.com>
591
592 * Makefile.in (RMKFILES): Rewrite using $(wildcard).
593
478df409 5942009-10-26 Robert Millan <rmh.grub@aybabtu.com>
595
596 * disk/scsi.c: Remove `<grub/machine/kernel.h>' (not needed).
597
083d1679 5982009-10-26 Robert Millan <rmh.grub@aybabtu.com>
599
600 * gensymlist.sh.in (COMPILE_TIME_ASSERT): Copy macro declaration
601 from here ...
602 * include/grub/misc.h (COMPILE_TIME_ASSERT): ... to here.
603
5947ae32 6042009-10-26 Robert Millan <rmh.grub@aybabtu.com>
605
606 * Makefile.in (docs/grub.info): Use make syntax to ignore errors
607 in $(MAKEINFO) invocation. This makes it clear in output that
608 errors are being ignored.
609
94180ff6 6102009-10-26 Robert Millan <rmh.grub@aybabtu.com>
611
612 * conf/i386-coreboot.rmk (script/sh/lexer.c_DEPENDENCIES): Moved
613 from here ...
614 * conf/common.rmk (script/sh/lexer.c_DEPENDENCIES): ... to here.
615 * conf/i386-efi.rmk (script/sh/lexer.c_DEPENDENCIES): Remove.
616 * conf/i386-ieee1275.rmk: Likewise.
617 * conf/i386-pc.rmk: Likewise.
618 * conf/powerpc-ieee1275.rmk: Likewise.
619 * conf/sparc64-ieee1275.rmk: Likewise.
620 * conf/x86_64-efi.rmk: Likewise.
621
9031b03a 6222009-10-26 Colin Watson <cjwatson@ubuntu.com>
623
624 * util/grub-editenv.c (main): If only a command is given, use
625 DEFAULT_DIRECTORY "/" GRUB_ENVBLK_DEFCFG as a default file name.
626 (usage): FILENAME is now optional and has a default.
627
e4f6809b 6282009-10-26 Colin Watson <cjwatson@ubuntu.com>
629
630 Improve grub-mkconfig performance when there are several menu
631 entries on a single filesystem.
632
633 * util/grub.d/10_linux.in (linux_entry): Cache the output of
634 prepare_grub_to_access_device.
635 * util/grub.d/10_kfreebsd.in (kfreebsd_entry): Likewise.
636 * util/grub.d/30_os-prober.in: Likewise.
637
67937d4d 6382009-10-26 Robert Millan <rmh.grub@aybabtu.com>
639
640 * util/grub.d/10_freebsd.in: Remove.
641 * util/grub.d/10_kfreebsd.in: New file (based on 10_linux.in).
642 * configure.ac: Set host_kernel=kfreebsd for FreeBSD and GNU/kFreeBSD.
643
ee3756cc 6442009-10-26 Robert Millan <rmh.grub@aybabtu.com>
645
5c35048e 646 * docs/grub.cfg: Fix example usage of *BSD loaders.
ee3756cc 647
4dea1c6f 6482009-10-25 Robert Millan <rmh.grub@aybabtu.com>
649
650 * util/i386/pc/grub-setup.c (setup): Add missing parameter to
651 grub_util_error() call.
652
042484d7 6532009-10-25 Robert Millan <rmh.grub@aybabtu.com>
654
655 * include/grub/fs.h [GRUB_UTIL] (struct grub_fs): Add
656 `reserved_first_sector' member.
657 * fs/ext2.c [GRUB_UTIL] (grub_ext2_fs): Initialize
658 `reserved_first_sector' to 1.
659 * fs/fat.c [GRUB_UTIL] (grub_fat_fs): Likewise.
660 * fs/ntfs.c [GRUB_UTIL] (grub_ntfs_fs): Likewise.
661 * fs/hfsplus.c [GRUB_UTIL] (grub_hfsplus_fs): Likewise.
662 * util/i386/pc/grub-setup.c (setup): Add safety check that probes for
663 filesystems which begin at first sector.
664 (options): New option --skip-fs-probe.
665 (main): Handle --skip-fs-probe and pass it to setup().
666
d64448a7 6672009-10-25 Robert Millan <rmh.grub@aybabtu.com>
668
669 * include/grub/misc.h: Fix wrong evaluation of APPLE_CC.
670 (memset): Fix function prototype.
671
508d42ec 6722009-10-25 Robert Millan <rmh.grub@aybabtu.com>
6732009-10-25 Vasily Averin <vvs@parallels.com>
674
675 * fs/ext2.c (grub_ext2_iterate_dir): Avoid infinite loop when
676 `dirent.direntlen == 0'.
677
b240e30c 6782009-10-25 Robert Millan <rmh.grub@aybabtu.com>
679
680 * fs/cpio.c [MODE_USTAR]: Initialize `tar' module instead of
681 `cpio'.
682 [! MODE_USTAR]: Initialize `cpio' module instead of `tar'.
683
346e7fbe 6842009-10-25 Robert Millan <rmh.grub@aybabtu.com>
685
686 * configure.ac: Check for `__ashldi3', `__ashrdi3', `__lshrdi3',
687 `__trampoline_setup' and `__ucmpdi2'.
688 * include/grub/powerpc/libgcc.h: Only export symbols for functions
689 that libgcc provides.
690
cdb308b0 6912009-10-25 Robert Millan <rmh.grub@aybabtu.com>
692
693 * include/grub/powerpc/libgcc.h (memset): Remove function prototype.
694 * include/grub/sparc64/libgcc.h (memset): Likewise.
695 * include/grub/misc.h (memset, memcmp): New function prototypes.
696
fb26abc2 6972009-10-25 Robert Millan <rmh.grub@aybabtu.com>
698
699 * fs/cpio.c [MODE_USTAR]: Finish `tar' module instead of
700 `cpio'.
701 [! MODE_USTAR]: Finish `cpio' module instead of `tar'.
702
f6693890 7032009-10-25 Robert Millan <rmh.grub@aybabtu.com>
704
705 Patch from Samuel Thibault <samuel.thibault@ens-lyon.org>
706 * docs/grub.cfg: Compensate for recent change in multiboot
707 loader (since 2009-08-14 it won't pass filename to payload).
708 * util/grub.d/10_hurd.in: Likewise.
709
0933cdc0 7102009-10-21 Felix Zielcke <fzielcke@z-51.de>
711
712 * config.guess: Update to latest version from config git
713 repository.
714 * config.sub: Likewise.
715
3b2fe8c2 7162009-10-20 Robert Millan <rmh.grub@aybabtu.com>
717
718 Fix build on sparc64.
719
720 * configure.ac: Perform checks for libgcc symbols before
721 adding `-nostdlib' to LDFLAGS.
722
46695a62 7232009-10-16 Vladimir Serbinenko <phcoder@gmail.com>
724
725 Let user specify OpenBSD root device.
726
727 * loader/i386/bsd.c (openbsd_root): New variable.
728 (openbsd_opts): New option 'root'.
729 (OPENBSD_ROOT_ARG): New macro.
730 (grub_openbsd_boot): Use 'openbsd_root'.
731 (grub_cmd_openbsd): Fill 'openbsd_root'.
732
d2b6b7fc 7332009-10-16 Robert Millan <rmh.grub@aybabtu.com>
734
735 * NEWS: Misc adjustments.
736
421bd7ac 7372009-10-16 Vladimir Serbinenko <phcoder@gmail.com>
738
739 * NEWS: Mentioned XNU, ACPI, gptsync, password and parttool.
740
f1d29d87 7412009-10-16 Robert Millan <rmh.grub@aybabtu.com>
742
743 * configure.ac: Bump version to 1.97.
744
6f3cd880 7452009-10-16 Colin Watson <cjwatson@ubuntu.com>
746
747 * configure.ac (TARGET_CFLAGS): Add -mno-mmx -mno-sse -mno-sse2
748 -mno-3dnow on x86 architectures. Some toolchains enable these
749 features by default, but they rely on registers that aren't enabled
750 in GRUB. Thanks to Vladimir Serbinenko for the suggestion.
751
035f7122 7522009-10-15 Robert Millan <rmh.grub@aybabtu.com>
753
754 Make entry text a bit more readable.
755
756 * util/grub.d/10_linux.in: Add `with' before `Linux'.
757
44998e58 7582009-10-15 Vladimir Serbinenko <phcoder@gmail.com>
759
760 * loader/i386/pc/xnu.c (grub_xnu_set_video): Fix loading splash image.
761
cd2851b3 7622009-10-15 Vladimir Serbinenko <phcoder@gmail.com>
763
764 * commands/xnu_uuid.c (grub_cmd_xnu_uuid): Remove duplicated bitwise
765 operations.
766
c6f3b249 7672009-10-15 Vladimir Serbinenko <phcoder@gmail.com>
768
769 * configure.ac: Add missing dollar.
770
6b5886ba 7712009-10-15 Vladimir Serbinenko <phcoder@gmail.com>
772
773 Revert 2009-06-10 Pavel Roskin <proski@gnu.org>
774
775 * configure.ac: Put checks for __bswapsi2 and __bswapdi2.
776 * include/grub/powerpc/libgcc.h: Don't use weak attribute for all
777 exports.
778 * include/grub/sparc64/libgcc.h: Likewise. Use
779 preprocessor conditionals.
780
e9d66f6d 7812009-10-14 Robert Millan <rmh.grub@aybabtu.com>
782
783 * conf/common.rmk (grub-dumpbios): Remove rule.
784 (sbin_SCRIPTS, CLEANFILES): Remove `grub-dumpbios'.
785 * util/grub-dumpbios.in: Remove file.
786
9155bc17 7872009-10-14 Robert Millan <rmh.grub@aybabtu.com>
788
789 Refer to kernel of FreeBSD "kFreeBSD" to avoid confusion between
790 the Operating System (FreeBSD) and its kernel (kernel of FreeBSD).
791
792 * loader/i386/bsd.c (grub_freebsd_boot): Read kernel environment
793 from "kFreeBSD" namespace (rather than "FreeBSD"). Update all
794 users.
795
796 (GRUB_MOD_INIT (bsd)): Rename "freebsd" command to "kfreebsd",
797 "openbsd" to "kopenbsd", "netbsd" to "knetbsd", "freebsd_loadenv"
798 to "kfreebsd_loadenv", "freebsd_module" to "kfreebsd_module",
799 and "freebsd_module_elf" to "kfreebsd_module_elf". Update all
800 users.
801
bf7f7a18 8022009-10-12 Robert Millan <rmh.grub@aybabtu.com>
803
804 * term/tparm.c: Switch to GPLv3.
805
86564c26 8062009-10-09 Robert Millan <rmh.grub@aybabtu.com>
807
808 * include/grub/i386/cpuid.h: Add header protection.
809
5c936493 8102009-10-09 Robert Millan <rmh.grub@aybabtu.com>
811
812 Fail gracefuly when attempting to load 64-bit kFreeBSD on IA32 CPU.
813
814 * include/grub/i386/cpuid.h: New file.
815 * commands/i386/cpuid.c: Include `<grub/i386/cpuid.h>'.
816 (has_longmode): Rename to ...
817 (grub_cpuid_has_longmode): ... this. Update all users. Remove
818 `static' attribute.
819 * loader/i386/bsd.c: Include `<grub/i386/cpuid.h>'.
820 (grub_bsd_load_elf): Fail if load of 64-bit kernel was requested
821 on a CPU that doesn't implement AMD64 instruction set.
822
186e7cf2 8232009-10-06 Colin Watson <cjwatson@ubuntu.com>
824
825 * Makefile.in (docs/stamp-vti): Depend on configure.ac as well, so
826 that version.texi is rebuilt on version number changes.
827
83b65c4a 8282009-10-06 Colin Watson <cjwatson@ubuntu.com>
829
830 * Makefile.in: Don't set info_INFOS unless makeinfo was found.
831 Fixes bug #27602.
832
d244281c 8332009-10-06 Colin Watson <cjwatson@ubuntu.com>
834
835 * util/i386/pc/grub-install.in: Source
836 ${libdir}/grub/grub-mkconfig_lib before option processing, in order
837 that the --grub-probe option will work.
838 * util/sparc64/ieee1275/grub-install.in: Likewise.
839
da25306d 8402009-10-05 Robert Millan <rmh.grub@aybabtu.com>
841
842 * configure.ac: Bump version to 1.97~beta4.
843
e8ee83c0 8442009-10-03 Robert Millan <rmh.grub@aybabtu.com>
845
846 Resync grub-mkdevicemap in x86_64-efi.
847
848 * conf/x86_64-efi.rmk (sbin_UTILITIES): Enable `grub-mkdevicemap'.
849 (grub_mkdevicemap_SOURCES): Add missing `util/deviceiter.c' and
850 `util/devicemap.c'.
851
50dcabcf 8522009-10-01 Colin Watson <cjwatson@ubuntu.com>
853
854 * util/grub-editenv.c (create_envblk_file): Write new block with a
855 .new suffix and then rename it into place, to ensure atomic
856 creation.
857
0e51c3a7 8582009-09-28 Robert Millan <rmh.grub@aybabtu.com>
859
860 Do not automatically install headers.
861
862 * Makefile.in (include_DATA): Remove. Update all users.
863
31299a95 8642009-09-26 Robert Millan <rmh.grub@aybabtu.com>
865
866 * conf/common.rmk (pkglib_MODULES): Remove `lua.mod'.
867 (lua_mod_SOURCES, lua_mod_CFLAGS, lua_mod_LDFLAGS): Remove.
868
869 * util/osdetect.lua: Remove.
870 * script/lua/lauxlib.c: Likewise.
871 * script/lua/ldebug.c: Likewise.
872 * script/lua/grub_main.c: Likewise.
873 * script/lua/lauxlib.h: Likewise.
874 * script/lua/ldebug.h: Likewise.
875 * script/lua/ltablib.c: Likewise.
876 * script/lua/liolib.c: Likewise.
877 * script/lua/lstrlib.c: Likewise.
878 * script/lua/lualib.h: Likewise.
879 * script/lua/ldo.c: Likewise.
880 * script/lua/ldump.c: Likewise.
881 * script/lua/ldo.h: Likewise.
882 * script/lua/loslib.c: Likewise.
883 * script/lua/lundump.c: Likewise.
884 * script/lua/grub_lib.c: Likewise.
885 * script/lua/ldblib.c: Likewise.
886 * script/lua/lundump.h: Likewise.
887 * script/lua/lmem.c: Likewise.
888 * script/lua/grub_lib.h: Likewise.
889 * script/lua/lmathlib.c: Likewise.
890 * script/lua/lstate.c: Likewise.
891 * script/lua/ltm.c: Likewise.
892 * script/lua/lvm.c: Likewise.
893 * script/lua/lmem.h: Likewise.
894 * script/lua/lstate.h: Likewise.
895 * script/lua/ltm.h: Likewise.
896 * script/lua/ltable.c: Likewise.
897 * script/lua/lvm.h: Likewise.
898 * script/lua/llex.c: Likewise.
899 * script/lua/lgc.c: Likewise.
900 * script/lua/grub_lua.h: Likewise.
901 * script/lua/loadlib.c: Likewise.
902 * script/lua/lfunc.c: Likewise.
903 * script/lua/lopcodes.c: Likewise.
904 * script/lua/lparser.c: Likewise.
905 * script/lua/ltable.h: Likewise.
906 * script/lua/llex.h: Likewise.
907 * script/lua/lgc.h: Likewise.
908 * script/lua/lfunc.h: Likewise.
909 * script/lua/lbaselib.c: Likewise.
910 * script/lua/lopcodes.h: Likewise.
911 * script/lua/lparser.h: Likewise.
912 * script/lua/lzio.c: Likewise.
913 * script/lua/linit.c: Likewise.
914 * script/lua/lobject.c: Likewise.
915 * script/lua/llimits.h: Likewise.
916 * script/lua/lstring.c: Likewise.
917 * script/lua/lzio.h: Likewise.
918 * script/lua/lapi.c: Likewise.
919 * script/lua/lcode.c: Likewise.
920 * script/lua/lua.h: Likewise.
921 * script/lua/lobject.h: Likewise.
922 * script/lua/lstring.h: Likewise.
923 * script/lua/lapi.h: Likewise.
924 * script/lua/lcode.h: Likewise.
925 * script/lua/luaconf.h: Likewise.
926
cb8a2c38 9272009-09-26 Colin Watson <cjwatson@ubuntu.com>
928
929 * docs/grub.texi (Command-line and menu entry commands): Document
930 date and echo commands.
931
6b9b6276 9322009-09-24 Pavel Roskin <proski@gnu.org>
933
934 * include/grub/kernel.h (struct grub_module_header): Remove
935 `grub_module_header_types'. Make `type' unsigned. Make `size'
936 32-bit on all platforms.
937 * util/elf/grub-mkimage.c (load_modules): Treat `type' as an
938 8-bit field. Use grub_host_to_target32() for `size'.
939 * util/i386/efi/grub-mkimage.c (make_mods_section): Likewise.
940 * util/i386/pc/grub-mkimage.c (generate_image): Likewise.
941 * util/sparc64/ieee1275/grub-mkimage.c (generate_image): Likewise.
942
4e5a02a7 9432009-09-24 Robert Millan <rmh.grub@aybabtu.com>
944
945 Fix "lost keypress" bug in at_keyboard.
946
947 * term/i386/pc/at_keyboard.c (grub_at_keyboard_checkkey): New function.
948 Checks for readyness of input buffer (without flushing it).
949 (grub_at_keyboard_term): Use grub_at_keyboard_checkkey() rather
950 than grub_at_keyboard_getkey_noblock() for `checkkey' struct member.
951
c6dcedf6 9522009-09-24 Robert Millan <rmh.grub@aybabtu.com>
953
954 * util/i386/pc/grub-mkimage.c (generate_image): Enclose BIOS-specific
955 size check within GRUB_MACHINE_PCBIOS section.
956
74c958b1 9572009-09-24 Robert Millan <rmh.grub@aybabtu.com>
958
959 * include/grub/i386/at_keyboard.h (KEYBOARD_ISREADY): Negate
960 return value.
961 * term/i386/pc/at_keyboard.c (grub_keyboard_getkey): Negate
962 KEYBOARD_ISREADY check.
963 (grub_at_keyboard_checkkey): Rename to ...
964 (grub_at_keyboard_getkey_noblock): ... this. Update all users.
965 Remove gratuitous cast.
966
ff420223 9672009-09-23 Colin Watson <cjwatson@ubuntu.com>
968
969 * configure.ac: Call AC_PROG_MKDIR_P.
970 * Makefile.in (docs/stamp-vti): Create docs directory. Create
971 version.texi in $(builddir) rather than $(srcdir).
972 (docs/grub.info): Create docs directory. Prepend $(builddir)/docs
973 to makeinfo's @include search path.
974
d96875df 9752009-09-23 Felix Zielcke <fzielcke@z-51.de>
976
977 * util/grub-mkconfig_lib.in (grub_file_is_not_garbage): Cope with `*.dpkg-*'
978
9b3f8365 9792009-09-23 Felix Zielcke <fzielcke@z-51.de>
980
981 * util/grub-mkconfig_lib.in (grub_file_is_not_garbage): Add support
982 for `*.dpkg-new'.
983
c44c90db 9842009-09-21 Colin Watson <cjwatson@ubuntu.com>
985
986 Build info documentation. Some code borrowed from Automake.
987
988 * configure.ac: Check for makeinfo.
989 * Makefile.in (MAKEINFO, INFOS, info_INFOS): New variables.
990 (MAINTAINER_CLEANFILES): Add $(INFOS), docs/stamp-vti, and
991 docs/version.texi.
992 (MOSTLYCLEANFILES): Add vti.tmp.
993 (docs/version.texi, docs/stamp-vti): Update automatically.
994 (docs/grub.info): Build info documentation. Use --force and ignore
995 errors for now.
996 (all-local): Add $(INFOS).
997 (install-local): Install info files.
998 (uninstall): Uninstall info files.
999 * docs/version.texi: Remove from revision control. This file is
1000 automatically generated on build now.
1001 * gendistlist.sh: Add `*.info'.
1002
e0b37bb5 10032009-09-21 Felix Zielcke <fzielcke@z-51.de>
1004
1005 * kern/term.c: Fix indentation.
1006
5a78865b 10072009-09-21 Felix Zielcke <fzielcke@z-51.de>
1008
1009 * util/hostdisk.c: Fix a comment.
1010
dace7e8a 10112009-09-20 Robert Millan <rmh.grub@aybabtu.com>
1012
1013 Fix regression introduced in r2539.
1014
1015 * term/usb_keyboard.c (USB_HID_DEVICE_TO_HOST): Change from 0x61
1016 to 0xA1.
1017
a83d079b 10182009-09-19 Colin Watson <cjwatson@ubuntu.com>
1019
1020 * util/grub.d/30_os-prober.in: Don't throw away stderr from
4cbbccec 1021 os-prober. Under normal operation, it does not print anything to
1022 stderr; if it does, we need to debug it, and throwing away stderr
1023 makes that excessively difficult.
a83d079b 1024
be94a509 10252009-09-16 Vladimir Serbinenko <phcoder@gmail.com>
1026
1027 * mmap/mmap.c (grub_cmd_badram): Fix off-by-one error.
1028
63f745e8 10292009-09-16 Robert Millan <rmh.grub@aybabtu.com>
1030
1031 * aclocal.m4 (AC_LANG_PROGRAM): New macro. Overrides stock
1032 AC_LANG_PROGRAM from autoconf.
1033 (grub_ASM_USCORE, grub_PROG_OBJCOPY_ABSOLUTE): Add missing
1034 prototypes (fixes warning).
1035
1036 * configure.ac: Add `-Werror' to TARGET_CFLAGS unless
1037 `--disable-werror' was used.
1038
bbb2a70f 10392009-09-16 Robert Millan <rmh.grub@aybabtu.com>
1040
1041 * partmap/msdos.c (pc_partition_map_iterate): Fix possible use of
1042 uninitialized `lastaddr'.
1043
77c24f1d 10442009-09-15 Vladimir Serbinenko <phcoder@gmail.com>
1045
0f0b8c87 1046 * partmap/msdos.c (pc_partition_map_iterate): Detect and break loops.
77c24f1d 1047
07197f23 10482009-09-14 Colin Watson <cjwatson@ubuntu.com>
1049
1050 * commands/test.c (get_fileinfo): Return immediately if
1051 grub_fs_probe fails.
1052
dabf1798 10532009-09-14 José Martínez <xosemp@gmail.com>
1054
1055 * commands/acpi.c (grub_cmd_acpi): Fix loading ACPI tables from file.
1056
d52109a7 10572009-09-14 Colin Watson <cjwatson@ubuntu.com>
1058
1059 * util/grub.d/30_os-prober.in: Cope with Windows 7 in os-prober
1060 output.
1061
56532179 10622009-09-13 Robert Millan <rmh.grub@aybabtu.com>
1063
1064 * configure.ac: Remove --enable-grub-pe2elf. Only build
1065 grub-pe2elf when needed by the build system itself.
1066 * conf/common.rmk: Remove $(enable_grub_pe2elf) check.
1067
8ef070f5 10682009-09-12 Robert Millan <rmh.grub@aybabtu.com>
1069
1070 * configure.ac: Bump version to 1.97~beta3.
1071 * docs/version.texi: Likewise.
1072
61229557 10732009-09-12 Robert Millan <rmh.grub@aybabtu.com>
1074
1075 * video/i386/pc/vbe.c (grub_vbe_get_video_mode_info): Move packed
1076 mode special handling (grub_vbe_bios_set_dac_palette_width() call)
1077 from here ...
1078 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS]
1079 (grub_linux_setup_video): ... to here (with some adjustments).
1080
5c9f8d84 10812009-09-12 Robert Millan <rmh.grub@aybabtu.com>
1082
1083 Fix memory corruption issue (spotted by Colin Watson).
1084
1085 * kern/i386/pc/startup.S (grub_vbe_bios_getset_dac_palette): Fix bug
1086 causing returned size to be stored in an incorrect memory location.
1087 Fix use of uninitialized value when storing the returned size.
1088
e8f5d6e9 10892009-09-12 Yves Blusseau <blusseau@zetam.org>
1090
1091 Change clean rules to properly remove files
1092
1093 * genmk.rb: add new clean rules
1094 * Makefile.in (clean): add the new targets
1095 (mostlyclean): likewise
1096
cda2a409 10972009-09-11 Colin Watson <cjwatson@ubuntu.com>
1098
1099 * include/grub/ntfs.h (struct grub_fshelp_node): Change `size'
1100 to grub_uint64_t.
1101 * fs/ntfs.c (init_file): Understand 64-bit sizes for
1102 non-resident files.
1103
86695375 11042009-09-11 Colin Watson <cjwatson@ubuntu.com>
1105
1106 * configure.ac: Don't look for help2man when cross-compiling. Fixes
1107 part of bug #27349.
1108
8aa1541a 11092009-09-10 Felix Zielcke <fzielcke@z-51.de>
1110
1111 * util/grub-mkconfig.in: Make the created config mode 400 and
1112 print a warning if it fails.
1113
48d9bb0a 11142009-09-10 Robert Millan <rmh.grub@aybabtu.com>
1115
1116 * util/grub.d/40_custom.in: Ask user to type custom entries below
1117 comment, rather than below 'exec tail' line.
1118
3b0521be 11192009-09-10 Colin Watson <cjwatson@ubuntu.com>
1120
1121 * util/grub.d/40_custom.in: Make sure that the explanatory text is
1122 visible in grub.cfg.
1123
50051d55 11242009-09-10 Colin Watson <cjwatson@ubuntu.com>
1125
1126 * util/grub.d/40_custom.in: Make it a little clearer how to use this
1127 file.
1128
c0d34387 11292009-09-10 Felix Zielcke <fzielcke@z-51.de>
1130
1131 * docs/grub.cfg: Add an example menu entry for memtest86+.
1132
80a608f3 11332009-09-09 Felix Zielcke <fzielcke@z-51.de>
1134
a2094832 1135 * config.guess: Update to latest version from config git.
80a608f3 1136 * config.sub: Likewise.
1137
99423078 11382009-09-08 Colin Watson <cjwatson@ubuntu.com>
1139
1140 * script/sh/execute.c (grub_script_execute_cmdline): Set "?" in
1141 unknown-command case. Fixes bug #27320.
1142
44454e4c 11432009-09-08 Felix Zielcke <fzielcke@z-51.de>
1144
1145 * kern/rescue_parser.c (grub_rescue_parse_line): Only suggest to try
1146 `help' if the command exists.
1147
e30d87ad 11482009-09-06 Robert Millan <rmh.grub@aybabtu.com>
1149
1150 * INSTALL: Require GCC 4.1.3 or later.
1151
9a86f1ec 11522009-09-06 Yves Blusseau <blusseau@zetam.org>
1153
1154 * Makefile.in (RMKFILES): add i386-qemu.rmk
1155 (MAINTAINER_CLEANFILES): add $(srcdir)/DISTLIST $(srcdir)/config.h.in
1156 $(srcdir)/stamp-h.in
1157
7f26d466 11582009-09-05 Robert Millan <rmh.grub@aybabtu.com>
1159
1160 * util/grub-probe.c (probe): Comment out buggy codepath, which
1161 was unexpectedly enabled by Colin Watson's 2009-09-02 fix. This
1162 should be re-enabled after 1.97.
1163
3a613259 11642009-09-05 Felix Zielcke <fzielcke@z-51.de>
1165
1166 * gendistlist.sh: Add `grub-dumpdevtree' and `*.lua' to the list
1167 find searches for.
1168
197f76c7 11692009-09-04 Vladimir Serbinenko <phcoder@gmail.com>
1170
1171 * loader/i386/xnu.c (grub_cpu_xnu_fill_devicetree): Remove
1172 unnecessary calls to grub_error.
1173
70ba68ce 11742009-09-04 Colin Watson <cjwatson@ubuntu.com>
1175
1176 * NEWS: Mention `keystatus' and Unicode fonts.
1177
4ff0d7a4 11782009-09-04 Robert Millan <rmh.grub@aybabtu.com>
1179
1180 * configure.ac: Bump version to 1.97~beta2.
1181 * docs/version.texi: Likewise.
1182
77c55a87 11832009-09-03 Colin Watson <cjwatson@ubuntu.com>
1184
1185 * configure.ac: By default, GCC 4.4 generates .eh_frame sections
1186 containing unwind information in some cases where it previously did
1187 not. Use -fno-dwarf2-cfi-asm if available to restore the old
1188 behaviour. See http://patchwork.kernel.org/patch/8555/ for related
1189 discussion.
1190
f79572cd 11912009-09-02 Yves BLUSSEAU <blusseau@zetam.org>
1192
1193 Embedding loadenv module into grub-emu
1194
1195 * conf/i386-pc.rmk (grub_emu_SOURCES): add lib/envblk.c and
1196 commands/loadenv.c
1197 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise
1198 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise
1199 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise
1200 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise
1201 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise
1202 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise
1203
93a81088 12042009-09-03 Magnus Granberg <zorry@ume.nu>
1205
1206 * aclocal.m4: Add grub_CHECK_PIE. It check if the compiler
1207 include -fPIE in the default specs.
1208 * configure.ac: Check if pie_possible is yes and add -fno-PIE
1209 to TARGET_CFLAGS.
1210
160034b2 12112009-09-03 Felix Zielcke <fzielcke@z-51.de>
1212
1213 * INSTALL: Note that GNU Bison 2.3 or later is required.
1214
087c07c4 12152009-09-03 Colin Watson <cjwatson@ubuntu.com>
1216
1217 * kern/i386/pc/startup.S: Fix typo.
1218
cbf978c0 12192009-09-02 Vladimir Serbinenko <phcoder@gmail.com>
1220
1221 * efiemu/loadcore.c (SUFFIX (grub_efiemu_loadcore_load)): Fix style
1222 according to GCS.
1223
12242009-09-02 Colin Watson <cjwatson@ubuntu.com>
f0910644 1225
1226 * docs/grub.texi (Naming convention): Describe one-based partition
1227 numbering.
1228 (Device syntax): Likewise.
1229 (File name syntax): Likewise.
1230 (Block list syntax): Likewise.
1231 (Making a GRUB bootable CD-ROM): Talk about grub.cfg rather than
1232 menu.lst.
1233 (File name syntax): Likewise.
1234 (Command-line and menu entry commands): Document acpi, blocklist,
1235 crc, export, insmod, keystatus, ls, set, and unset commands.
1236
f3e8cdfd 12372009-09-02 Colin Watson <cjwatson@ubuntu.com>
1238
1239 * commands/keystatus.c (GRUB_MOD_INIT (keystatus)): Adjust summary
1240 to avoid implying that only one of --shift, --ctrl, or --alt may be
1241 used.
1242
c0bc232b 12432009-09-02 Colin Watson <cjwatson@ubuntu.com>
1244
1245 * util/grub-probe.c (probe): Test st.st_mode using S_ISREG macro
1246 rather than comparing against S_IFREG, which will almost never work.
1247
aa0f752d 12482009-09-01 Vladimir Serbinenko <phcoder@gmail.com>
1249
1250 * commands/loadenv.c (check_blocklists): Fix off-by-one error.
1251 (write_blocklists): Likewise.
1252
ecb3166a 12532009-09-01 Colin Watson <cjwatson@ubuntu.com>
1254
1255 * script/lua/grub_lua.h (fputs): Supply a format string as the first
1256 argument to grub_printf.
1257
c403a125 12582009-09-01 Felix Zielcke <fzielcke@z-51.de>
31aba781 1259
1260 * genmk.rb: Add quotes around $(TARGET_OBJ2ELF) to cope with
c403a125 1261 non GNU test.
31aba781 1262
b5e7312c 12632009-08-30 Vladimir Serbinenko <phcoder@gmail.com>
1264
1265 * kern/file.c (grub_file_read): Spelling fix
1266
fe00f472 12672009-08-30 Vladimir Serbinenko <phcoder@gmail.com>
1268
1269 * loader/i386/bsdXX.c (SUFFIX (grub_freebsd_load_elfmodule)): Fix
1270 loading of headers in some cases.
1271
cc55302e 12722009-08-30 Robert Millan <rmh.grub@aybabtu.com>
1273
1274 * configure.ac: Bump version to 1.97~beta1.
1275 * docs/version.texi: Likewise.
1276
5c90cdd2 12772009-08-29 Vladimir Serbinenko <phcoder@gmail.com>
64bf71d0 1278
1279 * include/grub/i386/xnu.h: Add license header.
1280 include grub/err.h explicitly.
1281
c90edae4 12822009-08-29 Robert Millan <rmh.grub@aybabtu.com>
1283
1284 * util/grub.d/10_freebsd.in: Detect `ufs1' and `ufs2' and map them
1285 to `ufs' in the vfs.root.mountfrom kernel parameter.
1286
d8888b5c 12872009-08-29 Robert Millan <rmh.grub@aybabtu.com>
1288
1289 * term/i386/pc/serial.c: Include `<grub/machine/memory.h>'.
1290
1291 [GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Macroify initialization
1292 value (0x0400 -> GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR).
1293
1294 [! GRUB_MACHINE_PCBIOS] (GRUB_SERIAL_PORT_NUM): Calculate using
1295 `ARRAY_SIZE' macro.
1296
6f07b921 12972009-08-28 Vladimir Serbinenko <phcoder@gmail.com>
1298
1299 * kern/file.c (grub_file_read): Check offset.
1300 * fs/hfs.c (grub_hfs_read_file): Remove unnecessary offset check.
1301 * fs/jfs.c (grub_jfs_read_file): Likewise.
1302 * fs/ntfs.c (grub_ntfs_read): Likewise.
1303 * fs/reiserfs.c (grub_reiserfs_read): Likewise.
1304 * fs/minix.c (grub_minix_read_file): Correct offset check.
1305 * fs/ufs.c (grub_ufs_read_file): Likewise.
1306
b4f34077 13072009-08-28 Colin Watson <cjwatson@ubuntu.com>
1308
1309 * term/i386/pc/console.c (bios_data_area): Cast
1310 GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR explicitly.
1311
e7c69859 13122009-08-28 Vladimir Serbinenko <phcoder@gmail.com>
1313
1314 1-bit optimised blitters.
1315
1316 * include/grub/fbblit.h (grub_video_fbblit_replace_32bit_1bit): New
1317 prototype.
1318 (grub_video_fbblit_replace_24bit_1bit): Likewise.
1319 (grub_video_fbblit_replace_16bit_1bit): Likewise.
1320 (grub_video_fbblit_replace_8bit_1bit): Likewise.
1321 (grub_video_fbblit_blend_XXXA8888_1bit): Likewise.
1322 (grub_video_fbblit_blend_XXX888_1bit): Likewise.
1323 (grub_video_fbblit_blend_XXX565_1bit): Likewise.
1324 * video/fb/fbblit.c (grub_video_fbblit_replace_32bit_1bit): New
1325 function.
1326 (grub_video_fbblit_replace_24bit_1bit): Likewise.
1327 (grub_video_fbblit_replace_16bit_1bit): Likewise.
1328 (grub_video_fbblit_replace_8bit_1bit): Likewise.
1329 (grub_video_fbblit_blend_XXXA8888_1bit): Likewise.
1330 (grub_video_fbblit_blend_XXX888_1bit): Likewise.
1331 (grub_video_fbblit_blend_XXX565_1bit): Likewise.
1332 * video/fb/video_fb.c (common_blitter): Use 1-bit optimised blitters
1333 when possible.
1334 * video/video.c (grub_video_get_blit_format): Return
1335 GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED if bpp = 1.
1336
a57da43f 13372009-08-28 Colin Watson <cjwatson@ubuntu.com>
1338
1339 * normal/cmdline.c (grub_cmdline_get): Supply a format string as
1340 the first argument to grub_printf.
1341
4cbe67e5 13422009-08-28 Colin Watson <cjwatson@ubuntu.com>
13432009-08-28 Robert Millan <rmh.grub@aybabtu.com>
1344
1345 Add `getkeystatus' terminal method. Add a new `keystatus' command
1346 to query it.
1347
1348 * include/grub/term.h (GRUB_TERM_STATUS_SHIFT,
1349 GRUB_TERM_STATUS_CTRL, GRUB_TERM_STATUS_ALT): Definitions for
1350 modifier key bitmasks.
1351 (struct grub_term_input): Add `getkeystatus' member.
1352 (grub_getkeystatus): Add prototype.
1353 * kern/term.c (grub_getkeystatus): New function.
1354
1355 * include/grub/i386/pc/memory.h
1356 (GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR): New macro.
1357 (struct grub_machine_bios_data_area): Define necessary parts of BIOS
1358 Data Area layout.
1359 * term/i386/pc/console.c (grub_console_getkeystatus): New function.
1360 (grub_console_term_input): Set `getkeystatus' member.
1361 * term/usb_keyboard.c (grub_usb_hid): Macroify HID protocol
1362 constants.
1363 (grub_usb_keyboard_getreport): Likewise.
1364 (grub_usb_keyboard_checkkey): Likewise.
1365 (grub_usb_keyboard_getkeystatus): New function.
1366 (grub_usb_keyboard_term): Set `getkeystatus' member.
1367
1368 * commands/keystatus.c: New file.
1369 * conf/common.rmk (pkglib_MODULES): Add keystatus.mod.
1370 (keystatus_mod_SOURCES): New variable.
1371 (keystatus_mod_CFLAGS): Likewise.
1372 (keystatus_mod_LDFLAGS): Likewise.
1373 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add
1374 commands/keystatus.c.
1375 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1376 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1377 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
1378 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1379 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1380 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4cbe67e5 1381
6e2a9085 13822009-08-28 Vladimir Serbinenko <phcoder@gmail.com>
1383
1384 Split befs.mod and afs.mod into *_be.mod and *.mod
1385
1386 * conf/common.rmk (grub_probe_SOURCES): Add afs_be.c and befs_be.c.
1387 (grub_fstest_SOURCES): Likewise.
1388 (pkglib_MODULES): Add afs_be.mod and befs_be.mod.
1389 (afs_be_mod_SOURCES): New variable.
1390 (afs_be_mod_CFLAGS): Likewise.
1391 (afs_be_mod_LDFLAGS): Likewise.
1392 (befs_be_mod_SOURCES): Likewise.
1393 (befs_be_mod_CFLAGS): Likewise.
1394 (befs_be_mod_LDFLAGS): Likewise.
1395 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add afs_be.c and befs_be.c.
1396 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1397 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1398 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
1399 (grub_emu_SOURCES): Likewise.
1400 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1401 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1402 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1403 * fs/afs_be.c: New file.
1404 * fs/befs_be.c: New file.
1405 * fs/afs.c (GRUB_AFS_FSNAME_SUFFIX): New definition.
1406 (GRUB_AFS_FSNAME): Use GRUB_AFS_FSNAME_SUFFIX.
1407 (U16): Replaced with ...
1408 (grub_afs_to_cpu16): ...this. All users updated.
1409 (U32): Replaced with ...
1410 (grub_afs_to_cpu32): ...this. All users updated.
1411 (U64): Replaced with ...
1412 (grub_afs_to_cpu64): ...this. All users updated.
1413 (GRUB_AFS_BO_LITTLE_ENDIAN): Remove.
1414 (GRUB_AFS_BO_BIG_ENDIAN): Likewise.
ad8ea1f4 1415 (grub_afs_validate_sblock): Check only one endianness.
6e2a9085 1416 (GRUB_MOD_INIT (befs)) [MODE_BIGENDIAN && MODE_BFS]: Rename to ..
1417 (GRUB_MOD_INIT (befs_be)) [MODE_BIGENDIAN && MODE_BFS]: ... this.
1418 (GRUB_MOD_INIT (afs)) [MODE_BIGENDIAN && !MODE_BFS]: Rename to ..
1419 (GRUB_MOD_INIT (afs_be)) [MODE_BIGENDIAN && !MODE_BFS]: ... this.
1420 (GRUB_MOD_FINI (befs)) [MODE_BIGENDIAN && MODE_BFS]: Rename to ..
1421 (GRUB_MOD_FINI (befs_be)) [MODE_BIGENDIAN && MODE_BFS]: ... this.
1422 (GRUB_MOD_FINI (afs)) [MODE_BIGENDIAN && !MODE_BFS]: Rename to ..
1423 (GRUB_MOD_FINI (afs_be)) [MODE_BIGENDIAN && !MODE_BFS]: ... this.
1424
32a71655 14252009-08-26 Bean <bean123ch@gmail.com>
1426
1427 * fs/xfs.c (GRUB_XFS_INO_INOINAG): Replace 1L with 1LL to support
1428 64-bit number.
1429 (GRUB_XFS_FSB_TO_BLOCK): Likewise.
1430 (grub_xfs_inode_block): Change return type to grub_uint64_t.
1431 (grub_xfs_read_inode): Change type of block to grub_uint64_t.
1432
552bf6c5 14332009-08-25 Vladimir Serbinenko <phcoder@gmail.com>
1434
1435 NetBSD memory map support.
1436
1437 * include/grub/i386/bsd.h (NETBSD_BTINFO_MEMMAP): New definition.
1438 (grub_netbsd_btinfo_mmap_header): New structure.
1439 (grub_netbsd_btinfo_mmap_entry): Likewise.
1440 * loader/i386/bsd.c (grub_netbsd_boot): Pass memory map.
1441
1ae2078c 14422009-08-25 Vladimir Serbinenko <phcoder@gmail.com>
1443
1444 Enable bsd.mod on coreboot.
1445
1446 * conf/i386-coreboot.rmk (pkglib_MODULES): Add bsd.mod.
1447 (bsd_mod_SOURCES): New variable.
1448 (bsd_mod_CFLAGS): Likewise.
1449 (bsd_mod_LDFLAGS): Likewise.
1450 (bsd_mod_ASFLAGS): Likewise.
1451 * loader/i386/bsd.c [!GRUB_MACHINE_PCBIOS]: Fix includes.
1452 (grub_bsd_get_device) [!GRUB_MACHINE_PCBIOS]: Set *biosdev to 0xff.
1453
beefc598 14542009-08-25 Vladimir Serbinenko <phcoder@gmail.com>
1455
1456 Cleanup NetBSD root support.
1457
1458 * loader/i386/bsd.c (grub_netbsd_boot): Remove call to
1459 grub_bsd_get_device.
1460 Fix typo.
1461
3b76e68b 14622009-08-25 Felix Zielcke <fzielcke@z-51.de>
1463
1464 * util/grub.d/00_header.in: Move check for the video backend of
1465 gfxterm from here ...
1466 * util/grub-mkconfig.in: ... to here. Enable gfxterm if there's
1467 a suitable video backend.
1468
aea664ea 14692009-08-25 Vladimir Serbinenko <phcoder@gmail.com>
1470
1471 Fix breakage in grub-setup.
1472
1473 * util/i386/pc/grub-setup.c (setup): Use "part_msdos" instead of
1474 "msdos_partition_map".
1475
ff747d50 14762009-08-25 Vladimir Serbinenko <phcoder@gmail.com>
1477
1478 Fix breakage in normal/auth.c.
1479
1480 * normal/auth.c (grub_iswordseparator): New function.
1481
e7e1f93f 14822009-08-25 Vladimir Serbinenko <phcoder@gmail.com>
1483
1484 Authentication support.
1485
1486 * commands/password.c: New file.
1487 * conf/common.rmk (pkglib_MODULES): Add password.mod.
1488 (password_mod_SOURCES): New variable.
1489 (password_mod_CFLAGS): Likewise.
1490 (password_mod_LDFLAGS): Likewise.
1491 (normal_mod_SOURCES): Add normal/auth.c.
1492 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add commands/password.c and
1493 normal/auth.c.
1494 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1495 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1496 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
1497 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1498 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1499 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1500 * include/grub/auth.h: New file.
1501 * include/grub/err.h (grub_err_t): New enum value
1502 GRUB_ERR_ACCESS_DENIED.
1503 * include/grub/menu.h (grub_menu_entry): New fields 'restricted' and
1504 'users'.
1505 * include/grub/normal.h (grub_cmdline_get): New argument 'history'.
1506 * normal/cmdline.c (grub_cmdline_get): New argument 'history'. All
1507 users updated.
1508 * normal/auth.c: New file.
1509 * normal/main.c (grub_normal_add_menu_entry): Handle --users option.
1510 (grub_cmdline_run): Don't allow to go to command line without
1511 authentication.
1512 * normal/menu.c (grub_menu_execute_entry): Handle restricted entries.
1513 * normal/menu_entry.c (grub_menu_entry_run): Don't allow editing
1514 menuentry without superuser rights.
1515 * normal/menu_viewer.c (grub_menu_viewer_show_menu): Don't exit if
1516 user isn't a superuser.
1517
70f1161d 15182009-08-24 Vladimir Serbinenko <phcoder@gmail.com>
1519
1520 Save space by inlining misc.c functions.
1521
1522 * kern/misc.c (grub_iswordseparator): Made static.
1523 * kern/misc.c (grub_strcat): Moved from here ...
1524 * include/grub/misc.h (grub_strcat): ... here. Inlined.
1525 * kern/misc.c (grub_strncat): Moved from here ...
1526 * include/grub/misc.h (grub_strncat): ... here. Inlined.
1527 * kern/misc.c (grub_strcasecmp): Moved from here ...
1528 * include/grub/misc.h (grub_strcasecmp): ... here. Inlined.
1529 * kern/misc.c (grub_strncasecmp): Moved from here ...
1530 * include/grub/misc.h (grub_strncasecmp): ... here. Inlined.
1531 * kern/misc.c (grub_isalpha): Moved from here ...
1532 * include/grub/misc.h (grub_isalpha): ... here. Inlined.
1533 * kern/misc.c (grub_isdigit): Moved from here ...
1534 * include/grub/misc.h (grub_isdigit): ... here. Inlined.
1535 * kern/misc.c (grub_isgraph): Moved from here ...
1536 * include/grub/misc.h (grub_isgraph): ... here. Inlined.
1537 * kern/misc.c (grub_tolower): Moved from here ...
1538 * include/grub/misc.h (grub_tolower): ... here. Inlined.
1539
48e40bff 15402009-08-24 Vladimir Serbinenko <phcoder@gmail.com>
1541
1542 * script/sh/function.c (grub_script_function_find): Cut error message
1543 not to flood terminal.
1544 * script/sh/lexer.c (grub_script_yylex): Remove command line length
1545 limit.
1546 * script/sh/script.c (grub_script_arg_add): Duplicate string.
1547
c385bfc3 15482009-08-24 Colin Watson <cjwatson@ubuntu.com>
1549
1550 * term/usb_keyboard.c (grub_usb_keyboard_getreport): Make
1551 `report' grub_uint8_t *.
1552 (grub_usb_keyboard_checkkey): Make `data' elements grub_uint8_t.
1553 Use a 50-millisecond timeout rather than just repeating
1554 grub_usb_keyboard_getreport 50 times.
1555 (grub_usb_keyboard_getkey): Make `data' elements grub_uint8_t.
1556
2d21e3e8 15572009-08-24 Vladimir Serbinenko <phcoder@gmail.com>
1558
1559 Rename *_partition_map to part_*
1560
1561 * partmap/acorn.c (grub_acorn_partition_map): Set name to 'part_acorn'.
1562 * partmap/amiga.c (grub_amiga_partition_map): Set name to 'part_amiga'.
1563 * partmap/apple.c (grub_apple_partition_map): Set name to 'part_apple'.
1564 * partmap/gpt.c (grub_gpt_partition_map): Set name to 'part_gpt'.
1565 All users updated.
1566 * partmap/msdos.c (grub_msdos_partition_map): Set name to 'part_msdos'.
1567 All users updated.
1568 * partmap/sun.c (grub_sun_partition_map): Set name to 'part_sun'.
1569 * util/grub-probe.c (probe_partmap): Don't transform partition name
1570 to get module name.
1571
dd103c4e 15722009-08-24 Vladimir Serbinenko <phcoder@gmail.com>
1573
1574 Fix OpenBSD and NetBSD support.
1575
1576 * include/grub/i386/bsd.h (GRUB_BSD_TEMP_BUFFER): Change to resolve
1577 memory address conflict.
1578 (OPENBSD_MMAP_ACPI): New definition.
1579 (OPENBSD_MMAP_NVS): Likewise.
1580 * loader/i386/bsd.c (grub_openbsd_boot): Support OPENBSD_MMAP_ACPI
1581 and OPENBSD_MMAP_NVS.
1582 Add memory map terminator
1583 Explicit cast when calling grub_unix_real_boot.
ad8ea1f4 1584 (grub_netbsd_boot): Explicit cast when calling grub_unix_real_boot.
dd103c4e 1585
16c84d74 15862009-08-24 Vladimir Serbinenko <phcoder@gmail.com>
1587
1588 Let user specify NetBSD root device.
1589
1590 * loader/i386/bsd.c (netbsd_root): New variable.
1591 (netbsd_opts): New option 'root'.
1592 (NETBSD_ROOT_ARG): New macro.
1593 (grub_netbsd_boot): Use 'netbsd_root'.
1594 (grub_bsd_unload): Free 'netbsd_root'.
1595 (grub_cmd_netbsd): Fill 'netbsd_root'.
1596
adb29902 15972009-08-24 Vladimir Serbinenko <phcoder@gmail.com>
1598
1599 Support for 64-bit NetBSD.
1600
1601 * loader/i386/bsd.c (grub_bsd_load_elf): Apply correct mask to entry
1602 point when booting non-FreeBSD.
1603
f5ae9f74 16042009-08-24 Vladimir Serbinenko <phcoder@gmail.com>
1605
1606 Support --no-smp and --no-acpi for NetBSD.
1607
1608 * include/grub/i386/bsd.h (NETBSD_AB_NOSMP): New definition.
1609 (NETBSD_AB_NOACPI): Likewise.
1610 * loader/i386/bsd.c (netbsd_opts): New entries no-smp and no-acpi.
1611 (netbsd_flags): Add NETBSD_AB_NOSMP, NETBSD_AB_NOACPI.
1612
de74f136 16132009-08-23 Vladimir Serbinenko <phcoder@gmail.com>
1614
1615 * fs/hfsplus.c (grub_hfsplus_mount): Don't ignore grub_hfsplus_read_file
1616 errors.
1617 (grub_hfsplus_btree_iterate_node): Don't ignore grub_hfsplus_read_file
1618 errors. Call grub_error when needed.
1619
e9a925da 16202009-08-23 Vladimir Serbinenko <phcoder@gmail.com>
1621
1622 * commands/search.c (search_fs): Try searching without autoload first.
1623 * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Load
1624 filesystem module explicitly for faster booting.
1625
5174302b 16262009-08-23 Colin Watson <cjwatson@ubuntu.com>
1627
1628 * util/grub-mkconfig.in: Export GRUB_DISABLE_OS_PROBER.
1629
c8c80635 16302009-08-23 Colin Watson <cjwatson@ubuntu.com>
1631
1632 * util/grub.d/30_os-prober.in: Disable os-prober if
1633 `GRUB_DISABLE_OS_PROBER' was set to true.
1634
71acf5e5 16352009-08-23 Robert Millan <rmh.grub@aybabtu.com>
1636
1637 * partmap/pc.c: Rename to ...
1638 * partmap/msdos.c: ... this. Update all users.
1639 (grub_pc_partition_map): Rename to ...
1640 (grub_msdos_partition_map): ... this. Update all users.
1641
1642 * parttool/pcpart.c: Rename to ...
1643 * parttool/msdospart.c: ... this. Update all users.
1644
1645 * include/grub/pc_partition.h: Rename to ...
1646 * include/grub/msdos_partition.h: ... this. Update all users.
1647 (grub_pc_partition_bsd_entry): Rename to ...
1648 (grub_msdos_partition_bsd_entry): ... this. Update all users.
1649 (grub_pc_partition_disk_label): Rename to ...
1650 (grub_msdos_partition_disk_label): ... this. Update all users.
1651 (grub_pc_partition_entry): Rename to ...
1652 (grub_msdos_partition_entry): ... this. Update all users.
1653 (grub_pc_partition_mbr): Rename to ...
1654 (grub_msdos_partition_mbr): ... this. Update all users.
1655 (grub_pc_partition): Rename to ...
1656 (grub_msdos_partition): ... this. Update all users.
1657 (grub_pc_partition_is_empty): Rename to ...
1658 (grub_msdos_partition_is_empty): ... this. Update all users.
1659 (grub_pc_partition_is_extended): Rename to ...
1660 (grub_msdos_partition_is_extended): ... this. Update all users.
1661 (grub_pc_partition_is_bsd): Rename to ...
1662 (grub_msdos_partition_is_bsd): ... this. Update all users.
1663
1664 * conf/common.rmk (amiga_mod_SOURCES, amiga_mod_CFLAGS)
1665 (amiga_mod_LDFLAGS, apple_mod_SOURCES, apple_mod_CFLAGS)
1666 (apple_mod_LDFLAGS, msdos_mod_SOURCES, msdos_mod_CFLAGS)
1667 (msdos_mod_LDFLAGS, sun_mod_SOURCES, sun_mod_CFLAGS)
1668 (sun_mod_LDFLAGS, acorn_mod_SOURCES, acorn_mod_CFLAGS)
1669 (acorn_mod_LDFLAGS, gpt_mod_SOURCES, gpt_mod_CFLAGS)
1670 (gpt_mod_LDFLAGS): Rename to ...
1671 (part_amiga_mod_SOURCES, part_amiga_mod_CFLAGS, part_amiga_mod_LDFLAGS)
1672 (part_apple_mod_SOURCES, part_apple_mod_CFLAGS, part_apple_mod_LDFLAGS)
1673 (part_msdos_mod_SOURCES, part_msdos_mod_CFLAGS, part_msdos_mod_LDFLAGS)
1674 (part_sun_mod_SOURCES, part_sun_mod_CFLAGS, part_sun_mod_LDFLAGS)
1675 (part_acorn_mod_SOURCES, part_acorn_mod_CFLAGS, part_acorn_mod_LDFLAGS)
1676 (part_gpt_mod_SOURCES, part_gpt_mod_CFLAGS)
1677 (part_gpt_mod_LDFLAGS): ... this.
1678 (pkglib_MODULES): Prefix partition modules with `part_'. Rename
1679 `pcpart.mod' to `msdospart.mod'.
1680 (pcpart_mod_SOURCES, pcpart_mod_CFLAGS, pcpart_mod_LDFLAGS): Rename
1681 to ...
1682 (msdospart_mod_SOURCES, msdospart_mod_CFLAGS)
1683 (msdospart_mod_LDFLAGS): ... this.
1684
c11fded5 16852009-08-23 Vladimir Serbinenko <phcoder@gmail.com>
1686
1687 * loader/i386/bsd.c (freebsd_opts): Rewritten to use extcmd.
1688 (openbsd_opts): Likewise.
1689 (netbsd_opts): Likewise.
1690 (freebsd_flags): Added 0 terminator.
1691 (openbsd_flags): Likewise.
1692 (netbsd_flags): Likewise.
1693 (grub_bsd_parse_flags): Rewritten to use extcmd. All users updated.
1694 (grub_cmd_freebsd): Transformed into extended command.
1695 (grub_cmd_openbsd): Likewise.
1696 (grub_cmd_netbsd): Likewise.
1697 (cmd_freebsd): Changed type to grub_extcmd_t.
1698 (cmd_openbsd): Likewise.
1699 (cmd_netbsd): Likewise.
1700 (GRUB_MOD_INIT (bsd)): Register grub_cmd_freebsd, grub_cmd_netbsd and
1701 grub_cmd_openbsd as extended commands.
1702 (GRUB_MOD_FINI (bsd)): Use grub_unregister_extcmd for cmd_freebsd,
1703 cmd_netbsd and cmd_openbsd
1704
11d1c769 17052009-08-22 Vladimir Serbinenko <phcoder@gmail.com>
1706
1707 * commands/xnu_uuid.c (transform): Use grub_memcpy instead of memcpy.
1708
7a9094e5 17092009-08-21 Pavel Roskin <proski@gnu.org>
1710
5496c37e 1711 * Makefile.in (install-local): When checking if a file is in the
1712 build directory, use "test -e" to detect symlinks.
1713
7a9094e5 1714 * Makefile.in (install-local): Remove all files in
1715 $(DESTDIR)$(pkglibdir) before installing new files there.
1716
e53cea11 17172009-08-18 Felix Zielcke <fzielcke@z-51.de>
1718
1719 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Use
1720 grub-mkelfimage.
1721
9aced544 17222009-08-18 Felix Zielcke <fzielcke@z-51.de>
1723
1724 * util/grub-mkconfig.in: Don't use gfxterm by default if not
1725 explicitly specified by the user.
1726
b7da6bab 17272009-08-18 Pavel Roskin <proski@gnu.org>
1728
1729 * include/grub/fbfill.h (struct grub_video_fbrender_target): Use
1730 grub_uint8_t pointer for data.
1731 * include/grub/fbutil.h (struct grub_video_fbblit_info):
1732 Likewise.
1733 * video/fb/fbutil.c: Remove unnecessary casts.
1734
19f1b335 17352009-08-17 Michal Suchanek <hramrach@centrum.cz>
1736
1737 VBE cleanup.
1738
1739 * video/i386/pc/vbe.c (vbe_mode_in_use): Removed (duplicate).
1740 (grub_vbe_set_video_mode): Save active mode info
1741 only after setting the mode.
1742 (grub_video_vbe_setup): Call 'grub_vbe_set_video_mode' with NULL as
1743 second argument.
1744
2f467aa9 17452009-08-17 Michal Suchanek <hramrach@centrum.cz>
1746
1747 Rename variables for clarity.
1748
1749 * video/i386/pc/vbe.c (active_mode_info): Renamed to ...
1750 (active_vbe_mode_info): ... this. All users updated.
1751 (framebuffer): Rename 'active_mode' to 'active_vbe_mode'.
1752 All users updated.
1753 (initial_mode): Rename to ...
1754 (initial_vbe_mode): ... this. All users updated.
1755 (mode_in_use): Rename to ..
1756 (vbe_mode_in_use): ... this. All users updated.
1757 (mode_list): Rename to ..
1758 (vbe_mode_list): ... this. All users updated.
1759 (grub_vbe_set_video_mode): Rename 'mode' to 'vbe_mode', 'mode_info' to
1760 'vbe_mode_info' and 'old_mode' to 'old_vbe_mode'.
1761 (grub_video_vbe_init): Rename 'rm_mode_list' to 'rm_vbe_mode_list' and
1762 'mode_list_size' to 'vbe_mode_list_size'.
1763 (grub_video_vbe_setup): Rename 'mode_info' to 'vbe_mode_info',
1764 'best_mode_info' to 'best_vbe_mode_info' and
1765 'best_mode' to 'best_vbe_mode'
1766
6025fcd7 17672009-08-17 Michal Suchanek <hramrach@centrum.cz>
1768
1769 Remove duplicate grub_video_fb_get_video_ptr.
1770
1771 * include/grub/fbutil.h (get_data_ptr): Rename to ...
1772 (grub_video_fb_get_video_ptr): ... this.
1773 * include/grub/video_fb.h (grub_video_fb_get_video_ptr): Removed.
1774 * video/fb/fbutil.c: Add comment about addressing.
1775 (get_data_ptr): Rename to ...
1776 (grub_video_fb_get_video_ptr): ... this. All users updated.
1777 * video/fb/video_fb.c (grub_video_fb_get_video_ptr): Remove.
1778
cc8c6faf 17792009-08-17 Robert Millan <rmh.grub@aybabtu.com>
1780
1781 * fs/fat.c (grub_fat_read_data): Remove `#if 0' braces around the
1782 grub_dprintf() that was just added.
1783
08aa61f0 17842009-08-17 Robert Millan <rmh.grub@aybabtu.com>
1785
1786 * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT)
1787 (DEFAULT_VIDEO_MODE): Remove macros.
1788 (grub_linux_boot): Remove assumption that Linux has FB support,
1789 and use "text" as default video mode.
1790
7cef4f75 17912009-08-15 Vladimir Serbinenko <phcoder@gmail.com>
1792
1793 * fs/affs.c (grub_affs_read_symlink): Change leftover grub_printf into
1794 grub_dprintf.
1795 * fs/fat.c (grub_fat_read_data): Likewise.
1796
e1f39873 17972009-08-14 Vladimir Serbinenko <phcoder@gmail.com>
1798
1799 * loader/i386/multiboot.c (grub_multiboot): Don't pass filename to
1800 payload.
1801 (grub_module): Likewise.
1802
c166d79e 18032009-08-14 Vladimir Serbinenko <phcoder@gmail.com>
1804
1805 * loader/i386/multiboot.c (grub_multiboot_unload): Don't free mbi and
1806 mbi->cmdline but free playground.
1807
c60cee8e 18082009-08-14 Vladimir Serbinenko <phcoder@gmail.com>
1809
1810 Handle group offset on UFS1.
1811
1812 * fs/ufs.c (grub_ufs_sblock): New field 'cylg_mask'.
1813 (grub_ufs_read_inode) [!MODE_UFS2]: handle cylg_offset and cylg_mask.
1814
c0d8b5d4 18152009-08-14 Vladimir Serbinenko <phcoder@gmail.com>
1816
1817 Split ufs.mod into ufs1.mod and ufs2.mod.
1818
1819 * conf/common.rmk (grub_probe_SOURCES): Add fs/ufs2.c.
1820 (grub_fstest_SOURCES): Likewise.
1821 (pkglib_MODULES): Remove ufs.mod. Add ufs1.mod and ufs2.mod.
1822 (ufs_mod_SOURCES): Remove.
1823 (ufs_mod_CFLAGS): Likewise.
1824 (ufs_mod_LDFLAGS): Likewise.
1825 (ufs1_mod_SOURCES): New variable.
1826 (ufs1_mod_CFLAGS): Likewise.
1827 (ufs1_mod_LDFLAGS): Likewise.
25fbd77a 1828 (ufs2_mod_SOURCES): New variable.
1829 (ufs2_mod_CFLAGS): Likewise.
1830 (ufs2_mod_LDFLAGS): Likewise.
c0d8b5d4 1831 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add fs/ufs2.c.
1832 * conf/i386-efi.rmk (util/i386/efi/grub-mkimage.c_DEPENDENCIES):
1833 Likewise.
1834 (grub_emu_SOURCES): Likewise.
1835 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1836 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
1837 (grub_setup_SOURCES): Likewise.
1838 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1839 * conf/sparc64.rmk (grub_emu_SOURCES): Likewise.
1840 (grub_setup_SOURCES): Likewise.
1841 * conf/x86_64-efi.rmk (util/i386/efi/grub-mkimage.c_DEPENDENCIES):
1842 Likewise.
1843 * fs/ufs2.c: New file.
1844 * fs/ufs.c: Separate UFS1 from UFS2 by using preprocessor.
1845
d3539132 18462009-08-14 Vladimir Serbinenko <phcoder@gmail.com>
1847
1848 Framebuffer split.
1849
1850 * commands/i386/pc/vbetest.c (grub_cmd_vbetest): Restore video
1851 subsystem at the end.
1852 * conf/common.rmk (pkglib_MODULES): Add video_fb.mod.
1853 (video_fb_mod_SOURCES): New variable.
1854 (video_fb_mod_CFLAGS): Likewise.
1855 (video_fb_mod_LDFLAGS): Likewise.
1856 * conf/i386-pc.rmk (vbe_mod_SOURCES): Remove video/i386/pc/vbeblit.c,
1857 video/i386/pc/vbefill.c and video/i386/pc/vbeutil.c.
1858 * video/i386/pc/vbeblit.c: Moved from here ...
1859 * video/fb/fbblit.c: ..here. Replaced 'vbe' with 'fb'.
1860 * video/i386/pc/vbefill.c: Moved from here ...
1861 * video/fb/fbfill.c: ..here. Replaced 'vbe' with 'fb'.
1862 * video/i386/pc/vbeutil.c: Moved from here ...
1863 * video/fb/fbutil.c: ..here. Replaced 'vbe' with 'fb'.
1864 * include/grub/i386/pc/vbeblit.h: Moved from here ...
1865 * include/grub/fbblit.h: ... here. Replaced 'vbe' with 'fb'.
1866 * include/grub/i386/pc/vbefill.h: Moved from here ...
1867 * include/grub/fbfill.h: ... here. Replaced 'vbe' with 'fb'.
1868 * include/grub/i386/pc/vbeutil.h: Moved from here ...
1869 * include/grub/fbutil.h: ... here. Replaced 'vbe' with 'fb'.
1870 * include/grub/i386/pc/vbe.h: Moved framebuffer part ...
1871 * include/grub/video_fb.h: ... here. Replaced 'vbe' with 'fb'.
1872 * include/grub/video.h (GRUB_VIDEO_RENDER_TARGET_FRONT_BUFFER): Removed.
1873 (GRUB_VIDEO_RENDER_TARGET_BACK_BUFFER): Likewise.
1874 (grub_video_adapter): Added 'get_info_and_fini'.
1875 (grub_video_get_info_and_fini): New prototype.
1876 (grub_video_set_mode): make modestring const char *.
1877 * loader/i386/linux.c (grub_linux_setup_video): Use
1878 grub_video_get_info_and_fini.
1879 (grub_linux_boot): Move modesetting just before booting.
1880 * loader/i386/pc/xnu.c (grub_xnu_set_video): Use
1881 grub_video_get_info_and_fini.
1882 * video/i386/pc/vbe.c: Moved framebuffer part ...
1883 * video/fb/video_fb.c: ... here. Replaced 'vbe' with 'fb'.
1884 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): Use
1885 grub_video_fbstd_colors and grub_video_fb_set_palette.
1886 (grub_video_vbe_init): Clear 'framebuffer' variable and use
1887 grub_video_fb_init.
1888 (grub_video_vbe_fini): Use grub_video_fb_fini.
1889 (grub_video_vbe_setup): Use framebuffer.render_target instead of
1890 render_target and use grub_video_fb_set_active_render_target and
1891 grub_video_fb_set_palette.
1892 (grub_video_vbe_set_palette): Use grub_video_fb_set_palette.
1893 (grub_video_vbe_set_viewport): Use grub_video_fb_set_viewport.
1894 (grub_video_vbe_adapter): Use framebuffer.
1895 * video/video.c (grub_video_get_info_and_fini): New function.
1896 (grub_video_set_mode): Make modestring const char *.
1897 (GRUB_MOD_INIT(video_video)): Don't set variables to 0 since these
1898 values are already initialised.
1899
d404ee56 19002009-08-14 Pavel Roskin <proski@gnu.org>
1901
1902 * boot/i386/pc/cdboot.S: Use LOCAL for local labels. Eliminate
1903 ABS and APPLE_CC.
1904 * boot/i386/pc/diskboot.S: Likewise.
1905 * boot/i386/pc/lnxboot.S: Likewise. Hardcode the number of code
1906 sectors allow compilation on MacOSX.
1907 * conf/i386-pc.rmk: Enable unconditional compilation of
1908 lnxboot.img.
1909
9a10df16 19102009-08-13 Colin Watson <cjwatson@ubuntu.com>
1911
1912 * util/grub-mkconfig.in: Export GRUB_HIDDEN_TIMEOUT.
1913 * util/grub.d/00_header.in: Enter interruptible sleep if
1914 GRUB_HIDDEN_TIMEOUT is set.
1915
be3c9ca7 19162009-08-13 Yves Blusseau <blusseau@zetam.org>
1917
1918 * include/grub/symbol.h: Add the LOCAL macro.
1919 * boot/i386/pc/boot.S: Use the LOCAL macro for all labels
1920 starting with "L_".
1921
1f9e557e 19222009-08-13 Pavel Roskin <proski@gnu.org>
1923
9ca62843 1924 * boot/i386/pc/boot.S: Remove ABS macro, it's not required by
1925 any modern compilers we support.
1926
1f9e557e 1927 * boot/i386/pc/boot.S: Remove all code dependent on APPLE_CC.
1928 Use local labels starting with "L_" so that Apple assembler
1929 knows they are local.
1930
81623db6 19312009-08-10 Robert Millan <rmh.grub@aybabtu.com>
1932
1933 * include/grub/i386/bsd.h (KERNEL_TYPE_NONE, KERNEL_TYPE_FREEBSD)
1934 (KERNEL_TYPE_OPENBSD, KERNEL_TYPE_NETBSD): Convert to ...
1935 (bsd_kernel_types): ... this enum.
1936
1937 * loader/i386/bsd.c (grub_cmd_freebsd_loadenv, grub_cmd_freebsd_module)
1938 (grub_cmd_freebsd_module_elf): Abort with "You need to load the
1939 kernel first." when `kernel_type' is set to KERNEL_TYPE_NONE.
1940
1941 (grub_bsd_load_aout, grub_bsd_load, grub_cmd_freebsd_loadenv)
1942 (grub_cmd_freebsd_module, grub_cmd_freebsd_module_elf)
1943 (GRUB_MOD_INIT (bsd)): Fix capitalization in a few error
1944 messages.
1945
f5d35e7a 19462009-08-08 Robert Millan <rmh.grub@aybabtu.com>
1947
1948 * util/grub-dumpdevtree: Moved from here ...
1949 * util/i386/efi/grub-dumpdevtree: ... to here.
1950 (hexify): New function. Converts a string to its hex version.
1951 Generate hex versions of "efi" and "device-properties" by calling
1952 hexify() on the ASCII strings rather than by hardcoding numbers.
1953
d1e1d527 19542009-08-08 Robert Millan <rmh.grub@aybabtu.com>
1955
1956 * fs/jfs.c: Update copyright year.
1957
1ebbe064 19582009-08-08 Felix Zielcke <fzielcke@z-51.de>
1959
1960 * util/grub.d/00_header.in: Fix a comment.
1961 * util/grub.d/10_linux.in: Likewise.
1962 * util/grub.d/10_windows.in: Likewise.
1963 * util/grub.d/10_hurd.in: Likewise.
1964
a78c8d24 19652009-08-08 Felix Zielcke <fzielcke@z-51.de>
1966
1967 * util/grub-mkconfig.in: Allow the user to specify the used font
1968 with GRUB_FONT.
1969
29a6b9e8 19702009-08-08 Pavel Roskin <proski@gnu.org>
1971
b5f16cc4 1972 * include/grub/powerpc/libgcc.h: Export __ashrdi3() if
1973 available, xfs.mod needs it now.
1974
2f5cb827 1975 * util/grub-mkconfig_lib.in (version_test_numeric): Don't use
1976 the "g" modifier in sed when the intention is to strip something
1977 once. This fixes comparison of kernels with multiple dashes.
1978
29a6b9e8 1979 * util/grub-mkconfig.in: Define datarootdir, datadir may depend
1980 on it. Add missing space before closing bracket. Fix
1981 misleading formatting.
1982
892a3d98 19832009-08-07 Robert Millan <rmh.grub@aybabtu.com>
1984
1985 * docs/grub.texi: Major overhaul. Remove all sections that are
1986 specific to GRUB Legacy, or mostly composed of Legacy-specific
1987 information.
1988
ed94253f 19892009-08-07 Robert Millan <rmh.grub@aybabtu.com>
1990
1991 * docs/version.texi: New file. Provides version information for
1992 grub.texi.
1993
126d6628 19942009-08-07 Robert Millan <rmh.grub@aybabtu.com>
1995
1996 * docs/grub.texi: Update CVS information to SVN.
1997 Replace outdated "GRUB 2 will include" phrase with "GRUB 2 includes".
1998
998b5aa9 19992009-08-07 Felix Zielcke <fzielcke@z-51.de>
2000
2001 * util/grub-mkconfig.in: Remove a wrong `fi'.
2002
818e094a 20032009-08-07 Felix Zielcke <fzielcke@z-51.de>
2004
2005 * fs/uuid.c (grub_jfs_superblock): New fields unused2 and uuid.
2006 (grub_jfs_uuid): New function.
2007 (grub_jfs_fs): Set uuid field to grub_jfs_uuid.
2008
b969c52f 20092009-08-07 Felix Zielcke <fzielcke@z-51.de>
2010
2011 * util/grub-mkconfig_lib.in (font_path): Move the functionality
2012 of it to ...
2013 * util/grub-mkconfig.in: ... here. Prefer unicode.pf2 and
2014 unifont.pf2 over ascii.pf2. Export LANG=C in case ascii.pf2 gets used.
2015
7a4894cc 20162009-08-07 Robert Millan <rmh.grub@aybabtu.com>
2017
2018 * util/grub.d/10_linux.in (test_numeric): Moved from here ...
2019 * util/grub-mkconfig_lib.in (version_test_numeric): ... to here.
2020 Update all users.
2021
2022 * util/grub.d/10_linux.in (test_gt): Strip any basename prefix,
2023 not just "vmlinu[zx]".
2024 Moved from here ...
2025 * util/grub-mkconfig_lib.in (version_test_gt): ... to here. Update
2026 all users.
2027
2028 * util/grub.d/10_linux.in (find_latest): Moved from here ...
2029 * util/grub-mkconfig_lib.in (version_find_latest): ... to here. Update
2030 all users.
2031
4e2171f8 20322009-08-07 Robert Millan <rmh.grub@aybabtu.com>
2033
2034 * util/grub.d/10_freebsd.in: Use an absolute device path for
2035 `vfs.root.mountfrom'. Set `vfs.root.mountfrom.options=rw'.
2036
6dcfcb32 20372009-08-06 Felix Zielcke <fzielcke@z-51.de>
2038
2039 * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Fix
2040 handling of multiple abstraction modules.
2041
f56a8756 20422009-08-04 Robert Millan <rmh.grub@aybabtu.com>
2043
2044 Fix a bug resulting in black screen when loading Linux using a
2045 packed video mode.
2046
2047 * kern/i386/pc/startup.S (grub_vbe_bios_getset_dac_palette_width): New
2048 function.
2049
2050 * include/grub/i386/pc/vbe.h (GRUB_VBE_CAPABILITY_DACWIDTH): New macro.
2051 (grub_vbe_bios_getset_dac_palette_width): New function.
2052 (grub_vbe_bios_get_dac_palette_width)
2053 (grub_vbe_bios_set_dac_palette_width): New macros (act as wrappers for
2054 grub_vbe_bios_getset_dac_palette_width()).
2055
2056 * video/i386/pc/vbe.c (grub_vbe_probe): Use `GRUB_VBE_STATUS_OK' to
2057 check for return status.
2058 (grub_vbe_get_video_mode_info): When getting information for a packed
2059 mode (<= 8 bpp), obtain DAC palette width using
2060 grub_vbe_bios_getset_dac_palette_width(), and use that for initializing
2061 {red,green,blue}_mark_size.
2062
222671b2 20632009-08-04 Felix Zielcke <fzielcke@z-51.de>
2064
ecb1a6d9 2065 * commands/search.c (options): Fix help output to match actual code.
222671b2 2066
f84114f5 20672009-08-02 Vladimir Serbinenko <phcoder@gmail.com>
2068
2069 * commands/hexdump.c (grub_cmd_hexdump): Use grub_disk_read instead
2070 of homegrown code.
2071
bd288a20 20722009-08-01 Vladimir Serbinenko <phcoder@gmail.com>
e768b770 2073
2074 * util/hostfs.c (grub_hostfs_dir): Don't use DT_DIR: It doesn't work
2075 on XFS or ReiserFS.
2076
8aab5e25 20772009-08-01 Vladimir Serbinenko <phcoder@gmail.com>
2078
2079 Support Apple partition map with sector size different from 512 bytes.
2080
2081 * partmap/apple.c (grub_apple_header): New field 'blocksize'.
2082 (apple_partition_map_iterate): Respect 'aheader.blocksize'
2083 and 'apart.partmap_size'.
2084
6ad6258a 20852009-08-01 Vladimir Serbinenko <phcoder@gmail.com>
20862009-08-01 Robert Millan <rmh.grub@aybabtu.com>
2087
2088 Fix cpuid command.
2089
2090 * commands/i386/cpuid.c (options): New variable.
2091 (grub_cmd_cpuid): Return real error.
2092 (GRUB_MOD_INIT(cpuid)): Declare options.
2093
67459bc6 20942009-07-31 Vladimir Serbinenko <phcoder@gmail.com>
2095
2096 * partmap/pc.c (pc_partition_map_iterate): Check that boot flags are
2097 valid.
2098
fbc6ab54 20992009-07-31 Bean <bean123ch@gmail.com>
2100
2101 * fs/xfs.c (grub_xfs_sblock): Change unused5 field to log2_sect and
2102 log2_inode.
2103 (grub_fshelp_node): Move inode field to the end.
2104 (grub_xfs_data): Remove inode field.
2105 (grub_xfs_inode_block): Calculate inode size using sblock.
2106 (grub_xfs_inode_offset): Likewise.
2107 (grub_xfs_read_inode): Calculate inode size using sblock.
2108 (grub_xfs_read_block): Replace XFS_INODE_EXTENTS with nrec.
2109 (grub_xfs_iterate_dir): Calculate inode size using sblock.
2110 (grub_xfs_mount): Use grub_zalloc instead of grub_malloc. Realloc data
2111 to match inode size.
2112 (grub_xfs_dir): goto mount_fail when mount fails, as data->diropen is
2113 not accessible when data is null.
2114 (grub_xfs_open): Likewise.
2115
f45d6cfc 21162009-07-31 Bean <bean123ch@gmail.com>
2117
2118 * disk/lvm.c (grub_lvm_scan_device): Ignore extra copy of metadata.
2119 Don't change pv->disk if it's already set.
2120
2121 * disk/raid.c (grub_raid_scan_device): Merge this function into ...
2122 (grub_raid_register): ... here.
2123 (grub_raid_rescan): Removed.
2124
2125 * include/grub/raid.h (grub_raid_rescan): Removed.
2126
2127 * util/grub-fstest.c: Remove include file <grub/raid.h>.
2128 (fstest): Replace grub_raid_rescan with module fini function followed
2129 by init function.
2130
2131 * util/grub-probe.c: Add include file <grub/raid.h>.
2132 (probe_raid_level): New function.
2133 (probe): Detect abstraction by walking the disk device, support two
2134 level of abstraction (LVM on RAID) when detecting partition map.
2135
24443b5a 21362009-07-31 Pavel Roskin <proski@gnu.org>
2137
2138 * disk/raid5_recover.c (grub_raid5_recover): Revert conversion
2139 to grub_zalloc(), it was erroneous.
2140 Reported by Bean <bean123ch@gmail.com>
2141
a275d9e7 21422009-07-30 Vladimir Serbinenko <phcoder@gmail.com>
2143
2144 * util/i386/pc/grub-setup.c (setup): Check that no partition is in
ad8ea1f4 2145 embedding zone, not only the first one.
a275d9e7 2146
56c5a47f 21472009-07-29 Joe Auricchio <jauricchio@gmail.com>
2148
2149 * term/gfxterm.c (clear_char): New function.
2150 (grub_virtual_screen_setup): Use clear_char.
2151 (scroll_up): Likewise.
2152 (grub_virtual_screen_cls): Likewise.
2153
67bb323a 21542009-07-29 Felix Zielcke <fzielcke@z-51.de>
2155
2156 * util/deviceiter.c (get_acceleraid_disk_name): New static
2157 function.
2158 (grub_util_iterate_devices): Handle Accelraid devices.
2159 * util/hostdisk.c (convert_system_partition_to_system_disk): Likewise.
2160
388a7c75 21612009-07-28 Robert Millan <rmh.grub@aybabtu.com>
2162
2163 * loader/i386/linux.c (grub_cmd_linux): Use ',' rather than ';' as
2164 separator for the suggested gfxpayload string (';' collides with the
2165 parser and needs escaping).
2166
3bb7abcf 21672009-07-28 Vladimir Serbinenko <phcoder@gmail.com>
2168
2169 * loader/i386/multiboot_helper.S (grub_multiboot_backward_relocator):
2170 Clear direction flag before jumping to OS.
2171 (grub_multiboot2_real_boot): Likewise.
2172
2ddd36d7 21732009-07-28 Felix Zielcke <fzielcke@z-51.de>
2174
2175 * util/i386/pc/grub-install: Fix parsing of --disk-module
2176 option.
2177
c521b62b 21782009-07-28 Felix Zielcke <fzielcke@z-51.de>
2179
2180 * util/i386/pc/grub-setup.c (setup): Fix 2 incorrect checks
2181 when embedding.
2182
880e0a0c 21832009-07-26 Felix Zielcke <fzielcke@z-51.de>
2184
2185 * util/grub-mkconfig.in (package_version): New variable.
2186 Use it do display the version.
2187
2366e356 21882009-07-25 Felix Zielcke <fzielcke@z-51.de>
2189
2190 * kern/file.c (grub_file_open): Revert to previous check with
2191 grub_errno.
2192
7ad8c80e 21932009-07-25 Vladimir Serbinenko <phcoder@gmail.com>
2194
2195 * commands/probe.c (GRUB_MOD_INIT (probe)): Remove "[--target=target]"
2196 from help line. It's out of sync with code.
2197
72b9658b 21982009-07-25 Vladimir Serbinenko <phcoder@gmail.com>
2199
2200 * kern/parser.c (grub_parser_execute): Fix a bug causing truncated
2201 entries on failed boot.
2202
77435277 22032009-07-25 Felix Zielcke <fzielcke@z-51.de>
2204
2205 * kern/file.c (grub_file_open): Fix an error check.
2206
fcaa8b21 22072009-07-24 Vladimir Serbinenko <phcoder@gmail.com>
2208
35d16c74 2209 * util/i386/pc/grub-setup.c (setup): Fix segmentation fault when
2210 partition map couldn't be identified.
fcaa8b21 2211
48904cd1 22122009-07-23 Pavel Roskin <proski@gnu.org>
2213
ef3c317f 2214 * commands/xnu_uuid.c (transform): Use GRUB_CPU_WORDS_BIGENDIAN
2215 instead of WORDS_BIGENDIAN. Use grub_le_to_cpu32(), so that the
2216 case of little endian words becomes just an optimization.
2217 Respect const modifier.
ad8ea1f4 2218 (md5_final): Use code that doesn't depend on endianness.
ef3c317f 2219
48904cd1 2220 * include/grub/misc.h (ALIGN_UP): Cast align to the type of addr
2221 to avoid loss of upper bits if align is unsigned and shorter
2222 than addr.
2223
260c9a89 22242009-07-21 Vladimir Serbinenko <phcoder@gmail.com>
2225
2226 UUID support for UFS
2227
2228 * fs/ufs.c (grub_ufs_sblock): Add uuidhi and uuidlow.
2229 (grub_ufs_uuid): New function.
2230 (grub_ufs_fs): add .uuid
2231
f76ce889 22322009-07-21 Pavel Roskin <proski@gnu.org>
2233
2234 * kern/dl.c (grub_dl_check_header): Make static.
2235
6a6cbcaf 22362009-07-21 Felix Zielcke <fzielcke@z-51.de>
2237
2238 * util/grub.d/30_os-prober.in: Remove unused CHAINROOT. Don't
2239 add drivemap for Vista. It breaks Windows 7.
2240
cffcddb2 22412009-07-21 Vladimir Serbinenko <phcoder@gmail.com>
2242
2243 * fs/ufs.c (grub_ufs_sblock): Fix offset of mtime2 which was off by
2244 128 bytes
2245
1ef44b80 22462009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
2247
2248 Add BFS support
2249
2250 * conf/common.rmk (grub_probe_SOURCES): Add fs/befs.c.
2251 (grub_fstest_SOURCES): Likewise.
2252 (pkglib_MODULES): Add befs.mod.
2253 (befs_mod_SOURCES): New variable.
2254 (befs_mod_CFLAGS): Likewise.
2255 (befs_mod_LDFLAGS): Likewise.
2256 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2257 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2258 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2259 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
2260 (grub_setup_SOURCES): Likewise.
2261 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2262 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2263 (grub_setup_SOURCES): Likewise.
2264 * fs/befs.c: New file.
2265 * fs/afs.c (GRUB_AFS_FSNAME): New declaration.
2266 (GRUB_AFS_SBLOCK_SECTOR): Likewise.
2267 (GRUB_AFS_SBLOCK_MAGIC1) [MODE_BFS]: New conditional declaration.
2268 (GRUB_AFS_BTREE_MAGIC) [MODE_BFS]: Likewise
2269 (B_KEY_INDEX_ALIGN): New declaration.
2270 (B_KEY_INDEX_OFFSET): Use B_KEY_INDEX_ALIGN.
2271 (grub_afs_bnode) [MODE_BFS]: Make key_count and key_size 16-bit
2272 (grub_afs_btree) [MODE_BFS]: New conditional declaration.
2273 (grub_afs_sblock) [MODE_BFS]: Remove link_count.
2274 (grub_afs_validate_sblock) [MODE_BFS]: Support BFS
2275 (grub_afs_mount) [MODE_BFS]: Likewise.
2276 (grub_afs_dir) [MODE_BFS]: Divide mtime by 65536 and not 1000000.
2277 (grub_afs_fs): Use GRUB_AFS_FSNAME
2278 (GRUB_MOD_INIT (afs)) [MODE_BFS]: Rename to ...
2279 (GRUB_MOD_INIT (befs)) [MODE_BFS]: ... this
2280 (GRUB_MOD_FINI (afs)) [MODE_BFS]: Rename to ...
2281 (GRUB_MOD_FINI (befs)) [MODE_BFS]: ... this
2282
4f253044 22832009-07-19 Yves BLUSSEAU <yves.grub-devel@zetam.org>
2284
2285 * util/getroot.c (find_root_device): Add support for MacOSX.
2286 * util/hostdisk.c: Likewise.
2287
57a55913 22882009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
2289
2290 * font/font.c (find_glyph): Check whether a font is present to avoid
2291 segmentation fault.
75421ca9 2292
22932009-07-20 Joe Auricchio <jauricchio@gmail.com>
04c7c429 2294
2295 * term/gfxterm.c (grub_virtual_screen_setup): Clear virtual_screen.
2296
e98cd0c2 22972009-07-20 Pavel Roskin <proski@gnu.org>
2298
2299 * configure.ac: Trim excessively wordy excuses.
2300
1d2d169a 23012009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
2302
2303 Add symlink, mtime and label support to AtheFS.
2304
2305 * fs/afs.c (grub_afs_sblock): Declare `name' as char.
2306 (grub_afs_iterate_dir): Handle symlinks.
2307 (grub_afs_open): Use grub_afs_read_symlink.
2308 (grub_afs_dir): Likewise.
2309 Pass mtime.
2310 (grub_afs_label): New function.
2311 (grub_afs_fs): Add grub_afs_label.
2312 (grub_afs_read_symlink): New function.
2313
186f3189 23142009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
2315
2316 Fix AtheFS support.
2317
2318 * fs/afs.c: Fix comments style.
2319 (grub_afs_blockrun): Declare as packed.
2320 (grub_afs_datastream): Likewise.
2321 (grub_afs_bnode): Likewise.
2322 (grub_afs_btree): Likewise.
2323 (grub_afs_sblock): Likewise.
2324 Declare `name' as char.
2325 (grub_afs_inode): Declare as packed.
2326 Change void *vnode to grub_uint32_t unused.
2327 (grub_afs_iterate_dir): Check that key_size is positive.
2328 (grub_afs_mount): Don't read superblock twice.
75421ca9 2329 (grub_afs_dir): Don't free node in case of error,
186f3189 2330 grub_fshelp_find_file already handles this.
2331 (grub_afs_open): Likewise.
2332
5680109e 23332009-07-19 Pavel Roskin <proski@gnu.org>
2334
2335 * Makefile.in: Remove LIBLZO and enable_lzo.
2336 * conf/i386-pc.rmk: Remove lzo support.
2337 * configure.ac: Remove checks for lzo, don't define ENABLE_LZMA.
2338 * include/grub/i386/pc/kernel.h: Define ENABLE_LZMA. Remove lzo
2339 support.
2340 * kern/i386/pc/lzo1x.S: Remove.
2341 * kern/i386/pc/startup.S: Remove lzo support.
2342 * util/i386/pc/grub-mkimage.c: Likewise.
2343
ac70fa32 23442009-07-19 Vladimir Serbinenko <phcoder@gmail.com>
2345
2346 * disk/usbms.c (grub_usbms_transfer): Fix double semicolon.
2347 * fs/xfs.c (grub_xfs_dir): Likewise.
2348 * fs/afs.c (grub_afs_dir): Likewise.
2349 * fs/iso9660.c (grub_iso9660_iterate_dir): Likewise.
2350 (grub_iso9660_open): Likewise.
2351 * fs/jfs.c (grub_jfs_open): Likewise.
2352 * fs/ext2.c (grub_ext2_dir): Likewise.
2353 * include/grub/macho.h (grub_macho_fat_arch): Likewise.
2354 * script/sh/lexer.c (grub_script_yylex): Likewise.
75421ca9 2355
eab58da2 23562009-07-16 Pavel Roskin <proski@gnu.org>
2357
d2838156 2358 * configure.ac: Never add "-c" to CFLAGS.
2359
55c70904 2360 * configure.ac: Fix incorrect comparison for grub_cv_cc_efiemu.
2361
43e6200c 2362 * configure.ac: Fix wrong use of grub_cv_cc_no_red_zone where
2363 grub_cv_cc_efiemu should be used.
2364
ce7a733d 2365 * configure.ac: Typo fixes.
2366
eab58da2 2367 * kern/mm.c (grub_zalloc): New function.
2368 (grub_debug_zalloc): Likewise.
2369 * include/grub/mm.h: Declare grub_zalloc() and
2370 grub_debug_zalloc().
2371 * util/misc.c (grub_zalloc): New function.
2372 * bus/usb/uhci.c (grub_uhci_pci_iter): Use grub_zalloc()
2373 instead of grub_malloc(), remove unneeded initializations.
2374 * bus/usb/usbhub.c (grub_usb_hub_add_dev): Likewise.
2375 * commands/extcmd.c (grub_extcmd_dispatcher): Likewise.
2376 * commands/parttool.c (grub_cmd_parttool): Likewise.
2377 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Likewise.
2378 * disk/raid5_recover.c (grub_raid5_recover): Likewise.
2379 * disk/raid6_recover.c (grub_raid6_recover): Likewise.
2380 * disk/usbms.c (grub_usbms_finddevs): Likewise.
2381 * efiemu/mm.c (grub_efiemu_request_memalign): Likewise.
2382 * efiemu/pnvram.c (grub_efiemu_pnvram): Likewise.
2383 (grub_cmd_efiemu_pnvram): Likewise.
2384 * fs/i386/pc/pxe.c (grub_pxefs_open): Likewise.
2385 * fs/iso9660.c (grub_iso9660_mount): Likewise.
2386 (grub_iso9660_iterate_dir): Likewise.
2387 * fs/jfs.c (grub_jfs_opendir): Likewise.
2388 * fs/ntfs.c (list_file): Likewise.
2389 (grub_ntfs_mount): Likewise.
2390 * kern/disk.c (grub_disk_open): Likewise.
2391 * kern/dl.c (grub_dl_load_core): Likewise.
2392 * kern/elf.c (grub_elf_file): Likewise.
2393 * kern/env.c (grub_env_context_open): Likewise.
2394 (grub_env_set): Likewise.
2395 (grub_env_set_data_slot): Likewise.
2396 * kern/file.c (grub_file_open): Likewise.
2397 * kern/fs.c (grub_fs_blocklist_open): Likewise.
2398 * loader/i386/multiboot.c (grub_module): Likewise.
2399 * loader/xnu.c (grub_xnu_create_key): Likewise.
2400 (grub_xnu_create_value): Likewise.
2401 * normal/main.c (grub_normal_add_menu_entry): Likewise.
2402 (read_config_file): Likewise.
2403 * normal/menu_entry.c (make_screen): Likewise.
2404 * partmap/sun.c (sun_partition_map_iterate): Likewise.
2405 * script/sh/lexer.c (grub_script_lexer_init): Likewise.
2406 * script/sh/script.c (grub_script_parse): Likewise.
2407 * video/bitmap.c (grub_video_bitmap_create): Likewise.
2408 * video/readers/jpeg.c (grub_video_reader_jpeg): Likewise.
2409 * video/readers/png.c (grub_png_output_byte): Likewise.
2410 (grub_video_reader_png): Likewise.
2411
830afef7 24122009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
5ce5507f 2413
2414 Enable all targets that can be built by default
2415
830afef7 2416 * configure.ac: enable efiemu runtime, grub-emu, grub-emu-usb,
5ce5507f 2417 grub-mkfont and grub-fstest if they can be built
2418
ee293aee 24192009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
2420
2421 Fix hang and segmentation fault in grub-emu-usb
2422
2423 * disk/scsi.c (grub_scsi_open): return err and not grub_errno
2424 * util/usb.c (grub_libusb_devices): likewise
2425 (grub_libusb_init): rename to ...
2426 (GRUB_MOD_INIT (libusb)):...this
2427 (grub_libusb_fini): rename to ..
2428 (GRUB_MOD_FINI (libusb)):...this
2429 * disk/usbms.c (grub_usbms_transfer): fix retry logic
2430 * include/grub/disk.h (grub_raid_init): removed, it's useless
2431 (grub_raid_fini): likewise
2432 (grub_lvm_init): likewise
2433 (grub_lvm_fini): likewise
2434 * util/grub-emu.c (main): don't call grub_libusb_init, it's done
2435 by grub_init_all
2436
94414221 24372009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
2438
2439 Fix libusb
2440
2441 * Makefile.in (LIBUSB): new macro
2442 * genmk.rb (Utility/print_tail): new method
2443 (Utility/rule): use intermediary variable #{prefix}_OBJECTS
2444 (top level): call util.print_tail at the end.
2445
59ade63d 24462009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
2447
2448 Make FreeBSD accept zpool.cache
2449
2450 * loader/i386/bsd.c (grub_freebsd_add_meta_module): spoof filename if
2451 type is /boot/zfs/zpool.cache
2452
a58da8c7 24532009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
2454
2455 Fix 64-bit efiemu
2456
2457 * include/grub/efiemu/efiemu.h (grub_efiemu_configuration_table64_t):
2458 correct wrong typedef
2459 * efiemu/prepare.c (SUFFIX (grub_efiemu_prepare)): minor style fixes
2460
20591577 24612009-07-15 Pavel Roskin <proski@gnu.org>
2462
560ca572 2463 * include/grub/disk.h (struct grub_disk_dev): Use enum for id.
2464 * kern/disk.c (struct grub_disk_cache): Likewise.
2465
e8e8e4fd 2466 * commands/probe.c (options): Typo fix.
2467
fde24e10 2468 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_BPB_END):
2469 Increase to 0x5a to accommodate FAT32. Adjust other offsets
2470 accordingly.
2471 Original patch by Yves Blusseau <yves.grub-devel@zetam.org>
2472
379c54c1 2473 * boot/i386/pc/boot.S (general_error_string): Add DOS newline at
2474 the end of "Error" to make the message more readable.
2475
7bd8f5bf 2476 * boot/i386/pc/boot.S (kernel_segment): Remove.
2477 (copy_buffer): Use GRUB_BOOT_MACHINE_KERNEL_ADDR in segment 0
2478 for destination.
2479
40b132c5 2480 * boot/i386/pc/boot.S (boot_version): Remove.
2481 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_VER_MAJ):
2482 Remove.
2483
20591577 2484 * include/grub/i386/pc/boot.h: Sort all offsets.
2485 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Remove, it's unused.
2486 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Likewise.
2487 * boot/i386/pc/boot.S: Assert location of every offset listed in
2488 include/grub/i386/pc/boot.h.
2489
2df32b2c 24902009-07-13 Pavel Roskin <proski@gnu.org>
2491
44b5d879 2492 * include/grub/i386/coreboot/machine.h: Rename
2493 GRUB_MACHINE_LINUXBIOS to GRUB_MACHINE_COREBOOT.
2494 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Allow
2495 multiboot 1 for GRUB_MACHINE_COREBOOT and GRUB_MACHINE_QEMU.
2496
17dc3751 2497 * kern/dl.c: Force native word size to suppress warnings when
2498 compiling grub-emu.
2499
2df32b2c 2500 * kern/device.c (grub_device_iterate): Change struct part_ent to
2501 hold the name, not a pointer to it. Use one grub_malloc() per
2502 partition, not two. Free partition_name if grub_malloc() fails.
2503 Set ents to NULL only before grub_partition_iterate() is called.
2504
75c59f59 25052009-07-11 Bean <bean123ch@gmail.com>
2506
2507 * kern/ieee1275/openfw.c (grub_children_iterate): Fix size of
2508 childname.
2509
0ae1bf88 25102009-07-10 Bean <bean123ch@gmail.com>
25112009-07-10 Robert Millan <rmh.grub@aybabtu.com>
2512
2513 * kern/ieee1275/openfw.c (grub_children_iterate)
2514 (grub_devalias_iterate): Fix size evaluation for property or path
2515 strings, which was broken since r2132.
2516
8279cade 25172009-07-07 Pavel Roskin <proski@gnu.org>
2518
7d8a52d3 2519 * commands/search.c (search_file): Merge into ...
2520 (search_fs): ... this. Accept search type as argument.
2521 (grub_cmd_search): Pass search type to search_fs().
2522
25f9a05a 2523 * include/grub/util/console.h: New file.
2524 * util/console.c: Use it instead of grub/machine/console.h.
2525 * util/grub-emu.c: Likewise.
2526
8279cade 2527 * lib/arg.c (find_long_option): Remove.
2528 (find_long): Add `len' argument, make `s' const char *.
2529 (grub_arg_parse): Parse long options in place, not in a
2530 temporary buffer.
2531
4a11b60f 25322009-07-06 Pavel Roskin <proski@gnu.org>
2533
99f68041 2534 * commands/search.c (search_fs): Fix potential NULL pointer
2535 dereference.
2536
4a11b60f 2537 * commands/search.c (search_fs): Replace QUID macro with quid_fn
2538 function pointer.
2539
e110f4de 25402009-07-06 Daniel Mierswa <impulze@impulze.org>
2541
2542 * commands/search.c (search_fs): Use grub_strcasecmp() for UUID
2543 comparison.
2544
46eeb6a2 25452009-07-05 Pavel Roskin <proski@gnu.org>
2546
bab74958 2547 * include/grub/i386/linux.h (struct linux_kernel_params):
2548 Restore padding3, it's still needed.
2549
46eeb6a2 2550 * util/grub.d/10_freebsd.in: Fix spelling of `device.hints' on
2551 FreeBSD.
2552 * util/osdetect.lua: Likewise.
2553
b4a1dc79 25542009-07-05 Bean <bean123ch@gmail.com>
2555
2556 * conf/common.rmk (lua_mode_SOURCES): Add script/lua/lstrlib.c.
2557
2558 * script/lua/grub_lib.c (grub_lua_run): Check input parameter.
2559 (grub_lua_getenv): Likewise.
2560 (grub_lua_setenv): Likewise.
2561 (save_errno): New function.
2562 (push_result): Likewise.
2563 (grub_lua_enum_device): Likewise.
2564 (grub_lua_enum_file): Likewise.
2565 (grub_lua_file_open): Likewise.
2566 (grub_lua_file_close): Likewise.
2567 (grub_lua_file_seek): Likewise.
2568 (grub_lua_file_read): Likewise.
2569 (grub_lua_file_getline): Likewise.
2570 (grub_lua_file_getsize): Likewise.
2571 (grub_lua_file_getpos): Likewise.
2572 (grub_lua_file_eof): Likewise.
2573 (grub_lua_file_exist): Likewise.
2574 (grub_lua_add_menu): Likewise.
2575
2576 * script/lua/grub_lua.h (isupper): New inline function.
2577 (islower): Likewise.
2578 (ispunct): Likewise.
2579 (isxdigit): Likewise.
2580 (strcspn): Change to normal function.
2581 (strpbkr): New function declaration.
2582 (memchr): Likewise.
2583
2584 * script/lua/grub_main.c (scan_str): New function.
2585 (strcspn): Likewise.
2586 (strpbrk): Likewise.
2587 (memchr): Likewise.
2588
2589 * script/lua/linit.c (lualibs): Enable the string library.
2590
2591 * util/osdetect.lua: New file.
2592
2da92295 25932009-07-04 Robert Millan <rmh.grub@aybabtu.com>
2594
2595 * include/grub/i386/linux.h (struct linux_kernel_params): Add
2596 `capabilities' member.
2597
b2582ec9 25982009-07-02 Pavel Roskin <proski@gnu.org>
2599
2600 * genparttoollist.sh: Add missing newline at the end.
2601
32622956 26022009-07-01 Pavel Roskin <proski@gnu.org>
2603
87a7339e 2604 * kern/x86_64/efi/callwrap.S: Add missing newline at the end.
2605
d23af54e 2606 * util/hostdisk.c (open_device): Remove `const' from
2607 `sysctl_size', as sysctlbyname() can change it (in this case it
2608 doesn't actually happen).
2609
c94b18a9 2610 * include/grub/types.h: Define GRUB_LONG_MAX and GRUB_LONG_MIN
2611 using signed long int constants.
2612
c6cd3ef0 2613 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): Make `p'
2614 constant to avoid a warning on FreeBSD.
2615
0df63420 2616 * util/hostdisk.c (device_is_wholedisk): Compile only on systems
2617 where it's needed.
2618
999577f1 2619 * Makefile.in: Install include/grub/machine symlink.
2620
6f41557f 2621 * Makefile.in: When installing symlinks, use "cp -fR", which
2622 works on FreeBSD and MacOSX.
2623 From Yves Blusseau <cl7m42e02@sneakemail.com>
2624
c8d22988 2625 * kern/dl.c (grub_dl_resolve_symbol): Make static.
2626 * include/grub/dl.h: Remove grub_dl_resolve_symbol().
2627
1b96e952 2628 * util/misc.c: Move grub_reboot() and grub_halt() ...
2629 * util/grub-emu.c: ... here. Make main_env static.
2630 * include/grub/util/misc.h: Remove main_env.
2631
2ef0084d 2632 * kern/mm.c: Use correct format to print size_t.
2633
32622956 2634 * include/grub/elf.h: Define Elf_Sword and Elf_Xword.
2635 * kern/i386/dl.c: Use ELF symbols without "32" or "64".
2636 * kern/powerpc/dl.c: Likewise.
2637 * kern/sparc64/dl.c: Likewise.
2638 * kern/x86_64/dl.c: Likewise.
2639
3f7f0cd0 26402009-07-01 Robert Millan <rmh.grub@aybabtu.com>
2641
2642 Fix grub-emu build on sparc64-ieee1275.
2643
75421ca9 2644 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Synchronize with ...
3f7f0cd0 2645 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): ... this.
2646
211d06b5 26472009-07-01 Robert Millan <rmh.grub@aybabtu.com>
2648
2649 * util/misc.c: Include `<setjmp.h>' and `<grub/machine/machine.h>'.
2650 (grub_reboot, grub_halt): New functions.
2651
2652 * util/i386/pc/misc.c: Delete. Update all users.
2653 * util/sparc64/ieee1275/misc.c: Likewise.
2654 * util/powerpc/ieee1275/misc.c: Likewise.
2655
aaf53e3c 26562009-07-01 Robert Millan <rmh.grub@aybabtu.com>
2657
2658 * conf/i386.rmk (setjmp_mod_SOURCES)
2659 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Move to ...
2660 * conf/common.rmk (setjmp_mod_SOURCES)
2661 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): ... here, and modify
2662 to use $(target_cpu).
2663 * conf/x86_64-efi.rmk (setjmp_mod_SOURCES)
2664 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Remove.
2665 * conf/powerpc-ieee1275.rmk: Likewise.
2666 * conf/sparc64-ieee1275.rmk: Likewise.
2667
2668 * conf/i386-pc.rmk (kernel_img_SOURCES): Use
2669 $(target_cpu) for kern/$(target_cpu)/dl.c.
2670 * conf/i386-efi.rmk: Likewise.
2671 * conf/i386-ieee1275.rmk: Likewise.
2672 * conf/x86_64-efi.rmk: Likewise.
2673 * conf/i386-coreboot.rmk: Likewise.
2674 * conf/powerpc-ieee1275.rmk (kernel_img_SOURCES): Use
2675 $(target_cpu) for kern/$(target_cpu)/dl.c and for
2676 kern/$(target_cpu)/cache.S.
2677 * conf/sparc64-ieee1275.rmk: Likewise.
2678
a337130b 26792009-07-01 Robert Millan <rmh.grub@aybabtu.com>
2680
2681 * include/grub/i386/linux.h (linux_kernel_params): Change `mmap_size'
2682 type to `grub_uint8_t', and adjust `padding9' accordingly.
2683
c6fe4d53 26842009-06-29 Robert Millan <rmh.grub@aybabtu.com>
2685
b09db61d 2686 * include/grub/i386/linux.h (GRUB_VIDEO_TYPE_TEXT): New macro.
2687
c6fe4d53 2688 * loader/i386/linux.c [__i386__] (grub_linux_boot): Simplify inline
2689 assembly in final jump, using register constraints.
2690
b09db61d 2691 (grub_linux_boot): For text mode, initialize `have_vga' using
2692 GRUB_VIDEO_TYPE_TEXT rather than 0 (this changes its value to 1).
2693
2694 Initialize `video_cursor_x' and `video_cursor_y' as late as possible,
2695 right before the final jump.
2696
2697 Set `video_mode' to 0x3.
2698
2699 Document initialization of `video_page', `video_mode' and
2700 `video_ega_bx'.
2701
28333ad0 27022009-06-29 Robert Millan <rmh.grub@aybabtu.com>
2703
2704 * include/grub/i386/linux.h (GRUB_LINUX_FLAG_QUIET): New macro.
2705 * loader/i386/linux.c (grub_cmd_linux): Recognize "quiet" option,
75421ca9 2706 and set GRUB_LINUX_FLAG_QUIET appropriately.
28333ad0 2707
02164e1b 27082009-06-29 Robert Millan <rmh.grub@aybabtu.com>
2709
2710 Fix build on Debian / sparc.
2711
2712 * configure.ac: Recognize `sparc' target_cpu (as sparc64).
2713
18b6c557 27142009-06-28 Pavel Roskin <proski@gnu.org>
2715
85f2aab6 2716 * kern/i386/qemu/mmap.c (grub_machine_mmap_iterate): Use cast to
2717 fix a warning.
2718
18b6c557 2719 * util/grub.d/10_linux.in: Match SUSE style initrd names.
2720
ad760f81 27212009-06-27 Robert Millan <rmh.grub@aybabtu.com>
2722
2723 * loader/i386/linux.c (grub_linux_boot): Fix uninitialized use of
2724 `err'.
2725
87a4623b 27262009-06-27 Robert Millan <rmh.grub@aybabtu.com>
2727
2728 Revert r2338.
2729
2730 * loader/i386/linux.c (grub_cmd_linux): Don't call grub_error when
2731 file can't be opened. grub_file_open() is already supposed to set
75421ca9 2732 grub_errno / grub_errmsg appropriately.
87a4623b 2733 * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
2734
8231fb77 27352009-06-27 Pavel Roskin <proski@gnu.org>
27362009-06-27 Robert Millan <rmh.grub@aybabtu.com>
2737
2738 * include/grub/dl.h: Include grub/elf.h.
2739 (struct grub_dl): Add symtab field.
2740 * kern/dl.c [GRUB_MACHINE_QEMU]: Define
2741 GRUB_MODULES_MACHINE_READONLY.
2742 (grub_dl_resolve_symbols): Populate mod->symtab, making a copy
2743 of the header for read-only modules.
2744 (grub_dl_unload): Free mod->symtab for read-only modules.
2745 * kern/i386/dl.c: Use mod->symtab.
2746 * kern/powerpc/dl.c: Likewise.
2747 * kern/sparc64/dl.c: Likewise.
2748 * kern/x86_64/dl.c: Likewise.
2749
2750 * conf/i386-qemu.rmk: New file.
2751 * kern/i386/qemu/startup.S: Likewise.
2752 * kern/i386/qemu/mmap.c: Likewise.
2753 * boot/i386/qemu/boot.S: Likewise.
2754 * include/grub/i386/qemu/time.h: Likewise.
2755 * include/grub/i386/qemu/serial.h: Likewise.
2756 * include/grub/i386/qemu/kernel.h: Likewise.
2757 * include/grub/i386/qemu/console.h: Likewise.
2758 * include/grub/i386/qemu/boot.h: Likewise.
2759 * include/grub/i386/qemu/init.h: Likewise.
2760 * include/grub/i386/qemu/machine.h: Likewise.
2761 * include/grub/i386/qemu/loader.h: Likewise.
2762 * include/grub/i386/qemu/memory.h: Likewise.
2763
2764 * conf/i386-coreboot.rmk (GRUB_BOOT_MACHINE_LINK_ADDR)
2765 (GRUB_KERNEL_MACHINE_LINK_ADDR): New variables.
2766 [qemu] (pkglib_IMAGES): Add `boot.img'.
2767 [qemu] (boot_img_SOURCES, boot_img_ASFLAGS, boot_img_LDFLAGS)
2768 [qemu] (boot_img_FORMAT): New variables.
2769 [qemu] (bin_UTILITIES): Add `grub-mkimage'.
2770 [qemu] (grub_mkimage_SOURCES, grub_mkimage_CFLAGS): New variables.
2771 [qemu] (kernel_img_SOURCES, kernel_img_HEADERS, kernel_img_CFLAGS)
2772 [qemu] (kernel_img_ASFLAGS, kernel_img_LDFLAGS)
2773 [qemu] (kernel_img_FORMAT): New variables.
2774
2775 * configure.ac: Recognise `i386-qemu'.
2776
2777 * util/i386/pc/grub-mkimage.c (compress_kernel): Add dummy variant
2778 (for no compression).
2779 [GRUB_MACHINE_QEMU] (generate_image): Misc adjustments to produce
2780 a valid i386 ROM image. Make `GRUB_KERNEL_MACHINE_COMPRESSED_SIZE',
2781 `GRUB_KERNEL_MACHINE_INSTALL_DOS_PART' and
2782 `GRUB_KERNEL_MACHINE_INSTALL_BSD_PART' optional features (with
2783 ifdefs).
2784
97fe384e 27852009-06-27 Pavel Roskin <proski@gnu.org>
2786
2787 * efiemu/prepare.c: Eliminate TYPE macro, it makes code hard to
2788 read.
2789 * efiemu/prepare32.c: Likewise.
2790 * efiemu/prepare64.c: Likewise.
2791
c402ab17 27922009-06-26 Pavel Roskin <proski@gnu.org>
2793
2794 * include/grub/types.h: Define GRUB_TARGET_WORDSIZE.
2795 * include/grub/elf.h: Define symbols without "32" or "64" based
2796 on GRUB_TARGET_WORDSIZE.
2797 * include/grub/multiboot2.h: Use GRUB_TARGET_WORDSIZE.
2798 * efiemu/loadcore32.c: Redefine GRUB_TARGET_WORDSIZE, remove own
2799 ELF definitions.
2800 * efiemu/loadcore64.c: Likewise.
2801 * loader/i386/bsd32.c: Likewise.
2802 * loader/i386/bsd64.c: Likewise.
2803 * kern/dl.c: Remove own ELF definitions.
2804 * util/i386/efi/grub-mkimage.c: Likewise.
2805
9bbdfd4d 28062009-06-23 Robert Millan <rmh.grub@aybabtu.com>
2807
2808 * kern/i386/pc/startup.S (real_to_prot): Access `gdtdesc' using
2809 segment 0x0 unconditionally, because the reference generated by
2810 GAS is an absolute address.
2811
a42ce6e9 28122009-06-22 Robert Millan <rmh.grub@aybabtu.com>
2813
2814 * include/grub/i386/kernel.h: Include `<grub/machine/machine.h>'.
2815 [! GRUB_MACHINE_IEEE1275]: Set `GRUB_MOD_ALIGN' to 0x1.
2816
c952cf92 28172009-06-22 Robert Millan <rmh.grub@aybabtu.com>
2818
2819 * commands/search.c (grub_cmd_search): Macroify hardcoded args[]
2820 indexes. Check for -f explicitly.
cc3752ad 2821 (search_file): Improve error message.
2822 (GRUB_MOD_INIT(search)): Add missing `-n' to help output.
c952cf92 2823
132a0a59 28242009-06-22 Robert Millan <rmh.grub@aybabtu.com>
2825
2826 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): Rename to ...
2827 (GRUB_KERNEL_MACHINE_LINK_ADDR): ... this. Update all users.
2828
387a140c 28292009-06-22 Robert Millan <rmh.grub@aybabtu.com>
2830
2831 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/misc.S'.
2832 * conf/i386-ieee1275.rmk: Likewise.
2833 * conf/i386-coreboot.rmk: Likewise.
2834
2835 * kern/i386/pc/startup.S (grub_stop): Remove function.
2836 * kern/i386/ieee1275/startup.S: Likewise.
2837 * kern/i386/coreboot/startup.S: Likewise.
2838 * kern/i386/misc.S (grub_stop): New function.
2839
41da9665 28402009-06-22 Robert Millan <rmh.grub@aybabtu.com>
2841
2842 * kern/i386/pc/startup.S (real_to_prot): Move from here ...
2843 * kern/i386/realmode.S (real_to_prot): ... to here.
2844
bf337234 28452009-06-22 Robert Millan <rmh.grub@aybabtu.com>
2846
2847 * conf/i386-ieee1275.rmk (pkglib_PROGRAMS): Replace `kernel.elf'
2848 with `kernel.img'.
2849 (kernel_elf_SOURCES): Rename to ...
2850 (kernel_img_SOURCES): ... this.
2851 (kernel_elf_HEADERS): Rename to ...
2852 (kernel_img_HEADERS): ... this. Update all users.
2853 (kernel_elf_ASFLAGS): Rename to ...
2854 (kernel_img_ASFLAGS): ... this.
2855 (kernel_elf_CFLAGS): Rename to ...
2856 (kernel_img_CFLAGS): ... this.
2857 (kernel_elf_LDFLAGS): Rename to ...
2858 (kernel_img_LDFLAGS): ... this.
2859 * conf/i386-coreboot.rmk: Likewise.
2860 * conf/powerpc-ieee1275.rmk: Likewise.
2861
2862 * util/elf/grub-mkimage.c (add_segments): Replace "kernel.elf"
2863 with "kernel.img".
2864
f52196ff 28652009-06-21 Pavel Roskin <proski@gnu.org>
2866
c3cee413 2867 * loader/powerpc/ieee1275/linux.c (offset_phdr): Fix prototypes
2868 to match nested functions.
2869 * loader/sparc64/ieee1275/linux.c: Likewise.
2870
f52196ff 2871 * conf/i386-ieee1275.rmk: Define kernel_elf_ASFLAGS.
2872
58750afc 28732009-06-21 Robert Millan <rmh.grub@aybabtu.com>
2874
2875 * configure.ac: Enable `END_SYMBOL' / `BSS_START_SYMBOL' test on
2876 all i386 platforms.
2877
15355c7d 28782009-06-21 Robert Millan <rmh.grub@aybabtu.com>
2879
2880 Fix asm file handling on ELF, and remove workarounds.
2881
2882 * genmk.rb (class Programs): Detect assembly files, and set ASFLAGS
75421ca9 2883 and -DASM_FILE=1 appropriately (copied from `class Images' stanza).
15355c7d 2884 * kern/i386/ieee1275/startup.S (ASM_FILE): Remove macro.
2885 * kern/i386/coreboot/startup.S (ASM_FILE): Likewise.
2886
3f3ec72b 28872009-06-21 Vladimir Serbinenko <phcoder@gmail.com>
2888
2889 Load BSD ELF modules
2890
2891 * conf/i386-pc.rmk (bsd_mod_SOURCES): Add loader/i386/bsd32.c
2892 and loader/i386/bsd64.c
2893 * include/grub/i386/bsd.h (FREEBSD_MODTYPE_MODULE): Remove
2894 (FREEBSD_MODTYPE_ELF_MODULE): New definition
2895 (FREEBSD_MODTYPE_ELF_MODULE_OBJ): Likewise
2896 (grub_freebsd_load_elfmodule32): New declaration
2897 (grub_freebsd_load_elfmoduleobj64): Likewise
2898 (grub_freebsd_load_elf_meta32): Likewise
2899 (grub_freebsd_load_elf_meta64): Likewise
2900 (grub_freebsd_add_meta): Likewise
2901 (grub_freebsd_add_meta_module): Likewise
2902 * loader/i386/bsd.c (grub_freebsd_add_meta): Make global
2903 (grub_freebsd_add_meta_module): Likewise and move module-specific
2904 parts to grub_cmd_freebsd and grub_cmd_freebsd_module
2905 (grub_cmd_freebsd): Add elf-kernel specific parts
2906 based on grub_freebsd_add_meta_module
2907 (grub_cmd_freebsd_module): Add type parsing moved from
2908 grub_freebsd_add_meta_module
2909 (grub_cmd_freebsd_module_elf): New function
2910 (cmd_freebsd_module_elf): New variable
2911 (GRUB_MOD_INIT): Register freebsd_module_elf
2912 * loader/i386/bsd32.c: New file
2913 * loader/i386/bsd64.c: Likewise
2914 * loader/i386/bsdXX.c: Likewise
2915 * kern/elf.c (grub_elf32_load): Let hook decide which pheaders to load
2916 (grub_elf64_load): Likewise
2917 * include/grub/elfload.h (grub_elf32_load_hook_t): New parameter do_load
2918 All users updated
2919 (grub_elf64_load_hook_t): Likewise
2920
0db15301 29212009-06-21 Colin Watson <cjwatson@ubuntu.com>
2922
2923 * util/grub-mkconfig.in (GRUB_DISABLE_LINUX_RECOVERY): Export
2924 variable.
2925 * util/grub.d/10_linux.in: If GRUB_DISABLE_LINUX_RECOVERY is true,
2926 don't write a menu entry for recovery mode.
2927
546796c1 29282009-06-20 Robert Millan <rmh.grub@aybabtu.com>
2929
2930 * util/i386/pc/grub-mkimage.c (main): Oops, free `output' only
2931 after it's no longer needed.
2932
cd7310d5 29332009-06-20 Robert Millan <rmh.grub@aybabtu.com>
2934
2935 * include/grub/i386/loader.h (grub_linux_prot_size)
2936 (grub_linux_tmp_addr, grub_linux_real_addr)
2937 (grub_linux_is_bzimage, grub_linux16_boot): Declare only on
2938 GRUB_MACHINE_PCBIOS.
2939 * util/i386/pc/grub-mkimage.c (compress_kernel): Move
2940 common grub_util_info() call to ...
2941 (generate_image): ... here.
2942 Fix use of uninitialized memory, comparison of signed with
2943 unsigned integers and memory leak.
2944 Remove bogus module address message.
2945
ab32d3b5 29462009-06-20 Vladimir Serbinenko <phcoder@gmail.com>
2947
2948 * disk/mdraid_linux.c (GRUB_MOD_FINI): use grub_raid_unregister and not
2949 grub_raid_register
2950 * disk/dmraid_nvidia.c (GRUB_MOD_FINI): likewise
2951
024ef597 29522009-06-19 Pavel Roskin <proski@gnu.org>
2953
2954 * configure.ac: Remove stray AC_MSG_CHECKING.
2955
3ac72b51 29562009-06-19 Vladimir Serbinenko <phcoder@gmail.com>
2957
2958 * disk/scsi.c (grub_scsi_open): use continue instead of big if
dd74360c 2959
e14cd814 29602009-06-18 Pavel Roskin <proski@gnu.org>
2961
2962 * conf/common.rmk: Add fs_file.mod.
2963 * disk/fs_file.c: New file.
2964 * include/grub/disk.h (enum grub_disk_dev_id): Add
2965 GRUB_DISK_DEVICE_FILE_ID.
2966
26586d98 29672009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
2968
2969 Fix build with Apple's toolchain. Part 2
2970
2971 * aclocal.m4 (grub_PROG_TARGET_CC): add missing prototype for main and
2972 a fake start
2973
26de2bcd 29742009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
2975
2976 Fix build with Apple's toolchain. Part 1
2977
2978 * commands/i386/pc/drivemap_int13h.S: use assembly-time constants
2979 for long calls
2980 * configure.ac: remove a leftover AC_MSG_RESULT
dd74360c 2981 (CFLAGS): don't add -Wl,--defsym,___main=0x8100 when building with
26de2bcd 2982 Apple's toolchain
2983
09b3490b 29842009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
2985
2986 Fix warnings
2987
2988 * fs/ntfscomp.c (decomp_get16): initialize c1 and c2
2989 (decomp_block): initialize ch
2990 use grub_memcpy instead of memcpy
2991
c22a006a 29922009-06-17 Pavel Roskin <proski@gnu.org>
2993
d3638678 2994 * include/grub/i386/coreboot/console.h: Don't use the i386-pc
2995 version, use declarations needed to use vga_text as the startup
2996 console.
2997
c22a006a 2998 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Remove
2999 term/i386/pc/at_keyboard.c, it doesn't need to be compiled into
3000 the kernel.
3001 * kern/i386/coreboot/init.c: Don't call grub_at_keyboard_init()
3002 and grub_at_keyboard_fini(), it's done on module load and
3003 unload.
3004
05b129e0 30052009-06-17 Felix Zielcke <fzielcke@z-51.de>
3006
3007 * loader/i386/linux.c (grub_cmd_linux): Set grub_error if the
3008 file can't be found.
3009 * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
3010
cf24ed9e 30112009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
3012
3013 Fix newline handling
3014
3015 * include/grub/script_sh.h (grub_lexer_param): new field was_newline
dd74360c 3016 * script/sh/lexer.c (grub_script_lexer_init): initialize was_newline
cf24ed9e 3017 (grub_script_yylex): don't segfault on unterminated script
3018 newline terminates command and variable
3019
74aa8e4b 30202009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
3021
3022 avoid double grub_adjust_range call. Bug reported by David Simner
3023
3024 * kern/disk.c (grub_disk_write): change to raw disk access before
3025 calling disk_read
3026
1bd265f3 30272009-06-17 Colin Watson <cjwatson@ubuntu.com>
3028
3029 * util/elf/grub-mkimage.c (usage): Prefix each option line with two
3030 spaces, for the benefit of help2man.
3031 * util/i386/efi/grub-mkimage.c (usage): Likewise.
3032
a2d08c06 30332009-06-16 Pavel Roskin <proski@gnu.org>
3034
3035 * kern/i386/halt.c: Include grub/machine/init.h.
3036 * kern/i386/reboot.c: Include grub/cpu/reboot.h.
3037
b97bcb19 30382009-06-16 Felix Zielcke <fzielcke@z-51.de>
3039
3040 * util/grub.d/30_os-prober.in: Use ${root} in the generated
3041 drivemap menuentry.
3042
0644f96c 30432009-06-16 James Jarvis <James.Jarvis@ed.ac.uk>
3044
3045 * commands/help.c GRUB_MOD_INIT(echo): Fix the help output of
3046 `echo' command.
3047
3ef17a2e 30482009-06-16 Pavel Roskin <proski@gnu.org>
3049
3050 * boot/i386/pc/boot.S: Remove root_drive. Assert offset of
3051 boot_drive_check by using GRUB_BOOT_MACHINE_DRIVE_CHECK. Don't
3052 save %dx, we only need %dl and we never change it.
3053 * boot/i386/pc/cdboot.S: Don't set the root drive.
3054 * boot/i386/pc/pxeboot.S: Likewise.
3055 * include/grub/i386/pc/boot.h: Remove
3056 GRUB_BOOT_MACHINE_ROOT_DRIVE, adjust
3057 GRUB_BOOT_MACHINE_DRIVE_CHECK.
3058 * include/grub/i386/pc/kernel.h: Remove grub_root_drive.
3059 * kern/i386/pc/init.c (make_install_device): Remove references
3060 to grub_root_drive.
3061 * kern/i386/pc/startup.S: Likewise.
3062 * util/i386/pc/grub-setup.c (setup): Don't set root_drive.
3063
693fe637 30642009-06-16 Vladimir Serbinenko <phcoder@gmail.com>
3065
3066 xnu_uuid command
3067
3068 * commands/xnu_uuid.c: new file
3069 * conf/common.rmk (pkglib_MODULES): add xnu_uuid.mod
3070 (xnu_uuid_mod_SOURCES): new variable
3071 (xnu_uuid_mod_CFLAGS): likewise
3072 (xnu_uuid_mod_LDFLAGS): likewise
3073 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
3074 * conf/i386-ieee1275.rmk: likewise
3075 * conf/i386-pc.rmk: likewise
3076 * conf/powerpc-ieee1275.rmk: likewise
3077 * conf/sparc64-ieee1275.rmk: likewise
3078 * util/grub.d/30_os-prober.in: use UUID for Mac OS X/Darwin
3079
c9da87d0 30802009-06-16 Pavel Roskin <proski@gnu.org>
3081
3082 * configure.ac: Avoid '==' in test command, it's not portable.
3083
9c6f4596 30842009-06-16 Vladimir Serbinenko <phcoder@gmail.com>
3085
3086 Probe command
3087
3088 * commands/probe.c: new file
3089 * conf/common.rmk (pkglib_MODULES): add probe.mod
3090 (probe_mod_SOURCES): new variable
3091 (probe_mod_CFLAGS): likewise
3092 (probe_mod_LDFLAGS): likewise
3093 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
3094 * conf/i386-ieee1275.rmk: likewise
3095 * conf/i386-pc.rmk: likewise
3096 * conf/powerpc-ieee1275.rmk: likewise
3097 * conf/sparc64-ieee1275.rmk: likewise
3098
70b7f9fd 30992009-06-15 Vladimir Serbinenko <phcoder@gmail.com>
3100
3101 Fix handling of string like \"hello\" and "a
3102 b"
3103
3104 * script/sh/lexer.c (check_textstate): accept GRUB_PARSER_STATE_ESC
3105 (grub_script_yylex): fix parsing of quoting, escaping and newline
3106
71c79a6b 31072009-06-13 Vladimir Serbinenko <phcoder@gmail.com>
3108
dd74360c 3109 * loader/i386/multiboot.c (grub_multiboot_get_bootdev): fix partition
71c79a6b 3110 handling
dd74360c 3111
0644f96c 31122009-06-13 Jun Inoue <jun.lambda@gmail.com>
880fc3c4 3113
3114 * util/grub-mkconfig.in: Fix parsing of --output option.
3115
e40893c3 31162009-06-12 Pavel Roskin <proski@gnu.org>
3117
3118 * Makefile.in (pkgdata_SRCDIR): Remove. genmodsrc.sh and
3119 genmk.rb don't need to be generated or installed.
3120
3a1acfe2 31212009-06-12 Vladimir Serbinenko <phcoder@gmail.com>
3122
3123 * commands/i386/pc/drivemap_int13h.S: add more comments
3124
3a4575d4 31252009-06-11 Pavel Roskin <proski@gnu.org>
3126
0658e928 3127 * Makefile.in (uninstall): Uninstall manuals.
3128
ca0388f0 3129 * Makefile.in: Rename lib_DATA to lib_SCRIPTS, move it from
3130 PKGLIB to SCRIPTS. This fixes installation of grub-mkconfig_lib
3131 and update-grub_lib in two places.
3132 * conf/common.rmk: Rename lib_DATA to lib_SCRIPTS.
3133
e3b27c39 3134 * disk/usbms.c (grub_usbms_transfer): Initialize `err' to fix
3135 a compiler warning.
3136
3a4575d4 3137 * loader/i386/bsd.c (grub_freebsd_boot): Rename `entry' to
3138 `entry_lo' to fix variable shadowing.
3139
af1f4f55 31402009-06-11 Christian Franke <franke@computer.org>
3141
3142 * kern/misc.c (__enable_execute_stack): Add missing return type
3143 to prevent gcc warning.
3144
5225e649 31452009-06-11 Felix Zielcke <fzielcke@z-51.de>
3146
3147 * conf/i386-ieee1275.rmk (COMMON_LDFLAGS): Remove `-static -lgcc'.
3148
7d83bd47 31492009-06-11 Pavel Roskin <proski@gnu.org>
3150
c1cb63ba 3151 * Makefile.in: Don't rely on any scripts being executable.
3152 Always use $(SHELL) to run shell scripts.
3153
7d83bd47 3154 * configure.ac: Always define ___main if using -nostdlib. This
3155 fixes tests on Cygwin.
3156
948f48e7 31572009-06-11 Giuseppe Caizzone <acaizzo@gmail.com>
3158
3159 UDF fix
3160
7d83bd47 3161 * fs/udf.c (grub_udf_read_block): handle the fact that ad->length
948f48e7 3162 is in bytes and not in blocks
7d83bd47 3163
8ada9bc1 31642009-06-11 Pavel Roskin <proski@gnu.org>
3165
3166 * kern/i386/halt.c (grub_halt): Make `i' unsigned to fix a
3167 warning.
3168
25ad2323 31692009-06-11 Felix Zielcke <fzielcke@z-51.de>
3170
3171 * util/grub.d/30_os-prober.in: Fix a comment. Source
3172 ${libdir}/grub/grub-mkconfig_lib. Use prepare_grub_to_access_device
3173 to set the root device. Place drivemap command in the generated
3174 chain entry.
3175
e65acb0c 31762009-06-11 Pavel Roskin <proski@gnu.org>
3177
3178 * configure.ac: Remove host_m32. Issues with 64-bit utilities
3179 have long been resolved.
3180
f285fe2d 31812009-06-11 Colin Watson <cjwatson@ubuntu.com>
3182
bd47b0b5 3183 * util/grub.d/10_linux.in: Capitalise "Linux".
3184
f285fe2d 3185 * util/grub-pe2elf.c (usage): Fix references to grub-editenv.
3186
a0c62e4e 31872009-06-11 Pavel Roskin <proski@gnu.org>
3188
b6783cb2 3189 * kern/efi/efi.c (grub_exit): Add infinite loop at the end to
3190 fix a gcc warning and ensure that the function won't ever exit.
3191
dde032e8 3192 * kern/i386/ieee1275/init.c: Add missing prototype for
3193 grub_stop_floppy().
3194
22cd079d 3195 * loader/ieee1275/multiboot2.c [__i386__]: Include
3196 grub/cpu/multiboot.h.
3197
a0c62e4e 3198 * term/i386/pc/serial.c (serial_translate_key_sequence): Avoid
3199 casts to short - they are not portable and cause warnings. Fix
3200 use of uninitialized values in input_buf. Use ARRAY_SIZE.
3201
63963d17 32022009-06-11 Vladimir Serbinenko <phcoder@gmail.com>
3203
3204 Drivemap fixes
3205
3206 * commands/i386/pc/drivemap.c (grub_get_root_biosnumber_drivemap):
3207 new function
3208 (grub_get_root_biosnumber_saved): new variable
3209 (GRUB_MOD_INIT): register grub_get_root_biosnumber_drivemap
3210 (GRUB_MOD_FINI): unregister grub_get_root_biosnumber_drivemap
775dbc4d 3211 * commands/i386/pc/drivemap_int13h.S (grub_drivemap_handler): restore
63963d17 3212 %dx after the call if necessary
3213 * conf/common.rmk (pkglib_MODULES): remove boot.mod
3214 (boot_mod_SOURCES): remove
3215 (boot_mod_CFLAGS): remove
3216 (boot_mod_LDFLAGS): remove
3217 * conf/i386-coreboot.rmk (pkglib_MODULES): add boot.mod
3218 (boot_mod_SOURCES): new variable
3219 (boot_mod_CFLAGS): likewise
3220 (boot_mod_LDFLAGS): likewise
3221 * conf/i386-efi.rmk: likewise
3222 * conf/i386-ieee1275.rmk: likewise
3223 * conf/i386-pc.rmk: likewise
3224 * conf/powerpc-ieee1275.rmk: likewise
3225 * conf/sparc64-ieee1275.rmk: likewise
3226 * conf/x86_64-efi.rmk: likewise
3227 * include/grub/i386/pc/biosnum.h: new file
3228 * lib/i386/pc/biosnum.c: likewise
3229 * loader/i386/bsd.c (grub_bsd_get_device): use grub_get_root_biosnumber
3230 * loader/i386/multiboot.c (grub_multiboot_get_bootdev): likewise
3231 * loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise
775dbc4d 3232
33abf7ae 32332009-06-10 Pavel Roskin <proski@gnu.org>
3234
5ac35b35 3235 * io/gzio.c (test_header): Don't reuse one buffer for all data.
3236 Use separate variables. Read only the file size at the end, but
3237 not the checksum that we don't use.
3238
5c5215d5 3239 * kern/file.c (grub_file_read): Use void pointer for the buffer.
3240 Adjust all callers.
3241
27d5fef7 3242 * kern/ieee1275/openfw.c: Remove libc includes.
3243 * kern/ieee1275/cmain.c: Likewise.
3244 * include/grub/ieee1275/ieee1275.h: Likewise.
3245
33abf7ae 3246 * kern/i386/coreboot/init.c: Include grub/cpu/tsc.h to fix
3247 compiler warnings.
3248
19d50c2b 32492009-06-10 Felix Zielcke <fzielcke@z-51.de>
3250
3251 * Makefile.in: Remove all trailing whitespace.
3252 * conf/i386-pc.rmk: Likewise.
3253 * conf/powerpc-ieee1275.rmk: Likewise.
3254 * conf/sparc64-ieee1275.rmk: Likewise.
3255 * docs/grub.texi: Likewise.
3256 * docs/texinfo.tex: Likewise.
3257 * disk/fs_uuid.c: Likewise.
3258 * disk/lvm.c: Likewise.
3259 * disk/scsi.c: Likewise.
3260 * disk/ata.c: Likewise.
3261 * disk/ieee1275/ofdisk.c: Likewise.
3262 * disk/i386/pc/biosdisk.c: Likewise.
3263 * disk/host.c: Likewise.
3264 * disk/raid.c: Likewise.
3265 * disk/efi/efidisk.c: Likewise.
3266 * disk/usbms.c: Likewise.
3267 * disk/memdisk.c: Likewise.
3268 * disk/loopback.c: Likewise.
3269 * kern/powerpc/dl.c: Likewise.
3270 * kern/device.c: Likewise.
3271 * kern/dl.c: Likewise.
3272 * kern/sparc64/dl.c: Likewise.
3273 * kern/ieee1275/ieee1275.c: Likewise.
3274 * kern/term.c: Likewise.
3275 * kern/fs.c: Likewise.
3276 * kern/i386/dl.c: Likewise.
3277 * kern/i386/pc/startup.S: Likewise.
3278 * kern/i386/pc/init.c: Likewise.
3279 * kern/i386/pc/mmap.c: Likewise.
3280 * kern/i386/pc/lzo1x.S: Likewise.
3281 * kern/i386/ieee1275/init.c: Likewise.
3282 * kern/i386/realmode.S: Likewise.
3283 * kern/i386/tsc.c: Likewise.
3284 * kern/partition.c: Likewise.
3285 * kern/corecmd.c: Likewise.
3286 * kern/file.c: Likewise.
3287 * kern/efi/efi.c: Likewise.
3288 * kern/efi/init.c: Likewise.
3289 * kern/efi/mm.c: Likewise.
3290 * kern/main.c: Likewise.
3291 * kern/err.c: Likewise.
3292 * kern/env.c: Likewise.
3293 * kern/disk.c: Likewise.
3294 * kern/generic/millisleep.c: Likewise.
3295 * kern/generic/rtc_get_time_ms.c: Likewise.
3296 * kern/misc.c: Likewise.
3297 * kern/parser.c: Likewise.
3298 * genmk.rb: Likewise.
3299 * configure.ac: Likewise.
3300 * boot/i386/pc/diskboot.S: Likewise.
3301 * boot/i386/pc/pxeboot.S: Likewise.
3302 * boot/i386/pc/boot.S: Likewise.
3303 * boot/i386/pc/lnxboot.S: Likewise.
3304 * boot/i386/pc/cdboot.S: Likewise.
3305 * parttool/pcpart.c: Likewise.
3306 * video/readers/tga.c: Likewise.
3307 * video/video.c: Likewise.
3308 * video/bitmap.c: Likewise.
3309 * lib/envblk.c: Likewise.
3310 * lib/i386/setjmp.S: Likewise.
3311 * fs/xfs.c: Likewise.
3312 * fs/afs.c: Likewise.
3313 * fs/fat.c: Likewise.
3314 * fs/ntfs.c: Likewise.
3315 * fs/udf.c: Likewise.
3316 * fs/affs.c: Likewise.
3317 * fs/iso9660.c: Likewise.
3318 * fs/hfs.c: Likewise.
3319 * fs/fshelp.c: Likewise.
3320 * fs/ext2.c: Likewise.
3321 * fs/jfs.c: Likewise.
3322 * fs/reiserfs.c: Likewise.
3323 * fs/hfsplus.c: Likewise.
3324 * fs/minix.c: Likewise.
3325 * fs/cpio.c: Likewise.
3326 * fs/sfs.c: Likewise.
3327 * fs/ufs.c: Likewise.
3328 * efiemu/prepare.c: Likewise.
3329 * efiemu/loadcore_common.c: Likewise.
3330 * efiemu/runtime/efiemu.sh: Likewise.
3331 * efiemu/runtime/efiemu.S: Likewise.
3332 * efiemu/runtime/efiemu.c: Likewise.
3333 * efiemu/pnvram.c: Likewise.
3334 * efiemu/main.c: Likewise.
3335 * efiemu/i386/pc/cfgtables.c: Likewise.
3336 * efiemu/i386/loadcore64.c: Likewise.
3337 * efiemu/i386/loadcore32.c: Likewise.
3338 * efiemu/loadcore.c: Likewise.
3339 * efiemu/symbols.c: Likewise.
3340 * efiemu/mm.c: Likewise.
3341 * include/grub/autoefi.h: Likewise.
3342 * include/grub/datetime.h: Likewise.
3343 * include/grub/term.h: Likewise.
3344 * include/grub/hfs.h: Likewise.
3345 * include/grub/lvm.h: Likewise.
3346 * include/grub/i386/tsc.h: Likewise.
3347 * include/grub/i386/linux.h: Likewise.
3348 * include/grub/i386/xnu.h: Likewise.
3349 * include/grub/i386/efiemu.h: Likewise.
3350 * include/grub/i386/pc/biosdisk.h: Likewise.
3351 * include/grub/i386/pc/memory.h: Likewise.
3352 * include/grub/i386/pc/vbe.h: Likewise.
3353 * include/grub/parttool.h: Likewise.
3354 * include/grub/video.h: Likewise.
3355 * include/grub/memory.h: Likewise.
3356 * include/grub/fs.h: Likewise.
3357 * include/grub/partition.h: Likewise.
3358 * include/grub/xnu.h: Likewise.
3359 * include/grub/efi/api.h: Likewise.
3360 * include/grub/efi/pe32.h: Likewise.
3361 * include/grub/efi/memory.h: Likewise.
3362 * include/grub/multiboot.h: Likewise.
3363 * include/grub/usbdesc.h: Likewise.
3364 * include/grub/multiboot2.h: Likewise.
3365 * include/grub/acpi.h: Likewise.
3366 * include/grub/efiemu/efiemu.h: Likewise.
3367 * include/grub/disk.h: Likewise.
3368 * include/grub/ieee1275/ieee1275.h: Likewise.
3369 * include/grub/net.h: Likewise.
3370 * include/grub/machoload.h: Likewise.
3371 * include/grub/macho.h: Likewise.
3372 * include/multiboot.h: Likewise.
3373 * genmoddep.awk: Likewise.
3374 * normal/main.c: Likewise.
3375 * normal/menu_entry.c: Likewise.
3376 * normal/menu_viewer.c: Likewise.
3377 * normal/completion.c: Likewise.
3378 * normal/cmdline.c: Likewise.
3379 * normal/misc.c: Likewise.
3380 * normal/datetime.c: Likewise.
3381 * bus/usb/usbtrans.c: Likewise.
3382 * bus/usb/ohci.c: Likewise.
3383 * bus/usb/uhci.c: Likewise.
3384 * bus/usb/usb.c: Likewise.
3385 * mmap/efi/mmap.c: Likewise.
3386 * mmap/i386/pc/mmap_helper.S: Likewise.
3387 * mmap/i386/pc/mmap.c: Likewise.
3388 * mmap/i386/mmap.c: Likewise.
3389 * mmap/i386/uppermem.c: Likewise.
3390 * mmap/mmap.c: Likewise.
3391 * commands/acpi.c: Likewise.
3392 * commands/echo.c: Likewise.
3393 * commands/blocklist.c: Likewise.
3394 * commands/loadenv.c: Likewise.
3395 * commands/usbtest.c: Likewise.
3396 * commands/boot.c: Likewise.
3397 * commands/parttool.c: Likewise.
3398 * commands/search.c: Likewise.
3399 * commands/cat.c: Likewise.
3400 * commands/i386/pc/play.c: Likewise.
3401 * commands/i386/pc/drivemap.c: Likewise.
3402 * commands/i386/pc/vbeinfo.c: Likewise.
3403 * commands/i386/pc/acpi.c: Likewise.
3404 * commands/i386/pc/vbetest.c: Likewise.
3405 * commands/ls.c: Likewise.
3406 * commands/cmp.c: Likewise.
3407 * commands/test.c: Likewise.
3408 * commands/efi/acpi.c: Likewise.
3409 * commands/gptsync.c: Likewise.
3410 * commands/help.c: Likewise.
3411 * partmap/amiga.c: Likewise.
3412 * partmap/apple.c: Likewise.
3413 * partmap/acorn.c: Likewise.
3414 * partmap/pc.c: Likewise.
3415 * partmap/sun.c: Likewise.
3416 * partmap/gpt.c: Likewise.
3417 * script/sh/lexer.c: Likewise.
3418 * script/sh/function.c: Likewise.
3419 * font/font.c: Likewise.
3420 * font/font_cmd.c: Likewise.
3421 * loader/powerpc/ieee1275/linux.c: Likewise.
3422 * loader/efi/chainloader.c: Likewise.
3423 * loader/multiboot_loader.c: Likewise.
3424 * loader/macho.c: Likewise.
3425 * loader/i386/multiboot.c: Likewise.
3426 * loader/i386/linux.c: Likewise.
3427 * loader/i386/pc/linux.c: Likewise.
3428 * loader/i386/pc/multiboot2.c: Likewise.
3429 * loader/i386/pc/chainloader.c: Likewise.
3430 * loader/i386/pc/xnu.c: Likewise.
3431 * loader/i386/bsd_trampoline.S: Likewise.
3432 * loader/i386/efi/linux.c: Likewise.
3433 * loader/i386/multiboot_elfxx.c: Likewise.
3434 * loader/i386/bsd_helper.S: Likewise.
3435 * loader/i386/bsd.c: Likewise.
3436 * loader/i386/linux_trampoline.S: Likewise.
3437 * loader/i386/xnu_helper.S: Likewise.
3438 * loader/i386/xnu.c: Likewise.
3439 * loader/i386/bsd_pagetable.c: Likewise.
3440 * loader/i386/multiboot_helper.S: Likewise.
3441 * loader/xnu.c: Likewise.
3442 * loader/xnu_resume.c: Likewise.
3443 * io/gzio.c: Likewise.
3444 * term/efi/console.c: Likewise.
3445 * term/terminfo.c: Likewise.
3446 * term/ieee1275/ofconsole.c: Likewise.
3447 * term/i386/pc/serial.c: Likewise.
3448 * term/i386/pc/vesafb.c: Likewise.
3449 * term/i386/pc/vga.c: Likewise.
3450 * term/usb_keyboard.c: Likewise.
3451 * term/gfxterm.c: Likewise.
3452 * aclocal.m4: Likewise.
3453 * util/lvm.c: Likewise.
3454 * util/grub.d/30_os-prober.in: Likewise.
3455 * util/grub.d/10_hurd.in: Likewise.
3456 * util/console.c: Likewise.
3457 * util/grub-macho2img.c: Likewise.
3458 * util/grub-probe.c: Likewise.
3459 * util/hostfs.c: Likewise.
3460 * util/i386/pc/grub-mkimage.c: Likewise.
3461 * util/i386/pc/grub-setup.c: Likewise.
3462 * util/i386/efi/grub-mkimage.c: Likewise.
3463 * util/grub-mkconfig.in: Likewise.
3464 * util/raid.c: Likewise.
3465 * util/resolve.c: Likewise.
3466 * util/grub-mkdevicemap.c: Likewise.
3467 * util/grub-emu.c: Likewise.
3468 * util/getroot.c: Likewise.
3469 * util/hostdisk.c: Likewise.
3470 * util/usb.c: Likewise.
3471 * util/grub-editenv.c: Likewise.
3472 * util/misc.c: Likewise.
3473
d2d49665 34742009-06-10 Felix Zielcke <fzielcke@z-51.de>
3475
3476 * gendistlist.sh (EXTRA_DISTFILES): Add `genhandlerlist.sh' and
3477 `genparttoollist.sh'.
3478 (DISTDIRS): Add `efiemu', `mmap', `parttool' and `script'.
3479 Add `*.sh' to the list find searches for and change `mdate.sh'
3480 to `mdate-sh'.
3481
fe052e37 34822009-06-10 Pavel Roskin <proski@gnu.org>
3483
2763ac18 3484 * include/grub/multiboot2.h: Provide compatibility defines for
3485 multiboot2.h.
3486 * include/multiboot2.h: Include stdint.h only if needed, using
3487 angle brackets.
3488 * loader/i386/pc/multiboot2.c: Include multiboot2.h after
3489 grub/multiboot2.h.
3490 * loader/ieee1275/multiboot2.c: Likewise.
3491 * loader/multiboot2.c: Likewise.
3492 * loader/multiboot_loader.c: Likewise.
3493
437e6adc 3494 * configure.ac: Use -nostdlib when probing for the target. It
3495 should not be required to have libc for the target.
3496
06a6836c 3497 * configure.ac: Remove checks for __bswapsi2 and __bswapdi2,
3498 they fail without libc headers for the target.
3499 * include/grub/powerpc/libgcc.h: Use weak attribute for all
3500 exports.
3501 * include/grub/sparc64/libgcc.h: Likewise. Don't use
3502 preprocessor conditionals.
3503
fe052e37 3504 * conf/common.rmk: Compile tar.mod from tar.c, not cpio.c. The
3505 build system doesn't need to be aware of the tar.c internals.
3506
afd22553 35072009-06-09 Michel Hermier <michel.hermier@gmail.com>
87b8f28c 3508
afd22553 3509 * fs/i386/pc/pxe.c (grub_pxefs_read): Fix returned values.
8ec4a6d0 3510
6b787c4f 35112009-06-09 Robert Millan <rmh.grub@aybabtu.com>
3512
3513 * util/deviceiter.c (grub_util_iterate_devices): Increase number of
3514 disk limit to 26 for IDE, Virtio, Xen and SCSI.
3515
35162009-06-09 Felix Zielcke <fzielcke@z-51.de>
3517
3518 * util/i386/pc/grub-install.in: Change the error message if UUIDs
473d1e45 3519 aren't available if ata.mod gets used.
6b787c4f 3520
473d1e45 35212009-06-09 Oliver Henshaw <oliver.henshaw@gmail.com>
e23721e8 3522
473d1e45 3523 * bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
e23721e8 3524 initialising controller.
473d1e45 3525 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
e23721e8 3526
255a27d4 35272009-06-08 Felix Zielcke <fzielcke@z-51.de>
3528
3529 * util/i386/pc/grub-install.in: Add a parameter --disk-module
3530 to choose between ata and biosdisk module on i386-pc.
3531
473d1e45 35322009-06-08 Oliver Henshaw <oliver.henshaw@gmail.com>
69da8877 3533
d55842d8 3534 * bus/usb/ohci.c (grub_ohci_pci_iter): Define the Class,
3535 Subclass and Programming Interface fields in terms of the 3 byte
3536 Class Code register.
3537 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
3538
fa5db0b1 3539 * bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
3540 interface is OHCI. Add grub_dprintf for symmetry with
3541 bus/usb/uhci.c.
3542 * bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
3543 interface is UHCI. Add interf variable for programming
3544 interface. Print interface with class/subclass.
3545
c0947beb 3546 * bus/usb/ohci.c: Set interf with correct field.
3547
69da8877 3548 * bus/usb/uhci.c: Remove unneeded doubled lines.
3549 * bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
3550 Remove whitespace inside comment.
3551
9e172e30 35522009-06-08 Robert Millan <rmh.grub@aybabtu.com>
3553
3554 * loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
3555 as fallback an equivalent option without depth.
3556
de65ee2b 35572009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
3558
3559 Not fail if unable to retrieve C/H/S on LBA disks
3560
473d1e45 3561 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully
de65ee2b 3562 if unable to retrieve C/H/S on LBA disks
3563
b57ea2c9 35642009-06-08 Pavel Roskin <proski@gnu.org>
3565
3566 * fs/hfs.c (grub_hfs_find_dir): Use union to avoid a warning
3567 about aliasing.
3568
af361263 35692009-06-08 Felix Zielcke <fzielcke@z-51.de>
3570
3571 * Makefile.in (uninstall): Remove all $lib_DATA files.
3572
4c9ec6b3 35732009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
3574
3575 Bugfix: install on partitionless device
3576
3577 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): check if os_dev
3578 is a whole disk
3579
e76fc924 35802009-06-08 Felix Zielcke <fzielcke@z-51.de>
3581
3582 * Makefile.in (uninstall): Remove all $include_DATA files.
3583
ba5a0d05 35842009-06-08 Felix Zielcke <fzielcke@z-51.de>
3585
3586 * commands/true.c: New file. Implement the true and false commands.
3587 * conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
3588 (true_mod_SOURCES): New variable.
3589 (true_mod_CFLAGS): Likewise.
3590 (true_mod_LDFLAGS): Likewise.
3591
c8048e32 35922009-06-05 Colin D Bennett <colin@gibibit.com>
3593
3594 Optimized font character lookup using binary search instead of linear
3595 search. Fonts now are required to have the character index ordered by
3596 code point.
3597
3598 * font/font.c (load_font_index): Verify that fonts have ordered
3599 character indices.
3600 (find_glyph): Use binary search instead of linear search to find a
3601 character in a font.
3602
408305be 36032009-06-05 Michael Scherer <misc@mandriva.org>
3604
3605 * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
3606 uses case sensitive btree.
3607 (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
3608 only for case insensitive filesystems.
3609
8ee1e0d9 36102009-06-05 Vladimir Serbinenko <phcoder@gmail.com>
3611
3612 * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
3613 * conf/common.rmk (search_mod_CFLAGS): likewise
3614
a9966eb1 36152009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3616
473d1e45 3617 * kern/i386/pc/startup.S [APPLE_CC]: block of nops to
a9966eb1 3618 compensate a compiler bug
3619
9e7100fb 36202009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3621
473d1e45 3622 * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitly define as 8
9e7100fb 3623 instead of '\b'
473d1e45 3624
ede21d71 36252009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3626
3627 Definitions for creating asm symbols with Apple's CC
3628
3629 * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
3630 [APPLE_CC] (VARIABLE): likewise
3631
9dbf7653 36322009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3633
3634 Disable lnxboot.img when compiled
3635 with Apple's CC
3636
3637 * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
3638 pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
3639 * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
3640 [! APPLE_CC] (CODE_LENG): skip
3641 [! APPLE_CC] (setup_sects): likewise
3642 [! APPLE_CC]: skip filling
473d1e45 3643
e93cdc3d 36442009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3645
3646 Address in trampolines based on 32-bit registers when compiled
3647 with Apple's CC
3648
473d1e45 3649 * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
e93cdc3d 3650 for addresses
3651 * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
3652
6c688477 36532009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3654
3655 Avoid aliases when compiling with Apple's CC for PCBIOS machine
3656
3657 * kern/misc.c [APPLE_CC] (memcpy): new function
3658 [APPLE_CC] (memmove): likewise
3659 [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
473d1e45 3660 (memcpy): define alias conditionally on !APPLE_CC
6c688477 3661 (memset): likewise
3662 (abort): likewise
3663 * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
3664 APPLE_CC are defined
3665 * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
3666 (grub_assert_fail): make prototype conditional
3667
e37ffc5c 36682009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3669
3670 Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
3671
473d1e45 3672 * conf/common.rmk (bin_UTILITIES): add (on false on condition)
3673 grub-macho2img
e37ffc5c 3674 (CLEANFILES): add grub-macho2img
3675 (grub_macho2img_SOURCES): new variable
3676 * kern/i386/pc/startup.S (bss_start): new variable
3677 (bss_end): likewise
3678 * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
3679 * util/grub-macho2img.c: new file
3680
cf00df31 36812009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3682
3683 Use objconv when compiling with Apple's CC
3684
3685 * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
3686 (efiemu64.o): likewise
3687 (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
3688 when compiling with Apple's CC
3689 (efiemu64_s.o): likewise
3690 * configure.ac: check for objconv when compiling with Apple's CC
3691 * genmk.rb: use objconv for modules when compiled with Apple's CC
473d1e45 3692
d119a20c 36932009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3694
3695 Define segment as well as section when compiling with
3696 Apple's CC
3697
3698 * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
3699 (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
3700 (efiemu_convert_pointer): likewise
3701 (efiemu_set_virtual_address_map): likewise
3702 (efiemu_convert_pointer): likewise
3703 (efiemu_getcrc32): likewise
3704 (init_crc32_table): likewise
3705 (reflect): likewise
3706 * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
3707 (GRUB_MOD_DEP): likewise
473d1e45 3708
c8600122 37092009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3710
3711 Allow a compilation without -mcmodel=large
3712
3713 * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
3714 when compiled without -mcmodel=large
473d1e45 3715 (filter_memory_map): remove memory post 4 GiB when compiled
c8600122 3716 without -mcmodel=large
473d1e45 3717 * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
c8600122 3718 TARGET_CFLAGS when -mcmodel=large isn't supported
473d1e45 3719
e8df1d4e 37202009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3721
3722 Remove nested functions in efiemu core
3723
3724 * efiemu/runtime/efiemu.c (reflect): make static instead of nested
473d1e45 3725
cc6c3ac1 37262009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3727
3728 Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
3729
3730 * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
3731 temporary storage
473d1e45 3732 * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
3733 using Apple's CC
cc6c3ac1 3734 (grub_cpu_is_tsc_supported): likewise
3735 * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
473d1e45 3736
3e325901 37372009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3738
3739 Absolute addressing through constant with Apple's cc
3740
3741 * kern/i386/pc/startup.S: Define necessary constants
3742 and address through it when using ABS with Apple's CC
3743 * boot/i386/pc/diskboot.S: likewise
3744 * boot/i386/pc/boot.S: likewise
3745 * boot/i386/pc/lnxboot.S: likewise
3746 * boot/i386/pc/cdboot.S: likewise
3747 * mmap/i386/pc/mmap_helper.S: likewise
3748 * commands/i386/pc/drivemap_int13h.S: likewise
3749
2b167a72 37502009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3751
3752 Check if compiler is apple cc
3753
3754 * Makefile.in (ASFLAGS): new variable
3755 (TARGET_ASFLAGS): likewise
3756 (TARGET_MODULE_FORMAT): likewise
3757 (TARGET_APPLE_CC): likewise
3758 (OBJCONV): likewise
3759 (TARGET_IMG_CFLAGS): likewise
3760 (TARGET_CPPFLAGS): add includedir
3761 * configure.ac: call grub_apple_cc and grub_apple_target_cc
3762 (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
3763 Check for linker script only if compiler isn't Apple's CC
3764 (TARGET_MODULE_FORMAT): set
3765 (TARGET_APPLE_CC): likewise
3766 (TARGET_ASFLAGS): likewise
3767 (ASFLAGS): likewise
3768 Check for objcopy only if compiler isn't Apple's CC
3769 Check for BSS symbol only if compiler isn't Apple's CC
3770 * genmk.rb: adapt nm options if we use Apple's utils
3771 * aclocal.m4 (grub_apple_cc): new test
3772 (grub_apple_target_cc): likewise
473d1e45 3773
fb14123e 37742009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3775
3776 Simplify sed expressions and improve awk
3777
3778 * Makefile.in (install-local): simplify sed expression
3779 * gencmdlist.sh: likewise
3780 * genmoddep.awk: avoid adding module as a dependency of itself
3781
5b889789 37822009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3783
3784 Add missing start symbols
3785
3786 * boot/i386/pc/boot.S: add start
fb14123e 3787 * boot/i386/pc/pxeboot.S: likewise
473d1e45 3788
fd2bf2e3 37892009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3790
3791 Fix wrong assumptions with grub-mkimage on EFI
473d1e45 3792
3793 * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefix here
fd2bf2e3 3794 (relocate_addresses): consider both r_addend and value at offset
3795 (make_mods_section): zerofill modinfo and header
3796 (convert_elf): write prefix here
473d1e45 3797
5389763d 37982009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3799
3800 Use .asciz instead of .string
3801
3802 * i386/pc/diskboot.S: use .asciz instead of .string
3803 * i386/pc/boot.S: likewise
3804 * include/grub/dl.h (GRUB_MOD_DEP): likewise
3805 (GRUB_MOD_NAME): likewise
473d1e45 3806
3eb5ed4e 38072009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3808
3809 gfxpayload support
3810
3811 * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
3812 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
3813 (grub_video_setup): remove
3814 (grub_video_set_mode): new prototype
3815 * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
3816 (vid_mode): remove
3817 (linux_vesafb_res): compile only on PCBIOS
3818 (grub_linux_boot): support gfxpayload
3819 * loader/i386/pc/xnu.c (video_hook): new function
3820 (grub_xnu_set_video): support gfxpayload
3821 * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
3822 (DEFAULT_VIDEO_HEIGHT): likewise
3823 (DEFAULT_VIDEO_FLAGS): likewise
3824 (DEFAULT_VIDEO_MODE): new definition
3825 (video_hook): new function
3826 (grub_gfxterm_init): use grub_video_set_mode
473d1e45 3827 * util/grub.d/30_os-prober.in: remove explicit modesetting before
3eb5ed4e 3828 loading xnu
3829 * video/video.c (grub_video_setup): removed
473d1e45 3830 (grub_video_set_mode): new function based on grub_gfxterm_init and
3eb5ed4e 3831 grub_video_setup
3832
4b0e1143 38332009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3834
3835 Avoid calling biosdisk in drivemap
3836
3837 * commands/i386/pc/drivemap.c (parse_biosdisk): remove
3838 (revparse_biosdisk): likewise
3839 (list_mappings): derive name from id directly
3840 (grub_cmd_drivemap): use tryparse_diskstring
473d1e45 3841
fda6cb98 38422009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3843
3844 Script fixes
3845
3846 * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
3847 (grub_lexer_param): add tokenonhold
3848 (grub_script_create_cmdline): remove cmdline. All callers updated
3849 (grub_script_function_create): make functionname
3850 grub_script_arg. All callers updated
3851 (grub_script_execute_argument_to_string): new prototype
3852 * kern/parser.c (state_transitions): reorder
3853 (grub_parser_cmdline_state): fix a bug and make more compact
473d1e45 3854 * script/sh/execute.c (grub_script_execute_argument_to_string):
fda6cb98 3855 make global
3856 (grub_script_execute_cmdline): use new format
3857 * script/sh/function.c (grub_script_function_create): make functionname
3858 grub_script_arg. All callers updated
473d1e45 3859 * script/sh/lexer.c (grub_script_lexer_init): initialize tokenonhold
fda6cb98 3860 (grub_script_yylex): remove
3861 (grub_script_yylex2): renamed to ...
3862 (grub_script_yylex): ...renamed
3863 parse the expressions like a${b}c
3864 * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
3865 (GRUB_PARSER_TOKEN_VAR): remove
3866 (GRUB_PARSER_TOKEN_NAME): likewise
3867 ("if"): declare as typeless
3868 ("while"): likewise
3869 ("function"): likewise
3870 ("else"): likewise
3871 ("then"): likewise
3872 ("fi"): likewise
3873 (text): remove
3874 (argument): likewise
3875 (script): accept empty scripts and make exit on error
3876 (arguments): use GRUB_PARSER_TOKEN_ARG
3877 (function): likewise
3878 (command): move error handling to script
3879 (menuentry): move grub_script_lexer_ref before
473d1e45 3880 * script/sh/script.c (grub_script_create_cmdline): remove cmdline
fda6cb98 3881 argument. All callers updated
3882
f4448a07 38832009-06-04 Robert Millan <rmh.grub@aybabtu.com>
3884
3885 Prevent GRUB from probing floppies during boot.
3886
3887 * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
3888 * commands/search.c (options): Add --no-floppy.
3889 (search_fs, search_file, grub_cmd_search): Support --no-floppy.
3890 * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
3891 --no-floppy when searching for UUIDs.
3892
2bf5885a 38932009-06-04 Robert Millan <rmh.grub@aybabtu.com>
3894
3895 Simplify the code duplication in commands/search.c.
3896
3897 * commands/search.c (search_label, search_fs_uuid): Merge into ...
3898 (search_fs): ... this. Update all users.
3899
f6fd460a 39002009-06-03 Felix Zielcke <fzielcke@z-51.de>
3901
3902 * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
3903
cbb3c83e 39042009-05-28 Pavel Roskin <proski@gnu.org>
3905
57788cfd 3906 * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
3907 Remove the original symlink explicitly.
3908
cbb3c83e 3909 * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
3910 just one slash. That's how grub_fshelp_find_file() does it.
3911
cd0d5e30 39122009-05-26 Pavel Roskin <proski@gnu.org>
3913
f0f8bbe2 3914 * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
3915 to `str'.
3916
cd0d5e30 3917 * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
3918 possibly unused.
3919
8c2cab51 39202009-05-25 Christian Franke <franke@computer.org>
3921
3922 * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
3923 register.
3924 (grub_atapi_identify): Add wait after drive select.
3925 (grub_ata_identify): Do more strict status register check before
3926 calling grub_atapi_identify (). Suppress error message if status
3927 register is 0x00 after command failure. Add status register
3928 check after PIO read to avoid bogus identify due to stuck DRQ.
3929 Thanks to Pavel Roskin for testing.
3930 (grub_device_initialize): Remove unsafe status register check.
3931 Thanks to 'phcoder' for problem report and patch.
3932 Prevent sign extension in debug message.
3933
230c0ad6 39342009-05-23 Colin D Bennett <colin@gibibit.com>
3935
3936 Cleaned up `include/grub/normal.h'. Grouped prototypes by
3937 definition file, and functions defined in `normal/menu.c' have had
3938 their prototypes moved to `include/grub/menu.h' for consistency.
3939
3940 * include/grub/menu.h (grub_menu_execute_callback): Added; moved
3941 from normal.h.
3942 (grub_menu_get_entry): Likewise.
3943 (grub_menu_get_timeout): Likewise.
3944 (grub_menu_set_timeout): Likewise.
3945 (grub_menu_execute_entry): Likewise.
3946 (grub_menu_execute_with_fallback): Likewise.
3947 (grub_menu_entry_run): Likewise.
3948
3949 * include/grub/normal.h: Re-ordered and grouped function
3950 prototypes by file that the function is defined in.
3951 (grub_menu_execute_callback): Removed; moved to menu.h.
3952 (grub_menu_get_entry): Likewise.
3953 (grub_menu_get_timeout): Likewise.
3954 (grub_menu_set_timeout): Likewise.
3955 (grub_menu_execute_entry): Likewise.
3956 (grub_menu_execute_with_fallback): Likewise.
3957 (grub_menu_entry_run): Likewise.
3958 (grub_menu_addentry): Renamed from this ...
3959 (grub_normal_add_menu_entry): ... to this.
3960
3961 * normal/main.c (grub_menu_addentry): Renamed from this ...
3962 (grub_normal_add_menu_entry): ... to this.
3963
3964 * script/sh/execute.c (grub_script_execute_menuentry): Update
3965 reference to renamed grub_menu_addentry function.
3966
861f03a5 39672009-05-23 Felix Zielcke <fzielcke@z-51.de>
3968
3969 * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
3970
96b1619a 39712009-05-22 Pavel Roskin <proski@gnu.org>
3972
bf6a5fb2 3973 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
3974 * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG. Define
3975 NESTED_FUNC_ATTR using AH_BOTTOM. Use regparm(1) only when
3976 compiling for the i386 targets, but not for the utilities.
3977
96b1619a 3978 * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
3979 to grub_uint8_t.
3980 (grub_root_drive): Likewise.
3981 * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
3982 remove alignment.
3983 (grub_root_drive): Change size to byte.
3984 (grub_start_addr): Remove.
3985 (grub_end_addr): Likewise.
3986 (grub_apm_bios_info): Likewise.
3987
b729776b 39882009-05-21 Felix Zielcke <fzielcke@z-51.de>
3989
3990 * normal/i386: Remove.
3991 * normal/powerpc: Likewise.
3992 * normal/sparc64: Likewise.
3993 * normal/x86_64: Likewise.
3994
0a15ce80 39952009-05-19 Vladimir Serbinenko <phcoder@gmail.com>
3996
3997 * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
473d1e45 3998 * loader/i386/linux_trampoline.S: Fix indentation
0a15ce80 3999 * loader/i386/xnu_helper.S: Likewise
d6da58e6 4000
33db9015 40012009-05-18 Colin D Bennett <colin@gibibit.com>
4002
d6da58e6 4003 Display error messages when parsing a Lua statement fails.
4004 Previously, executing a syntactically invalid statement like
4005 ")foo" or "bar;" would silently fail.
33db9015 4006
4007 * script/lua/grub_main.c (handle_lua_error): New function.
d6da58e6 4008 (grub_lua_parse_line): Improved reporting of Lua parser and
4009 execution errors.
33db9015 4010
46422c89 40112009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
4012
4013 Remove -Werror which causes build to fail on some systems
4014
4015 * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
4016 * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
4017 * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
18f547ad 4018
22f53a96 40192009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
4020
4021 trampoline for linux on 64-bit platform
4022
18f547ad 4023 * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
4024 loader/i386/efi/linux_trampoline.S
4025 * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
473d1e45 4026 declaration
d6da58e6 4027 * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
4028 here
22f53a96 4029 * loader/i386/linux_trampoline.S: moved here
d6da58e6 4030 * loader/i386/efi/linux.c (allocate_pages): reserve space for
4031 trampoline
22f53a96 4032 (jumpvector): removed
4033 (grub_linux_trampoline_start): new declaration
4034 (grub_linux_trampoline_end): likewise
4035 (grub_linux_boot): use trampoline when on 64-bit platform
4036 * loader/i386/linux.c: likewise
4037
cb5a0f40 40382009-05-16 Pavel Roskin <proski@gnu.org>
4039
4040 * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
4041 const to avoid a warning.
4042 (grub_lua_setenv): Likewise.
4043 * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
4044 lmsg to fix a warning.
4045
334f2c28 40462009-05-16 Felix Zielcke <fzielcke@z-51.de>
4047
4048 * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
7dd10fce 4049 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
4050 * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
4051 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
4052 * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
4053 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
4054 * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
4055 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
334f2c28 4056
59e5d3ec 40572009-05-16 Felix Zielcke <fzielcke@z-51.de>
4058
4059 * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
4060
9d87a1ba 40612009-05-16 Bean <bean123ch@gmail.com>
4062
4063 * conf/common.rmk (pkglib_MODULES): Add lua.mod.
4064 (lua_mod_SOURCES): New variable.
4065 (lua_mod_CFLAGS): Likewise.
4066 (lua_mod_LDFLAGS): Likewise.
4067
4068 * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
4069 (setjmp_mod_SOURCES): New variable.
4070 (setjmp_mod_CFLAGS): Likewise.
4071 (setjmp_LDFLAGS): Likewise.
4072
4073 * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
4074 (setjmp_mod_SOURCES): New variable.
4075 (setjmp_mod_CFLAGS): Likewise.
4076 (setjmp_LDFLAGS): Likewise.
4077
4078 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
4079 (setjmp_mod_SOURCES): New variable.
4080 (setjmp_mod_CFLAGS): Likewise.
4081 (setjmp_LDFLAGS): Likewise.
4082
4083 * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
4084 (setjmp_mod_SOURCES): New variable.
4085 (setjmp_mod_CFLAGS): Likewise.
4086 (setjmp_LDFLAGS): Likewise.
4087
4088 * normal/i386/setjmp.S: Moved from here ...
4089 * lib/i386/setjmp.S: ... Moved here
4090 * normal/x86_64/setjmp.S: Moved from here ...
4091 * lib/x86_64/setjmp.S: ... Moved here
4092 * normal/powerpc/setjmp.S: Moved from here ...
4093 * lib/powerpc/setjmp.S: ... Moved here
4094 * normal/sparc64/setjmp.S: Moved from here ...
4095 * lib/sparc64/setjmp.S: ... Moved here
4096
4097 * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
4098 returns_twice in mingw.
4099
4100 * script/lua/grub_lib.c: New file.
4101 * script/lua/grub_lib.h: Likewise.
4102 * script/lua/grub_lua.h: Likewise.
4103 * script/lua/grub_main.c: Likewise.
4104 * script/lua/lapi.c: Likewise.
4105 * script/lua/lapi.h: Likewise.
4106 * script/lua/lauxlib.c: Likewise.
4107 * script/lua/lauxlib.h: Likewise.
4108 * script/lua/lbaselib.c: Likewise.
4109 * script/lua/lcode.c: Likewise.
4110 * script/lua/lcode.h: Likewise.
4111 * script/lua/ldblib.c: Likewise.
4112 * script/lua/ldebug.c: Likewise.
4113 * script/lua/ldebug.h: Likewise.
4114 * script/lua/ldo.c: Likewise.
4115 * script/lua/ldo.h: Likewise.
4116 * script/lua/ldump.c: Likewise.
4117 * script/lua/lfunc.c: Likewise.
4118 * script/lua/lfunc.h: Likewise.
4119 * script/lua/lgc.c: Likewise.
4120 * script/lua/lgc.h: Likewise.
4121 * script/lua/linit.c: Likewise.
4122 * script/lua/liolib.c: Likewise.
4123 * script/lua/llex.c: Likewise.
4124 * script/lua/llex.h: Likewise.
4125 * script/lua/llimits.h: Likewise.
4126 * script/lua/lmathlib.c: Likewise.
4127 * script/lua/lmem.c: Likewise.
4128 * script/lua/lmem.h: Likewise.
4129 * script/lua/loadlib.c: Likewise.
4130 * script/lua/lobject.c: Likewise.
4131 * script/lua/lobject.h: Likewise.
4132 * script/lua/lopcodes.c: Likewise.
4133 * script/lua/lopcodes.h: Likewise.
4134 * script/lua/loslib.c: Likewise.
4135 * script/lua/lparser.c: Likewise.
4136 * script/lua/lparser.h: Likewise.
4137 * script/lua/lstate.c: Likewise.
4138 * script/lua/lstate.h: Likewise.
4139 * script/lua/lstring.c: Likewise.
4140 * script/lua/lstring.h: Likewise.
4141 * script/lua/lstrlib.c: Likewise.
4142 * script/lua/ltable.c: Likewise.
4143 * script/lua/ltable.h: Likewise.
4144 * script/lua/ltablib.c: Likewise.
4145 * script/lua/ltm.c: Likewise.
4146 * script/lua/ltm.h: Likewise.
4147 * script/lua/lua.h: Likewise.
4148 * script/lua/luaconf.h: Likewise.
4149 * script/lua/lualib.h: Likewise.
4150 * script/lua/lundump.c: Likewise.
4151 * script/lua/lundump.h: Likewise.
4152 * script/lua/lvm.c: Likewise.
4153 * script/lua/lvm.h: Likewise.
4154 * script/lua/lzio.c: Likewise.
4155 * script/lua/lzio.h: Likewise.
4156
5e898c9d 41572009-05-16 Bean <bean123ch@gmail.com>
4158
4159 * include/grub/kernel.h (grub_module_header_types): Add type
4160 OBJ_TYPE_CONFIG.
4161
4162 * kern/main.c (grub_load_config): New function.
4163 (grub_main): Call grub_load_config to read boot config.
4164
4165 * grub-mkimage (generate_image): New parameter config_path.
4166 (options): New option --config.
4167 (main): Parse --config option, and pass it to generate_image.
4168
cf353a47 41692009-05-14 Christian Franke <franke@computer.org>
4170
4171 * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
4172 This fixes build on Cygwin.
4173
3834887f 41742009-05-14 Pavel Roskin <proski@gnu.org>
4175
4176 * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
4177 jump. This saves two bytes, so the typical case of 2 swapped
4178 drives would fit 32 bytes.
4179
8090fc01 41802009-05-13 Pavel Roskin <proski@gnu.org>
4181
ac963883 4182 * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
4183 grub_uint32_t to avoid a warning.
4184
8090fc01 4185 * loader/i386/linux.c (allocate_pages): When assigning
4186 real_mode_mem, cast through grub_size_t to fix a warning. The
4187 code already makes sure that the value would fit a pointer.
4188 (grub_linux_setup_video): Cast render_target->data to
4189 grub_size_t to fix a warning.
4190
18f547ad 41912009-05-13 Javier Martín <lordhabbit@gmail.com>
4246b8a9 4192
4193 * commands/i386/pc/drivemap.c: New file - implement drivemap
4194 command.
4195 * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
4196 * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
4197
6f6a8b28 41982009-05-13 Pavel Roskin <proski@gnu.org>
4199
4200 * util/i386/pc/grub-setup.c (setup): Remove unused variable
4201 embedding_area_exists.
4202
15fbf4c4 42032009-05-13 Robert Millan <rmh.grub@aybabtu.com>
4204
4205 * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
4206 it easier to understand / work with.
59978c8a 4207 Improve warning messages for cases where there's no embedding area,
4208 or when it is too small (or core.img too large).
15fbf4c4 4209
238e871f 42102009-05-13 Pavel Roskin <proski@gnu.org>
4211
0ab3a9a4 4212 * loader/i386/pc/multiboot2.c: Add necessary includes for
4213 grub_multiboot2_real_boot().
4214
a2c8c5f8 4215 * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
4216 PX record is always little-endian. We only need the lower 2
4217 bytes of the mode.
4218
faec96af 4219 * fs/cpio.c: Use the same name "struct head" for tar and cpio to
4220 facilitate code reuse.
4221 (grub_cpio_mount): Use "struct head", not a char buffer. This
4222 fixes a warning reported by gcc 4.4.
4223
238e871f 4224 * kernel/disk.c (grub_disk_read): Use void pointer for the
4225 buffer.
4226 (grub_disk_write): Use const void pointer for the buffer.
4227 Adjust all callers. Remove unnecessary casts.
4228
901d2f0c 42292009-05-10 Robert Millan <rmh.grub@aybabtu.com>
4230
4231 * util/i386/pc/grub-install.in: Update copyright year.
4232
18f547ad 42332009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
2eac4c16 4234
4235 gptsync
4236
4237 * commands/gptsync.c: new file
4238 * conf/common.rmk (pkglib_MODULES): add gptsync.mod
4239 (gptsync_mod_SOURCES): new variable
4240 (gptsync_mod_CFLAGS): likewise
4241 (gptsync_mod_LDFLAGS): likewise
18f547ad 4242 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
2eac4c16 4243 new definition
4244 (GRUB_PC_PARTITION_TYPE_HFS): likewise
4245 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
4246 * conf/i386-ieee1275.rmk: likewise
4247 * conf/i386-pc.rmk: likewise
4248 * conf/powerpc-ieee1275.rmk: likewise
4249
b4ba690a 42502009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
4251
4252 Fixed grub-emu
4253
4254 * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
4255 (grub_dl_ref): likewise
4256
317e1a44 42572009-05-08 Robert Millan <rmh.grub@aybabtu.com>
4258
4259 * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
4260 split in two functions (one for msdos and one for gpt).
4261
041b8094 42622009-05-08 Pavel Roskin <proski@gnu.org>
4263
752473c2 4264 * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
4265 not modified.
4266
041b8094 4267 * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
4268 uninitialized err[0] and err[1]. Rename them to bad1 and bad2.
4269 Initialize them with -1. Add sanity check for bad1. Eliminate
4270 nerr variable.
4271
172800ce 42722009-05-08 David S. Miller <davem@davemloft.net>
4273
4274 * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
4275
29aa5e81 42762009-05-06 Robert Millan <rmh.grub@aybabtu.com>
4277
4278 * util/i386/pc/grub-setup.c (setup): Fix check for embed region
473d1e45 4279 existence.
29aa5e81 4280
96613b62 42812009-05-05 Felix Zielcke <fzielcke@z-51.de>
4282
4283 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
1905c57b 4284 `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
96613b62 4285
eef73c8a 42862009-05-05 David S. Miller <davem@davemloft.net>
4287
4288 * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
4289
119494b5 42902009-05-05 Pavel Roskin <proski@gnu.org>
4291
4292 * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
4293 of grub_dl_ref() and grub_dl_unref().
4294 * commands/parttool.c: Remove preprocessor conditionals around
4295 grub_dl_ref() and grub_dl_unref().
4296 * fs/affs.c: Likewise.
4297 * fs/afs.c: Likewise.
4298 * fs/cpio.c: Likewise.
4299 * fs/ext2.c: Likewise.
4300 * fs/fat.c: Likewise.
4301 * fs/hfs.c: Likewise.
4302 * fs/hfsplus.c: Likewise.
4303 * fs/iso9660.c: Likewise.
4304 * fs/jfs.c: Likewise.
4305 * fs/minix.c: Likewise.
4306 * fs/ntfs.c: Likewise.
4307 * fs/reiserfs.c: Likewise.
4308 * fs/sfs.c: Likewise.
4309 * fs/udf.c: Likewise.
4310 * fs/ufs.c: Likewise.
4311 * fs/xfs.c: Likewise.
4312 * include/grub/dl.h: Likewise.
4313 * loader/xnu.c: Likewise.
4314
de5fd76e 43152009-05-04 Pavel Roskin <proski@gnu.org>
4316
4317 * commands/acpi.c: Remove unused variable my_mod.
4318 * partmap/amiga.c: Likewise.
4319 * partmap/apple.c: Likewise.
4320 * partmap/gpt.c: Likewise.
4321 * partmap/pc.c: Likewise.
4322 * partmap/sun.c: Likewise.
4323 * term/gfxterm.c: Likewise.
4324 * term/i386/pc/vesafb.c: Likewise.
4325 * term/i386/pc/vga.c: Likewise.
4326
983598ad 43272009-05-04 David S. Miller <davem@davemloft.net>
4328
4329 * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
4330 pointer args to grub_ieee1275_get_property().
4331
8aadec43 4332 * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
4333
9554b15e 4334 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
4335 devices, and do not traverse down under controller nodes.
4336
67e23c90 4337 * disk/ieee1275/ofdisk.c (compute_dev_path): New.
4338 (grub_ofdisk_open): Use it to un-escape "," characters.
4339 * kern/disk.c (find_part_sep): New.
4340 (grub_disk_open): Use it to find the first non-escaped ','
4341 character in the disk name.
4342 * util/ieee1275/devicemap.c (escape_of_path): New.
4343 (grub_util_emit_devicemap_entry): Use it.
4344 * util/sparc64/ieee1275/grub-install.in: Update script to
4345 strip partition specifiers properly by not triggering on
4346 '\' escaped ',' characters.
4347
74bfdd2f 43482009-05-04 Robert Millan <rmh.grub@aybabtu.com>
4349
4350 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
4351 to 0x300.
4352 * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
4353 resolutions.
4354 (linux_vesafb_modes): Add a lot of additional modes to the list (based
4355 on documentation from Wikipedia).
4356
4241d2b1 43572009-05-04 Pavel Roskin <proski@gnu.org>
4358
4359 * disk/ata.c: Spelling fixes.
4360 * disk/raid.c: Likewise.
4361 * disk/usbms.c: Likewise.
4362 * disk/dmraid_nvidia.c: Likewise.
4363 * kern/ieee1275/openfw.c: Likewise.
4364 * kern/ieee1275/init.c: Likewise.
4365 * kern/ieee1275/cmain.c: Likewise.
4366 * boot/i386/pc/cdboot.S: Likewise.
4367 * video/readers/png.c: Likewise.
4368 * video/i386/pc/vbe.c: Likewise.
4369 * fs/udf.c: Likewise.
4370 * fs/hfs.c: Likewise.
4371 * fs/reiserfs.c: Likewise.
4372 * efiemu/runtime/efiemu.c: Likewise.
4373 * efiemu/main.c: Likewise.
4374 * efiemu/mm.c: Likewise.
4375 * include/grub/elf.h: Likewise.
4376 * include/grub/xnu.h: Likewise.
4377 * include/grub/usbdesc.h: Likewise.
4378 * include/grub/usb.h: Likewise.
4379 * include/grub/script_sh.h: Likewise.
4380 * include/grub/lib/LzmaEnc.h: Likewise.
4381 * include/grub/efiemu/efiemu.h: Likewise.
4382 * include/grub/command.h: Likewise.
4383 * normal/menu.c: Likewise.
4384 * normal/main.c: Likewise.
4385 * normal/datetime.c: Likewise.
4386 * bus/usb/uhci.c: Likewise.
4387 * mmap/i386/uppermem.c: Likewise.
4388 * mmap/mmap.c: Likewise.
4389 * commands/acpi.c: Likewise.
4390 * commands/test.c: Likewise.
4391 * partmap/apple.c: Likewise.
4392 * font/font.c: Likewise.
4393 * loader/sparc64/ieee1275/linux.c: Likewise.
4394 * loader/macho.c: Likewise.
4395 * loader/i386/bsd_trampoline.S: Likewise.
4396 * loader/i386/bsd.c: Likewise.
4397 * loader/xnu.c: Likewise.
4398 * term/i386/pc/vesafb.c: Likewise.
4399 * term/usb_keyboard.c: Likewise.
4400 * util/resolve.c: Likewise.
4401 * util/getroot.c: Likewise.
4402
0cfc0083 44032009-05-04 Felix Zielcke <fzielcke@z-51.de>
4404
4405 * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
4406
7c1d00cd 44072009-05-04 Robert Millan <rmh.grub@aybabtu.com>
4408
4409 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
4410 build error.
4411
b01f0548 44122009-05-04 Robert Millan <rmh.grub@aybabtu.com>
4413
4414 * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
4415 parameter only available on BIOS.
4416
ecc3eb22 44172009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
4418
4419 Removed wrong semicolon in declaration
4420
4421 * grub/misc.h (grub_dprintf): remove semicolon
4422
112972a9 44232009-05-04 Robert Millan <rmh.grub@aybabtu.com>
4424
4425 * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
4426 (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
4427 is done by grub_cmd_linux() now).
4428 [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
4429 restore video to text mode.
4430 (grub_cmd_linux): Default `vid_mode' initialization to 0, which
4431 indicates lack of "vga=" parameter. "vga=0" is mapped to
4432 `GRUB_LINUX_VID_MODE_NORMAL'.
4433
afd5c115 44342009-05-04 Felix Zielcke <fzielcke@z-51.de>
4435
4436 * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
4437 `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
4438 and `normal/script.c'. Add `kern/rescue_reader.c',
18f547ad 4439 `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
afd5c115 4440 `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
4441 `grub_script.tab.c'.
4442
4443 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4444 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4445 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4446 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
4447 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4448
faa517ce 4449 * Makefile.in: Remove duplicated 2008 in Copyright line.
4450
ae0c0bdc 44512009-05-04 Robert Millan <rmh.grub@aybabtu.com>
4452
473d1e45 4453 * util/misc.c (grub_util_warn): New function. Emits a warning
ae0c0bdc 4454 unconditionally.
4455 * include/grub/util/misc.h (grub_util_warn): New declaration.
4456
4457 * util/i386/pc/grub-install.in: Understand --force and pass it down
4458 to grub-setup.
4459
4460 * util/i386/pc/grub-setup.c (main): Understand --force and pass it
4461 down to setup().
4462 (setup): Improve error messages and add warnings when requested to
4463 install in odd layouts. Refuse to install using blocklists unless
4464 --force was set.
4465
18f547ad 44662009-05-04 martin f. krafft <madduck@madduck.net>
c149b500 4467
4468 * disk/raid.c (grub_raid_scan_device): Improve debug message.
4469
6d260daa 44702009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
4471
4472 Updated copyright year
4473
4474 * fs/hfsplus.c: updated copyright year
18f547ad 4475
69f853f8 44762009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
4477
4478 HFS+ UUID
4479
18f547ad 4480 * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
69f853f8 4481 in the space previously used by unused3
4482 (grub_hfsplus_uuid): new function
4483 (grub_hfsplus_fs): added uuid field
4484
4c402e73 44852009-05-03 Pavel Roskin <proski@gnu.org>
4486
4487 * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
4488 suppress warnings. It's no longer needed.
4489 * disk/host.c: Likewise.
4490 * disk/ata_pthru.c: Likewise.
4491 * disk/loopback.c: Likewise.
4492 * hook/datehook.c: Likewise.
4493 * parttool/pcpart.c: Likewise.
4494 * fs/i386/pc/pxe.c: Likewise.
4495 * fs/ntfscomp.c: Likewise.
4496 * efiemu/main.c: Likewise.
4497 * mmap/mmap.c: Likewise.
4498 * commands/crc.c: Likewise.
4499 * commands/hexdump.c: Likewise.
4500 * commands/hdparm.c: Likewise.
4501 * commands/acpi.c: Likewise.
4502 * commands/echo.c: Likewise.
4503 * commands/minicmd.c: Likewise.
4504 * commands/blocklist.c: Likewise.
4505 * commands/memrw.c: Likewise.
4506 * commands/loadenv.c: Likewise.
4507 * commands/usbtest.c: Likewise.
4508 * commands/lsmmap.c: Likewise.
4509 * commands/boot.c: Likewise.
4510 * commands/parttool.c: Likewise.
4511 * commands/configfile.c: Likewise.
4512 * commands/search.c: Likewise.
4513 * commands/ieee1275/suspend.c: Likewise.
4514 * commands/cat.c: Likewise.
4515 * commands/i386/pc/pxecmd.c: Likewise.
4516 * commands/i386/pc/play.c: Likewise.
4517 * commands/i386/pc/halt.c: Likewise.
4518 * commands/i386/pc/vbeinfo.c: Likewise.
4519 * commands/i386/pc/vbetest.c: Likewise.
4520 * commands/lspci.c: Likewise.
4521 * commands/date.c: Likewise.
4522 * commands/handler.c: Likewise.
4523 * commands/ls.c: Likewise.
4524 * commands/test.c: Likewise.
4525 * commands/cmp.c: Likewise.
4526 * commands/efi/loadbios.c: Likewise.
4527 * commands/efi/fixvideo.c: Likewise.
4528 * commands/halt.c: Likewise.
4529 * commands/help.c: Likewise.
4530 * commands/reboot.c: Likewise.
4531 * hello/hello.c: Likewise.
4532 * script/sh/main.c: Likewise.
4533 * loader/xnu.c: Likewise.
4534 * term/terminfo.c: Likewise.
4535 * term/i386/pc/serial.c: Likewise.
4536 * term/usb_keyboard.c: Likewise.
4537
515b5079 45382009-05-03 David S. Miller <davem@davemloft.net>
4539
4540 * normal/menu.c: Include grub/parser.h
4541
dfc31a22 45422009-05-03 Pavel Roskin <proski@gnu.org>
4543
2fee74f1 4544 * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
4545 not char*.
4546 * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
4547 Suggested by Javier Martín <lordhabbit@gmail.com>
4548
dfc31a22 4549 * util/i386/pc/grub-mkrescue.in: Allow for the case when
4550 efiemu??.o doesn't exist.
4551 * util/i386/pc/grub-install.in: Likewise. Use "cp -f" for
4552 copying.
4553
18f547ad 45542009-05-03 Bean <bean123ch@gmail.com> Vladimir Serbinenko <phcoder@gmail.com>
cef17233 4555
4556 FreeBSD 64-bit support
4557
18f547ad 4558 * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
cef17233 4559 and loader/i386/bsd_trampoline.S
4560 (bsd_mod_ASFLAGS): new variable
4561 * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
4562 (FREEBSD_MODTYPE_KERNEL64): likewise
4563 (grub_bsd64_trampoline_start): likewise
4564 (grub_bsd64_trampoline_end): likewise
4565 (grub_bsd64_trampoline_selfjump): likewise
4566 (grub_bsd64_trampoline_gdt): likewise
4567 * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
4568 * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
4569 * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
4570 * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
18f547ad 4571 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
cef17233 4572 of "attrib" member
4573 * loader/i386/bsd_pagetable.c: new file
4574 * loader/i386/bsd_trampoline.S: likewise
4575 * loader/i386/bsd.c (ALIGN_QWORD): new macro
4576 (ALIGN_VAR): likewise
4577 (entry_hi): new variable
4578 (kern_end_mdofs): likewise
4579 (is_64bit): likewise
4580 (grub_freebsd_add_meta): use ALIGN_VAR
4581 (grub_e820_mmap): new declaration
4582 (grub_freebsd_add_mmap): new function
4583 (grub_freebsd_add_meta_module): support 64 bit kernels
4584 (grub_freebsd_list_modules): use ALIGN_VAR
4585 (gdt_descriptor): new declaration
4586 (grub_freebsd_boot): support 64 bit kernels
4587 (grub_bsd_elf64_hook): new function
4588 (grub_bsd_load_elf): support elf64
4589
038c5720 45902009-05-03 Bean <bean123ch@gmail.com>
4591
4592 * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
4593 after we get the result of if statement.
4594
fc45fb58 45952009-05-03 Bean <bean123ch@gmail.com>
4596
4597 * Makefile.in (enable_efiemu): New variable.
4598
4599 * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
4600 set.
4601 (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
4602 path.
4603 (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
4604 path, add -mno-red-zone option.
4605 (efiemu64_s.o): Likewise.
4606 (efiemu64.o): Use macro $^ for source file.
4607
4608 * configure.ac (--enable-efiemu): New option.
4609
bbee0f2b 46102009-05-03 Vladimir Serbinenko <phcoder@gmail.com>
4611
4612 xnu support
4613
4614 * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
4615 (pkglib_MODULES): add xnu.mod
4616 (xnu_mod_SOURCES): new variable
4617 (xnu_mod_CFLAGS): likewise
4618 (xnu_mod_LDFLAGS): likewise
4619 (xnu_mod_ASFLAGS): likewise
4620 * conf/i386-pc.rmk: likewise
4621 * conf/x86_64-efi.rmk: likewise
7dd4a573 4622 * include/grub/efi/efi.h (grub_efi_finish_boot_services):
bbee0f2b 4623 new declaration
4624 * include/grub/i386/macho.h: new file
4625 * include/grub/i386/xnu.h: likewise
4626 * include/grub/macho.h: likewise
4627 * include/grub/machoload.h: likewise
4628 * include/grub/x86_64/macho.h: likewise
4629 * include/grub/x86_64/xnu.h: likewise
4630 * include/grub/xnu.h: likewise
4631 * kern/efi/efi.c (grub_efi_finish_boot_services): new function
4632 * kern/efi/mm.c (MAX_HEAP_SIZE): increase
4633 * loader/i386/efi/xnu.c: new file
4634 * loader/i386/pc/xnu.c: likewise
4635 * loader/i386/xnu.c: likewise
4636 * loader/i386/xnu_helper.S: likewise
4637 * loader/macho.c: likewise
4638 * loader/xnu.c: likewise
4639 * loader/xnu_resume.c: likewise
4640 * util/grub-dumpdevtree: likewise
4641 * include/grub/i386/pit.h: include grub/err.h
4642 (grub_pit_wait): export
4643 * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
7dd4a573 4644
5caf964d 46452009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
4646
4647 Efiemu
7dd4a573 4648
5caf964d 4649 * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
7dd4a573 4650 _linux_efi, linux_efi.
4651 new files in grub-emu
5caf964d 4652 new targets efiemu32.o and efiemu64.o
4653 * loader/linux_normal_efiemu.c: likewise
4654 * loader/i386/efi/linux.c: added preliminary efiemu support
7dd4a573 4655 * util/i386/pc/grub-install.in: add efiemu??.o to the list of
5caf964d 4656 files to copy
4657 * include/grub/autoefi.h: new file
7dd4a573 4658 * include/grub/i386/efiemu.h: likewise
5caf964d 4659 * include/grub/i386/pc/efiemu.h: likewise
4660 * include/grub/efi/api.h: add LL suffix when necessary
4661 new definitions relating to tables
4662 * include/grub/efiemu/efiemu.h: new file
4663 * include/grub/efiemu/runtime.h: likewise
4664 * efiemu/prepare.c: likewise
4665 * efiemu/loadcore_common.c: likewise
4666 * efiemu/loadcore64.c: likewise
4667 * efiemu/runtime/efiemu.sh: likewise
4668 * efiemu/runtime/efiemu.S: likewise
4669 * efiemu/runtime/efiemu.c: likewise
4670 * efiemu/runtime/config.h: likewise
4671 * efiemu/prepare32.c: likewise
4672 * efiemu/main.c: likewise
4673 * efiemu/modules/pnvram.c: likewise
4674 * efiemu/modules/i386: likewise
4675 * efiemu/modules/i386/pc: likewise
4676 * efiemu/modules/acpi.c: likewise
4677 * efiemu/i386/pc/cfgtables.c: likewise
4678 * efiemu/i386/loadcore64.c: likewise
4679 * efiemu/i386/loadcore32.c: likewise
4680 * efiemu/prepare64.c: likewise
4681 * efiemu/loadcore.c: likewise
4682 * efiemu/symbols.c: likewise
4683 * efiemu/mm.c: likewise
4684 * efiemu/loadcore32.c: likewise
7dd4a573 4685
46862009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
f8efe3ad 4687
4688 ACPI spoofing
4689
4690 * commands/acpi.c: new file
4691 * commands/i386/pc/acpi.c: likewise
4692 * commands/efi/acpi.c: likewise
4693 * include/grub/acpi.h: likewise
4694 * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
4695 (acpi_mod_SOURCES): new variable
4696 (acpi_mod_CFLAGS): likewise
4697 (acpi_mod_LDFLAGS): likewise
4698 * conf/i386-efi.rmk: likewise
4699 * conf/x86_64-efi.rmk: likewise
4700
7dd4a573 47012009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
28a85665 4702
4703 Missing part from mmap patch
4704
4705 * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
4706 (grub_mmap_unregister)
4707 (grub_mmap_free_and_unregister): use grub_mmap_register
4708
7dd4a573 47092009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
09d842b9 4710
4711 Mmap services
4712
4713 * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
4714 * loader/i386/linux.c (find_mmap_size): likewise
4715 (allocate_pages): likewise
4716 * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
4717 (grub_fill_multiboot_mmap): likewise
4718 (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
4719 * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
4720 * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
4721 (OPENBSD_MMAP_RESERVED): likewise
4722 * include/grub/i386/pc/memory.h: include grub/memory.h
4723 (grub_lower_mem): removed
4724 (grub_upper_mem): likewise
4725 (GRUB_MACHINE_MEMORY_ACPI): new definition
4726 (GRUB_MACHINE_MEMORY_NVS): likewise
4727 (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
4728 (GRUB_MACHINE_MEMORY_HOLE): likewise
4729 (grub_machine_mmap_register): likewise
4730 (grub_machine_mmap_unregister): likewise
4731 (grub_machine_get_upper): likewise
4732 (grub_machine_get_lower): likewise
4733 (grub_machine_get_post64): likewise
4734 * include/grub/i386/efi/memory.h: new file
4735 * include/grub/x86_64/efi/memory.h: likewise
4736 * include/grub/efi/memory.h: likewise
4737 * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
4738 (mmap_mod_SOURCES): new variable
4739 (mmap_mod_LDFLAGS): likewise
4740 (mmap_mod_ASFLAGS): likewise
4741 * conf/i386-coreboot.rmk: likewise
4742 * conf/i386-ieee1275.rmk: likewise
4743 * conf/i386-efi.rmk: likewise
4744 * conf/x86_64-efi.rmk: likewise
4745 * include/grub/types.h (UINT_TO_PTR): new macro
4746 (PTR_TO_UINT32): likewise
4747 (PTR_TO_UINT64): likewise
4748 * include/grub/memory.h: new file
4749 * mmap/i386/pc/mmap.c: likewise
4750 * mmap/i386/pc/mmap_helper.S: likewise
4751 * mmap/i386/uppermem.c: likewise
4752 * mmap/mmap.c: likewise
4753 * mmap/efi/mmap.c: likewise
7dd4a573 4754 * kern/i386/coreboot/init.c (grub_machine_init): don't use
09d842b9 4755 grub_upper_mem
4756 * kern/i386/pc/init.c (grub_lower_mem): removed variable
4757 (grub_upper_mem): likewise
4758 (grub_machine_init): don't use grub_upper_mem,
4759 make grub_lower_mem local
4760 * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
4761 grub_mmap_iterate and grub_mmap_get_upper
4762 (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
4763
d558e6b5 47642009-05-02 Bean <bean123ch@gmail.com>
4765
4766 * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
4767 script/sh/parser.y.
4768 (pkglib_MODULES): Add normal.mod and sh.mod.
4769 (normal_SOURCES): New variable.
4770 (normal_mod_CFLAGS): Likewise.
4771 (normal_mod_LDFLAGS): Likewise.
4772 (sh_mod_SOURCES): Likewise.
4773 (sh_mod_CFLAGS): Likewise.
4774 (sh_mod_LDFLAGS): Likewise.
4775
4776 * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
4777 script/sh/lexer.c_DEPENDENCIES.
4778 (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
4779 kern/rescue_reader.c and kern/rescue_parser.c.
4780 (kernel_img_HEADERS): Remove rescue.h, add reader.h.
4781 (grub_emu_SOURCES): Change source files.
4782 (pkglib_MODULES): Remove normal.mod.
4783 (normal_SOURCES): Removed.
4784 (normal_mod_CFLAGS): Likewise.
4785 (normal_mod_LDFLAGS): Likewise.
4786 * conf/i386-coreboot.rmk: Likewise.
4787 * conf/i386-efi.rmk: Likewise.
4788 * conf/i386-ieee1276.rmk: Likewise.
4789 * conf/powerpc-ieee1275.rmk: Likewise.
4790 * conf/sparc64-ieee1275.rmk: Likewise.
4791 * conf/x86_64-efi.rmk: Likewise.
4792
4793 * include/grub/command.h (grub_command_execute): New inline function.
4794
4795 * include/grub/menu.h (grub_menu_entry): Removed commands field.
4796
4797 * include/grub/normal.h: Remove <grub/setjmp.h>.
4798 (grub_fs_module_list): Moved to normal/autofs.c.
4799 (grub_exit_env): Removed.
4800 (grub_command_execute): Likewise.
4801 (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
4802 parameter script.
4803 (read_command_list): New function declaration.
4804 (read_fs_list): Likewise.
4805
4806 * include/parser.h: Include <grub/reader.h>.
4807 (grub_parser_split_cmdline): Change type of getline parameter.
4808 (grub_parser): New structure.
4809 (grub_parser_class): New variable.
4810 (grub_parser_execute): New function declaration.
4811 (grub_register_rescue_parser): Likewise.
4812 (grub_parser_register): New inline function.
4813 (grub_parser_unregister): Likewise.
4814 (grub_parser_get_current): Likewise.
4815 (grub_parser_set_current): Likewise.
4816
4817 * include/grub/reader.h: New file.
4818 * kern/reader.c: Likewise.
4819 * kern/rescue_parser.c: Likewise.
4820 * kern/rescue_reader.c: Likewise.
4821 * normal/autofs.c: Likewise.
4822 * normal/dyncmd.c: Likewise.
4823
4824 * include/grub/rescue.h: Removed.
4825 * normal/command.h: Likewise.
4826
4827 * include/grub/script.h: Moved to ...
4828 * include/grub/script_sh.h: ... Moved here.
4829 * normal/execute.c: Moved to ...
4830 * script/sh/execute.c: ... Moved here.
4831 * normal/function.c: Moved to ...
4832 * script/sh/function.c: ... Moved here.
4833 * normal/lexer.c: Moved to ...
4834 * script/sh/lexer.c: ... Moved here.
4835 * normal/parser.y: Moved to ...
4836 * script/sh/parser.y: ... Moved here.
4837 * normal/script.c: Moved to ...
4838 * script/sh/script.c: ... Moved here.
4839
4840 * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
4841 <grub/reader.h>.
4842 (grub_exit_env): Removed.
4843 (fs_module_list): Moved to normal/autofs.c.
4844 (grub_file_getline): Don't handle comment here.
4845 (free_menu): Skip removed field entry->commands.
4846 (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
4847 script parameter.
4848 (read_config_file): Removed nested parameter, change getline function.
4849 (grub_enter_normal_mode): Removed.
4850 (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
4851 (read_command_list): Likewise.
4852 (autoload_fs_module): Moved to normal/autofs.c.
4853 (read_fs_list): Likewise.
4854 (reader_nested): New variable.
4855 (grub_normal_execute): Run parser.sh to switch to sh parser.
4856 (grub_cmd_rescue): Removed.
4857 (cmd_normal): Removed.
4858 (grub_cmd_normal): Unregister itself at the beginning. Don't register
4859 rescue command.
4860 (grub_cmdline_run): New function.
4861 (grub_normal_reader_init): Likewise.
4862 (grub_normal_read_line): Likewise.
4863 (grub_env_write_pager): Likewise.
4864 (cmdline): New variable.
4865 (grub_normal_reader): Likewise.
4866 (GRUB_MOD_INIT): Register normal reader and set as current, register
4867 pager hook, register normal command with grub_register_command_prio,
4868 so that it won't show up in command.lst.
4869 (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
4870 grub_fs_autoload_hook.
4871
4872 * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
4873 (grub_menu_execute_entry): Replace grub_script_execute with
4874 grub_parser_execute, change parameter to grub_command_execute.
4875
4876 * normal/menu_text.c: Remove <grub/script.h>.
4877
4878 * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
4879 and <grub/parser.h>.
4880 (run): Change editor_getline to use new parser interface. Change
4881 parameter to grub_command_execute.
4882
4883 * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
4884 <grub/reader.h> and <grub/parser.h>.
4885 (grub_load_normal_mode): Execute normal command.
4886 (grub_main): Call grub_register_core_commands,
4887 grub_register_rescue_parser and grub_register_rescue_reader, use
4888 grub_reader_loop to enter input loop.
4889
7dd4a573 4890 * kern/parser.c (grub_parser_split_cmdline): Change type of
4891 getline parameter.
d558e6b5 4892 (grub_parser_class): New variable.
4893 (grub_parser_execute): New function.
4894
4895 * loader/i386/multiboot.c: Remove <grub/rescue.h>.
4896 * loader/multiboot2.c: Likewise.
4897 * loader/sparc64/ieee1275/linux.c: Likewise.
4898
4899 * util/grub-emu.c (read_command_list): New dummy function.
4900
18db813d 49012009-05-02 Robert Millan <rmh.grub@aybabtu.com>
4902
4903 * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
4904 count to 16 for CCISS and IDA.
4905
6c67de15 49062009-05-02 Robert Millan <rmh.grub@aybabtu.com>
4907
4908 * normal/menu_text.c (grub_wait_after_message): Print a newline
4909 after waiting for user input.
4910
4911 * loader/i386/linux.c: Include `<grub/normal.h>'.
4912 (grub_cmd_linux): Improve the error message about `ask' mode, by
4913 waiting for user input so it's not missed (we can do this, since
4914 user requested interaction).
4915
d9dc87b0 49162009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
4917
4918 Added missing lst to grub-mkrescue
4919
4920 * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
4921 and ${input_dir}/parttool.lst
4922
ac8a2baa 49232009-04-30 David S. Miller <davem@davemloft.net>
4924
ad22a610 4925 * util/hostdisk.c (device_is_wholedisk): New function.
4926 (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
4927 zero only if device_is_wholedisk() returns true.
4928
6966215d 4929 * util/hostdisk.c (convert_system_partition_to_system_disk):
4930 Handle virtual disk devices named /dev/vdiskX as found on sparc
4931 and powerpc.
4932
ac8a2baa 4933 * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
4934 lettered partition specifier is found, convert to numbered.
4935
979b4fb4 49362009-04-29 David S. Miller <davem@davemloft.net>
4937
e2bf39b2 4938 * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
4939 * include/grub/sparc64/ieee1275/memory.h: Likewise.
4940
3c64e104 4941 * normal/command.c: Add missing newline at end of file.
4942
979b4fb4 4943 * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
4944 warnings.
4945 * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
4946 * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
4947 grub_ofdisk_read): Likewise, and deal similarly with the fact that
4948 ihandles have a 32-bit type but need to be stored in a "void *".
4949
136d9f82 49502009-04-28 Pavel Roskin <proski@gnu.org>
4951
9459c306 4952 * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
4953 not disk. Adjust all dependencies.
2e08a26a 4954 (grub_fs_uuid_close): Use grub_device_close(), not
9459c306 4955 grub_disk_close().
4956
136d9f82 4957 * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
4958 parent's partition, don't copy it by reference, as it gets freed
4959 on close.
4960
7dd4a573 49612009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
75a807cf 4962
4963 Preboot hooks support
4964
4965 * commands/boot.c (struct grub_preboot_t): new declaration
4966 (preboots_head): new variable
4967 (preboots_tail): likewise
4968 (grub_loader_register_preboot_hook): new function
4969 (grub_loader_unregister_preboot_hook): likewise
4970 (grub_loader_set): launch preboot hooks
4971 * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
4972 (grub_loader_register_preboot_hook): new declaration
4973 (grub_loader_unregister_preboot_hook): likewise
4974
5af922b5 49752009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
4976
4977 Warning fix
4978
7dd4a573 4979 * disk/scsi.c (grub_scsi_open): added missing cast when
5af922b5 4980 calling grub_dprintf
4981
a5562c30 49822009-04-26 Vladimir Serbinenko <phcoder@gmail.com>
4983
4984 Bug and warning fixes
4985
7dd4a573 4986 * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
a5562c30 4987 declaration
4988 * commands/test.c (test_parse): fixed bug with file tests and corrected
4989 declaration of find_file
4990
4006f85c 49912009-04-26 Pavel Roskin <proski@gnu.org>
4992
4993 * Makefile.in: Don't install empty manual pages if help2man is
4994 missing. Use help2man option for output, not shell redirection.
4995
5c77c3de 49962009-04-26 David S. Miller <davem@davemloft.net>
4997
4998 * util/grub-mkdevicemap.c (make_device_map): Add missing
4999 NESTED_FUNC_ATTR to process_device().
5000
033b10a8 50012009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
5002
5003 Test command
5004
5005 * commands/test.c: rewritten to use bash-like test
5006
e4343593 50072009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
5008
5009 Parttool autoloading and improvements
5010
7dd4a573 5011 * Makefile.in (pkglib_DATA): add parttool.lst
e4343593 5012 (parttool.lst): new target
5013 * genmk.rb: generate parttool-*
5014 (CLEANFILES): add #{parttool}
5015 (PARTTOOLFILES): new variable
5016 * genparttoollist.sh: new file
7dd4a573 5017 * parttool/pcpart.c (grub_pcpart_boot): more feedback
e4343593 5018 (grub_pcpart_type): likewise
5019 * commands/parttool.c (helpmsg): new variable
5020 (grub_cmd_parttool): output help if not enough arguments are supplied
5021 autoload modules
5022 (GRUB_MOD_INIT(parttool)): use helpmsg
5023
0d312500 50242009-04-24 David S. Miller <davem@davemloft.net>
5025
7dd4a573 5026 Avoiding opening same device multiple times in device iterator.
0d312500 5027
5028 * kern/device.c: (grub_device_iterate): Define struct part_ent,
7dd4a573 5029 and use it to build a list of partitions in iterate_disk() and
0d312500 5030 iterate_partition().
5031
ac20caff 5032 * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
5033 on disk->data.
5034
0dcf7495 5035 * disk/ieee1275/nand.c (grub_nand_iterate): Return
5036 grub_devalias_iterate() result instead of unconditional 0.
5037 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
5038 Also, capture hook return value, either directly or via
5039 grub_children_iterate(), and propagate to caller.
5040 * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
5041 grub_children_iterate): Return value is now 'int' instead of
5042 'grub_err_t'.
5043 * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
5044 like a proper iterator, stopping when hooks return non-zero.
5045 (grub_devalias_iterate): Likewise.
5046
c8c08833 50472009-04-23 David S. Miller <davem@davemloft.net>
5048
5049 * kern/sparc64/ieee1275/openfw.c: Unused, delete.
5050
f01005a8 50512009-04-22 David S. Miller <davem@davemloft.net>
5052
5053 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
5054 is larger than address_cells, use that value for address_cells too.
5055
4e8269da 5056 * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
5057 IEEE1275_MAX_PATH_LEN): Define.
5058 * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
5059 allocate 'childtype', 'childpath', 'childname', and 'fullname'.
5060 (grub_devalias_iterate): Dynamically allocate 'aliasname' and
5061 'devtype'. Explicitly NULL terminate devalias expansion.
5062
a1447506 5063 * util/sparc64/ieee1275/misc.c: New file.
5064 * util/sparc64/ieee1275/grub-setup.c: New file.
5065 * util/sparc64/ieee1275/grub-ofpathname.c: New file.
5066 * util/sparc64/ieee1275/grub-mkimage.c: New file.
5067 * util/sparc64/ieee1275/grub-install.in: New file.
5068 * util/ieee1275/ofpath.c: New file.
5069 * util/ieee1275/devicemap.c: New file.
5070 * util/devicemap.c: New file.
5071 * util/deviceiter.c: New file.
5072 * kern/sparc64/ieee1275/init.c: New file.
5073 * include/grub/util/ofpath.h: New file.
5074 * include/grub/util/deviceiter.h: New file.
5075 * util/grub-mkdevicemap.c: Include deviceiter.h.
5076 Implement using grub_util_emit_devicemap_entry and
5077 grub_util_iterate_devices.
5078 * conf/i386-corebook.rmk: Build util/deviceiter.c and
5079 util/devicemap.c into grub-mkdevicemap
5080 * conf/i386-efi.rmk: Likewise.
5081 * conf/i386-ieee1275.rmk: Likewise.
5082 * conf/i386-pc.rmk: Likewise.
5083 * conf/powerpc-ieee1275.rmk: Likewise.
5084 * conf/sparc64-ieee1275.rmk: Add rules to build boot block
5085 images and installation utilities. Build kernel as image
5086 instead of as elf binary. Use common rules as much as possible.
5087
7dd4a573 50882009-04-19 Vladimir Serbinenko <phcoder@gmail.com>
0aefc632 5089
5090 Correct GPT definition
5091
7dd4a573 5092 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
0aefc632 5093 of "attrib" member
5094
c6c5219f 50952009-04-19 Felix Zielcke <fzielcke@z-51.de>
5096
5097 * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
5098
0552ff9f 50992009-04-19 David S. Miller <davem@davemloft.net>
5100
5101 * loader/sparc64/ieee1275/linux.c: Include grub/command.h
5102 (grub_rescue_cmd_linux): Rename to...
5103 (grub_cmd_linux): and fix prototype.
5104 (grub_rescue_cmd_initrd): Rename to...
5105 (grub_cmd_initrd): and fix prototype.
5106 (cmd_linux, cmd_initrd): New.
5107 (GRUB_MOD_INIT(linux)): Use grub_register_command().
5108 (GRUB_MOD_FINI(linux): Use grub_unregister_command().
5109
d1a282fc 51102009-04-17 Pavel Roskin <proski@gnu.org>
5111
07c5039f 5112 * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
5113 format.
5114 (grub_ohci_transfer): Likewise.
5115
b012002d 5116 * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
5117
1bc09c35 5118 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
5119 return without a value. Fix inconsistent indentation.
5120
e0ff9126 5121 * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
5122 match struct grub_fs.
5123
d1a282fc 5124 * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
5125 * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
5126 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
5127 * commands/lspci.c (grub_lspci_iter): Likewise.
5128
a96df3f2 51292009-04-16 Bean <bean123ch@gmail.com>
5130
5131 * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
5132 value.
5133
41bb0fe9 51342009-04-15 Pavel Roskin <proski@gnu.org>
5135
5136 * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
5137 LONG_MAX to GRUB_LONG_MAX. Introduce GRUB_LONG_MIN. Update all
5138 users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
5139 definitions.
5140
596c6970 51412009-04-15 Felix Zielcke <fzielcke@z-51.de>
5142
5143 * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
7dd4a573 5144 that no multiple data or metadata areas are supported and `Unknown
596c6970 5145 metadata header'.
5146
7dd4a573 51472009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
0d5d5653 5148
5149 Move loader out of the kernel
5150
5151 * kern/loader.c: moved to ...
5152 * commands/boot.c: ... moved here
5153 * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
5154 * commands/boot.c (grub_cmd_boot): moved here. All users updated
5155 * include/grub/kernel.h (grub_machine_fini): export
5156 * include/grub/loader.h (grub_loader_is_loaded): update declaration
5157 (grub_loader_set): likewise
5158 (grub_loader_unset): likewise
5159 (grub_loader_boot): likewise
5160 * conf/common.rmk: new module boot.mod
5161 (pkglib_MODULES): add boot.mod
5162 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
5163 (grub_emu_SOURCES): likewise
5164 * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
5165 (grub_emu_SOURCES): likewise
5166 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
5167 (grub_emu_SOURCES): likewise
5168 * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
5169 (grub_emu_SOURCES): likewise
5170 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
5171 (grub_emu_SOURCES): likewise
7dd4a573 5172 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
5173 (grub_emu_SOURCES): likewise
0d5d5653 5174 * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
7dd4a573 5175 (grub_emu_SOURCES): likewise
0d5d5653 5176
7dd4a573 51772009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
5999d619 5178
5179 use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
7dd4a573 5180
5999d619 5181 * kern/misc.c (grub_itoa): Removed function
5182 (grub_ltoa): likewise
5183 (grub_vsprintf): use grub_lltoa
5184
7dd4a573 51852009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
13c00781 5186
5187 Restore grub-emu
5188
5189 * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
5190 * conf/i386-coreboot.rmk: likewise
5191 * conf/i386-ieee1275.rmk: likewise
5192 * conf/powerpc-ieee1275.rmk: likewise
7dd4a573 5193
20318222 51942009-04-15 Felix Zielcke <fzielcke@z-51.de>
5195
5196 * INSTALL: Add that `./autogen.sh' needs to be run before
5197 `./configure.'.
5198
d05f0df3 51992009-04-14 Bean <bean123ch@gmail.com>
5200
5201 * Makefile.in (pkglib_DATA): Add handler.lst.
5202 (handler.lst): New rule.
5203
5204 * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
5205 * conf/i386-coreboot.rmk: Likewise.
5206 * conf/i386-ieee1275.rmk: Likewise.
5207 * conf/i386-efi.rmk: Likewise.
5208 * conf/x86_64-efi.rmk: Likewise.
5209 * conf/powerpc-ieee1275.rmk: Likewise.
5210 * conf/sparc64-ieee1275.rmk: Likewise.
5211
5212 * genhandlerlist.sh: New file.
5213
5214 * genmk.rb: Add rules to generate handler.lst.
5215
5216 * include/grub/normal.h (grub_file_getline): New function definition.
5217 (read_handler_list): Likewise.
5218 (free_handler_list): Likewise.
5219
5220 * include/grub/term.h (grub_term_register_input): Add name parameter
5221 for auto generation of handler.lst.
5222 (grub_term_register_output): Likewise.
5223
5224 * normal/handler.c: New file.
5225
5226 * normal/main.c (get_line): Renamed to grub_file_getline.
5227 (read_config_file): Use the newly renamed grub_file_getline.
5228 (read_command_list): Likewise.
5229 (read_fs_list): Likewise.
5230 (grub_normal_execute): Call read_handler_list to parse handler.lst.
5231 (GRUB_MOD_FINI): Call free_handler_list to free handler list.
5232
5233 * term/efi/console.c (grub_console_init): Add name parameter for auto
5234 generation of handler.lst.
5235 * term/gfxterm.c: Likewise.
5236 * term/i386/pc/at_keyboard.c: Likewise.
5237 * term/i386/pc/console.c: Likewise.
5238 * term/i386/pc/serial.c: Likewise.
5239 * term/i386/pc/vesafb.c: Likewise.
5240 * term/i386/pc/vga.c: Likewise.
5241 * term/i386/pc/vga_text.c: Likewise.
5242 * term/ieee1275/ofconsole.c: Likewise.
5243 * term/usb_keyboard.c: Likewise.
5244
33c846be 52452009-04-14 Bean <bean123ch@gmail.com>
5246
5247 * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
5248 properly with null character.
5249
4484e01e 52502009-04-14 Felix Zielcke <fzielcke@z-51.de>
5251
5252 * configure: Remove.
5253 * config.h.in: Likewise.
f93d668e 5254 * stamp-h.in: Likewise.
4484e01e 5255 * DISTLIST: Likewise.
5256 * conf/common.mk: Likewise.
5257 * conf/i386-coreboot.mk: Likewise.
5258 * conf/i386-efi.mk: Likewise.
5259 * conf/i386-ieee1275.mk: Likewise.
5260 * conf/i386.mk: Likewise.
5261 * conf/i386-pc.mk: Likewise.
5262 * conf/powerpc-ieee1275.mk: Likewise.
5263 * conf/sparc64-ieee1275.mk: Likewise.
5264 * conf/x86_64-efi.mk: Likewise.
5265
5266 * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
5267 develop on GRUB.
5268
7dd4a573 52692009-04-14 John Stanley <jpsinthemix@verizon.net>
5c5bf96a 5270 David S. Miller <davem@davemloft.net>
5271
5272 * util/hostdisk.c (make_device_name): Fix buffer length
5273 calculations.
5274
e25b5a8c 52752009-04-14 Felix Zielcke <fzielcke@z-51.de>
5276
5277 * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
5278 <sys/param.h> and <sys/sysctl.h>.
5279 (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
5280 to add 0x10 to `kern.geom.debugflags' if it's not already set, before
5281 opening the device and reset them afterwards.
5282
1f1f580c 52832009-04-13 Pavel Roskin <proski@gnu.org>
5284
5285 * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
5286 Reported by John Stanley <jpsinthemix@verizon.net>
5287
7ebc2d6b 52882009-04-13 Robert Millan <rmh@aybabtu.com>
5289
5290 * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
7dd4a573 5291 that name for menuentries when appropriate.
7ebc2d6b 5292
d8ba3667 52932009-04-13 Felix Zielcke <fzielcke@z-51.de>
5294
5295 * util/grub.d/10_freebsd.in: Add a missing `fi'.
5296
cba416eb 52972009-04-13 Robert Millan <rmh@aybabtu.com>
5298
5299 * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
5300 to Linux, simply abort telling the user it's no longer supported.
5301
a547a745 53022009-04-13 Felix Zielcke <fzielcke@z-51.de>
5303
5304 * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
7dd4a573 5305 doesn't exist. Check also for /boot/kernel/kernel.gz. Print
a547a745 5306 `freebsd_loadenv' only when devices.hints exist.
5307
232a769c 53082009-04-13 Pavel Roskin <proski@gnu.org>
5309
5310 * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
5311
c3012039 53122009-04-13 Felix Zielcke <fzielcke@z-51.de>
5313
5314 * util/i386/pc/grub-install.in (install_drive): Remove the BSD
5315 partition number.
5316 (grub_drive): Likewise.
5317
234022fe 53182009-04-13 David S. Miller <davem@davemloft.net>
5319
5320 * kern/sparc64/ieee1275/ieee1275.c: New file.
5321 * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
5322 IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
5323 IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
5324 IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
5325 (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
5326 grub_ieee1275_alloc_physmem): Declare new exported functions.
5327
d8e1836c 5328 * include/grub/sparc64/ieee1275/loader.h: New file.
5329 * include/grub/sparc64/ieee1275/memory.h: Likewise.
5330 * include/grub/sparc64/kernel.h: Likewise.
5331 * loader/sparc64/ieee1275/linux.c: Likewise.
5332
96bd81ec 5333 * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
5334 (grub_fstest_SOURCES): Likewise.
5335
6a4737e5 5336 * util/hostdisk.c (make_device_name): Do not make any assumptions
5337 about the length of drive names.
5338
1d7a72fd 5339 * kern/dl.c (grub_dl_load_file): Close file immediately when
5340 we are done using it.
5341
56bc2471 53422009-04-12 David S. Miller <davem@davemloft.net>
5343
5344 * kern/misc.c (grub_ltoa): Fix cast when handling negative
5345 values. Noticed by Pavel Roskin.
5346
df38d0bb 5347 * configure.ac: Check for __bswapsi2 and__bswapdi2 using
5348 target compiler.
7dd4a573 5349
e382e93a 5350 * genmk.rb: Add more flexible image type specification, also
5351 pass --strip-unneeded to objcopy.
5352 * conf/i386-pc.rmk: Use *_FORMAT.
5353 * conf/i386-pc.mk: Rebuilt.
5354
f5dbbca9 5355 * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
5356 (OFDISK_HASH_SZ): Define.
5357 (ofdisk_hash): New hash table.
5358 (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
5359 (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
5360 instead of device phandle which is not unique.
5361
91c88b12 5362 * kern/sparc64/ieee1275/init.c: Delete, replace with...
5363 * kern/sparc64/ieee1275/crt0.S: assembler implementation.
5364 * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
5365 (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
5366 GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
5367 GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
5368 GRUB_KERNEL_MACHINE_DATA_END): Define.
5369 (grub_kernel_image_size, grub_total_module_size): Declare.
5370
5b5d4aa5 53712009-04-12 Pavel Roskin <proski@gnu.org>
5372
7dd4a573 5373 * configure.ac: Change the logic when we check for target tools.
5374 Do it when the target is specified and it's different from the
5375 specified value of the host.
5b5d4aa5 5376
c91e1793 53772009-04-11 Felix Zielcke <fzielcke@z-51.de>
5378
5379 * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
5380 (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
5381 GNU/kFreeBSD. Check if a device is a character device. Use
5382 DIOCGMEDIASIZE to get the size.
5383 (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
5384 support for GNU/kFreeBSD.
5385 (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
5386 is a character device instead of a block device. Add support for
5387 FreeBSD device names.
5388
5389 * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
5390 is a character device instead of a block device.
5391
5392 * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
5393 is a character device instead of a block device.
5394
b1ac8644 53952009-04-11 Andrey Shuvikov <mr_hyro@yahoo.com>
5396
5397 * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
5398 (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
5399 FreeBSD. Check if a device is a character device. Use
5400 DIOCGMEDIASIZE to get the size.
5401 (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
5402 support for FreeBSD.
5403 (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
5404 is a character device instead of a block device. Add support for
5405 FreeBSD device names.
5406
5407 * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
5408 a character device instead of a block device.
5409 (grub_util_check_char_device): New function.
5410
5411 * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
5412 a character device instead of a block device.
5413
5414 * include/grub/util/getroot.h (grub_util_check_char_device): New
5415 prototype.
5416
a3f7515a 54172009-04-11 David S. Miller <davem@davemloft.net>
5418
5419 * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
5420 static libgcc.
5421 * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
5422 * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
5423 function, if present.
5424 (__bswapdi2): Likewise.
5425
0d44993d 5426 * include/grub/sparc64/ieee1275/boot.h: New file.
5427 * boot/sparc64/ieee1275/boot.S: Likewise.
5428 * boot/sparc64/ieee1275/diskboot.S: Likewise.
5429
ed3d2bc2 5430 * kern/misc.c (grub_ltoa): New function.
5431 (grub_vsprintf): Use it to format 'long' integers.
5432
d3bfb59c 54332009-04-10 David S. Miller <davem@davemloft.net>
5434
5435 * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
5436 slots are of type grub_ieee1275_cell_t.
5437 (grub_nand_read): Likewise.
5438 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
5439 IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
5440 macros are used to compare values in arg/ret block of the call.
5441 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
5442 grub_ieee1275_next_property, grub_ieee1275_get_property_length,
5443 grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
5444 grub_ieee1275_instance_to_path, grub_ieee1275_write,
5445 grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
5446 grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
5447 grub_ieee1275_close, grub_ieee1275_set_property,
5448 grub_ieee1275_set_color): All ieee1275 call arg slots are of type
5449 grub_ieee1275_cell_t.
5450 * kern/ieee1275/openfw.c (grub_map): Likewise.
5451 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
5452 grub_ieee1275_phandle_t): Define as grub_unit32_t type.
5453
450e2238 5454 * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
5455 * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
5456 (grub_devalias_iterate): Likewise.
5457
7dd4a573 54582009-04-10 Vladimir Serbinenko <phcoder@gmail.com>
6df8cc76 5459
5460 UFS improvements
5461
5462 * fs/ufs.c (INODE_NBLOCKS): new definition
5463 (struct grub_ufs_dirent): added fields for non-BSD dirents
5464 (grub_ufs_get_file_block): fixed double indirect handling
5465 (grub_ufs_lookup_symlink): use more robust way to determine whether
5466 symlink is inline
5467 (grub_ufs_find_file): support for non-BSD dirents
5468 (grub_ufs_dir): support for non-BSD dirents
5469
e7e6862a 54702009-04-10 Bean <bean123ch@gnail.com>
5471
5472 * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
5473 attribute, otherwise the size would be wrong for i386 platform.
5474
5475 * include/grub/pci.h (grub_pci_read_word): New inline function.
5476 (grub_pci_read_byte): Likewise.
5477 (grub_pci_write): Likewise.
5478 (grub_pci_write_word): Likewise.
5479 (grub_pci_write_byte): Likewise.
5480
5481 * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
5482
5483 * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
5484 (find_framebuf): Scan pci to locate the frame buffer address.
5485
5486 * commands/efi/fixvideo.c: New file.
5487
5488 * commands/efi/loadbios.c: Likewise.
5489
5490 * commands/memrw.c: Likewise.
5491
5492 * util/grub-dumpbios.in: Likewise.
5493
5494 * conf/common.rmk (grub-dumpbios): New utility.
5495 (pkglib_MODULES): New module memrw.mod.
5496 (memrw_mod_SOURCE): New macro.
5497 (memrw_mod_CFLAGS): Likewise.
5498 (memrw_mod_LDFLAGS): Likewise.
5499
7dd4a573 5500 * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
e7e6862a 5501 fixvideo.mod.
5502 (loadbios_mod_SOURCE): New macro.
5503 (loadbios_mod_CFLAGS): Likewise.
5504 (loadbios_mod_LDFLAGS): Likewise.
5505 (fixvideo_mod_SOURCE): Likewise.
5506 (fixvideo_mod_CFLAGS): Likewise.
5507 (fixvideo_mod_LDFLAGS): Likewise.
5508
7dd4a573 5509 * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
e7e6862a 5510 fixvideo.mod.
5511 (loadbios_mod_SOURCE): New macro.
5512 (loadbios_mod_CFLAGS): Likewise.
5513 (loadbios_mod_LDFLAGS): Likewise.
5514 (fixvideo_mod_SOURCE): Likewise.
5515 (fixvideo_mod_CFLAGS): Likewise.
5516 (fixvideo_mod_LDFLAGS): Likewise.
5517
af63ada2 55182009-04-08 Felix Zielcke <fzielcke@z-51.de>
5519
5520 * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
5521
c2cdde70 55222009-04-07 David S. Miller <davem@davemloft.net>
5523
5524 * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
5525 support for R_SPARC_OLO10 relocations. Fix compile warning for
5526 R_SPARC_WDISP30 case.
ea3f72cf 5527 * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
c2cdde70 5528
761319cf 55292009-04-06 Pavel Roskin <proski@gnu.org>
5530
1007d1f5 5531 * include/grub/misc.h (ARRAY_SIZE): New macro.
5532 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
5533 New macro.
5534 * loader/i386/linux.c (allocate_pages): Use free_pages().
5535 (grub_linux_unload): Don't use free_pages().
5536 (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
5537 wrong index. Treat all other modes as text modes.
5538 (grub_cmd_linux): Initialize vid_mode unconditionally to
5539 GRUB_LINUX_VID_MODE_NORMAL. Recognize and support "vga=ask".
5540
761319cf 5541 * commands/help.c (print_command_help): Use cmd->prio, not
5542 cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
5543
ea761d40 55442009-04-06 Vladimir Serbinenko <phcoder@gmail.com>
7dd4a573 5545
ea761d40 5546 Parttool
5547
5548 * parttool/pcpart.c: new file
5549 * commands/parttool.c: likewise
5550 * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
5551 (parttool_mod_SOURCES): new variable
5552 (parttool_mod_CFLAGS): likewise
5553 (parttool_mod_LDFLAGS): likewise
5554 (pcpart_mod_SOURCES): likewise
5555 (pcpart_mod_CFLAGS): likewise
5556 (pcpart_mod_LDFLAGS): likewise
7dd4a573 5557 * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
ea761d40 5558 and parttool/pcpart.c
5559 * conf/i386-efi.rmk: likewise
5560 * conf/i386-ieee1275.rmk: likewise
5561 * conf/i386-pc.rmk: likewise
5562 * conf/powerpc-ieee1275.rmk: likewise
5563 * conf/sparc64-ieee1275.rmk: likewise
5564 * conf/x86_64-ieee1275.rmk: likewise
5565
05aaebfb 55662009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
5567
5568 Support for mtime and further expandability of dir command
5569
5570 * include/grub/lib/datetime.h: moved to ...
7dd4a573 5571 * include/grub/datetime.h: ... moved here and added
05aaebfb 5572 declaration of grub_unixtime2datetime. All users updated
7dd4a573 5573 * include/grub/fs.h: new syntax for dir and mtime functions in
5574 struct grub_fs
05aaebfb 5575 * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
5576 and GRUB_FSHELP_FLAGS_MASK
5577 * commands/ls.c (grub_ls_list_files): Write mtime in long format
5578 * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
5579 (grub_ext2_mtime): new function
5580 * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
5581 (grub_hfsplus_mtime): new function
5582 * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
5583 (GRUB_UFS_ATTR_FILE): likewise
5584 (GRUB_UFS_ATTR_LNK): likewise
5585 (struct grub_ufs_sblock): new fields mtime
5586 (grub_ufs_read_inode): new parameter to read inode to a separate buffer
5587 all users updated
5588 (grub_ufs_dir): mtime support
5589 (grub_ufs_mtime): new function
5590 * fs/affs.c (grub_affs_dir): use new dir syntax
5591 * fs/afs.c (grub_afs_dir): likewise
5592 * fs/cpio.c (grub_cpio_dir): likewise
5593 * fs/fat.c (grub_fat_find_dir): likewise
5594 * fs/hfs.c (grub_hfs_dir): likewise
5595 * fs/iso9660.c (grub_iso9660_dir): likewise
5596 * fs/jfs.c (grub_jfs_dir): likewise
5597 * fs/minix.c (grub_minix_dir): likewise
5598 * fs/ntfs.c (grub_ntfs_dir): likewise
5599 * fs/reiserfs.c (grub_reiserfs_dir): likewise
5600 * fs/sfs.c (grub_sfs_dir): likewise
5601 * fs/xfs.c (grub_xfs_dir): likewise
5602 * util/hostfs.c (grub_hostfs_dir): likewise
5603 * lib/datetime.c: moved to ...
5604 * normal/datetime.c: ... moved here
5605 (grub_unixtime2datetime): new function
5606 * kern/rescue.c (grub_rescue_print_files): use new dir syntax
7dd4a573 5607 * normal/completion.c (iterate_dir): use new dir syntax
5608 * normal/misc.c (grub_normal_print_device_info): tell the
05aaebfb 5609 last modification time of a volume
7dd4a573 5610 * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
05aaebfb 5611 * conf/common.rmk: added lib/datetime.c to ls.mod
7dd4a573 5612 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
05aaebfb 5613 (normal_mod_SOURCES): likewise
5614 (datetime_mod_SOURCES): Removed lib/datetime.c
5615 * conf/i386-efi.rmk: likewise
7dd4a573 5616 * conf/i386-ieee1275.rmk: likewise
05aaebfb 5617 * conf/i386-pc.rmk: likewise
5618 * conf/powerpc-ieee1275.rmk: likewise
7dd4a573 5619 * conf/sparc64-ieee1275.rmk: likewise
5620 * conf/x86_64-efi.rmk: likewise
05aaebfb 5621
8a7e1a14 56222009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
5623
5624 Trim trailing spaces in FAT label and support mtools-like labels
7dd4a573 5625
5626 * fs/fat.c (grub_fat_iterate_dir): New function based
8a7e1a14 5627 on grub_fat_find_dir
5628 (grub_fat_find_dir): use grub_fat_iterate_dir
5629 (grub_fat_label): likewise
5630
04186a9c 56312009-04-04 Vladimir Serbinenko <phcoder@gmail.com>
5632
7dd4a573 5633 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
04186a9c 5634 and command.h
5635 remove extraneous kernel_elf_HEADERS
5636
da4c0bb6 56372009-04-04 Bean <bean123ch@gnail.com>
5638
5639 * include/grub/util/misc.h: Add dummy function fsync for mingw.
5640
5641 * util/misc.c: Likewise.
5642
54ad9555 56432009-04-04 Yoshinori K. Okuji <okuji@enbug.org>
5644
5645 * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
5646 instead of grub_printf.
5647
7a6bf9f2 56482009-04-03 Robert Millan <rmh@aybabtu.com>
5649
5650 * loader/i386/linux.c (grub_linux_setup_video): Fill
5651 `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
5652 values from `mode info' structure instead of hardcoded
5653 values.
5654
3fcc2083 56552009-04-01 Pavel Roskin <proski@gnu.org>
5656
5657 * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
5658 unused now.
5659 * genmk.rb: Likewise.
5660 * configure.ac: Likewise.
5661
5ec9740b 56622009-04-01 Manoel Abranches <mrabran@linux.vnet.ibm.com>
5663
5664 * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
5665 TARGET_LDFLAGS. This corrects a problem with grub-mkelfimage.
5666
5270cec8 56672009-04-01 David S. Miller <davem@davemloft.net>
5668
5669 * normal/sparc64/setjmp.S: Fix setjmp implementation.
7dd4a573 5670 * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
5270cec8 5671 (grub_setjmp): Mark with 'returns_twice' attribute.
5672 * include/grub/i386/setjmp.h (grub_setjmp): Likewise
5673 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
5674 * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
5675
9c3dd854 56762009-04-01 Robert Millan <rmh@aybabtu.com>
5677
5678 Reapply fix from 2008-07-28 which was accidentally reverted; also
5679 perform the same fix to a similar check in same function.
5680
5681 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
5682 with the same number are found, just use issue a warning with
5683 grub_dprintf(), as this error has been reported to be non-fatal.
5684
0d818b7e 56852009-03-31 Pavel Roskin <proski@gnu.org>
5686
5687 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
5688 for cross-compilation.
5689
95646d92 56902009-03-30 Robert Millan <rmh@aybabtu.com>
5691
5692 Fix i386-ieee1275 build.
5693
5694 * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
5695 Remove declaration.
5696
6a003ed1 56972009-03-30 Pavel Roskin <proski@gnu.org>
5698
5699 * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
5700 (grub_hfs_cmp_catkeys): ... this. Don't assume strings to be
5701 zero-terminated, rely only on the strlen value. Fix comparison
5702 of strings differing in length.
5703
92f33540 57042009-03-30 Robert Millan <rmh@aybabtu.com>
5705
5706 * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
5707 checking for abi version. Improve error messages on BIOS to notify
5708 user about `linux16' command.
5709
a8c48fd5 57102009-03-29 Vladimir Serbinenko <phcoder@gmail.com>
5711
f968172e 5712 Leak fixes
a8c48fd5 5713
f968172e 5714 * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
5715 in case of collision
5716 * disk/scsi.c (grub_scsi_open): free scsi in case of error
a8c48fd5 5717
9c323f09 57182009-03-29 Robert Millan <rmh@aybabtu.com>
5719
5720 * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
5721 set `vid_mode' accordingly.
5722 (grub_linux_boot): Process `vid_mode' and set video mode.
5723
ae68f423 57242009-03-29 Robert Millan <rmh@aybabtu.com>
5725
5726 * util/grub.d/10_linux.in (linux_entry): New function.
5727 Factorize generation of Linux boot entries.
5728
5709cfc4 57292009-03-29 Yoshinori K. Okuji <okuji@enbug.org>
5730
5731 Make the format of Environment Block plain text. The boot loader
5732 part is not tested well yet.
7dd4a573 5733
5709cfc4 5734 * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
5735 (buffer): Removed.
5736 (envblk): Likewise.
5737 (usage): Remove "info" and "clear". Add "unset". Update the
5738 description of "set", as this does not delete variables any
5739 longer.
5740 (create_envblk_file): Complete rewrite.
5741 (open_envblk_file): Likewise.
5742 (cmd_info): Removed.
5743 (cmd_list): Likewise.
5744 (cmd_set): Likewise.
5745 (cmd_clear): Likewise.
5746 (list_variables): New function.
5747 (write_envblk): Likewise.
5748 (set_variables): Likewise.
5749 (unset_variables): Likewise.
5750 (main): Complete rewrite.
5751
5752 * commands/loadenv.c (buffer): Removed.
5753 (envblk): Likewise.
5754 (open_envblk_file): New function.
5755 (read_envblk_file): Complete rewrite.
5756 (grub_cmd_load_env): Likewise.
5757 (grub_cmd_list_env): Likewise.
5758 (struct blocklist): New struct.
5759 (free_blocklists): New function.
5760 (check_blocklists): Likewise.
5761 (write_blocklists): Likewise.
5762 (grub_cmd_save_env): Complete rewrite.
5763
5764 * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
5765 a plain text signature.
5766 (GRUB_ENVBLK_MAXLEN): Removed.
5767 (struct grub_envblk): Complete rewrite.
5768 (grub_envblk_find): Removed.
5769 (grub_envblk_insert): Likewise.
5770 (grub_envblk_open): New prototype.
5771 (grub_envblk_set): Likewise.
5772 (grub_envblk_delete): Put const to VALUE.
5773 (grub_envblk_iterate): Put const to NAME and VALUE.
5774 (grub_envblk_close): New prototype.
5775 (grub_envblk_buffer): New inline function.
5776 (grub_envblk_size): Likewise.
5777
5778 * lib/envblk.c: Include grub/mm.h.
5779 (grub_env_find): Removed.
5780 (grub_envblk_open): New function.
5781 (grub_envblk_close): Likewise.
5782 (escaped_value_len): Likewise.
5783 (find_next_line): Likewise.
5784 (grub_envblk_insert): Removed.
5785 (grub_envblk_set): New function.
5786 (grub_envblk_delete): Complete rewrite.
5787 (grub_envblk_iterate): Likewise.
5788
a9368fd3 57892009-03-28 Robert Millan <rmh@aybabtu.com>
5790
5791 * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
5792 (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
5793 variables. Use 16-bit loader.
5794 (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
5795 loader.
5796 * kern/i386/loader.S (grub_linux_boot): Rename to ...
5797 (grub_linux16_boot): ... this. Update all users.
5798 * loader/i386/linux.c (grub_linux32_boot): Rename to ...
5799 (grub_linux_boot): ... this. Update all users.
5800
5801 * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
5802 (GRUB_MOD_INIT(linux16)): ... this. Rename `linux' and `initrd'
5803 commands to `linux16' and `initrd16'.
5804 (GRUB_MOD_FINI(linux)): Rename to ...
5805 (GRUB_MOD_FINI(linux16)): ... this.
5806
e4dd5a7e 58072009-03-24 Pavel Roskin <proski@gnu.org>
5808
5809 * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
5810 not just for compilation.
5811
c04d6e05 58122009-03-22 Vladimir Serbinenko <phcoder@gmail.com>
5813
5814 Move multiboot helper out of kernel
5815
5816 * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
5817 `loader/i386/multiboot_helper.S'.
5818 * conf/i386-coreboot.rmk: Likewise
5819 * conf/i386-ieee1275.rmk: Likewise
5820
5821 * kern/i386/loader.S: Move multiboot helpers from here...
5822 * loader/i386/multiboot_helper.S: ...moved here
5823 * include/grub/i386/loader.h: Move declarations of multiboot
5824 helpers from here...
5825 * include/grub/i386/multiboot.h: ...moved here
5826 * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
5827
42a5b3fc 58282009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
5829
5830 * kern/env.c (grub_env_context_open): Added an argument to specify
5831 whether a new context inherits exported variables from current
5832 one. This is useful when making a sandbox to interpret a config
5833 file.
5834 All callers updated.
5835
5836 * include/grub/env.h (grub_env_context_open): Updated the prototype.
5837
b28bbc4e 58382009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
5839
5840 * kern/env.c (grub_env_context_close): Fix memory leaks.
5841
f04f02e4 58422009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
5843
5844 * normal/main.c (grub_normal_execute): Added an argument
5845 BATCH to specify if an interactive interface should be provided
5846 after reading a config file.
5847 All callers updated.
5848 (read_command_list): Prevent being executed twice.
5849 (read_fs_list): Likewise.
5850
42a5b3fc 5851 * include/grub/normal.h (grub_normal_execute): Updated the
5852 prototype.
f04f02e4 5853
41473ac2 58542009-03-22 Pavel Roskin <proski@gno.org>
5855
fbc00b0c 5856 * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
5857 _start.
5858 * kern/i386/pc/startup.S: Likewise.
5859 * kern/i386/efi/startup.S: Likewise.
5860 * kern/i386/ieee1275/startup.S: Likewise.
5861 * kern/i386/coreboot/startup.S: Likewise.
5862 * kern/x86_64/efi/startup.S: Likewise.
5863
41473ac2 5864 * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
5865 * configure.ac: Don't call grub_CHECK_START_SYMBOL.
5866 * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
5867
2274cc8f 58682009-03-21 Vladimir Serbinenko <phcoder@gmail.com>
5869
5870 Bugfixes in multiboot for bugs uncovered by solaris kernel.
5871
5872 * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
5873 limit detection.
5874 Use vaddr of correct segment for entry_point.
5875
b1b797cb 58762009-03-21 Bean <bean123ch@gmail.com>
5877
5878 * commands/blocklist.c: Add include file <grub/command.h>, remove
5879 <grub/normal.h> and <grub/arg.h>.
5880 (grub_cmd_blocklist): Use the new command interface.
5881 (GRUB_MOD_INIT): Likewise.
5882 (GRUB_MOD_FINI): Likewise.
5883 * commands/boot.c: Likewise.
5884 * commands/cat.c: Likewise.
5885 * commands/cmp.c: Likewise.
5886 * commands/configfile.c: Likewise.
5887 * commands/crc.c: Likewise.
5888 * commands/echo.c: Likewise.
5889 * commands/halt.c: Likewise.
5890 * commands/handler.c: Likewise.
5891 * commands/hdparm.c: Likewise.
5892 * commands/help.c: Likewise.
5893 * commands/hexdump.c: Likewise.
5894 * commands/loadenv.c: Likewise.
5895 * commands/ls.c: Likewise.
5896 * commands/lsmmap.c: Likewise.
5897 * commands/lspci.c: Likewise.
5898 * commands/loadenv.c: Likewise.
5899 * commands/read.c: Likewise.
5900 * commands/reboot.c: Likewise.
5901 * commands/search.c: Likewise.
5902 * commands/sleep.c: Likewise.
5903 * commands/test.c: Likewise.
5904 * commands/usbtest.c: Likewise.
5905 * commands/videotest.c: Likewise.
5906 * commands/i386/cpuid.c: Likewise.
5907 * commands/i386/pc/halt.c: Likewise.
5908 * commands/i386/pc/play.c: Likewise.
5909 * commands/i386/pc/pxecmd.c: Likewise.
5910 * commands/i386/pc/vbeinfo.c: Likewise.
5911 * commands/i386/pc/vbetest.c: Likewise.
5912 * commands/ieee1275/suspend.c: Likewise.
5913 * disk/loopback.c: Likewise.
5914 * font/font_cmd.c: Likewise.
5915 * hello/hello.c: Likewise.
5916 * loader/efi/appleloader.c: Likewise.
5917 * loader/efi/chainloader.c: Likewise.
5918 * loader/i386/bsd.c: Likewise.
5919 * loader/i386/efi/linux.c: Likewise.
5920 * loader/i386/ieee1275/linux.c: Likewise.
5921 * loader/i386/linux.c: Likewise.
5922 * loader/i386/pc/chainloader.c: Likewise.
5923 * loader/i386/pc/linux.c: Likewise.
5924 * loader/powerpc/ieee1275/linux.c: Likewise.
5925 * loader/multiboot_loader.c: Likewise.
5926 * term/gfxterm.c: Likewise.
5927 * term/i386/pc/serial.c: Likewise.
5928 * term/terminfo.c: Likewise.
5929
5930 * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
5931 * term/i386/pc/vga.c: Likewise.
5932 * video/readers/jpeg.c: Likewise.
5933 * video/readers/png.c: Likewise.
5934 * video/readers/tga.c: Likewise.
5935
5936 * util/grub-fstest (cmd_loopback): Removed.
5937 (cmd_blocklist): Likewise.
5938 (cmd_ls): Likewise.
5939 (grub_register_command): Likewise.
5940 (grub_unregister_command): Likewise.
5941 (execute_command): Use grub_command_find to locate command and execute
5942 it.
5943
5944 * include/grub/efi/chainloader.h: Removed.
5945 * loader/efi/chainloader_normal.c: Likewise.
5946 * loader/i386/bsd_normal.c: Likewise.
5947 * loader/i386/pc/chainloader_normal.c: Likewise.
5948 * loader/i386/pc/multiboot_normal.c: Likewise.
5949 * loader/linux_normal.c: Likewise.
5950 * loader/multiboot_loader_normal.c: Likewise.
5951 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
5952
5953 * gencmdlist.sh: Scan new registration command grub_register_extcmd
5954 and grub_register_command_p1.
5955
5956 * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
5957 kern/command.c, lib/arg.c and commands/extcmd.c.
5958 (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
5959 (minicmd_mod_SOURCES): New variable.
5960 (minicmd_mod_CFLAGS): Likewise.
5961 (minicmd_mod_LDFLAGS): Likewise.
5962 (extcmd_mod_SOURCES): Likewise.
5963 (extcmd_mod_CFLAGS): Likewise.
5964 (extcmd_mod_LDFLAGS): Likewise.
5965 (boot_mod_SOURCES): Removed.
5966 (boot_mod_CFLAGS): Likewise.
5967 (boot_mod_LDFLAGS): Likewise.
5968
5969 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
5970 kern/corecmd.c.
5971 (kernel_img_HEADERS): Add command.h.
5972 (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
5973 commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
5974 and lib/arg.c.
5975 (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
5976 _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
5977 remove the corresponding normal mode command.
5978 (normal_mod_SOURCES): Remove normal/arg.c.
5979 * conf/i386-coreboot.rmk: Likewise.
5980 * conf/i386-efi.rmk: Likewise.
5981 * conf/i386-ieee1275.rmk: Likewise.
5982 * conf/powerpc-ieee1275.rmk: Likewise.
5983 * conf/x86_64-efi.rmk: Likewise.
5984
5985 * include/grub/arg.h: Move from here ...
5986 * include/grub/lib/arg.h: ... to here.
5987
5988 * normal/arg.c: Move from here ...
5989 * lib/arg.c: ... to here.
5990
5991 * commands/extcmd.c: New file.
5992 * commands/minicmd.c: Likewise.
5993 * include/grub/command.h: Likewise.
5994 * include/grub/extcmd.h: Likewise.
5995 * kern/command.c: Likewise.
5996 * kern/corecmd.c: Likewise.
5997
5998 * kern/list.c (grub_list_iterate): Return int instead of void.
5999 (grub_list_insert): New function.
6000 (grub_prio_list_insert): Likewise.
6001
6002 * kern/rescue.c (grub_rescue_command): Removed.
6003 (grub_rescue_command_list): Likewise.
6004 (grub_rescue_register_command): Likewise.
6005 (grub_rescue_unregister_command): Likewise.
6006 (grub_rescue_cmd_boot): Move to minicmd.c
6007 (grub_rescue_cmd_help): Likewise.
6008 (grub_rescue_cmd_info): Likewise.
6009 (grub_rescue_cmd_boot): Likewise.
6010 (grub_rescue_cmd_testload): Likewise.
6011 (grub_rescue_cmd_dump): Likewise.
6012 (grub_rescue_cmd_rmmod): Likewise.
6013 (grub_rescue_cmd_lsmod): Likewise.
6014 (grub_rescue_cmd_exit): Likewise.
6015 (grub_rescue_print_devices): Moved to corecmd.c.
6016 (grub_rescue_print_files): Likewise.
6017 (grub_rescue_cmd_ls): Likewise.
6018 (grub_rescue_cmd_insmod): Likewise.
6019 (grub_rescue_cmd_set): Likewise.
6020 (grub_rescue_cmd_unset): Likewise.
7d074e3c 6021 (attempt_normal_mode): Use grub_command_find to get normal module.
b1b797cb 6022 (grub_enter_rescue_mode): Use grub_register_core_commands to register
7d074e3c 6023 commands, remove grub_rescue_register_command calls.
b1b797cb 6024
7d074e3c 6025 * normal/command.c (grub_register_command): Removed.
b1b797cb 6026 (grub_unregister_command): Likewise.
6027 (grub_command_find): Likewise.
6028 (grub_iterate_commands): Likewise.
6029 (rescue_command): Likewise.
6030 (export_command): Moved to corecmd.c.
6031 (set_command): Removed.
6032 (unset_command): Likewise.
6033 (insmod_command): Likewise.
6034 (rmmod_command): Likewise.
6035 (lsmod_command): Likewise.
6036 (grub_command_init): Likewise.
6037
6038 * normal/completion.c (iterate_command): Use cmd->prio to check for
6039 active command.
6040 (complete_arguments): Use grub_extcmd_t structure to find options.
6041 (grub_normal_do_completion): Change function grub_iterate_commands to
6042 grub_command_iterate.
6043
6044 * normal/execute.c (grub_script_execute_cmd): No need to parse
6045 argument here.
6046
6047 * normal/main.c (grub_dyncmd_dispatcher): New function.
6048 (read_command_list): Register unload commands as dyncmd.
6049 (grub_cmd_normal): Use new command interface, register rescue,
6050 unregister normal at entry, register normal, unregister rescue at exit.
6051
6052 * include/grub/list.h (grub_list_test_t): New type.
6053 (grub_list_iterate): Return int instead of void.
6054 (grub_list_insert): New function.
6055 (GRUB_AS_NAMED_LIST_P): New macro.
6056 (GRUB_AS_PRIO_LIST): Likewise.
6057 (GRUB_AS_PRIO_LIST_P): Likewise.
6058 (GRUB_PRIO_LIST_PRIO_MASK): New constant.
6059 (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
6060 (grub_prio_list): New structure.
6061 (grub_prio_list_insert): New function.
6062 (grub_prio_list_remove): New inline function.
6063
6064 * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
6065 (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
6066 (GRUB_COMMAND_FLAG_MENU): Likewise.
6067 (GRUB_COMMAND_FLAG_BOTH): Likewise.
6068 (GRUB_COMMAND_FLAG_TITLE): Likewise.
6069 (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
6070 (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
6071 (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
6072 (grub_command): Likewise.
6073 (grub_register_command): Likewise.
6074 (grub_command_find): Likewise.
6075 (grub_iterate_commands): Likewise.
6076 (grub_command_init): Likewise.
6077 (grub_arg_parse): Likewise.
6078 (grub_arg_show_help): Likewise.
6079
6080 * include/grub/rescue.h (grub_rescue_register_command): Removed.
6081 (grub_rescue_unregister_command): Likewise.
6082
6083 * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
6084 grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
6085 grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
6086
6087 * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
6088 grub_rescue_cmd_initrd.
6089 * include/grub/i386/loader.h: Likewise.
6090 * include/grub/x86_64/loader.h: Likewise.
6091
6092 * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
6093
1f4147aa 60942009-03-21 Bean <bean123ch@gmail.com>
6095
6096 * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
6097 instead of stat in mingw environment.
6098
6099 * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
6100
6101 * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
6102
6103 * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
6104 AC_CONFIG_LINKS.
6105
2156d5ba 61062009-03-21 Bean <bean123ch@gmail.com>
6107
6108 * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
6109 out of range error.
6110
177b82ca 61112009-03-18 Michel Dänzer <michel@daenzer.net>
6112
6113 * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
6114 checking inode flags for EXT4_EXTENTS_FLAG.
6115
14aad807 61162009-03-18 Robert Millan <rmh@aybabtu.com>
6117
6118 * loader/i386/linux.c: Include `<grub/video.h>' and
6119 `<grub/i386/pc/vbe.h>'..
6120 (grub_linux_setup_video): New function. Loosely based on the EFI one.
6121 (grub_linux32_boot): Attempt to configure video settings with
6122 grub_linux_setup_video().
6123 (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
6124 to avoid grub_console_fini() which would step out of graphical mode
6125 unconditionally.
6126
8cf83a27 61272009-03-14 Robert Millan <rmh@aybabtu.com>
6128
6129 Fix build on powerpc.
6130 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
6131
40164e75 61322009-03-12 Vladimir Serbinenko <phcoder@gmail.com>
6133
6134 * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
6135 background image command.
6136
c58bc32a 61372009-03-12 Colin D Bennett <colin@gibibit.com>
6138
6139 * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
6140 (grub_gfxterm_putchar): Extract pairs of identical calls to
6141 draw_cursor out of conditional blocks.
6142
5415144a 61432009-03-11 Pavel Roskin <proski@gnu.org>
6144
6145 * fs/hfs.c (grub_hfs_strncasecmp): New function.
6146 (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
6147
6394042e 61482009-03-11 Robert Millan <rmh@aybabtu.com>
6149
6150 * loader/i386/multiboot_elfxx.c
6151 (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
6152
b7b50e5f 61532009-03-11 Felix Zielcke <fzielcke@z-51.de>
6154
6155 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
6156 `kern/handler.c'.
6157
1ca7fc96 61582009-03-11 Robert Millan <rmh@aybabtu.com>
6159
6160 * loader/i386/multiboot.c (code_size): New variable.
6161 (grub_multiboot): Define offsets by adding to `code_size' rather
7d074e3c 6162 than subtracting from `grub_multiboot_payload_size'. Provide
1ca7fc96 6163 4-byte alignment to MBI and others by increasing
7d074e3c 6164 `boot_loader_name_length' appropriately.
1ca7fc96 6165
6166 * loader/i386/multiboot_elfxx.c
6167 (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
6168
a83ea1d2 61692009-03-09 Felix Zielcke <fzielcke@z-51.de>
6170
6171 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
6172 `fs/ext2.c'.
6173
aa9f3bff 61742009-03-08 Robert Millan <rmh@aybabtu.com>
6175
6176 Make loader/i386/linux.c usable on i386-pc again.
6177
6178 * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
6179 memory to heap.
6180 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
6181 `#error' stanza.
6182
d8b3b60e 61832009-03-07 Bean <bean123ch@gmail.com>
6184
6185 * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
6186 allocation.
6187
b362c9e9 61882009-03-06 Robert Millan <rmh@aybabtu.com>
6189
6190 Fix display issue on terminals with screen size other than 80x25
6191 (e.g. gfxterm with resolution higher than 640x480).
6192
6193 * normal/main.c (grub_normal_init_page): Display title text in a
7d074e3c 6194 position relative to the center of the terminal instead of relying
b362c9e9 6195 on a hardcoded offset.
6196
9304eef1 61972009-03-04 Robert Millan <rmh@aybabtu.com>
6198
6199 Filter /etc/grub.d/10_* so that only add-ons for native kernels are
6200 installed.
6201
6202 * Makefile.in (host_kernel): New variable.
6203 * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
6204 scripts instead of just the windows one.
6205 * configure.ac: Initialize and AC_SUBST `host_kernel'.
6206
eabc95fb 62072009-03-04 Felix Zielcke <fzielcke@z-51.de>
2ba60b62 6208
6209 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
6210 `kern/handler.c'.
6211 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6212 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
6213 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
6214 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6215 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6216 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6217
ceb1223c 62182009-03-04 Felix Zielcke <fzielcke@z-51.de>
6219
6220 * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
6221 or if there's no space for the disk label and print the partition number on a
6222 invalid magic.
6223
4910684a 62242009-03-04 Felix Zielcke <fzielcke@z-51.de>
6225
6226 * util/misc.c: Include <time.h>.
6227 (grub_millisleep): New function.
6228
7e9ca17a 62292009-03-04 Bean <bean123ch@gmail.com>
6230
6231 * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
6232 another option -mno-red-zone.
6233
6234 * commands/handler.c: Change module description.
6235
6236 * kern/handler.c: Add missing space at the end of description line.
6237
6238 * kern/list.c: Likewise.
6239
f501677c 62402009-03-03 Robert Millan <rmh@aybabtu.com>
6241
6242 Move more components to the relocation area, and fix mbi pointer
6243 handling to use the destination rather than the origin (thanks to
6244 Vladimir Serbinenko for spotting).
6245
6246 * loader/i386/multiboot.c (mbi_dest): New variable.
6247 (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
6248 (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
6249 relocation area.
6250
9902d047 62512009-03-01 Bean <bean123ch@gmail.com>
6252
50fb7002 6253 * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
9902d047 6254 (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
6255 (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
6256 (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
6257
6258 * loader/i386/efi/linux.c (acpi_guid): New variable.
6259 (acpi_guid): Likewise.
6260 (EBDA_SEG_ADDR): New constant.
6261 (LOW_MEM_ADDR): Likewise.
6262 (FAKE_EBDA_SEG): Likewise.
6263 (fake_bios_data): New function.
6264 (grub_linux_boot): Call fake_bios_data.
6265
71b9f361 62662009-03-01 Bean <bean123ch@gmail.com>
6267
6268 * commands/terminal.c: Removed.
6269
6270 * commands/handler.c: New file.
6271
6272 * include/grub/list.h: Likewise.
6273
6274 * include/grub/handler.h: Likewise.
6275
6276 * kern/list.c: Likewise.
6277
6278 * kern/handler.c: Likewise.
6279
6280 * kern/term.h: Include header file <grub/handler.h>.
6281 (grub_term_input): Move next field to the beginning.
6282 (grub_term_output): Likewise.
6283 (grub_term_input_class): New variable.
6284 (grub_term_output_class): Likewise.
6285 (grub_term_register_input): Changed to inline function.
6286 (grub_term_register_output): Likewise.
6287 (grub_term_unregister_input): Likewise.
6288 (grub_term_unregister_output): Likewise.
6289 (grub_term_set_current_input): Likewise.
6290 (grub_term_set_current_output): Likewise.
6291 (grub_term_get_current_input): Likewise.
6292 (grub_term_get_current_output): Likewise.
6293 (grub_term_iterate_input): Removed.
6294 (grub_term_iterate_output): Likewise.
6295
6296 * kern/term.c (grub_term_list_input): Removed.
6297 (grub_term_list_output): Likewise.
6298 (grub_term_input_class): New variable.
6299 (grub_term_output_class): Likewise.
50fb7002 6300 (grub_cur_term_input): Change variable as macro.
71b9f361 6301 (grub_cur_term_output): Likewise.
6302 (grub_term_register_input): Removed.
6303 (grub_term_register_output): Likewise.
6304 (grub_term_unregister_input): Likewise.
6305 (grub_term_unregister_output): Likewise.
6306 (grub_term_set_current_input): Likewise.
6307 (grub_term_set_current_output): Likewise.
6308 (grub_term_iterate_input): Likewise.
6309 (grub_term_iterate_output): Likewise.
6310 (grub_term_get_current_input): Likewise.
6311 (grub_term_get_current_output): Likewise.
6312
6313 * util/grub-editenv.c: Include header file <grub/handler.h>.
6314 (grub_term_get_current_input): Removed.
6315 (grub_term_get_current_output): Likewise.
6316 (grub_term_input_class): New variable.
50fb7002 6317 (grub_term_output_class): Likewise.
71b9f361 6318
6319 * util/grub-fstest.c (grub_term_get_current_input): Removed.
6320 (grub_term_get_current_output): Likewise.
6321 (grub_term_input_class): New variable.
50fb7002 6322 (grub_term_output_class): Likewise.
71b9f361 6323
6324 * util/grub-probe.c (grub_term_get_current_input): Removed.
6325 (grub_term_get_current_output): Likewise.
6326 (grub_term_input_class): New variable.
50fb7002 6327 (grub_term_output_class): Likewise.
71b9f361 6328
6329 * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
6330 (grub_term_get_current_output): Likewise.
6331 (grub_term_input_class): New variable.
50fb7002 6332 (grub_term_output_class): Likewise.
71b9f361 6333
6334 * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
6335 (terminal_mod_SOURCES): Likewise.
6336 (terminal_mod_CFLAGS): Likewise.
6337 (terminal_mod_LDFLAGS): Likewise.
6338
6339 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
6340 handler.c.
6341 (kernel_img_SOURCES): Add list.c and handler.c.
6342 (kernel_img_HEADERS): Add list.h and handler.h.
6343
6344 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
6345 handler.c.
6346 (kernel_mod_SOURCES): Add list.c and handler.c.
6347 (kernel_mod_HEADERS): Add list.h and handler.h.
6348
6349 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
6350 handler.c.
6351 (kernel_elf_SOURCES): Add list.c and handler.c.
6352 (kernel_elf_HEADERS): Add list.h and handler.h.
6353
6354 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
6355 handler.c.
6356 (kernel_elf_SOURCES): Add list.c and handler.c.
6357 (kernel_elf_HEADERS): Add list.h and handler.h.
6358
6359 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
6360 handler.c.
6361 (kernel_mod_SOURCES): Add list.c and handler.c.
6362 (kernel_mod_HEADERS): Add list.h and handler.h.
6363
6364 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
6365 handler.c.
6366 (kernel_elf_SOURCES): Add list.c and handler.c.
6367 (kernel_elf_HEADERS): Add list.h and handler.h.
6368
8a31787f 63692009-02-27 Robert Millan <rmh@aybabtu.com>
6370
6371 Factorize elf32 / elf64 code in Multiboot loader. This will
6372 prevent it from getting out of sync again.
6373
6374 * loader/i386/multiboot.c (grub_multiboot_is_elf32,
6375 grub_multiboot_load_elf32, grub_multiboot_is_elf64,
6376 grub_multiboot_load_elf64): Move from here ...
6377 * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
6378 grub_multiboot_load_elf): ... to here (new file).
6379
51cd3dfc 63802009-02-27 Robert Millan <rmh@aybabtu.com>
6381
6382 * util/grub.d/10_linux.in: Rename "single-user mode" to
6383 "recovery mode".
6384
6e8c9c3a 63852009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
6386
6387 Don't leak in SCSI code.
6388 * disk/scsi.c (grub_scsi_close): free `scsi'.
6389
4b6bf4f9 63902009-02-27 Robert Millan <rmh@aybabtu.com>
6391
6392 * loader/i386/pc/multiboot.c: Move from here ...
6393 * loader/i386/multiboot.c: ... to here. Update all users.
6394
b9413424 63952009-02-27 Robert Millan <rmh@aybabtu.com>
6396
6397 Patch from Alexandre Bique <bique.alexandre@gmail.com>
6398 * util/i386/pc/grub-setup.c (setup): Fix directory path.
6399
50fb7002 64002009-02-27 Krzysztof Smiechowicz <deadwood@wp.pl>
34519c3f 6401
6402 * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
6403 b-tree.
6404
8cc50345 64052009-02-27 Robert Millan <rmh@aybabtu.com>
6406
6407 * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
6408 `0x' qualifier as 0 when base is specified as parameter).
6409
6e09b8b7 64102009-02-24 Bean <bean123ch@gmail.com>
6411
6412 * configure.ac: Check for -mcmodel=large in x86_64 target.
6413
6414 * include/grub/efi/api.h (efi_call_10): New macro.
6415 (efi_wrap_10): New function.
6416
6417 * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
6418 (GRUB_PE32_REL_BASED_HIGH): Likewise.
6419 (GRUB_PE32_REL_BASED_LOW): Likewise.
6420 (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
6421 (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
6422 (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
6423 (GRUB_PE32_REL_BASED_SECTION): Likewise.
6424 (GRUB_PE32_REL_BASED_REL): Likewise.
6425 (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
6426 (GRUB_PE32_REL_BASED_DIR64): Likewise.
6427 (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
6428
6429 * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
6430 issue.
6431
6432 * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
6433 (efi_wrap_10): New function.
6434
6435 * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
6436
6437 * loader/efi/appleloader.c (devpath_5): Add support for late 2008
6438 MB/MBP model (NV chipset).
6439 (devdata_devs): Add devpath_5 to the list.
6440
6441 * load/i386/efi/linux.c (video_base): Remove variable.
6442 (RGB_MASK): New macro.
6443 (RGB_MAGIC): Likewise.
6444 (LINE_MIN): Likewise.
6445 (LINE_MAX): Likewise.
6446 (FBTEST_STEP): Likewise.
6447 (FBTEST_COUNT): Likewise.
6448 (fb_list): New variable.
6449 (grub_find_video_card): Remove function.
6450 (find_framebuf): New function.
6451 (grub_linux_setup_video): Use find_framebuf to get frame buffer and
6452 line length.
6453
6454 * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
6455 problem for x86_64.
6456
74b21bee 64572009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
6458
6459 Patch #25624 by Kevin Lacquement <kevin@lacqui>.
6460
6461 * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
6462 coding tool name.
6463
a455f472 64642009-02-22 Robert Millan <rmh@aybabtu.com>
6465
6466 * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
6467 * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
6468 in our relocation, instead of using it directly from heap. Also
6469 use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
6470
6374daf3 64712009-02-21 Robert Millan <rmh@aybabtu.com>
6472
6473 Implement USB keyboard support (based on patch by Marco Gerards)
6474
6475 * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
6476 (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
6477 (usb_keyboard_mod_LDFLAGS): New variables.
6478
6479 * term/usb_keyboard.c: New file.
6480
8fa4ea70 64812009-02-14 Vladimir Serbinenko <phcoder@gmail.com>
6482
6483 Corrected wrong declaration
6484
6485 * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
6486
353976ac 64872009-02-14 Christian Franke <franke@computer.org>
6488
6489 * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
6490 (grub_lspci_iter): Print class code and programming interface byte.
6491
6aa1169b 64922009-02-14 Christian Franke <franke@computer.org>
6493
6494 * gendistlist.sh: Ignore `.svn' directories.
6495
265372ca 64962009-02-14 Felix Zielcke <fzielcke@z-51.de>
6497
6498 * fs/fat.c: Add 2009 to Copyright line.
6499
9ff516f3 65002009-02-14 Christian Franke <franke@computer.org>
6501
6502 * commands/hdparm.c: New file. Provides `hdparm' command
6503 which sends ATA commands via grub_disk_ata_pass_through ().
6504
6505 * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
6506
6507 * disk/ata.c: Include <grub/ata.h>. Move <grub/misc.h>
6508 and <grub/cpu/io.h> to include/grub/ata.h.
6509 (enum grub_ata_addressing_t): Move to include/grub/ata.h.
6510 (GRUB_CDROM_SECTOR_SIZE): Remove.
6511 (GRUB_ATA_*): Move to include/grub/ata.h.
6512 (GRUB_ATAPI_*): Likewise.
6513 (enum grub_ata_commands): Likewise.
6514 (enum grub_ata_timeout_milliseconds): Likewise.
6515 (struct grub_ata_device): Likewise.
6516 (grub_ata_regset): Likewise.
6517 (grub_ata_regget): Likewise.
6518 (grub_ata_regset2): Likewise.
6519 (grub_ata_regget2): Likewise.
6520 (grub_ata_check_ready): Likewise.
6521 (grub_ata_wait_not_busy): Remove static, exported in
6522 include/grub/ata.h.
6523 (grub_ata_wait_drq): Likewise.
6524 (grub_ata_pio_read): Likewise.
6525
6526 * disk/ata_pthru.c: New file. Provides grub_ata_pass_through ()
6527 function for hdparm.mod.
6528
6529 * include/grub/ata.h: New file, contains declarations from
6530 disk/ata.c.
6531 (enum grub_ata_commands): Add new commands for commands/hdparm.c.
6532
6533 * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
6534 (grub_disk_ata_pass_through): New exported variable.
6535
6536 * kern/disk.c (grub_disk_ata_pass_through): New variable.
6537
772e23da 65382009-02-13 Colin D Bennett <colin@gibibit.com>
6539
6540 Support multiple fallback entries, and provide an API to support
6541 executing default+fallback menu entries. Renamed the `terminal' menu
6542 viewer to `text'.
6543
6544 * include/grub/normal.h (grub_normal_text_menu_viewer): New global
6545 variable declaration.
6546 (grub_menu_execute_callback): New structure declaration.
6547 (grub_menu_execute_callback_t): New typedef.
6548 (grub_menu_execute_with_fallback): New function declaration.
6549 (grub_menu_get_entry): Likewise.
6550 (grub_menu_get_timeout): Likewise.
6551 (grub_menu_set_timeout): Likewise.
6552
6553 * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
6554
6555 * normal/menu.c (grub_wait_after_message): Moved to
6556 `normal/menu_text.c'.
6557 (draw_border): Likewise.
6558 (print_message): Likewise.
6559 (print_entry): Likewise.
6560 (print_entries): Likewise.
6561 (grub_menu_init_page): Likewise.
6562 (get_entry_number): Likewise.
6563 (print_timeout): Likewise.
6564 (run_menu): Likewise.
6565 (grub_menu_execute_entry): Likewise.
6566 (show_text_menu): Likewise.
6567 (get_and_remove_first_entry_number): New function.
6568 (grub_menu_execute_with_fallback): Likewise.
6569 (get_entry): Renamed to ...
6570 (grub_menu_get_entry): .. this and made it global.
6571 (get_timeout): Renamed to ...
6572 (grub_menu_get_timeout): ... this and made it global.
6573 (set_timeout): Renamed to ...
6574 (grub_menu_set_timeout): ... this and made it global.
6575 (grub_normal_terminal_menu_viewer): Renamed to ...
6576 (grub_normal_text_menu_viewer): ... this.
6577
6578 * normal/menu_text.c: New file. Extracted text-menu-specific code
6579 from normal/menu.c.
6580
6581 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
6582 (normal_mod_SOURCES): Likewise.
6583
6584 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6585 (normal_mod_SOURCES): Likewise.
6586
6587 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6588 (normal_mod_SOURCES): Likewise.
6589
6590 * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
6591 (normal_mod_SOURCES): Likewise.
6592
6593 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6594 (normal_mod_SOURCES): Likewise.
6595
6596 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6597 (normal_mod_SOURCES): Likewise.
6598
6599 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
6600 (normal_mod_SOURCES): Likewise.
6601
16ac430e 66022009-02-11 Robert Millan <rmh@aybabtu.com>
6603
6604 * util/grub.d/00_header.in: Update old reference to `font' command.
6605
06ff20fc 66062009-02-10 Felix Zielcke <fzielcke@z-51.de>
6607
6608 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
6609
6610 Based on patch from Javier Martín.
6611
96da9407 66122009-02-09 Felix Zielcke <fzielcke@z-51.de>
6613
6614 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
50fb7002 6615 to avoid false positives with FAT.
96da9407 6616 (grub_fstest_SOURCES): Likewise.
6617 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
6618 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
6619 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6620 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
6621 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6622 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6623
6dca6fe4 66242009-02-09 Felix Zielcke <fzielcke@z-51.de>
6625
06ff20fc 6626 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
6dca6fe4 6627 bpb.version_specific.fat12_or_fat16.fstype and
6628 bpb.version_specific.fat32.fstype.
6629
2550c62f 66302009-02-08 Robert Millan <rmh@aybabtu.com>
6631
be110b30 6632 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
2550c62f 6633
56978920 66342009-02-08 Robert Millan <rmh@aybabtu.com>
6635
6636 * Makefile.in (host_os, host_cpu): New variables.
6637 (target_os): Remove. Update all users.
6638
d64399b5 66392009-02-08 Marco Gerards <marco@gnu.org>
6640
6641 * Makefile.in (enable_grub_emu_usb): New variable.
6642 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
6643 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
6644 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
6645 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
6646 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
6647 `usbtest.mod' and `usbms.mod'.
6648 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
6649 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
6650 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
6651 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
6652 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
6653 variables.
6654
6655 * disk/usbms.c: New file.
6656
6657 * include/grub/usb.h: Likewise.
6658
6659 * include/grub/usbtrans.h: Likewise.
6660
6661 * include/grub/usbdesc.h: Likewise.
6662
6663 * bus/usb/usbtrans.c: Likewise.
6664
6665 * bus/usb/ohci.c: Likewise.
6666
6667 * bus/usb/uhci.c: Likewise.
6668
6669 * bus/usb/usbhub.c: Likewise.
6670
6671 * bus/usb/usb.c: Likewise.
6672
6673 * commands/usbtest.c: Likewise.
6674
6675 * util/usb.c: Likewise.
50fb7002 6676
d64399b5 6677 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
6678
6679 * configure.ac: Test for libusb presence.
50fb7002 6680
d64399b5 6681 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
6682
2b40d6bb 66832009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
6684
6685 * kern/mm.c: Add more comments.
6686
73a4ce81 66872009-02-08 Robert Millan <rmh@aybabtu.com>
6688
6689 Patch from Javier Martín.
6690 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
6691 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
6692
f821ce59 66932009-02-08 Robert Millan <rmh@aybabtu.com>
6694
6695 * fs/cpio.c: Split tar functionality to ...
6696 * fs/tar.c: ... here (new file). Update all users.
6697
aebfc4b0 66982009-02-07 Robert Millan <rmh@aybabtu.com>
6699
6700 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
6701 backward-incompatible features.
6702
6703 Based on patch from Javier Martín, with some adjustments.
6704
50fb7002 67052009-02-07 Michael Scherer <misc@mandriva.org>
cea15bca 6706
6707 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
6708
0bb5115e 67092009-02-07 Robert Millan <rmh@aybabtu.com>
6710
6711 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
6712 position of `disk/lvm.c' to ensure grub_init_all() always picks it
6713 after the RAID stuff.
6714
38a0f8e7 67152009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
6716
50fb7002 6717 Fixes problem when running vbetest command as reported by
38a0f8e7 6718 Vladimir Serbinenko <phcoder@gmail.com>.
6719
6720 * (grub_vbe_set_video_mode): Fixed problem with text modes.
6721
3143cc1c 67222009-02-04 Felix Zielcke <fzielcke@z-51.de>
6723
6724 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
6725 /dev/md/NpN style mdraid devices.
6726
9cba6fce 67272009-02-03 Felix Zielcke <fzielcke@z-51.de>
6728
6729 * util/unifont2pff.rb: Remove.
6730
e507a2c1 67312009-02-03 Felix Zielcke <fzielcke@z-51.de>
6732
6733 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
6734 `#'.
6735
d2c2b4cd 67362009-02-03 Felix Zielcke <fzielcke@z-51.de>
6737
6738 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
6739 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6740 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
6741 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
6742 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6743 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6744 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6745
b4315fb0 67462009-02-02 Christian Franke <franke@computer.org>
6747
6748 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
6749
de3aa260 67502009-02-01 Felix Zielcke <fzielcke@z-51.de>
6751
7c3ff286 6752 * INSTALL: Note that we now require at least autoconf 2.59 and
6753 that LZO is optional.
de3aa260 6754
825a182b 67552009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
6756
6757 Base on patch on bug #24154 created by Tomas Tintera
6758 <trosos@seznam.cz>.
6759
6760 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
6761
a69ef770 67622009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
6763
7c3ff286 6764 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
a69ef770 6765 <bero@arklinux.org>.
6766
6767 * normal/parser.y (script_init): Add missing semicolon.
6768
6fa42fa6 67692009-01-31 Colin D Bennett <colin@gibibit.com>
6770
7c3ff286 6771 * normal/main.c: Add include to grub/menu_viewer.h.
6fa42fa6 6772 (free_menu_entry_classes): Added.
6773 (grub_normal_menu_addentry): Added class property handling.
6774 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
6775 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
6776
6777 * normal/menu_viewer.c: New file.
6778
6779 * normal/menu.c (run_menu_entry): Renamed to ...
6780 (grub_menu_execute_entry): ... this and made it as global.
6781 (grub_menu_run): Renamed to ...
6782 (show_text_menu): ... this and made it local.
6783 (show_text_menu): Adapt to new function names.
6784 (grub_normal_terminal_menu_viewer): New global variable.
6785
6786 * include/grub/menu.h: New file.
6787
6788 * include/grub/menu_viewer.h: New file.
6789
6790 * include/grub/normal.h: Added include to grub/menu.h.
6791 (grub_menu_entry): Moved to include/grub/menu.h.
6792 (grub_menu_entry_t): Likewise.
6793 (grub_menu): Likewise.
6794 (grub_menu_t): Likewise.
6795 (grub_normal_terminal_menu_viewer): Added.
6796 (grub_menu_execute_entry): Likewise.
6797 (grub_menu_run): Removed.
6798
6799 * DISTLIST: Added include/grub/menu.h.
6800 Added include/grub/menu_viewer.h.
6801 Added normal/menu_viewer.c.
6802
68032009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
6804
6805 * normal/execute.c (grub_script_execute_menuentry): Changed to use
6806 arglist for menutitle arguments.
6807
6808 * normal/main.c (grub_normal_menu_addentry): Likewise.
6809
6810 * normal/parser.y (menuentry): Likewise.
6811
6812 * normal/script.c (grub_script_create_cmdmenu): Likewise.
6813
6814 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
6815 (grub_script_create_cmdmenu): Likewise.
6816
6817 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
6818
6819 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
6820 changes.
6821
6822 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
6823
6824 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
6825
6826 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
6827
6828 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
6829
6830 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
6831
6832 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
6833
56192c23 68342009-01-30 Christian Franke <franke@computer.org>
6835
6836 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
6837 in option help text.
6838
d72521b3 68392009-01-27 Pavel Roskin <proski@gnu.org>
6840
6841 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
6842
994b5e84 68432009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
6844
6845 * commands/lsmmap.c: Add include to grub/machine/memory.h.
6846
6847 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
6848
6849 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
6850 unregister function.
6851
6a7eab2c 68522009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
6853
6854 * disk/scsi.c (grub_scsi_read): Fix sign problem.
6855
6856 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
6857
6858 * util/grub-mkfont.c (usage): Fix typo.
6859
6860 * util/elf/grub-mkimage.c (load_modules): Fix warning.
6861
1806b56e 68622009-01-26 Daniel Mierswa <impulze@impulze.org>
6863
3fb18f09 6864 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
6865
336e1fb9 6866 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
6867
1806b56e 6868 * kern/misc.c (grub_strcasecmp): New function.
6869 (grub_strcasecmp): Use grub_size_t instead of int for length.
6870 Fix return value.
6871 * include/grub/misc.h: Update function prototypes.
6872
580b2a0f 68732009-01-26 Robert Millan <rmh@aybabtu.com>
6874
6875 * configure.ac: Fix cross-compilation check.
ef257b36 6876
d31c24f1 68772009-01-22 Christian Franke <franke@computer.org>
6878
6879 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
6880 (precision) digit string. Allow `.format2' without `format1' (width).
6881 Limit input chars for `%s' output to `format2' if specified. This is
6882 compatible with standard printf ().
6883
3138b44c 68842009-01-22 Christian Franke <franke@computer.org>
6885
6886 * disk/ata.c (grub_ata_wait_status): Replace by ...
6887 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
6888 other status bits may be invalid while BSY is asserted.
6889 (grub_ata_check_ready): New function.
6890 (grub_ata_cmd): Removed.
6891 (grub_ata_wait_drq): New function.
6892 (grub_ata_strncpy): Remove inline.
6893 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
6894 and error check now done by grub_ata_wait_drq ().
6895 (grub_ata_pio_write): Likewise.
6896 (grub_atapi_identify): Set DEV before check for !BSY. Use
6897 grub_ata_wait_drq () to wait for data.
6898 (grub_ata_device_initialize): Add status register check to
6899 detect missing SATA slave devices. Add debug messages.
6900 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
6901 (grub_atapi_packet): Set DEV before check for !BSY. Replace
6902 transfer loop by grub_ata_pio_write ().
6903 (grub_ata_identify): Set DEV before check for !BSY. Use
6904 grub_ata_wait_drq () to wait for data.
ef257b36 6905 (grub_ata_setaddress): Set DEV before check for !BSY.
3138b44c 6906 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
6907 read/write in one loop. Fix invalid command on write. Fix incomplete
6908 command on (size % batch) == 0. Add missing error check after write of
6909 last block. Add debug messages.
6910 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
6911
59a64ef6 69122009-01-19 Christian Franke <franke@computer.org>
6913
6914 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
6915 (GRUB_ATAPI_IREASON_*): Likewise.
6916 (grub_ata_pio_write): Fix timeout error return.
6917 (grub_atapi_identify): Add grub_ata_wait () after cmd.
6918 (grub_atapi_wait_drq): New function.
6919 (grub_atapi_packet): New parameter `size'.
6920 Use grub_atapi_wait_drq () and direct write instead of
6921 grub_ata_pio_write ().
6922 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
6923 reads the number of bytes requested by the device for each DRQ
6924 assertion.
6925 (grub_atapi_write): Remove old implementation, return not
6926 implemented instead.
6927
1cfe20b3 69282009-01-19 Christian Franke <franke@computer.org>
6929
6930 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
6931 of 512 to calculate data size.
6932 (grub_scsi_read12): Likewise.
6933 (grub_scsi_write10): Likewise.
6934 (grub_scsi_write12): Likewise.
6935 (grub_scsi_read): Adjust size according to blocksize.
6936 Add checks for invalid blocksize and unaligned transfer.
6937
bee5fe5d 69382009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
6939
6940 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
6941
ef257b36 6942 * term/gfxterm.c (write_char): Fix background rendering for wide
bee5fe5d 6943 width glyphs.
6944
3e643f8c 69452009-01-19 Robert Millan <rmh@aybabtu.com>
6946
6947 * config.guess: Update to latest version from config git.
6948 * config.sub: Likewise.
6949
4fa80998 69502009-01-17 Felix Zielcke <fzielcke@z-51.de>
6951
6952 * Makefile.in: Change font compilation to use new grub-mkfont instead
6953 of java version.
6954
6955 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
6956 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
6957 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
6958 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
6959 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
6960 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
6961 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
6962 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
6963 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
6964
7086085b 69652009-01-16 Christian Franke <franke@computer.org>
6966
6967 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
6968 (enum grub_ata_timeout_milliseconds): New enum.
6969 (grub_ata_wait_status): Add parameter milliseconds.
6970 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
6971 recovery from timed-out commands.
6972 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
6973 return grub_errno instead of REG_ERROR.
6974 (grub_ata_pio_write): Add parameter milliseconds.
6975 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
6976 Pass milliseconds to grub_ata_wait_status () and
6977 grub_ata_pio_read ().
6978 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
6979 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
6980 grub_ata_wait_status (). Fix IDENTIFY timeout check.
6981 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
6982 It is not suitable for device detection, because DEV bit is ignored,
6983 the command may run too long, and not all devices set the signature
6984 properly.
6985 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
6986 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
6987 Fix device selection, DEV bit must be set first to address the registers
6988 of the correct device.
6989 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
6990 grub_ata_pio_read/write ().
6991 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
6992 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
6993
4a412913 69942009-01-13 Carles Pina i Estany <carles@pina.cat>
6995
6996 * util/grub-editenv.c (main): Use fseeko(), not fseek().
6997
7795c55e 69982009-01-13 Bean <bean123ch@gmail.com>
d913988c 6999
7000 * util/grub-mkfont.c (write_font): forget to remove some debug code.
7001
7795c55e 70022009-01-13 Bean <bean123ch@gmail.com>
e52db1f7 7003
7004 * Makefile.in: (enable_grub_mkfont): New variable.
7005 (freetype_cflags): Likewise.
7006 (freetype_libs): Likewise.
7007
7008 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
7009 (grub_mkfont_SOURCES): New variable.
7010 (grub_mkfont_CFLAGS): Likewise.
7011 (grub_mkfont_LDFLAGS): Likewise.
7012
7013 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
7014 library if `--enable-grub-mkfont' is requested.
7015 (enable_grub_mkfont): New variable.
7016 (freetype_cflags): Likewise.
7017 (freetype_libs): Likewise.
7018
7019 * util/grub-mkfont.c: New file.
7020
093af1fe 70212009-01-12 Christian Franke <franke@computer.org>
7022
7023 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
7024 mode check. Fix setting of compat_use[].
7025
f36cc108 70262009-01-10 Robert Millan <rmh@aybabtu.com>
7027
7028 Update a few copyright years which we forgot to do in 2008 (only for
7029 files whose changes made in 2008 were copyright-significant)
7030
7031 * Makefile.in: Add 2008 to Copyright line.
7032 * disk/ieee1275/ofdisk.c: Likewise.
7033 * disk/efi/efidisk.c: Likewise.
7034 * kern/dl.c: Likewise.
7035 * kern/sparc64/ieee1275/init.c: Likewise.
7036 * kern/mm.c: Likewise.
7037 * kern/efi/mm.c: Likewise.
7038 * boot/i386/pc/boot.S: Likewise.
7039 * genfslist.sh: Likewise.
7040 * fs/iso9660.c: Likewise.
7041 * fs/hfs.c: Likewise.
7042 * fs/jfs.c: Likewise.
7043 * fs/minix.c: Likewise.
7044 * fs/ufs.c: Likewise.
7045 * gensymlist.sh.in: Likewise.
7046 * genkernsyms.sh.in: Likewise.
7047 * include/grub/misc.h: Likewise.
7048 * include/grub/types.h: Likewise.
7049 * include/grub/symbol.h: Likewise.
7050 * include/grub/elf.h: Likewise.
7051 * include/grub/kernel.h: Likewise.
7052 * include/grub/disk.h: Likewise.
7053 * include/grub/dl.h: Likewise.
7054 * include/grub/i386/linux.h: Likewise.
7055 * include/grub/i386/pc/biosdisk.h: Likewise.
7056 * include/grub/efi/api.h: Likewise.
7057 * include/grub/efi/pe32.h: Likewise.
7058 * include/grub/util/misc.h: Likewise.
7059 * normal/execute.c: Likewise.
7060 * normal/arg.c: Likewise.
7061 * normal/completion.c: Likewise.
7062 * normal/lexer.c: Likewise.
7063 * normal/parser.y: Likewise.
7064 * normal/misc.c: Likewise.
7065 * commands/i386/pc/vbeinfo.c: Likewise.
7066 * commands/hexdump.c: Likewise.
7067 * commands/terminal.c: Likewise.
7068 * commands/ls.c: Likewise.
7069 * commands/help.c: Likewise.
7070 * partmap/pc.c: Likewise.
7071 * loader/efi/chainloader.c: Likewise.
7072 * loader/multiboot_loader.c: Likewise.
7073 * loader/i386/pc/multiboot2.c: Likewise.
7074 * term/efi/console.c: Likewise.
7075 * term/i386/pc/serial.c: Likewise.
7076 * util/lvm.c: Likewise.
7077 * util/console.c: Likewise.
7078 * util/i386/efi/grub-mkimage.c: Likewise.
7079 * util/raid.c: Likewise.
7080
7f02114b 70812009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
7082
7083 * commands/videotest.c: Removed include to grub/machine/memory.h.
7084
7085 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
7086 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
7087 (video_mod_SOURCES): Removed.
7088 (video_mod_CFLAGS): Likewise.
7089 (video_mod_LDFLAGS): Likewise.
7090 (gfxterm_mod_SOURCES): Likewise.
7091 (gfxterm_mod_CFLAGS): Likewise.
7092 (gfxterm_mod_LDFLAGS): Likewise.
7093 (videotest_mod_SOURCES): Likewise.
7094 (videotest_mod_CFLAGS): Likewise.
7095 (videotest_mod_LDFLAGS): Likewise.
7096 (bitmap_mod_SOURCES): Likewise.
7097 (bitmap_mod_CFLAGS): Likewise.
7098 (bitmap_mod_LDFLAGS): Likewise.
7099 (tga_mod_SOURCES): Likewise.
7100 (tga_mod_CFLAGS): Likewise.
7101 (tga_mod_LDFLAGS): Likewise.
7102 (jpeg_mod_SOURCES): Likewise.
7103 (jpeg_mod_CFLAGS): Likewise.
7104 (jpeg_mod_LDFLAGS): Likewise.
7105 (png_mod_SOURCES): Likewise.
7106 (png_mod_CFLAGS): Likewise.
7107 (png_mod_LDFLAGS): Likewise.
7108
7109 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
7110 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
7111 (video_mod_SOURCES): Added.
7112 (video_mod_CFLAGS): Likewise.
7113 (video_mod_LDFLAGS): Likewise.
7114 (videotest_mod_SOURCES): Likewise.
7115 (videotest_mod_CFLAGS): Likewise.
7116 (videotest_mod_LDFLAGS): Likewise.
7117 (bitmap_mod_SOURCES): Likewise.
7118 (bitmap_mod_CFLAGS): Likewise.
7119 (bitmap_mod_LDFLAGS): Likewise.
7120 (tga_mod_SOURCES): Likewise.
7121 (tga_mod_CFLAGS): Likewise.
7122 (tga_mod_LDFLAGS): Likewise.
7123 (jpeg_mod_SOURCES): Likewise.
7124 (jpeg_mod_CFLAGS): Likewise.
7125 (jpeg_mod_LDFLAGS): Likewise.
7126 (png_mod_SOURCES): Likewise.
7127 (png_mod_CFLAGS): Likewise.
7128 (png_mod_LDFLAGS): Likewise.
7129 (gfxterm_mod_SOURCES): Likewise.
7130 (gfxterm_mod_CFLAGS): Likewise.
7795c55e 7131 (gfxterm_mod_LDFLAGS): Likewise.
7f02114b 7132
7133 * term/gfxterm.c: Removed include to grub/machine/memory.h,
7134 grub/machine/console.h.
7135
644fff97 71362009-01-04 Jerone Young <jerone@gmail.com>
7137
7138 Make on screen instructions clearer
7139
7140 Based on patch created by Jidanni <jidanni@jidanni.org>
7141
7142 * normal/menu.c: print clearer instructions on the screen
7143
1e901a75 71442009-01-02 Colin D Bennett <colin@gibibit.com>
7145
7146 New font engine.
34c44600 7147
1e901a75 7148 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
7149 build system and fixed gfxterm.c to work with different sized fonts.
7150
7151 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
34c44600 7152
1e901a75 7153 * configure: Re-generated.
34c44600 7154
1e901a75 7155 * DISTLIST: Removed font/manager.c.
7156 Added font/font.c.
7157 Added font/font_cmd.c.
34c44600 7158
1e901a75 7159 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
7160 compilation.
34c44600 7161
1e901a75 7162 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
34c44600 7163
7164 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
1e901a75 7165
7166 * kern/term.c: Changed users of grub_utf8_to_ucs4.
34c44600 7167
1e901a75 7168 * normal/menu.c: Likewise.
34c44600 7169
1e901a75 7170 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
7171 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
34c44600 7172
1e901a75 7173 * include/grub/font.h: Replaced with new file.
34c44600 7174
1e901a75 7175 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
7176 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
7177 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
7178 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
7179 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
34c44600 7180 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
1e901a75 7181 fg_red, fg_green, fg_blue, fg_alpha.
7182 (grub_video_adapter): Removed blit_glyph.
34c44600 7183 (grub_video_blit_glyph): Removed.
7184
1e901a75 7185 * font/manager.c: Removed file.
34c44600 7186
7187 * font/font.c: New file.
7188
1e901a75 7189 * font/font_cmd.c: Likewise.
34c44600 7190
1e901a75 7191 * video/video.c (grub_video_blit_glyph): Removed.
34c44600 7192
1e901a75 7193 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
7194 (grub_video_vbe_map_rgba): Likewise.
7195 (grub_video_vbe_unmap_color_int): Likewise.
7196 (grub_video_vbe_blit_glyph): Removed.
7197 (grub_video_vbe_adapter): Removed blit_glyph.
34c44600 7198
1e901a75 7199 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
7200 (get_pixel): Likewise.
34c44600 7201 (set_pixel): Likewise.
7202
1e901a75 7203 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
34c44600 7204
1e901a75 7205 * term/gfxterm.c: Adapted to new font engine.
34c44600 7206
1e901a75 7207 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
34c44600 7208
1e901a75 7209 * term/i386/pc/vga.c: Likewise.
34c44600 7210
1e901a75 7211 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
34c44600 7212
1e901a75 7213 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
34c44600 7214
1e901a75 7215 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 7216
1e901a75 7217 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 7218
1e901a75 7219 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
34c44600 7220
1e901a75 7221 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
34c44600 7222
1e901a75 7223 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
34c44600 7224
1e901a75 7225 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
34c44600 7226
1e901a75 7227 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
7228
7229 * util/grub.d/00_header.in: Changed to use new loadfont command.
34c44600 7230
1e901a75 7231 * util/grub-mkconfig_lib.in: Changed font extension.
7232
278922e8 72332008-12-28 Felix Zielcke <fzielcke@z-51.de>
7234
7235 * util/getroot.c (grub_util_get_grub_dev): Add support for
7236 /dev/md/dNNpNN style partitionable mdraid devices.
7237
3ced05cf 72382008-12-12 Alex Smith <alex@alex-smith.me.uk>
7239
7240 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
7241 at a time limit of the PXE TFTP API correctly.
7242 (grub_pxefs_close): Likewise.
7243
7fd0ee30 72442008-11-29 Robert Millan <rmh@aybabtu.com>
7245
34c44600 7246 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
7fd0ee30 7247 grub_ata_device_initialize() calls.
7248
34c44600 72492008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
0c5e79ab 7250
7251 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
7252 iteration failed.
7253 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
7254
89313780 72552008-11-28 Robert Millan <rmh@aybabtu.com>
7256
7257 Fix build on powerpc-ieee1275. Based on patch created by
7258 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
7259 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
7260 `kern/ieee1275/mmap.c'.
7261 * include/grub/powerpc/ieee1275/memory.h: New file.
7262
15257703 7263 Provide grub-install on coreboot.
7264 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
7265 (grub_install_SOURCES): New variable.
7266 * util/i386/pc/grub-install.in: Add a few condition checks to make it
7267 usable on coreboot.
7268
9fc5388a 72692008-11-25 Felix Zielcke <fzielcke@z-51.de>
7270
7271 * util/grub-fstest.c (grub_term_get_current_input): Change return type
7272 to `grub_term_input_t'.
7273 (grub_term_get_current_output): Change return type to
7274 `grub_term_output_t'.
7275
bc3a2f31 72762008-11-22 Robert Millan <rmh@aybabtu.com>
7277
34c44600 7278 Fix breakage on coreboot due to declaration mismatch.
bc3a2f31 7279 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
7280 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
7281 grub_vga_text_cls().
7282
80fc88f2 7283 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
34c44600 7284 comments. Avoid copying one more byte than necessary (just in case).
80fc88f2 7285
cbf36fd3 7286 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
7287 to 0x200000 (avoids trouble with some OFW implementations, and matches
7288 with the one in Yaboot).
7289 Reported by Manoel Abranches
7290
73e8e268 72912008-11-20 Robert Millan <rmh@aybabtu.com>
3cf6ac19 7292
7293 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
7294 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
7295
73e8e268 7296 * util/grub-mkconfig_lib.in (grub_warn): New function.
7297 (convert_system_path_to_grub_path): Use grub_warn() when issuing
7298 warnings, to obtain consistent formatting.
7299 * util/grub.d/00_header.in: Likewise.
7300 * util/update-grub_lib.in: Likewise.
7301
e94045a1 7302 * loader/i386/linux.c (allocate_pages): Fix a warning.
40f9faa4 7303 Move comment text to `#error' stanza.
e94045a1 7304
79d29fd7 7305 Harmonize ieee1275's grub_available_iterate() with the generic
7306 grub_machine_mmap_iterate() interface (fixes a recently-introduced
7307 build problem on i386-ieee1275):
7308 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
7309 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
7310 parameter `type'. Update all users of this function.
7311 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
7312 `kern/ieee1275/mmap.c'.
7313 * kern/ieee1275/init.c
7314 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
7315 with ...
7316 (grub_machine_mmap_iterate): ... this.
7317 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
7318 return type to `grub_err_t'. Update all implementations of this
7319 function prototype.
7320 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
7321 Likewise.
7322
60d6b16e 7323 Add `lsmmap' command (lists firmware-provided memory map):
7324 * commands/lsmmap.c: New file.
7325 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
7326 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
7327 variables.
7328 * conf/powerpc-ieee1275.rmk: Likewise.
7329 * conf/i386-coreboot.rmk: Likewise.
7330 * conf/i386-ieee1275.rmk: Likewise.
7331
ebaaf49b 73322008-11-19 Robert Millan <rmh@aybabtu.com>
7333
7334 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
92907110 7335 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
7336 constraints to initrd allocation (based on code from
7337 loader/i386/pc/linux.c). Without them, initrd was allocated too high
7338 for Linux to find it.
ebaaf49b 7339
dfab719f 73402008-11-14 Robert Millan <rmh@aybabtu.com>
7341
7342 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
7343 order to cope with duplicate slashes.
7344
10fc3eb9 73452008-11-14 Robert Millan <rmh@aybabtu.com>
7346
7347 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
7348 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
7349 don't want to mess with lower memory, because it is used in the Linux
7350 loader.
7351
7352 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
34c44600 7353 an appropriate place in lower memory, between 0x10000 and 0x90000,
10fc3eb9 7354 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
7355 is in our heap (probably as a result of it being corrupted during
2f2a3442 7356 decompression). Add #error instance with comment to explain why this
7357 loader isn't currently usable on PC/BIOS.
10fc3eb9 7358
e2e07847 73592008-11-14 Robert Millan <rmh@aybabtu.com>
7360
7361 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
34c44600 7362 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
e2e07847 7363
fe8e8d69 73642008-11-12 Robert Millan <rmh@aybabtu.com>
7365
7366 Make loader/i386/linux.c buildable on i386-pc (although disabled).
7367
7368 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
7369 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
7370 from here ...
7371 * include/grub/i386/pc/memory.h: ... to here.
7372
976b07d0 73732008-11-12 Robert Millan <rmh@aybabtu.com>
7374
7375 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
7376 split).
7377
7378 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
7379 (grub_console_cur_color, grub_console_real_putchar)
7380 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
7381 (grub_console_setcolorstate, grub_console_setcolor)
7382 (grub_console_getcolor): Move from here ...
7383 * include/grub/i386/vga_common.h: ... to here (new file).
7384
7385 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
7386 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
7387 `<grub/i386/io.h>'.
7388 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
7389 `<grub/i386/vga_common.h>'.
7390
76679cd3 73912008-11-12 Robert Millan <rmh@aybabtu.com>
7392
7393 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
7394 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
7395 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
7396 variables.
7397 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
7398 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
7399
7400 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
7401 grub_console_init() with call to grub_vga_text_init().
7402 (grub_machine_fini): Replace call to
7403 grub_console_fini() with call to grub_vga_text_fini() and
7404 grub_at_keyboard_fini().
7405
7406 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
7407 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
7408 (grub_console_setcolorstate, grub_console_setcolor)
7409 (grub_console_getcolor): New function prototypes.
7410
7411 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
7412 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
7413 (grub_vga_text_setcursor): Static-ize.
7414 (grub_vga_text_term): New structure.
7415 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
7416
7417 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
7418 (grub_console_cur_color, grub_console_standard_color)
7419 (grub_console_normal_color, grub_console_highlight_color)
7420 (map_char, grub_console_putchar, grub_console_getcharwidth)
7421 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
7422 (grub_console_getcolor): Move from here ...
7423 * term/i386/vga_common.c: ... to here (same function names).
7424
95b841d3 74252008-11-12 Robert Millan <rmh@aybabtu.com>
7426
7427 Use newly-added Multiboot support in coreboot.
7428
7429 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
7430 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
7431
7432 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
7433 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
7434 (codestart): Store the MBI in `startup_multiboot_info' when we're
7435 being loaded using Multiboot.
7436
7437 * kern/i386/coreboot/init.c (grub_machine_init): Move
7438 grub_at_keyboard_init() call to beginning of function (useful for
7439 debugging). Call grub_machine_mmap_init() before attempting to use
7440 grub_machine_mmap_iterate().
7441 (grub_lower_mem, grub_upper_mem): Move from here ...
7442 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
7443 here (new file).
7444
7445 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
7446 function prototype.
7447
761ca975 74482008-11-12 Robert Millan <rmh@aybabtu.com>
7449
7450 Fix a regression introduced by the at_keyboard.mod split. Because
7451 some terminals are default on some platforms and non-default on
7452 others, the first terminal being registered determines which is
7453 going to be default.
7454
7455 * kern/term.c (grub_term_register_input): If this is the first
7456 terminal being registered, set it as the current one.
7457 (grub_term_register_output): Likewise.
7458
7459 * term/efi/console.c (grub_console_init): Do not call
7460 grub_term_set_current_output() or grub_term_set_current_input().
7461 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
7462 * term/i386/pc/console.c (grub_console_init): Likewise.
7463 (grub_console_fini): Do not call grub_term_set_current_input()
7464 (but leave grub_term_set_current_output() to restore text mode).
7465
6c529df7 74662008-11-10 Robert Millan <rmh@aybabtu.com>
7467
7468 * util/grub.d/00_header.in: Add backward compatibility check for
7469 versions of terminal.mod that don't understand `terminal_input' or
7470 `terminal_output'.
7471
132e4113 74722008-11-09 Robert Millan <rmh@aybabtu.com>
7473
7474 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
7475 `terminal_input' / `terminal_output', not `terminal'.
7476
ac293d50 74772008-11-08 Robert Millan <rmh@aybabtu.com>
7478
7479 * Makefile.in (include_DATA): Fix srcdir=. assumption.
2a9c5940 7480 (DISTCLEANFILES): Add `build_env.mk'.
ac293d50 7481
0025933a 74822008-11-08 Robert Millan <rmh@aybabtu.com>
7483
7484 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
dba3f844 7485 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
0025933a 7486 members. Update all users.
7487 * util/console.c (grub_ncurses_term): Split in ...
7488 (grub_ncurses_term_input): ... this, and ...
7489 (grub_ncurses_term_output): ... this. Update all users.
dcb6fa0a 7490 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
0025933a 7491
37c86336 74922008-11-08 Robert Millan <rmh@aybabtu.com>
7493
7494 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
7495 (PKGDATA): Add $(pkgdata_SRCDIR).
7496 (pkglib_BUILDDIR): New variable.
7497 (pkgdata_SRCDIR): New variable.
7498 (build_env.mk): New target.
7499 (include_DATA): New variable.
7500 (install-local): Install $(include_DATA) files in $(includedir).
7501
b6c15a2d 75022008-11-07 Pavel Roskin <proski@gnu.org>
7503
d99d46f1 7504 * gendistlist.sh: Use C locale for sorting to ensure consistent
7505 output on all systems.
7506
b6c15a2d 7507 * util/grub.d/00_header.in: Remove incorrect space before
7508 "serial".
7509
c32ee8c9 75102008-11-07 Robert Millan <rmh@aybabtu.com>
7511
7512 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
7513 per specification.
7514 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
7515 * loader/multiboot_loader.c (find_multi_boot2_header): New function
7516 (based on find_multi_boot1_header).
7517 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
7518 using find_multi_boot2_header(), and abort if neither Multiboot or
7519 Multiboot headers were found.
7520
651c29b7 75212008-11-07 Robert Millan <rmh@aybabtu.com>
7522
7523 Modularize at_keyboard.mod:
7524
7525 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
7526 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
7527 (at_keyboard_mod_LDFLAGS): New variables.
7528
7529 Actual terminal split:
7530
7531 * include/grub/term.h (struct grub_term): Split in ...
7532 (struct grub_term_input): ... this, and ...
7533 (struct grub_term_output): ... this. Update all users.
7534 (grub_term_set_current): Split in ...
7535 (grub_term_set_current_input): ... this, and ...
7536 (grub_term_set_current_output): ... this.
7537 (grub_term_get_current): Split in ...
7538 (grub_term_get_current_input): ... this, and ...
7539 (grub_term_get_current_output): ... this.
7540 (grub_term_register): Split in ...
7541 (grub_term_register_input): ... this, and ...
7542 (grub_term_register_output): ... this.
7543 (grub_term_unregister): Split in ...
7544 (grub_term_unregister_input): ... this, and ...
7545 (grub_term_unregister_output): ... this.
7546 (grub_term_iterate): Split in ...
7547 (grub_term_iterate_input): ... this, and ...
7548 (grub_term_iterate_output): ... this.
7549
7550 * kern/term.c (grub_term_list): Split in ...
7551 (grub_term_list_input): ... this, and ...
7552 (grub_term_list_output): ... this. Update all users.
7553 (grub_cur_term): Split in ...
7554 (grub_cur_term_input): ... this, and ...
7555 (grub_cur_term_output): ... this. Update all users.
7556 (grub_term_set_current): Split in ...
7557 (grub_term_set_current_input): ... this, and ...
7558 (grub_term_set_current_output): ... this.
7559 (grub_term_get_current): Split in ...
7560 (grub_term_get_current_input): ... this, and ...
7561 (grub_term_get_current_output): ... this.
7562 (grub_term_register): Split in ...
7563 (grub_term_register_input): ... this, and ...
7564 (grub_term_register_output): ... this.
7565 (grub_term_unregister): Split in ...
7566 (grub_term_unregister_input): ... this, and ...
7567 (grub_term_unregister_output): ... this.
7568 (grub_term_iterate): Split in ...
7569 (grub_term_iterate_input): ... this, and ...
7570 (grub_term_iterate_output): ... this.
7571
7572 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
7573 a check for input and one for output (and only attempt to get keys
7574 from user when input works).
7575
7576 * util/grub-probe.c (grub_term_get_current): Split in ...
7577 (grub_term_get_current_input): ... this, and ...
7578 (grub_term_get_current_output): ... this.
7579 * util/grub-fstest.c: Likewise.
7580 * util/i386/pc/grub-setup.c: Likewise.
7581 * util/grub-editenv.c: Likewise.
7582
7583 Portability adjustments:
7584
7585 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
7586 `term/i386/pc/at_keyboard.c'.
7587 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
7588 grub_keyboard_controller_init() (now handled by terminal .init).
7589 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
7590 grub_at_keyboard_init().
7591 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
7592 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
7593 at_keyboard.mod via input terminal interface).
7594 * include/grub/i386/coreboot/console.h: Convert into a stub for
7595 `<grub/i386/pc/console.h>'.
7596
7597 Migrate full terminals to new API:
7598
7599 * term/efi/console.c (grub_console_term): Split into ...
7600 (grub_console_term_input): ... this, and ...
7601 (grub_console_term_output): ... this. Update all users.
7602 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
7603 (grub_ofconsole_init): Split into ...
7604 (grub_ofconsole_init_input): ... this, and ...
7605 (grub_ofconsole_init_output): ... this.
7606 (grub_ofconsole_term): Split into ...
7607 (grub_ofconsole_term_input): ... this, and ...
7608 (grub_ofconsole_term_output): ... this. Update all users.
7609 * term/i386/pc/serial.c (grub_serial_term): Split into ...
7610 (grub_serial_term_input): ... this, and ...
7611 (grub_serial_term_output): ... this. Update all users.
7612 * term/i386/pc/console.c (grub_console_term): Split into ...
7613 (grub_console_term_input): ... this, and ...
7614 (grub_console_term_output): ... this. Update all users.
7615 (grub_console_term_input): Only enable it on PC/BIOS platform.
7616 (grub_console_init): Remove grub_keyboard_controller_init() call.
7617
7618 Migrate input terminals to new API:
7619
7620 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
7621 `i386' and `i386/pc' to enable build on x86_64 (this driver is
7622 i386-specific anyway).
7623 (grub_console_checkkey): Rename to ...
7624 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
7625 users.
7626 (grub_keyboard_controller_orig): New variable.
7627 (grub_console_getkey): Rename to ...
7628 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
7629 users.
7630 (grub_keyboard_controller_init): Static-ize. Save original
7631 controller value so that it can be restored ...
7632 (grub_keyboard_controller_fini): ... here (new function).
7633 (grub_at_keyboard_term): New structure.
7634 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
7635 functions.
7636
7637 Migrate output terminals to new API:
7638
7639 * term/i386/pc/vga.c (grub_vga_term): Change type to
7640 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
7641 members. Update all users.
7642 * term/gfxterm.c (grub_video_term): Change type to
7643 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
7644 members. Update all users.
7645 * include/grub/i386/pc/console.h (grub_console_checkkey)
7646 (grub_console_getkey): Do not export (no longer needed by gfxterm,
7647 etc).
7648
7649 Migrate `terminal' command and userland tools to new API:
7650
7651 * commands/terminal.c (grub_cmd_terminal): Split into ...
7652 (grub_cmd_terminal_input): ... this, and ...
7653 (grub_cmd_terminal_output): ... this.
7654 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
7655 `terminal_input' and `terminal_output'.
7656 * util/grub.d/00_header.in: Adjust `terminal' calls to new
7657 `terminal_input' / `terminal_output' API.
7658 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
7659 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
7660 provided ${GRUB_TERMINAL}, convert it).
7661
96e5d876 76622008-11-04 Robert Millan <rmh@aybabtu.com>
7663
7664 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
7665 for FreeBSD.
7666 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
7667
556f3775 76682008-11-03 Bean <bean123ch@gmail.com>
7669
7670 * kern/elf.c (grub_elf32_load): Revert to previous code.
7671 (grub_elf64_load): Likewise.
7672
7673 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
7674
926b9823 76752008-11-01 Robert Millan <rmh@aybabtu.com>
7676
7677 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
7678 (TARGET_CPPFLAGS): Likewise.
7679 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
7680
1432e958 76812008-11-01 Carles Pina i Estany <carles@pina.cat>
7682
7683 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
7684
dba3f844 76852008-10-29 Guillem Jover <guillem.jover@nokia.com>
de4fa71c 7686
7687 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
7688 addition of objects until the code is not going to be able to fail.
7689
dba3f844 76902008-10-29 Guillem Jover <guillem.jover@nokia.com>
b7279447 7691
7692 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
7693 (add a missing NULL check, and correct them by moving the pointer
7694 operations after the actual check).
7695
7ab28c21 76962008-10-29 Robert Millan <rmh@aybabtu.com>
7697
7698 * util/i386/pc/grub-install.in: Handle empty string as output from
7699 make_system_path_relative_to_its_root().
7700
1b7748eb 77012008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
7702
7703 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
7704 circular metadata worst case scenario. If the metadata is circular
7705 then copy the wrap in place.
7706 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
7707 project lib/format_text/layout.h
7708 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
7709
c9618ab2 77102008-10-03 Felix Zielcke <fzielcke@z-51.de>
7711
7a36edca 7712 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
c9618ab2 7713
bf981c62 77142008-10-03 Felix Zielcke <fzielcke@z-51.de>
7715
7716 * util/update-grub_lib.in: Mention filename in warning message.
7717
6d994591 77182008-09-29 Felix Zielcke <fzielcke@z-51.de>
7719
7720 * NEWS: Update for rename of update-grub to grub-mkconfig.
7721
18ade780 77222008-09-29 Felix Zielcke <fzielcke@z-51.de>
7723
7724 * util/update-grub_lib.in: Copy to ...
7725 * util/grub-mkconfig_lib.in: ... this. Update all users.
7c3ff286 7726 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
18ade780 7727 * util/update-grub.in: Rename to ...
7728 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
7729 option. Add `--output' option to allow users to specify the generated
7730 configuration file. Default to stdout.
7731 (update_grub_dir): Rename to ...
7732 (grub_mkconfig_dir): ... this.
7733 (grub_cfg): Default to an empty string.
7734 * conf/common.rmk (update-grub): Rename to ...
7735 (grub-mkconfig): ... this.
7736 (update-grub_lib): Copy to ...
7737 (grub-mkconfig_lib): ... this.
7738 (update-grub_SCRIPTS): Copy to ...
7739 (grub-mkconfig_SCRIPTS): ... this. Update all users.
7740 (update-grub_DATA): Rename to ...
7741 (grub-mkconfig_DATA): ... this.
7742
556ce6ac 77432008-09-28 Robert Millan <rmh@aybabtu.com>
7744
7745 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
7746 to `modified'. Add the real `created' field.
7747 (grub_iso9660_uuid): Use `modified' rather than `created' for
7748 constructing the UUID.
7749
77502008-09-28 Felix Zielcke <fzielcke@z-51.de>
eb079ba9 7751
7752 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
7753 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
7754
92274e85 77552008-09-28 Bean <bean123ch@gmail.com>
7756
7757 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
7758 Thanks to Christian Franke for finding this bug.
7759
add6f17a 77602008-09-25 Robert Millan <rmh@aybabtu.com>
7761
7762 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
7763 instances of grub_util_get_disk_name() (see previous commit).
7764
d2a367b8 77652008-09-25 Robert Millan <rmh@aybabtu.com>
7766
7767 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
7768 `util/i386/get_disk_name.c'.
7769 * conf/i386-efi.rmk: Likewise.
7770 * conf/x86_64-efi.rmk: Likewise.
7771 * conf/i386-coreboot.rmk: Likewise.
7772 * conf/i386-ieee1275.rmk: Likewise.
7773 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
7774 `util/ieee1275/get_disk_name.c'.
7775 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
7776 * util/ieee1275/get_disk_name.c: Remove file.
7777 * util/i386/get_disk_name.c: Remove file.
7778 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
7779 "hd%d" for device.map entries, rather than using
7780 grub_util_get_disk_name().
7781
81a06771 77822008-09-24 Carles Pina i Estany <carles@pina.cat>
b0c301f7 7783
7784 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
7785 warning.
7786 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
7787
5a004279 77882008-09-24 Carles Pina i Estany <carles@pina.cat>
7789
7790 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
7791 Changed to 0x5100.
7792 (GRUB_TERM_PPAGE): Changed to 0x4900.
7793
397093d3 77942008-09-24 Robert Millan <rmh@aybabtu.com>
7795
7796 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
7797 macros (they were i386-pc specific).
7798 * include/grub/sparc64/ieee1275/console.h: Likewise.
7799 * include/grub/efi/console.h: Likewise.
7800
a91b6c7c 78012008-09-22 Bean <bean123ch@gmail.com>
7802
7803 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
7804 resident and in attribute list.
7805
7806 * include/grub/ntfs.h (BMP_LEN): Removed.
7807
c40fd116 78082008-09-22 Bean <bean123ch@gmail.com>
7809
81a06771 7810 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
c40fd116 7811 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
7812
7813 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
7814 error occurs, as grub_disk_open will call grub_disk_close, which will
7815 call p->close (scsi).
7816
81a06771 78172008-09-21 Felix Zielcke <fzielcke@z-51.de>
eb73121d 7818
7819 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
7820 (AC_PREREQ): Bumped to 2.59.
7821 (AC_TRY_COMPILE): Replace obsolete macro with ...
7822 (AC_COMPILE_IFELSE): ... this.
7823 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
7824 (AC_LINK_IFELSE): ... this.
7825
5dc43410 78262008-09-21 Felix Zielcke <fzielcke@z-51.de>
7827
7828 * autogen.sh: Add a call to `gendistlist.sh'.
7829
9035dce4 78302008-09-19 Christian Franke <franke@computer.org>
7831
7832 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
7833 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
7834 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
7835 Export __enable_execute_stack() to modules.
7836 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
7837 New function.
7838
7fd75377 78392008-09-09 Felix Zielcke <fzielcke@z-51.de>
7840
040030b3 7841 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
7842 Sort the list.
7843
78442008-09-09 Felix Zielcke <fzielcke@z-51.de>
7845
7846 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
7fd75377 7847 #include <grub/util/hostdisk.h>.
7848
89d5ffcf 78492008-09-08 Robert Millan <rmh@aybabtu.com>
7850
7851 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
7852 segments when their filesz is zero (grub_file_read() interprets
81a06771 7853 zero-size as "read until EOF", which results in memory corruption).
89d5ffcf 7854 Use `lowest_segment' rather than 0 for calculating the current
7855 segment load address.
7856
40da438f 78572008-09-08 Robert Millan <rmh@aybabtu.com>
7858
7859 * util/hostdisk.c (open_device): Replace a grub_util_info() call
7860 with grub_dprintf("hostdisk", ...), as it was so verbose that it
7861 clobbered useful information.
7862
ddbf5556 78632008-09-08 Robert Millan <rmh@aybabtu.com>
7864
7865 * include/grub/util/biosdisk.h: Move to ...
7866 * include/grub/util/hostdisk.h: ... here. Update all users.
7867 * util/biosdisk.c: Move to ...
7868 * util/hostdisk.c: ... here. Update all users.
7869
783d0f48 78702008-09-07 Robert Millan <rmh@aybabtu.com>
7871
7872 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
7873 variables.
7874 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
7875 and length can be stored directly in the `mbi->mmap_addr' and
7876 `mbi->mmap_length' struct fields.
7877
548e2ea5 78782008-09-07 Robert Millan <rmh@aybabtu.com>
7879
7880 * conf/i386.rmk: New file. Provides declaration for building
7881 `cpuid.mod'.
7882 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
7883 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
7884 variables.
7885 Include `conf/i386.mk'.
7886 * conf/i386-efi.rmk: Likewise.
7887 * conf/x86_64-efi.rmk: Likewise.
7888 * conf/i386-coreboot.rmk: Likewise.
7889 * conf/i386-ieee1275.rmk: Likewise.
7890
0ea85a37 78912008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
7892
7893 Based on patch created by Colin D Bennett <colin@gibibit.com>.
7894 Adds optimization support for BGR based modes.
7895
7896 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
7897 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
7898 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
7899 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
7900 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
7901 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
7902 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
7903 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
7904 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
7905 (grub_video_i386_vbeblit_index_index): Likewise.
7906 (grub_video_i386_vbeblit_replace_directN): Added.
7907 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
7908 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
7909 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
7910 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
7911 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
7912 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
81a06771 7913 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
0ea85a37 7914 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
7915 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
7916 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
7917 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
7918 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
7919 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
7920
7921 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
7922 (grub_video_i386_vbefill_R8G8B8): Likewise.
7923 (grub_video_i386_vbefill_index): Likewise.
7924 (grub_video_i386_vbefill_direct32): Added.
7925 (grub_video_i386_vbefill_direct24): Likewise.
7926 (grub_video_i386_vbefill_direct16): Likewise.
7927 (grub_video_i386_vbefill_direct8): Likewise.
7928
81a06771 7929 * include/grub/video.h (grub_video_blit_format): Removed
0ea85a37 7930 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
7931 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
7932 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
7933 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
7934 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
81a06771 7935
0ea85a37 7936 * video/video.c (grub_video_get_blit_format): Updated to use new
7937 blit formats. Added handling for 16 bit color modes.
81a06771 7938
7939 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
0ea85a37 7940 fillers.
7941 (common_blitter): Updated to use new blitters.
7942
7943 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
7944 Removed.
7945 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
7946 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
7947 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
7948 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
7949 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
7950 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
7951 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
7952 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
7953 (grub_video_i386_vbeblit_index_index): Likewise.
7954 (grub_video_i386_vbeblit_replace_directN): Added.
7955 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
7956 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
7957 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
7958 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
7959 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
7960 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
7961 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
7962 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
7963 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
7964 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
7965 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
7966 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
7967 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
81a06771 7968
0ea85a37 7969 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
7970 (grub_video_i386_vbefill_R8G8B8): Likewise.
7971 (grub_video_i386_vbefill_index): Likewise.
7972 (grub_video_i386_vbefill_direct32): Added.
7973 (grub_video_i386_vbefill_direct24): Likewise.
7974 (grub_video_i386_vbefill_direct16): Likewise.
7975 (grub_video_i386_vbefill_direct8): Likewise.
81a06771 7976
0ea85a37 7977 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
7978 types.
81a06771 7979
0ea85a37 7980 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
7981 types.
81a06771 7982
0ea85a37 7983 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
7984 blitter types.
81a06771 7985
0ea85a37 7986 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
7987 types.
7988
e8a83df6 79892008-09-06 Felix Zielcke <fzielcke@z-51.de>
7990
7991 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
7992 RAID level 1.
7993
6bcd8ee5 79942008-09-06 Felix Zielcke <fzielcke@z-51.de>
c375ae58 7995
6bcd8ee5 7996 * fs/iso9660.c (grub_iso9660_date): New structure.
7997 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
7998 (grub_iso9660_uuid): New function.
c375ae58 7999
59261157 80002008-09-05 Bean <bean123ch@gmail.com>
8001
8002 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
8003
8004 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
8005 insensitive bit for names in Win32 and Win32 & DOS namespace.
8006
8007 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
8008
8009 * include/grub/types.h (LONG_MAX): Likewise.
8010
58b6645a 80112008-09-04 Felix Zielcke <fzielcke@z-51.de>
8012
4ee55921 8013 * util/getroot.c: Include <config.h>.
8014 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
8015 add support for /dev/md/N devices and handle LVM double dash escaping.
8016
80172008-09-04 Felix Zielcke <fzielcke@z-51.de>
8018
8019 * config.guess: Update to latest version from config git.
8020 * config.sub: Likewise.
58b6645a 8021
9124f65d 80222008-09-03 Robert Millan <rmh@aybabtu.com>
8023
8024 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
8025 `disk->total_sectors'.
8026
81a06771 80272008-09-01 Colin D Bennett <colin@gibibit.com>
a0224a4e 8028
8029 * include/grub/normal.h: Fixed incorrect comment for
8030 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
8031
81a06771 80322008-09-01 Colin D Bennett <colin@gibibit.com>
f0619958 8033
8034 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
8035 values with defines.
8036
8037 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
8038 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
8039 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
8040 (GRUB_VBE_MODEATTR_COLOR): Likewise.
8041 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
8042 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
8043 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
8044 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
8045 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
8046 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
8047 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
8048 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
8049 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
8050 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
8051 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
8052 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
8053 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
8054 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
8055 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
8056
93d5cbf8 80572008-08-31 Robert Millan <rmh@aybabtu.com>
8058
8059 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
8060 declaration.
8061 (grub_multiboot): Fix a few warnings.
8062
21751d50 80632008-08-31 Robert Millan <rmh@aybabtu.com>
8064
8065 * loader/i386/pc/multiboot.c: Update comment not to say that
8066 boot_device support is unimplemented.
8067
e27a75c5 80682008-08-31 Robert Millan <rmh@aybabtu.com>
8069
8070 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
8071 or memory map support are unimplemented.
8072
81a06771 80732008-08-31 Colin D Bennett <colin@gibibit.com>
64d2d53c 8074
8075 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
8076
81a06771 80772008-08-31 Colin D Bennett <colin@gibibit.com>
c08a6c18 8078
8079 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
8080 total video memory in 'vbeinfo' output; show color format details for
8081 each video mode.
8082
7c5d8d95 80832008-08-30 Pavel Roskin <proski@gnu.org>
8084
8085 * util/genmoddep.c: Remove for real this time.
8086 * DISTLIST: Remove util/genmoddep.c.
8087
4cebd25a 80882008-08-30 Robert Millan <rmh@aybabtu.com>
8089
8090 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
8091 as required by Multiboot spec (it was already 4-byte aligned, but
8092 only by chance).
8093
b497a269 80942008-08-29 Pavel Roskin <proski@gnu.org>
8095
e3925185 8096 * kern/powerpc/ieee1275/crt0.S: Rename to ...
8097 * kern/powerpc/ieee1275/startup.S: ... this.
8098 * conf/powerpc-ieee1275.rmk: Adjust for the above.
8099 * DISTLIST: Likewise.
8100
b497a269 8101 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
8102 grub/cpu/kernel.h. Add start label for consistency with other
8103 platforms. Add grub_prefix immediately after start. Add jump
8104 to the code after grub_prefix.
8105 * include/grub/powerpc/kernel.h: Provide valid values for
8106 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
8107
6e5a42fe 81082008-08-29 Bean <bean123ch@gmail.com>
8109
8110 * configure.ac: Change host_os to cygwin for mingw.
8111 (asprintf): New check for function.
8112
8113 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
8114 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
8115
8116 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
81a06771 8117 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
6e5a42fe 8118 sync, sleep and grub_util_get_disk_size for mingw.
8119
8120 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
8121 to get size in mingw.
8122 (open_device): Use flag O_BINARY if it's defined.
8123 (find_root_device): Add dummy code for mingw.
8124
8125 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
8126 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
8127 (get_scsi_disk_name): Return 0 for mingw.
8128
8129 * util/hostfs.c: #include <grub/util/misc.h>.
8130 (grub_hostfs_open): Use "rb" flag to open file, use
8131 grub_util_get_disk_size to get disk size for mingw.
8132
8133 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
8134 (asprintf): New function if HAVE_ASPRINTF is not set.
8135 (sync): New function for mingw.
8136 (sleep): Likewise.
8137 (grub_util_get_disk_size): Likewise.
8138
ab3f2673 81392008-08-28 Pavel Roskin <proski@gnu.org>
8140
8141 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
8142 kern/time.c.
8143
1c282483 81442008-08-28 Robert Millan <rmh@aybabtu.com>
8145
8146 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
8147
678e849c 81482008-08-28 Robert Millan <rmh@aybabtu.com>
8149
8150 Change find_grub_drive() syntax so it doesn't prevent it from
8151 detecting NULL names as errors.
8152
8153 * util/biosdisk.c (find_grub_drive): Move free slot search code
8154 from here ...
8155 (find_free_slot): ... to here.
8156 (read_device_map): Use find_free_slot() to search for free slots.
8157
965c75ca 81582008-08-27 Marco Gerards <marco@gnu.org>
8159
8160 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
8161 (scsi_mod_SOURCES): New variable.
8162 (scsi_mod_CFLAGS): Likewise
8163 (scsi_mod_LDFLAGS): Likewise.
8164
8165 * disk/scsi.c: New file.
8166
8167 * include/grub/scsi.h: Likewise.
8168
8169 * include/grub/scsicmd.h: Likewise.
8170
8171 * disk/ata.c: Include <grub/scsi.h>.
8172 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
8173 instead.
8174 (grub_ata_iterate): Skip ATAPI devices.
8175 (grub_ata_open): Only handle ATAPI devices.
8176 (struct grub_atapi_read): Removed.
8177 (grub_atapi_readsector): Likewise.
8178 (grub_ata_read): No longer handle ATAPI devices.
8179 (grub_ata_write): Likewise.
8180 (grub_atapi_iterate): New function.
8181 (grub_atapi_read): Likewise.
8182 (grub_atapi_write): Likewise.
8183 (grub_atapi_open): Likewise.
8184 (grub_atapi_close): Likewise.
8185 (grub_atapi_dev): New variable.
8186 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
8187 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
8188
8189 * include/grub/disk.h (enum grub_disk_dev_id): Add
8190 `GRUB_DISK_DEVICE_SCSI_ID'.
8191
c07ae501 81922008-08-26 Robert Millan <rmh@aybabtu.com>
8193
8194 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
8195 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
8196 descriptive.
8197
5ed20adc 81982008-08-23 Bean <bean123ch@gmail.com>
8199
8200 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
8201 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
8202 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
8203 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
8204 dm_nv.mod.
8205 (raid5rec_mod_SOURCES): New macro.
8206 (raid5rec_mod_CFLAGS): Likewise.
8207 (raid5rec_mod_LDFLAGS): Likewise.
8208 (raid6rec_mod_SOURCES): Likewise.
8209 (raid6rec_mod_CFLAGS): Likewise.
8210 (raid6rec_mod_LDFLAGS): Likewise.
8211 (mdraid_mod_SOURCES): Likewise.
8212 (mdraid_mod_CFLAGS): Likewise.
8213 (mdraid_mod_LDFLAGS): Likewise.
8214 (dm_nv_mod_SOURCES): Likewise.
8215 (dm_nv_mod_CFLAGS): Likewise.
8216 (dm_nv_mod_LDFLAGS): Likewise.
8217
8218 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
8219 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
8220 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
8221
8222 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
8223 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
8224
8225 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8226
8227 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
8228
8229 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8230
8231 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8232
8233 * disk/raid5_recover.c: New file.
8234
8235 * disk/raid6_recover.c: Likewise.
8236
8237 * disk/mdraid_linux.c: Likewise.
8238
8239 * disk/dmraid_nvidia.c: Likewise.
8240
8241 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
8242 ULONG_MAX.
8243
8244 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
8245 calculate the size of raid device.
8246 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
8247 different layout of raid5.
8248 (grub_raid_scan_device): Remove code specific to mdraid.
8249 (grub_raid_list): New variable.
8250 (free_array): New function.
8251 (grub_raid_register): Likewise.
8252 (grub_raid_unregister): Likewise.
8253 (grub_raid_rescan): Likewise.
8254 (GRUB_MOD_INIT): Don't iterate device here.
8255 (GRUB_MOD_FINI): Use free_array to release resource.
8256
8257 * include/grub/raid.h: Remove macro and structure specific to mdraid.
8258 (grub_raid5_recover_func_t): New function variable type.
8259 (grub_raid6_recover_func_t): Likewise.
8260 (grub_raid5_recover_func): New variable.
8261 (grub_raid6_recover_func): Likewise.
8262 (grub_raid_register): New function.
8263 (grub_raid_unregister): Likewise.
8264 (grub_raid_rescan): Likewise.
8265 (grub_raid_block_xor): Likewise.
8266
8267 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
8268 (CMD_CRC): New macro.
8269 (part): Removed.
8270 (read_file): Handle device as well as file.
8271 (cmd_crc): New function.
8272 (fstest): Handle multiple disks.
8273 (options): Remove part, raw and long, add root and diskcount.
8274 (usage): Add crc, remove -p, -r, -l, add -r and -c.
dba3f844 8275 (main): Find the first non option entry and ignore subsequent options,
5ed20adc 8276 add handling for the new options, support multiple disks.
8277
8278 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
8279
29c18915 82802008-08-23 Bean <bean123ch@gmail.com>
8281
8282 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
8283
8284 * genfslist.sh: Ignore kernel.mod.
8285
8286 * genpartmaplist.sh: Likewise.
8287
8415f261 82882008-08-23 Robert Millan <rmh@aybabtu.com>
8289
8290 * util/getroot.c (find_root_device): Skip anything that starts with
8291 a dot, not just directories. This avoids things like /dev/.tmp.md0.
8292
d5a7dc5b 82932008-08-22 Felix Zielcke <fzielcke@z-51.de>
81a06771 8294
d5a7dc5b 8295 * util/update-grub.in (GRUB_GFXMODE): Export variable.
8296 * util/grub.d/00_header.in: Allow the administrator to change default
8297 gfxmode via ${GRUB_GFXMODE}.
8298
380cfbb4 82992008-08-21 Felix Zielcke <fzielcke@z-51.de>
8300
8301 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
8302
c9baafe7 83032008-08-21 Robert Millan <rmh@aybabtu.com>
8304
8305 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
8306 loader.
8307 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
8308 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
8309
e290bef2 83102008-08-20 Carles Pina i Estany <carles@pina.cat>
8311
8312 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
8313 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
8314
f9dbfc96 83152008-08-19 Robert Millan <rmh@aybabtu.com>
8316
8317 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
8318 (struct grub_virtual_screen): Remove `cursor_color'.
8319 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
8320 initialization.
8321 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
8322
dd6bd6ab 83232008-08-18 Robert Millan <rmh@aybabtu.com>
8324
8325 Unify (identical) linux_normal.c files.
8326 * loader/i386/efi/linux_normal.c: Move from here ...
8327 * loader/linux_normal.c: ... to here. Update all users.
8328 * loader/i386/pc/linux_normal.c: Delete. Update all users.
8329 * loader/i386/ieee1275/linux_normal.c: Likewise.
8330
7f42f83e 83312008-08-18 Robert Millan <rmh@aybabtu.com>
8332
8333 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
8334 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
8335 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
8336 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
8337 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
8338 New macros.
8339 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
8340 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
8341 (GRUB_LINUX_CL_END_OFFSET): ... to here.
8342 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
8343 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
8344 (GRUB_EFI_CL_END_OFFSET): Rename to ...
8345 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
8346 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
8347 Initialize `params->video_cursor_x' and `params->video_cursor_y'
8348 portably using grub_getxy().
8349 Replace `-EFI' with `-bzImage' in boot message.
8350
38487ddb 83512008-08-17 Robert Millan <rmh@aybabtu.com>
8352
8353 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
8354
deceb3ec 83552008-08-17 Robert Millan <rmh@aybabtu.com>
8356
8357 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
8358
8359 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
8360 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
8361 (grub_machine_mmap_iterate): New function declaration.
8362 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
8363 structure.
8364 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
8365 macros.
8366
8367 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
8368 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
8369 Move e820 parsing from here ...
8370 * kern/i386/pc/mmap.c: New file.
8371 (grub_machine_mmap_iterate): ... to here.
8372
8373 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
8374 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
8375 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
8376 (grub_available_iterate): Redeclare to return `void', and redeclare
8377 its hook to use grub_uint64_t as addr and size parameters, and rename
8378 to ...
8379 (grub_machine_mmap_iterate): ... this. Update all users.
8380
8381 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
8382 to make it more readable. Rename to ...
8383 (grub_machine_mmap_iterate): ... this.
8384
8385 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
8386 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
8387 (grub_multiboot): Allocate an extra region after the payload, and fill
8388 it with a Multiboot memory map. Adjust a.out loader to calculate size
8389 with the extra space.
8390 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
8391 with the extra space.
8392
f8aa0f43 83932008-08-17 Carles Pina i Estany <carles@pina.cat>
8394
9807deb9 8395 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
f8aa0f43 8396
605f5bb6 83972008-08-17 Felix Zielcke <fzielcke@z-51.de>
8398
8399 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
8400 mdate-sh to the list `find' searches for.
8401 * DISTLIST: Regenerated.
8402
210db6c6 84032008-08-16 Felix Zielcke <fzielcke@z-51.de>
8404
8405 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
8406 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
48cdbfd4 8407 genmoddep.awk, gensymlist.sh.in.
8408 (DISTDIRS): Add bus, docs, hook, lib.
210db6c6 8409 * DISTLIST: Regenerated.
48cdbfd4 8410 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
210db6c6 8411
1082b929 84122008-08-16 Robert Millan <rmh@aybabtu.com>
8413
8414 * disk/raid.c (grub_raid_init): Handle/report errors set by
8415 grub_device_iterate().
8416 * disk/lvm.c (grub_lvm_init): Likewise.
8417
42ce5170 84182008-08-15 Bean <bean123ch@gmail.com>
8419
8420 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
8421 and datehook.mod.
8422 (datetime_mod_SOURCES): New macro.
8423 (datetime_mod_CFLAGS): Likewise.
8424 (datetime_mod_LDFLAGS): Likewise.
8425 (date_mod_SOURCES): Likewise.
8426 (date_mod_CFLAGS): Likewise.
8427 (date_mod_LDFLAGS): Likewise.
8428 (datehook_mod_SOURCES): Likewise.
8429 (datehook_mod_CFLAGS): Likewise.
8430 (datehook_mod_LDFLAGS): Likewise.
8431
8432 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
8433 and datehook.mod.
8434 (datetime_mod_SOURCES): New macro.
8435 (datetime_mod_CFLAGS): Likewise.
8436 (datetime_mod_LDFLAGS): Likewise.
8437 (date_mod_SOURCES): Likewise.
8438 (date_mod_CFLAGS): Likewise.
8439 (date_mod_LDFLAGS): Likewise.
8440 (datehook_mod_SOURCES): Likewise.
8441 (datehook_mod_CFLAGS): Likewise.
8442 (datehook_mod_LDFLAGS): Likewise.
8443
8444 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
8445 and datehook.mod.
8446 (datetime_mod_SOURCES): New macro.
8447 (datetime_mod_CFLAGS): Likewise.
8448 (datetime_mod_LDFLAGS): Likewise.
8449 (date_mod_SOURCES): Likewise.
8450 (date_mod_CFLAGS): Likewise.
8451 (date_mod_LDFLAGS): Likewise.
8452 (datehook_mod_SOURCES): Likewise.
8453 (datehook_mod_CFLAGS): Likewise.
8454 (datehook_mod_LDFLAGS): Likewise.
8455
8456 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
8457 and datehook.mod.
8458 (datetime_mod_SOURCES): New macro.
8459 (datetime_mod_CFLAGS): Likewise.
8460 (datetime_mod_LDFLAGS): Likewise.
8461 (date_mod_SOURCES): Likewise.
8462 (date_mod_CFLAGS): Likewise.
8463 (date_mod_LDFLAGS): Likewise.
8464 (datehook_mod_SOURCES): Likewise.
8465 (datehook_mod_CFLAGS): Likewise.
8466 (datehook_mod_LDFLAGS): Likewise.
8467
8468 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
8469 and datehook.mod.
8470 (datetime_mod_SOURCES): New macro.
8471 (datetime_mod_CFLAGS): Likewise.
8472 (datetime_mod_LDFLAGS): Likewise.
8473 (date_mod_SOURCES): Likewise.
8474 (date_mod_CFLAGS): Likewise.
8475 (date_mod_LDFLAGS): Likewise.
8476 (datehook_mod_SOURCES): Likewise.
8477 (datehook_mod_CFLAGS): Likewise.
8478 (datehook_mod_LDFLAGS): Likewise.
8479
8480 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
8481
8482 * commands/date.c: New file.
8483
8484 * hook/datehook.c: Likewise.
8485
8486 * include/grub/lib/datetime.h: Likewise.
8487
8488 * include/grub/i386/cmos.h: Likewise.
8489
8490 * lib/datetime.c: Likewise.
8491
8492 * lib/i386/datetime.c: Likewise.
8493
8494 * lib/efi/datetime.c: Likewise.
8495
0e9242da 84962008-08-14 Robert Millan <rmh@aybabtu.com>
8497
8498 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
8499 (grub_mkelfimage_SOURCES): New variable.
8500 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
8501
8502 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
8503 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
8504 * conf/powerpc-ieee1275.rmk: Likewise.
8505 * conf/i386-ieee1275.rmk: Likewise.
8506
8507 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
8508 * kern/i386/coreboot/init.c: Likewise.
8509
8510 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
8511 with `<grub/cpu/kernel.h>'.
8512 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
8513 to ...
8514 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
8515 * kern/i386/coreboot/startup.S: Likewise.
8516
8517 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
8518 (GRUB_MOD_GAP): Remove.
8519 * include/grub/powerpc/kernel.h: New file.
8520 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
8521 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
8522 * include/grub/i386/kernel.h: New file.
8523 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
8524 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
8525 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
8526
8527 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
8528 `grub-mkelfimage'.
8529 Use --directory when invoking grub_mkimage.
8530
8531 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
8532 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
8533 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
8534 and GRUB_KERNEL_CPU_PREFIX.
8535
b86408f8 85362008-08-14 Felix Zielcke <fzielcke@z-51.de>
8537
d5e619ca 8538 * include/grub/err.h (grub_err_printf): New function prototype.
8539 * util/misc.c (grub_err_printf): New function.
8540 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
8541 grub_printf.
8542 * kern/err.c (grub_print_error): Use grub_err_printf.
b86408f8 8543
7161f0e0 85442008-08-13 Robert Millan <rmh@aybabtu.com>
8545
8546 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
8547
a1967522 85482008-08-13 Robert Millan <rmh@aybabtu.com>
8549
8550 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
8551 boot entry.
8552
371458b5 85532008-08-12 Robert Millan <rmh@aybabtu.com>
8554
8555 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
8556 of the relocation code from here ...
8557 (grub_multiboot): ... to here.
8558 (forward_relocator, backward_relocator): Move from here ...
8559 * kern/i386/loader.S (grub_multiboot_forward_relocator)
8560 (grub_multiboot_backward_relocator): ... to here.
8561 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
8562 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
8563 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
8564 (grub_multiboot_forward_relocator_end)
8565 (grub_multiboot_backward_relocator)
8566 (grub_multiboot_backward_relocator_end): New variables.
8567
05f9452b 85682008-08-12 Bean <bean123ch@gmail.com>
8569
8570 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
8571
20024ab0 85722008-08-11 Robert Millan <rmh@aybabtu.com>
8573
8574 * kern/i386/linuxbios/startup.S: Move from here ...
8575 * kern/i386/coreboot/startup.S: ... to here.
8576
8577 * kern/i386/linuxbios/init.c: Move from here ...
8578 * kern/i386/coreboot/init.c: ... to here.
8579
8580 * kern/i386/linuxbios/table.c: Move from here ...
8581 * kern/i386/coreboot/mmap.c: ... to here.
8582
8583 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
8584
e352e9cd 85852008-08-11 Robert Millan <rmh@aybabtu.com>
8586
8587 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
8588 errors. Leave it to the upper layer to handle them.
8589
2d05bc6a 85902008-08-09 Christian Franke <franke@computer.org>
8591
8592 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
8593 * conf/common.rmk: Install `grub-pe2elf' only if requested.
8594 Install `grub.d/10_windows' only on Cygwin.
8595 * configure.ac: Add subst of `target_os'.
8596 Check `target_os' also before setting TARGET_OBJ2ELF.
8597 Add `--enable-grub-pe2elf'.
8598
042bd419 85992008-08-08 Robert Millan <rmh@aybabtu.com>
8600
8601 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
8602 (grub_last_time): Change type to grub_uint64_t.
8603 (grub_disk_open): Migrate code from to using grub_get_time_ms().
8604 (grub_disk_close): Likewise.
8605
8606 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
8607 (run_menu): Migrate code from to using grub_get_time_ms().
8608
8609 * util/misc.c (grub_get_time_ms): New function.
8610
7f280db5 86112008-08-08 Marco Gerards <marco@gnu.org>
8612
8613 * disk/ata.c (grub_ata_regget): Change return type to
8614 `grub_uint8_t'.
8615 (grub_ata_regget2): Likewise.
8616 (grub_ata_wait_status): New function.
8617 (grub_ata_wait_busy): Removed function, updated all users to use
8618 `grub_ata_wait_status'.
8619 (grub_ata_wait_drq): Likewise.
8620 (grub_ata_cmd): New function.
8621 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
8622 error handling.
8623 (grub_ata_pio_write): Add error handling.
8624 (grub_atapi_identify): Likewise.
8625 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
8626 handling.
8627 (grub_ata_identify): Use `grub_ata_cmd' and improve error
8628 handling. Actually use the detected registers. Reorder the
8629 detection logic such that it is easier to read.
8630 (grub_ata_pciinit): Do not assign the same ID to each controller.
8631 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
8632 handling.
8633 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
8634
8635 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
8636
1fbc5e66 86372008-08-08 Marco Gerards <marco@gnu.org>
8638
8639 * NEWS: Update.
8640
819ce6c0 86412008-08-07 Bean <bean123ch@gmail.com>
8642
8643 * include/grub/x86_64/pci.h: New file.
8644
5c41d44d 86452008-08-07 Christian Franke <franke@computer.org>
8646
8647 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
8648 (TIMER2_GATE): Likewise.
8649 (grub_pit_wait): Add enable/disable of the timer2 gate
8650 bit of port 0x61. This fixes a possible infinite loop.
8651
5ebc275d 86522008-08-07 Bean <bean123ch@gmail.com>
8653
8654 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
8655 kern/i386/tsc.c and kern/i386/pit.c.
8656
8657 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
8658 x86_64 platform.
8659
8660 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
8661 <grub/i386/tsc.h>.
8662
8663 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
8664
e383b3d0 86652008-08-07 Bean <bean123ch@gmail.com>
8666
8667 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
8668
8669 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
8670
8671 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
8672 multiple inclusion. Add #include <grub/types.h>.
8673
1cbb58ac 86742008-08-06 Christian Franke <franke@computer.org>
8675
8676 * conf/common.rmk: Build and install `10_windows'.
8677 * util/grub.d/10_windows.in: New script.
8678
337f5a1e 86792008-08-06 Pavel Roskin <proski@gnu.org>
8680
8681 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
8682
057bc4ac 86832008-08-06 Robert Millan <rmh@aybabtu.com>
8684
8685 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
8686 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
8687
2b99f123 86882008-08-06 Bean <bean123ch@gmail.com>
8689
8690 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
8691 (grub_pxefs_fs_int): Remove dummy definition.
8692 (grub_pxefs_open): Use data->block_size to store the current block
8693 size setting.
8694 (grub_pxefs_read): Use block size stored in data->block_size. As the
8695 value of grub_pxe_blksize can be changed after the file is opened.
8696
9f0234cb 86972008-08-06 Bean <bean123ch@gmail.com>
8698
8699 * fs/i386/pc/pxe.c (curr_file): new variable.
8700 (grub_pxefs_open): Simply the handling of pxe file system. Don't
8701 require the dummy internal file system anymore.
8702 (grub_pxefs_read): Removed.
8703 (grub_pxefs_close): Likewise.
8704 (grub_pxefs_fs_int): Likewise.
8705 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
8706 connection when we switch file.
8707 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
8708
a55d42e0 87092008-08-06 Robert Millan <rmh@aybabtu.com>
8710
8711 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
8712 `halt.mod'.
8713 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
8714 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
8715
8716 * kern/i386/halt.c: New file.
8717 * kern/i386/reboot.c: Likewise.
8718 * include/grub/i386/reboot.h: Likewise.
8719 * include/grub/i386/halt.h: Likewise.
8720
8721 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
8722 Include `<grub/cpu/halt.h>'.
8723 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
8724 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
8725
8726 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
8727 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
8728 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
8729 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
8730 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
8731 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
8732 from here ...
8733 * include/grub/i386/at_keyboard.h: ... to here.
8734
24371d26 87352008-08-05 Robert Millan <rmh@aybabtu.com>
8736
8737 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
8738 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
8739 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
8740 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
8741 `kern/generic/millisleep.c'.
8742
8743 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
8744 instead of grub_get_rtc().
8745 (grub_tsc_init): Initialize `tsc_boot_time'.
8746
8747 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
8748 (grub_machine_init): Use grub_tsc_init() rather than
8749 installing an RTC-based handler via grub_install_get_time_ms().
8750
8751 * kern/i386/pit.c: New file.
8752 * include/grub/i386/pit.h: Likewise.
8753
9e7007b3 87542008-08-05 Bean <bean123ch@gmail.com>
8755
8756 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
8757
8758 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
8759 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
8760 (pxe_mod_SOURCES): New macro.
8761 (pxe_mod_CFLAGS): Likewise.
8762 (pxe_mod_LDFLAGS): Likewise.
8763 (pxecmd_mod_SOURCES): Likewise.
8764 (pxecmd_mod_CFLAGS): Likewise.
8765 (pxecmd_mod_LDFLAGS): Likewise.
8766
8767 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
8768 (grub_pxe_call): Likewise.
8769
8770 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
8771
8772 * commands/i386/pc/pxecmd.c: New file.
8773
9f0234cb 8774 * fs/i386/pc/pxe.c: Likewise.
9e7007b3 8775
8776 * include/grub/i386/pc/pxe.h: Likewise.
8777
6977d49f 87782008-08-05 Bean <bean123ch@gmail.com>
8779
8780 * util/console.c (grub_console_cur_color): New variable.
8781 (grub_console_standard_color): Likewise.
8782 (grub_console_normal_color): Likewise.
8783 (grub_console_highlight_color): Likewise.
8784 (color_map): Likewise.
8785 (use_color): Likewise.
8786 (NUM_COLORS): New macro.
8787 (grub_ncurses_setcolorstate): Handle color properly.
8788 (grub_ncurses_setcolor): Don't change color here, just remember the
8789 settings, color will be set in grub_ncurses_setcolorstate.
8790 (grub_ncurses_getcolor): New function.
8791 (grub_ncurses_init): Initialize color pairs.
8792 (grub_ncurses_term): New member grub_ncurses_getcolor.
8793
9c2ff3ee 87942008-08-05 Colin D Bennett <colin@gibibit.com>
337f5a1e 8795
9c2ff3ee 8796 High resolution timer support. Implemented for x86 CPUs using TSC.
8797 Extracted generic grub_millisleep() so it's linked in only as needed.
8798 This requires a Pentium compatible CPU; if the RDTSC instruction is
8799 not supported, then it falls back on the generic grub_get_time_ms()
8800 implementation that uses the machine's RTC.
8801
8802 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
8803 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
8804 `kern/generic/millisleep.c'.
8805
8806 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
8807 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
8808
8809 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
8810 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
8811
8812 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
8813
8814 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
8815 `kern/generic/millisleep.c'.
8816
8817 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
8818
8819 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
8820
8821 * kern/generic/rtc_get_time_ms.c: New file.
8822
8823 * kern/generic/millisleep.c: New file.
337f5a1e 8824
9c2ff3ee 8825 * kern/misc.c: Don't include
8826 <kern/time.h> anymore.
8827 (grub_millisleep_generic): Removed.
8828
8829 * commands/sleep.c (grub_interruptible_millisleep): Uses
8830 grub_get_time_ms() instead of grub_get_rtc().
8831
8832 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
8833 function.
8834 (grub_cpu_is_cpuid_supported): New inline function.
8835 (grub_cpu_is_tsc_supported): New inline function.
8836 (grub_tsc_init): New function prototype.
8837 (grub_tsc_get_time_ms): New function prototype.
8838
8839 * kern/i386/tsc.c (grub_get_time_ms): New file.
8840
8841 * include/grub/time.h: Include <grub/types.h.
8842 (grub_millisleep_generic): Removed.
8843 (grub_get_time_ms): New prototype.
8844 (grub_install_get_time_ms): New prototype.
8845 (grub_rtc_get_time_ms): New prototype.
8846
8847 * kern/time.c (grub_get_time_ms): New function.
8848 (grub_install_get_time_ms): New function.
8849
8850 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
8851 <grub/time.h> anymore.
8852 (grub_millisleep): Removed.
8853 (grub_machine_init): Call grub_tsc_init.
8854
8855 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
8856 get_time_ms() implementation.
8857
8858 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
8859 (ieee1275_get_time_ms): New function.
8860 (grub_machine_init): Install get_time_ms() implementation.
8861
8862 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
8863 (grub_machine_init): Call grub_tsc_init().
8864 (grub_millisleep): Removed.
bf06a93f 8865
9c2ff3ee 8866 * kern/ieee1275/init.c (grub_millisleep): Removed.
8867 (grub_machine_init): Install ieee1275_get_time_ms()
8868 implementation.
8869 (ieee1275_get_time_ms): New function.
8870 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
8871 real work.
8872
9ec92aaf 88732008-08-05 Marco Gerards <marco@gnu.org>
8874
8875 * disk/ata.c: Include <grub/pci.h>.
8876 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
8877 (grub_ata_initialize): Rewritten.
8878 (grub_ata_device_initialize): New function.
8879
8d23f507 88802008-08-04 Pavel Roskin <proski@gnu.org>
8881
8882 * kern/main.c: Include grub/mm.h.
8883
5e15ee3d 88842008-08-04 Robert Millan <rmh@aybabtu.com>
8885
8886 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
8887 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
8888 corruption problem).
8889
a9053f8f 88902008-08-04 Robert Millan <rmh@aybabtu.com>
8891
8892 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
8893 warnings introduced in my last commit.
8894
dd19c7d7 88952008-08-03 Robert Millan <rmh@aybabtu.com>
8896
8897 Make PCI available on all i386 architectures.
8898
8899 * include/grub/i386/pc/pci.h: Move from here ...
8900 * include/grub/i386/pci.h: ... to here.
8901
8902 * include/grub/i386/pc/pci.h: Remove.
8903 * include/grub/i386/efi/pci.h: Remove.
8904 * include/grub/x86_64/efi/pci.h: Remove.
8905
8906 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
8907 `<grub/cpu/pci.h>'.
8908
8909 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
8910 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
8911 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
8912
8913 * conf/i386-ieee1275.rmk: Likewise.
8914
e14a6184 89152008-08-03 Robert Millan <rmh@aybabtu.com>
8916
8917 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
8918 (grub_console_setcursor): Make it possible to set cursor off.
8919
52768e37 89202008-08-03 Robert Millan <rmh@aybabtu.com>
8921
8922 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
8923 of modules instead of assuming which platform provides what.
8924 * util/update-grub.in: Likewise.
8925
2d52f57f 89262008-08-03 Robert Millan <rmh@aybabtu.com>
8927
8928 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
8929 instead of `grub_install_dos_part' to determine whether a drive needs
8930 to be prepended to prefix (`grub_install_dos_part' is not reliable,
825aa57a 8931 because it can be overridden when loading GRUB via Multiboot).
2d52f57f 8932
2a5cd121 89332008-08-02 Robert Millan <rmh@aybabtu.com>
8934
8935 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
8936
93808428 89372008-08-02 Robert Millan <rmh@aybabtu.com>
8938
8939 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
8940 of informational grub_dprintf() calls.
8941
3bd0a12a 89422008-08-02 Robert Millan <rmh@aybabtu.com>
8943
8944 * disk/memdisk.c (memdisk_size): Don't initialize.
8945 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
8946
8947 * include/grub/i386/pc/kernel.h
8948 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
8949 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
8950 (grub_memdisk_image_size, grub_arch_memdisk_addr)
8951 (grub_arch_memdisk_size): Remove.
8952
8953 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
8954 field (was only used to transfer a constant). Add `type' field to
8955 support multiple module types.
8956 (grub_module_iterate): New function.
8957
8958 * kern/device.c (grub_device_open): Do not hide error messages
8959 when grub_disk_open() fails. Use grub_print_error() instead.
8960
8961 * kern/i386/pc/init.c (grub_arch_modules_addr)
8962 (grub_arch_memdisk_size): Remove functions.
8963 (grub_arch_modules_addr): Return the module address in high memory
8964 (now that it isn't copied anymore).
8965
8966 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
8967 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
8968 decompression routine (grub_total_module_size already includes that
8969 now). Don't copy modules back to low memory.
8970
8971 * kern/main.c: Include `<grub/mm.h>'.
8972 (grub_load_modules): Split out (and use) ...
8973 (grub_module_iterate): ... this function, which iterates through
8974 module objects and runs a hook.
8975 Comment out grub_mm_init_region() call, as it would cause non-ELF
8976 modules to be overwritten.
8977
8978 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
8979 the memdisk image in its own region, make it part of the module list.
8980 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
8981 (main): Parse --memdisk|-m option, and pass user-provided path as
8982 parameter to generate_image().
8983 (add_segments): Pass `memdisk_path' down to load_modules().
8984 (load_modules): Embed memdisk image in module section when requested.
8985 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
8986 `header.type' instead of `header.offset'.
8987
8988 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
8989 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
8990 (memdisk_mod_LDFLAGS): New variables.
8991 * conf/i386-coreboot.rmk: Likewise.
8992 * conf/i386-ieee1275.rmk: Likewise.
8993
a927cc73 89942008-08-02 Robert Millan <rmh@aybabtu.com>
8995
8996 * loader/i386/pc/multiboot.c (playground, forward_relocator)
8997 (backward_relocator): New variables. Used to allocate and relocate
8998 the payload, respectively.
8999 (grub_multiboot_load_elf32): Load into heap instead of requested
825aa57a 9000 address, install the appropriate relocator code in each bound of
a927cc73 9001 the payload, and set the entry point such that
9002 grub_multiboot_real_boot() will jump to one of them.
9003
9004 * kern/i386/loader.S (grub_multiboot_payload_size)
9005 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
9006 (grub_multiboot_payload_entry_offset): New variables.
9007 (grub_multiboot_real_boot): Set cpu context to what the relocator
9008 expects, and jump to the relocator instead of the payload.
9009
9010 * include/grub/i386/loader.h (grub_multiboot_payload_size)
9011 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
9012 (grub_multiboot_payload_entry_offset): Export.
9013
b15d8a0c 90142008-08-01 Bean <bean123ch@gmail.com>
9015
9016 * normal/menu_entry.c (editor_getline): Don't return the original
9017 string as result, as it will be released by lexer once it has done
9018 using it.
9019
cdfb3d22 90202008-08-01 Robert Millan <rmh@aybabtu.com>
9021
9022 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
9023 within menuentries, not before them.
9024 util/grub.d/10_hurd.in: Likewise.
9025
9175e93d 90262008-08-01 Bean <bean123ch@gmail.com>
9027
9028 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
9029 (bufio_mod_SOURCES): New macro.
9030 (bufio_mod_CFLAGS): Likewise.
9031 (bufio_mod_LDFLAGS): Likewise.
9032
9033 * include/grub/bufio.h: New file.
9034
9035 * io/bufio.c: Likewise.
9036
9037 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
9038 (grub_video_reader_png): Use grub_buffile_open to open file.
9039
9040 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
9041 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
9042
9043 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
9044 (grub_video_reader_tga): Use grub_buffile_open to open file.
9045
9046 * font/manager.c: Include <grub/bufio.h>.
9047 (add_font): Use grub_buffile_open to open file.
9048
3d8383e7 90492008-07-31 Robert Millan <rmh@aybabtu.com>
9050
9051 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
9052 ELF segments, use a macro for arbitrarily accessing any of them instead
9053 of preparing a pointer that allows access to one at a time.
9054 (grub_multiboot_load_elf64): Likewise.
9055
16e641b6 90562008-07-31 Bean <bean123ch@gmail.com>
9057
9058 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
9059 GRUB_KERNEL_MACHINE_DATA_END.
9060
59198b72 90612008-07-30 Robert Millan <rmh@aybabtu.com>
9062
9063 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
9064 Increase from 0x50 to 0x60.
9065 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
9066 use UUIDs to identify the root drive for them. If that's not
9067 possible, abort.
9068 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
9069 check, for cross-disk installs.
9070
ae88bca3 90712008-07-30 Robert Millan <rmh@aybabtu.com>
9072
9073 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
9074 is non-empty, use it to set the `prefix' environment variable instead
9075 of the usual approach.
9076 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
9077 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
9078 environment variable instead of dummy make_install_device().
9079
9080 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
9081 (start): Insert a data section, with `grub_prefix' variable.
825aa57a 9082 * kern/i386/linuxbios/startup.S: Likewise.
ae88bca3 9083
9084 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
9085 New variable reference.
9086 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
9087 New macro. Defines offset of `grub_prefix' within startup.S (relative
9088 to `start').
9089 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
9090 section within startup.S (relative to `start').
9091 * include/grub/i386/coreboot/kernel.h: Likewise.
9092
9093 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
9094 Overwrite grub_prefix with its contents, at the beginning of the
9095 first segment.
9096 (main): Understand -p|--prefix.
9097
14f41dd1 90982008-07-30 Robert Millan <rmh@aybabtu.com>
9099
9100 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
9101
4ca049a3 91022008-07-30 Robert Millan <rmh@aybabtu.com>
9103
9104 * term/i386/pc/vga_text.c (grub_console_cls): Use
9105 grub_console_gotoxy() to go back to beginning of the screen.
9106 Found by Patrick Georgi <patrick.georgi@coresystems.de>
9107
2921d337 91082008-07-29 Christian Franke <franke@computer.org>
9109
9110 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
9111 Add conversion of emulated mount points on Cygwin.
9112
b609876d 91132008-07-29 Christian Franke <franke@computer.org>
9114
9115 * util/update-grub.in: Add a check for admin
9116 group on Cygwin.
9117 Remove old `grub.cfg.new' before creation.
9118 Add `-f' to `mv' to handle the different filesystem
9119 semantics of Windows.
9120
e93e4679 91212008-07-29 Bean <bean123ch@gmail.com>
9122
9123 * normal/main.c (get_line): Fix buffer overflow bug.
9124
41694fd0 91252008-07-28 Robert Millan <rmh@aybabtu.com>
9126
9127 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
9128 (struct grub_apple_header): New struct. Describes the layout of
9129 the partmap header.
9130 (apple_partition_map_iterate): Check the header magic as well as the
9131 partition magic (which was already being checked).
9132
cfd0b4e6 91332008-07-28 Pavel Roskin <proski@gnu.org>
9134
9135 * genmk.rb: Add a warning to the beginning of the output that
9136 it's a generated file and should not be edited.
9137
93cce016 91382008-07-28 Robert Millan <rmh@aybabtu.com>
9139
9140 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
9141 with the same number are found, just use issue a warning with
9142 grub_dprintf(), as this error has been reported to be non-fatal.
c298def0 9143
cd1df915 91442008-07-27 Robert Millan <rmh@aybabtu.com>
9145
9146 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
9147 information.
9148
b70a8427 91492008-07-27 Bean <bean123ch@gmail.com>
9150
9151 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
9152 (grub_fat_find_dir): Ignore case when comparing filename.
9153
8f5e379f 91542008-07-27 Bean <bean123ch@gmail.com>
9155
9156 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
9157 smallino, as it's more descriptive, and i8count can be confused with
9158 the other field count.
9159 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
9160 inode type.
9161
a85cd5a0 91622008-07-27 Bean <bean123ch@gmail.com>
9163
9164 * commands/crc.c: New file.
9165
9166 * lib/crc.c: Likewise.
9167
9168 * include/grub/lib/crc.h: Likewise.
9169
9170 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
9171
9172 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
9173 (hexdump): Move this function to ...
9174
9175 * lib/hexdump.c: ... here.
9176
9177 * include/grub/hexdump.h: Renamed to ...
9178
9179 * include/grub/lib/hexdump.h: ... this.
9180
9181 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
9182
9183 * util/grub-editenv.c: Likewise.
9184
9185 * include/envblk.h: Renamed to ...
9186
9187 * include/lib/envblk.h: ... this.
9188
9189 * util/envblk.c: Renamed to ...
9190
9191 * lib/envblk.c: ... this.
9192
9193 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
9194 lib/hexdump.c.
9195 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
9196 (pkglib_MODULES): Add crc.mod.
9197 (hexdump_mod_SOURCES): Add lib/hexdump.c.
9198 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
9199 (crc_mod_SOURCES): New macro.
9200 (crc_mod_CFLAGS): Likewise.
9201 (crc_mod_LDFLAGS): Likewise.
9202
9203 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
9204
9205 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9206
9207 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
9208
9209 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9210
9211 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
9212
c298def0 92132008-07-27 Felix Zielcke <fzielcke@z-51.de>
8749e9e5 9214
9215 * commands/help.c: Include <grub/term.h>.
9216 (TERM_WIDTH): Removed. Updated all users.
9217
cc349fb3 92182008-07-27 Pavel Roskin <proski@gnu.org>
9219
9220 * util/getroot.c (find_root_device): Rephrase a comment to avoid
9221 spurious warnings about a comment within a comment.
9222
9051607e 92232008-07-25 Robert Millan <rmh@aybabtu.com>
9224
9225 * util/getroot.c (find_root_device): Skip devices that match
9226 /dev/dm-[0-9]. This lets the real device be found for any type of
9227 abstraction (LVM, EVMS, RAID..).
9228 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
9229 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
9230 device is found first, find_root_device() will now skip it.
9231
01453bfc 92322008-07-24 Pavel Roskin <proski@gnu.org>
9233
9234 * include/grub/types.h: Use __builtin_bswap32() and
9235 __builtin_bswap64() with gcc 4.3 and newer.
9236
6af9849f 92372008-07-24 Christian Franke <franke@computer.org>
9238
3a0fa256 9239 * util/i386/pc/grub-install.in: If `--debug' is specified,
9240 pass `--verbose' to grub-setup.
9241 Abort script if make_system_path_relative_to_its_root() fails.
9242
7810e747 92432008-07-24 Bean <bean123ch@gmail.com>
9244
9245 * configure.ac: Fixed a bug caused by the previous cygwin patch,
9246 variable `target_platform' should be `platform'.
9247
42290e17 92482008-07-24 Bean <bean123ch@gmail.com>
9249
51cc5193 9250 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
42290e17 9251 (grub_png_init_fixed_block): New function.
9252 (grub_png_decode_image_data): Handle fixed huffman code compression.
9253
2a8a80e4 92542008-07-24 Bean <bean123ch@gmail.com>
9255
9256 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
9257 (grub_pe2elf_SOURCES): New macro.
9258 (CLEANFILES): Add grub-pe2elf.
9259
9260 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
9261 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
9262 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
9263 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
9264 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
9265 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
9266 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
9267 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
9268 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
9269 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
9270 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
9271 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
9272 (GRUB_PE32_DT_FUNCTION): Likewise.
9273 (GRUB_PE32_REL_I386_DIR32): Likewise.
9274 (GRUB_PE32_REL_I386_REL32): Likewise.
9275 (grub_pe32_symbol): New structure.
9276 (grub_pe32_reloc): Likewise.
9277
9278 * util/grub-pe2elf.c: New file.
9279
9280 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
9281 start symbol in non pc platform.
9282
9283 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
9284
9285 The following patches are from Christian Franke.
9286
9287 * include/grub/dl.h: Remove .previous, gas supports this only
9288 for ELF format.
9289
9290 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
9291 Remove .type, gas supports this only for ELF format.
9292
9293 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
9294 nullbytes in symbol table. This fixes an infinite loop if table is
9295 zero filled.
9296
9297 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
9298 TARGET_IMG_LDFLAGS and EXEEXT.
9299
9300 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
9301 TARGET_IMG_LDFLAGS_AC.
9302 (grub_CHECK_STACK_ARG_PROBE): New function.
9303
9304 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
9305
9306 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
9307
9308 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
9309 to set TARGET_IMG_LD* accordingly.
9310 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
9311 Add call to grub_CHECK_STACK_ARG_PROBE.
9312 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
9313
9314 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
9315
9316 * genmk.rb: Add EXEEXT to CLEANFILES.
9317
12ccdb75 93182008-07-23 Robert Millan <rmh@aybabtu.com>
9319
9320 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
9321 define the codes for arrows and lines used for the menu).
9322 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
9323 as well.
9324
9325 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
9326 fonts, because the latter are too slow.
9327
18eeaf04 93282008-07-21 Bean <bean123ch@gmail.com>
9329
9330 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
9331 a20. Run keyboard test last, as it will cause macbook to halt.
9332
b095e2ad 93332008-07-18 Pavel Roskin <proski@gnu.org>
9334
9335 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
9336 load foreign architecture modules correctly anyway. Keep
9337 support for loading host architecture modules, whether we
9338 compile them or not.
9339
737feb35 93402008-07-17 Pavel Roskin <proski@gnu.org>
9341
3f4ce737 9342 * configure.ac: Use -m32 or -m64 regardless of whether we had to
9343 change target_cpu. The compiler default can mismatch target_cpu
9344 in any case.
9345
4ad2d049 9346 * disk/efi/efidisk.c: Fix format warnings on x86_64.
9347 * kern/efi/efi.c: Likewise.
9348
f6130a12 9349 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
9350 target compiler is functional.
9351 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
9352 are set up.
9353
58393a2d 9354 * configure.ac: Default to efi platform for x86_64-apple. Allow
9355 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
9356 adjustments from the rest, only do them if target is not
9357 explicitly given. Merge other adjustments with the final sanity
9358 check. Remove an extraneous check for supported CPU. Be
9359 specific which CPU and which platform is not supported.
9360
737feb35 9361 * configure.ac: Default to pc platform for x86_64.
9362
546f966a 93632008-07-17 Robert Millan <rmh@aybabtu.com>
9364
9365 Partial LinuxBIOS -> Coreboot rename.
9366
9367 * conf/i386-linuxbios.rmk: Renamed to ...
9368 * conf/i386-coreboot.rmk: ... this.
9369 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
9370 * configure.ac: Accept "coreboot" as input platform (but maintain
9371 compatibility with "linuxbios").
9372 * include/grub/i386/linuxbios: Renamed to ...
9373 * include/grub/i386/coreboot: ... this.
9374
20011694 93752008-07-17 Bean <bean123ch@gmail.com>
9376
9377 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
c11f6d16 9378 (appleldr_mod_SOURCE): New variable.
20011694 9379 (appleldr_mod_CFLAGS): Likewise.
9380 (appleldr_mod_LDFLAGS): Likewise.
9381 (pci_mod_SOURCES): Likewise.
9382 (pci_mod_CFLAGS): Likewise.
9383 (pci_mod_LDFLAGS): Likewise.
9384 (lspci_mod_SOURCES): Likewise.
9385 (lspci_mod_CFLAGS): Likewise.
9386 (lspci_mod_LDFLAGS): Likewise.
9387
9388 * conf/x86_64-efi.rmk: New file.
9389
9390 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
9391 macro.
9392 (grub_efidisk_write): Likewise.
9393
9394 * include/efi/api.h (efi_call_0): New macro.
9395 (efi_call_1): Likewise.
9396 (efi_call_2): Likewise.
9397 (efi_call_3): Likewise.
9398 (efi_call_4): Likewise.
9399 (efi_call_5): Likewise.
9400 (efi_call_6): Likewise.
9401
9402 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
9403 grub_rescue_cmd_chainloader.
9404
9405 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
9406 (grub_pe32_optional_header): Change some fields based on i386 or
9407 x86_64 platform.
9408 (GRUB_PE32_PE32_MAGIC): Likewise.
9409
9410 * include/grub/efi/uga_draw.h: New file.
9411
9412 * include/grub/elf.h (STN_ABS): New constant.
9413 (R_X86_64_NONE): Relocation constant for x86_64.
9414 (R_X86_64_64): Likewise.
9415 (R_X86_64_PC32): Likewise.
9416 (R_X86_64_GOT32): Likewise.
9417 (R_X86_64_PLT32): Likewise.
9418 (R_X86_64_COPY): Likewise.
9419 (R_X86_64_GLOB_DAT): Likewise.
9420 (R_X86_64_JUMP_SLOT): Likewise.
9421 (R_X86_64_RELATIVE): Likewise.
9422 (R_X86_64_GOTPCREL): Likewise.
9423 (R_X86_64_32): Likewise.
9424 (R_X86_64_32S): Likewise.
9425 (R_X86_64_16): Likewise.
9426 (R_X86_64_PC16): Likewise.
9427 (R_X86_64_8): Likewise.
9428 (R_X86_64_PC8): Likewise.
9429
9430 * include/grub/i386/efi/pci.h: New file.
9431
9432 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
9433 Change it value based on platform.
9434 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
9435 (GRUB_E820_RAM): Likewise.
9436 (GRUB_E820_RESERVED): Likewise.
9437 (GRUB_E820_ACPI): Likewise.
9438 (GRUB_E820_NVS): Likewise.
9439 (GRUB_E820_EXEC_CODE): Likewise.
9440 (GRUB_E820_MAX_ENTRY): Likewise.
9441 (grub_e820_mmap): New structure.
9442 (linux_kernel_header): Change the efi field according to different
9443 kernel version, also field from linux_kernel_header.
9444
9445 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
9446
9447 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
9448 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
9449 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
9450 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
9451 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
9452 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
9453 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
9454 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
9455 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
9456 (GRUB_PCI_ADDR_IO_MASK): Likewise.
9457
9458 * include/grub/x86_64/efi/kernel.h: New file.
9459
9460 * include/grub/x86_64/efi/loader.h: Likewise.
9461
9462 * include/grub/x86_64/efi/machine.h: Likewise.
9463
9464 * include/grub/x86_64/efi/pci.h: Likewise.
9465
9466 * include/grub/x86_64/efi/time.h: Likewise.
9467
9468 * include/grub/x86_64/linux.h: Likewise.
9469
9470 * include/grub/x86_64/setjmp.h: Likewise.
9471
9472 * include/grub/x86_64/time.h: Likewise.
9473
9474 * include/grub/x86_64/types.h: Likewise.
9475
9476 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
9477 GRUB_TARGET_SIZEOF_VOID_P.
9478
9479 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
9480 (grub_efi_locate_handle): Likewise.
9481 (grub_efi_open_protocol): Likewise.
9482 (grub_efi_set_text_mode): Likewise.
9483 (grub_efi_stall): Likewise.
9484 (grub_exit): Likewise.
9485 (grub_reboot): Likewise.
9486 (grub_halt): Likewise.
9487 (grub_efi_exit_boot_services): Likewise.
9488 (grub_get_rtc): Likewise.
9489
9490 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
9491 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
9492 (grub_efi_allocate_pages): Wrap efi calls.
9493 (grub_efi_free_pages): Wrap efi calls.
9494 (grub_efi_get_memory_map): Wrap efi calls.
9495
9496 * kern/x86_64/dl.c: New file.
9497
9498 * kern/x86_64/efi/callwrap.S: Likewise.
9499
9500 * kern/x86_64/efi/startup.S: Likewise.
9501
9502 * loader/efi/appleloader.c: Likewise.
9503
9504 * loader/efi/chainloader.c (cmdline): New variable.
9505 (grub_chainloader_unload): Wrap efi calls.
9506 (grub_chainloader_boot): Likewise.
9507 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
9508 command line.
9509
9510 * loader/efi/chainloader_normal.c (chainloader_command):
9511 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
9512 command line.
9513
9514 * loader/i386/efi/linux.c (allocate_pages): Change allocation
9515 method.
9516 (grub_e820_add_region): New function.
9517 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
9518 booting.
9519 (grub_find_video_card): New function.
9520 (grub_linux_setup_video): New function.
9521 (grub_rescue_cmd_linux): Probe for video information.
9522
9523 * normal/x86_64/setjmp.S: New file.
9524
9525 * term/efi/console.c (map_char): New function.
9526 (grub_console_putchar): Map unicode char.
9527 (grub_console_checkkey): Wrap efi calls.
9528 (grub_console_getkey): Likewise.
9529 (grub_console_getwh): Likewise.
9530 (grub_console_gotoxy): Likewise.
9531 (grub_console_cls): Likewise.
9532 (grub_console_setcolorstate): Likewise.
9533 (grub_console_setcursor): Likewise.
9534
9535 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
9536
59652a20 95372008-07-16 Pavel Roskin <proski@gnu.org>
9538
ef294055 9539 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
9540 format strings.
9541
59652a20 9542 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
9543 pointer, not an integer. This fixes a warning and prevents
9544 precision loss on 64-bit systems.
9545 (relocate_addresses): Remove unneeded cast.
9546
afc3b5d7 95472008-07-15 Pavel Roskin <proski@gnu.org>
9548
506b2b3e 9549 * kern/i386/ieee1275/init.c: Include grub/cache.h.
9550
62ead89c 9551 * term/ieee1275/ofconsole.c: Disable code unused on i386.
9552
c4cd51d7 9553 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
9554 Fix comparison between signed and unsigned.
9555
0d3d8f28 9556 * include/grub/i386/ieee1275/console.h: Declare
9557 grub_console_init() and grub_console_fini().
9558
8804b286 9559 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
9560 It's empty and unused.
9561
ee01cf35 9562 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
9563 beginning to avoid warnings with some compilers.
9564
afc3b5d7 9565 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
9566 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
9567
e4e8eaa5 95682008-07-14 Pavel Roskin <proski@gnu.org>
9569
407aceb4 9570 * kern/env.c (grub_register_variable_hook): Don't copy empty
9571 string, it leaks memory. Pass "" to grub_env_set(), it should
9572 handle constant strings.
9573
e4e8eaa5 9574 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
9575 * commands/cmp.c (grub_cmd_cmp): Likewise.
9576 * kern/dl.c (grub_dl_flush_cache): Likewise.
9577 (grub_dl_load_core): Likewise.
9578 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
9579 (grub_elf64_load_phdrs): Likewise.
9580
d4e2dad3 95812008-07-13 Pavel Roskin <proski@gnu.org>
9582
9583 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
9584 between signed and unsigned.
9585 (LzmaEnc_Finish): Fix warning about an unused parameter.
9586
aa24b516 95872008-07-13 Bean <bean123ch@gmail.com>
9588
9589 * Makefile.in (enable_lzo): New rule.
9590
9591 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
9592
9593 * configure.ac (ENABLE_LZO): New option --enable-lzo.
9594
9595 * boot/i386/pc/lnxboot.S: #include <config.h>.
9596
9597 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
fe987087 9598 its value according to the compression algorithm used, lzo or lzma.
aa24b516 9599
9600 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
9601 compression algorithm according to configure macro.
9602
9603 * kern/i386/pc/startup.S (codestart): Likewise.
9604
9605 * kern/i386/pc/lzma_decode.S: New file.
9606
9607 * include/grub/lib/LzFind.h: Likewise.
9608
9609 * include/grub/lib/LzHash.h: Likewise.
9610
9611 * include/grub/lib/LzmaDec.h: Likewise.
9612
9613 * include/grub/lib/LzmaEnc.h: Likewise.
9614
9615 * include/grub/lib/LzmaTypes.h: Likewise.
9616
9617 * lib/LzFind.c: Likewise.
9618
9619 * lib/LzmaDec.c: Likewise.
9620
9621 * lib/LzmaEnc.c: Likewise.
9622
4ae821ac 96232008-07-13 Bean <bean123ch@gmail.com>
9624
9625 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
9626 (grub_ext4_extent_header): New structure.
9627 (grub_ext4_extent): Likewise.
9628 (grub_ext4_extent_idx): Likewise.
9629 (grub_ext4_find_leaf): New function.
9630 (grub_ext2_read_block): Handle extents.
9631
9a745147 96322008-07-12 Robert Millan <rmh@aybabtu.com>
9633
9634 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
9635
d49a4cf6 96362008-07-11 Robert Millan <rmh@aybabtu.com>
9637
9638 * util/grub.d/40_custom.in: New file. Example on how to add custom
9639 entries to /etc/grub.d.
9640 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
9641 40_custom (implicitly, by merging all the grub.d rules).
9642
947414b4 96432008-07-11 Pavel Roskin <proski@gnu.org>
9644
0059cf6f 9645 * commands/read.c (grub_getline): Fix invalid memory access.
9646 Don't add newline to the variable value.
9647
947414b4 9648 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
9649 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
9650 (serial_hw_get_port): Check validity of the port number.
9651 (grub_cmd_serial): Check return value of serial_hw_get_port().
9652
62a02d00 96532008-07-07 Pavel Roskin <proski@gnu.org>
9654
9655 * boot/i386/pc/diskboot.S (notification_string): Replace
9656 "Loading kernel" with just "loading". This is shorter, less
9657 confusing and saves a few bytes for possible future changes.
9658
3e5581b0 96592008-07-05 Pavel Roskin <proski@gnu.org>
9660
ea387a48 9661 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
9662 size for ATAPI devices, they are undefined. Output sector
9663 number in decimal form.
9664
3e5581b0 9665 * disk/ata.c: Use named constants for status bits.
9666
fdecb8fd 96672008-07-04 Pavel Roskin <proski@gnu.org>
9668
bcd35b90 9669 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
9670 grub_addr_t before casting it to the void pointer to fix a
9671 warning. Non-addressable regions are discarded earlier.
9672 (grub_arch_modules_addr): Cast _end to grub_addr_t.
9673 * kern/i386/linuxbios/table.c: Include grub/misc.h.
9674 (check_signature): Don't shadow table_header.
9675 (grub_linuxbios_table_iterate): Cast numeric constants to
9676 grub_linuxbios_table_header_t.
9677 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
9678 grub_stop().
9679
af58ab3d 9680 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
9681 prevent warnings.
9682
1759aa57 9683 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
9684 pointer, which can cause warnings. Support 64-bit addresses.
9685
fdecb8fd 9686 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
9687 of sizeof(long). This fixes PowerPC image generation on x86_64.
9688
8516d2a8 96892008-07-04 Robert Millan <rmh@aybabtu.com>
9690
9691 This fixes a performance issue when pc & gpt partmap iterators
9692 didn't abort iteration even after our hook found what it was
fe987087 9693 looking for (often causing expensive probes of non-existent drives).
8516d2a8 9694
9695 Some callers relied on previous buggy behaviour, since they would
34c44600 9696 raise an error when their own hooks caused early abortion of its
8516d2a8 9697 iteration.
9698
9699 * kern/device.c (grub_device_open): Improve error message.
9700 * disk/lvm.c (grub_lvm_open): Likewise.
9701 * disk/raid.c (grub_raid_open): Likewise.
9702
9703 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
9704 when hook requests it, independently of grub_errno.
9705 (pc_partition_map_probe): Do not fail when find_func() caused
9706 early abortion of pc_partition_map_iterate().
9707
9708 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
9709 when hook requests it, independently of grub_errno.
9710 (gpt_partition_map_probe): Do not fail when find_func() caused
9711 early abortion of gpt_partition_map_iterate().
9712
9713 * kern/partition.c (grub_partition_iterate): Abort parent iteration
9714 when hook requests it, independently of grub_errno. Do not fail when
9715 part_map_iterate_hook() caused early abortion of p->iterate().
9716
9717 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
9718 when grub_partition_iterate() returned with non-zero.
9719
277d0de9 97202008-07-03 Pavel Roskin <proski@gnu.org>
9721
9722 * disk/ata.c (grub_ata_pio_write): Check status before writing,
9723 like we do in grub_ata_pio_read().
9724 (grub_ata_readwrite): Always write individual sectors. Fix the
9725 sector count for the remainder.
9726 (grub_ata_write): Enable writing to ATA devices. Correctly
9727 report error for ATAPI devices.
9728
d4c9b428 97292008-07-02 Pavel Roskin <proski@gnu.org>
9730
e43fc690 9731 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
9732 warning.
9733
f707af42 9734 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
9735 for every read sector, we already increment it for the whole
9736 batch. This fixes reading more than 256 sectors at once.
9737
11e16b15 9738 * util/grub-editenv.c (cmd_info): Cast argument to long
9739 explicitly. ptrdiff_t reduces to int on i386.
9740
cbabfdd4 9741 * util/grub-editenv.c (main): Be specific which parameter is
9742 missing.
9743
b8fbce0a 9744 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
9745 (memdisk): Make memdisk_orig_addr a pointer.
9746
c9c8e606 9747 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
9748 for file offsets, use grub_off_t instead. Fix printf format
9749 warnings.
9750
ca62e598 9751 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
9752 there. Real unexpected warnings should not drown in the noise
9753 about known problems.
9754
ce8d1766 9755 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
9756 grub_disk_addr_t for memory addresses.
9757
00c7a56a 9758 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
9759 explicitly to fix a warning.
9760
08d3ef09 9761 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
9762
cb71ba20 9763 * Makefile.in (MODULE_LDFLAGS): New variable.
9764 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
9765 the linker accepts --build-id=none.
9766 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
9767 MODULE_LDFLAGS.
9768 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
9769
d4c9b428 9770 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
9771 those in Linux XFS code. Provide a way to access 64-bit parent
9772 inode.
9773 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
9774 the end of struct grub_xfs_dir_header.
9775
d4156eee 97762008-07-02 Bean <bean123ch@gmail.com>
9777
9778 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
9779 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
9780 and GRUB_IEEE1275_FLAG_NO_ANSI.
9781
9782 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
9783 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
9784 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
9785
9786 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
9787 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
9788
9789 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
9790 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
9791
9792 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
9793 esc sequence on non ANSI terminal.
9794 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
9795
9796 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
9797 beginning of file.
9798
2270f77b 97992008-07-02 Bean <bean123ch@gmail.com>
9800
9801 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
9802 (grub_editenv_SOURCES): New variable.
9803 (pkglib_MODULES): Add loadenv.mod.
9804 (loadenv_mod_SOURCES): New variable.
9805 (loadenv_mod_CFLAGS): Likewise.
9806 (loadenv_mod_LDFLAGS): Likewise.
9807
9808 * include/grub/envblk.h: New file.
9809
9810 * util/envblk.c: New file.
9811
9812 * util/grub-editenv.c: New file.
9813
9814 * commands/loadenv.c: New file.
9815
0e9e51ec 98162008-07-01 Pavel Roskin <proski@gnu.org>
9817
d89b7634 9818 * include/multiboot2.h (struct multiboot_tag_module): Use char,
9819 not unsigned char. This fixes warnings and is consistent with
9820 other tags.
9821
bf1835b1 9822 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
9823
8222a04b 9824 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
9825
6a42d99d 9826 * term/tparm.c (analyze): Always set *popcount.
9827
10b159d1 9828 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
9829 cast to fix a warning.
9830
b8789f6c 9831 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
9832 cast to suppress a warning.
9833
29d7e38a 9834 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
9835 grub_fshelp_read_file() expects.
9836
f341f669 9837 * fs/fat.c: Fix UUID calculation on big-endian systems. We
9838 write uuid as a 32-bit value in CPU byte order, so declare and
9839 use it as such.
9840
0e9e51ec 9841 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
9842 long if the format specifier expects it.
9843 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
9844 * partmap/pc.c (pc_partition_map_iterate): Likewise.
9845 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
9846 long to fix a warning.
9847 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
9848 grub_dprintf() arguments to fix warnings.
9849
3aefa857 98502008-06-30 Pavel Roskin <proski@gnu.org>
9851
56c7668b 9852 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
9853 install_bsd_part immediately before core.img is embedded or
9854 modified on disk. This fixes core.img verification if core.img
9855 cannot be embedded.
9856
3aefa857 9857 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
9858 core_path to calculate the blocklist.
9859 Patch from Javier Martín <lordhabbit@gmail.com>
9860
5444088d 98612008-06-29 Robert Millan <rmh@aybabtu.com>
9862
9863 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
9864 block to disk block.
9865 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
9866 Patch from Niels Böhm <bitbucket@arcor.de>
9867
674835c8 98682008-06-29 Robert Millan <rmh@aybabtu.com>
9869
9870 * util/update-grub_lib.in (font_path): Search for fonts in
9871 /boot/grub first, which is more likely to be readable (we aren't
9872 deciding where fonts live, just looking for them).
9873
f527dbc8 98742008-06-26 Pavel Roskin <proski@gnu.org>
9875
6c2d8df6 9876 * util/biosdisk.c (read_device_map): Don't leave dead map
9877 entries for devices failing stat() check.
9878
f527dbc8 9879 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
9880 core_path_dev for the core.img path on the target device.
9881
aebe3d13 98822008-06-26 Robert Millan <rmh@aybabtu.com>
9883
9884 * disk/fs_uuid.c: New file.
9885 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
9886 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
9887 (fs_uuid_mod_LDFLAGS): New variables.
9888 * include/grub/disk.h (grub_disk_dev_id): Add
9889 `GRUB_DISK_DEVICE_UUID_ID'.
9890 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
9891 implement iterate().
9892
37aaf354 98932008-06-26 Robert Millan <rmh@aybabtu.com>
9894
9895 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
9896 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
9897 Linux image includes no initrd.
9898
25ff262a 98992008-06-21 Javier Martín <lordhabbit@gmail.com>
9900
9901 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
9902 call to resolve the core image location that effectively appended the
9903 name twice.
9904
76a2bd44 99052008-06-21 Robert Millan <rmh@aybabtu.com>
9906
9907 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
9908 call from here ...
9909
9910 * util/grub.d/10_hurd.in: ... to here ...
9911 * util/grub.d/10_linux.in: ... and here.
9912
650e1c79 99132008-06-19 Robert Millan <rmh@aybabtu.com>
9914
fe987087 9915 * kern/main.c (grub_main): Export `prefix' variable immediately
650e1c79 9916 after it has been set by grub_machine_set_prefix().
9917
6ce63911 99182008-06-19 Robert Millan <rmh@aybabtu.com>
9919
9920 * commands/search.c (search_label, search_fs_uuid, search_file): Print
9921 search result when not saving to variable, not the other way around.
9922 When saving to variable, abort iteration as soon as a match is found.
9923
73940cec 99242008-06-19 Robert Millan <rmh@aybabtu.com>
9925
9926 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
9927 check for partition that provides /boot/grub. Its logic is flawed,
9928 as it prevents prepare_grub_to_access_device() from being called
9929 multiple times.
9930
3c62a39d 99312008-06-19 Robert Millan <rmh@aybabtu.com>
9932
9933 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
9934 "insmod" command directly when abstraction modules are needed,
fe987087 9935 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
3c62a39d 9936 since it had already been processed).
9937
47395a42 99382008-06-19 Pavel Roskin <proski@gnu.org>
9939
9940 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
9941 changed. This is needed in case GRUB_LIBDIR changes.
9942 * conf/i386-ieee1275.rmk: Likewise.
9943 * conf/i386-linuxbios.rmk: Likewise.
9944 * conf/i386-pc.rmk: Likewise.
9945 * conf/powerpc-ieee1275.rmk: Likewise.
9946
a145ac2d 99472008-06-18 Pavel Roskin <proski@gnu.org>
9948
9949 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
9950 kernel_elf_symlist.c to symlist.c for consistency with other
9951 architectures. Update all users.
9952 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
9953
7847c51e 99542008-06-18 Robert Millan <rmh@aybabtu.com>
9955
9956 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
9957 it in prefix.
9958
9959 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
9960 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
9961 a RAID device, run setup() for all members independently on whether
9962 LVM abstraction is being used.
9963 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
9964 If grub-mkimage has set `*install_dos_part == -2', don't override this
9965 value.
9966 Perform *install_dos_part adjustments independently on whether
9967 we're embedding or not.
9968 Clarify error message when image is too big for embedding.
9969 Remove duplicate *install_dos_part stanza.
9970
b23e5644 99712008-06-17 Robert Millan <rmh@aybabtu.com>
9972
9973 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
9974 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
9975 variables.
9976 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
9977 values in grub_ofconsole_normal_color and
9978 grub_ofconsole_highlight_color (they're not directly related to
9979 background and foreground).
9980 (grub_ofconsole_setcolorstate): Extract background and foreground
9981 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
9982
0aac2f79 99832008-06-17 Robert Millan <rmh@aybabtu.com>
9984
9985 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
9986 /boot/grub for the check in last commit, not /boot (they could be
9987 different partitions).
9988
3cca7ef3 99892008-06-16 Robert Millan <rmh@aybabtu.com>
9990
9991 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
9992 asked to setup access for the same partition that provides /boot,
9993 don't bother using UUIDs since our root already has the value we
9994 want.
9995
347396d8 99962008-06-16 Robert Millan <rmh@aybabtu.com>
9997
9998 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
9999 I2O devices.
10000 Patch from Sven Mueller <sven@debian.org>.
10001
991477f8 100022008-06-16 Robert Millan <rmh@aybabtu.com>
10003
10004 * util/update-grub.in: Check for $EUID instead of $UID.
10005 Reported by Vincent Zweije.
10006
d31a32a1 100072008-06-16 Bean <bean123ch@gmail.com>
10008
fe987087 10009 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
d31a32a1 10010 (grub_ext2_read_block): Likewise.
10011 (grub_ext2_read_inode): Likewise.
10012 (grub_ext2_mount): Likewise.
10013 (grub_ext2_close): Likewise.
10014 (grub_ext3_get_journal): Removed.
10015
fe987087 10016 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
d31a32a1 10017 (grub_reiserfs_read_symlink): Likewise.
10018 (grub_reiserfs_mount): Likewise.
10019 (grub_reiserfs_open): Likewise.
10020 (grub_reiserfs_read): Likewise.
10021 (grub_reiserfs_close): Likewise.
10022 (grub_reiserfs_get_journal): Removed.
10023
10024 * fs/fshelp.c (grub_fshelp_read): Removed.
10025 (grub_fshelp_map_block): Likewise.
10026
10027 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
10028 (grub_fshelp_journal): Likewise.
10029 (grub_fshelp_read): Likewise.
10030 (grub_fshelp_map_block): Likewise.
10031
3540a760 100322008-06-16 Pavel Roskin <proski@gnu.org>
10033
10034 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
10035 floating point anymore.
10036 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
10037
95614c84 100382008-06-15 Pavel Roskin <proski@gnu.org>
10039
10040 * commands/ls.c (grub_ls_list_files): Use integer calculations
10041 for human readable format, avoid floating point use.
10042 * kern/misc.c (grub_ftoa): Remove.
10043 (grub_vsprintf): Remove floating point support.
10044
50465dd6 100452008-06-15 Robert Millan <rmh@aybabtu.com>
10046
fe6b695a 10047 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
50465dd6 10048 devices.
10049 Reported by Max Vozeler.
10050
a9207284 100512008-06-15 Robert Millan <rmh@aybabtu.com>
10052
10053 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
10054 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
10055 skipped later.
10056 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
10057 the beginning of the prefix.
10058
10059 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
10060 It is assumed that if we have a memdisk, grub-mkimage has set
10061 grub_prefix to include the "(memdisk)" drive in it.
10062
a7cbd45a 100632008-06-15 Robert Millan <rmh@aybabtu.com>
10064
10065 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
10066 Initialize keyboard controller after registering the terminal, so that
10067 grub_printf() can be called from grub_keyboard_controller_init().
10068
21cf716a 100692008-06-15 Robert Millan <rmh@aybabtu.com>
10070
10071 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
10072 extent-btree which is written as big endian on disk.
10073 Reported by Alain Greppin <al@chilibi.org>.
10074
23a64d8e 100752008-06-14 Robert Millan <rmh@aybabtu.com>
10076
10077 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
10078 * util/i386/pc/grub-install.in (modules): Likewise.
10079
d687651c 100802008-06-13 Pavel Roskin <proski@gnu.org>
10081
10082 * commands/ls.c (grub_ls_list_files): Fix format warnings.
10083
dfe9ddd4 100842008-06-13 Bean <bean123ch@gmail.com>
10085
10086 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
10087
10088 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
10089
10090 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
10091 to indicate sparse block.
10092
16ae7781 100932008-06-12 Pavel Roskin <proski@gnu.org>
10094
e6d1a308 10095 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
10096 number, grub_fshelp_read() does it for us.
10097
16ae7781 10098 * fs/fshelp.c (grub_fshelp_read): New function. Implement
10099 linear disk read with journal translation.
10100 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
10101 * include/grub/fshelp.h: Declare grub_fshelp_read().
10102
40fd3a2b 101032008-06-09 Pavel Roskin <proski@gnu.org>
10104
10105 * fs/minix.c (grub_minix_mount): Handle error reading
10106 superblock.
10107
f5679726 101082008-06-08 Robert Millan <rmh@aybabtu.com>
10109
10110 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
10111 don't append the RAID prefix afterwards.
10112 Reported by Clint Adams.
10113
ce525529 101142008-06-08 Robert Millan <rmh@aybabtu.com>
10115
10116 Based on description from Pavel:
10117 * kern/disk.c (grub_disk_check_range): Rename to ...
10118 (grub_disk_adjust_range): ... this. Add a comment explaining the
10119 tasks performed by this function.
10120
ad4936a0 101212008-06-08 Robert Millan <rmh@aybabtu.com>
10122
10123 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
10124 `num_serial' (for consistency with other variables).
10125 (struct grub_ntfs_data): Add `uuid' member.
10126 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
10127 (grub_ntfs_uuid): New function.
10128 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
10129
dc20b0f9 101302008-06-07 Pavel Roskin <proski@gnu.org>
10131
10132 * util/biosdisk.c (open_device): Revert last change to the
10133 function, it broke installation. The sector needs to be
10134 different dependent on which device is opened.
10135
c5e3cfba 101362008-06-06 Robert Millan <rmh@aybabtu.com>
10137
10138 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
10139 rest of GRUB, and breakage doesn't happen if its value were modified.
10140
10141 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
10142 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
10143 a constant (same value).
10144 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
10145 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
10146
26a1f8c4 101472008-06-06 Robert Millan <rmh@aybabtu.com>
10148
10149 * util/biosdisk.c (open_device): Do not modify sector offset when
10150 accessing a partition. kern/disk.c already handles this for us.
10151
25d6b327 101522008-06-06 Robert Millan <rmh@aybabtu.com>
10153
10154 * util/grub-emu.c (grub_machine_init): Move code in this function from
10155 here ...
10156 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
10157 segfault in case grub_printf() is called).
10158
10159 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
10160 grub_probe. Update all users not to explicitly add it again.
10161 (grub_device): New variable; contains corresponding device for grubdir.
10162 (fs_module, partmap_module, devabstraction_module): Pass
10163 `--device ${grub_device}' to grub_probe to avoid traversing /dev
10164 every time.
10165
9ece62fb 101662008-06-05 Robert Millan <rmh@aybabtu.com>
10167
10168 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
10169 is found, print it (same layout as with labels).
10170
1ad36d37 101712008-06-04 Robert Millan <rmh@aybabtu.com>
10172
10173 * util/biosdisk.c (get_drive): Rename to ...
10174 (find_grub_drive): ... this. Update all users.
10175
10176 (get_os_disk): Rename to ...
10177 (convert_system_partition_to_system_disk): ... this. Update all users.
10178
10179 (find_drive): Rename to ...
10180 (find_system_device): ... this. Update all users.
10181
e6a30859 101822008-06-04 Robert Millan <rmh@aybabtu.com>
10183
10184 * util/biosdisk.c (get_os_disk): Handle IDA devices.
10185 * util/grub-mkdevicemap.c (get_mmc_disk_name)
10186 (make_device_map): Likewise.
10187
00c108a4 101882008-06-01 Robert Millan <rmh@aybabtu.com>
10189
10190 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
10191 before dereferencing it.
10192
10193 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
10194 union with fat12/fat16-specific ones. Add some new fields, including
10195 `num_serial' for both versions.
10196 (struct grub_fat_data): Add `uuid' member.
10197 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
10198 names. Initialize `data->uuid' using `num_serial'.
10199 (grub_fat_uuid): New function.
10200 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
10201
10202 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
10203 (grub_reiserfs_uuid): New function.
10204 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
10205 member.
10206
10207 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
10208 (grub_xfs_uuid): New function.
10209 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
10210
1385c5bb 102112008-06-01 Robert Millan <rmh@aybabtu.com>
10212
10213 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
10214 code that is backward compatible with pre-uuid search command.
10215
c682dfd7 102162008-05-31 Robert Millan <rmh@aybabtu.com>
10217
10218 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
10219 floppies after everything else, to ensure floppy drive isn't accessed
10220 unnecessarily (patch from Bean).
10221
b7db5d47 102222008-05-31 Robert Millan <rmh@aybabtu.com>
10223
10224 * commands/search.c (search_label, search_fs_uuid, search_file): Do
10225 not print device names when we were asked to set a variable.
10226
6e037aa9 102272008-05-31 Robert Millan <rmh@aybabtu.com>
10228
10229 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
10230 using "cursor-on" and "cursor-off" commands (understood at least by
10231 the Open Firmware flavour on OLPC).
10232
41305bc8 102332008-05-31 Michael Gorven <michael@gorven.za.net>
10234
10235 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
10236 on and off sequences.
10237
69ba137e 102382008-05-31 Robert Millan <rmh@aybabtu.com>
10239
10240 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
10241 * util/update-grub.in: Likewise.
10242
520ae21b 102432008-05-30 Pavel Roskin <proski@gnu.org>
10244
10245 * util/biosdisk.c (linux_find_partition): Simplify logic and
10246 make the code more universal. Keep special processing for
10247 devfs, but use a simple rule for all other devices. If the
10248 device ends with a number, append 'p' and the partition number.
10249 Otherwise, append only the partition number.
10250
5786569b 102512008-05-30 Robert Millan <rmh@aybabtu.com>
10252
10253 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
10254 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
10255 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
10256 the `root' parameter to Linux.
10257
51500452 102582008-05-30 Robert Millan <rmh@aybabtu.com>
10259
10260 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
10261 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
10262 --fs_uuid with --fs-uuid.
10263 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
10264 all filesystems support them).
10265
811d3878 102662008-05-30 Robert Millan <rmh@aybabtu.com>
10267
10268 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
f19dbdb7 10269 grub_printf() flags, since we're printing in units of 2 bytes.
811d3878 10270
cab63c95 102712008-05-30 Robert Millan <rmh@aybabtu.com>
10272
10273 * util/grub.d/00_header.in: Remove obsolete comment referencing
10274 convert_system_path_to_grub_path().
10275 * util/update-grub.in: Likewise.
10276 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
10277 (convert_system_path_to_grub_path): Add a warning message explaining
10278 that this function is deprecated. Rely on is_path_readable_by_grub()
10279 for the readability checks.
10280 (font_path): Use is_path_readable_by_grub() for the readability
10281 check rather than convert_system_path_to_grub_path().
10282
972e2f7a 102832008-05-30 Robert Millan <rmh@aybabtu.com>
10284
10285 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
10286 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
10287 converting it first.
10288 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
10289 grub.cfg for access to font file, and afterwards call it again to set
10290 the root device.
10291
62191274 102922008-05-30 Robert Millan <rmh@aybabtu.com>
10293
10294 * commands/search.c (options): Add --fs_uuid option.
10295 (search_fs_uuid): New function.
10296 (grub_cmd_search): Fix --set argument passing.
10297 Use search_fs_uuid() when requested via --fs_uuid.
10298 (grub_search_init): Update help message.
10299 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
10300 and redeclare it as an array of 16-bit words.
10301 (grub_ext2_uuid): New function.
10302 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
10303 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
10304 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
10305 (GRUB_DEVICE_BOOT_UUID): New variables.
10306 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
10307 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
10308 whenever possible.
10309 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
10310 just assume `root' variable has the right value.
10311 * util/grub.d/10_linux.in: Likewise.
10312 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
10313 via PRINT_FS_UUID.
10314 (main): Recognise `-t fs_uuid' argument.
10315
01b73ec8 103162008-05-30 Robert Millan <rmh@aybabtu.com>
10317
10318 * util/biosdisk.c (map): Redefine structure to hold information
10319 about GRUB drive name.
fe6b695a 10320 (get_drive): Reimplement without assuming (and verifying) BIOS-like
01b73ec8 10321 drive names.
10322 (call_hook): Remove.
10323 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
10324 member. Assume drive has partitions.
10325 (grub_util_biosdisk_open): Access device names via `.device' struct
10326 member.
10327 (open_device): Likewise.
10328 (find_drive): Likewise.
10329 (read_device_map): Adjust map[] usage to match the new struct
10330 definition. Don't check for duplicates (still possible, but not cheap
10331 anymore).
10332 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
10333 (make_device_name): Remove assumption of BIOS-like drive names.
10334
22f16596 103352008-05-30 Pavel Roskin <proski@gnu.org>
10336
10337 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
10338 compiling execute.c doesn't need grub_script.tab.h anymore.
10339 (normal/command.c_DEPENDENCIES): Likewise.
10340 (normal/function.c_DEPENDENCIES): Likewise.
10341 * conf/i386-ieee1275.rmk: Likewise.
10342 * conf/i386-linuxbios.rmk: Likewise.
10343 * conf/i386-pc.rmk: Likewise.
10344 * conf/powerpc-ieee1275.rmk: Likewise.
10345 * conf/sparc64-ieee1275.rmk: Likewise.
10346
528ad8f2 103472008-05-29 Pavel Roskin <proski@gnu.org>
10348
d1dff95d 10349 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
10350 when scanning metadata for volume group name.
10351
528ad8f2 10352 * include/grub/script.h: Don't include grub_script.tab.h. It's
10353 a generated file, which may only be included from the files with
10354 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
10355 use union YYSTYPE, as the later allows forward declaration.
10356 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
10357
47248e08 103582008-05-29 Robert Millan <rmh@aybabtu.com>
10359
10360 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
10361 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
10362 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
10363 (grub_console_checkkey): Add grub_dprintf() call to report unknown
10364 scan codes.
10365
ee632529 103662008-05-29 Robert Millan <rmh@aybabtu.com>
10367
10368 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
10369 control key combinations.
10370
eee96e08 103712008-05-29 Robert Millan <rmh@aybabtu.com>
10372
10373 * util/powerpc/ieee1275/grub-install.in: Move from here ...
10374 * util/ieee1275/grub-install.in: ... to here.
10375 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
10376 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
10377 (grub_install_SOURCES): Likewise.
10378
da9a6a94 103792008-05-29 Robert Millan <rmh@aybabtu.com>
10380
10381 * fs/affs.c: Update copyright year.
10382 * fs/ext2.c: Likewise.
10383 * fs/fshelp.c: Likewise.
10384 * fs/hfsplus.c: Likewise.
10385 * fs/ntfs.c: Likewise.
10386 * fs/xfs.c: Likewise.
10387 * include/grub/fshelp.h: Likewise.
10388 * util/grub-mkdevicemap.c: Likewise.
10389
12e65f3a 103902008-05-28 Robert Millan <rmh@aybabtu.com>
10391
10392 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
10393 might need to be fatfs to support some firmware implementations
10394 (e.g. OFW or EFI).
10395
23023641 103962008-05-28 Robert Millan <rmh@aybabtu.com>
10397
10398 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
10399 devices.
10400 * util/grub-mkdevicemap.c (get_mmc_disk_name)
10401 (make_device_map): Likewise.
10402
887d2619 104032008-05-20 Bean <bean123ch@gmail.com>
10404
10405 * fs/fshelp.c (grub_fshelp_map_block): New function.
10406 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
10407 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
10408
10409 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
10410 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
10411 (grub_fshelp_journal): New structure.
10412 (grub_fshelp_map_block): New function prototype.
10413 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
10414 (grub_fshelp_map_block): Likewise.
10415
10416 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
10417 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
10418 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
10419 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
10420 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
10421 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
10422 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
10423 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
10424 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
10425 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
10426 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
10427 (grub_ext2_sblock): New members for journal support.
10428 (grub_ext3_journal_header): New structure.
10429 (grub_ext3_journal_revoke_header): Likewise.
10430 (grub_ext3_journal_block_tag): Likewise.
10431 (grub_ext3_journal_sblock): Likewise.
10432 (grub_fshelp_node): New members logfile and journal.
10433 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
10434 grub_fshelp_map_block to get real block number.
10435 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
10436 number.
10437 (grub_ext2_read_inode): Likewise.
10438 (grub_ext3_get_journal): New function.
10439 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
10440 (grub_ext2_close): Release memory used by journal.
10441
10442 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
10443 (REISERFS_MAGIC_DESC_BLOCK): New macro.
10444 (grub_reiserfs_transaction_header): Renamed to
10445 grub_reiserfs_description_block, replace field data with real_blocks.
10446 (grub_reiserfs_commit_block): New structure.
10447 (grub_reiserfs_data): New member journal.
10448 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
10449 number.
10450 (grub_reiserfs_read_symlink): Likewise.
10451 (grub_reiserfs_iterate_dir): Likewise.
10452 (grub_reiserfs_open): Likewise.
10453 (grub_reiserfs_read): Likewise.
10454 (grub_reiserfs_get_journal): New function.
10455 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
10456 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
10457 using grub_reiserfs_get_journal.
10458 (grub_reiserfs_close): Release memory used by journal.
10459
10460 * fs/affs.c (grub_affs_read_block): Change block type to
10461 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
10462
10463 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
10464
10465 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
10466
10467 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
10468
10469 * fs/udf.c (grub_udf_read_block): Change block type to
10470 grub_disk_addr_t. Use type cast to avoid warning.
10471
10472 * fs/xfs.c (grub_xfs_read_block): Likewise.
10473
b7c6bed5 104742008-05-16 Christian Franke <franke@computer.org>
10475
10476 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
10477 to ensure that break with ESC will always work.
10478 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
10479 Remove ESC from keyboard queue.
10480
eedf167f 104812008-05-16 Christian Franke <franke@computer.org>
10482
10483 * util/biosdisk.c: [__CYGWIN__] Add includes.
10484 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
10485 (get_os_disk): Move variable declarations to OS specific
10486 parts to avoid warning.
10487 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
10488 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
10489 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
10490 Cygwin.
10491 * util/getroot.c: [__CYGWIN__] Add includes.
10492 (strip_extra_slashes): Fix "/" case.
10493 [__CYGWIN__] (get_win32_path): New function.
10494 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
10495 [__CYGWIN__] (find_root_device): Disable.
10496 [__CYGWIN__] (get_bootsec_serial): New function.
10497 [__CYGWIN__] (find_cygwin_root_device): Likewise.
10498 [__linux__] (grub_guess_root_device): Add early returns to simplify
10499 structure.
10500 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
10501 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
10502 check for Linux only.
10503
a079699e 105042008-05-15 Bean <bean123ch@gmail.com>
10505
10506 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
10507 keyboard hang problem in apple's intel mac.
10508
1cf4059a 105092008-05-09 Robert Millan <rmh@aybabtu.com>
10510
10511 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
10512 devices.
10513 * util/grub-mkdevicemap.c (get_virtio_disk_name)
10514 (make_device_map): Likewise.
10515 Reported by Aurelien Jarno <aurel32@debian.org>
10516
ed759390 105172008-05-07 Ian Campbell <ijc@hellion.org.uk>
10518
10519 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
10520 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
10521 (make_device_map): Output entries for xvd type disks.
10522
b56c4eaa 105232008-05-07 Robert Millan <rmh@aybabtu.com>
10524
10525 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
10526 devices.
10527 * util/grub-mkdevicemap.c (get_cciss_disk_name)
10528 (make_device_map): Likewise.
10529 Reported by Roland Dreier <rdreier@cisco.com>
10530
7f8866ed 105312008-05-07 Robert Millan <rmh@aybabtu.com>
10532
10533 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
10534 grub_strstr() call. Correct a few mistakes in failure path handling.
10535
b0346e0f 105362008-05-06 Robert Millan <rmh@aybabtu.com>
10537
10538 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
10539 Do not print a trailing slash (therefore, the root directory is an
10540 empty string).
10541 (convert_system_path_to_grub_path): Do not remove trailing slash
10542 from make_system_path_relative_to_its_root() output.
10543
10544 * util/i386/pc/grub-install.in: Add trailing slash to output from
10545 make_system_path_relative_to_its_root().
10546
6cf12cbd 105472008-05-06 Robert Millan <rmh@aybabtu.com>
10548
10549 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
10550 ensures that output lines aren't intermangled with those sent to
10551 stderr (via grub_util_info()).
10552 * util/grub-probe.c (grub_refresh): Likewise.
10553 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
10554
0fbb3117 105552008-05-05 Christian Franke <franke@computer.org>
10556
10557 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
10558 Add Cygwin device names.
10559 (get_ide_disk_name) [__CYGWIN__]: Likewise.
10560 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
10561 (check_device): Return error instead of success on empty name.
10562 (make_device_map): Move label inside linux specific code to
10563 prevent compiler warning.
10564
8124cdb7 105652008-04-30 Robert Millan <rmh@aybabtu.com>
10566
10567 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
10568 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
10569 first boot option.
10570 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
10571
094c01d0 105722008-04-29 Robert Millan <rmh@aybabtu.com>
10573
10574 * docs/grub.cfg: New file (example GRUB configuration).
10575
f4b1fc02 105762008-04-26 Robert Millan <rmh@aybabtu.com>
10577
329ce2a5 10578 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
10579 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
10580 and `disk/ieee1275/nand.c'.
f4b1fc02 10581
25f16ec1 105822008-04-25 Bean <bean123ch@gmail.com>
f19dbdb7 10583
25f16ec1 10584 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
10585 i386-linuxbios.
10586
10587 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
10588 change the buffer size to 4096 for cdrom device.
10589
10590 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
10591 and nand.mod.
10592 (_linux_mod_SOURCES): New variable.
10593 (_linux_mod_CFLAGS): Likewise.
10594 (_linux_mod_LDFLAGS): Likewise.
10595 (linux_mod_SOURCES): Likewise.
10596 (linux_mod_CFLAGS): Likewise.
10597 (linux_mod_LDFLAGS): Likewise.
10598 (nand_mod_SOURCES): Likewise.
10599 (nand_mod_CFLAGS): Likewise.
10600 (nand_mod_LDFLAGS): Likewise.
10601
10602 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
10603 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
10604 type property. (nand device in olpc don't have this property)
10605
10606 * include/grub/disk.h (grub_disk_dev_id): New macro
10607 GRUB_DISK_DEVICE_NAND_ID.
10608
10609 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
10610 function prototype.
10611 (grub_rescue_cmd_initrd): Likewise.
10612
10613 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
10614 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
10615 ofw_cif_handler and ofw_idt, adjust padding number.
f19dbdb7 10616
25f16ec1 10617 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
10618 GRUB_MACHINE_IEEE1275 is defined.
10619
10620 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
10621 Use NESTED_FUNC_ATTR attribute on the hook parameter.
10622
10623 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
10624 on nested function heap_init.
10625 (grub_upper_mem): New variable for i386-ieee1275.
10626 (grub_get_extended_memory): New function for i386-ieee1275.
10627 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
10628
10629 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
10630 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
10631 property.
f19dbdb7 10632
25f16ec1 10633 * loader/i386/ieee1275/linux.c: New file.
10634
10635 * loader/i386/ieee1275/linux_normal.c: New file.
10636
10637 * disk/ieee1275/nand.c: New file.
10638
e89d61e9 106392008-04-18 Thomas Schwinge <tschwinge@gnu.org>
10640
10641 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
10642 value.
10643 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
10644
602566f6 106452008-04-18 Robert Millan <rmh@aybabtu.com>
10646
10647 Restructures early code path on ieee1275 to unify grub_main() as
10648 the first C function that is executed in every platform.
10649
10650 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
10651 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
10652 cmain().
10653 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
10654 * kern/ieee1275/cmain.c (cmain): Rename to ...
10655 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
10656 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
10657 at the beginning.
10658
57490c2b 106592008-04-18 Robert Millan <rmh@aybabtu.com>
10660
10661 * util/update-grub.in: Fix syntax error when setting
10662 `GRUB_PRELOAD_MODULES'.
10663 Reported by Stephane Chazelas <stephane@artesyncp.com>
10664
1977517d 106652008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
10666
10667 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
10668 section into account, newer toolchains generate unique build ids
10669 * configure.ac: remove the test for --build-id=none acceptance,
e0c5dacb 10670 we want build ids to be preserved
1977517d 10671 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
10672 far from other sections don't cause the raw binary images grow
10673 size
10674
bfb1f1a2 106752008-04-15 Robert Millan <rmh@aybabtu.com>
10676
10677 * disk/lvm.c: Update copyright year.
10678 * kern/misc.c: Likewise.
10679
01979850 106802008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
10681
10682 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
f19dbdb7 10683 there is no memory left for physical volume name.
01979850 10684
0a1150e2 106852008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
10686
10687 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
10688 volume name mapping to support bigger than 9 character names properly.
10689
82ead3fe 106902008-04-13 Robert Millan <rmh@aybabtu.com>
10691
10692 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
10693 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
10694
e54a72f5 106952008-04-13 Christian Franke <franke@computer.org>
10696
10697 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
10698 to create a floppy emulation boot CD when non emulation mode
10699 does not work.
10700 Enable Joliet CD filesystem extension.
10701
9fe86034 107022008-04-13 Robert Millan <rmh@aybabtu.com>
10703
10704 * kern/misc.c (grub_strncat): Fix off-by-one error.
10705 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
10706
10707 * kern/env.c (grub_env_context_close): Clear current context, not
10708 previous one.
10709 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
10710
10711 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
10712
7ceeee39 107132008-04-13 Robert Millan <rmh@aybabtu.com>
10714
10715 Improve robustness when handling LVM.
10716
10717 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
f19dbdb7 10718 (and leave `*p' unmodified).
7ceeee39 10719 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
10720 through it.
10721 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
10722 iterating through it.
10723 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
10724 through it.
fe6b695a 10725 (grub_lvm_scan_device): Check the return value (and fail gracefully
7ceeee39 10726 when due) on each grub_lvm_getvalue() or grub_strstr() call.
10727 Don't assume `vg->pvs != NULL' when iterating through it.
10728
58cd3d85 107292008-04-13 Robert Millan <rmh@aybabtu.com>
10730
10731 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
10732 * genmk.rb (partmap): New variable.
10733 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
10734 (#{partmap}): New target rule.
10735 * genpartmaplist.sh: New file.
10736 * Makefile.in (pkglib_DATA): Add partmap.lst.
10737 (partmap.lst): New target rule.
10738 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
10739 modules (including all partition maps), instead of preloading them.
10740
78b51059 107412007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
10742
10743 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
10744 `linux-boot-prober' (if installed) to detect other operating
10745 systems which are installed on the computer and add them to
10746 the boot menu.
10747 * conf/common.rmk: Build and install 30_os-prober.
10748
a91627b4 107492008-04-12 Robert Millan <rmh@aybabtu.com>
10750
10751 * kern/powerpc/ieee1275/init.c: Move from here ...
10752 * kern/ieee1275/init.c: ... to here. Update all users.
10753
10754 * kern/powerpc/ieee1275/cmain.c: Move from here ...
10755 * kern/ieee1275/cmain.c: ... to here. Update all users.
10756
10757 * kern/powerpc/ieee1275/openfw.c: Move from here ...
10758 * kern/ieee1275/openfw.c: ... to here. Update all users.
10759
10760 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
10761 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
10762
322562ea 107632008-04-10 Pavel Roskin <proski@gnu.org>
10764
10765 * configure.ac: Always use "_cv_" in cache variables for
10766 compatibility with Autoconf 2.62.
10767
a02a73c5 107682008-04-07 Robert Millan <rmh@aybabtu.com>
10769
10770 Revert grub/machine/init.h addition by Pavel (since it breaks on
10771 i386-ieee1275 and others):
10772 * util/i386/pc/misc.c: Remove grub/machine/init.h.
10773 * util/powerpc/ieee1275/misc.c: Likewise.
10774
25c024b1 107752008-04-07 Robert Millan <rmh@aybabtu.com>
10776
10777 * util/grub-probe.c (probe): Improve error message.
10778
3cbd2f98 107792008-04-07 Robert Millan <rmh@aybabtu.com>
10780
10781 * util/biosdisk.c (read_device_map): Skip devices that don't exist
10782 (this prevents the presence of a bogus entry from ruining the whole
10783 thing).
10784
87a297bf 107852008-04-06 Pavel Roskin <proski@gnu.org>
10786
36747a62 10787 * util/biosdisk.c: Include grub/util/biosdisk.h.
10788 * util/grub-fstest.c (execute_command): Make static.
10789 * util/grub-mkdevicemap.c (check_device): Likewise.
10790 * util/i386/pc/misc.c: Include grub/machine/init.h.
10791 * util/powerpc/ieee1275/misc.c: Likewise.
10792 * util/lvm.c: Include grub/util/lvm.h.
10793 * util/misc.c: Include grub/kernel.h, grub/misc.h and
10794 grub/cache.h.
10795 * util/raid.c: Include grub/util/raid.h.
10796 (grub_util_getdiskname): Make static.
10797
87a297bf 10798 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
10799 grub_hostfs_fini(), as they are called from grub_init_all() and
10800 grub_fini_all() respectively. This fixes an infinite loop in
10801 grub-fstest due to double registration of hostfs.
10802 Reported by Christian Franke <Christian.Franke@t-online.de>
10803
f6ce7629 108042008-04-05 Pavel Roskin <proski@gnu.org>
10805
10806 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
10807 all 8 functions. Otherwise, probe function 0 only.
10808
070e49e4 108092008-04-04 Pavel Roskin <proski@gnu.org>
10810
8b088a4c 10811 * commands/lspci.c (grub_lspci_iter): Print the bus number
10812 correctly.
10813
4f657021 10814 * commands/lspci.c (grub_pci_classes): Fix typos.
10815 (grub_lspci_iter): Don't print func twice. Print vendor ID
10816 before device ID, as it's normally done.
10817
070e49e4 10818 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
10819 Fix signedness warnings.
10820 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
10821 Likewise.
10822 * util/ieee1275/get_disk_name.c: Include config.h so that
10823 _GNU_SOURCE is defined and getline() is declared. Mark an
10824 unused argument as such. Fix a signedness warning.
10825
ba7328dc 108262008-04-02 Pavel Roskin <proski@gnu.org>
10827
26887f22 10828 * genkernsyms.sh.in: Use more robust assignments for CC and
10829 srcdir. Quote srcdir.
10830 * gensymlist.sh.in: Likewise. Assert at the compile time that
10831 the symbol table is not empty.
10832
ba7328dc 10833 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
10834 * fs/cpio.c (grub_cpio_read): Likewise.
10835
0f582c6b 108362008-04-01 Pavel Roskin <proski@gnu.org>
10837
4b6e1995 10838 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
10839 * disk/host.c (grub_host_open): Likewise.
10840 * disk/loopback.c (grub_loopback_open): Likewise.
10841 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
10842 disk->id as in disk/host.c, not a multi-character constant.
10843
828a2768 10844 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
10845 later is obsolete, potentially dangerous and sets a bad example.
10846 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
10847 * util/misc.c (grub_util_get_image_size): Likewise.
10848
2bb4fb47 10849 * disk/loopback.c (options): Improve help for "--partitions".
10850
0f582c6b 10851 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
10852 options to align them with the short options, e.g. "echo -e".
10853
a33224e0 108542008-03-31 Bean <bean123ch@gmail.com>
10855
10856 * video/reader/png.c (grub_png_data): New member is_16bit and
10857 image_data.
10858 (grub_png_decode_image_header): Detect 16 bit png image.
10859 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
10860 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
10861 (grub_video_reader_png): Release memory occupied by image_data.
10862
10863 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
10864 4096 bytes.
10865 (grub_nfs_mount): Skip the test for sector per cluster.
10866
10867 * include/grub/ntfs.h (MAX_SPC): Removed.
10868
86cb4f54 108692008-03-31 Bean <bean123ch@gmail.com>
10870
10871 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
10872 (grub_probe_SOURCES): Add fs/afs.c.
10873 (grub_fstest_SOURCES): Likewise.
10874 (afs_mod_SOURCES): New variable.
10875 (afs_mod_CFLAGS): Likewise.
10876 (afs_mod_LDFLAGS): Likewise.
10877
10878 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
10879 (grub_emu_SOURCES): Likewise.
10880
10881 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
10882
10883 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10884
10885 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
10886
10887 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10888
10889 * fs/afs.c: New file.
10890
17c74c21 108912008-03-30 Pavel Roskin <proski@gnu.org>
10892
4cb68e89 10893 * disk/host.c: Include grub/misc.h to fix a warning.
10894 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
10895 warnings about implicit declarations.
10896
8790bb04 10897 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
10898 variable.
10899 * include/grub/i386/loader.h: Change declaration of
10900 grub_linux_boot() to match what grub_loader_set() expects.
10901 * util/getroot.c (grub_guess_root_device): Return const char* to
10902 fix a warning.
10903 * util/grub-probe.c (probe): Fix a warning about uninitialized
10904 abstraction_name variable.
10905 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
10906 second argument as unused to fix a warning.
10907
9a3f3296 10908 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
10909 missing grub_error() call.
10910
0ecef90d 10911 * util/update-grub_lib.in: Define datarootdir, since Autoconf
10912 2.60 and newer uses it to define datadir.
10913
0bf6d401 10914 * commands/sleep.c: Fix warning about implicit declaration.
10915 * disk/memdisk.c: Likewise.
10916 * loader/aout.c: Likewise.
10917 * loader/i386/bsd_normal.c: Likewise.
10918 * util/grub-probe.c: Likewise.
10919
7cdacf97 10920 * commands/i386/cpuid.c (has_longmode): Make static.
10921 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
10922 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
10923
17c74c21 10924 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
10925 GDT. This is more robust, as %ds can change.
10926 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
10927 calling real_to_prot().
10928 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
10929
80a3e68b 109302008-03-28 Pavel Roskin <proski@gnu.org>
10931
10932 * kern/i386/pc/startup.S: Assert that uncompressed functions
10933 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
10934 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
10935 code, as they push parts of the code (error handlers) beyond
10936 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
10937 code as correctness and size.
10938
77bcd272 109392008-03-28 Pavel Roskin <proski@gnu.org>
10940
10941 * kern/i386/pc/startup.S
10942 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
10943 data block address to the real mode, keep offset minimal. This
10944 works around a bug in AWARD BIOS on old Athlon systems, which
10945 makes CD detection hang.
10946
c5dfd43b 109472008-03-26 Pavel Roskin <proski@gnu.org>
10948
10949 * normal/color.c (grub_parse_color_name_pair): Make `name' a
10950 const.
10951 * include/grub/normal.h: Add grub_parse_color_name_pair()
10952 declaration.
10953
bf962df2 109542008-03-24 Bean <bean123ch@gmail.com>
10955
10956 * disk/i386/pc/biosdisk.c (cd_start): Removed.
10957 (cd_count): Removed.
10958 (cd_drive): New variable.
10959 (grub_biosdisk_get_drive): Don't check for (cdN) device.
10960 (grub_biosdisk_call_hook): Likewise.
10961 (grub_biosdisk_iterate): Change cdrom detection method.
10962 (grub_biosdisk_open): Replace cd_start with cd_drive.
10963 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
10964 detect cdrom device.
10965
10966 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
10967 Removed.
10968 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
10969 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
10970 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
10971 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
10972 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
10973 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
10974 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
10975 (grub_biosdisk_cdrp): New structure.
10976 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
10977
10978 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
10979
10980 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
10981 device.
10982
10983 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
10984 New function.
10985
68e7fc7a 109862008-03-20 Robert Millan <rmh@aybabtu.com>
10987
10988 Remove 2 TiB limit in ata.mod.
10989 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
10990 (grub_ata_dumpinfo): Print sector count with 0x%llx.
10991 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
10992 grub_uint64_t instead of grub_uint32_t.
10993
38ad2cf5 109942008-03-05 Bean <bean123ch@gmail.com>
10995
10996 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
10997 (grub_multiboot): Set boot device.
10998
10999 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
11000
2b89344e 110012008-03-02 Bean <bean123ch@gmail.com>
11002
11003 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
11004 symlink_buffer.
11005
87a95d1f 110062008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
11007
11008 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
11009 texinfo.tex.
11010
11011 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
11012 modified.
11013
11014 * docs/fdl.texi: New file.
f19dbdb7 11015
87a95d1f 11016 * docs/mdate-sh: New file. Copied from gnulib.
11017 * docs/texinfo.tex: Likewise.
11018
11019 * config.guess: Updated from gnulib.
11020 * install-sh: Likewise.
11021
7dc15d8e 110222008-02-28 Robert Millan <rmh@aybabtu.com>
11023
11024 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
11025 (aout_mod_SOURCES): New variable.
11026 (aout_mod_CFLAGS): Likewise.
11027 (aout_mod_LDFLAGS): Likewise.
11028
11029 * conf/i386-ieee1275.rmk: Likewise.
11030
b00ab696 110312008-02-28 Robert Millan <rmh@aybabtu.com>
11032
11033 * util/update-grub.in: Reorganise terminal validity check. Accept
11034 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
11035 Based on suggestion by Franklin PIAT.
11036
79ca2d78 110372008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
11038
11039 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
11040 function.
11041 * util/getroot.c (grub_util_check_block_device): New function that
11042 returns the given argument if it is a block device and returns NULL else.
11043 * util/grub-probe.c (argument_is_device): New variable.
11044 (probe): Promote device_name from a variable to an argument. Receive
11045 device_name from grub_util_check_block_device() if path is NULL and from
11046 grub_guess_root_device() else. Do not free() device_name anymore.
f19dbdb7 11047 (options): Introduce new parameter '-d, --device'.
79ca2d78 11048 (main): Add description of the new parameter to the help screen.
11049 Rename path variable to argument. Set argument_is_device if the '-d'
11050 option is given. Pass argument to probe() depending on
11051 argument_is_device.
11052
0d16e571 110532008-02-24 Bean <bean123ch@gmail.com>
11054
11055 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
11056 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
11057 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
11058 (GRUB_ISO9660_VOLDESC_PART): Likewise.
11059 (GRUB_ISO9660_VOLDESC_END): Likewise.
11060 (grub_iso9660_primary_voldesc): New member escape.
11061 (grub_iso9660_data): New member joliet.
11062 (grub_iso9660_convert_string): New function.
11063 (grub_iso9660_mount): Detect joliet extension.
11064 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
11065 (grub_iso9660_iso9660_label): Likewise.
11066
11067 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
11068 (grub_setup_SOURCES): Add fs/udf.c.
11069 (grub_fstest_SOURCES): Likewise.
11070 (udf_mod_SOURCES): New variable.
11071 (udf_mod_CFLAGS): Likewise.
11072 (udf_mod_LDFLAGS): Likewise.
11073
11074 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
11075 (grub_emu_SOURCES): Likewise.
11076
11077 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
11078
11079 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11080
11081 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
11082
11083 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11084
11085 * fs/udf.c: New file.
11086
8a594a17 110872008-02-24 Robert Millan <rmh@aybabtu.com>
11088
11089 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
11090 (normal/lexer.c_DEPENDENCIES): New variables.
11091 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
11092 (normal/lexer.c_DEPENDENCIES): Likewise.
11093 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
11094 (normal/lexer.c_DEPENDENCIES): Likewise.
11095 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
11096 (normal/lexer.c_DEPENDENCIES): Likewise.
11097 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
11098 (normal/lexer.c_DEPENDENCIES): Likewise.
11099 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
11100 (normal/lexer.c_DEPENDENCIES): Likewise.
11101
2dc33c03 111022008-02-23 Robert Millan <rmh@aybabtu.com>
11103
11104 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
11105 since they were intended to be in hex. This didn't break previously
11106 because of a bug in gpt_partition_map_iterate() (see below).
11107
11108 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
11109 when checking the validity of GPT header.
11110 Remove `partno', since it always provides the same information as `i'.
11111
f6f4cfb0 111122008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
11113
11114 * include/grub/efi/time.h: Fix a wrong comment.
11115
79ff665f 111162008-02-19 Pavel Roskin <proski@gnu.org>
11117
11118 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
11119 message.
11120
d38e24c2 111212008-02-19 Bean <bean123ch@gmail.com>
11122
11123 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
11124 (aout_mod_SOURCES): New variable.
11125 (aout_mod_CFLAGS): Likewise.
11126 (aout_mod_LDFLAGS): Likewise.
11127 (_bsd_mod_SOURCES): New variable.
11128 (_bsd_mod_CFLAGS): Likewise.
11129 (_bsd_mod_LDFLAGS): Likewise.
11130 (bsd_mod_SOURCES): New variable.
11131 (bsd_mod_CFLAGS): Likewise.
11132 (bsd_mod_LDFLAGS): Likewise.
11133
11134 * include/grub/aout.h: New file.
11135
11136 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
11137
11138 * include/grub/i386/bsd.h: New file.
11139
11140 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
11141 to make it public.
11142
11143 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
11144 function is called, so that it's possible to change it inside the hook.
11145 (grub_elf64_load): Likewise.
11146 (grub_elf_file): Don't close the file if elf header is not found.
11147 (grub_elf_close): Close the file if grub_elf_file fails (The new
11148 grub_elf_file won't close it).
11149 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
11150 (grub_elf64_size): Likewise.
11151
11152 * kern/i386/loader.S (grub_unix_real_boot): New function.
11153
11154 * loader/aout.c: New file.
11155
11156 * loader/i386/bsd.c: New file.
11157
11158 * loader/i386/bsd_normal.c: New file.
11159
11160 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
11161
11162 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
fe987087 11163 can test other formats.
d38e24c2 11164
b93bdb0f 111652008-02-19 Robert Millan <rmh@aybabtu.com>
11166
11167 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
11168 (grub_gpt_partition_type_empty): Redefine with macro from
11169 `<grub/gpt_partition.h>'.
11170 (gpt_partition_map_iterate): Adjust partition type comparison.
11171
11172 Export `entry' as partmap-specific `part.data' struct.
11173 (grub_gpt_header, grub_gpt_partentry): Move from here ...
11174
11175 * include/grub/gpt_partition.h (grub_gpt_header)
11176 (grub_gpt_partentry): ... to here (new file).
11177
11178 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
11179
11180 (grub_gpt_partition_type_bios_boot): New const variable, defined
11181 with macro from `<grub/gpt_partition.h>'.
11182
11183 (setup): Replace `first_start' with `embed_region', which keeps
11184 track of the embed region (and is partmap-agnostic).
11185
11186 Replace find_first_partition_start() with find_usable_region(),
11187 which finds a usable region for embedding using partmap-specific
11188 knowledge (supports PC/MSDOS and GPT).
11189
11190 Fix all assumptions that the embed region start at sector 1, using
11191 `embed_region.start' from now on. Similarly, use `embed_region.end'
11192 rather than `first_start' to calculate available size.
11193
11194 In grub_util_info() message, replace "into after the MBR" with an
11195 indication of the specific sector our embed region starts at.
11196
66cb40f6 111972008-02-19 Robert Millan <rmh@aybabtu.com>
11198
11199 * DISTLIST: Replace `commands/ieee1275/halt.c' and
11200 `commands/ieee1275/reboot.c' with `commands/halt.c' and
11201 `commands/reboot.c'.
11202 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
11203 (halt_mod_SOURCES): Likewise.
11204 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
11205 (halt_mod_SOURCES): Likewise.
11206
b7202015 112072008-02-17 Christian Franke <franke@computer.org>
11208
11209 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
11210
32b0fc49 112112008-02-17 Robert Millan <rmh@aybabtu.com>
11212
11213 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
11214 set `first_start' to 0 for non-PC/MSDOS partition maps.
11215
aca63502 112162008-02-16 Robert Millan <rmh@aybabtu.com>
11217
11218 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
11219 do not assume partition map is PC/MSDOS before performing checks that
11220 are specific to that layout.
11221
0de8be86 112222008-02-13 Robert Millan <rmh@aybabtu.com>
11223
11224 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
11225 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
11226 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
11227
c3db8364 112282008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
11229
11230 * configure.ac: Only a cosmetic change on the handling of
11231 -fno-stack-protector.
11232
f714229e 112332008-02-12 Alexandre Boeglin <alex@boeglin.org>
11234
c3db8364 11235 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
11236 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
11237 reboot.c.
f714229e 11238 (grub_install_SOURCES): Add halt.mod and reboot.mod.
11239 (halt_mod_SOURCES): New variable.
11240 (halt_mod_CFLAGS): Likewise.
11241 (halt_mod_LDFLAGS): Likewise.
11242 (reboot_mod_SOURCES): Likewise.
11243 (reboot_mod_CFLAGS): Likewise.
11244 (reboot_mod_LDFLAGS): Likewise.
11245
c3db8364 11246 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
11247 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
11248 reboot.c.
f714229e 11249 (halt_mod_SOURCES): Likewise.
11250 (reboot_mod_SOURCES): Likewise.
11251
c3db8364 11252 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
11253 commands/i386/pc/reboot.c by commands/reboot.c.
f714229e 11254 (reboot_mod_SOURCES): Likewise.
11255
11256 * commands/i386/pc/reboot.c: merge this file ...
11257
11258 * commands/ieee1275/reboot.c: ... and this file ...
11259
11260 * commands/reboot.c: ... to this file.
c3db8364 11261 Add some precompiler directive to include the correct header for
11262 each machine.
f714229e 11263
11264 * commands/ieee1275/halt.c: move this file ...
11265
11266 * commands/halt.c: ... to here.
c3db8364 11267 Add some precompiler directive to include the correct header for
11268 each machine.
f714229e 11269
11270 * include/grub/efi/efi.h (grub_reboot): New function declaration.
11271 (grub_halt): Likewise.
11272
11273 * kern/efi/efi.c (grub_reboot): New function.
11274 (grub_halt): Likewise.
11275
c74493e0 112762008-02-12 Robert Millan <rmh@aybabtu.com>
11277
11278 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
11279 /dev (like it is done for /dev/mapper). This doesn't provide support
11280 for EVMS, but at least it is now easy to identify the problem when it
11281 arises.
11282
d0db4b04 112832008-02-11 Robert Millan <rmh@aybabtu.com>
11284
11285 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
11286 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
11287 comparing it with -1, not 0.
11288
bf748642 112892008-02-10 Robert Millan <rmh@aybabtu.com>
11290
11291 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
11292 `disk/lvm.c'.
11293 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11294 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
11295
11296 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
11297 `disk/lvm.c' to the end of the list.
11298 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
11299 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
11300
b5db202a 113012008-02-10 Robert Millan <rmh@aybabtu.com>
11302
11303 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
11304 grub_print_error() instead. This will let user know why we're entering
11305 rescue mode.
11306 Based on suggestions from Sam Morris.
11307
83abee31 113082008-02-10 Alexandre Boeglin <alex@boeglin.org>
11309
11310 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
11311 on remaining N args, instead of "--" arg N times.
11312
78d5a08b 113132008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
11314
11315 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
11316 (fill_with_default_glyph): Changed to use unknown_glyph for fill
11317 pattern for unknown glyphs.
11318
68807e5f 113192008-02-09 Robert Millan <rmh@aybabtu.com>
11320
11321 * configure.ac: Probe for `help2man'.
11322 * Makefile.in (builddir): New variable.
11323 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
11324 or otherwise add a few flags/options to it.
11325 (install-local): For every executable utility or script that is
11326 installed, invoke $(HELP2MAN) to install a manpage based on --help
11327 output.
11328
11329 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
11330 that it doesn't prevent --help from working in build tree.
11331
11332 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
11333 with `bug-grub@gnu.org'.
11334 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
11335 * util/update-grub.in (usage): New function.
11336 Implement proper argument check, with support for --help and --version
11337 (as well as existing -y).
11338
113392008-02-09 Christian Franke <franke@computer.org>
0d9ff7f0 11340
11341 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
11342 avoid overwriting previous output.
11343 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
11344
c1962162 113452008-02-09 Robert Millan <rmh@aybabtu.com>
11346
11347 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
11348 drawing the menu.
11349
3dac2e3f 113502008-02-09 Robert Millan <rmh@aybabtu.com>
11351
11352 * commands/sleep.c: New file.
11353 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
11354 (sleep_mod_SOURCES): New variable.
11355 (sleep_mod_CFLAGS): Likewise.
11356 (sleep_mod_LDFLAGS): Likewise.
11357
7a634e08 113582008-02-09 Robert Millan <rmh@aybabtu.com>
11359
11360 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
11361 situations in which we can deduce the RAID size and the superblock
11362 doesn't match it.
11363
b92f0c18 113642008-02-09 Robert Millan <rmh@aybabtu.com>
11365
11366 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
11367 and return a grub_diskmemberlist_t composed of LVM physical volumes.
11368 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
11369
11370 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
11371 and return a grub_diskmemberlist_t composed of physical array members.
11372 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
11373
11374 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
11375 prototype.
11376 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
11377 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
11378 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
11379
11380 * util/grub-probe.c (probe): Move partmap probing code from here ...
11381 (probe_partmap): ... to here.
11382 (probe): Use probe_partmap() once for the disk we're probing, and
11383 additionally, when such disk contains a memberlist() struct member,
11384 once for each disk that is contained in the structure returned by
11385 memberlist().
11386
91a4bf68 113872008-02-09 Robert Millan <rmh@aybabtu.com>
11388
11389 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
11390 environment variable to 'all' in order to obtain debug output from
11391 non-util/ code.
11392 * util/i386/pc/grub-setup.c (main): Likewise.
11393
a96f9caa 113942008-02-08 Robert Millan <rmh@aybabtu.com>
11395
11396 * disk/raid.c (grub_raid_scan_device): Check for
11397 `array->device[sb.this_disk.number]' rather than for
11398 `array->device[sb.this_disk.number]->name', since the latter is not
fe6b695a 11399 guaranteed to be accessible.
a96f9caa 11400
b37a9222 114012008-02-08 Robert Millan <rmh@aybabtu.com>
11402
11403 * disk/raid.c: Update copyright.
11404 * fs/cpio.c: Likewise.
11405 * include/grub/raid.h: Likewise.
11406 * loader/i386/pc/multiboot.c: Likewise.
11407 * util/hostfs.c: Likewise.
11408
5626aee1 114092008-02-08 Robert Millan <rmh@aybabtu.com>
11410
11411 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
11412 to a grub_disk_t array.
11413 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
11414 `device[x]'.
11415 (grub_raid_scan_device): Replace `device[x].name' accesses with
11416 `device[x]->name'. Simplify initialization of `array->device[x]'.
11417
554f0187 114182008-02-08 Robert Millan <rmh@aybabtu.com>
11419
11420 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
11421 grub_dprintf() calls.
11422 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
11423 error message.
11424
1ec8425d 114252008-02-07 Christian Franke <franke@computer.org>
11426
11427 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
11428 instead of fseek and ftell to support large files.
11429 (grub_hostfs_read): Likewise.
11430
f2156fda 114312008-02-07 Robert Millan <rmh@aybabtu.com>
11432
11433 Patch from Jeroen Dekkers.
11434 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
fe6b695a 11435 failure, since successfully reading all array members might not be
f2156fda 11436 required.
11437
9216e0e7 114382008-02-06 Robert Millan <rmh@aybabtu.com>
11439
11440 * util/grub-probe.c (probe): Simplify partmap probing (with the
11441 assumption that the first word up to the underscore equals to
11442 the module name).
11443
b0dfd29a 114442008-02-06 Christian Franke <franke@computer.org>
11445
11446 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
11447 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
11448 last block of a cpio or tar stream.
11449 Check for "TRAILER!!!" instead of any empty data
11450 block to detect last block of a cpio stream.
11451 (grub_cpio_dir): Fix constness of variable np.
11452 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
11453 cpio or tar trailer is detected. This fixes a crash
11454 on open of a non existing file.
11455
c32865bf 114562008-02-05 Bean <bean123ch@gmail.com>
11457
11458 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
11459 address of entry.
11460 (grub_multiboot_load_elf64): Likewise.
11461 (grub_multiboot): Initialize mbi structure.
11462
11463 * util/grub-fstest.c: Don't include unused header file script.h.
11464
fe6b695a 11465 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
c32865bf 11466 of file.
11467 (grub_fstest_SOURCES): Likewise.
11468
409480b7 114692008-02-05 Robert Millan <rmh@aybabtu.com>
11470
11471 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
11472 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
11473 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
11474 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
11475
11476 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
11477 (translation_table): Replace hardcoded values with macros
11478 provided by `<grub/term.h>'.
11479
11480 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
11481 (keyboard_map): Correct/add a few values, with macros provided
11482 by `<grub/term.h>'.
11483 (keyboard_map_shift): Zero values that don't differ from their
11484 `keyboard_map' equivalents.
11485 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
11486 Discard the second scan code that is always sent by Caps lock.
11487 Only use `keyboard_map_shift' when it provides a non-zero value,
11488 otherwise fallback to `keyboard_map'.
11489
99fadbaa 114902008-02-04 Bean <bean123ch@gmail.com>
11491
11492 * Makefile.in (enable_grub_fstest): New variable.
11493
11494 * conf/common.rmk (grub_fstest_init.lst): New rule.
11495 (grub_fstest_init.h): Likewise.
11496 (grub_fstest_init.c): Likewise.
11497 (util/grub-fstest.c_DEPENDENCIES): New variable.
11498 (grub_fstest_SOURCES): Likewise.
11499
11500 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
11501
11502 * util/grub-fstest.c: New file.
11503
bf567c50 115042008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
11505
11506 Make grub-setup handle a separate root device.
f19dbdb7 11507
bf567c50 11508 * util/i386/pc/grub-setup.c (setup): Always open the root device,
11509 so that the root device can be compared with the destination
11510 device.
11511 When embedding the core image, if the root and destination devices
11512 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
11513 0xFF.
11514 When not embedding, set ROOT_DRIVE to 0xFF.
f19dbdb7 11515
9be6b98b 115162008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
11517
11518 Add support for having a grub directory in a different drive. This
11519 is still only the data handling part.
f19dbdb7 11520
9be6b98b 11521 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
11522 (codestart): Save %dh in GRUB_ROOT_DRIVE.
11523 (grub_root_drive): New variable.
11524
11525 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
11526 instead of GRUB_BOOT_DRIVE to construct a device name. Set
11527 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
11528 as it was.
11529
11530 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
11531
11532 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
11533 macro.
11534 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
11535
11536 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
11537 is bogus, because PXE booting does not specify any drive
11538 correctly.
11539
11540 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
11541 am not sure if this is really correct.
11542
11543 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
11544 is always identical to the boot drive when booting from a CD.
11545
11546 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
11547 longer.
11548 (root_drive): New variable.
11549 (real_start): Unconditionally set %dh to ROOT_DRIVE.
11550 (setup_sectors): Push %dx right after popping it, because %dh will
11551 be modified later.
11552 (copy_buffer): Restore %dx.
11553
e0ca0677 115542008-02-03 Robert Millan <rmh@aybabtu.com>
11555
11556 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
11557 use `cdboot.img' for cdrom images.
11558
3b3f6629 115592008-02-03 Robert Millan <rmh@aybabtu.com>
11560
11561 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
11562 only setup gfxterm when `font' command has succeeded.
11563
d42b3672 115642008-02-03 Robert Millan <rmh@aybabtu.com>
11565
11566 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
11567 (grub_rescue_cmd_multiboot_loader)
11568 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
11569
fa370ea6 115702008-02-03 Pavel Roskin <proski@gnu.org>
11571
e0c5dacb 11572 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
fa370ea6 11573 %edx and %esi from stack only after grub_gate_a20() is called.
11574 grub_gate_a20() clobbers %edx.
11575
f2a76e1d 115762008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
11577
11578 * configure.ac (AC_INIT): Bumped to 1.96.
11579
11580 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
11581 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
11582 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
11583 video/readers/png.c.
11584
90fd32d1 115852008-02-03 Bean <bean123ch@gmail.com>
9be665dd 11586
11587 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
11588 (cdboot_img_SOURCES): New variable.
11589 (cdboot_img_ASFLAGS): New variable.
11590 (cdboot_img_LDFLAGS): New variable.
11591
11592 * boot/i386/pc/cdboot.S: New file.
11593
11594 * disk/i386/pc/biosdisk.c (cd_start): New variable.
11595 (cd_count): Likewise.
11596 (grub_biosdisk_get_drive): Add support for cd device.
11597 (grub_biosdisk_call_hook): Likewise.
11598 (grub_biosdisk_iterate): Likewise.
11599 (grub_biosdisk_open): Likewise.
11600 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
11601 (grub_biosdisk_rw): Support reading from cd device.
11602 (GRUB_MOD_INIT): Iterate cd devices.
11603
11604 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
11605 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
11606 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
11607
11608 * kern/i386/pc/init.c (make_install_device): Check for cd device.
11609
4020aa53 116102008-02-02 Robert Millan <rmh@aybabtu.com>
11611
11612 * commands/read.c: New file.
11613 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
11614 (read_mod_SOURCES): New variable.
11615 (read_mod_CFLAGS): Likewise.
11616 (read_mod_LDFLAGS): Likewise.
11617
e03a1132 116182008-02-02 Robert Millan <rmh@aybabtu.com>
11619
11620 * normal/main.c (grub_normal_execute): Check for `menu->size' when
11621 determining whether menu has to be displayed.
11622
58c69220 116232008-02-02 Marco Gerards <marco@gnu.org>
11624
11625 * bus/pci.c: New file.
11626
11627 * include/grub/pci.h: Likewise.
11628
11629 * include/grub/i386/pc/pci.h: Likewise.
11630
11631 * commands/lspci.c: Likewise.
11632
11633 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
11634 `lspci.mod'.
11635 (pci_mod_SOURCES): New variable.
11636 (pci_mod_CFLAGS): Likewise.
11637 (pci_mod_LDFLAGS): Likewise.
11638 (lspci_mod_SOURCES): Likewise.
11639 (lspci_mod_CFLAGS): Likewise.
f19dbdb7 11640 (lspci_mod_LDFLAGS): Likewise.
58c69220 11641
c004e1b4 116422008-02-02 Bean <bean123ch@gmail.com>
11643
11644 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
11645 (grub_ufs_get_file_block): Fix indirect block calculation problem.
11646
11647 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
11648 (grub_xfs_btree_node): New structure.
11649 (grub_xfs_btree_root): New structure.
11650 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
11651 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
11652 (GRUB_XFS_EXTENT_BLOCK): Likewise.
11653 (GRUB_XFS_EXTENT_SIZE): Likewise.
11654 (grub_xfs_read_block): Support btree format type.
11655 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
11656 Use directory block as basic unit.
11657
11658 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
11659
11660 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
11661 __attribute__ ((__regparm__ (1))).
11662
f95562bf 116632008-02-01 Robert Millan <rmh@aybabtu.com>
11664
11665 Correct a mistake in previous commit.
11666
11667 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
11668 top.
11669 (normal/command.c_DEPENDENCIES): New variable.
11670
7d31f41f 116712008-02-01 Robert Millan <rmh@aybabtu.com>
11672
11673 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
11674 top.
11675 (normal/command.c_DEPENDENCIES): New variable.
11676 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
11677 * conf/i386-ieee1275.rmk: Likewise.
11678 * conf/i386-linuxbios.rmk: Likewise.
11679 * conf/i386-pc.rmk: Likewise.
11680 * conf/sparc64-ieee1275.rmk: Likewise.
11681 * conf/powerpc-ieee1275.rmk: Likewise.
11682 (grub_emu_SOURCES): Add `fs/fshelp.c'.
11683
11684 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
11685
60b6be74 116862008-02-01 Robert Millan <rmh@aybabtu.com>
11687
11688 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
11689 call at beginning of function.
11690
078522ab 116912008-01-31 Pavel Roskin <proski@gnu.org>
11692
11693 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
d2c11005 11694 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
11695 (grub_mkrescue_SOURCES): Likewise.
078522ab 11696 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
11697
ccaa8a5f 116982008-01-30 Robert Millan <rmh@aybabtu.com>
11699
11700 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
11701 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
11702 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
11703 (grub_probe_SOURCES): ... to here.
11704
11705 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
11706 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
11707 * conf/i386-ieee1275.rmk: Likewise.
11708 * conf/i386-linuxbios.rmk: Likewise.
11709 * conf/powerpc-ieee1275.rmk: Likewise.
11710
ae5a9cd7 117112008-01-30 Tristan Gingold <gingold@free.fr>
11712
11713 * kern/rescue.c: Silently accept empty lines.
11714
70bc2ef2 117152008-01-29 Bean <bean123ch@gmail.com>
11716
11717 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
11718 (real_code_2): Code cleanup and change comment style.
11719 (move_memory): Avoid using 32-bit address mode.
11720
6a4d50ea 117212008-01-29 Bean <bean123ch@gmail.com>
11722
11723 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
11724 (png_mod_SOURCES): New variable.
11725 (png_mod_CFLAGS): Likewise.
11726 (png_mod_LDFLAGS): Likewise.
11727
11728 * video/readers/png.c: New file.
11729
11cc30ac 117302008-01-28 Robert Millan <rmh@aybabtu.com>
11731
11732 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
11733 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
11734 `ifndef GRUB_MOD_GAP' hack.
11735 * util/elf/grub-mkimage.c (add_segments): Likewise.
11736
3abc589f 117372008-01-27 Robert Millan <rmh@aybabtu.com>
11738
11739 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
11740 `GRUB_MOD_GAP' for platforms in which it's not defined.
962ca133 11741 * util/elf/grub-mkimage.c (add_segments): Likewise.
3abc589f 11742
e1907778 117432008-01-27 Robert Millan <rmh@aybabtu.com>
11744
11745 Get grub-emu to build again (including parallel builds).
11746
11747 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
11748 Split into ...
11749 (util/grub-emu.c_DEPENDENCIES): ... this, ...
11750 (normal/execute.c_DEPENDENCIES): ... this, ...
11751 (grub-emu_DEPENDENCIES): ... and this.
11752
11753 * conf/i386-efi.rmk: Likewise.
11754 * conf/i386-linuxbios.rmk: Likewise.
11755 * conf/i386-ieee1275.rmk: Likewise.
11756 * conf/powerpc-ieee1275.rmk: Likewise.
11757 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
11758
2216b101 117592008-01-27 Robert Millan <rmh@aybabtu.com>
11760
11761 * NEWS: Add a few items.
11762
f75172d9 117632008-01-27 Robert Millan <rmh@aybabtu.com>
11764
11765 Fix parallel builds with grub-emu. Based on earlier commit for
11766 grub-probe and grub-setup.
11767
11768 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
11769 (util/grub-emu.c_DEPENDENCIES): ... this.
11770 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
11771 (util/grub-emu.c_DEPENDENCIES): ... this.
11772 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
11773 (util/grub-emu.c_DEPENDENCIES): ... this.
11774 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
11775 (util/grub-emu.c_DEPENDENCIES): ... this.
11776 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
11777 (util/grub-emu.c_DEPENDENCIES): ... this.
11778
3f51de77 117792008-01-27 Pavel Roskin <proski@gnu.org>
11780
11781 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
11782 to create a gap between _end and the modules added to the image
11783 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
11784 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
11785 * util/elf/grub-mkimage.c (add_segments): Likewise.
11786
2033f53e 117872008-01-26 Pavel Roskin <proski@gnu.org>
11788
11789 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
11790 just return an error.
11791
22da1f6f 117922008-01-26 Bean <bean123ch@gmail.com>
11793
11794 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
11795 (grub_reiserfs_get_item): Save offset of the next item.
11796 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
11797
2a9525e6 117982008-01-25 Robert Millan <rmh@aybabtu.com>
11799
11800 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
11801 make all filesystem sources appear together (possibly fixing omissions
11802 while at it).
11803 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
11804 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11805 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
11806 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11807
11808 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
11809 add `kern/file.c'.
11810 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
11811 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
11812 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
11813 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
11814
11815 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
11816 (probe): Add a sanity check to make sure of our ability to read
11817 requested files when probing for filesystem type.
11818
11819 * genmk.rb: Update copyright year (2007).
11820
11821 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
11822 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
11823 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
11824 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
11825 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
11826 : Remove function prototypes.
11827
b95f71b5 118282008-01-25 Robert Millan <rmh@aybabtu.com>
11829
11830 Revert my previous commits (based on wrong assumption of how grub_errno
11831 works).
11832
fe6b695a 11833 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
b95f71b5 11834 * kern/file.c (grub_file_open): Likewise.
11835
d08bbb49 118362008-01-24 Pavel Roskin <proski@gnu.org>
11837
11838 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
11839 that hang if GRUB tries to setup colors.
11840 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
11841 colors for firmwares that don't support it.
11842 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
11843 Recognize Open Hack'Ware, set flags to work around its
11844 limitations.
11845
605e36ed 118462008-01-24 Robert Millan <rmh@aybabtu.com>
11847
11848 * kern/file.c (grub_file_open): Do not account previous failures of
11849 unrelated functions when grub_errno is checked for.
11850 Reported by Oleg Strikov.
11851
bac332a1 118522008-01-24 Bean <bean123ch@gmail.com>
11853
11854 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
11855 (grub_ufs_sblock): New member volume name.
11856 (grub_ufs_find_file): Fix string copy bug.
11857 (grub_ufs_label): Implement this function properly.
11858
11859 * fs/hfs.c (grub_hfs_cnid_type): New enum.
11860 (grub_hfs_iterate_records): Use the correct file number for extents
11861 and catalog file. Fix problem in next index calculation.
11862 (grub_hfs_find_node): Replace recursive function call with loop.
11863 (grub_hfs_iterate_dir): Replace recursive function call with loop.
11864
15c80c09 118652008-01-23 Robert Millan <rmh@aybabtu.com>
11866
11867 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
11868 `<grub/symbol.h>' and `<grub/multiboot.h>'.
11869 (grub_multiboot2_real_boot): New function prototype.
11870
11871 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
11872 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
11873
11874 * kern/i386/ieee1275/init.c (grub_os_area_addr)
11875 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
11876
305338fd 118772008-01-23 Robert Millan <rmh@aybabtu.com>
11878
11879 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
11880 #ifdef'ed out grub_printf().
11881
3ea52685 118822008-01-23 Robert Millan <rmh@aybabtu.com>
11883
11884 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
11885 grub_dprintf calls, since they make "debug=all" mode unusable.
11886 (grub_console_checkkey): Likewise.
11887
5882ae4b 118882008-01-23 Robert Millan <rmh@aybabtu.com>
11889
11890 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
11891 `term/i386/pc/at_keyboard.c'.
11892 (pkglib_MODULES): Add `serial.mod'.
11893 (serial_mod_SOURCES): New variable.
11894 (serial_mod_CFLAGS): Likewise.
11895 (serial_mod_LDFLAGS): Likewise.
11896
11897 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
11898 `<grub/powerpc/ieee1275/console.h>'.
11899 (grub_keyboard_controller_init): New function prototype.
11900 (grub_console_checkkey): Likewise.
11901 (grub_console_getkey): Likewise.
11902
11903 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
11904 keyboard on i386.
11905
11906 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
11907 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
11908
06ab5303 119092008-01-23 Robert Millan <rmh@aybabtu.com>
11910
11911 * kern/i386/pc/init.c (make_install_device): When memdisk image is
11912 present, "(memdisk)/boot/grub" becomes the default prefix.
11913
11914 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
11915 a memdisk tarball with all the modules. Add --overlay=DIR option that
11916 allows users to overlay additional files into the image.
11917
dbb475a4 119182008-01-23 Robert Millan <rmh@aybabtu.com>
11919
11920 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
11921 and `machine/memory.h'.
11922 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
11923 (_multiboot_mod_SOURCES): New variable.
11924 (_multiboot_mod_CFLAGS): Likewise.
11925 (_multiboot_mod_LDFLAGS): Likewise.
11926 (multiboot_mod_SOURCES): Likewise.
11927 (multiboot_mod_CFLAGS): Likewise.
11928 (multiboot_mod_LDFLAGS): Likewise.
11929
11930 * include/grub/i386/ieee1275/loader.h: New file.
11931
11932 * include/grub/i386/ieee1275/machine.h: Likewise.
11933
11934 * include/grub/i386/ieee1275/memory.h: Likewise.
11935
11936 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
11937 variable declaration.
11938 (grub_os_area_size): Likewise.
11939
11940 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
11941 (grub_lower_mem, grub_upper_mem): New variables.
11942 (grub_stop_floppy): New function (just to make
11943 grub_multiboot2_real_boot() happy).
11944
11945 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
11946 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
11947 (grub_stop): New function.
11948 Include `"../realmode.S"' and `"../loader.S"'.
11949
11950 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
11951 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
11952
11953 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
11954 rely on grub_multiboot2_real_boot() for final boot.
11955
25638629 119562008-01-22 Robert Millan <rmh@aybabtu.com>
11957
11958 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
11959 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
11960 device that doesn't look like an SD card.
11961 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
11962 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
11963 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
11964 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
11965 found.
11966
9dad816d 119672008-01-22 Robert Millan <rmh@aybabtu.com>
11968
11969 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
11970 avoid claiming over our own code.
11971
34842f2d 119722008-01-22 Bean <bean123ch@gmail.com>
11973
11974 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
11975 (jpeg_mod_SOURCES): New variable.
11976 (jpeg_mod_CFLAGS): Likewise.
11977 (jpeg_mod_LDFLAGS): Likewise.
11978
11979 * video/readers/jpeg.c : New file.
11980
44023a28 119812008-01-22 Bean <bean123ch@gmail.com>
11982
11983 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
11984 there are no more items.
11985
bc2d8ac6 119862008-01-21 Robert Millan <rmh@aybabtu.com>
11987
11988 * kern/mm.c (grub_mm_init_region): Improve debug message.
11989
261bd4bc 119902008-01-21 Robert Millan <rmh@aybabtu.com>
11991
11992 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
11993 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
11994 address.
11995 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
11996 a C macro.
11997 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
11998 Indicates start of upper memory.
11999 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
12000 (generate_image): Abort when image size is big enough to corrupt
12001 upper memory.
12002
12003 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
12004 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
12005 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
12006 instead of hardcoding 0xA0000.
12007 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
12008 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
12009 instead of hardcoding 0xA0000.
12010
f970b55e 120112008-01-21 Robert Millan <rmh@aybabtu.com>
12012
12013 * disk/memdisk.c (memdisk_size): New variable.
12014 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
12015 `memdisk_size'.
12016 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
12017 image to dynamic memory.
12018 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
12019 `memdisk_size'. Free memdisk block.
12020
1a8b0526 120212008-01-21 Robert Millan <rmh@aybabtu.com>
12022
12023 Fix detection of very small filesystems (like tar).
12024
12025 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
12026 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
12027 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
12028 a problem with this disk).
12029
6e9b4aab 120302008-01-21 Robert Millan <rmh@aybabtu.com>
12031
12032 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
12033 on grub_biosdisk_rw_standard() error.
12034
0d8837b2 120352008-01-21 Robert Millan <rmh@aybabtu.com>
12036
12037 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
12038 recent changes.
12039 * kern/elf.c: Likewise.
12040 * kern/ieee1275/ieee1275.c: Likewise.
12041 * kern/powerpc/ieee1275/openfw.c: Likewise.
12042 * term/ieee1275/ofconsole.c: Likewise.
12043
ffd36e34 120442008-01-21 Robert Millan <rmh@aybabtu.com>
12045
12046 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
12047
3f0093d0 12048 * include/grub/kernel.h (grub_arch_memdisk_addr)
12049 (grub_arch_memdisk_size): Moved from here ...
ffd36e34 12050
3f0093d0 12051 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
12052 (grub_arch_memdisk_size): ... to here.
ffd36e34 12053
6c391b21 120542008-01-21 Robert Millan <rmh@aybabtu.com>
12055
12056 Mostly based on bugfix from Bean.
12057
12058 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
12059 attribute with hook() parameter.
12060 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
12061 declaration.
12062 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
12063 attribute with hook() parameter.
12064 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
12065 declaration.
12066
55a581dc 120672008-01-21 Robert Millan <rmh@aybabtu.com>
12068
12069 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
12070 (pkglib_MODULES): Add `memdisk.mod'.
12071 (memdisk_mod_SOURCES): New variable.
12072 (memdisk_mod_CFLAGS): Likewise.
12073 (memdisk_mod_LDFLAGS): Likewise.
12074
12075 * disk/memdisk.c: New file.
12076
12077 * include/grub/disk.h (grub_disk_dev_id): Add
12078 `GRUB_DISK_DEVICE_MEMDISK_ID'.
12079
12080 * include/grub/i386/pc/kernel.h
12081 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
12082 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
12083 (grub_kernel_image_size): New variable declaration.
12084 (grub_total_module_size): Likewise.
12085 (grub_memdisk_image_size): Likewise.
12086
12087 * include/grub/i386/pc/memory.h
12088 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
12089
12090 * include/grub/kernel.h: Include `<grub/symbol.h>'.
12091 (grub_arch_memdisk_addr): New variable declaration.
12092 (grub_arch_memdisk_size): Likewise.
12093
12094 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
12095 (grub_arch_memdisk_size): Likewise.
12096
12097 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
12098 (codestart): Replace hardcoded `0x100000' with
12099 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
12100
12101 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
12102 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
12103 not NULL, append the contents of the file it refers to, at the end of
12104 the compressed kernel image. Initialize `grub_memdisk_image_size'
12105 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
12106 (options): Add "memdisk"|'m' option.
12107 (main): Parse --memdisk|-m option, and pass user-provided path as
12108 parameter to generate_image().
12109
3d7f54c9 121102008-01-20 Robert Millan <rmh@aybabtu.com>
12111
12112 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
12113 grub_dprintf() calls from here ...
12114 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
12115
0bf74728 121162008-01-20 Robert Millan <rmh@aybabtu.com>
12117
12118 Fix detection of "real mode" when /options/real-mode? doesn't exist.
12119
12120 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
12121 declaration.
12122 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
12123 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
12124 `GRUB_IEEE1275_FLAG_REAL_MODE'.
fe6b695a 12125 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
0bf74728 12126 property).
12127 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
12128 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
12129
33bf70a7 121302008-01-19 Robert Millan <rmh@aybabtu.com>
12131
fe6b695a 12132 Get rid of confusing function (superseded by
33bf70a7 12133 `grub_ieee1275_get_integer_property')
12134 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
12135 prototype.
12136 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
12137 function.
12138 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
12139 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
fe987087 12140 in native endianness from grub_ieee1275_get_integer_property().
33bf70a7 12141
e2da7d26 121422008-01-19 Robert Millan <rmh@aybabtu.com>
12143
12144 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
12145 command after "shut-down", since implementations differ on which
12146 the command for halt is.
12147
59f1fd8d 121482008-01-19 Robert Millan <rmh@aybabtu.com>
12149
12150 * include/grub/i386/linuxbios/console.h: Add header protection.
12151 (grub_keyboard_controller_init): New function prototype.
12152 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
12153 (KEYBOARD_COMMAND_READ): Likewise.
12154 (KEYBOARD_COMMAND_WRITE): Likewise.
12155 (KEYBOARD_SCANCODE_SET1): Likewise.
12156 (grub_keyboard_controller_write): New function.
12157 (grub_keyboard_controller_read): Likewise.
12158 (grub_keyboard_controller_init): Likewise.
12159
12160 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
12161 (grub_console_init): On coreboot/LinuxBIOS, call
12162 grub_keyboard_controller_init().
12163
5f5a7c15 121642008-01-19 Robert Millan <rmh@aybabtu.com>
12165
12166 PowerPC changes provided by Pavel Roskin.
12167
12168 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
12169 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
12170 don't rely on cmain() doing it.
12171 * kern/i386/ieee1275/startup.S (_start): Store %eax in
12172 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
12173
1210e168 121742008-01-16 Robert Millan <rmh@aybabtu.com>
12175
12176 * include/grub/i386/linuxbios/memory.h
12177 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
12178 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
12179 receive `table_header' as argument. Instead, probe for it in the
12180 known memory ranges where it can be present.
12181 (grub_available_iterate): Do not pass a fixed `table_header' address
12182 to grub_linuxbios_table_iterate().
12183
3d04eab8 121842008-01-15 Robert Millan <rmh@aybabtu.com>
12185
12186 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
12187 * conf/i386-ieee1275.rmk: New file.
12188 * include/grub/i386/ieee1275/console.h: Likewise.
12189 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
12190 * include/grub/i386/ieee1275/kernel.h: Likewise.
12191 * include/grub/i386/ieee1275/time.h: Likewise.
12192 * kern/i386/ieee1275/init.c: Likewise.
12193 * kern/i386/ieee1275/startup.S: Likewise.
12194
d1bc1b73 121952008-01-15 Robert Millan <rmh@aybabtu.com>
12196
12197 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
12198 when pointers are 32-bit (but still do set it to one when they are
12199 64-bit).
12200
66a65807 122012008-01-15 Robert Millan <rmh@aybabtu.com>
12202
12203 * include/grub/ieee1275/ieee1275.h
12204 (grub_ieee1275_get_integer_property): New function prototype.
12205
12206 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
12207 (grub_ieee1275_get_integer_property): New function. Wraps around
fe987087 12208 grub_ieee1275_get_property() to handle endianness.
66a65807 12209
12210 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
12211 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
fe6b695a 12212 where appropriate.
66a65807 12213 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
12214 (grub_map): Likewise.
12215 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
12216
a83ccafd 122172008-01-15 Bean <bean123ch@gmail.com>
12218
12219 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
12220 (grub_script_execute_cmdline): Reset grub_errno.
12221
12222 * normal/main.c (read_config_file): Reset grub_errno.
12223
12224 * normal/parse.y (script_init): New.
12225 (script): Move function and menuentry here.
12226 (delimiter): New.
12227 (command): Add delimiter at the end of command.
12228 (commands): Adjust to match the new command.
12229 (commandblock): Remove grub_script_lexer_record_start.
f19dbdb7 12230 (menuentry): Add grub_script_lexer_record_start, use the new commands.
a83ccafd 12231 (if): Use the new commands.
12232
12233 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
12234
df6ecfc6 122352008-01-15 Robert Millan <rmh@aybabtu.com>
12236
12237 * normal/menu.c (run_menu): Move timeout message from here ...
12238 (print_timeout): ... to here.
12239 (run_menu): Use print_timeout() once during initial draw to print
12240 the whole message, and again in every clock tick to update only
12241 the number of seconds.
12242
87ae25eb 122432008-01-15 Robert Millan <rmh@aybabtu.com>
12244
12245 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
12246 actual size of `available' from grub_ieee1275_get_property(), and
12247 restrict parsing to that bound.
12248
47bf09a4 122492008-01-15 Christian Franke <franke@computer.org>
12250
12251 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
12252 (argp_program_version): Remove variable.
12253 (argp_program_bug_address): Likewise.
12254 (options): Convert from struct argp_option to struct option.
12255 (struct arguments): Remove.
12256 (parse_opt): Remove.
12257 (usage): New function.
12258 (main): Replace struct args members by simple variables.
12259 Replace argp_parse() by getopt_long().
12260 Add switch to evaluate options.
12261 Add missing "(...)" around root_dev in prefix string.
12262
c86f1469 122632008-01-14 Robert Millan <rmh@aybabtu.com>
12264
12265 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
12266 for grub_ieee1275_exit(), in order to improve portability.
12267
e622c559 122682008-01-14 Robert Millan <rmh@aybabtu.com>
12269
12270 * util/grub.d/10_linux.in (prefix): Define.
12271 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
12272
44cb1ec8 122732008-01-13 Pavel Roskin <proski@gnu.org>
12274
12275 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
12276 grub_errno if no errors have been detected.
12277
1eb8c802 122782008-01-12 Robert Millan <rmh@aybabtu.com>
12279
12280 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
12281 (grub_util_get_dev_abstraction): New function prototype.
12282
12283 * util/getroot.c: Include `<grub/util/getroot.h>'
12284 (grub_util_get_grub_dev): Move detection of abstraction type to ...
12285 (grub_util_get_dev_abstraction): ... here (new function).
12286
12287 * util/grub-probe.c: Convert PRINT_* to an enum. Add
12288 `PRINT_ABSTRACTION'.
12289 (probe): Probe for abstraction type when requested.
12290 (main): Understand `--target=abstraction'.
12291
12292 * util/i386/efi/grub-install.in: Add abstraction module to core
12293 image when it is found to be necessary.
12294 * util/i386/pc/grub-install.in: Likewise.
12295 * util/powerpc/ieee1275/grub-install.in: Likewise.
12296
12297 * util/update-grub_lib.in (font_path): Return system path without
12298 converting to GRUB path.
12299 * util/update-grub.in: Convert system path returned by font_path()
12300 to a GRUB path. Use `grub-probe -t abstraction' to determine what
12301 abstraction module is needed for loading fonts (if any). Export
12302 that as `GRUB_PRELOAD_MODULES'.
12303 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
12304 insmod commands).
12305
52bd3de9 123062008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
12307
12308 Remove some unused code from reiserfs.
f19dbdb7 12309
52bd3de9 12310 * fs/reiserfs.c (struct grub_reiserfs_key)
12311 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
12312 (struct grub_reiserfs_node_body): Removed.
12313 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
12314 Likewise.
12315 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
12316 Likewise.
12317 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
12318 Likewise.
12319 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
12320 Likewise.
12321 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
12322 Likewise.
12323 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
12324 Likewise.
12325 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
12326 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
12327 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
12328
2f80039d 123292008-01-10 Robert Millan <rmh@aybabtu.com>
12330
12331 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
12332 Determines if a file is garbage left by packaging systems, etc.
12333 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
12334 for processing /etc/grub.d scripts.
12335 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
12336 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
12337 as a condition for processing Linux images.
12338
87888032 123392008-01-10 Pavel Roskin <proski@gnu.org>
12340
12341 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
12342 to compile reiserfs.c on PowerPC.
12343
7e54fced 123442008-01-10 Robert Millan <rmh@aybabtu.com>
de9993e0 12345
12346 * kern/device.c (grub_device_iterate): Do not abort device iteration
12347 when one of the devices cannot be opened.
12348 * kern/disk.c (grub_disk_open): Do not account previous failures of
12349 unrelated functions when grub_errno is checked for.
12350
5aa541e6 123512008-01-08 Robert Millan <rmh@aybabtu.com>
12352
12353 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
12354 `! grub_linux_is_bzimage', change order of address comparison to make
12355 it more intuitive, and improve "too big zImage" error message.
12356
7076340d 123572008-01-08 Robert Millan <rmh@aybabtu.com>
12358
12359 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
12360 `$(update-grub_DATA)'.
12361 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
12362 targets.
12363
9ca70333 123642008-01-07 Robert Millan <rmh@aybabtu.com>
12365
12366 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
12367 which instruction is modified by grub-setup during installation
12368 (since it wasn't obvious by only looking at this file).
12369
38ccf575 123702008-01-07 Robert Millan <rmh@aybabtu.com>
12371
12372 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
12373 listing actual TODO items.
12374
f5db4291 123752008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
12376
868967cf 12377 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
12378 correctly.
12379 (grub_reiserfs_get_key_offset): Likewise.
12380 (grub_reiserfs_set_key_offset): Likewise.
12381 (grub_reiserfs_set_key_type): Likewise.
fe6b695a 12382 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
868967cf 12383
12384 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
12385 better to remove the bitfield version completely.
f19dbdb7 12386
868967cf 123872008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 12388
f5db4291 12389 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
12390 allocated from the heap, due to the fshelp implementation.
12391 (grub_reiserfs_dir): Free NODE, due to the same reason.
12392
492e6d9d 123932008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
12394
12395 Mostly from Vincent Pelletier:
f19dbdb7 12396
492e6d9d 12397 * fs/reiserfs.c: New file.
f19dbdb7 12398
492e6d9d 12399 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
12400 (reiserfs_mod_SOURCES): New variable.
12401 (reiserfs_mod_CFLAGS): Likewise.
12402 (reiserfs_mod_LDFLAGS): Likewise.
12403
12404 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
12405 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
12406 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
12407 normal/color.c.
12408
9ce3e7c1 124092008-01-06 Robert Millan <rmh@aybabtu.com>
12410
12411 * normal/color.c: Remove `<grub/env.h>'.
12412
f3b58148 124132008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
12414
12415 * include/grub/normal.h: Include <grub/env.h>.
12416
7ac3bcfa 124172008-01-05 Robert Millan <rmh@aybabtu.com>
12418
12419 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
12420 usage example with `(hd0,1)'.
fb358190 12421 Reported by Samuel Thibault.
7ac3bcfa 12422
c8ee99d7 124232008-01-05 Robert Millan <rmh@aybabtu.com>
12424
12425 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
12426 (grub_linux_boot_zimage): Rename to ...
12427 (grub_linux_boot): ... this.
12428 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
12429 (grub_linux_boot_zimage): Conditionalize zImage copy.
12430
12431 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
12432 (grub_linux_boot_bzimage): Remove prototype.
12433 (grub_linux_boot_zimage): Rename to ...
12434 (grub_linux_boot): ... this.
12435
12436 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
12437 (grub_linux_boot): Remove function.
12438
0ece25b1 124392008-01-05 Robert Millan <rmh@aybabtu.com>
12440
12441 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
12442 (grub_env_write_color_highlight): Likewise.
12443 (grub_wait_after_message): Likewise.
12444
12445 * normal/color.c: New file.
12446
12447 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
12448 (normal_mod_DEPENDENCIES): Likewise.
12449
12450 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
12451 (normal_mod_DEPENDENCIES): Likewise.
12452
12453 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
12454 (normal_mod_DEPENDENCIES): Likewise.
12455
12456 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
12457 (normal_mod_DEPENDENCIES): Likewise.
12458
12459 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
12460 for waiting after a message is printed.
12461 * normal/main.c (read_config_file): Likewise.
12462 (grub_normal_init): Register grub_env_write_color_normal() and
12463 grub_env_write_color_highlight() hooks. Mark `color_normal' and
12464 `color_highlight' variables as global.
12465
12466 * normal/menu.c (grub_wait_after_message): New function.
12467 (grub_color_menu_normal): New variable. Replaces ...
12468 (GRUB_COLOR_MENU_NORMAL): ... this macro.
12469 (grub_color_menu_highlight): New variable. Replaces ...
12470 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
12471 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
12472 `GRUB_TERM_COLOR_STANDARD'.
12473 (print_message): Use `grub_setcolorstate' to reload colors. Rename
12474 `normal_code' and `highlight_code' to `old_color_normal' and
12475 `old_color_highlight', respectively.
12476 (grub_menu_init_page): Update colors when drawing the menu, based on
12477 `menu_color_normal' and `menu_color_highlight' variables.
12478 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
12479 a message is printed.
12480
182dd4e5 124812008-01-05 Robert Millan <rmh@aybabtu.com>
12482
12483 * kern/env.c (grub_env_context_open): Propagate hooks for global
12484 variables to new context.
12485
12486 * kern/main.c (grub_set_root_dev): Export `root' variable.
12487
ddf8f6ad 124882008-01-05 Robert Millan <rmh@aybabtu.com>
12489
12490 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
fe6b695a 12491 discs unconditionally, since udev and others have options to provide
ddf8f6ad 12492 them.
12493
d8b43d9b 124942008-01-05 Robert Millan <rmh@aybabtu.com>
12495
12496 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
12497
2bff2de3 124982008-01-04 Christian Franke <franke@computer.org>
12499
12500 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
12501 of eisa_mmap.
12502
97eab917 125032008-01-03 Pavel Roskin <proski@gnu.org>
12504
12505 * kern/i386/linuxbios/init.c: Put "void" to all function
12506 declarations with no arguments.
12507 * kern/powerpc/ieee1275/init.c: Likewise.
12508 * term/i386/pc/at_keyboard.c: Likewise.
12509 * term/i386/pc/vga_text.c: Likewise.
12510 * util/grub-mkdevicemap.c: Likewise.
12511
b9416d00 125122008-01-02 Robert Millan <rmh@aybabtu.com>
12513
12514 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
12515 message when loaded image is out of bounds.
12516 (grub_multiboot_load_elf64): Likewise.
12517
92695df9 125182008-01-02 Pavel Roskin <proski@gnu.org>
12519
12520 * util/grub.d/10_linux.in: Try version without ".old" when
12521 looking for initrd. It's better to use initrd from the newer
12522 kernel of the same version than no initrd at all.
12523
d98d9cad 125242008-01-01 Robert Millan <rmh@aybabtu.com>
12525
12526 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
12527
dbfdce36 125282008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
12529
f19dbdb7 12530 * include/grub/video.h: Added grub_video_unmap_color and
dbfdce36 12531 grub_video_get_active_render_target.
12532 (grub_video_adapter): Added unmap_color and get_active_render_target.
12533
f19dbdb7 12534 * video/video.c: Added grub_video_unmap_color and
dbfdce36 12535 grub_video_get_active_render_target.
12536 (grub_video_get_info): Changed method to accept NULL pointer as an
12537 argument to allow detection of active video adapter.
12538
12539 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
12540 grub_video_vbe_unmap_color_int.
12541 Added grub_video_vbe_unmap_color and
12542 grub_video_vbe_get_active_render_target.
12543 (grub_video_vbe_adapter): Added unmap_color and
12544 get_active_render_target.
12545
f19dbdb7 12546 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
dbfdce36 12547 with grub_video_vbe_unmap_color_int.
12548
12549 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
12550 (DEFAULT_NORMAL_COLOR): Likewise.
12551 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
12552 (DEFAULT_FG_COLOR): Removed.
12553 (DEFAULT_BG_COLOR): Likewise.
12554 (DEFAULT_CURSOR_COLOR): Changed value.
12555 (grub_virtual_screen): Added standard_color_setting,
12556 normal_color_setting, highlight_color_setting and term_color.
12557 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
12558 (bitmap_width): Added.
12559 (bitmap_height): Likewise.
12560 (bitmap): Likewise.
12561 (set_term_color): Likewise.
12562 (grub_virtual_screen_setup): Changed to use new terminal coloring
12563 settings.
12564 (grub_gfxterm_init): Added init for bitmap.
12565 (grub_gfxterm_fini): Added destroy for bitmap.
12566 (redraw_screen_rect): Updated to use background bitmap and new
12567 terminal coloring.
12568 (scroll_up): Added optimization for case when there is no bitmap.
12569 (grub_gfxterm_cls): Fixed to use correct background color.
12570 (grub_virtual_screen_setcolorstate): Changed to use new terminal
12571 coloring.
12572 (grub_virtual_screen_setcolor): Likewise.
12573 (grub_virtual_screen_getcolor): Added.
12574 (grub_gfxterm_background_image_cmd): Likewise.
12575 (grub_video_term): Added setcolor and getcolor.
12576 (MOD_INIT): Added registration of background_image command.
12577 (MOD_TERM): Added unregistration for background_image command.
12578
c3c20931 125792007-12-30 Pavel Roskin <proski@gnu.org>
12580
12581 * loader/multiboot_loader.c: Fix multiboot command
12582 unregistration. Fix all typos in the word "multiboot".
12583
df266716 125842007-12-29 Pavel Roskin <proski@gnu.org>
94239199 12585
12586 * util/grub.d/10_linux.in: Refactor search for initrd. Add
12587 support for initrd names used in Fedora.
12588
fc6e896c 125892007-12-26 Bean <bean123ch@gmail.com>
12590
12591 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
12592 (cpio_mod_SOURCES): New variable.
12593 (cpio_mod_CFLAGS): Likewise.
12594 (cpio_mod_LDFLAGS): Likewise.
12595
12596 * fs/cpio.c: New file.
12597
12598 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
12599
12600 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
12601
12602 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
12603
12604 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12605
533110ad 126062007-12-25 Robert Millan <rmh@aybabtu.com>
12607
12608 * include/grub/term.h (struct grub_term): Add `getcolor' function.
12609 (grub_getcolor): New function.
12610
12611 * kern/term.c (grub_getcolor): New function.
12612 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
12613 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
12614 (print_entry): Set normal and highlight colors to
12615 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
12616 respectively, before printing and restore them to old
12617 values afterwards.
12618 (grub_menu_init_page): Likewise. Fill an additional colored space
12619 that would otherwise be left blank.
12620
12621 * term/efi/console.c (grub_console_getcolor): New function.
12622 (struct grub_console_term.getcolor): New variable.
12623 * term/i386/pc/console.c (grub_console_getcolor): New function.
12624 (struct grub_console_term.getcolor): New variable.
12625 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
12626 (struct grub_console_term.getcolor): New variable.
12627
12628 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
12629 (struct grub_console_term.setcolor): Remove variable.
12630 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
12631 (struct grub_console_term.setcolor): Remove variable.
12632 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
12633 (struct grub_console_term.setcolor): Remove variable.
12634 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
12635 (struct grub_console_term.setcolor): Remove variable.
12636
4931827f 126372007-12-25 Robert Millan <rmh@aybabtu.com>
12638
12639 * configure.ac: Search for possible unifont.hex locations, and
12640 define UNIFONT_HEX if found.
12641
12642 * Makefile.in (UNIFONT_HEX): Define variable.
12643 (DATA): Rename to ...
12644 (PKGLIB): ... this. Update all users.
12645 (PKGDATA): New variable.
12646 (pkgdata_IMAGES): Rename to ...
12647 (pkglib_IMAGES): ... this. Update all users.
12648 (pkgdata_MODULES): Rename to ...
12649 (pkglib_MODULES): ... this. Update all users.
12650 (pkgdata_PROGRAMS): Rename to ...
12651 (pkglib_PROGRAMS): ... this. Update all users.
12652 (pkgdata_DATA): Rename to ...
12653 (pkglib_DATA): ... this. Update all users.
12654 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
12655 (unicode.pff, ascii.pff): New rules.
12656 (all-local): Add `$(PKGDATA)' dependency.
12657 (install-local): Process `$(PKGDATA)'.
12658
12659 * util/update-grub_lib.in (font_path): Search for *.pff files in
12660 a few more locations, including `${pkgdata}'.
12661
57e57e31 126622007-12-23 Robert Millan <rmh@aybabtu.com>
12663
12664 Patch from Bean <bean123ch@gmail.com>:
12665 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
12666 `size'.
12667
4bc72aa9 126682007-12-21 Bean <bean123ch@gmail.com>
12669
12670 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
12671 (ntfscomp_mod_SOURCES): New variable.
12672 (ntfscomp_mod_CFLAGS): Likewise.
12673 (ntfscomp_mod_LDFLAGS): Likewise.
12674
12675 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
12676 (grub_probe_SOURCES): Likewise.
12677 (grub_emu_SOURCES): Likewise.
12678
12679 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
12680 (grub_emu_SOURCES): Likewise.
12681
12682 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
12683 (grub_emu_SOURCES): Likewise.
12684
12685 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
12686 (grub_emu_SOURCES): Likewise.
12687
12688 * fs/ntfs.c (grub_ntfscomp_func): New variable.
12689 (read_run_list): Renamed to grub_ntfs_read_run_list.
12690 (decomp_nextvcn): Moved to ntfscomp.c.
12691 (decomp_getch): Likewise.
12692 (decomp_get16): Likewise.
12693 (decomp_block): Likewise.
12694 (read_block): Likewise.
12695 (read_data): Partially moved to ntfscomp.c.
12696 (fixup): Change unsigned to grub_uint16_t.
12697 (read_mft): Change unsigned long to grub_uint32_t.
12698 (read_attr): Likewise.
12699 (read_data): Likewise.
12700 (read_run_data): Likewise.
12701 (read_run_list): Likewise.
12702 (read_mft): Likewise.
12703
12704 * fs/ntfscomp.c: New file.
12705
12706 * include/grub/ntfs.h: New file.
12707
af680a87 127082007-12-16 Robert Millan <rmh@aybabtu.com>
12709
12710 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
12711 IDE disk check, since Linux is known to support 20 IDE disks.
12712 Reported by Colin Watson.
12713
84be7599 127142007-12-15 Bean <bean123ch@gmail.com>
12715
12716 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
12717 (lnxboot_img_SOURCES): New variable.
12718 (lnxboot_img_ASFLAGS): Likewise.
12719 (lnxboot_img_LDFLAGS): Likewise.
12720
12721 * boot/i386/pc/lnxboot.S: New file.
12722
6af9db01 127232007-11-24 Pavel Roskin <proski@gnu.org>
12724
12725 * configure.ac: Test if '--build-id=none' is supported by the
12726 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
12727 objcopy to generate incorrect binary files (binutils
12728 2.17.50.0.18-1 as shipped by Fedora 8).
12729 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
12730 linking, so that build ID doesn't break the test.
12731
7361cfe6 127322007-11-24 Pavel Roskin <proski@gnu.org>
12733
12734 * include/grub/i386/time.h: use "void" in the argument list
12735 of grub_cpu_idle().
12736 * include/grub/powerpc/time.h: Likewise.
12737 * include/grub/sparc64/time.h: Likewise.
12738
1593e10c 127392007-11-18 Christian Franke <franke@computer.org>
12740
12741 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
12742 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
12743 This fixes the problem that function keys did not work in grub-emu.
12744
3b8db1a8 127452007-11-18 Christian Franke <franke@computer.org>
12746
12747 * disk/host.c (grub_host_open): Remove attribute unused from
12748 name parameter. Add check for "host". This fixes the problem
12749 that grub-emu does not find partitions.
12750
2e29408d 127512007-11-18 Christian Franke <franke@computer.org>
12752
12753 * util/hostfs.c (is_dir): New function.
12754 (grub_hostfs_dir): Handle missing dirent.d_type case.
12755 (grub_hostfs_read): Add missing fseek().
12756 (grub_hostfs_label): Clear label pointer. This fixes a crash
12757 of grub-emu on "ls (host)".
12758
398cd047 127592007-11-18 Christian Franke <franke@computer.org>
12760
12761 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
12762 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
12763 to 64 bit boundary by default.
12764
c405c391 127652007-11-18 Bean <bean123ch@gmail.com>
12766
12767 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
12768 (hexdump_mod_SOURCES): New variable.
12769 (hexdump_mod_CFLAGS): Likewise.
12770 (hexdump_mod_LDFLAGS): Likewise.
f19dbdb7 12771
c405c391 12772 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
12773
12774 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
12775
12776 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
12777
12778 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
12779
12780 * include/grub/hexdump.h: New file.
12781
12782 * commands/hexdump.c: New file.
12783
5cced7fd 127842007-11-10 Robert Millan <rmh@aybabtu.com>
12785
12786 * commands/i386/pc/play.c (beep_off): Switch order of arguments
12787 in grub_outb() calls.
12788 (beep_on): Likewise.
12789
8b714eb0 127902007-11-10 Christian Franke <franke@computer.org>
12791
12792 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
12793 (grub_menu_run): Likewise.
12794
ce0f1839 127952007-11-10 Robert Millan <rmh@aybabtu.com>
12796
12797 * include/grub/i386/efi/machine.h: New file.
12798 * include/grub/i386/linuxbios/machine.h: Likewise.
12799 * include/grub/i386/pc/machine.h: Likewise.
12800 * include/grub/powerpc/ieee1275/machine.h: Likewise.
12801 * include/grub/sparc64/ieee1275/machine.h: Likewise.
12802
12803 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
12804 (serial_hw_io_addr): New variable.
12805 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
12806 instead of `(unsigned short *) 0x400'.
12807
270c237d 128082007-11-10 Bean <bean123ch@gmail.com>
12809
12810 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
12811
a87783bf 128122007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
12813
12814 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
12815 (vga_mod_SOURCES): Added.
12816 (vga_mod_CFLAGS): Likewise.
12817 (vga_mod_LDFLAGS): Likewise.
12818
12819 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
12820 grub_outb() calls.
12821 (set_map_mask): Likewise.
12822 (set_read_map): Likewise.
12823 (set_read_address): Likewise.
12824 (vga_font): Removed variable.
12825 (get_vga_glyph): Removed function.
12826 (invalidate_char): Likewise.
12827 (write_char): Changed to use grub_font_get_glyph() for font
12828 information.
12829 (grub_vga_putchar): Likewise.
12830 (grub_vga_getcharwidth): Likewise.
12831
6433b448 128322007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
12833
12834 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
12835 flags.
12836 (pxeboot_img_LDFLAGS): Likewise.
12837 (diskboot_img_LDFLAGS): Likewise.
12838 (kernel_img_LDFLAGS): Likewise.
12839
49178511 128402007-11-06 Robert Millan <rmh@aybabtu.com>
12841
12842 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
12843 in grub_outb() calls.
12844 (serial_hw_init): Likewise.
12845
53b052de 128462007-11-05 Robert Millan <rmh@aybabtu.com>
12847
12848 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
12849 spaces. Skip non-regular files.
12850
5ab33bba 128512007-11-05 Robert Millan <rmh@aybabtu.com>
12852
12853 * kern/disk.c (grub_disk_firmware_fini)
12854 (grub_disk_firmware_is_tainted): New variables.
12855
12856 * include/grub/disk.h (grub_disk_firmware_fini)
12857 (grub_disk_firmware_is_tainted): Likewise.
12858
12859 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
12860 (grub_disk_biosdisk_fini): ... to here.
12861 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
12862 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
12863 is set. Register grub_disk_biosdisk_fini() in
12864 `grub_disk_firmware_fini'.
12865
12866 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
12867 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
12868 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
12869 to finish existing firmware disk interface.
12870
12871 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
12872 (ata_mod_SOURCES): New variable.
12873 (ata_mod_CFLAGS): Likewise.
12874 (ata_mod_LDFLAGS): Likewise.
12875
0149ab7c 128762007-11-05 Robert Millan <rmh@aybabtu.com>
12877
12878 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
12879 (grub_ata_wait): Reimplement using grub_millisleep().
12880
12881 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
12882 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
12883
be7ac41e 128842007-11-03 Marco Gerards <marco@gnu.org>
12885
12886 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
12887 (CRTC_ADDR_PORT): New macro.
12888 (CRTC_DATA_PORT): Likewise.
12889 (CRTC_CURSOR): Likewise.
12890 (CRTC_CURSOR_ADDR_HIGH): Likewise.
12891 (CRTC_CURSOR_ADDR_LOW): Likewise.
12892 (update_cursor): New function.
12893 (grub_console_real_putchar): Call `update_cursor'.
12894 (grub_console_gotoxy): Likewise.
12895 (grub_console_cls): Set the default color when clearing the
12896 screen.
12897 (grub_console_setcursor): Implemented.
12898
bb06ab2e 128992007-11-03 Marco Gerards <marco@gnu.org>
12900
12901 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
12902 become activate.
12903 (grub_ata_pio_write): Likewise.
12904
12905 (grub_atapi_identify): Wait after issuing an ATA command.
12906 (grub_atapi_packet): Likewise.
12907 (grub_ata_identify): Likewise.
12908 (grub_ata_readwrite): Likewise.
12909
cf8f780b 129102007-11-03 Marco Gerards <marco@gnu.org>
12911
12912 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
12913 (grub_ata_pio_write): Likewise.
12914 (grub_ata_readwrite): Use `grub_error', instead of
12915 returning `grub_errno'.
12916
ed649e54 129172007-11-03 Marco Gerards <marco@gnu.org>
12918
12919 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
12920 grub_ata_pio_write once for every single sector, instead of for
12921 multiple sectors.
12922
ca25d8f0 129232007-10-31 Robert Millan <rmh@aybabtu.com>
12924
12925 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
12926
12927 * conf/i386-linuxbios.rmk: New file.
12928
12929 * kern/i386/pc/hardware.c: Likewise.
12930 * term/i386/pc/at_keyboard.c: Likewise.
12931 * term/i386/pc/vga_text.c: Likewise.
12932
12933 * include/grub/i386/linuxbios/boot.h: Likewise.
12934 * include/grub/i386/linuxbios/console.h: Likewise.
12935 * include/grub/i386/linuxbios/init.h: Likewise.
12936 * include/grub/i386/linuxbios/kernel.h: Likewise.
12937 * include/grub/i386/linuxbios/loader.h: Likewise.
12938 * include/grub/i386/linuxbios/memory.h: Likewise.
12939 * include/grub/i386/linuxbios/serial.h: Likewise.
12940 * include/grub/i386/linuxbios/time.h: Likewise.
12941
12942 * kern/i386/linuxbios/init.c: Likewise.
12943 * kern/i386/linuxbios/startup.S: Likewise.
12944 * kern/i386/linuxbios/table.c: Likewise.
12945
e911ecc1 129462007-10-31 Marco Gerards <marco@gnu.org>
12947
12948 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
12949 (ata_mod_SOURCES): New variable.
12950 (ata_mod_CFLAGS): Likewise.
12951 (ata_mod_LDFLAGS): Likewise.
12952
12953 * disk/ata.c: New file.
12954
12955 * include/grub/disk.h (grub_disk_dev_id): Add
12956 `GRUB_DISK_DEV_ATA_ID'.
f19dbdb7 12957
7f66d0e0 129582007-10-31 Robert Millan <rmh@aybabtu.com>
12959
12960 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
12961 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
12962
12963 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
12964 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
12965
12966 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
12967 `<grub/types.h>'.
12968
12969 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
12970
5cd7dd46 129712007-10-27 Robert Millan <rmh@aybabtu.com>
12972
3236ca65 12973 * include/grub/types.h (ULONG_MAX): Define macro.
5cd7dd46 12974
2ebfc90f 129752007-10-22 Robert Millan <rmh@aybabtu.com>
12976
12977 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
12978 `"../realmode.S"'.
12979 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
12980
73fcb0f3 129812007-10-22 Robert Millan <rmh@aybabtu.com>
12982
12983 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
12984 (pkgdata_MODULES): Add `biosdisk.mod'.
12985 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
12986 variables.
12987
12988 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
12989 (grub_biosdisk_init): Replace with ...
12990 (GRUB_MOD_INIT(biosdisk)): ... this.
12991 (grub_biosdisk_fini): Replace with ...
12992 (GRUB_MOD_FINI(biosdisk)): ... this.
12993
12994 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
12995 (grub_machine_init): Remove call to grub_biosdisk_init().
12996 (grub_machine_fini): Remove call to grub_machine_fini().
12997
12998 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
12999
3381d274 130002007-10-22 Robert Millan <rmh@aybabtu.com>
13001
13002 * include/grub/time.h: New file.
13003 * include/grub/i386/time.h: Likewise.
13004 * include/grub/powerpc/time.h: Likewise.
13005 * include/grub/sparc64/time.h: Likewise.
13006
13007 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
13008 instances to ...
13009 (KERNEL_MACHINE_TIME_HEADER): ... this.
13010 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
13011 instances to ...
13012 (KERNEL_MACHINE_TIME_HEADER): ... this.
13013 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
13014 instances to ...
13015 (KERNEL_MACHINE_TIME_HEADER): ... this.
13016
13017 * kern/i386/efi/init.c: Include `<grub/time.h>'.
13018 (grub_millisleep): New function.
13019 * kern/i386/pc/init.c: Include `<grub/time.h>'.
13020 (grub_millisleep): New function.
13021 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
13022 Remove `grub/machine/time.h' include.
13023 (grub_millisleep): New function.
13024 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
13025 Remove `grub/machine/time.h' include.
13026 (grub_millisleep): New function.
13027
13028 * include/grub/misc.h (grub_div_roundup): New function.
13029
13030 * kern/misc.c: Include `<grub/time.h>'.
13031 (grub_millisleep_generic): New function.
13032
13033 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
13034 Add `time.h'.
13035 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
13036 Add `time.h'.
13037 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
13038 `machine/time.h'. Add `time.h'.
13039 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
13040
a39a0312 130412007-10-21 Robert Millan <rmh@aybabtu.com>
13042
13043 * include/grub/misc.h (grub_max): New function.
13044
2aad70e2 130452007-10-21 Robert Millan <rmh@aybabtu.com>
13046
13047 * util/misc.c (grub_util_info): Call fflush() before returning.
13048
54b71c4b 130492007-10-20 Robert Millan <rmh@aybabtu.com>
13050
13051 * genmk.rb (Image): Copy `extra_flags' from here ...
13052 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
13053
13054 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
13055 to `argc' and `args' arguments.
13056
a979f513 130572007-10-17 Robert Millan <rmh@aybabtu.com>
13058
13059 * kern/i386/loader.S: New file.
13060
13061 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
13062 * kern/i386/loader.S (grub_linux_prot_size)... to here.
13063 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
13064 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
13065 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
13066 * kern/i386/loader.S (grub_linux_real_addr)... to here.
13067 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
13068 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
13069 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
13070 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
13071 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
13072 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
13073 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
13074 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
13075
13076 * kern/i386/realmode.S: New file.
13077
13078 * kern/i386/pc/startup.S (protstack): Moved from here ...
13079 * kern/i386/realmode.S (protstack)... to here.
13080 * kern/i386/pc/startup.S (gdt): Moved from here ...
13081 * kern/i386/realmode.S (gdt)... to here.
13082 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
13083 * kern/i386/realmode.S (prot_to_real)... to here.
13084
13085 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
13086 `kern/i386/realmode.S'.
13087
825fc8fd 130882007-10-17 Robert Millan <rmh@aybabtu.com>
13089
13090 * include/grub/i386/loader.h: New file.
13091
13092 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
13093 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
13094 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
13095 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
13096 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
13097 * include/grub/i386/loader.h (grub_linux_prot_size)
13098 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
13099 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
13100 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
13101 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
13102
13103 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
13104
e179b2f4 131052007-10-15 Robert Millan <rmh@aybabtu.com>
13106
13107 * normal/misc.c (grub_normal_print_device_info): Do not probe for
13108 filesystem when dev->disk is unset.
13109 Do probe for filesystem even when dev->disk->has_partitions is set.
13110 In case a filesystem is found, always report it.
13111 In case it isn't, if dev->disk->has_partitions is set, report that
13112 a partition table was found instead of reporting that no filesystem
13113 could be identified.
13114
5db82af6 131152007-10-12 Robert Millan <rmh@aybabtu.com>
13116
13117 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
13118 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
13119
68f6ac74 13120 * include/grub/types.h (grub_host_to_target16): New macro.
13121 (grub_host_to_target32): Likewise.
13122 (grub_host_to_target64): Likewise.
13123 (grub_target_to_host16): Likewise.
13124 (grub_target_to_host32): Likewise.
13125 (grub_target_to_host64): Likewise.
5db82af6 13126
13127 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
13128 Renamed from to ...
13129 (GRUB_MOD_ALIGN): ...this. Update all users.
13130
68f6ac74 13131 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
13132 grub_host_to_target32.
13133 Replace grub_be_to_cpu32 with grub_target_to_host32.
13134 (load_modules): Likewise.
13135 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
13136 Replace grub_be_to_cpu32 with grub_target_to_host32.
13137 Replace grub_cpu_to_be16 with grub_host_to_target16.
13138 Replace grub_cpu_to_be32 grub_host_to_target32.
5db82af6 13139
3cf497cc 131402007-10-12 Robert Millan <rmh@aybabtu.com>
13141
13142 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
13143 * util/elf/grub-mkimage.c: ... here.
13144
13145 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
13146 `util/powerpc/ieee1275/grub-mkimage.c'.
13147
c8cc3692 131482007-10-07 Robert Millan <rmh@aybabtu.com>
adbc4c9d 13149
c8cc3692 13150 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
13151 and make it easier to figure out.
13152 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
13153 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
13154 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
13155 leave us with less than HEAP_MIN_SIZE total heap.
13156 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
adbc4c9d 13157
5c58b791 131582007-10-03 Robert Millan <rmh@aybabtu.com>
13159
13160 * include/grub/i386/io.h: New file.
13161 * commands/i386/pc/play.c (inb): Removed.
13162 (outb): Removed.
13163 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
13164 with grub_outb().
afcd2ef8 13165 * term/i386/pc/serial.c (inb): Removed.
13166 (outb): Removed.
13167 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
13168 with grub_outb().
13169 * term/i386/pc/vga.c (inb): Removed.
13170 (outb): Removed.
13171 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
13172 with grub_outb().
5c58b791 13173
1a477ed6 131742007-10-02 Robert Millan <rmh@aybabtu.com>
13175
13176 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
13177 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13178 Reported by Marcin Kurek.
13179
6b5d80fa 131802007-09-07 Robert Millan <rmh@aybabtu.com>
13181
13182 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
13183 SmartFirmware version updates (as released by Sven Luther), and avoid
13184 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
13185 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
13186 known broken.
13187
5618afbf 131882007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
13189
13190 From Hitoshi Ozeki:
13191 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
13192 when merging two regions.
13193
6139dcd9 131942007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
13195
508e39ee 13196 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
13197 * normal/completion.c (grub_normal_do_completion): Likewise.
13198 Reported by Hitoshi Ozeki.
13199
132002007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 13201
6139dcd9 13202 Do not use devices at boot in chainloading.
f19dbdb7 13203
6139dcd9 13204 * loader/i386/pc/chainloader.c (boot_drive): New variable.
13205 (boot_part_addr): Likewise.
13206 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
13207 with BOOT_DRIVE and BOOT_PART_ADDR.
13208 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
13209 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
13210
38da6516 132112007-08-29 Robert Millan <rmh@aybabtu.com>
13212
13213 Patch from Simon Peter <dn.tlp@gmx.net>:
13214 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
13215 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
13216 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
13217 util/i386/pc/grub-setup.c_DEPENDENCIES.
13218 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
13219 util/grub-probe.c_DEPENDENCIES.
13220 * conf/powerpc-ieee1275.rmk: Likewise.
13221
29d0928c 132222007-08-28 Robert Millan <rmh@aybabtu.com>
13223
13224 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
13225 to tell grub-mkdevicemap how to name devices.
13226 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
13227 feature).
13228
13229 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
13230 util/i386/get_disk_name.c.
13231 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
13232 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
13233 util/ieee1275/get_disk_name.c.
13234
13235 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
13236
13237 * DISTLIST: Add util/i386/get_disk_name.c and
13238 util/ieee1275/get_disk_name.c.
13239
13240 * util/grub-mkdevicemap.c: Replace device naming logic with
13241 grub_util_get_disk_name() calls.
13242
5a0d3cca 132432007-08-20 Robert Millan <rmh@aybabtu.com>
13244
13245 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
13246 (so that it works for both plural and singular quantities).
13247
8b72db2f 132482007-08-05 Robert Millan <rmh@aybabtu.com>
13249
13250 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
13251 so that [xz] isn't taken into account when determining order.
13252
352466bf 132532007-08-02 Marco Gerards <marco@gnu.org>
13254
13255 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
13256 `include/multiboot2.h', `include/grub/elfload.h',
13257 `include/multiboot.h', `include/grub/multiboot.h',
13258 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
13259 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
13260 `kern/elf.c', `loader/multiboot_loader.c',
13261 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
13262 `loader/i386/pc/multiboot2.c',
13263 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
13264 `util/i386/pc/grub-mkrescue.in'. Remove
13265 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
13266 `include/grub/i386/pc/util/biosdisk.h' and
13267 `include/grub/powerpc/ieee1275/multiboot.h'.
13268
8f096014 132692007-08-02 Bean <bean123ch@gmail.com>
13270
13271 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
13272 (ntfs_mod_SOURCES): New variable.
13273 (ntfs_mod_CFLAGS): Likewise.
13274 (ntfs_mod_LDFLAGS): Likewise.
13275
13276 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
13277 (grub_probe_SOURCES): Likewise.
13278 (grub_emu_SOURCES): Likewise.
13279
13280 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
13281 (grub_emu_SOURCES): Likewise.
13282
13283 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
13284 (grub_emu_SOURCES): Likewise.
f19dbdb7 13285
8f096014 13286 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
13287
13288 * fs/ntfs.c: New file.
13289
9959f7db 132902007-08-02 Bean <bean123ch@gmail.com>
13291
13292 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
13293
13294 * file.h (grub_file): Likewise.
13295
13296 * fshelp.h (grub_fshelp_read_file): Likewise.
13297
13298 * util/i386/pc/grub-setup.c (setup): Likewise.
13299 (save_first_sector): Likewise.
13300 (save_blocklists): Likewise.
f19dbdb7 13301
9959f7db 13302 * fs/affs.c (grub_affs_read_file): Likewise.
13303
13304 * fs/ext2.c (grub_ext2_read_file): Likewise.
13305
13306 * fs/fat.c (grub_fat_read_data): Likewise.
13307
13308 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
13309
13310 * fs/hfs.c (grub_hfs_read_file): Likewise.
13311
13312 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
13313
13314 * fs/jfs.c (grub_jfs_read_file): Likewise.
13315
13316 * fs/minix.c (grub_minix_read_file): Likewise.
13317
13318 * fs/sfs.c (grub_sfs_read_file): Likewise.
13319
13320 * fs/ufs.c (grub_ufs_read_file): Likewise.
f19dbdb7 13321
9959f7db 13322 * fs/xfs.c (grub_xfs_read_file): Likewise.
13323
13324 * command/blocklist.c (read_blocklist): Likewise.
13325 (print_blocklist): Likewise.
13326
0a203f83 133272007-08-02 Marco Gerards <marco@gnu.org>
13328
13329 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
13330 `util/hostfs.c'.
13331
13332 * disk/host.c: New file.
13333
13334 * util/hostfs.c: Likewise.
13335
13336 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
13337 return `GRUB_ERR_BAD_FS'.
13338 * fs/sfs.c (grub_sfs_mount): Likewise.
13339 * fs/xfs.c (grub_xfs_mount): Likewise.
13340
13341 * include/grub/disk.h (enum grub_disk_dev_id): Add
13342 `GRUB_DISK_DEVICE_HOST_ID'.
13343
13344 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
13345
e5dfe777 133462007-07-24 Jerone Young <jerone@gmail.com>
13347
f19dbdb7 13348 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
e5dfe777 13349 modules for compilation.
13350 * conf/powerpc-ieee1275.rmk: Likewise.
13351
13352 * include/multiboot.h: Move multiboot definitions to one file. Rename
13353 many definitions to not get grub specific.
13354 * include/multiboot2.h: Create header with multiboot 2 definitions.
13355 * include/grub/multiboot.h: Header for grub specific function
13356 prototypes and definitions.
13357 * include/grub/multiboot2.h: Likewise.
13358 * include/grub/multiboot_loader.h: Likewise.
13359 * include/grub/i386/pc/multiboot.h: Removed.
13360 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
13361
13362 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
13363 and 2 to allow for one multiboot and module commands.
13364 * loader/multiboot2.c: Add multiboot2 functionality.
13365 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
13366 and definition names.
13367 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
13368 2 functions.
13369 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
13370 ieee1275 specific multiboot2 code.
13371
13372 * kern/i386/pc/startup.S: Change headers and definition names for
13373 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
13374
daf0f0ba 133752007-07-22 Robert Millan <rmh@aybabtu.com>
13376
13377 * geninitheader.sh: Process file specified in first parameter rather
13378 than hardcoding grub_modules_init.lst.
fe6b695a 13379 * geninit.sh: Likewise. Also, construct header name dynamically rather
daf0f0ba 13380 than hardcoding grub_modules_init.h.
13381
13382 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
13383 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
13384 grub_probe_init.[ch] and grub_setup_init.[ch].
13385
13386 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
13387 grub_modules_init.h with grub_emu_init.h.
13388 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
13389 grub_probe_init.[ch] files.
13390 * conf/i386-efi.rmk: Likewise.
13391 * conf/i386-pc.rmk: Likewise.
13392 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
13393 grub_setup_init.[ch] files.
13394
13395 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
13396 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
13397 to initialize modules rather than a list of hardcoded functions.
13398 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
13399 grub_init_all() to initialize modules rather than a list of hardcoded
13400 functions.
13401
54cdc1cc 134022007-07-22 Robert Millan <rmh@aybabtu.com>
13403
13404 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
13405 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
13406
ad0686cc 134072007-07-22 Robert Millan <rmh@aybabtu.com>
13408
13409 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
13410 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
13411 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
13412 flag when running on SmartFirmware.
13413 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
13414 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
13415 was set.
13416
13417 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
13418 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
13419 rather than decreasing it.
13420
13421 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
13422 there's not enough space to do it, fail in the same way as when it
13423 can't be done because there are no partitions.
13424
13425 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
13426 when nvsetenv failed.
13427
969c02ec 134282007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
13429
13430 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
13431 because this rule is automatically generated.
13432 (grub-mkrescue): Removed for the same reason as above.
13433
5a79f472 134342007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
13435
13436 Migrate to GNU General Public License Version 3.
f19dbdb7 13437
5a79f472 13438 * COPYING: Replaced with the plain text version of GPLv3.
13439
13440 * config.guess: Updated from gnulib.
13441 * config.sub: Likewise.
13442
13443 * geninit.sh: Output a GPLv3 copyright notice.
13444 * geninitheader.sh: Likewise.
13445 * genmodsrc.sh: Likewise.
13446 * gensymlist.sh.in: Likewise.
13447
13448 * boot/i386/pc/boot.S: Upgraded to GPLv3.
13449 * boot/i386/pc/diskboot.S: Likewise.
13450 * boot/i386/pc/pxeboot.S: Likewise.
13451 * commands/blocklist.c: Likewise.
13452 * commands/boot.c: Likewise.
13453 * commands/cat.c: Likewise.
13454 * commands/cmp.c: Likewise.
13455 * commands/configfile.c: Likewise.
13456 * commands/echo.c: Likewise.
13457 * commands/help.c: Likewise.
13458 * commands/ls.c: Likewise.
13459 * commands/search.c: Likewise.
13460 * commands/terminal.c: Likewise.
13461 * commands/test.c: Likewise.
13462 * commands/videotest.c: Likewise.
13463 * commands/i386/cpuid.c: Likewise.
13464 * commands/i386/pc/halt.c: Likewise.
13465 * commands/i386/pc/play.c: Likewise.
13466 * commands/i386/pc/reboot.c: Likewise.
13467 * commands/i386/pc/vbeinfo.c: Likewise.
13468 * commands/i386/pc/vbetest.c: Likewise.
13469 * commands/ieee1275/halt.c: Likewise.
13470 * commands/ieee1275/reboot.c: Likewise.
13471 * commands/ieee1275/suspend.c: Likewise.
13472 * disk/loopback.c: Likewise.
13473 * disk/lvm.c: Likewise.
13474 * disk/raid.c: Likewise.
13475 * disk/efi/efidisk.c: Likewise.
13476 * disk/i386/pc/biosdisk.c: Likewise.
13477 * disk/ieee1275/ofdisk.c: Likewise.
13478 * font/manager.c: Likewise.
13479 * fs/affs.c: Likewise.
13480 * fs/ext2.c: Likewise.
13481 * fs/fat.c: Likewise.
13482 * fs/fshelp.c: Likewise.
13483 * fs/hfs.c: Likewise.
13484 * fs/hfsplus.c: Likewise.
13485 * fs/iso9660.c: Likewise.
13486 * fs/jfs.c: Likewise.
13487 * fs/minix.c: Likewise.
13488 * fs/sfs.c: Likewise.
13489 * fs/ufs.c: Likewise.
13490 * fs/xfs.c: Likewise.
13491 * hello/hello.c: Likewise.
13492 * include/grub/acorn_filecore.h: Likewise.
13493 * include/grub/arg.h: Likewise.
13494 * include/grub/bitmap.h: Likewise.
13495 * include/grub/boot.h: Likewise.
13496 * include/grub/cache.h: Likewise.
13497 * include/grub/device.h: Likewise.
13498 * include/grub/disk.h: Likewise.
13499 * include/grub/dl.h: Likewise.
13500 * include/grub/elfload.h: Likewise.
13501 * include/grub/env.h: Likewise.
13502 * include/grub/err.h: Likewise.
13503 * include/grub/file.h: Likewise.
13504 * include/grub/font.h: Likewise.
13505 * include/grub/fs.h: Likewise.
13506 * include/grub/fshelp.h: Likewise.
13507 * include/grub/gzio.h: Likewise.
13508 * include/grub/hfs.h: Likewise.
13509 * include/grub/kernel.h: Likewise.
13510 * include/grub/loader.h: Likewise.
13511 * include/grub/lvm.h: Likewise.
13512 * include/grub/misc.h: Likewise.
13513 * include/grub/mm.h: Likewise.
13514 * include/grub/net.h: Likewise.
13515 * include/grub/normal.h: Likewise.
13516 * include/grub/parser.h: Likewise.
13517 * include/grub/partition.h: Likewise.
13518 * include/grub/pc_partition.h: Likewise.
13519 * include/grub/raid.h: Likewise.
13520 * include/grub/rescue.h: Likewise.
13521 * include/grub/script.h: Likewise.
13522 * include/grub/setjmp.h: Likewise.
13523 * include/grub/symbol.h: Likewise.
13524 * include/grub/term.h: Likewise.
13525 * include/grub/terminfo.h: Likewise.
13526 * include/grub/tparm.h: Likewise.
13527 * include/grub/types.h: Likewise.
13528 * include/grub/video.h: Likewise.
13529 * include/grub/efi/api.h: Likewise.
13530 * include/grub/efi/chainloader.h: Likewise.
13531 * include/grub/efi/console.h: Likewise.
13532 * include/grub/efi/console_control.h: Likewise.
13533 * include/grub/efi/disk.h: Likewise.
13534 * include/grub/efi/efi.h: Likewise.
13535 * include/grub/efi/pe32.h: Likewise.
13536 * include/grub/efi/time.h: Likewise.
13537 * include/grub/i386/linux.h: Likewise.
13538 * include/grub/i386/setjmp.h: Likewise.
13539 * include/grub/i386/types.h: Likewise.
13540 * include/grub/i386/efi/kernel.h: Likewise.
13541 * include/grub/i386/efi/loader.h: Likewise.
13542 * include/grub/i386/efi/time.h: Likewise.
13543 * include/grub/i386/pc/biosdisk.h: Likewise.
13544 * include/grub/i386/pc/boot.h: Likewise.
13545 * include/grub/i386/pc/chainloader.h: Likewise.
13546 * include/grub/i386/pc/console.h: Likewise.
13547 * include/grub/i386/pc/init.h: Likewise.
13548 * include/grub/i386/pc/kernel.h: Likewise.
13549 * include/grub/i386/pc/loader.h: Likewise.
13550 * include/grub/i386/pc/memory.h: Likewise.
13551 * include/grub/i386/pc/multiboot.h: Likewise.
13552 * include/grub/i386/pc/serial.h: Likewise.
13553 * include/grub/i386/pc/time.h: Likewise.
13554 * include/grub/i386/pc/vbe.h: Likewise.
13555 * include/grub/i386/pc/vbeblit.h: Likewise.
13556 * include/grub/i386/pc/vbefill.h: Likewise.
13557 * include/grub/i386/pc/vbeutil.h: Likewise.
13558 * include/grub/i386/pc/vga.h: Likewise.
13559 * include/grub/ieee1275/ieee1275.h: Likewise.
13560 * include/grub/ieee1275/ofdisk.h: Likewise.
13561 * include/grub/powerpc/libgcc.h: Likewise.
13562 * include/grub/powerpc/setjmp.h: Likewise.
13563 * include/grub/powerpc/types.h: Likewise.
13564 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
13565 * include/grub/powerpc/ieee1275/console.h: Likewise.
13566 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
13567 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
13568 * include/grub/powerpc/ieee1275/loader.h: Likewise.
13569 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
13570 * include/grub/powerpc/ieee1275/time.h: Likewise.
13571 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
13572 * include/grub/sparc64/libgcc.h: Likewise.
13573 * include/grub/sparc64/setjmp.h: Likewise.
13574 * include/grub/sparc64/types.h: Likewise.
13575 * include/grub/sparc64/ieee1275/console.h: Likewise.
13576 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
13577 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
13578 * include/grub/sparc64/ieee1275/time.h: Likewise.
13579 * include/grub/util/biosdisk.h: Likewise.
13580 * include/grub/util/getroot.h: Likewise.
13581 * include/grub/util/lvm.h: Likewise.
13582 * include/grub/util/misc.h: Likewise.
13583 * include/grub/util/raid.h: Likewise.
13584 * include/grub/util/resolve.h: Likewise.
13585 * io/gzio.c: Likewise.
13586 * kern/device.c: Likewise.
13587 * kern/disk.c: Likewise.
13588 * kern/dl.c: Likewise.
13589 * kern/elf.c: Likewise.
13590 * kern/env.c: Likewise.
13591 * kern/err.c: Likewise.
13592 * kern/file.c: Likewise.
13593 * kern/fs.c: Likewise.
13594 * kern/loader.c: Likewise.
13595 * kern/main.c: Likewise.
13596 * kern/misc.c: Likewise.
13597 * kern/mm.c: Likewise.
13598 * kern/parser.c: Likewise.
13599 * kern/partition.c: Likewise.
13600 * kern/rescue.c: Likewise.
13601 * kern/term.c: Likewise.
13602 * kern/efi/efi.c: Likewise.
13603 * kern/efi/init.c: Likewise.
13604 * kern/efi/mm.c: Likewise.
13605 * kern/i386/dl.c: Likewise.
13606 * kern/i386/efi/init.c: Likewise.
13607 * kern/i386/efi/startup.S: Likewise.
13608 * kern/i386/pc/init.c: Likewise.
13609 * kern/i386/pc/lzo1x.S: Likewise.
13610 * kern/i386/pc/startup.S: Likewise.
13611 * kern/ieee1275/ieee1275.c: Likewise.
13612 * kern/powerpc/cache.S: Likewise.
13613 * kern/powerpc/dl.c: Likewise.
13614 * kern/powerpc/ieee1275/cmain.c: Likewise.
13615 * kern/powerpc/ieee1275/crt0.S: Likewise.
13616 * kern/powerpc/ieee1275/init.c: Likewise.
13617 * kern/powerpc/ieee1275/openfw.c: Likewise.
13618 * kern/sparc64/cache.S: Likewise.
13619 * kern/sparc64/dl.c: Likewise.
13620 * kern/sparc64/ieee1275/init.c: Likewise.
13621 * kern/sparc64/ieee1275/openfw.c: Likewise.
13622 * loader/efi/chainloader.c: Likewise.
13623 * loader/efi/chainloader_normal.c: Likewise.
13624 * loader/i386/efi/linux.c: Likewise.
13625 * loader/i386/efi/linux_normal.c: Likewise.
13626 * loader/i386/pc/chainloader.c: Likewise.
13627 * loader/i386/pc/chainloader_normal.c: Likewise.
13628 * loader/i386/pc/linux.c: Likewise.
13629 * loader/i386/pc/linux_normal.c: Likewise.
13630 * loader/i386/pc/multiboot.c: Likewise.
13631 * loader/i386/pc/multiboot_normal.c: Likewise.
13632 * loader/powerpc/ieee1275/linux.c: Likewise.
13633 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
13634 * normal/arg.c: Likewise.
13635 * normal/cmdline.c: Likewise.
13636 * normal/command.c: Likewise.
13637 * normal/completion.c: Likewise.
13638 * normal/execute.c: Likewise.
13639 * normal/function.c: Likewise.
13640 * normal/lexer.c: Likewise.
13641 * normal/main.c: Likewise.
13642 * normal/menu.c: Likewise.
13643 * normal/menu_entry.c: Likewise.
13644 * normal/misc.c: Likewise.
13645 * normal/parser.y: Likewise.
13646 * normal/script.c: Likewise.
13647 * normal/i386/setjmp.S: Likewise.
13648 * normal/powerpc/setjmp.S: Likewise.
13649 * normal/sparc64/setjmp.S: Likewise.
13650 * partmap/acorn.c: Likewise.
13651 * partmap/amiga.c: Likewise.
13652 * partmap/apple.c: Likewise.
13653 * partmap/gpt.c: Likewise.
13654 * partmap/pc.c: Likewise.
13655 * partmap/sun.c: Likewise.
13656 * term/gfxterm.c: Likewise.
13657 * term/terminfo.c: Likewise.
13658 * term/efi/console.c: Likewise.
13659 * term/i386/pc/console.c: Likewise.
13660 * term/i386/pc/serial.c: Likewise.
13661 * term/i386/pc/vesafb.c: Likewise.
13662 * term/i386/pc/vga.c: Likewise.
13663 * term/ieee1275/ofconsole.c: Likewise.
13664 * util/biosdisk.c: Likewise.
13665 * util/console.c: Likewise.
13666 * util/genmoddep.c: Likewise.
13667 * util/getroot.c: Likewise.
13668 * util/grub-emu.c: Likewise.
13669 * util/grub-mkdevicemap.c: Likewise.
13670 * util/grub-probe.c: Likewise.
13671 * util/lvm.c: Likewise.
13672 * util/misc.c: Likewise.
13673 * util/raid.c: Likewise.
13674 * util/resolve.c: Likewise.
13675 * util/update-grub.in: Likewise.
13676 * util/update-grub_lib.in: Likewise.
13677 * util/grub.d/00_header.in: Likewise.
13678 * util/grub.d/10_hurd.in: Likewise.
13679 * util/grub.d/10_linux.in: Likewise.
13680 * util/i386/efi/grub-install.in: Likewise.
13681 * util/i386/efi/grub-mkimage.c: Likewise.
13682 * util/i386/pc/grub-install.in: Likewise.
13683 * util/i386/pc/grub-mkimage.c: Likewise.
13684 * util/i386/pc/grub-mkrescue.in: Likewise.
13685 * util/i386/pc/grub-setup.c: Likewise.
13686 * util/i386/pc/misc.c: Likewise.
13687 * util/powerpc/ieee1275/grub-install.in: Likewise.
13688 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
13689 * util/powerpc/ieee1275/misc.c: Likewise.
13690 * video/bitmap.c: Likewise.
13691 * video/video.c: Likewise.
13692 * video/i386/pc/vbe.c: Likewise.
13693 * video/i386/pc/vbeblit.c: Likewise.
13694 * video/i386/pc/vbefill.c: Likewise.
13695 * video/i386/pc/vbeutil.c: Likewise.
13696 * video/readers/tga.c: Likewise.
13697
3572d015 136982007-07-02 Robert Millan <rmh@aybabtu.com>
13699
13700 * conf/i386-efi.rmk: Replace obsolete reference to
13701 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
13702 with util/getroot.c.
13703 * conf/powerpc-ieee1275.rmk: Likewise.
13704 * conf/sparc64-ieee1275.rmk: Likewise.
13705
13706 * util/grub-emu.c (main): Fix unchecked pointer handling.
13707
2c2a681b 137082007-07-02 Robert Millan <rmh@aybabtu.com>
13709
13710 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
13711 invocation to fail, in order to support partition-less media.
13712
13713 * util/i386/pc/grub-install.in: Likewise.
13714
13715 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
13716 which fs or partmap modules are needed (akin to its sister scripts).
13717
13718 Also use grub-probe to get rid of unportable /proc/mounts check.
13719
13720 Print the same informational message that the other scripts do, before
fe6b695a 13721 exiting.
2c2a681b 13722
6193defe 137232007-06-23 Robert Millan <rmh@aybabtu.com>
13724
fe6b695a 13725 * util/update-grub_lib.in (font_path): New function. Determine whether
6193defe 13726 a font file can be found and, if so, echo the GRUB path to it.
13727
13728 * util/update-grub.in: Handle multiple terminals depending on user
13729 input, platform availability and font file presence. Propagate
13730 variables of our findings to /etc/grub.d/ children.
13731
13732 * util/grub.d/00_header.in: Handle multiple terminals, based on
13733 environment setup by update-grub.
13734
eface1dc 137352007-06-23 Robert Millan <rmh@aybabtu.com>
13736
ba50d28f 13737 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
eface1dc 13738
bf697e28 137392007-06-21 Robert Millan <rmh@aybabtu.com>
13740
13741 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
13742 indicate end of data section in kernel image.
13743 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
13744 GRUB_KERNEL_MACHINE_DATA_END.
13745
13746 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
13747 space for it.
13748 * kern/i386/efi/startup.S: Likewise.
13749
13750 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
13751 during image generation. Implement --prefix option to override this
13752 patch.
13753 * util/i386/efi/grub-mkimage.c: Likewise.
13754
13755 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
13756 code to make path relative to its root into a separate function.
13757
13758 * util/i386/pc/grub-install.in: Use newly provided
13759 make_system_path_relative_to_its_root() to convert ${grubdir}, then
13760 pass the result to grub-install --prefix.
13761
baa574b4 137622007-06-13 Robert Millan <rmh@aybabtu.com>
13763
13764 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
13765 DEFAULT_DEVICE_MAP.
13766 * util/grub-emu.c: Use above definitions from misc.h instead of
13767 defining them.
13768 * util/grub-mkdevicemap.c: Likewise.
13769 * util/i386/pc/grub-setup.c: Likewise.
13770 * util/grub-probe.c: Likewise.
13771 (probe): Abort with grub_util_error() when either
13772 grub_guess_root_device or grub_util_get_grub_dev fails.
13773
0215dcbf 137742007-06-12 Robert Millan <rmh@aybabtu.com>
13775
13776 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
13777 "pager" assignment.
13778 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
13779 "pcdata".
13780 * util/grub-probe.c (probe): Likewise for "drive_name".
13781
8af2ab7b 137822007-06-11 Robert Millan <rmh@aybabtu.com>
13783
13784 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
13785 not just the cdrom one.
13786
59d31694 137872007-06-11 Robert Millan <rmh@aybabtu.com>
13788
13789 * util/i386/pc/grub-mkrescue.in: Add "set -e".
13790 Add --pkglibdir=DIR option to override pkglibdir.
13791 Mention --image-type=TYPE in help output.
13792 Fix --grub-mkimage (it was a no-op).
fe6b695a 13793 Abort gracefully when no parameter is given.
59d31694 13794
7ee367e4 137952007-06-11 Robert Millan <rmh@aybabtu.com>
13796
13797 * util/i386/pc/grub-mkrescue.in: New file.
13798 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
13799 * Makefile.in: Handle bin_SCRIPTS.
13800
29b0ed46 138012007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
13802
13803 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
13804 list of video modes.
13805
c0f90770 138062007-06-06 Robert Millan <rmh@aybabtu.com>
13807
13808 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
13809 file doesn't exist, or if it is in a filesystem grub can't read.
13810
13811 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
13812 not abort if GRUB_DRIVE could not be defined. Rearrange generated
13813 header comment to fit in 80 columns when the variables are resolved.
13814
13815 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
13816 could be identified by update-grub. Remove redundant check for
fe6b695a 13817 unifont.pff existence (since convert_system_path_to_grub_path now
c0f90770 13818 handles that).
13819
fb36dc26 138202007-06-04 Robert Millan <rmh@aybabtu.com>
13821
13822 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
13823
13824 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
13825
13826 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
13827
0c68c93e 138282007-06-04 Robert Millan <rmh@aybabtu.com>
13829
13830 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
13831
13832 * include/grub/partition.h: Declare grub_apple_partition_map_init and
13833 grub_apple_partition_map_fini.
13834
13835 * util/biosdisk.c
13836 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
13837 to access >2 TiB disks).
13838
13839 Print disk->total_sectors with %llu instead of %lu, since this
13840 variable is always 64-bit (prevents wrong disk size from being displayed
13841 on either >2 TiB disk or big-endian CPU).
13842
13843 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
13844 into a generic case that supports all (sane) partition maps.
13845
13846 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
13847 breaks big-endian.
13848
13849 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
13850 and grub_apple_partition_map_fini() after that.
13851
0f23eb74 138522007-06-01 Robert Millan <rmh@aybabtu.com>
13853
13854 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
13855
13856 * util/grub.d/00_header.in: Only enable gfxterm when
13857 convert_system_path_to_grub_path() succeeds.
13858
42c71976 138592007-05-20 Robert Millan <rmh@aybabtu.com>
13860
13861 * util/update-grub_lib.in: New file.
13862 * DISTLIST: Add update-grub_lib.in.
13863 * conf/common.rmk: Generate update-grub_lib and install it in
13864 $(lib_DATA).
13865 * Makefile.in: Add install routine for $(lib_DATA).
13866
13867 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
13868 function provided by update-grub_lib to support arbitrary paths of
13869 unifont.pff.
13870 * util/update-grub.in: Use convert_system_path_to_grub_path() to
13871 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
13872
5beb2291 138732007-05-19 Robert Millan <rmh@aybabtu.com>
13874
13875 * commands/i386/cpuid.c: New module.
13876 * DISTLIST: Add it.
13877 * conf/i386-efi.rmk: Enable cpuid.mod.
13878 * conf/i386-pc.rmk: Likewise.
13879
7262eca1 138802007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
13881
13882 * kern/disk.c (grub_disk_read): Check return value of
13883 grub_realloc().
13884
260ba823 138852007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
13886
13887 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
13888 arrays.
13889 * disk/raid.c (grub_raid_open): Likewise.
13890
1ecb6cf2 138912007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
13892
13893 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
13894 stack instead of on the heap.
13895
13896 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
13897 before doing a read on it.
13898
13899 * configure.ac: Only use -fno-stack-protector for the target
13900 environment.
f19dbdb7 13901
21c8cbb1 139022007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
13903
13904 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
13905 __attribute_ ((unused)) to mode_type argument.
13906
13907 * util/getroot.c (grub_guess_root_device): Fix #endif.
f19dbdb7 13908
21c8cbb1 13909 * kern/misc.c (memcmp): Fix prototype.
13910
13911 * include/grub/partition.h [GRUB_UTIL]
13912 (grub_gpt_partition_map_init): Add prototype.
13913 (grub_gpt_partition_map_fini): Likewise.
13914
13915 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
13916 at the right place.
13917
13918 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
13919 (grub_fat_read_data): Likewise.
13920 (grub_fat_find_dir): Likewise.
13921
13922 * font/manager.c (find_glyph): Make table a const.
13923 (grub_font_get_glyph): Remove bitmap from if statement.
f19dbdb7 13924
849d55d3 139252007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
13926
13927 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
13928 code, first search for device in /dev/mapper, then in /dev.
13929 (grub_util_get_grub_dev): New function.
13930 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
13931 prototype.
13932 * util/grub-probe.c (probe): Remove check for RAID, call
13933 grub_util_get_grub_dev() instead of
13934 grub_util_biosdisk_get_grub_dev().
13935 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
13936 grub_util_biosdisk_get_grub_dev().
13937 * util/i386/pc/grub-setup.c (main): Likewise.
13938
8fff7c2f 139392007-05-16 Robert Millan <rmh@aybabtu.com>
13940
13941 * DISTLIST: Update for the latest changes.
13942 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
13943 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
13944 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
13945 grub/util/biosdisk.h.
13946 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
13947 grub/util/biosdisk.h.
13948
48e12b52 139492007-05-16 Robert Millan <rmh@aybabtu.com>
13950
13951 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
13952
46b9d128 139532007-05-16 Robert Millan <rmh@aybabtu.com>
13954
13955 * util/i386/efi/grub-install.in: New.
13956 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
13957 newly added grub-install.
13958 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
13959 include.
13960 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
13961 grub/util/biosdisk.h.
13962 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
13963 grub/util/biosdisk.h.
13964
2d1a40a9 139652007-05-16 Robert Millan <rmh@aybabtu.com>
13966
13967 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
13968 * include/grub/util/biosdisk.h: ... here.
13969 * util/i386/pc/biosdisk.c: Moved to ...
13970 * util/biosdisk.c: ... here.
13971 * util/i386/pc/getroot.c: Moved to ...
13972 * util/getroot.c: ... here.
13973 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
13974 * util/grub-mkdevicemap.c: ... here.
13975 * util/i386/pc/grub-probe.c: Moved to ...
13976 * util/grub-probe.c: ... here.
13977
9e26e3bc 139782007-05-15 Robert Millan <rmh@aybabtu.com>
13979
13980 * util/update-grub.in: Remove duplicated line in grub.cfg header
13981 message.
13982
57f96397 139832007-05-13 Robert Millan <rmh@aybabtu.com>
13984
13985 * util/update-grub.in: Fix a few assumptions about the devices holding
13986 /, /boot and /boot/grub being the same.
13987 * util/grub.d/00_header.in: Likewise.
13988 * util/grub.d/10_hurd.in: Likewise.
13989 * util/grub.d/10_linux.in: Likewise.
13990
13991 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
13992 patterns. Use that to define the `.old' suffix as older than `'.
13993
13994 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
13995
13996 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
13997 the grub.cfg header message.
13998
2e610d62 139992007-05-11 Robert Millan <rmh@aybabtu.com>
14000
14001 * util/update-grub.in: Create device.map if it doesn't already exist,
14002 before attempting to run grub-probe.
14003 Check for grub-probe and grub-mkdevicemap with the same code
14004 grub-install is using.
14005 Remove test mode.
14006
3f6a10ef 140072007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
14008
14009 * Makefile.in: Add the datarootdir autoconf variable.
14010
02e7b75e 140112007-05-09 Robert Millan <rmh@aybabtu.com>
14012
14013 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
f19dbdb7 14014 fail gracefully if dev->disk->partition == NULL.
02e7b75e 14015
75f396cc 140162007-05-07 Robert Millan <rmh@aybabtu.com>
14017
14018 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
14019 determine partition map module.
14020 * util/i386/pc/grub-install.in: Use this feature to decide which
14021 partition module to load, instead of hardcoding pc and gpt.
14022
da65cb36 140232007-05-07 Robert Millan <rmh@aybabtu.com>
14024
14025 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
14026 source directory differs from build directory.
14027
b57d6a91 140282007-05-05 Robert Millan <rmh@aybabtu.com>
14029
14030 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
14031 initialisation.
14032
509d00f1 140332007-05-05 Robert Millan <rmh@aybabtu.com>
14034
14035 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
14036
c48f23ef 140372007-05-05 Robert Millan <rmh@aybabtu.com>
14038
14039 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
14040 command-line arguments via ${GRUB_CMDLINE_LINUX}.
14041
20b97658 140422007-05-05 Robert Millan <rmh@aybabtu.com>
14043
14044 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
14045 (grub_probe_SOURCES): Likewise.
14046 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
14047 GPT and initialize dos_part and bsd_part accordingly.
14048 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
14049 install_bsd_part.
14050 (main): Activate gpt module for use during partition identification,
14051 and deactivate it afterwards.
14052 * util/i386/pc/grub-install.in: Add gpt module to core.img.
14053 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
14054 partition identification, and deactivate it afterwards.
14055
99123174 140562007-05-05 Robert Millan <rmh@aybabtu.com>
14057
14058 * term/i386/pc/console.c (grub_console_fini): Call
14059 grub_term_set_current() before grub_term_unregister().
14060
ebd97f6e 140612007-05-04 Robert Millan <rmh@aybabtu.com>
14062
14063 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
14064 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
14065 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
14066 and update-grub_DATA.
14067 * conf/common.rmk: Build and install update-grub components.
14068 * conf/common.mk: Regenerate.
14069 * util/update-grub.in: New. Core of update-grub.
14070 * util/grub.d/00_header.in: New. Generates grub.cfg header.
14071 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
14072 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
14073 * util/grub.d/README: New. Document grub.d directory layout.
14074
b06a264d 140752007-05-01 Robert Millan <rmh@aybabtu.com>
14076
14077 * util/grub-emu.c: Move initialization functions
14078 grub_util_biosdisk_init() and grub_init_all() before
14079 grub_util_biosdisk_get_grub_dev(), which relies on them.
14080
41f0050e 140812007-04-19 Robert Millan <rmh@aybabtu.com>
14082
14083 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
14084 it is used later.
14085
04582bb3 140862007-04-18 Jerone Young <jerone@gmail.com>
14087
f19dbdb7 14088 * kernel/elf.c: Add missing parenthesis for conditional statement
04582bb3 14089 stanza.
14090
08db4632 140912007-04-10 Jerone Young <jerone@gmail.com>
49892fdf 14092
08db4632 14093 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
14094 continue on and look for device node with real device name.
14095
801b76be 140962007-04-10 Jerone Young <jerone@gmail.com>
f19dbdb7 14097
fe6b695a 14098 * configure.ac: Add argument for autoconf to use transformation
1d543c3e 14099 ability.
14100 * Makefile.in: Add autoconf package transformation code.
14101 * util/i386/pc/grub-install.in: Likewise.
14102 * util/powerpc/ieee1275/grub-install.in: Likewise.
14103
6795c4e1 141042007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
14105
14106 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
14107 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
14108 (EXT2_REVISION): Likewise.
14109 (EXT2_INODE_SIZE): Likewise.
14110 (struct grub_ext2_block_group): Added a missing member
14111 "used_dirs".
14112 (grub_ext2_read_inode): Divide by the inode size in a superblock
14113 instead of 128 to obtain INODES_PER_BLOCK.
14114 Use the macro EXT2_INODE_SIZE instead of directly using
14115 SBLOCK->INODE_SIZE.
14116
d70af616 141172007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
14118
14119 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
14120 superblock instead of the structure size to compute an
14121 offset. This fixes the problem that GRUB could not read a
14122 filesystem when inode size is different from 128-byte.
14123
3b801603 141242007-03-05 Marco Gerards <marco@gnu.org>
14125
14126 * normal/main.c (read_config_file): When "menu" is not set, create
14127 an initial context.
14128
4785bfe4 141292007-02-21 Hollis Blanchard <hollis@penguinppc.org>
14130
14131 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
14132 (HEAP_LIMIT): New macro.
14133 (grub_claim_heap): Claim memory up to `heaplimit'.
14134
a0cbb023 141352007-02-21 Hollis Blanchard <hollis@penguinppc.org>
14136
14137 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
14138 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
14139 (_start): Likewise.
14140 (grub_arch_modules_addr): Return address after `_end'.
14141 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
14142 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
14143 (add_segments): Calculate `_end' from phdr size and location.
14144 (ALIGN_UP): Moved to ...
14145 * include/grub/misc.h: here.
14146 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
14147 New macro.
14148 (GRUB_IEEE1275_MODULE_BASE): Removed.
14149
fd7d8eba 141502007-02-20 Hollis Blanchard <hollis@penguinppc.org>
14151
14152 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
14153 loop boundary.
14154
9b09e6fc 141552007-02-20 Hollis Blanchard <hollis@penguinppc.org>
14156
14157 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
14158 All users updated.
14159 (grub_elf64_load_hook_t): Likewise.
14160 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
14161 debug output.
14162
3ce27299 141632007-02-20 Hollis Blanchard <hollis@penguinppc.org>
14164
14165 * kern/mm.c: Update copyright.
14166 (grub_mm_debug): Correct syntax error.
14167 (grub_mm_dump_free): New function.
14168 (grub_debug_free): Call `grub_free'.
14169 * include/grub/mm.h: Update copyright.
14170 (grub_mm_dump_free): Add declaration.
14171
077d5fee 141722007-02-12 Hollis Blanchard <hollis@penguinppc.org>
14173
14174 * include/grub/ieee1275/ieee1275.h: Update copyright.
14175 * kern/powerpc/ieee1275/init.c: Likewise.
14176 * kern/powerpc/ieee1275/openfw.c: Likewise.
14177
14178 * loader/powerpc/ieee1275/linux.c: Likewise.
14179 * include/grub/elfload.h: Likewise.
14180 * kern/elf.c: Likewise.
14181 (grub_elf32_load): Pass `base' and `size' parameters. Update all
14182 callers.
14183 (grub_elf64_load): Likewise.
14184 (grub_elf32_load_segment): Move to a nested function.
14185 (grub_elf64_load_segment): Likewise.
14186
dc946850 141872007-02-12 Hollis Blanchard <hollis@penguinppc.org>
14188
14189 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
14190 prototype.
14191 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
14192 (grub_heap_len): Likewise.
14193 (HEAP_SIZE): New macro.
14194 (grub_claim_heap): New function.
14195 (grub_machine_init): Don't claim heap directly. Call
14196 `grub_claim_heap'.
14197 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
14198 (grub_available_iterate): New function.
14199
baa2a121 142002007-02-03 Thomas Schwinge <tschwinge@gnu.org>
14201
14202 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
14203 * configure.ac: Use it for testing the HOST and TARGET compilers.
14204
4fe9862e 142052006-12-13 Thomas Schwinge <tschwinge@gnu.org>
14206
14207 * Makefile.in (enable_grub_emu): New variable.
14208 * configure.ac (--enable-grub-emu): New option.
14209 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
14210 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
14211 * conf/i386-pc.rmk: Likewise.
14212 * conf/powerpc-ieee1275.rmk: Likewise.
14213 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
14214
a8aa5762 142152006-12-12 Marco Gerards <marco@gnu.org>
14216
14217 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
14218
14219 * kern/env.c (grub_env_unset): Don't free the member `value' when
14220 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
14221 pointer.
14222
14223 * normal/main.c (current_menu): Removed.
14224 (free_menu): Unset the `menu' environment variable.
14225 (grub_normal_menu_addentry): Make use of the environment variable
14226 `menu', instead of using the global `current_menu'. Allocate
14227 memory for the sourcecode of this entry.
14228 (read_config_file): New argument `nested', changed all callers.
14229 Only in the case of a new context, initialize a new menu. Set the
14230 `menu' environment variable.
14231 (grub_normal_execute): Don't set and unset the environment
14232 variable `menu' here anymore. Only free the menu when leaving the
14233 context.
14234
14235 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
14236 leak.
14237
957b3a3e 142382006-12-11 Marco Gerards <marco@gnu.org>
14239
14240 * normal/menu_entry.c (run): Fix off by one bug so the last line
14241 is executed. Move the loader check to outside the loop.
14242
ef875714 142432006-12-08 Hollis Blanchard <hollis@penguinppc.org>
14244
14245 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
14246
4e739985 142472006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
14248
14249 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
14250 the number of sectors. Reported by Andrey Shuvikov
14251 <mr_hyro@yahoo.com>.
f19dbdb7 14252
790707f2 142532006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
14254
14255 * kern/disk.c (grub_disk_read): When there is a read error, always
14256 try to read only the necessary data.
f19dbdb7 14257
790707f2 14258 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
14259 disk/raid.c.
14260 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
14261 prototype.
14262 [GRUB_UTIL] (grub_raid_fini): Likewise.
14263 [GRUB_UTIL] (grub_lvm_init): Likewise.
f19dbdb7 14264 [GRUB_UTIL] (grub_lvm_fini): Likewise.
790707f2 14265 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
14266 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
14267 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
14268 and grub_raid_fini().
f19dbdb7 14269
03e58196 142702006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
14271
14272 * include/grub/types.h (__unused): Rename to UNUSED.
14273 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
14274 (grub_elf64_size): Likewise.
f19dbdb7 14275
ae4f23bf 142762006-11-03 Hollis Blanchard <hollis@penguinppc.org>
14277
14278 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
14279 grub_error_push and grub_error_pop in the error-handling path.
14280 (grub_elf32_load_segment): Only call grub_file_read with non-zero
14281 length.
14282
2166cc83 142832006-11-03 Hollis Blanchard <hollis@penguinppc.org>
14284
14285 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
14286 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
14287 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14288 (kernel_elf_SOURCES): Likewise.
14289 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
14290 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
14291 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
14292 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
14293 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
14294 (elf_mod_SOURCES): New variable.
14295 (elf_mod_CFLAGS): Likewise.
14296 (elf_mod_LDFLAGS): Likewise.
14297 * include/grub/types.h (__unused): New macro.
14298 * include/grub/elfload.h: New file.
14299 * kern/elf.c: Likewise.
14300 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
14301 (ELF32_LOADMASK): New macro.
14302 (ELF64_LOADMASK): Likewise.
14303 (vmlinux): Removed.
14304 (grub_linux_load32): New function.
14305 (grub_linux_load64): Likewise.
14306 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
14307 Use grub_elf_t instead of grub_file_t.
14308
a09d5aa5 143092006-11-02 Hollis Blanchard <hollis@penguinppc.org>
14310
14311 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
14312 `catch_result' to struct set_color_args.
14313
d976fc51 143142006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
14315
14316 * normal/menu.c: Include grub/script.h.
14317 * normal/menu_entry.c: Likewise.
14318 * include/grub/normal.h: Do not include grub/script.h.
14319
67507549 143202006-10-27 Hollis Blanchard <hollis@penguinppc.org>
14321
14322 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
14323
69203a99 143242006-10-27 Hollis Blanchard <hollis@penguinppc.org>
14325
14326 * kern/disk.c (grub_disk_open): Print debug messages when opening a
14327 disk.
14328 (grub_disk_close): Print debug messages when closing a disk.
14329 (grub_disk_read): Print debug messages when disk read fails.
14330 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
14331 filesystem type.
14332 * kern/partition.c: Include misc.h.
14333 (grub_partition_iterate): Print debug messages when detecting
14334 partition type.
14335
e2b8278c 143362006-10-27 Hollis Blanchard <hollis@penguinppc.org>
14337
14338 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
14339 is negative.
14340 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
14341
97b2f2ff 143422006-10-26 Hollis Blanchard <hollis@penguinppc.org>
14343
14344 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
14345 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
14346
6555d655 143472006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
14348
14349 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
14350 instead of sizeof(lv). Patch by Michael Guntsche.
14351
4d42b77f 143522006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
14353
14354 * disk/lvm.c: Rename VGS to VG_LIST.
14355 (grub_lvm_iterate): Change VGS->LV to VG-LV.
14356 (grub_lvm_open): Likewise.
14357 Thanks to Michael Guntsche for finding this bug.
14358
5d74d927 143592006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
14360
14361 * configure.ac (AC_INIT): Bumped to 1.95.
14362
a1bb27e4 143632006-10-14 Robert Millan <rmh@aybabtu.com>
14364
14365 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
14366 with "/dev/.static/dev/md".
14367
e0994b8b 143682006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
14369
14370 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
14371 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
14372 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
14373 DRIVE_NAME are always freed.
14374
14375 * util/i386/pc/biosdisk.c (make_device_name): Add one into
14376 DOS_PART, as a DOS partition is counted from one instead of zero
14377 now. Reported by Robert Millan.
14378
ddd5cee9 143792006-10-14 Robert Millan <rmh@aybabtu.com>
14380
14381 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
14382 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
14383 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
14384 string returned by grub_guess_root_device.
14385 * util/i386/pc/grub-setup.c: Likewise.
14386 * util/i386/pc/grub-probefs.c: Likewise.
14387
14388 * util/i386/pc/grub-probefs.c: Rename to ...
14389 * util/i386/pc/grub-probe.c: ... this.
14390 * DISTLIST: Remove grub-probefs, add grub-probe.
14391 * conf/i386-efi.rmk: Likewise.
14392 * conf/i386-pc.rmk: Likewise.
14393 * util/i386/pc/grub-install.in: Likewise.
14394
14395 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
14396 choose which information we want to print.
14397
2b002173 143982006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
14399
14400 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
14401 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
14402 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
14403 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
14404 video/readers/tga.c and video/i386/pc/vbeutil.c.
14405
144062006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
14407
14408 Added support for RAID and LVM.
f19dbdb7 14409
2b002173 14410 * disk/lvm.c: New file.
14411 * disk/raid.c: Likewise.
14412 * include/grub/lvm.h: Likewise.
f19dbdb7 14413 * include/grub/raid.h: Likewise.
2b002173 14414 * include/grub/util/lvm.h: Likewise.
14415 * include/grub/util/raid.h: Likewise.
14416 * util/lvm.c: Likewise.
14417 * util/raid.c: Likewise.
14418
14419 * include/grub/disk.h (grub_disk_dev_id): Add
14420 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
14421 (grub_disk_get_size): New prototype.
14422 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
14423 returns a partition.
14424 (grub_disk_get_size): New function.
f19dbdb7 14425
2b002173 14426 * kern/i386/pc/init.c (make_install_device): Copy the prefix
14427 verbatim if grub_install_dos_part is -2.
14428
14429 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
14430 and LVM devices.
14431
14432 * util/i386/pc/grub-setup.c (setup): New argument
14433 MUST_EMBED. Force embedding of GRUB when the argument is
14434 true. Close FILE before returning.
14435 (main): Add support for RAID and LVM.
f19dbdb7 14436
2b002173 14437 * conf/common.rmk: Add RAID and LVM modules.
14438 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
14439 util/lvm.c.
14440 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
14441
14442 * kern/misc.c (grub_strstr): New function.
14443 * include/grub/misc.h (grub_strstr): New prototype.
14444
050548d0 144452006-10-10 Tristan Gingold <tristan.gingold@bull.net>
14446
14447 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
14448
da849d2d 144492006-10-05 Tristan Gingold <tristan.gingold@bull.net>
14450
14451 * kern/misc.c (grub_strtoull): Guess the base only if not
14452 specified.
14453
97b2f2ff 144542006-10-01 Hollis Blanchard <hollis@penguinppc.org>
4f0acd39 14455
14456 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
14457 PowerMac support.
14458
97b2f2ff 144592006-10-01 Hollis Blanchard <hollis@penguinppc.org>
fba51f48 14460
14461 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
14462
14463 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
14464 Remove `flags' argument. All callers changed.
14465 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
14466 (IEEE1275_IHANDLE_INVALID): New variable.
14467 (IEEE1275_CELL_INVALID): New variable.
14468 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
14469 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
14470 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
14471 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
14472 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
14473 codes from Open Firmware. All callers updated.
14474 (grub_ieee1275_next_property): Directly return Open Firmware return
14475 code.
14476 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
14477 Standardize error checking from `grub_ieee1275_get_property'.
14478 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
14479 `devalias' to `aliases'. Correct comments. Consolidate error paths.
14480
97b2f2ff 144812006-10-01 Hollis Blanchard <hollis@penguinppc.org>
cc6d3df3 14482
14483 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
14484 `instance_to_package_args' to `instance_to_path_args'.
14485
14486 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
14487 `grub_ieee1275_chosen'.
14488
14489 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
14490 `grub_ieee1275_interpret'.
14491
97b2f2ff 144922006-09-25 Hollis Blanchard <hollis@penguinppc.org>
02bb8acc 14493
14494 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
14495
97b2f2ff 144962006-09-25 Hollis Blanchard <hollis@penguinppc.org>
663b72f0 14497
14498 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
14499 (__cmpdi): Likewise.
14500
14501 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
14502 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
14503 `grub_ssize_t'.
14504
02bb8acc 14505 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
663b72f0 14506
14507 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
14508 to type `grub_ssize_t'.
14509 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
14510
7f9a8531 145112006-09-22 Marco Gerards <marco@gnu.org>
14512
14513 * normal/script.c (grub_script_create_cmdmenu): Skip leading
14514 newlines.
14515
b5ef1102 145162006-09-22 Marco Gerards <marco@gnu.org>
14517
14518 * commands/echo.c: New file.
14519
14520 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
14521
14522 * conf/common.rmk (echo_mod_SOURCES): New variable.
14523 (echo_mod_CFLAGS): Likewise.
14524 (echo_mod_LDFLAGS): Likewise.
14525
2cff3677 145262006-09-22 Marco Gerards <marco@gnu.org>
14527
14528 * normal/main.c (get_line): Malloc memory instead of using
14529 preallocated memory. Removed the arguments `cmdline' and
14530 `max_len'. Updated all callers.
14531
6ba4688b 145322006-09-22 Marco Gerards <marco@gnu.org>
14533
14534 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
14535 (normal_mod_DEPENDENCIES): Likewise.
14536
14537 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
14538 (normal_mod_DEPENDENCIES): Likewise.
14539
14540 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
14541
e02ac02c 145422006-09-22 Johan Rydberg <jrydberg@gnu.org>
14543
14544 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
14545 programs.
14546 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
14547 (normal_mod_DEPENDENCIES): Likewise.
14548 * conf/i386-pc.mk: Regenerate.
14549 * conf/i386-efi.mk: Likewise
14550 * conf/common.mk: Likewise.
14551 * conf/powerpc-ieee1275.mk: Likewise.
14552 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 14553
8d252e44 145542006-09-22 Robert Millan <rmh@aybabtu.com>
14555
14556 Sync with i386 version.
14557 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
14558 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
14559
209bf7ac 145602006-09-21 Robert Millan <rmh@aybabtu.com>
14561
14562 Import from GRUB Legacy (lib/device.c):
14563 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
14564 (init_device_map) [__linux__]: Add support for I2O devices.
14565
6b146090 145662006-09-14 Marco Gerards <marco@gnu.org>
14567
14568 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
14569 `-melf_i386'.
14570
e38600a8 145712006-09-14 Robert Millan <rmh@aybabtu.com>
2952da5d 14572
14573 * util/i386/pc/grub-install.in: Skip menu.lst when removing
14574 /boot/grub/*.lst.
78fa1790 14575
2952da5d 14576 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
6b146090 14577
2952da5d 14578 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
14579 before adding it to device.map.
14580
01b82a64 145812006-08-15 Johan Rydberg <jrydberg@gnu.org>
14582
fe6b695a 14583 * genmk.rb: Let GCC generate dependencies the first time it
01b82a64 14584 compiles a file; using the -MD option.
14585 * conf/common.mk: Regenerate.
14586 * conf/i386-pc.mk: Likewise.
14587 * conf/i386-efi.mk: Likewise.
14588 * conf/powerpc-ieee1275.mk: Likewise.
14589 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 14590
1064790d 145912006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
14592
14593 Move the prototypes of grub_setjmp and grub_longjmp to
14594 cpu/setjmp.h, so that each architecture may specify different
14595 attributes.
f19dbdb7 14596
1064790d 14597 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
14598 (grub_longjmp): Likewise.
14599 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
14600 (grub_longjmp): Likewise.
14601 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
14602 (grub_longjmp): Likewise.
14603
14604 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
14605 [!GRUB_UTIL] (grub_longjmp): Removed.
14606
29dda3ed 146072006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
14608
14609 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
14610 "color!" method does not return any value.
14611
ad2a06ed 146122006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
14613
14614 * include/grub/bitmap.h: New file.
14615
14616 * include/grub/i386/pc/vbeutil.h: Likewise.
14617
14618 * video/bitmap.c: Likewise.
14619
14620 * video/readers/tga.c: Likewise.
14621
14622 * video/i386/pc/vbeutil.c: Likewise.
14623
14624 * commands/videotest.c: Code cleanup and updated to reflect to new
14625 video API.
14626
14627 * term/gfxterm.c: Likewise.
14628
14629 * video/video.c: Likewise.
14630
14631 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
14632 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
14633 (bitmap_mod_SOURCES): New entry.
14634 (bitmap_mod_CFLAGS): Likewise.
14635 (bitmap_mod_LDFLAGS): Likewise.
14636 (tga_mod_SOURCES): Likewise.
14637 (tga_mod_CFLAGS): Likewise.
14638 (tga_mod_LDFLAGS): Likewise.
14639
14640 * include/grub/video.h (grub_video_blit_operators): New enum type.
14641 (grub_video_render_target): Changed as forward declaration and moved
14642 actual definition to be video driver specific.
14643 (grub_video_adapter.blit_bitmap): Added blitting operator.
14644 (grub_video_adapter.blit_render_target): Likewise.
14645 (grub_video_blit_bitmap): Likewise.
14646 (grub_video_blit_render_target): Likewise.
14647
14648 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
14649 driver specific render target definition.
14650 (grub_video_vbe_map_rgba): Added driver internal helper.
14651 (grub_video_vbe_unmap_color): Updated to use
14652 grub_video_i386_vbeblit_info.
14653 (grub_video_vbe_get_video_ptr): Likewise.
14654
14655 * include/grub/i386/pc/vbeblit.h
14656 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
14657 grub_video_i386_vbeblit_info.
14658 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
14659 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
14660 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
14661 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
14662 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
14663 (grub_video_i386_vbeblit_index_index): Likewise.
14664 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
14665 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
14666 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
14667 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
14668 operator.
14669 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
14670 operator.
14671
14672 * video/i386/pc/vbeblit.c: Updated to reflect changes on
14673 include/grub/i386/pc/vbeblit.h.
14674
14675 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
14676 Updated to use grub_video_i386_vbeblit_info.
14677 (grub_video_i386_vbefill_R8G8B8): Likewise.
14678 (grub_video_i386_vbefill_index): Likewise.
14679 (grub_video_i386_vbefill): Added generic filler.
14680
14681 * video/i386/pc/vbefill.c: Updated to reflect changes on
14682 include/grub/i386/pc/vbefill.h.
14683
14684 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
14685 grub_video_i386_vbeblit_info.
14686 (grub_video_vbe_unmap_color): Likewise.
14687 (grub_video_vbe_blit_glyph): Likewise.
14688 (grub_video_vbe_scroll): Likewise.
14689 (grub_video_vbe_draw_pixel): Removed function.
14690 (grub_video_vbe_get_pixel): Likewise.
14691 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
14692 updated code to use it.
14693 (common_blitter): Added common blitter for render target and bitmap.
14694 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
14695 (grub_video_vbe_blit_render_target): Likewise.
14696
bc8c036d 146972006-07-30 Johan Rydberg <jrydberg@gnu.org>
14698
14699 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
14700 is in text mode if there is no console control protocol instance
14701 available.
14702
684a8eff 147032006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
14704
14705 * include/grub/video.h: Code cleanup.
14706
14707 * include/grub/i386/pc/vbe.h: Likewise.
14708
14709 * video/i386/pc/vbe.c: Likewise.
14710
14711 * video/i386/pc/vbeblit.c: Likewise.
14712
14713 * video/i386/pc/vbefill.c: Likewise.
14714
14715 * video/video.c: Likewise. Also added more comments.
14716
5915059b 147172006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
14718
14719 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
14720 (struct grub_biosdisk_dap): Likewise.
14721
14722 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
14723 linkage settings for all functions.
14724
90ce5d56 147252006-07-12 Marco Gerards <marco@gnu.org>
14726
14727 * configure.ac (--enable-mm-debug): Fix typo.
14728
14729 * genkernsyms.sh.in: Use proper quoting for `CC'.
14730
43e7f879 147312006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
14732
14733 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
14734 (normal_mod_ASFLAGS): Remove "-m32".
14735
4889bdec 147362006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
14737
14738 * util/misc.c: Include config.h.
14739 [!HAVE_MEMALIGN]: Do not include malloc.h.
14740 (grub_memalign): Use posix_memalign, if present. Then, use
14741 memalign, if present. Otherwise, emit an error.
14742
14743 * util/grub-emu.c: Do not include malloc.h.
14744
14745 * include/grub/util/misc.h: Include unistd.h. This is required for
14746 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
14747 D. Eades III <hde@foobar-qux.org>.
14748
14749 * configure.ac (AC_GNU_SOURCE): Added.
14750 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
14751 type.
14752
fd39d4da 147532006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
14754
14755 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
14756 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
14757
b786f3b5 147582006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
14759
14760 * include/grub/types.h (grub_host_addr_t): Rename to
14761 grub_target_addr_t.
14762 (grub_host_off_t): Rename to grub_target_off_t.
14763 (grub_host_size_t): Rename to grub_target_size_t.
14764 (grub_host_ssize_t): Rename to grub_target_ssize_t.
14765 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
14766
14767 * include/grub/kernel.h (struct grub_module_header): Change type
14768 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
14769 (grub_module_info): Likewise.
f19dbdb7 14770
051988bb 147712006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
14772
14773 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
14774 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
14775 Velazquez <jesus.velazquez@gmail.com>.
14776
deae281b 147772006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
14778
14779 Count partitions from 1 instead of 0 in the string representation
14780 of partitions. Still use 0-based internally.
f19dbdb7 14781
deae281b 14782 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
14783 (sun_partition_map_iterate): Use grub_partition_t instead of
14784 struct grub_partition *. Cast DESC->START_CYLINDER to
14785 grub_uint64_t after converting the endian.
14786 (sun_partition_map_probe): Subtract 1 for PARTNUM.
14787 (sun_partition_map_get_name): Add 1 to P->INDEX.
14788
14789 * partmap/pc.c (grub_partition_parse): Subtract 1 for
14790 PCDATA->DOS_PART.
14791 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
14792
14793 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
14794 zero instead of one.
14795 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
14796 (gpt_partition_map_get_name): Add 1 into P->INDEX.
14797
14798 * partmap/apple.c (apple_partition_map_iterate): Change the type
14799 of POS to unsigned.
14800 (apple_partition_map_probe): Subtract 1 for PARTNUM.
14801 (apple_partition_map_get_name): Add 1 into P->INDEX.
14802
14803 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
14804 of POS to unsigned.
14805 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
14806 calculate the offset of a partition.
14807 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
14808 (amiga_partition_map_get_name): Add 1 into P->INDEX.
14809
14810 * partmap/acorn.c (acorn_partition_map_find): Change the type of
14811 SECTOR to grub_disk_addr_t.
14812 (acorn_partition_map_iterate): Likewise.
14813 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
14814 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
14815 top.
14816 (acorn_partition_map_get_name): Add 1 into P->INDEX.
14817
14818 * kern/i386/pc/init.c (make_install_device): Add 1 into
14819 GRUB_INSTALL_DOS_PART.
14820
14821 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
14822 conditional.
14823
524a1e6a 148242006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
14825
14826 Clean up the code to support 64-bit addressing in disks and
14827 files. This change is not enough for filesystems yet.
f19dbdb7 14828
524a1e6a 14829 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
14830 type of "start" to grub_uint64_t.
14831 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
14832 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
14833 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
14834 convert addresses.
14835
14836 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
14837 to grub_disk_addr_t.
14838
14839 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
14840 string.
14841
14842 * partmap/pc.c (pc_partition_map_iterate): Likewise.
14843
14844 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
14845 to char *.
14846
14847 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
14848
14849 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
14850
14851 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
14852
14853 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
14854 to grub_off_t, to detect an error from grub_file_seek.
14855 (grub_multiboot_load_elf32): Likewise.
14856
14857 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
14858 maximum unsigned long value when an overflow is detected.
14859 (grub_strtoull): New function.
14860 (grub_divmod64): Likewise.
14861 (grub_lltoa): use grub_divmod64.
14862
14863 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
14864 grub_disk_addr_t.
14865 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
14866 the pointer to next character. Use grub_strtoull instead of
14867 grub_strtoul.
14868 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
14869 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
14870 respectively.
14871
fe6b695a 14872 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
524a1e6a 14873 return value is signed.
14874 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
14875 test if OFFSET is less than zero, as OFFSET is unsigned now.
14876
14877 * kern/disk.c (struct grub_disk_cache): Change the type of
14878 "sector" to grub_disk_addr_t.
14879 (grub_disk_cache_get_index): Change the type of SECTOR to
14880 grub_disk_addr_t. Calculate the hash with SECTOR casted to
14881 unsigned after shifting.
14882 (grub_disk_cache_invalidate): Change the type of SECTOR to
14883 grub_disk_addr_t.
14884 (grub_disk_cache_unlock): Likewise.
14885 (grub_disk_cache_store): Likewise.
14886 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
14887 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
14888 grub_disk_addr_t and grub_uint64_t, respectively.
14889 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
14890 body, as the value of OFFSET is tweaked by
14891 grub_disk_check_range. Change the types of START_SECTOR, LEN and
14892 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
14893 respectively.
14894 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
14895 body, as the value of OFFSET is tweaked by
14896 grub_disk_check_range. Change the types of LEN and N to
14897 grub_size_t.
14898
14899 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
14900 and "saved_offset" to grub_off_t.
14901 (test_header): Cast BUF to char *.
14902 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
14903 to char *.
14904 (grub_gzio_read): Change the types of OFFSET and SIZE to
14905 grub_off_t and grub_size_t, respectively.
14906
14907 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
14908 Removed.
14909 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
14910 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
14911 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
14912 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
14913 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
14914
14915 * include/grub/types.h (grub_off_t): Unconditionally set to
14916 grub_uint64_t.
14917 (grub_disk_addr_t): Changed to grub_uint64_t.
14918
14919 * include/grub/partition.h (struct grub_partition): Change the
14920 types of "start", "len" and "offset" to grub_disk_addr_t,
14921 grub_uint64_t and grub_disk_addr_t, respectively.
14922 (grub_partition_get_start): Return grub_disk_addr_t.
14923 (grub_partition_get_len): Return grub_uint64_t.
14924
14925 * include/grub/misc.h (grub_strtoull): New prototype.
14926 (grub_divmod64): Likewise.
14927
14928 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
14929 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
14930 grub_off_t, respectively.
14931 All callers and references changed.
14932
14933 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
14934 grub_size_t in "read".
14935 All callers and references changed.
14936
14937 * include/grub/file.h (struct grub_file): Change the types of
14938 "offset" and "size" to grub_off_t and grub_off_t,
14939 respectively. Change the type of SECTOR to grub_disk_addr_t in
14940 "read_hook".
14941 (grub_file_read): Change the type of LEN to grub_size_t.
14942 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
14943 grub_off_t.
14944 (grub_file_size): Return grub_off_t.
14945 (grub_file_tell): Likewise.
14946 All callers and references changed.
14947
14948 * include/grub/disk.h (struct grub_disk_dev): Change the types of
14949 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
14950 "write".
14951 (struct grub_disk): Change the type of "total_sectors" to
14952 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
f19dbdb7 14953 "read_hook".
524a1e6a 14954 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
14955 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
14956 (grub_disk_write): Likewise.
14957 All callers and references changed.
14958
14959 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
14960 char * for grub_strncmp to silence gcc.
14961 (grub_iso9660_mount): Likewise.
14962 (grub_iso9660_mount): Likewise.
14963 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
14964 return statement.
14965 (grub_iso9660_iterate_dir): Likewise.
14966 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
14967
14968 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
14969 LEN to grub_disk_addr_t and grub_size_t, respectively.
14970
14971 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
14972
14973 * fs/jfs.c (grub_jfs_read_file): Likewise.
14974
14975 * fs/minix.c (grub_jfs_read_file): Likewise.
14976
14977 * fs/sfs.c (grub_jfs_read_file): Likewise.
14978
14979 * fs/ufs.c (grub_jfs_read_file): Likewise.
14980
14981 * fs/xfs.c (grub_jfs_read_file): Likewise.
14982
14983 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
14984 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
14985 respectively.
14986
14987 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
14988 BLKNR to -1 instead of returning GRUB_ERRNO.
14989 (grub_ext2_read_file): Change the types of SECTOR and
14990 LEN to grub_disk_addr_t and grub_size_t, respectively.
14991
14992 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
14993 LEN to grub_disk_addr_t and grub_size_t, respectively.
14994
14995 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
14996 grub_file_read.
14997
14998 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
14999 string. Do not cast SECTOR explicitly.
15000
15001 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
15002 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
15003 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
15004 grub_disk_addr_t and grub_size_t, respectively. If the sector is
15005 over 2TB and LBA mode is not supported, raise an error.
15006 (get_safe_sectors): New function.
15007 (grub_biosdisk_read): Use get_safe_sectors.
15008 (grub_biosdisk_write): Likewise.
15009
15010 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
15011 (grub_efidisk_write): Likewise.
15012
15013 * disk/loopback.c (delete_loopback): Cosmetic changes.
15014 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
15015 correctly.
15016 (grub_loopback_open): Likewise.
15017 (grub_loopback_read): Likewise. Also, change the type of POS to
15018 grub_off_t, and fix the usage of grub_memset.
15019
15020 * commands/i386/pc/play.c: Include grub/machine/time.h.
15021
15022 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
15023 print FILE->SIZE.
15024
15025 * commands/configfile.c: Include grub/env.h.
15026
15027 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
15028 GRUB_ERRNO directly instead. Change the type of POS to
15029 grub_off_t. Follow the coding standard.
15030
15031 * commands/blocklist.c: Include grub/partition.h.
15032 (grub_cmd_blocklist): Return an error if the underlying device is
15033 not a disk. Take the starting sector of a partition into account,
15034 if a partition is used.
15035
15036 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
15037 a length field.
15038 (lba_mode): Support 64-bit addresses.
15039 (chs_mode): Likewise.
15040 (copy_buffer): Adapted to the new offsets of a length field and a
15041 segment field.
15042 (blocklist_default_start): Allocate 64-bit space.
15043
15044 * boot/i386/pc/boot.S (force_lba): Removed.
15045 (boot_drive): Moved to under KERNEL_SECTOR.
fe987087 15046 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
524a1e6a 15047 space.
15048 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
15049 is useless.
15050 (lba_mode): Refactored to support a 64-bit address. More size
15051 optimization.
15052 (setup_sectors): Likewise.
15053
53af98ad 150542006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
15055
15056 * DISTLIST: Added include/grub/i386/linux.h. Removed
15057 include/grub/i386/pc/linux.h
15058
15059 * configure.ac (AC_INIT): Bumped to 1.94.
15060
15061 * config.guess: Updated from gnulib.
15062 * config.sub: Likewise.
15063 * install-sh: Likewise.
15064 * mkinstalldirs: Likewise.
15065
b4c1940a 150662006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
15067
15068 * conf/common.rmk (grub_modules_init.lst): Depended on
15069 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
15070 MODSRCFILES.
15071
15072 * genmk.rb (PModule::rule): Reverted the previous change.
15073
cfca1cfd 150742006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
15075
15076 * conf/common.rmk (grub_modules_init.lst): Depends on
15077 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
15078 that the target does not exist before producing.
15079 (grub_modules_init.h): Remove the target before generating.
15080 (grub_emu_init.c): Likewise.
15081
15082 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
15083
aa6d7826 150842006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
15085
15086 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
15087 for the target-specific tests. Make sure that we also have the
15088 up-to-date target variables for those tests.
15089
26c607b9 150902006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
15091
15092 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
15093 (PModule::rule): Likewise.
15094
0162321a 150952006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
15096
15097 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
15098 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
15099 target-specific flags should be prefixed.
15100 (PModule::rule): Likewise.
15101
6c826348 151022006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
15103
15104 * configure.ac (CMP): Check if cmp is available explicitly.
15105
b977bf01 151062006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
15107
15108 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
15109 (target_cpu): New variable.
15110 (pkglibdir): Use target_cpu instead of host_cpu.
f19dbdb7 15111
b977bf01 15112 * util/i386/pc/grub-install.in (host_cpu): Removed.
15113 (target_cpu): New variable.
15114 (pkglibdir): Use target_cpu instead of host_cpu.
15115
15116 * util/genmoddep.c: Removed.
f19dbdb7 15117
b977bf01 15118 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
15119 instead of GRUB_HOST_SIZEOF_VOID_P.
15120 * kern/dl.c: Likewise.
15121
15122 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
15123 ...
15124 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
15125 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
15126 (GRUB_TARGET_SIZEOF_LONG): ... this.
15127 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
15128 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
15129 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
15130 to ...
15131 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
15132 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
15133 (GRUB_TARGET_SIZEOF_LONG): ... this.
15134 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
15135 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
15136 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
15137 to ...
15138 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
15139 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
15140 (GRUB_TARGET_SIZEOF_LONG): ... this.
15141 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
15142 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
15143
15144 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
15145 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
15146 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
15147 instead of GRUB_HOST_SIZEOF_LONG.
15148 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
15149 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
15150 GRUB_CPU_WORDS_BIGENDIAN.
15151 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
15152 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
15153 grub_host_ssize_t.
15154
15155 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
15156 (genmoddep_SOURCES): Likewise.
15157 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
15158 (genmoddep_SOURCES): Likewise.
15159 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
15160 (genmoddep_SOURCES): Likewise.
15161 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
15162 Likewise.
15163 (genmoddep_SOURCES): Likewise.
15164
15165 * genmoddep.awk: New file.
15166
15167 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
15168 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
15169 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
15170 (PModule::rule): Likewise.
15171 (Program::rule): Likewise.
15172 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
15173 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
15174 respectively.
15175
15176 * configure.ac: Rewritten intensively to use host and target
15177 instead of build and host, respectively.
15178
15179 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
15180 (host_cpu): Removed.
15181 (target_cpu): New variable.
15182 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
15183 (BUILD_CC): Removed.
15184 (BUILD_CFLAGS): Likewise.
15185 (BUILD_CPPFLAGS): Likewise.
15186 (TARGET_CC): New variable.
15187 (TARGET_CFLAGS): Likewise.
15188 (TARGET_CPPFLAGS): Likewise.
15189 (TARGET_LDFLAGS): Likewise.
15190 (AWK): Likewise.
15191 (include): Use target_cpu instead of host_cpu.
15192 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
f19dbdb7 15193
b977bf01 15194 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
15195
f09771a1 151962006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
15197
15198 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
15199 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
15200 field 'false' to 'exec_on_false'.
15201 (grub_script_create_cmdif): Renamed argument names to reflect above
15202 changes.
15203
15204 * normal/execute.c (grub_script_execute_cmdif): Likewise.
15205
15206 * normal/script.c (grub_script_create_cmdif): Likewise.
15207
118f4fb3 152082006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
15209
15210 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
15211 top.
15212 (grub_hfsplus_btree_recptr): Likewise.
15213 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
15214 FILEBLOCK both to pass a block number and store next block
15215 number.
15216 (grub_hfsplus_read_block): Rewritten heavily to support an extent
15217 overflow file correctly. Specify errors appropriately, because
15218 fshelp expects that GRUB_ERRNO is set when fails. Reuse
15219 grub_hfsplus_btree_recptr to get the pointer to a found key.
15220 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
15221 is found.
15222
15223 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
15224 linux.mod.
15225 (_linux_mod_SOURCES): New variable.
15226 (_linux_mod_CFLAGS): Likewise.
15227 (_linux_mod_LDFLAGS): Likewise.
15228 (linux_mod_SOURCES): Likewise.
15229 (linux_mod_CFLAGS): Likewise.
15230 (linux_mod_LDFLAGS): Likewise.
15231
15232 * DISTLIST: Added loader/i386/efi/linux.c,
15233 loader/i386/efi/linux_normal.c and
15234 include/grub/i386/efi/loader.h.
15235
15236 * loader/i386/efi/linux.c: New file.
15237 * loader/i386/efi/linux_normal.c: Likewise.
15238 * include/grub/i386/efi/loader.h: Likewise.
15239
89a7d726 152402006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
15241
15242 * commands/blocklist.c: New file.
15243
15244 * DISTLIST: Added commands/blocklist.c.
15245
15246 * term/efi/console.c (grub_console_highlight_color): Use a lighter
43b553ad 15247 color for the background, and a darker color for the foreground.
89a7d726 15248 (grub_console_checkkey): Return READ_KEY.
15249 (grub_console_cls): Set the background to
15250 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
15251
15252 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
15253
15254 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
15255 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
15256
15257 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
15258 prototype.
15259
15260 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
15261 BG. The spec is wrong again.
15262
15263 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
15264 prototype.
15265 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
15266
15267 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15268 commands/blocklist.c.
15269 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
f19dbdb7 15270
89a7d726 15271 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
15272 (blocklist_mod_SOURCES): New variable.
15273 (blocklist_mod_CFLAGS): Likewise.
15274 (blocklist_mod_LDFLAGS): Likewise.
15275
75c8f258 152762006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
15277
15278 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
15279 duplication.
15280 (lba_mode): Use %eax more intensively to reduce the code size.
15281
da2eb181 152822006-05-20 Marco Gerards <marco@gnu.org>
15283
15284 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
15285
15286 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
15287 for `menuentry'.
15288 (script): Accept leading newlines.
15289 (newlines): New rule to describe 0 or more newlines.
15290 (commands): Accept `command' with trailing newline. Fixed the
15291 order in which arguments were passed to `grub_script_add_cmd'.
15292 Accept commands separated by newlines.
15293 (function): Changed to accept newlines.
15294 (menuentry) Rewritten.
15295
15296 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
15297 front of the list, instead of to the end.
15298
577b4050 152992006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
15300
15301 * util/i386/pc/grub-install.in (bindir): New variable.
15302 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
15303 Shaver <lbgwjl@gmail.com>.
15304
0d6e1189 153052006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
15306
15307 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
15308 grub/machine/linux.h
15309 * loader/i386/pc/linux.c: Likewise.
15310
15311 * include/grub/i386/pc/linux.h: Moved to ...
15312 * include/grub/i386/linux.h: ... here.
15313
15314 * include/grub/i386/linux.h (struct linux_kernel_params): New
15315 struct.
f19dbdb7 15316
31b86e9f 153172006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
15318
15319 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
15320 checking.
15321 (grub_video_vbe_blit_glyph): Likewise.
15322 (grub_video_vbe_blit_bitmap): Likewise.
15323 (grub_video_vbe_blit_render_target): Likewise.
15324
83b984de 153252006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
15326
15327 * configure.ac (--with-platform): Properly quote the square
15328 brackets.
15329
5f0413bd 153302006-05-08 Marco Gerards <marco@gnu.org>
15331
15332 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
15333 this...
15334 (kernel_elf_HEADERS): ...to this. Updated all users.
15335 (grubof_symlist.c): Renamed from this...
15336 (kernel_elf_symlist.c): ...to this. Updated all users.
15337 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
15338 (grubof_SOURCES): Renamed from this...
15339 (kernel_elf_SOURCES): ...to this.
15340 (grubof_HEADERS): Renamed from this...
15341 (kernel_elf_HEADERS): ...to this.
15342 (grubof_CFLAGS): Renamed from this...
15343 (kernel_elf_CFLAGS): ...to this.
15344 (grubof_ASFLAGS): Renamed from this...
15345 (kernel_elf_ASFLAGS): ...to this.
15346 (grubof_LDFLAGS): Renamed from this...
15347 (kernel_elf_LDFLAGS): ...to this.
15348
15349 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
15350 this...
15351 (kernel_elf_HEADERS): ...to this. Updated all users.
15352 (grubof_symlist.c): Renamed from this...
15353 (kernel_elf_symlist.c): ...to this. Updated all users.
15354 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
15355 (grubof_SOURCES): Renamed from this...
15356 (kernel_elf_SOURCES): ...to this.
15357 (grubof_HEADERS): Renamed from this...
15358 (kernel_elf_HEADERS): ...to this.
15359 (grubof_CFLAGS): Renamed from this...
15360 (kernel_elf_CFLAGS): ...to this.
15361 (grubof_ASFLAGS): Renamed from this...
15362 (kernel_elf_ASFLAGS): ...to this.
15363 (grubof_LDFLAGS): Renamed from this...
15364 (kernel_elf_LDFLAGS): ...to this.
15365
15366 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
15367 `kernel.elf' instead of `grubof'.
15368
05568c2e 153692006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
15370
15371 Add --with-platform to configure. Use pkglibdir instead of
15372 pkgdatadir. This is reported by Roger Leigh.
15373
15374 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
15375 (host_vendor): Likewise.
15376 (host_os): Likewise.
15377 (pkgdatadir): Likewise.
15378 (platform): New variable.
15379 (pkglibdir): Likewise.
15380 Use PKGLIBDIR instead of PKGDATADIR.
f19dbdb7 15381
05568c2e 15382 * util/i386/pc/grub-install.in (datadir): Removed.
15383 (host_vendor): Likewise.
15384 (host_os): Likewise.
15385 (pkgdatadir): Likewise.
15386 (platform): New variable.
15387 (pkglibdir): Likewise.
15388 Use PKGLIBDIR instead of PKGDATADIR.
15389
15390 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
15391 instead of GRUB_DATADIR.
15392 (main): Likewise.
15393 * util/i386/pc/grub-mkimage.c (usage): Likewise.
15394 (main): Likewise.
15395 * util/i386/efi/grub-mkimage.c (usage): Likewise.
15396 (main): Likewise.
15397
15398 * configure.ac (--with-platform): New option.
15399 Use PLATFORM instead of HOST_VENDOR to specify a platform.
15400
15401 * Makefile.in: Include a makefile based on PLATFORM instead of
15402 HOST_VENDOR.
15403 (pkgdatadir): Not appended by the machine type.
15404 (pkglibdir): Appended by the machine type.
15405 (host_vendor): Removed.
15406 (platform): New variable.
15407 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
15408 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
15409 (uninstall): Likewise.
15410
4e93851c 154112006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
15412
15413 Use the environment context in the menu. Remove the commands
15414 "default" and "timeout", and use variables instead.
f19dbdb7 15415
4e93851c 15416 * normal/menu.c: Include grub/env.h.
15417 (print_entry): Cast TITLE to silence gcc.
15418 (get_timeout): New function.
15419 (set_timeout): Likewise.
15420 (get_entry_number): Likewise.
15421 (run_menu): Use a default entry, a fallback entry and a timeout
15422 in the environment variables "default", "fallback" and
15423 "timeout". Also, tweak the default entry if it is not within the
15424 current menu entries.
15425 (grub_menu_run): Use a fallback entry in the environment variable
15426 "fallback".
15427
15428 * normal/main.c (read_config_file): Do not initialize
15429 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
15430 NEWMENU->TIMEOUT.
15431 (grub_normal_execute): Use a data slot to store the menu.
15432
15433 * include/grub/normal.h (struct grub_menu): Removed default_entry,
15434 fallback_entry and timeout.
15435 (struct grub_menu_list): Removed.
15436 (grub_menu_list_t): Likewise.
15437 (struct grub_context): Likewise.
15438 (grub_context_t): Likewise.
15439 (grub_context_get): Likewise.
15440 (grub_context_get_current_menu): Likewise.
15441 (grub_context_push_menu): Likewise.
15442 (grub_context_pop_menu): Likewise.
15443 (grub_default_init): Likewise.
15444 (grub_default_fini): Likewise.
15445 (grub_timeout_init): Likewise.
15446 (grub_timeout_fini): Likewise.
15447
15448 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
15449 and timeout.mod.
15450 (normal_mod_SOURCES): Removed normal/context.c.
15451
15452 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
15453 commands/default.c, commands/timeout.c and normal/context.c.
15454 (normal_mod_SOURCES): Removed normal/context.c.
15455
15456 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
15457 commands/timeout.c and normal/context.c.
15458 (normal_mod_SOURCES): Removed normal/context.c.
15459
15460 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
15461 commands/default.c, commands/timeout.c and normal/context.c.
15462 (normal_mod_SOURCES): Removed normal/context.c.
15463
15464 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
15465 timeout.mod.
15466 (default_mod_SOURCES): Removed.
15467 (default_mod_CFLAGS): Likewise.
15468 (default_mod_LDFLAGS): Likewise.
15469 (timeout_mod_SOURCES): Removed.
15470 (timeout_mod_CFLAGS): Likewise.
15471 (timeout_mod_LDFLAGS): Likewise.
15472
15473 * DISTLIST: Removed commands/default.c, commands/timeout.c and
15474 normal/context.c.
15475
15476 * commands/default.c: Removed.
15477 * commands/timeout.c: Likewise.
15478 * normal/context.c: Likewise.
15479
1eb9cc1d 154802006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
15481
15482 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
15483
385bd9c1 154842006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
15485
15486 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
15487 "next" to "prev" for readability.
15488 (struct grub_env_sorted_var): New struct.
15489 (grub_env_context): Renamed to ...
15490 (initial_context): ... this.
15491 (grub_env_var_context): Renamed to ...
15492 (current_context): ... this.
15493 (grub_env_find): Look only at CURRENT_CONTEXT.
15494 (grub_env_context_open): Rewritten to copy exported variables from
15495 previous context.
15496 (grub_env_context_close): Rewritten according to the new
15497 scheme. Also, add an assertion to prevent the initial context from
15498 removed.
15499 (grub_env_insert): Removed the code for the sorted list.
15500 (grub_env_remove): Likewise.
15501 (grub_env_export): Simply mark the variable with
15502 GRUB_ENV_VAR_GLOBAL.
15503 (grub_env_set): A cosmetic change for naming consistency.
15504 (grub_env_get): Likewise.
15505 (grub_env_unset): Likewise.
15506 (grub_env_iterate): Rewritten to sort variables within this
15507 function.
15508 (grub_register_variable_hook): Fixed for naming consistency. Call
15509 grub_env_find again, only if NAME is not found at the first time.
15510 (mangle_data_slot_name): New function.
15511 (grub_env_set_data_slot): Likewise.
15512 (grub_env_get_data_slot): Likewise.
15513 (grub_env_unset_data_slot): Likewise.
15514
15515 * include/grub/env.h (grub_env_var_type): New enum.
15516 (GRUB_ENV_VAR_LOCAL): New constant.
15517 (GRUB_ENV_VAR_GLOBAL): Likewise.
15518 (GRUB_ENV_VAR_DATA): Likewise.
15519 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
15520 "type".
15521 (grub_env_set): Replace VAR with NAME for consistency.
15522 (grub_register_variable_hook): Likewise.
15523 (grub_env_export): Specify the name of the argument.
15524 (grub_env_set_data_slot): New prototype.
15525 (grub_env_get_data_slot): Likewise.
15526 (grub_env_unset_data_slot): Likewise.
15527
7f362539 155282006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
15529
15530 Extend the loader so that GRUB can accept a loader which comes
15531 back to GRUB when a loaded image exits. Also, this change adds
15532 support for a chainloader on EFI.
f19dbdb7 15533
7f362539 15534 * term/efi/console.c: Include grub/misc.h.
15535 (grub_console_checkkey): Display a scan code on the top for
15536 debugging. This will be removed once the EFI port gets stable.
15537 Correct the scan code mapping.
15538
15539 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
15540 allocate memory from larger regions, in order to reduce the number
15541 of allocated regions. Otherwise, the MacOSX loader panics.
15542 (filter_memory_map): Avoid less than 1MB for compatibility with
15543 other loaders.
15544 (add_memory_regions): Allocate from the tail of a region, if
15545 possible, to avoid allocating a region near to 1MB, for the MacOSX
15546 loader.
15547
15548 * kern/efi/init.c (grub_efi_set_prefix): Specify
15549 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
15550
15551 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
15552 argument IMAGE_HANDLE and specify it to get a loaded image.
15553 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
15554 grub_efi_get_loaded_image.
fe6b695a 15555 (grub_efi_get_filename): Divide the length by the size of
7f362539 15556 grub_efi_char16_t.
15557 (grub_efi_get_device_path): New function.
15558 (grub_efi_print_device_path): Print End Device Path nodes. Divide
15559 the length by the size of grub_efi_char16_t for a file path device
15560 path node.
15561
15562 * kern/loader.c (grub_loader_noreturn): New variable.
15563 (grub_loader_set): Accept a new argument NORETURN. Set
15564 GRUB_LOADER_NORETURN to NORETURN.
15565 All callers changed.
15566 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
15567 grub_machine_fini.
15568
15569 * include/grub/efi/efi.h (grub_efi_get_device_path): New
15570 prototype.
15571 (grub_efi_get_loaded_image): Take an argument to specify an image
15572 handle.
15573
15574 * include/grub/loader.h (grub_loader_set): Added one more argument
15575 NORETURN.
15576
15577 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
15578 instead of grub_efi_open_protocol.
15579 (grub_efidisk_get_device_name): Likewise.
15580 (grub_efidisk_close): Print a newline.
15581 (grub_efidisk_get_device_handle): Fixed to use
15582 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
15583 GRUB_EFI_DEVICE_PATH_TYPE.
15584
15585 * disk/efi/efidisk.c (device_path_guid): Moved to ...
15586 * kern/efi/efi.c (device_path_guid): ... here.
15587
15588 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
15589 chain.mod.
15590 (kernel_mod_HEADERS): Added efi/disk.h.
15591 (_chain_mod_SOURCES): New variable.
15592 (_chain_mod_CFLAGS): Likewise.
15593 (_chain_mod_LDFLAGS): Likewise.
15594 (chain_mod_SOURCES): Likewise.
15595 (chain_mod_CFLAGS): Likewise.
15596 (chain_mod_LDFLAGS): Likewise.
15597
15598 * DISTLIST: Added include/grub/efi/chainloader.h,
15599 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
15600
15601 * include/grub/efi/chainloader.h: New file.
15602 * loader/efi/chainloader.c: Likewise.
15603 * loader/efi/chainloader_normal.c: Likewise.
15604
c0111d6e 156052006-04-30 Marco Gerards <marco@gnu.org>
15606
15607 * commands/configfile.c (grub_cmd_source): New function.
15608 (GRUB_MOD_INIT): Register the commands `source' and `.'.
15609 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
15610
df5341da 156112006-04-30 Marco Gerards <marco@gnu.org>
15612
15613 * normal/execute.c (grub_script_execute_cmd): Change the return
15614 type to `grub_err_t'. Correctly return the error.
15615 (grub_script_execute_cmdline): In case a command line is not a
15616 command or a function, try to interpret it as an assignment.
15617
f85934bd 156182006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
15619
15620 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
15621 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
15622 skip a node whose name is obviously invalid as UTF-16,
15623 i.e. contains a NUL character. Stop the iteration when the last
15624 directory entry is found. Instead of using the return value of
15625 grub_hfsplus_btree_iterate_node, store the value in RET and use
15626 it, because the iterator can be stopped by the last directory
15627 entry.
15628
8f8a2cf8 156292006-04-30 Marco Gerards <marco@gnu.org>
15630
15631 * include/grub/env.h (grub_env_export): New prototype. Reported
15632 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
15633
a27e84ce 156342006-04-30 Marco Gerards <marco@gnu.org>
15635
15636 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
15637 size of the extents in a catalog file record.
15638
eaef0553 156392006-04-29 Marco Gerards <marco@gnu.org>
15640
15641 * commands/configfile.c (grub_cmd_configfile): Execute the
15642 configfile within its own context.
15643
15644 * include/grub/env.h (grub_env_context_open): New prototype.
15645 (grub_env_context_close): Likewise.
15646
15647 * kern/env.c (grub_env): Removed.
15648 (grub_env_sorted): Likewise.
15649 (grub_env_context): New variable.
15650 (grub_env_var_context): Likewise.
15651 (grub_env_find): Search both the active context and the global
15652 context.
15653 (grub_env_context_open): New function.
15654 (grub_env_context_close): Likewise.
15655 (grub_env_insert): Likewise.
15656 (grub_env_remove): Likewise.
15657 (grub_env_export): Likewise.
15658 (grub_env_set): Changed to use helper functions to avoid code
15659 duplication.
15660 (grub_env_iterate): Rewritten so both the current context and the
15661 global context are being used.
15662
15663 * normal/command.c (export_command): New function.
15664 (grub_command_init): Register the `export' function.
15665
7b455f4d 156662006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
15667
15668 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
15669 explicitly to suppress gcc's warnings.
15670 * fs/fat.c (grub_fat_find_dir): Likewise.
15671 (grub_fat_label): Likewise.
15672 * fs/xfs.c (grub_xfs_read_inode): Likewise.
15673 (grub_xfs_mount): Likewise.
15674 (grub_xfs_label): Likewise.
15675 * fs/affs.c (grub_affs_mount): Likewise.
15676 (grub_affs_label): Likewise.
15677 (grub_affs_iterate_dir): Likewise.
15678 * fs/sfs.c (grub_sfs_mount): Likewise.
15679 (grub_sfs_iterate_dir): Likewise.
15680 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
15681 * fs/hfs.c (grub_hfs_mount): Likewise.
15682 (grub_hfs_cmp_catkeys): Likewise.
15683 (grub_hfs_find_dir): Likewise.
15684 (grub_hfs_dir): Likewise.
15685 (grub_hfs_label): Likewise.
15686 * fs/jfs.c (grub_jfs_mount): Likewise.
15687 (grub_jfs_opendir): Likewise.
15688 (grub_jfs_getent): Likewise.
15689 (grub_jfs_lookup_symlink): Likewise.
15690 (grub_jfs_label): Likewise.
15691 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
15692 (grub_hfsplus_iterate_dir): Likewise.
15693 (grub_hfsplus_btree_iterate_node): Made static.
15694
15695 * util/grub-emu.c (prefix): New variable.
15696 (grub_machine_set_prefix): New function.
15697 (main): Do not set the environment variable "prefix" here. Only
15698 set PREFIX, which is used later by grub_machine_set_prefix.
15699
15700 * include/grub/video.h: Do not include grub/symbol.h.
15701 (grub_video_register): Not exported. This symbol is not defined in
15702 the kernel.
15703 (grub_video_unregister): Likewise.
15704 (grub_video_iterate): Likewise.
15705 (grub_video_setup): Likewise.
15706 (grub_video_restore): Likewise.
15707 (grub_video_get_info): Likewise.
15708 (grub_video_get_blit_format): Likewise.
15709 (grub_video_set_palette): Likewise.
15710 (grub_video_get_palette): Likewise.
15711 (grub_video_set_viewport): Likewise.
15712 (grub_video_get_viewport): Likewise.
15713 (grub_video_map_color): Likewise.
15714 (grub_video_map_rgb): Likewise.
15715 (grub_video_map_rgba): Likewise.
15716 (grub_video_fill_rect): Likewise.
15717 (grub_video_blit_glyph): Likewise.
15718 (grub_video_blit_bitmap): Likewise.
15719 (grub_video_blit_render_target): Likewise.
15720 (grub_video_scroll): Likewise.
15721 (grub_video_swap_buffers): Likewise.
15722 (grub_video_create_render_target): Likewise.
15723 (grub_video_delete_render_target): Likewise.
15724 (grub_video_set_active_render_target): Likewise.
15725
15726 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
15727 Undefined.
15728 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
15729
15730 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
15731 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
15732 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
15733 instead of $(srcdir)/genkernsyms.sh.
15734
15735 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
15736 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
15737 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
15738 instead of $(srcdir)/genkernsyms.sh.
15739
15740 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
15741 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
15742 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
15743 instead of $(srcdir)/genkernsyms.sh.
15744
15745 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
15746 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
15747 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
15748 instead of $(srcdir)/genkernsyms.sh.
15749
15750 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
15751 genkernsyms.sh.
15752
15753 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
15754 genkernsyms.sh.
15755 (gensymlist.sh): New target.
15756 (genkernsyms.sh): Likewise.
15757
15758 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
15759 genkernsyms.sh.in and gensymlist.sh.in.
15760
15761 * genkernsyms.sh: Removed.
15762 * gensymlist.sh: Likewise.
f19dbdb7 15763
7b455f4d 15764 * genkernsyms.sh.in: New file.
15765 * gensymlist.sh.in: Likewise.
15766
1885bb27 157672006-04-25 Hollis Blanchard <hollis@penguinppc.org>
15768
15769 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
15770 clobber "prefix", since we may have already set it manually.
15771
71538dff 157722006-04-25 Hollis Blanchard <hollis@penguinppc.org>
15773
15774 * kern/misc.c (abort): New alias for grub_abort.
15775
2965c7cc 157762006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
15777
15778 A new machine-specific function "grub_machine_set_prefix" is
15779 defined. This is called after loading modules, so that a prefix
15780 initialization can use modules. Also, this change adds an
15781 intensive debugging feature for the memory manager via the
15782 configure option "--enable-mm-debug".
f19dbdb7 15783
2965c7cc 15784 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
15785 PART.LEN.
15786
15787 * kern/sparc64/ieee1275/init.c (abort): Removed.
15788 (grub_stop): Likewise.
15789 (grub_exit): New function.
15790 (grub_set_prefix): Renamed to ...
15791 (grub_machine_set_prefix): ... this.
15792 (grub_machine_init): Do not call grub_set_prefix.
15793
15794 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
15795 (grub_machine_set_prefix): ... this.
15796 (grub_machine_init): Do not call grub_set_prefix.
15797
15798 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
15799 (grub_machine_init): Do not set the prefix here.
15800
15801 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
15802
15803 * kern/efi/init.c: Include grub/mm.h.
15804 (grub_efi_set_prefix): New function.
15805
15806 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
15807 (grub_efi_get_filename): New function.
15808 (grub_print_device_path): Renamed to ...
15809 (grub_efi_print_device_path): ... this.
15810
15811 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
15812 [MM_DEBUG] (grub_realloc): Likewise.
15813 [MM_DEBUG] (grub_free): Likewise.
15814 [MM_DEBUG] (grub_memalign): Likewise.
15815 [MM_DEBUG] (grub_mm_debug): New variable.
15816 [MM_DEBUG] (grub_debug_malloc): New function.
15817 [MM_DEBUG] (grub_debug_free): New function.
15818 [MM_DEBUG] (grub_debug_realloc): New function.
15819 [MM_DEBUG] (grub_debug_memalign): New function.
15820
15821 * kern/misc.c (grub_abort): Print a newline to distinguish
15822 the message.
15823
15824 * kern/main.c (grub_main): Call grub_machine_set_prefix and
15825 grub_set_root_dev after loading modules. This is necessary when
15826 setting a prefix depends on modules.
15827
15828 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
15829 (grub_efi_print_device_path): ... this.
15830 (grub_efi_get_filename): New prototype.
15831 (grub_efi_set_prefix): Likewise.
15832
15833 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
15834 and grub/disk.h.
15835 (grub_efidisk_get_device_handle): New prototype.
15836 (grub_efidisk_get_device_name): Likewise.
15837
15838 * include/grub/mm.h: Include config.h.
15839 (MM_DEBUG): Removed.
15840 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
15841 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
15842 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
15843 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
15844 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
15845 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
15846 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
15847 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
15848 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
15849
15850 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
15851
15852 * disk/efi/efidisk.c: Include grub/partition.h.
15853 (iterate_child_devices): New function.
15854 (add_device): First, compare only last device path nodes, so that
15855 devices are sorted by the types.
15856 (grub_efidisk_get_device_handle): New function.
15857 (grub_efidisk_get_device_name): Likewise.
15858
15859 * configure.ac (--enable-mm-debug): New option to enable the
15860 memory manager debugging feature. This makes the binary much
15861 bigger, so is disabled by default.
15862
9cacaa17 158632006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
15864
15865 Use grub_abort instead of grub_stop, and grub_exit must be
15866 define in each architecture now. Also, this change adds support
15867 for EFI disks.
f19dbdb7 15868
9cacaa17 15869 * util/i386/pc/grub-probefs.c: Include grub/term.h.
15870 (grub_getkey): New function.
15871 (grub_term_get_current): Likewise.
15872
15873 * util/i386/pc/grub-setup.c: Include grub/term.h.
15874 (grub_getkey): New function.
15875 (grub_term_get_current): Likewise.
15876
15877 * util/misc.c (grub_stop): Renamed to ...
15878 (grub_exit): ... this.
15879
15880 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
15881 (grub_exit): ... this.
15882 (grub_machine_init): Use grub_abort instead of abort.
15883 (grub_stop): Removed.
15884
15885 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
15886 abort.
15887
15888 * kern/i386/pc/startup.S (grub_exit): New function.
15889 (cold_reboot): New label.
15890
15891 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
15892 (grub_efi_init): Call grub_efidisk_init.
15893 (grub_efi_fini): Call grub_efidisk_fini.
15894
15895 * kern/efi/efi.c: Include grub/mm.h.
15896 (grub_efi_console_control_guid): Renamed to ...
15897 (console_control_guid): ... this.
15898 (grub_efi_loaded_image_guid): Renamed to ...
15899 (loaded_image_guid): ... this.
15900 (grub_efi_locate_handle): New function.
15901 (grub_efi_open_protocol): Likewise.
15902 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
15903 GRUB_EFI_CONSOLE_CONTROL_GUID.
15904 (grub_efi_exit): Removed.
15905 (grub_stop): Likewise.
15906 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
15907 (grub_exit): New function.
15908 (grub_print_device_path): Likewise.
15909
15910 * kern/rescue.c (grub_rescue_cmd_exit): New function.
15911 (grub_enter_rescue_mode): Register "exit".
15912
15913 * kern/misc.c (grub_real_dprintf): A cosmetic change.
15914 (grub_abort): New function.
15915
15916 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
15917
15918 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
15919
15920 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
15921
15922 * include/grub/efi/efi.h (grub_efi_exit): Removed.
15923 (grub_print_device_path): New prototype.
15924 (grub_efi_locate_handle): Likewise.
15925 (grub_efi_open_protocol): Likewise.
15926
15927 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
15928 * disk/efi/efidisk.c: Likewise.
15929
15930 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
15931
15932 * include/grub/efi/console_control.h
15933 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
15934
15935 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
15936 last 8 bytes as an array.
15937 (GRUB_EFI_DISK_IO_GUID): New macro.
15938 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
15939 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
15940 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
15941 grub_uint8_t.
15942 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
15943 (struct grub_efi_device_path): Rename the member "sub_type" to
15944 "subtype".
15945 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
15946 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
15947 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
15948 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
15949 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
15950 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
15951 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
15952 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
15953 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
15954 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
15955 (struct grub_efi_pci_device_path): New structure.
15956 (grub_efi_pci_device_path_t): New type.
15957 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
15958 (struct grub_efi_pccard_device_path): New structure.
15959 (grub_efi_pccard_device_path_t): New type.
15960 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
15961 (struct grub_efi_memory_mapped_device_path): New structure.
15962 (grub_efi_memory_mapped_device_path_t): New type.
15963 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
15964 (struct grub_efi_vendor_device_path): New structure.
15965 (grub_efi_vendor_device_path_t): New type.
15966 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
15967 (struct grub_efi_controller_device_path): New structure.
15968 (grub_efi_controller_device_path_t): New type.
15969 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
15970 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
15971 (struct grub_efi_acpi_device_path): New structure.
15972 (grub_efi_acpi_device_path_t): New type.
15973 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
15974 (struct grub_efi_expanded_acpi_device_path): New structure.
15975 (grub_efi_expanded_acpi_device_path_t): New type.
15976 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
15977 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
15978 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
15979 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
15980 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
15981 (struct grub_efi_atapi_device_path): New structure.
15982 (grub_efi_atapi_device_path_t): New type.
15983 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
15984 (struct grub_efi_fibre_channel_device_path): New structure.
15985 (grub_efi_fibre_channel_device_path_t): New type.
15986 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
15987 (struct grub_efi_1394_device_path): New structure.
15988 (grub_efi_1394_device_path_t): New type.
15989 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
15990 (struct grub_efi_usb_device_path): New structure.
15991 (grub_efi_usb_device_path_t): New type.
15992 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
15993 (struct grub_efi_usb_class_device_path): New structure.
15994 (grub_efi_usb_class_device_path_t): New type.
15995 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
15996 (struct grub_efi_i2o_device_path): New structure.
15997 (grub_efi_i2o_device_path_t): New type.
15998 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
15999 (struct grub_efi_mac_address_device_path): New structure.
16000 (grub_efi_mac_address_device_path_t): New type.
16001 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
16002 (struct grub_efi_ipv4_device_path): New structure.
16003 (grub_efi_ipv4_device_path_t): New type.
16004 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
16005 (struct grub_efi_ipv6_device_path): New structure.
16006 (grub_efi_ipv6_device_path_t): New type.
16007 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
16008 (struct grub_efi_infiniband_device_path): New structure.
16009 (grub_efi_infiniband_device_path_t): New type.
16010 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
16011 (struct grub_efi_uart_device_path): New structure.
16012 (grub_efi_uart_device_path_t): New type.
16013 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
16014 (struct grub_efi_vendor_messaging_device_path): New structure.
16015 (grub_efi_vendor_messaging_device_path_t): New type.
16016 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
16017 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
16018 (struct grub_efi_hard_drive_device_path): New structure.
16019 (grub_efi_hard_drive_device_path_t): New type.
16020 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
16021 (struct grub_efi_cdrom_device_path): New structure.
16022 (grub_efi_cdrom_device_path_t): New type.
16023 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
16024 (struct grub_efi_vendor_media_device_path): New structure.
16025 (grub_efi_vendor_media_device_path_t): New type.
16026 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
16027 (struct grub_efi_file_path_device_path): New structure.
16028 (grub_efi_file_path_device_path_t): New type.
16029 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
16030 (struct grub_efi_protocol_device_path): New structure.
16031 (grub_efi_protocol_device_path_t): New type.
16032 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
16033 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
16034 (struct grub_efi_bios_device_path): New structure.
16035 (grub_efi_bios_device_path_t): New type.
16036 (struct grub_efi_disk_io): New structure.
16037 (grub_efi_disk_io_t): New type.
16038 (struct grub_efi_block_io_media): New structure.
16039 (grub_efi_block_io_media_t): New type.
16040 (struct grub_efi_block_io): New structure.
16041 (grub_efi_block_io_t): New type.
16042
16043 * include/grub/misc.h (grub_stop): Removed.
16044 (grub_exit): New prototype.
16045 (grub_abort): Likewise.
16046
16047 * include/grub/disk.h (enum grub_disk_dev_id): Added
16048 GRUB_DISK_DEVICE_EFIDISK_ID.
16049
16050 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
16051 disk/efi/efidisk.c.
16052 (kernel_syms.lst): Remove the target if an error occurs.
16053
49986a9f 160542006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
16055
16056 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
16057 as it was simply too buggy.
16058
970d3b8a 160592006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
16060
16061 * kern/misc.c (grub_lltoa): New function.
16062 (grub_vsprintf): Added support for the long long suffix,
16063 i.e. "ll".
16064
ff04ec24 160652006-04-20 Hollis Blanchard <hollis@penguinppc.org>
16066
16067 * Makefile.in (LDFLAGS): Add variable.
16068 (LD): Remove variable.
16069 * configure.ac: Add -m32 to LDFLAGS.
16070 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
16071 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
16072 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
16073 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
16074 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
16075 variables.
16076 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
16077 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
16078 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
16079
37e5e1a4 160802006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
16081
16082 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
16083 length for unknown glyph.
16084
c352d8dd 160852006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
16086
2eab1c0d 16087 Add support for pre-loaded modules into the EFI port.
f19dbdb7 16088
2eab1c0d 16089 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
16090 completely. Accept one more argument DIR. The caller has changed.
16091
16092 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
16093
16094 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
16095 (grub_efi_loaded_image_guid): New variable.
16096 (grub_efi_get_loaded_image): New function.
16097 (grub_arch_modules_addr): Likewise.
16098
16099 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
16100 prototype.
16101
16102 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
16103 (struct grub_efi_loaded_image): New structure.
16104 (grub_efi_loaded_image_t): New type.
16105
161062006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 16107
c352d8dd 16108 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
16109 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
16110 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
16111
6d01d6b4 161122006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
16113
16114 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
16115
976a4ea0 161162006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
16117
16118 * DISTLIST: Added include/grub/efi/console.h,
16119 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
16120 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
16121
16122 * include/grub/efi/console.h: New file.
16123 * include/grub/efi/time.h: Likewise.
16124 * include/grub/i386/efi/kernel.h: Likewise.
16125 * kern/efi/init.c: Likewise.
16126 * kern/efi/mm.c: Likewise.
16127 * term/efi/console.c: Likewise.
f19dbdb7 16128
976a4ea0 16129 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
16130 (grub_stop): Removed.
16131 (grub_get_rtc): Likewise.
16132 (grub_machine_init): Simply call grub_efi_init.
16133 (grub_machine_fini): Call grub_efi_fini.
16134
16135 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
16136 (grub_efi_output_string): Removed.
16137 (grub_efi_stall): New function.
16138 (grub_stop): Likewise.
16139 (grub_get_rtc): Likewise.
16140
16141 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
16142 (grub_efi_stall): New prototype.
16143 (grub_efi_allocate_pages): Likewise.
16144 (grub_efi_free_pages): Likewise.
16145 (grub_efi_get_memory_map): Likewise.
16146 (grub_efi_mm_init): Likewise.
16147 (grub_efi_mm_fini): Likewise.
16148 (grub_efi_init): Likewise.
16149 (grub_efi_fini): Likewise.
16150
16151 * include/grub/i386/efi/time.h: Do not include
16152 grub/symbol.h. Include grub/efi/time.h.
16153 (GRUB_TICKS_PER_SECOND): Removed.
16154 (grub_get_rtc): Likewise.
16155
16156 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
16157 Added padding. The EFI spec is buggy.
16158 (GRUB_EFI_BLACK): New macro.
16159 (GRUB_EFI_BLUE): Likewise.
16160 (GRUB_EFI_GREEN): Likewise.
16161 (GRUB_EFI_CYAN): Likewise.
16162 (GRUB_EFI_RED): Likewise.
16163 (GRUB_EFI_MAGENTA): Likewise.
16164 (GRUB_EFI_BROWN): Likewise.
16165 (GRUB_EFI_LIGHTGRAY): Likewise.
16166 (GRUB_EFI_BRIGHT): Likewise.
16167 (GRUB_EFI_DARKGRAY): Likewise.
16168 (GRUB_EFI_LIGHTBLUE): Likewise.
16169 (GRUB_EFI_LIGHTGREEN): Likewise.
16170 (GRUB_EFI_LIGHTCYAN): Likewise.
16171 (GRUB_EFI_LIGHTRED): Likewise.
16172 (GRUB_EFI_LIGHTMAGENTA): Likewise.
16173 (GRUB_EFI_YELLOW): Likewise.
16174 (GRUB_EFI_WHITE): Likewise.
16175 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
16176 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
16177 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
16178 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
16179 (GRUB_EFI_BACKGROUND_RED): Likewise.
16180 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
16181 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
16182 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
16183 (GRUB_EFI_TEXT_ATTR): Likewise.
16184
16185 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
16186 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
16187 (kernel_mod_HEADERS): Added efi/time.h.
16188
83709125 161892006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
16190
16191 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
16192 include/grub/efi/api.h, include/grub/efi/console_control.h,
16193 include/grub/efi/efi.h, include/grub/efi/pe32.h,
16194 include/grub/i386/efi/time.h, kern/efi/efi.c,
16195 kern/i386/efi/init.c, kern/i386/efi/startup.S,
16196 and util/i386/efi/grub-mkimage.c.
16197
16198 * Makefile.in (RMKFILES): Added i386-efi.rmk.
16199
16200 * genmk.rb (PModule#rule): Do not export symbols if
16201 #{prefix}_EXPORTS is set to "no".
16202
16203 * conf/i386-efi.mk: New file.
16204 * conf/i386-efi.rmk: Likewise.
16205 * include/grub/efi/api.h: Likewise.
16206 * include/grub/efi/console_control.h: Likewise.
16207 * include/grub/efi/efi.h: Likewise.
16208 * include/grub/efi/pe32.h: Likewise.
16209 * include/grub/i386/efi/time.h: Likewise.
16210 * kern/efi/efi.c: Likewise.
16211 * kern/i386/efi/init.c: Likewise.
16212 * kern/i386/efi/startup.S: Likewise.
16213 * util/i386/efi/grub-mkimage.c: Likewise.
16214
162152006-04-17 Marco Gerards <marco@gnu.org>
bfa2bd9e 16216
16217 * include/grub/script.h: Include <grub/parser.h> and
16218 "grub_script.tab.h".
16219 (struct grub_lexer_param): New struct.
16220 (struct grub_parser_param): Likewise.
16221 (grub_script_create_arglist): Pass the state in an argument.
16222 (grub_script_add_arglist): Likewise.
16223 (grub_script_create_cmdline): Likewise.
16224 (grub_script_create_cmdblock): Likewise.
16225 (grub_script_create_cmdif): Likewise.
16226 (grub_script_create_cmdmenu): Likewise.
16227 (grub_script_add_cmd): Likewise.
16228 (grub_script_arg_add): Likewise.
16229 (grub_script_lexer_ref): Likewise.
16230 (grub_script_lexer_deref): Likewise.
16231 (grub_script_lexer_record_start): Likewise.
16232 (grub_script_lexer_record_stop): Likewise.
16233 (grub_script_mem_record): Likewise.
16234 (grub_script_mem_record_stop): Likewise.
16235 (grub_script_malloc): Likewise.
16236 (grub_script_yylex): Likewise.
16237 (grub_script_yyparse): Likewise.
16238 (grub_script_yyerror): Likewise.
16239 (grub_script_yylex): Likewise.
16240 (grub_script_lexer_init): Return the state.
16241
16242 * normal/lexer.c (grub_script_lexer_state): Removed variable.
16243 (grub_script_lexer_done): Likewise.
16244 (grub_script_lexer_getline): Likewise.
16245 (grub_script_lexer_refs): Likewise.
16246 (script): Likewise.
16247 (newscript): Likewise.
16248 (record): Likewise.
16249 (recording): Likewise.
16250 (recordpos): Likewise.
16251 (recordlen): Likewise.
16252 (grub_script_lexer_init): Return the state instead of setting
16253 global variables.
16254 (grub_script_lexer_ref): Use the newly added argument for state
16255 instead of globals.
16256 (grub_script_lexer_deref): Likewise.
16257 (grub_script_lexer_record_start): Likewise.
16258 (grub_script_lexer_record_stop): Likewise.
16259 (recordchar): Likewise.
16260 (nextchar): Likewise.
16261 (grub_script_yylex2): Likewise.
16262 (grub_script_yylex): Likewise.
16263 (grub_script_yyerror): Likewise.
16264
16265 * normal/parser.y (func_mem): Removed variable.
16266 (menu_entry): Likewise.
16267 (err): Likewise.
16268 (%lex-param): New parser option.
16269 (%parse-param): Likewise.
16270 (script): Always return the AST.
16271 (argument): Pass the state around.
16272 (arguments): Likewise.
16273 (grubcmd): Likewise.
16274 (commands): Likewise.
16275 (function): Likewise.
16276 (menuentry): Likewise.
16277 (if_statement): Likewise.
16278 (if): Likewise.
16279
16280 * normal/script.c (grub_script_memused): Removed variable.
16281 (grub_script_parsed): Likewise.
16282 (grub_script_malloc): Added a state argument. Use that instead of
16283 global variables.
16284 (grub_script_mem_record): Likewise.
16285 (grub_script_mem_record_stop): Likewise.
16286 (grub_script_arg_add): Likewise.
16287 (grub_script_add_arglist): Likewise.
16288 (grub_script_create_cmdline): Likewise.
16289 (grub_script_create_cmdif): Likewise.
16290 (grub_script_create_cmdmenu): Likewise.
16291 (grub_script_add_cmd): Likewise.
16292 (grub_script_parse): Setup the state before calling the parser.
f19dbdb7 16293
e2a8c904 162942006-04-16 Marco Gerards <marco@gnu.org>
6de2ee99 16295
16296 * normal/command.c (grub_command_init): Remove the title command.
16297
16298 * normal/lexer.c (grub_script_yylex): Renamed from this...
16299 (grub_script_yylex2): ... to this.
16300 (grub_script_yylex): New function. Temporary
16301 introduced to filter some tokens.
16302 (grub_script_yyerror): Print a newline.
16303
16304 * normal/main.c (read_config_file): Output information about the
16305 lines that contain errors. Wait for a key after all lines have
16306 been processed. Don't return an empty menu.
16307
16308 * normal/parser.y (func_mem): Don't initialize.
16309 (menu_entry): Likewise.
16310 (err): New variable.
16311 (script): Don't return anything when an error was encountered.
16312 (ws, returns): Removed rules.
16313 (argument): Disabled concatenated variable support.
16314 (arguments): Remove explicit separators.
16315 (grubcmd): Likewise.
16316 (function): Likewise.
16317 (menuentry): Likewise.
16318 (if): Likewise.
16319 (commands): Likewise. Add error handling.
16320
16321 * normal/script.c (grub_script_create_cmdline): If
16322 `grub_script_parsed' is 0, assume the parser encountered an error.
16323
c9a86192 163242006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
16325
16326 * configure.ac: Add support for EFI. Fix the typo
16327 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
16328
70f3b243 163292006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
16330
16331 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
16332 foreign multibyte characters should be shown correctly.
16333
65f201ad 163342006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
16335
16336 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
16337 calculation.
16338 (read_config_file): Made it to close file before returning.
16339
b4b93674 163402006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
16341
16342 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
16343 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
16344 video/i386/pc/vbefill.c.
16345
16346 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
16347 video/i386/pc/vbefill.c.
16348
16349 * include/grub/video.h (grub_video_blit_format): New enum.
16350 (grub_video_mode_info): Added new member blit_format.
16351 (grub_video_get_blit_format): New function prototype.
16352
16353 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
16354 function prototype.
16355 (grub_video_vbe_map_rgb): Likewise.
16356 (grub_video_vbe_unmap_color): Likewise.
16357
16358 * include/grub/i386/pc/vbeblit.h: New file.
16359
16360 * include/grub/i386/pc/vbefill.h: New file.
16361
16362 * video/video.c (grub_video_get_blit_format): New function.
16363 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
16364 (grub_video_vbe_map_rgb): Likewise.
16365 (grub_video_vbe_unmap_color): Likewise.
16366
16367 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
16368 optimized fills.
16369 (grub_video_vbe_blit_render_target): Changed to use more optimized
16370 blits.
16371 (grub_video_vbe_setup): Added detection for optimized settings.
16372 (grub_video_vbe_create_render_target): Likewise.
16373
16374 * video/i386/pc/vbeblit.c: New file.
16375
16376 * video/i386/pc/vbefill.c: New file.
16377
c2379b9c 163782006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
16379
16380 * font/manager.c (grub_font_get_glyph): Removed font fixup from
16381 here...
16382
16383 * util/unifont2pff.rb: ... and moved it to here. Improved argument
16384 parsing to support both hex and dec ranges. If filename was missing
16385 show usage information.
16386
bd0d7896 163872006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
16388
16389 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
16390 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
16391
16392 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
16393 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
16394 (video_mod_SOURCES): Added.
16395 (video_mod_CFLAGS): Likewise.
16396 (video_mod_LDFLAGS): Likewise.
16397 (gfxterm_mod_SOURCES): Likewise.
16398 (gfxterm_mod_CFLAGS): Likewise.
16399 (gfxterm_mod_LDFLAGS): Likewise.
16400 (videotest_mod_SOURCES): Likewise.
16401 (videotest_mod_CFLAGS): Likewise.
16402 (videotest_mod_LDFLAGS): Likewise.
16403 (vesafb_mod_SOURCES): Removed.
16404 (vesafb_mod_CFLAGS): Likewise.
16405 (vesafb_mod_LDFLAGS): Likewise.
16406 (vga_mod_SOURCES): Likewise.
16407 (vga_mod_CFLAGS): Likewise.
16408 (vga_mod_LDFLAGS): Likewise.
16409
16410 * commands/videotest.c: New file.
16411
16412 * font/manager.c (fill_with_default_glyph): Modified to use
16413 grub_font_glyph.
16414 (grub_font_get_glyph): Likewise.
16415 (fontmanager): Renamed from this...
16416 (font_manager): ... to this.
16417
16418 * include/grub/font.h (grub_font_glyph): Added new structure.
16419 (grub_font_get_glyph): Modified to use grub_font_glyph.
16420
16421 * include/grub/misc.h (grub_abs): Added as inline function.
16422
16423 * include/grub/video.h: New file.
16424
16425 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
16426 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
16427 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
16428 (grub_vbe_get_controller_info): Renamed from this...
16429 (grub_vbe_bios_get_controller_info): ... to this.
16430 (grub_vbe_get_mode_info): Renamed from this...
16431 (grub_vbe_bios_get_mode_info): ... to this.
16432 (grub_vbe_set_mode): Renamed from this...
16433 (grub_vbe_bios_set_mode): ... to this.
16434 (grub_vbe_get_mode): Renamed from this...
16435 (grub_vbe_bios_get_mode): ... to this.
16436 (grub_vbe_set_memory_window): Renamed from this...
16437 (grub_vbe_bios_set_memory_window): ... to this.
16438 (grub_vbe_get_memory_window): Renamed from this...
16439 (grub_vbe_bios_get_memory_window): ... to this.
16440 (grub_vbe_set_scanline_length): Renamed from this...
16441 (grub_vbe_set_scanline_length): ... to this.
16442 (grub_vbe_get_scanline_length): Renamed from this...
16443 (grub_vbe_bios_get_scanline_length): ... to this.
16444 (grub_vbe_set_display_start): Renamed from this...
16445 (grub_vbe_bios_set_display_start): ... to this.
16446 (grub_vbe_get_display_start): Renamed from this...
16447 (grub_vbe_bios_get_display_start): ... to this.
16448 (grub_vbe_set_palette_data): Renamed from this...
16449 (grub_vbe_bios_set_palette_data): ... to this.
16450 (grub_vbe_set_pixel_rgb): Removed.
16451 (grub_vbe_set_pixel_index): Likewise.
16452
16453 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
16454 from this...
16455 (grub_vbe_bios_get_controller_info): ... to this.
16456 (grub_vbe_get_mode_info): Renamed from this...
16457 (grub_vbe_bios_get_mode_info): ... to this.
16458 (grub_vbe_set_mode): Renamed from this...
16459 (grub_vbe_bios_set_mode): ... to this.
16460 (grub_vbe_get_mode): Renamed from this...
16461 (grub_vbe_bios_get_mode): ... to this.
16462 (grub_vbe_set_memory_window): Renamed from this...
16463 (grub_vbe_bios_set_memory_window): ... to this.
16464 (grub_vbe_get_memory_window): Renamed from this...
16465 (grub_vbe_bios_get_memory_window): ... to this.
16466 (grub_vbe_set_scanline_length): Renamed from this...
16467 (grub_vbe_set_scanline_length): ... to this.
16468 (grub_vbe_get_scanline_length): Renamed from this...
16469 (grub_vbe_bios_get_scanline_length): ... to this.
16470 (grub_vbe_set_display_start): Renamed from this...
16471 (grub_vbe_bios_set_display_start): ... to this.
16472 (grub_vbe_get_display_start): Renamed from this...
16473 (grub_vbe_bios_get_display_start): ... to this.
16474 (grub_vbe_set_palette_data): Renamed from this...
16475 (grub_vbe_bios_set_palette_data): ... to this.
16476 (grub_vbe_bios_get_controller_info): Fixed problem with registers
16477 getting corrupted after calling it. Added more pushes and pops.
16478 (grub_vbe_bios_set_mode): Likewise.
16479 (grub_vbe_bios_get_mode): Likewise.
16480 (grub_vbe_bios_get_memory_window): Likewise.
16481 (grub_vbe_bios_set_scanline_length): Likewise.
16482 (grub_vbe_bios_get_scanline_length): Likewise.
16483 (grub_vbe_bios_get_display_start): Likewise.
16484 (grub_vbe_bios_set_palette_data): Likewise.
16485
16486 * normal/cmdline.c (cl_set_pos): Refresh the screen.
16487 (cl_insert): Likewise.
16488 (cl_delete): Likewise.
16489
16490 * term/gfxterm.c: New file.
16491
16492 * term/i386/pc/vesafb.c: Removed file.
16493
16494 * video/video.c: New file.
16495
16496 * video/i386/pc/vbe.c (real2pm): Added new function.
16497 (grub_video_vbe_draw_pixel): Likewise.
16498 (grub_video_vbe_get_video_ptr): Likewise.
16499 (grub_video_vbe_get_pixel): Likewise
16500 (grub_video_vbe_init): Likewise.
16501 (grub_video_vbe_fini): Likewise.
16502 (grub_video_vbe_setup): Likewise.
16503 (grub_video_vbe_get_info): Likewise.
16504 (grub_video_vbe_set_palette): Likewise.
16505 (grub_video_vbe_get_palette): Likewise.
16506 (grub_video_vbe_set_viewport): Likewise.
16507 (grub_video_vbe_get_viewport): Likewise.
16508 (grub_video_vbe_map_color): Likewise.
16509 (grub_video_vbe_map_rgb): Likewise.
16510 (grub_video_vbe_map_rgba): Likewise.
16511 (grub_video_vbe_unmap_color): Likewise.
16512 (grub_video_vbe_fill_rect): Likewise.
16513 (grub_video_vbe_blit_glyph): Likewise.
16514 (grub_video_vbe_blit_bitmap): Likewise.
16515 (grub_video_vbe_blit_render_target): Likewise.
16516 (grub_video_vbe_scroll): Likewise.
16517 (grub_video_vbe_swap_buffers): Likewise.
16518 (grub_video_vbe_create_render_target): Likewise.
16519 (grub_video_vbe_delete_render_target): Likewise.
16520 (grub_video_vbe_set_active_render_target): Likewise.
16521 (grub_vbe_set_pixel_rgb): Remove function.
16522 (grub_vbe_set_pixel_index): Likewise.
16523 (index_color_mode): Remove static variable.
16524 (active_mode): Likewise.
16525 (framebuffer): Likewise.
16526 (bytes_per_scan_line): Likewise.
16527 (grub_video_vbe_adapter): Added new static variable.
16528 (framebuffer): Likewise.
16529 (render_target): Likewise.
16530 (initial_mode): Likewise.
16531 (mode_in_use): Likewise.
16532 (mode_list): Likewise.
16533
5f97350b 165342006-03-10 Marco Gerards <marco@gnu.org>
16535
16536 * configure.ac (AC_INIT): Bumped to 1.93.
16537
16538 * DISTLIST: Added `include/grub/hfs.h'.
16539
a3c5c6f8 165402006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
16541
16542 * boot/i386/pc/boot.S (general_error): Before looping, try INT
16543 18H, which might help the BIOS falling back to next boot media.
16544
6de53d26 165452006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
16546
16547 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
16548 Poe Chen <poe.poechen@gmail.com>.
16549
77c4a393 165502006-01-17 Marco Gerards <marco@gnu.org>
16551
16552 * include/grub/normal.h: Include <grub/script.h>.
16553 (grub_command_list): Removed struct.
16554 (grub_command_list_t): Removed type.
16555 (grub_menu_entry): Remove members `num' and `command_list'. Add
16556 members `commands' and `sourcecode'.
16557 * include/grub/script.h: Add inclusion guards.
16558 (grub_script_cmd_menuentry): New struct.
16559 (grub_script_execute_menuentry): New prototype.
16560 (grub_script_lexer_record_start): Likewise.
16561 (grub_script_lexer_record_stop): Likewise.
16562 * normal/execute.c (grub_script_execute_menuentry): New function.
16563 * normal/lexer.c (record, recording, recordpos, recordlen): New
16564 variables.
16565 (grub_script_lexer_record_start): New function.
16566 (grub_script_lexer_record_stop): Likewise.
16567 (recordchar): Likewise.
16568 (nextchar): Likewise.
16569 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
16570 2048 as the buffer size. Add the tokens `menuentry' and `@'.
16571 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
16572 (current_menu): New variable.
16573 (free_menu): Mainly rewritten.
16574 (grub_normal_menu_addentry): New function.
16575 (read_config_file): Rewritten.
16576 * normal/menu.c (run_menu_entry): Mainly rewritten.
fe987087 16577 * normal/menu_entry.c (make_screen): Rewritten the code to insert
77c4a393 16578 the menu entry.
16579 (run): Mainly rewritten.
16580 * normal/parser.y (menu_entry): New variable.
16581 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
16582 (menuentry): New rule.
16583 (command): Add `menuentry'.
16584 (if_statement): Allow additional returns before `fi'.
16585 * normal/script.c (grub_script_create_cmdmenu): New function.
16586
144f1f98 165872006-01-03 Marco Gerards <marco@gnu.org>
16588
16589 * INSTALL: GNU Bison is required.
16590 * configure.ac: Rewritten the test to detect Bison.
16591 * Makefile.in (YACC): New variable. Reported by Xun Sun
16592 <xun.sun.cn@gmail.com>.
16593
af4b2d89 165942006-01-03 Marco Gerards <marco@gnu.org>
16595
16596 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
16597 the HFS+ filesystem to filesystem blocks.
16598 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
16599 GCC warning is silenced.
16600
15643b71 166012006-01-03 Marco Gerards <marco@gnu.org>
16602
16603 * partmap/apple.c (apple_partition_map_iterate): Convert the data
16604 read from disk from big endian to host byte order.
16605
00905879 166062006-01-03 Hollis Blanchard <hollis@penguinppc.org>
16607
16608 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
16609 documentation.
16610 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
16611 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
16612 embedded HFS+ filesystem.
16613 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
16614 (grub_hfs_sblock): Move from here...
16615 * include/grub/hfs.h: To here... New file.
16616 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
16617 documentation.
16618 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
16619 New macros.
16620 (grub_hfsplus_volheader): Change type of member `magic' to
16621 `grub_uint16_t'.
16622 (grub_hfsplus_data): Add new member `embedded_offset'.
16623 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
16624 returned block.
16625 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
16626 Calculate the offset.
16627
8899bc3e 166282005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
16629
16630 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
16631 Removed.
16632 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
16633
ae8c0277 166342005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
16635
16636 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
16637 ENV->NAME is NULL after allocating ENV->VALUE.
16638
07084456 166392005-12-25 Marco Gerards <marco@gnu.org>
16640
16641 * kern/env.c (grub_env_set): Rewritten the error handling code.
16642
4750f5f1 166432005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
16644
16645 * geninit.sh: Made more robust, and more portable.
16646
50214199 166472005-12-25 Marco Gerards <marco@gnu.org>
16648
16649 Add support for Apple HFS+ filesystems.
f19dbdb7 16650
50214199 16651 * fs/hfsplus.c: New file.
16652
16653 * DISTLIST: Added `fs/hfsplus.c'.
16654
16655 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
16656 (hfsplus_mod_SOURCES): New variable.
16657 (hfsplus_mod_CFLAGS): Likewise.
16658 (hfsplus_mod_LDFLAGS): Likewise.
16659 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
16660 (grub_setup_SOURCES): Likewise.
16661 (grub_mkdevicemap_SOURCES): Likewise.
16662 (grub_emu_SOURCES): Likewise.
16663 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
16664
16665 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
16666
16667 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
16668
befaed6c 166692005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
16670
16671 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
16672 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
16673 include/grub/parser.h, include/grub/script.h, kern/parser.c,
16674 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
16675 normal/lexer.c, normal/parser.y, normal/script.c, and
16676 partmap/gpt.c.
16677 Removed kern/sparc64/cache.c.
16678
16679 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
16680 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
16681 grub_emu_init.c.
16682
16683 * configure.ac (AC_INIT): Bumped to 1.92.
16684
6a124103 166852005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
16686
16687 * kern/err.c (grub_error_push): Added new function to support error
16688 stacks.
16689 (grub_error_pop): Likewise.
16690 (grub_error_stack_items): New local variable to support error stacks.
16691 (grub_error_stack_pos): Likewise.
16692 (grub_error_stack_assert): Likewise.
16693 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
16694 stack depth.
16695 (grub_print_error): Added support to print errors from error stack.
16696
16697 * include/grub/err.h (grub_error_push): Added function prototype.
16698 (grub_error_pop): Likewise.
16699
be973c1b 167002005-12-09 Hollis Blanchard <hollis@penguinppc.org>
16701
16702 * configure.ac: Accept `powerpc64' as host_cpu.
16703 (amd64): Rename to `biarch32'.
16704
16705 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
16706 non-cacheline-aligned addresses.
16707
16708 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
16709 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
16710 if `size' is non-zero.
16711
b04216ab 167122005-12-03 Marco Gerards <mgerards@xs4all.nl>
16713
16714 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
16715 and `cd' to make sure the filename is not prefixed with a
16716 directory name.
16717 (pkgdata_MODULES): Add `gpt.mod'.
16718 (gpt_mod_SOURCES): New variable.
16719 (gpt_mod_CFLAGS): Likewise.
16720 (gpt_mod_LDFLAGS): Likewise.
16721
16722 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
16723
16724 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
16725 New macro.
16726
16727 * partmap/gpt.c: New file.
16728
16729 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
16730 GPT partition map is detected.
16731
41730ed9 167322005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
16733
16734 * commands/i386/pc/play.c: New file.
16735 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
16736 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
16737 macros.
f19dbdb7 16738
95dc3643 167392005-11-27 Marco Gerards <mgerards@xs4all.nl>
16740
16741 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
16742 ((unused))' to silence gcc warning.
16743
1569ec51 167442005-11-26 Hollis Blanchard <hollis@penguinppc.org>
16745
16746 * configure.ac: Correct `AC_PROG_YACC' test.
16747
9abde152 167482005-11-22 Hollis Blanchard <hollis@penguinppc.org>
16749
16750 * util/powerpc/ieee1275/grub-install.in: Run the mount point
16751 check before installing files.
16752
44b83271 167532005-11-22 Mike Small <smallm@panix.com>
16754
16755 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
16756 number regex so multidigit numbers are recognized correctly.
16757
167582005-11-22 Mike Small <smallm@panix.com>
16759
16760 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
16761 debugging message before attempting to claim memory.
16762 (grub_rescue_cmd_initrd): Add a claim debugging message and try
16763 multiple addresses in case of failure.
16764
9c12956b 167652005-11-22 Hollis Blanchard <hollis@penguinppc.org>
16766
16767 * term/tparm.c (get_space): Remove empty `if' statement.
16768
16769 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
16770
16771 * kern/parser.c (check_varstate): Rename `state' to 's'.
16772
aeaf81d9 167732005-11-22 Hollis Blanchard <hollis@penguinppc.org>
16774
16775 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
16776 variable definitions to the beginning of each function. Sort stack
16777 variables by size.
16778 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
16779 `buf' argument to `char *'.
16780
79bbb63f 167812005-11-22 Hollis Blanchard <hollis@penguinppc.org>
16782
16783 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
16784 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 16785 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
79bbb63f 16786 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
16787 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
16788 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
16789 configfile.mod, search.mod, gzio.mod and test.mod.
16790 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
16791 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
16792 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
16793 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
16794 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
16795 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
16796 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
16797 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
16798 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
16799 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
16800 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
16801 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
16802 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
16803 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
16804 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
16805 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
16806 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
16807 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
16808 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
16809 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
16810 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
16811 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
16812 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
16813
16814 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
16815 `grep --include'.
16816 (pkgdata_MODULES): Add test.mod.
16817
233b1628 168182005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
16819
16820 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
16821 appending to variables with "+=".
16822 (PModule): Use full pathname to generate *.lst filenames.
16823
16824 * Makefile.in: Fixed list rules moved from genmk.rb.
16825 (.DELETE_ON_ERROR): New special target.
16826 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
16827
16828 * conf/i386-pc.rmk: Include conf/common.mk.
16829 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 16830 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
233b1628 16831 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
16832 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
16833 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
16834 configfile.mod, search.mod, gzio.mod and test.mod.
16835 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
16836 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
16837 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
16838 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
16839 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
16840 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
16841 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
16842 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
16843 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
16844 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
16845 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
16846 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
16847 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
16848 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
16849 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
16850 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
16851 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
16852 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
16853 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
16854 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
16855 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
16856 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
16857 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
16858 here...
16859 * conf/common.rmk: ... to here. New file.
16860
16861 * conf/common.mk: New file.
16862
16f820c8 168632005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
16864
16865 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
16866 (grub_script.tab.c): ... here.
16867
16868 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
16869 (grub_script.tab.c): ... here.
16870
16871 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
16872 (grub_script.tab.c): ... here.
16873
16874 * normal/command.c (grub_command_find): Fixed a memory leak of
16875 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
16876
63ba1554 168772005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
16878
16879 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
16880 "@" which marks the start of a comment on ARM.
16881 (VARIABLE): Likewise.
16882
7f67dc13 168832005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
16884
79bbb63f 16885 Add support for Linux/ADFS partition tables.
7f67dc13 16886
16887 * partmap/acorn.c: New file.
16888
16889 * include/grub/acorn_filecore.h: Likewise.
16890
16891 * DISTLIST: Added `partmap/acorn.c' and
16892 `include/grub/acorn_filecore.h'.
f19dbdb7 16893
7f67dc13 16894 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16895 `partmap/acorn.c'.
16896 (pkgdata_MODULES): Add `acorn.mod'.
16897 (acorn_mod_SOURCES): New variable.
16898 (acorn_mod_CFLAGS): Likewise.
16899
16900 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
16901 `partmap/acorn.c'.
16902 (pkgdata_MODULES): Add `acorn.mod'.
16903 (acorn_mod_SOURCES): New variable.
16904 (acorn_mod_CFLAGS): Likewise.
16905
16906 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
16907 (pkgdata_MODULES): Add `acorn.mod'.
16908 (acorn_mod_SOURCES): New variable.
16909 (acorn_mod_CFLAGS): Likewise.
16910 (acorn_mod_LDFLAGS): Likewise.
16911
16912 * include/types.h (grub_disk_addr_t): New typedef.
16913
6d099807 169142005-11-13 Marco Gerards <mgerards@xs4all.nl>
16915
16916 * geninit.sh: New file.
16917
16918 * geninitheader.sh: Likewise.
16919
16920 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
16921 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
16922 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
16923 * commands/configfile.c (grub_configfile_init)
16924 (grub_configfile_fini): Likewise.
16925 * commands/default.c (grub_default_init, grub_default_fini):
16926 Likewise.
16927 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
16928 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
16929 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
16930 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
16931 Likewise.
16932 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
16933 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
16934 Likewise.
16935 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
fe6b695a 16936 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
6d099807 16937 Likewise.
16938 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
16939 Likewise.
fe6b695a 16940 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
6d099807 16941 Likewise.
16942 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
16943 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
16944 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
16945 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
16946 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
16947 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
16948 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
16949 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
16950 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
16951 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
16952 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
16953 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
16954 * partmap/amiga.c (grub_amiga_partition_map_init)
16955 (grub_amiga_partition_map_fini): Likewise.
16956 * partmap/apple.c (grub_apple_partition_map_init)
16957 (grub_apple_partition_map_fini): Likewise.
16958 * partmap/pc.c (grub_pc_partition_map_init)
16959 (grub_pc_partition_map_fini): Likewise.
16960 * partmap/sun.c (grub_sun_partition_map_init,
16961 grub_sun_partition_map_fini): Likewise.
16962 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
16963 Likewise.
16964
16965 * util/grub-emu.c: Include <grub_modules_init.h>.
16966 (main): Don't initialize and de-initialize any modules directly,
16967 use `grub_init_all' and `grub_fini_all' instead.
16968
16969 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
16970 `grub_vesafb_mod_init'.
16971 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
16972 all users.
16973 * term/i386/pc/vga.c (grub_vga_init): Renamed to
16974 `grub_vga_mod_init'. Updated all users.
16975 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
f19dbdb7 16976
6d099807 16977 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
16978 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
16979 rules.
16980
16981 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
16982 Generate a function to initialize the module in utilities.
16983 Updated all callers.
16984 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
16985 initialize the module in utilities. Updated all callers.
16986
9046bcf0 169872005-11-09 Hollis Blanchard <hollis@penguinppc.org>
16988
16989 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
16990 escape sequence and a literal ^L to clear the screen.
16991
16992 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
16993 when returning from Open Firmware.
16994
d13ea639 169952005-11-09 Hollis Blanchard <hollis@penguinppc.org>
16996
16997 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
16998 (grub_ofconsole_height): Likewise.
16999 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
17000 manually insert a '\n'.
17001 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
17002 `grub_ofconsole_height'. Return early if these are already set.
17003
a8fcf206 170042005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
17005
17006 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
17007 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
17008 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
17009 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
17010 and `normal/script.c'.
17011 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
17012 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
17013 (test_mod_SOURCES): New variable.
17014 (test_mod_CFLAGS): Likewise.
17015 (test_mod_LDFLAGS): Likewise.
17016 (pkgdata_MODULES): Add `test.mod'.
17017 (grub_script.tab.c): New rule.
17018 (grub_script.tab.h): Likewise.
17019
b6b32745 170202005-11-07 Marco Gerards <mgerards@xs4all.nl>
17021
17022 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
17023 `commands/test.c', `normal/execute.c', `normal/lexer.c',
17024 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
17025 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
17026 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
17027 (test_mod_SOURCES): New variable.
17028 (test_mod_CFLAGS): Likewise.
17029 (pkgdata_MODULES): Add `test.mod'.
17030 (grub_script.tab.c): New rule.
17031 (grub_script.tab.h): Likewise.
17032
daac212a 170332005-11-06 Marco Gerards <mgerards@xs4all.nl>
17034
17035 Add initial scripting support.
17036
17037 * commands/test.c: New file.
17038 * include/grub/script.h: Likewise.
17039 * normal/execute.c: Likewise.
17040 * normal/function.c: Likewise.
17041 * normal/lexer.c: Likewise.
17042 * normal/parser.y: Likewise.
17043 * normal/script.c: Likewise.
17044
17045 * configure.ac: Add `AC_PROG_YACC' test.
f19dbdb7 17046
daac212a 17047 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
17048 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
17049 `normal/function.c' and `normal/script.c'.
17050 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
17051 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
b6b32745 17052 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
17053 variables.
daac212a 17054 (pkgdata_MODULES): Add `test.mod'.
17055 (grub_script.tab.c): New rule.
17056 (grub_script.tab.h): Likewise.
17057
17058 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
17059
17060 * include/grub/normal.h (grub_test_init): New prototype.
17061 (grub_test_fini): Likewise.
f19dbdb7 17062
daac212a 17063 * normal/command.c: Include <grub/script.h>.
17064 (grub_command_execute): Rewritten.
f19dbdb7 17065
daac212a 17066 * util/grub-emu.c (main): Call `grub_test_init' and
17067 `grub_test_fini'.
17068
77500b2b 170692005-11-03 Hollis Blanchard <hollis@penguinppc.org>
17070
17071 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
17072 to 0.
17073 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
17074 there are no pending characters.
17075
e45deb9e 170762005-11-03 Hollis Blanchard <hollis@penguinppc.org>
17077
17078 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
17079 `grub_strndup' to drop device arguments. Replace unnecessary
17080 `grub_strndup' with `grub_strdup'.
17081
4ce32619 170822005-11-03 Hollis Blanchard <hollis@penguinppc.org>
17083
17084 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
17085 `debug' environment variable has been set.
17086
170872005-11-02 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 17088
4ce32619 17089 * Makefile.in (install-local): Use $(DATA).
17090 (uninstall): Likewise.
17091 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
17092 (sbin_UTILITIES): ... to here.
17093 (sbin_SCRIPTS): New variable.
17094 (grub_install_SOURCES): New variable.
17095 * util/powerpc/ieee1275/grub-install.in: New file.
17096 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
17097 variable.
17098 (add_segments): Call `grub_util_get_path'.
17099
25fe6f03 171002005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
17101
17102 From Timothy Baldwin:
17103 * commands/ls.c (grub_ls_list_files): Close FILE with
17104 grub_file_close.
17105 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
17106
04ccf3ec 171072005-10-24 Marco Gerards <mgerards@xs4all.nl>
17108
17109 * include/grub/parser.h: New file.
17110
17111 * kern/parser.c: Likewise.
17112
17113 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
17114 (grub_setup_SOURCES): Likewise.
17115 (grub_probefs_SOURCES): Likewise.
17116 (grub_emu_SOURCES): Likewise.
17117 (kernel_img_HEADERS): Add `parser.h'.
17118
17119 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
17120 (grub_emu_SOURCES): Add `kern/parser.c'.
17121 (grubof_SOURCES): Likewise.
17122
17123 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
17124 (grubof_SOURCES): Add `kern/parser.c'.
17125
17126 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
17127
17128 * kern/misc.c (grub_split_cmdline): Removed function.
17129
17130 * kern/rescue.c: Include <grub/parser.h>.
17131 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
17132 of `grub_split_cmdline'.
17133
17134 * normal/command.c: Include <grub/parser.h>.
17135 (grub_command_execute): Use `grub_parser_split_cmdline' instead
17136 of `grub_split_cmdline'.
17137
17138 * normal/completion.c: Include <grub/parser.h>.
17139 (cmdline_state): New variable.
17140 (iterate_dir): End the filename with a quote depending on the
17141 command line state.
17142 (get_state): new function.
17143 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
17144 split the arguments and determine the current argument. When the
17145 argument string is not quoted, escape all spaces.
17146
6d8f4b0e 171472005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
17148
17149 * normal/sparc64/setjmp.S: New file.
17150
15cf03ed 171512005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
17152
17153 * include/grub/sparc64/libgcc.h: New file.
17154 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
17155 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
17156 normal/sparc64/setjmp.c.
17157
03e8661a 171582005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
17159
17160 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
17161 * kern/sparc64/cache.S: New file.
17162 * kern/sparc64/cache.c: Removed.
17163 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
17164 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
17165 -mtune=ultrasparc.
17166 (COMMON_LDFLAGS): Add -melf64_sparc.
17167 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
17168 (grubof_SOURCES): Use cache.S instead of cache.c.
17169 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
17170 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
17171 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
17172 commented though.
17173 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
17174 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
17175 (linux_mod_CFLAGS): Commented out.
17176 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
17177 out because module isn't built.
17178 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
17179 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
17180 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
17181 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
17182 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
17183 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
17184 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
17185 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
17186 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
17187 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
17188 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
17189 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
17190 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
17191 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
17192
34eeec8a 171932005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
17194
17195 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
17196 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
17197 longer, because HFS should not be used on PC.
17198
708367a3 171992005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
17200
17201 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
17202 consistently within the loop.
17203
6fa1251a 172042005-10-15 Marco Gerards <mgerards@xs4all.nl>
17205
17206 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
17207 directory can not be read.
17208
4801580b 172092005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
17210
17211 * configure.ac (AC_INIT): Increase the version number to 1.91.
17212
17213 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
17214 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
17215 term/i386/pc/serial.c.
17216
219ad426 172172005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
17218
17219 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
17220 file size must be permitted.
17221
17222 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
17223 between %ah and %al.
17224
688e5699 172252005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
17226
17227 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
17228 grub_uint64_t.
17229 Call the hook with a NUL-terminated filename.
17230 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
17231 grub_cpu_to_be32.
17232
17233 * kern/term.c (cursor_state): New variable.
17234 (grub_term_set_current): Reset the cursor state on a new
17235 terminal.
17236 (grub_setcursor): Rewritten to use CURSOR_STATE.
17237 (grub_getcursor): New function.
17238
17239 * include/grub/term.h (grub_getcursor): New prototype.
17240
17241 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
17242 integers on ARM. Reported by Timothy Baldwin
17243 <T.E.Baldwin99@members.leeds.ac.uk>.
17244
bb34586c 172452005-10-11 Marco Gerards <mgerards@xs4all.nl>
17246
17247 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
17248 allocated.
17249 (grub_sfs_dir): Likewise.
17250
9a909877 172512005-10-09 Marco Gerards <mgerards@xs4all.nl>
17252
17253 Add support for the SFS filesystem.
17254
17255 * fs/sfs.c: New file.
17256
17257 * DISTLIST: Added `fs/sfs.c'.
17258
17259 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
17260 (grub_probefs_SOURCES): Likewise.
17261 (grub_emu_SOURCES): Likewise.
17262 (pkgdata_MODULES): Add `sfs.mod'.
17263 (sfs_mod_SOURCES): New variable.
17264 (sfs_mod_CFLAGS): Likewise.
17265 (sfs_mod_LDFLAGS): Likewise.
17266
17267 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
17268 (pkgdata_MODULES): Add `sfs.mod'.
17269 (sfs_mod_SOURCES): New variable.
17270 (sfs_mod_CFLAGS): Likewise.
17271
17272 * util/grub-emu.c (main): Call `grub_sfs_init' and
17273 `grub_sfs_fini'.
17274
17275 * include/grub/fs.h (grub_sfs_init): New prototype.
17276 (grub_sfs_fini): Likewise.
17277
57bdbde3 172782005-10-07 Marco Gerards <mgerards@xs4all.nl>
17279
17280 Add support for the AFFS filesystem.
17281
17282 * fs/affs.c: New file.
17283
17284 * DISTLIST: Added `fs/affs.c'.
17285
17286 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
17287 (grub_probefs_SOURCES): Likewise.
17288 (grub_emu_SOURCES): Likewise.
17289 (pkgdata_MODULES): Add `affs.mod'.
17290 (affs_mod_SOURCES): New variable.
17291 (affs_mod_CFLAGS): Likewise.
17292 (affs_mod_LDFLAGS): Likewise.
17293
17294 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
17295 (pkgdata_MODULES): Add `affs.mod'.
17296 (affs_mod_SOURCES): New variable.
17297 (affs_mod_CFLAGS): Likewise.
17298
17299 * util/grub-emu.c (main): Call `grub_affs_init' and
17300 `grub_affs_fini'.
17301
17302 * include/grub/fs.h (grub_affs_init): New prototype.
17303 (grub_affs_fini): Likewise.
17304
047b67e0 173052005-10-01 Marco Gerards <mgerards@xs4all.nl>
17306
17307 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
17308
59b8208a 173092005-10-01 Marco Gerards <mgerards@xs4all.nl>
17310
17311 * configure.ac: Accept `x86_64' as host_cpu. In that case add
17312 `-m32' to CFLAGS.
17313
17314 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
17315 linking.
f19dbdb7 17316
59b8208a 17317 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
17318 (COMMON_LDFLAGS): New variable.
17319 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
17320 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
17321 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
17322 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
17323 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
17324 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
17325 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
17326 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
17327 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
17328 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
17329 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
17330 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
17331 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
17332 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
17333 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
17334 variables.
17335 (normal_mod_ASFLAGS): Add `-m32'.
17336
17337 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
17338 (grub_host_size_t, grub_host_ssize_t): New types.
17339 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
fe6b695a 17340 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
59b8208a 17341 `GRUB_HOST_SIZEOF_VOID_P'.
17342
17343 * include/grub/kernel.h (struct grub_module_header): Type of
17344 member offset changed to `grub_host_off_t'. Type of member size
17345 changed to `grub_host_size_t'.
17346 (struct grub_module_info): Type of member offset changed to
17347 `grub_host_off_t'. Type of member size changed to
17348 `grub_host_size_t'.
17349
b4093103 173502005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
17351
17352 Make GRUB's kernel compliant to Multiboot Specification.
f19dbdb7 17353
b4093103 17354 * kern/i386/pc/startup.S (multiboot_header): New label.
17355 (multiboot_entry): Likewise.
17356 (multiboot_trampoline): Likewise.
17357
17358 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
17359 Increased to 0x4A0.
17360
17361 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
17362 put parentheses after a question mark.
17363 [!GRUB_UTIL] (my_mod): New variable.
17364
17365 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
17366
b2499b29 173672005-09-28 Marco Gerards <mgerards@xs4all.nl>
17368
17369 Adds support for the XFS filesystem. Btrees are not supported
17370 yet.
17371
17372 * fs/xfs.c: New file.
17373
17374 * DISTLIST: Added `fs/xfs.c'.
17375
17376 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
17377 (grub_probefs_SOURCES): Likewise.
17378 (grub_emu_SOURCES): Likewise.
17379 (pkgdata_MODULES): Add `xfs.mod'.
17380 (xfs_mod_SOURCES): New variable.
17381 (xfs_mod_CFLAGS): Likewise.
17382
17383 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
17384 (pkgdata_MODULES): Add `xfs.mod'.
17385 (xfs_mod_SOURCES): New variable.
17386 (xfs_mod_CFLAGS): Likewise.
17387
17388 * util/grub-emu.c (main): Call `grub_xfs_init' and
17389 `grub_xfs_fini'.
17390
17391 * include/grub/fs.h (grub_xfs_init): New prototype.
17392 (grub_xfs_fini): Likewise.
17393
f19dbdb7 17394
83d37a62 173952005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
17396
17397 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
17398 color modes, allow greater than 16 colors to be configured as
17399 a default palette.
17400
47d2d65e 174012005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
17402
17403 * normal/completion.c (complete_arguments): Add the qualifier
17404 const into OPTIONS.
17405
17406 From Omniflux <omniflux+lists@omniflux.com>:
17407 * include/grub/terminfo.h: New file.
17408 * include/grub/tparm.h: Likewise.
17409 * include/grub/i386/pc/serial.h: Likewise.
17410 * term/terminfo.c: Likewise.
17411 * term/tparm.c: Likewise.
17412 * term/i386/pc/serial.c: Likewise.
17413 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
17414 serial.mod.
17415 (terminfo_mod_SOURCES): New variable.
17416 (terminfo_mod_CFLAGS): Likewise.
17417 (serial_mod_SOURCES): Likewise.
17418 (serial_mod_CFLAGS): Likewise.
17419
48b671ff 174202005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
17421
17422 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
17423 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
17424 and kern/powerpc/ieee1275/cmain.c, respectively.
17425
17426 * boot/powerpc/ieee1275/crt0.S: Moved to ...
17427 * kern/powerpc/ieee1275/crt0.S: ... here.
17428
17429 * boot/powerpc/ieee1275/cmain.c: Moved to ...
17430 * kern/powerpc/ieee1275/cmain.c: ... here.
f19dbdb7 17431
48b671ff 17432 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
17433 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
17434 instead of boot/powerpc/ieee1275/crt0.S and
17435 boot/powerpc/ieee1275/cmain.c, respectively.
17436
17437 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
17438 sectors. It was not used anyway.
17439
09fc77a7 174402005-08-30 Hollis Blanchard <hollis@penguinppc.org>
17441
17442 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
17443 `unused parameter' warning.
17444
003789c7 174452005-08-30 Hollis Blanchard <hollis@penguinppc.org>
17446
17447 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
17448 function.
17449 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
17450 getcharwidth.
17451
67f44c86 174522005-08-28 Marco Gerards <metgerards@student.han.nl>
17453
17454 * include/grub/normal.h (enum grub_completion_type): Added
17455 `GRUB_COMPLETION_TYPE_ARGUMENT'.
17456
17457 * normal/cmdline.c (print_completion): Handle
17458 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
17459 * normal/menu_entry.c (store_completion): Likewise.
17460
17461 * normal/completion.c (complete_arguments): New function.
17462 (grub_normal_do_completion): Call `complete_arguments' when the
17463 current words start with a dash.
17464
0b5abe02 174652005-08-27 Marco Gerards <metgerards@student.han.nl>
17466
17467 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
17468 `gzio.mod' instead of `io.mod').
17469
d9864ee1 174702005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
17471
17472 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
17473 (DISTDIRS): Added io and video.
17474 Rewrite the search routine to make an output consistently.
17475
17476 * DISTLIST: Added conf/sparc64-ieee1275.mk,
17477 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
17478 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
17479 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
17480 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
17481 util/powerpc/ieee1275/misc.c.
f19dbdb7 17482
d9864ee1 17483 * include/grub/gzio.h: New file.
17484 * io/gzio.c: Likewise.
f19dbdb7 17485
d9864ee1 17486 * kern/file.c (grub_file_close): Call grub_device_close only if
17487 FILE->DEVICE is not NULL.
17488
17489 * include/grub/mm.h [!NULL] (NULL): New macro.
17490
17491 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
17492
17493 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
17494 (pkgdata_MODULES): Added gzio.mod.
17495 (gzio_mod_SOURCES): New variable.
17496 (gzio_mod_CFLAGS): Likewise.
17497
17498 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
17499 (pkgdata_MODULES): Added gzio.mod.
17500 (gzio_mod_SOURCES): New variable.
17501 (gzio_mod_CFLAGS): Likewise.
17502
17503 * commands/cat.c: Include grub/gzio.h.
17504 (grub_cmd_cat): Use grub_gzfile_open instead of
17505 grub_file_open.
f19dbdb7 17506
d9864ee1 17507 * commands/cmp.c: Include grub/gzio.h.
17508 (grub_cmd_cmp): Use grub_gzfile_open instead of
17509 grub_file_open.
17510
17511 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
17512 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
17513 grub_file_open.
17514 (grub_rescue_cmd_module): Likewise.
17515
fa46f4b5 175162005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
17517
17518 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
17519 kern/sparc64/ieee1275/init.c because it contains _start.
17520 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
17521
e9211b5d 175222005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
17523
17524 * configure.ac: Add support for sparc64 host with ieee1275
17525 firmware.
17526 * configure: Generated from configure.ac.
17527 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
17528 instead of int.
17529 (grub_ofdisk_read): Likewise.
17530 (grub_ofdisk_open): Use %p to print pointer values, and cast the
17531 pointers as (void *) to remove a warning.
17532 (grub_ofdisk_close): Likewise.
17533 (grub_ofdisk_read): Likewise.
17534 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
17535 returns, so make it return void to remove a warning.
17536 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
17537 Corresponding prototype change.
17538 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
17539 values, and cast the pointers as (void *) to remove a warning.
17540 (grub_mm_dump): Likewise.
17541 * conf/sparc64-ieee1275.mk: New file.
17542 * conf/sparc64-ieee1275.rmk: Likewise.
17543 * include/grub/sparc64/setjmp.h: Likewise.
17544 * include/grub/sparc64/types.h: Likewise.
17545 * include/grub/sparc64/ieee1275/console.h: Likewise.
17546 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
17547 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
17548 * include/grub/sparc64/ieee1275/time.h: Likewise.
17549 * kern/sparc64/cache.c: Likewise.
17550 * kern/sparc64/dl.c: Likewise.
17551 * kern/sparc64/ieee1275/init.c: Likewise.
17552 * kern/sparc64/ieee1275/openfw.c: Likewise.
17553
385c6a92 175542005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
17555
17556 * util/console.c (grub_ncurses_putchar): If C is greater than
17557 0x7f, set C to a question mark.
17558 (grub_ncurses_getcharwidth): New function.
17559 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
17560 getcharwidth.
17561
17562 * normal/menu.c (print_entry): Made aware of Unicode. First,
17563 convert TITLE to UCS-4, and predict the cursor position by
17564 grub_getcharwidth.
17565
17566 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
17567 const to SRC.
17568 * kern/misc.c (grub_utf16_to_utf8): Likewise.
17569
16ccb8b1 175702005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
17571
17572 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
17573 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
17574 grub_strcat.
17575
17576 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
17577 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
17578 grub_strcpy and grub_strlen. Take it into account that a space
17579 character is inserted as a delimiter.
17580
6a85ce79 175812005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
17582
17583 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
fe6b695a 17584 invalid magic in the error.
6a85ce79 17585
17586 * commands/search.c: New file.
f19dbdb7 17587
6a85ce79 17588 * util/grub-emu.c (main): Call grub_search_init and
17589 grub_search_fini.
17590
17591 * kern/rescue.c (grub_rescue_print_disks): Removed.
17592 (grub_rescue_print_devices): New function.
17593 (grub_rescue_cmd_ls): Use grub_device_iterate with
17594 grub_rescue_print_devices instead of grub_disk_dev_iterate with
17595 grub_rescue_print_disks.
17596
17597 * kern/partition.c (grub_partition_iterate): Return the result of
17598 PARTMAP->ITERATE instead of GRUB_ERRNO.
17599
17600 * kern/device.c: Include grub/partition.h.
17601 (grub_device_iterate): New function.
17602
17603 * include/grub/partition.h (grub_partition_iterate): Return int
17604 instead of grub_err_t.
17605
17606 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
17607 prototype.
17608 [GRUB_UTIL] (grub_search_fini): Likewise.
17609
17610 * include/grub/device.h (grub_device_iterate): New prototype.
17611
17612 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
17613 commands/search.c.
17614 (pkgdata_MODULES): Added search.mod.
17615 (search_mod_SOURCES): New variable.
17616 (search_mod_CFLAGS): Likewise.
17617
17618 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
17619 (pkgdata_MODULES): Added search.mod.
17620 (search_mod_SOURCES): New variable.
17621 (search_mod_CFLAGS): Likewise.
17622
17623 * commands/ls.c (grub_ls_list_disks): Renamed to ...
17624 (grub_ls_list_devices): ... this, and use grub_device_iterate.
17625 All callers changed.
17626
17627 * DISTLIST: Added commands/search.c.
17628
ef095434 176292005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
17630
17631 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
17632 conversion.
17633 (grub_getcharwidth): New function.
17634
17635 * kern/misc.c (grub_utf8_to_ucs4): New function.
17636
17637 * include/grub/term.h (struct grub_term): Added a new member
17638 "getcharwidth".
17639 (grub_getcharwidth): New prototype.
17640
17641 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
17642
17643 * term/i386/pc/console.c (map_char): New function. Segregated from
17644 grub_console_putchar.
17645 (grub_console_putchar): Use map_char.
17646 (grub_console_getcharwidth): New function.
17647 (grub_console_term): Specified grub_console_getcharwidth as
17648 getcharwidth.
17649
17650 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
17651 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
17652
17653 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
17654 GRUB_ERRNO.
17655 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
17656 on grub_strtoul completely.
17657 (write_char): Declare local variables in the beginning of the
17658 function.
17659 (grub_vesafb_getcharwidth): New function.
17660 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
17661 getcharwidth.
17662
1f0a95e4 176632005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
17664
17665 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
17666 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
17667 commands/i386/pc/vbetest.c.
17668
17669 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
17670 call grub_vbe_get_controller_info again, because the returned
17671 information is volatile.
17672 (grub_vbe_set_video_mode): Mostly rewritten.
17673 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
17674 grub_vbe_status_t correctly.
17675 (grub_vbe_get_video_mode_info): Likewise.
17676 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
17677 several if statements.
17678
17679 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
17680 * commands/i386/pc/vbeinfo.c: ... this.
17681
17682 * commands/i386/pc/vbe_test.c: Renamed to ...
17683 * commands/i386/pc/vbetest.c: ... this.
17684
17685 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
17686 ...
17687 (grub_cmd_vbeinfo): ... this. Save video modes before
17688 iterating. Skip a video mode, if it is not available, not enough
17689 information is given or it is monochrome. Show the memory
17690 model. Leave the interpretation of MODEVAR to grub_strtoul
17691 completely.
17692 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
17693 (GRUB_MOD_FINI): Likewise.
17694
17695 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
17696 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
17697 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
17698 duplicated grub_env_get. Leave the interpretation of MODEVAR to
17699 grub_strtoul completely.
17700 (real2pm): Removed.
17701 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
17702 (GRUB_MOD_FINI): Likewise.
17703
17704 * normal/misc.c: Include grub/mm.h.
17705
17706 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
17707 vbe_list_modes with vbetest.mod and vbeinfo.mod.
17708 (vbe_list_modes_mod_SOURCES): Removed.
17709 (vbe_list_modes_mod_CFLAGS): Likewise.
17710 (vbe_test_mod_SOURCES): Likewise.
17711 (vbe_test_mod_CFLAGS): Likewise.
17712 (vbeinfo_mod_SOURCES): New variable.
17713 (vbeinfo_mod_CFLAGS): Likewise.
17714 (vbetest_mod_SOURCES): Likewise.
17715 (vbetest_mod_CFLAGS): Likewise.
17716
992ffbbe 177172005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
17718
17719 * normal/misc.c: New file.
17720
17721 * DISTLIST: Added normal/misc.c.
f19dbdb7 17722
992ffbbe 17723 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
17724 DISK to HOOK. Call HOOK with DISK.
17725 * partmap/apple.c (apple_partition_map_iterate): Likewise.
17726 * partmap/pc.c (pc_partition_map_iterate): Likewise.
17727 * partmap/sun.c (sun_partition_map_iterate): Likewise.
17728
17729 * normal/menu_entry.c (struct screen): Added a new member
17730 "completion_shown".
17731 (completion_buffer): New global variable.
17732 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
17733 (store_completion): New function.
17734 (complete): Likewise.
17735 (clear_completions): Likewise.
17736 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
17737 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
17738 a tab, call complete.
17739
17740 * normal/completion.c (disk_dev): Removed.
17741 (print_simple_completion): Likewise.
17742 (print_partition_completion): Likewise.
17743 (print_func): New global variable.
17744 (add_completion): Do not take the arguments WHAT or PRINT any
17745 longer. Added a new argument TYPE. Instead of printing directly,
17746 call PRINT_FUNC if not NULL.
17747 All callers changed.
17748 (complete_device): Use a local variable DEV instead of
17749 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
17750 (grub_normal_do_completion): Take a new argument HOOK. Do not
17751 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
17752 empty string, return NULL instead.
17753 All callers changed.
17754
17755 * normal/cmdline.c (print_completion): New function.
17756
17757 * kern/partition.c (grub_partition_iterate): Add an argument DISK
17758 to HOOK.
17759 All callers changed.
17760
17761 * kern/disk.c (grub_print_partinfo): Removed.
17762
17763 * include/grub/partition.h (struct grub_partition_map): Add a new
17764 argument DISK into HOOK of ITERATE.
17765 (grub_partition_iterate): Add a new argument DISK to HOOK.
17766
17767 * include/grub/normal.h (enum grub_completion_type): New enum.
17768 (grub_completion_type_t): New type.
17769 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
17770 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
17771 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
17772 (GRUB_COMPLETION_TYPE_FILE): Likewise.
17773 (grub_normal_do_completion): Added a new argument HOOK.
17774 (grub_normal_print_device_info): New prototype.
17775
17776 * include/grub/disk.h (grub_print_partinfo): Removed.
17777
17778 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
17779 (normal_mod_SOURCES): Likewise.
17780 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
17781 (normal_mod_SOURCES): Likewise.
17782
17783 * commands/ls.c (grub_ls_list_disks): Use
17784 grub_normal_print_device_info instead of grub_print_partinfo. Free
17785 PNAME.
17786 (grub_ls_list_files): Use grub_normal_print_device_info instead of
17787 duplicating the code.
17788
0bd41162 177892005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
17790
17791 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
f19dbdb7 17792 follow GCS more precisely.
17793 * commands/i386/pc/vbe_test.c: Likewise.
17794 * include/grub/i386/pc/vbe.h: Likewise.
17795 * term/i386/pc/vesafb.c: Likewise.
17796 * video/i386/pc/vbe.c: Likewise.
0bd41162 17797
6323696a 177982005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
17799
17800 * DISTLIST: Added term/i386/pc/vesafb.c
17801 DISTLIST: Added video/i386/pc/vbe.c
17802 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
17803 DISTLIST: Added commands/i386/pc/vbe_test.c.
17804 * commands/i386/pc/vbe_list_modes.c: New file.
17805 * commands/i386/pc/vbe_test.c: Likewise.
17806 * term/i386/pc/vesafb.c: Likewise.
17807 * video/i386/pc/vbe.c: Likewise.
17808 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
17809 (grub_vbe_probe) Added prototype.
17810 (grub_vbe_set_video_mode) Likewise.
17811 (grub_vbe_get_video_mode) Likewise.
17812 (grub_vbe_get_video_mode_info) Likewise.
17813 (grub_vbe_set_pixel_rgb) Likewise.
17814 (grub_vbe_set_pixel_index) Likewise.
17815 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
17816 (pkgdata_MODULES): Added vesafb.mod.
17817 (pkgdata_MODULES): Added vbe_list_modes.mod.
17818 (pkgdata_MODULES): Added vbe_test.mod.
17819 (vbe_mod_SOURCES): Added.
17820 (vbe_mod_CFLAGS): Likewise.
17821 (vesafb_mod_SOURCES): Likewise.
17822 (vesafb_mod_CFLAGS): Likewise.
17823 (vbe_list_modes_mod_SOURCES): Likewise.
17824 (vbe_list_modes_mod_CFLAGS): Likewise.
17825 (vbe_test_mod_SOURCES): Likewise.
17826 (vbe_test_mod_CFLAGS): Likewise.
17827
0a74e62f 178282005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
17829
0a74e62f 17830 * normal/command.c (grub_command_execute): If INTERACTIVE is
17831 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
17832 CMDLINE. Disable the pager if INTERACTIVE is true.
17833 All callers are changed.
17834
17835 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
17836 before reading a config file.
17837 * normal/main.c (read_config_file): Even if a command is not
17838 found, register it if it is within an entry.
17839
17840 * util/grub-emu.c: Include sys/types.h and unistd.h.
17841 (options): Added --hold.
17842 (struct arguments): Added a new member "hold".
17843 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
17844 missing.
17845 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
17846 cleared by a debugger, if it is not zero.
17847
17848 * include/grub/normal.h (grub_command_execute): Add an argument
17849 INTERACTIVE.
17850
e51f85ae 178512005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
17852
17853 * DISTLIST: Added include/grub/i386/pc/vbe.h.
17854
e9c6f39b 178552005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
17856
17857 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
17858 program with another one, because the old one didn't detect a bug
17859 in gcc-3.4. Always use regparm 2, because the new test is still
17860 not enough for gcc-4.0. Someone must investigate a simple test
17861 case which detects a bug in gcc-4.0.
17862
8de3495c 178632005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
17864
17865 * DISTLIST: Added normal/completion.c.
17866
17867 * normal/completion.c: New file.
f19dbdb7 17868
8de3495c 17869 * term/i386/pc/console.c (grub_console_getwh): New function.
17870 (grub_console_term): Assign grub_console_getwh to getwh.
17871
17872 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
17873 function is defined in normal/completion.c as
17874 grub_normal_do_completion.
17875 (grub_cmdline_get): Use grub_normal_do_completion instead of
17876 grub_tab_complete.
17877
17878 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
17879 returns non-zero, otherwise return 0.
17880 (grub_partition_iterate): First, probe the partition map. Then,
17881 call ITERATE only for this partition map.
17882
17883 * kern/misc.c (grub_strncmp): Rewritten.
17884
17885 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
17886 returns non-zero. Otherwise return 0.
17887
17888 * include/grub/partition.h (grub_partition_map_iterate): Return
17889 int instead of void.
17890
17891 * include/grub/normal.h (grub_normal_do_completion): New prototype.
17892
17893 * include/grub/misc.h (grub_strncmp): Change the type of N to
17894 grub_size_t.
17895
17896 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
17897 of void.
17898
17899 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
fe6b695a 17900 unsigned explicitly before comparing it with I.
8de3495c 17901
17902 * kern/main.c (grub_env_write_root): Add the attribute unused into
17903 VAR.
17904
17905 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
17906 normal/completion.c.
17907 (normal_mod_SOURCES): Likewise.
17908 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
17909 (normal_mod_SOURCES): Likewise.
17910
17911 * normal/command.c (grub_iterate_commands): If ITERATE returns
17912 non-zero, return one immediately.
17913
e85e144b 179142005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
17915
17916 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
17917 * kern/i386/pc/startup.S: Updated Global Descriptor table's
17918 descriptions.
17919 (grub_vbe_get_controller_info): New function.
17920 (grub_vbe_get_mode_info): Likewise.
17921 (grub_vbe_set_mode): Likewise.
17922 (grub_vbe_get_mode): Likewise.
17923 (grub_vbe_set_memory_window): Likewise.
17924 (grub_vbe_get_memory_window): Likewise.
17925 (grub_vbe_set_scanline_length): Likewise.
17926 (grub_vbe_get_scanline_length): Likewise.
17927 (grub_vbe_set_display_start): Likewise.
17928 (grub_vbe_get_display_start): Likewise.
17929 (grub_vbe_set_palette_data): Likewise.
17930 * include/grub/i386/pc/vbe.h: New file.
17931
c46153d2 179322005-08-08 Hollis Blanchard <hollis@penguinppc.org>
17933
17934 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
17935 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
17936 * DISTLIST: Likewise.
17937 * kern/ieee1275/of.c: Moved to ...
17938 * kern/ieee1275/ieee1275.c: ... here.
17939
0cb90c45 179402005-08-08 Hollis Blanchard <hollis@penguinppc.org>
17941
17942 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
17943 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
17944 Pass 0 as `end' parameter to grub_strtoul().
17945
a19fb360 179462005-08-08 Hollis Blanchard <hollis@penguinppc.org>
17947
17948 * include/grub/powerpc/ieee1275/console.h: Do not include
17949 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
17950 ifdef.
17951 (grub_console_cur_color): Remove i386-specific prototype.
17952 (grub_console_real_putchar): Likewise.
17953 (grub_console_checkkey): Likewise.
17954 (grub_console_getkey): Likewise.
17955 (grub_console_getxy): Likewise.
17956 (grub_console_gotoxy): Likewise.
17957 (grub_console_cls): Likewise.
17958 (grub_console_setcursor): Likewise.
17959 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
17960 Include <grub/machine/console.h>.
17961 * term/ieee1275/ofconsole.c: Likewise.
17962
4ac9bd04 179632005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
17964
17965 * Makefile.in (LIBLZO): New variable.
17966
17967 * configure.ac: Check for LZO version 2.
17968
17969 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
17970 lzo/lzo1x.h instead of lzo1x.h.
17971
17972 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
17973 of -llzo.
17974
17975 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
17976 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
17977
17978 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
17979 copying the data from PARTITION to P.
17980
f4917dfd 179812005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
17982
17983 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
17984 negative, unload the module.
17985
17986 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
17987 map is "pc_partition_map" but not "pc".
17988 (usage): Fix the description. The options are --boot-image and
17989 --core-image but not --boot-file or --core-file.
17990 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
17991 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
17992 DEFAULT_DIRECTORY.
17993
17994 * util/i386/pc/grub-install.in: Do not specify --boot-file or
17995 --core-file. Specify INSTALL_DEVICE as an argument.
17996
17997 * util/console.c: Include config.h.
17998 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
17999 [HAVE_NCURSES_H]: Include ncurses.h.
18000 [HAVE_CURSES_H]: Include curses.h.
18001 [!A_NORMAL] (A_NORMAL): Defined as zero.
18002 [!A_STANDOUT] (A_STANDOUT): Likewise.
18003
18004 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
18005 -lncurses.
18006 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
18007
18008 * configure.ac: Check for curses libraries and headers.
18009
18010 * Makefile.in (LIBCURSES): New variable.
18011
18012 * genmk.rb (Script::rule): Set the executable bits.
18013
18014 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
18015 name of the PC partition map is "pc_partition_map" but not "pc".
18016
0e143073 180172005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
18018
18019 * util/i386/pc/grub-install.in (grub_probefs): New variable.
18020 (modules): Likewise.
18021 (usage): Added descriptions for --modules and --grub-probefs.
18022 Handle --modules and --grub-probefs. Save the arguments in MODULES
18023 and GRUB_PROBEFS, respectively.
18024 Auto-detect a filesystem module against GRUBDIR. If the result is
18025 empty and modules are not specified explicitly, abort the
18026 installation. Add the result to MODULES.
18027
18028 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
18029 disk/powerpc/ieee1275/ofdisk.c,
18030 include/grub/powerpc/ieee1275/init.h and
18031 term/powerpc/ieee1275/ofconsole.c.
18032 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
18033 term/ieee1275/ofconsole.c.
18034
18035 * include/grub/powerpc/ieee1275/console.h: Resurrected.
18036
18037 * COPYING: Upgraded to the latest version. Only the address of the
18038 FSF office has changed.
f19dbdb7 18039
efd6e6d5 180402005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
18041
18042 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
18043 kern/ieee1275.c with kern/ieee1275/of.c.
18044
18045 * kern/ieee1275.c: Moved to ...
18046 * kern/ieee1275/of.c: ... here.
18047
8ceafda2 180482005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
18049
18050 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
fe6b695a 18051 readability.
8ceafda2 18052
18053 * config.guess: Updated to the latest version from gnulib.
18054 * config.sub: Likewise.
18055 * install.sh: Likewise.
18056 * mkinstalldirs: Likewise.
18057
18058 * include/grub/console.h: Removed. This file is arch-specific. Do
18059 not put this in include/grub.
18060
18061 * include/grub/i386/pc/console.h: Resurrected.
18062
18063 * util/console.c: Include grub/machine/console.h instead of
18064 grub/console.h.
18065 * util/grub-emu.c: Likewise.
18066
267f6cd9 180672005-08-04 Marco Gerards <metgerards@student.han.nl>
18068
18069 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
18070 hardcoded value.
f19dbdb7 18071
267f6cd9 18072 From Vincent Pelletier <subdino2004@yahoo.fr>
18073 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
18074 Redefined to use grub_getwh.
18075 (grub_term): New member named getwh.
18076 (grub_getwh): New prototype.
18077 * kern/term.c (grub_getwh): New function.
18078 * term/i386/pc/console.c (grub_console_getwh): New function.
18079 (grub_console_term): New member `getwh'.
18080 * term/i386/pc/vga.c (grub_vga_getwh): New function.
18081 (grub_vga_term): New member `getwh'.
0b5abe02 18082 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
267f6cd9 18083 grub_ssize_t.
18084 (grub_ofconsole_getw): New function.
18085 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
18086 (grub_ofconsole_term): New field named getwh and new initial
18087 value.
18088
3be7266d 180892005-08-03 Hollis Blanchard <hollis@penguinppc.org>
18090
18091 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
18092 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
18093 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
18094 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
18095 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
18096 of <grub/machine/ieee1275.h>.
18097 * commands/ieee1275/reboot.c: Likewise.
18098 * boot/powerpc/ieee1275/ieee1275.c: Move ...
18099 * kern/ieee1275.c: ... to here. All users updated. Change all
18100 parameter structs to use new type `grub_ieee1275_cell_t'.
18101 * term/powerpc/ieee1275/ofconsole.c: Move ...
18102 * term/ieee1275/ofconsole.c: ... to here. All users updated.
18103 * disk/powerpc/ieee1275/ofdisk.c: Move ...
18104 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
18105 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
18106 to return int.
18107 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
18108 Remove unused prototypes. All users updated.
18109 * include/grub/powerpc/ieee1275/console.h: Removed.
18110 * include/grub/powerpc/ieee1275/ieee1275.h: Define
18111 `grub_ieee1275_cell_t'.
18112 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
18113 Cast comparisons with -1 to the correct type.
18114 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
18115 type to match `grub_ieee1275_entry_fn'.
18116
8b5f3938 181172005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
18118
18119 * DISTLIST: Added util/i386/pc/grub-probefs.c.
18120
18121 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
18122 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
18123 partmap/sun.c.
18124 (grub_probefs_SOURCES): New variable.
18125
18126 * util/i386/pc/grub-probefs.c: New file.
18127
18128 * util/i386/pc/grub-setup.c (main): Call
18129 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
18130 grub_hfs_init and grub_jfs_init to initialize the system. Call
18131 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
18132 grub_pc_partition_map_fini to finish the system.
18133
ea409713 181342005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
18135
18136 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
18137 function.
18138 (grub_multiboot_load_elf32): Likewise.
18139 (grub_multiboot_is_elf64): Likewise.
18140 (grub_multiboot_load_elf64): Likewise.
18141 (grub_multiboot_load_elf): Likewise.
18142 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
18143 an ELF32 or ELF64 file.
18144 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
18145
18146 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
18147 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
18148 NULL before calling FS->LABEL.
18149 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
18150 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
18151 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
18152 before calling FS->LABEL.
18153
141a288b 181542005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
18155
18156 * util/i386/pc/grub-install.in (datadir): New variable.
18157 (libdir): Removed.
18158 (pkgdatadir): New variable.
18159 (pkglibdir): Removed.
18160
0d5f8a54 181612005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
18162
18163 * DISTLIST: Added util/i386/pc/grub-install.in.
18164
18165 * util/i386/pc/grub-install.in: New file.
18166
18167 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
18168 (grub_install_SOURCES): Likewise.
18169
18170 * genmk.rb: Added support for scripts.
18171 (Script): New class.
18172 (scripts): New variable.
18173
18174 * Makefile.in (install-local): Install sbin_SCRIPTS by
18175 INSTALL_SCRIPT.
18176 (uninstall): Remove sbin_SCRIPTS.
18177
18178 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
18179 device, try to get a GRUB device by
18180 grub_util_biosdisk_get_grub_dev.
18181 Free DEST_DEV.
18182
18183 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
18184 description for --device-map.
18185
5f968e1e 181862005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
18187
18188 Change the semantics of variable hooks. They now return strings
18189 instead of error values.
f19dbdb7 18190
5f968e1e 18191 * util/i386/pc/grub-setup.c: Include grub/env.h.
18192 (setup): Use grub_device_set_root instead of grub_env_set.
18193
18194 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
18195 grub_env_get instead of grub_device_set_root and
18196 grub_device_get_root, respectively.
18197
18198 * kern/main.c (grub_env_write_root): New function.
18199 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
18200 grub_env_set instead of grub_device_set_root.
18201
18202 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
18203 many variables.
18204 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
18205 rather than calling ENV->WRITE_HOOK afterwards.
18206 (grub_env_get): Return the result of ENV->READ_HOOK rather than
18207 passing a pointer of a pointer.
18208 (grub_register_variable_hook): Change the types of "read_hook" and
18209 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
18210 respectively.
18211 Allocate the default empty string on the heap, because this string
18212 may be freed later.
18213
18214 * kern/device.c: Include grub/env.h.
18215 (grub_device_set_root): Removed.
18216 (grub_device_get_root): Likewise.
18217 (grub_device_open): Use grub_env_get instead of
18218 grub_device_get_root.
18219
18220 * include/grub/env.h (grub_env_read_hook_t): New type.
18221 (grub_env_write_hook_t): Likewise.
18222 (grub_env_var): Change the types of "read_hook" and "write_hook"
18223 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
18224 (grub_register_variable_hook): Likewise.
18225
18226 * include/grub/device.h (grub_device_set_root): Removed.
18227 (grub_device_set_root): Likewise.
18228
18229 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
18230 make sure that DIRNAME terminates with '/', so that
18231 grub_fat_find_dir will fail if PATH is not a directory.
18232
18233 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
18234 from DIRNAME.
18235 Use the qualifier auto for print_files and print_files_long.
18236 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
18237 as a regular file.
18238 Put a newline only if there is no error.
18239 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
18240 used.
18241
896f0afd 182422005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
18243
18244 * kern/partition.c (grub_partition_probe): Initialize PART to
18245 NULL. Otherwise, when no partition map is registered, this returns
18246 a garbage.
18247
b28b81b2 182482005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
18249
18250 * partmap/apple.c (apple_partition_map_iterate): Check if POS
18251 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
18252 valid.
18253
5f3607e0 182542005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
18255
18256 * commands/ls.c (grub_ls_list_disks): Print the filesystem
18257 information on each device, if it does not have partitions. Print
18258 "Device" instead of "Disk", because this function is not specific
18259 to disk devices.
18260
18261 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
18262 static to ensure that it is put on the memory rather than a
18263 register.
18264
502c87e8 182652005-07-17 Yoshinori Okuji <okuji@enbug.org>
18266
18267 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
18268 (grub_cat_init): Likewise.
18269 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
18270 (options): Likewise.
18271 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
18272 (grub_configfile_init): Likewise.
18273 * font/manager.c (GRUB_MOD_INIT): Likewise.
18274 * commands/help.c (GRUB_MOD_INIT): Likewise.
18275 (grub_help_init): Likewise.
18276 * normal/command.c (grub_command_init): Likewise.
18277 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
18278 * disk/loopback.c (grub_loop_init): Likewise.
18279 (GRUB_MOD_INIT): Likewise.
18280 * commands/ls.c (grub_ls_init): Likewise.
18281 (GRUB_MOD_INIT): Likewise.
18282 (options): Likewise.
18283 * commands/boot.c (grub_boot_init): Likewise.
18284 (GRUB_MOD_INIT): Likewise.
18285 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
18286 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
18287 (GRUB_MOD_INIT): Likewise.
18288 * commands/cmp.c (grub_cmp_init): Likewise.
18289 (GRUB_MOD_INIT): Likewise.
18290
18291 * normal/arg.c: Use <> instead of "" to include header files.
18292 (SHORT_ARG_HELP): New macro.
18293 (SHORT_ARG_USAGE): Likewise.
18294 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
18295 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
18296 descriptions.
18297 (find_short): Check if C is 'h' or 'u' explicitly.
18298 (grub_arg_show_help): Use space characters instead of tabs. Treat
18299 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
18300 are shown with --help and --usage only if they are not used for
18301 the command itself.
18302 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
18303 'h' and 'u'.
18304
18305 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
18306 const into "longarg". Change the type of "shortarg" to int.
18307
f806d18e 183082005-07-17 Yoshinori Okuji <okuji@enbug.org>
18309
18310 * boot/i386/pc/boot.S (boot_drive_check): New label.
18311
18312 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
18313 macro.
18314
18315 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
18316 which do not pass a boot drive correctly. Copied from GRUB Legacy.
18317
e293232b 183182005-07-17 Yoshinori Okuji <okuji@enbug.org>
18319
18320 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
18321 When turning off Gate A20, skip the check and return immediately,
18322 because this is not fatal usually.
18323
ebedfd00 183242005-07-17 Yoshinori Okuji <okuji@enbug.org>
18325
18326 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
18327 be 0x7C00 instead of 0x8000.
18328
18329 * boot/i386/pc/pxeboot.S: Rewritten.
18330
18331 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
18332 EXT_C.
18333 (gate_a20_check_state): Read a byte from 0x108000. Invert the
18334 result.
18335
654fc59f 183362005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
18337
18338 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
18339 robustness. This routine now supports a BIOS call and System
18340 Control Port A to modify the gate A20.
18341
18342 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
18343 Increased to 0x440.
18344
09f9923f 183452005-07-12 Hollis Blanchard <hollis@penguinppc.org>
18346
18347 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
18348 device path and resulting ihandle.
18349 (grub_ofdisk_close): dprintf the ihandle being closed.
18350 (grub_ofdisk_read): dprintf function parameters.
18351 * kern/mm.c (grub_mm_init_region): Likewise.
18352 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
18353 (grub_linux_boot): dprintf the Linux entry point, initrd address and
18354 size, and boot arguments.
18355 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
18356 before loading into memory.
18357 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
18358 before loading into memory.
18359
7ef504d8 183602005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
18361
18362 * kern/mm.c: Added much documentation.
18363 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
18364 8, set to 5 instead of 8.
18365
e0f050c2 183662005-07-10 Yoshinori Okuji <okuji@enbug.org>
18367
18368 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
18369
18370 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
18371 (grub_mkdevicemap_SOURCES): New variable.
18372
18373 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
18374 lib/device.c of GRUB Legacy.
18375
7224189a 183762005-07-10 Yoshinori Okuji <okuji@enbug.org>
18377
18378 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
18379 instead of PATH is NULL.
18380
68c864eb 183812005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
18382
18383 * commands/cmp.c (BUFFER_SIZE): New macro.
18384 (grub_cmd_cmp): Close the right file at the right time. Compare
18385 only data just read. Don't report files of different size as
18386 identical. Dynamically allocate buffers. Move variable
18387 declarations at the beginning of function.
18388
e6f3e614 183892005-07-09 Yoshinori Okuji <okuji@enbug.org>
18390
18391 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
18392 reverse.
18393
f8f1559a 183942004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
18395
18396 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
18397 when backspace is pressed at beginning of line.
18398
39c9d41d 183992005-07-03 Yoshinori Okuji <okuji@enbug.org>
18400
18401 * DISTLIST: Added genfslist.sh.
18402
18403 * normal/main.c (fs_module_list): New variable.
18404 (autoload_fs_module): New function.
18405 (read_fs_list): Likewise.
18406 (grub_normal_execute): Call read_fs_list.
18407
18408 * kern/fs.c (grub_fs_autoload_hook): New variable.
18409 (grub_fs_probe): Added support for auto-loading.
18410
18411 * include/grub/normal.h (struct grub_fs_module_list): New struct.
18412 (grub_fs_module_list_t): New type.
18413
18414 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
18415 (grub_fs_autoload_hook): New prototype.
18416
18417 * genfslist.sh: New file.
f19dbdb7 18418
39c9d41d 18419 * genmk.rb: Added a rule to generate a filesystem list.
18420
121c1d83 184212005-06-30 Marco Gerards <metgerards@student.han.nl>
18422
18423 * configure.ac: Fix the test for cross-compiling.
18424
18425 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
18426 define GRUB_UTIL anymore.
18427
18428 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
18429 so this function works on other systems than just big endian.
18430 (load_modules): Likewise.
18431 (add_segments): Likewise.
18432
e75d76e1 184332005-06-23 Hollis Blanchard <hollis@penguinppc.org>
18434
18435 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
18436 contains `l' modifier, get a long from va_arg().
18437
50b5a0a7 184382005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
18439
18440 * kern/mm.c (grub_free): If the next free block which is being
18441 merged is the first free block, set the first block to the block
18442 being freed.
18443 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
18444
89371b20 184452005-05-08 Hollis Blanchard <hollis@penguinppc.org>
18446
18447 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
18448 `grub_ieee1275_chosen'.
18449
168d6e58 184502005-05-08 Hollis Blanchard <hollis@penguinppc.org>
18451
18452 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
18453 (grub_ieee1275_chosen): New variable.
18454 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
18455 `chosen'.
18456 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
18457 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
18458 Rename first argument to `phandle' for consistency.
18459 (grub_ieee1275_get_property_length): Likewise.
18460 (grub_ieee1275_next_property): Likewise. Change type of first argument
18461 to grub_ieee1275_phandle_t.
18462 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
18463 Move export next to declaration.
18464 (grub_ieee1275_chosen): New variable.
18465 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
18466 Correct cosmetic typo.
18467 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
18468 `grub_ieee1275_chosen'.
18469 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
18470 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
18471 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
18472 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
18473 `grub_ieee1275_chosen'.
18474
ca5baa3f 184752005-05-10 Hollis Blanchard <hollis@penguinppc.org>
18476
18477 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
18478 /chosen/bootargs.
18479 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
18480 /chosen/bootargs as "variable=value" pairs.
18481
708b345f 184822005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
18483
18484 * include/grub/misc.h (grub_dprintf): New macro.
18485 (grub_real_dprintf): New prototype.
18486 (grub_strword): Likewise.
18487 (grub_iswordseparator): Likewise.
18488 * kern/misc.c (grub_real_dprintf): New function.
18489 (grub_strword): Likewise.
18490 (grub_iswordseparator): Likewise.
18491
f4c5e67c 184922005-04-30 Hollis Blanchard <hollis@penguinppc.org>
18493
18494 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
18495 (roundup): Remove macro.
18496 (grub_ieee1275_flags): Make static.
18497 (grub_ieee1275_realmode): Remove.
18498 (grub_ieee1275_test_flag): New function.
18499 (grub_ieee1275_set_flag): Likewise.
18500 (find_options): Rename to `grub_ieee1275_find_options'; update
18501 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
18502 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
18503 (cmain): New prototype.
18504 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
18505 `grub_ieee1275_flags' directly.
18506 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
18507 machine/biosdisk.h.
18508 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
18509 Don't include grub/machine/init.h.
18510 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
18511 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
18512 Remove prototype.
18513 (grub_ieee1275_realmode): Likewise.
18514 (grub_ieee1275_flag): New enum.
18515 (grub_ieee1275_test_flag): New prototype.
18516 (grub_ieee1275_set_flag): New prototype.
18517 * include/grub/powerpc/ieee1275/init.h: Remove file.
18518 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
18519 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
18520 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
18521 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
18522 comment.
18523 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
18524 `grub_ieee1275_test_flag'.
18525 (grub_ieee1275_encode_devname): Likewise.
18526
ed16607e 185272005-04-21 Hollis Blanchard <hollis@penguinppc.org>
18528
18529 * include/grub/powerpc/ieee1275/ieee1275.h
18530 (grub_ieee1275_encode_devname): New prototype.
18531 (grub_ieee1275_get_filename): Likewise.
18532 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
18533 function.
18534 (grub_set_prefix): Likewise.
18535 (grub_machine_init): Call grub_set_prefix.
18536 * kern/powerpc/ieee1275/openfw.c: Fix typos.
18537 (grub_parse_type): New enum.
18538 (grub_ieee1275_get_devargs): New function.
18539 (grub_ieee1275_get_devname): Likewise.
18540 (grub_ieee1275_parse_args): Likewise.
18541 (grub_ieee1275_get_filename): Likewise.
18542 (grub_ieee1275_encode_devname): Likewise.
18543
be369920 185442005-03-30 Marco Gerards <metgerards@student.han.nl>
18545
18546 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
18547 `grub_loader_unset'.
18548
a5ce3a4a 185492005-03-26 Hollis Blanchard <hollis@penguinppc.org>
18550
18551 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
18552 instead of grub_ieee1275_interpret.
18553 (grub_halt_init): New function.
18554 (grub_halt_fini): Likewise.
18555 (GRUB_MOD_INIT): Correct message grammar.
18556 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
18557 instead of grub_ieee1275_interpret.
18558 (grub_reboot_init): New function.
18559 (grub_reboot_fini): Likewise.
18560 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
18561 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
18562 util/i386/pc/misc.c with commands/ieee1275/halt.c,
18563 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
18564 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
18565 function.
18566 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
18567 Add prototype.
18568 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
18569 prototype.
18570 (grub_halt): Likewise.
18571 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
18572 (cmain): Remove __attribute__((unused)).
18573 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
18574 (grub_heap_len): Likewise.
18575 (grub_machine_fini): New function.
18576 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
18577 (grub_halt): Likewise.
18578 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
18579 function.
18580 * util/powerpc/ieee1275/misc.c: New file.
18581
0058f771 185822005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
18583
18584 * DISTLIST: New file.
18585 * gendistlist.sh: Likewise.
f19dbdb7 18586
0058f771 18587 * Makefile.in (COMMON_DISTFILES): Removed.
18588 (BOOT_DISTFILES): Likewise.
18589 (CONF_DISTFILES): Likewise.
18590 (DISK_DISTFILES): Likewise.
18591 (FS_DISTFILES): Likewise.
18592 (INCLUDE_DISTFILES): Likewise.
18593 (KERN_DISTFILES): Likewise.
18594 (LOADER_DISTFILES): Likewise.
18595 (TERM_DISTFILES): Likewise.
18596 (UTIL_DISTFILES): Likewise.
18597 (DISTFILES): Likewise.
18598 (uninstall): Uninstall files in $(pkgdata_DATA).
18599 (DISTLIST): New target.
18600 (distdir): Use the contents of the file DISTLIST to get a list of
18601 distributed files.
18602
46b3b8a5 186032005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
18604
18605 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
18606 descriptor. This is ported from GRUB Legacy.
18607
18608 * gencmdlist.sh: Added an extra semicolon to make it work with
18609 old sed versions. Reported by Robert Bihlmeyer
18610 <robbe@orcus.priv.at>.
18611
5822ff87 186122005-03-08 Yoshinori Okuji <okuji@enbug.org>
18613
18614 Automatic loading of commands is supported.
f19dbdb7 18615
5822ff87 18616 * normal/main.c (read_command_list): New function.
18617 (grub_normal_execute): Call read_command_list.
18618
18619 * normal/command.c (grub_register_command): Return zero or CMD.
18620 Allocate CMD->NAME from the heap.
18621 Initialize CMD->MODULE_NAME to zero.
18622 Find the same name as well. If the same command is found and it is
18623 a dummy command, overwrite members. If it is not a dummy command,
18624 return zero.
18625 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
18626 (grub_command_find): If a dummy command is found, load a module
18627 and retry to find a command only once.
18628
18629 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
18630 make sure that each command is loaded.
18631
18632 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
18633 macro.
18634 (struct grub_command): Remove const from the member `name'.
18635 Add a new member `module_name'.
18636 (grub_register_command): Return grub_command_t.
18637
18638 * commands/help.c (grub_cmd_help): Call grub_command_find to make
18639 sure that each command is loaded.
18640
18641 * genmk.rb (PModule::rule): Specify a module name without the
18642 suffix ".mod" to gencmdlist.sh.
18643
7b1f4b57 186442005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
18645
18646 * gencmdlist.sh: New file.
f19dbdb7 18647
7b1f4b57 18648 * genmk.rb (PModule::rule): Generate a rule for a command list.
18649 Clean command.lst.
18650 Generate command.lst from $(COMMANDFILES).
18651
18652 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
18653 (DATA): Added $(pkgdata_DATA).
18654 (install-local): Install files in $(pkgdata_DATA).
18655
062aaf39 186562005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
18657
18658 * term/i386/pc/vga.c (debug_command): Removed.
18659 (GRUB_MOD_INIT): Do not register the command "debug".
18660
18661 From Hollis Blanchard:
18662 * commands/configfile.c: New file.
18663 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
18664 commands/configfile.c.
18665 (pkgdata_MODULES): Added configfile.mod.
18666 (configfile_mod_SOURCES): New variable.
18667 (configfile_mod_CFLAGS): Likewise.
18668 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
18669 commands/configfile.c.
18670 (pkgdata_MODULES): Added configfile.mod.
18671 (configfile_mod_SOURCES): New variable.
18672 (configfile_mod_CFLAGS): Likewise.
18673 * util/grub-emu.c (main): Call grub_configfile_init and
18674 grub_configfile_fini.
18675 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
18676 prototype.
18677 [GRUB_UTIL] (grub_configfile_fini): Likewise.
f19dbdb7 18678
cee01aa6 186792005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
18680
18681 * normal/arg.c (grub_arg_show_help): Do not show the bug report
18682 address.
18683
18684 * commands/help.c (grub_cmd_help): Do not print newlines after
18685 the last command in print_command_help.
18686
93f3a1d8 186872005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
18688
18689 * commands/default.h: New file.
18690 * commands/timeout.h: Likewise.
18691 * normal/context.c: Likewise.
f19dbdb7 18692
93f3a1d8 18693 * util/misc.c: Do not include sys/times.h.
18694 Include sys/time.h and grub/machine/time.h.
18695 (grub_get_rtc): Rewritten with gettimeofday.
18696
18697 * util/grub-emu.c (main): Call grub_default_init and
18698 grub_timeout_init before grub_normal_init, and call
18699 grub_timeout_fini and grub_default_fini after grub_main.
18700
18701 * util/console.c (grub_ncurses_checkkey): Return the read
18702 character or -1.
18703
18704 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
18705 timeouts.
18706
18707 * normal/main.c (read_config_file): Push MENU. If this fails,
18708 print an error and wait for a user input.
18709 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
18710 If a menu is empty or an error occurs, pop MENU.
18711 (grub_normal_execute): Pop and free MENU after grub_menu_run
18712 returns.
18713
18714 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
18715
18716 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
18717 include time.h.
18718 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
18719 without GRUB_UTIL.
18720 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
18721 time.h.
18722 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
18723 without GRUB_UTIL.
18724
18725 * include/grub/normal.h (struct grub_menu_list): New struct.
18726 (grub_menu_list_t): New type.
18727 (struct grub_context): New struct.
18728 (grub_context_t): New type.
18729 (grub_register_command): Got rid of EXPORT_FUNC.
18730 (grub_unregister_command): Likewise.
18731 (grub_context_get): New prototype.
18732 (grub_context_get_current_menu): Likewise.
18733 (grub_context_push_menu): Likewise.
18734 (grub_context_pop_menu): Likewise.
18735 [GRUB_UTIL] (grub_default_init): Likewise.
18736 [GRUB_UTIL] (grub_default_fini): Likewise.
18737 [GRUB_UTIL] (grub_timeout_init): Likewise.
18738 [GRUB_UTIL] (grub_timeout_fini): Likewise.
18739
18740 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
18741 commands/timeout.c and normal/context.c.
18742 (pkgdata_MODULES): Added default.mod and timeout.mod.
18743 (normal_mod_SOURCES): Added normal/context.c.
18744 (default_mod_SOURCES): New variable.
18745 (default_mod_CFLAGS): Likewise.
18746 (timeout_mod_SOURCES): Likewise.
18747 (timeout_mod_CFLAGS): Likewise.
18748 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
18749 conf/i386-pc.rmk.
18750 (pkgdata_MODULES): Added default.mod and timeout.mod.
18751 (normal_mod_SOURCES): Added normal/context.c.
18752 (default_mod_SOURCES): New variable.
18753 (default_mod_CFLAGS): Likewise.
18754 (timeout_mod_SOURCES): Likewise.
18755 (timeout_mod_CFLAGS): Likewise.
18756
18757 * Makefile.in (all-local): Added $(MKFILES).
18758
4ed2e1dd 187592005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
18760
18761 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
18762 (grub_emu_SOURCES): Likewise.
18763 (pkgdata_MODULES): Add `sun.mod'.
18764 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
18765 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
18766 `partmap/sun.c'.
18767 (pkgdata_MODULES): Add `sun.mod'.
18768 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
18769 * include/grub/partition.h (grub_sun_partition_map_init): New
18770 prototype.
18771 (grub_sun_partition_map_fini): Likewise.
18772 * partmap/sun.c: New file.
18773 * util/grub-emu.c (main): Initialize and de-initialize the sun
18774 partitionmap support.
18775
4d4e372e 187762005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
18777
18778 This implements an Emacs-like menu entry editor.
f19dbdb7 18779
4d4e372e 18780 * normal/menu_entry.c: New file.
f19dbdb7 18781
4d4e372e 18782 * util/console.c (grub_ncurses_putchar): Translate some Unicode
18783 characters to ASCII.
18784 (saved_char): New variable.
18785 (grub_ncurses_checkkey): Rewritten completely.
18786 (grub_ncurses_getkey): Likewise.
18787 (grub_ncurses_init): Call raw instead of cbreak.
18788
18789 * normal/menu.c (print_entry): Do not put a space.
18790 (init_page): Renamed to ...
18791 (grub_menu_init_page): ... this. All callers changed.
18792 (edit_menu_entry): Removed.
18793 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
18794
18795 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
18796
18797 * kern/misc.c (grub_vprintf): Call grub_refresh.
18798
18799 * normal/menu.c (DISP_LEFT): Renamed to ...
18800 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
18801 * normal/menu.c (DISP_UP): Renamed to ...
18802 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
18803 * normal/menu.c (DISP_RIGHT): Renamed to ...
18804 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
18805 * normal/menu.c (DISP_DOWN): Renamed to ...
18806 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
18807 * normal/menu.c (DISP_HLINE): Renamed to ...
18808 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
18809 * normal/menu.c (DISP_VLINE): Renamed to ...
18810 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
18811 * normal/menu.c (DISP_UL): Renamed to ...
18812 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
18813 * normal/menu.c (DISP_UR): Renamed to ...
18814 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
18815 * normal/menu.c (DISP_LL): Renamed to ...
18816 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
18817 * normal/menu.c (DISP_LR): Renamed to ...
18818 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
18819 * normal/menu.c (TERM_WIDTH): Renamed to ...
18820 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
18821 * normal/menu.c (TERM_HEIGHT): Renamed to ...
18822 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
18823 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
18824 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
18825 * normal/menu.c (TERM_MARGIN): Renamed to ...
18826 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
18827 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
18828 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
18829 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
18830 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
18831 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
18832 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
18833 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
18834 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
18835 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
18836 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
18837 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
18838 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
18839 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
18840 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
18841 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
18842 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
18843 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
18844 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
18845 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
18846 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
18847 All callers changed.
18848
18849 * include/grub/normal.h: New prototype.
18850
18851 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
18852 normal/menu_entry.c.
18853 (normal_mod_SOURCES): Likewise.
18854 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
18855 (normal_mod_SOURCES): Likewise.
18856
e6b92c8a 188572005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
18858
18859 * include/grub/normal.h (grub_halt_init): New prototype.
18860 (grub_halt_fini): Likewise.
18861 (grub_reboot_init): Likewise.
18862 (grub_reboot_fini): Likewise.
18863
18864 * util/grub-emu.c: Include signal.h.
18865 (main_env): New global variable.
18866 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
18867 catch C-c.
18868 (grub_machine_fini): New function.
18869 (main): Call grub_halt_init and grub_reboot_init before
18870 grub_main, and grub_reboot_fini and grub_halt_fini after it.
18871 Call setjmp with MAIN_ENV to go back afterwards.
18872 Call grub_machine_fini right before return.
18873
18874 * include/grub/util/misc.h: Include setjmp.h.
18875 (main_env): New prototype.
18876
18877 * include/grub/kernel.h (grub_machine_fini): New prototype.
18878 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
18879 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
18880
18881 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
18882 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
18883 * term/i386/pc/console.c (grub_console_fini): Likewise.
f19dbdb7 18884
e6b92c8a 18885 * util/i386/pc/misc.c: New file.
f19dbdb7 18886
e6b92c8a 18887 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
18888 util/i386/pc/misc.c, commands/i386/pc/halt.c and
18889 commands/i386/pc/reboot.c.
18890
c642636f 188912005-02-14 Guillem Jover <guillem@hadrons.org>
18892
18893 * include/grub/dl.h (grub_dl_check_header): New prototype.
18894 (grub_arch_dl_check_header): Change return type to grub_err_t,
18895 remove size parameter and export function. Update all callers.
18896 * kern/dl.c (grub_dl_check_header): New function.
18897 (grub_dl_load_core): Use `grub_dl_check_header' instead of
18898 `grub_arch_dl_check_header'. Check ELF type. Check if sections
18899 are inside the core.
18900 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
18901 independent ELF header checks.
18902 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
18903 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
18904 `grub_dl_check_header' instead of explicit checks. Check for the
18905 ELF type.
18906 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
18907 `grub_dl_check_header' instead of explicit checks. Remove arch
18908 specific ELF header checks.
18909
e6b92c8a 18910 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
18911 argument SIZE.
18912
5eabe94b 189132005-02-13 Hollis Blanchard <hollis@penguinppc.org>
18914
18915 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
18916 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
18917
1b14a681 189182005-02-12 Hollis Blanchard <hollis@penguinppc.org>
18919
18920 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
f19dbdb7 18921 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
1b14a681 18922 (part_map_iterate): Clear `grub_errno' and return 0 if
f19dbdb7 18923 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
1b14a681 18924 * partmap/amiga.c (amiga_partition_map_iterate): Return
18925 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
18926 * partmap/apple.c (apple_partition_map_iterate): Likewise.
18927
aca108aa 189282005-02-01 Guillem Jover <guillem@hadrons.org>
18929
18930 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
18931 help info.
18932
c9f9c556 189332005-01-31 Marco Gerards <metgerards@student.han.nl>
18934
18935 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
18936 Removed prototype.
18937 (grub_rescue_cmd_linux): New prototype.
18938 (grub_rescue_cmd_initrd): Likewise.
18939 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
18940 `bi_rec'.
18941 (grub_linux_release_mem): Release the memory for the initrd.
18942 (grub_load_linux): Renamed from this...
18943 (grub_rescue_cmd_linux): ...To this. Changed all callers.
18944 Changed `entry' not to be static. Loop over memory regions to
18945 find another one when the default fails.
18946 (grub_rescue_cmd_initrd): New function.
18947 (grub_linux_init): Remove function.
18948 (grub_linux_fini): Likewise.
18949 (GRUB_MOD_INIT): Register `initrd'.
18950 (GRUB_MOD_FINI): Unregister `initrd'.
18951 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
18952 Function removed.
18953 (grub_linux_normal_fini): Likewise.
18954 (GRUB_MOD_INIT): Register `initrd'.
18955 (GRUB_MOD_FINI): Unregister `initrd'.
18956
990cf3aa 189572005-01-31 Marco Gerards <metgerards@student.han.nl>
18958
18959 * commands/help.c: New file.
18960 * normal/arg.c (show_help): Renamed to...
18961 (grub_arg_show_help): ... this.
18962 * commands/i386/pc/halt.c: New file.
18963 * commands/i386/pc/reboot.c: Likewise.
18964 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
18965 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
18966 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
18967 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
18968 variables.
18969 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
18970 `commands/help.c'.
18971 (pkgdata_MODULES): Add `help.mod'.
18972 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
18973 * grub/i386/pc/init.h (grub_reboot): New prototype.
18974 (grub_halt): Likewise.
18975 * include/grub/normal.h (grub_arg_show_help): New prototype.
18976 (grub_help_init): Likewise.
18977 (grub_help_fini): Likewise.
18978 * util/grub-emu.c (main): Initialize and deinitialize the help
18979 command.
18980
18981 * normal/cmdline.c (grub_cmdline_get): Doc fix.
18982
18983 * normal/command.c (grub_command_init): Fixed the description of
18984 the `set' and `unset' commands.
18985
189862005-01-31 Marco Gerards <metgerards@student.han.nl>
0f79cdc1 18987
18988 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
18989 function.
18990 * commands/ieee1275/halt.c: New file.
18991 * commands/ieee1275/reboot.c: Likewise.
18992 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
18993 `__attribute__ ((unused))'. Some GCS related fixed.
18994 (grub_suspend_init) [GRUB_UTIL]: Function removed.
18995 (grub_suspend_fini): Likewise.
18996 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
18997 and `halt.mod'.
18998 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
18999 (halt_mod_CFLAGS): New variables.
19000 * include/grub/powerpc/ieee1275/ieee1275.h
19001 (grub_ieee1275_interpret): New prototype.
19002
1ab09cc7 190032005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
19004
19005 * include/grub/misc.h (memmove): New prototype.
19006 (memcpy): Likewise.
19007
8b8cbdb2 190082005-01-22 Hollis Blanchard <hollis@penguinppc.org>
19009
19010 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
19011 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
19012
e3741a27 190132005-01-22 Marco Gerards <metgerards@student.han.nl>
19014
19015 * kern/misc.c (grub_strndup): Function rewritten.
19016
776bd780 190172005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
19018
19019 * normal/menu.c (TERM_WIDTH): Macro redefined.
19020 (TERM_TOP_BORDER_Y): Likewise.
19021 (draw_border): Replaced while-loop by a for-loop. Make the number
19022 of lines consistent with the number of lines displayed in
19023 print_entries. Added a margin below the rectangle.
19024 (print_entry): Make the entry fit in the rectangle.
19025 (print_entries): Display the scroll arrows next to the right
19026 border.
19027
78026bce 190282005-01-21 Marco Gerards <metgerards@student.han.nl>
19029
19030 * fs/minix.c (grub_minix_find_file): Reserve more space for
19031 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
19032 `grub_strncpy' to copy `path' into it.
19033
67bbaf0f 190342005-01-21 Marco Gerards <metgerards@student.han.nl>
19035
19036 Add the loopback device, a device via which files can be accessed
19037 as devices.
f19dbdb7 19038
67bbaf0f 19039 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
19040 (pkgdata_MODULES): Add loopback.mod.
19041 (loopback_mod_SOURCES): New variable.
19042 (loopback_mod_CFLAGS): Likewise.
19043 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
19044 `disk/loopback.c'.
19045 (pkgdata_MODULES): Add loopback.mod.
19046 (loopback_mod_SOURCES): New variable.
19047 (loopback_mod_CFLAGS): Likewise.
19048 * disk/loopback.c: new file.
19049 * include/grub/normal.h (grub_loop_init): New prototype.
19050 (grub_loop_fini): New prototype.
19051 * util/grub-emu.c (main): Initialize and de-initialize loopback
19052 support.
19053 * include/grub/disk.h (grub_disk_dev_id): Add
19054 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
19055
6f1c18bd 190562005-01-20 Hollis Blanchard <hollis@penguinppc.org>
19057
19058 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
19059 function.
19060 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
19061 (suspend_mod_SOURCES): New variable.
19062 (suspend_mod_CFLAGS): Likewise.
19063 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
19064 New prototype.
19065 * commands/ieee1275/suspend.c: New file.
19066
b38551da 190672005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
19068
19069 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
f19dbdb7 19070 ((unused))' to `__attribute__ ((used))'.
b38551da 19071 (GRUB_MOD_FINI): Likewise.
19072 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
19073 * genmk.rb (PModule): Assign space to common symbols when linking
19074 modules.
19075
777aff39 190762005-01-20 Marco Gerards <metgerards@student.han.nl>
19077
19078 * include/grub/mm.h (grub_mm_init_region): Change the type of the
19079 `unsigned' arguments to `grub_size_t'.
19080 (grub_malloc): Likewise.
19081 (grub_realloc): Likewise.
19082 (grub_memalign): Likewise.
19083 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
19084 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
19085 * util/misc.c (grub_malloc): Likewise.
19086 (grub_realloc): Likewise.
19087 * kern/mm.c (get_header_from_pointer): Change the casts to
19088 `unsigned' into a cast to `grub_size_t'.
19089
19090 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
19091 point to `currnode' when `currnode' is changed.
19092
19093 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
19094 Schottelius <nico-linux@schottelius.org>.
19095
d0ff18e1 190962005-01-09 Hollis Blanchard <hollis@penguinppc.org>
19097
19098 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
19099 (note_path): Remove variable.
19100 (GRUB_IEEE1275_NOTE_NAME): New macro.
19101 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
19102 (grub_ieee1275_note_hdr): New structure.
19103 (grub_ieee1275_note_desc): Likewise.
19104 (grub_ieee1275_note): Likewise.
19105 (load_note): Remove `dir' argument. All callers updated. Remove
19106 `note_img' and `path'. Do not load a file from `note_path'.
19107 Initialize a struct grub_ieee1275_note and write that to `out'.
19108 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
19109
4ca7004c 191102005-01-05 Marco Gerards <metgerards@student.han.nl>
19111
19112 * util/misc.c (grub_util_read_image): Revert last change. It
19113 called `grub_util_read_at', which seeks from the beginning of the
19114 file.
19115
0b412211 191162005-01-04 Hollis Blanchard <hollis@penguinppc.org>
19117
19118 * TODO: Add note about endianness in grub-mkimage.
19119 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
19120 section.
19121 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
19122 (grub_mkimage_SOURCES): New target.
19123 * include/grub/kernel.h (grub_start_addr): Remove variable.
19124 (grub_end_addr): Likewise.
19125 (grub_total_module_size): Likewise.
19126 (grub_kernel_image_size): Likewise.
19127 (GRUB_MODULE_MAGIC): New constant.
19128 (grub_module_info): New structure.
19129 (grub_arch_modules_addr): New prototype.
19130 (grub_get_end_addr): Remove prototype.
19131 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
19132 * include/grub/powerpc/ieee1275/kernel.h: New file.
19133 * include/grub/util/misc.h (grub_util_get_fp_size): New
19134 prototype.
19135 (grub_util_read_at): Likewise.
19136 (grub_util_write_image_at): Likewise.
19137 * kern/main.c (grub_get_end_addr): Remove function.
19138 (grub_load_modules): Call grub_arch_modules_addr instead of using
19139 grub_end_addr. Look for a grub_module_info struct in memory. Use
19140 the grub_module_info fields instead of calling grub_get_end_addr
19141 as loop conditions. Move grub_add_unused_region code here.
19142 (grub_add_unused_region): Remove function.
19143 * kern/i386/pc/init.c: Include grub/cache.h.
19144 (grub_machine_init): Remove call to grub_get_end_addr. Remove
19145 one call to add_mem_region.
19146 (grub_arch_modules_addr): New function.
19147 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
19148 (grub_total_module_size): Likewise.
19149 Include grub/machine/kernel.h.
19150 (grub_arch_modules_addr): New function.
19151 * util/grub-emu.c (grub_end_addr): Remove variable.
19152 (grub_total_module_size): Likewise.
19153 (grub_arch_modules_addr): New function.
19154 * util/misc.c: Include unistd.h.
19155 (grub_util_get_fp_size): New function.
19156 (grub_util_read_at): Likewise.
19157 (grub_util_write_image_at): Likewise.
19158 (grub_util_read_image): Call grub_util_read_at.
19159 (grub_util_write_image): Call grub_util_write_image_at.
19160 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
19161 additional memory in kernel_img for a struct grub_module_info.
19162 Fill in that grub_module_info.
19163 * util/powerpc/ieee1275/grub-mkimage.c: New file.
19164
458786f8 191652005-01-03 Hollis Blanchard <hollis@penguinppc.org>
19166
19167 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
19168 New function.
19169 * include/grub/powerpc/ieee1275/ieee1275.h
19170 (grub_ieee1275_milliseconds): New prototype.
19171 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
19172 Change to 1000.
19173 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
19174 grub_ieee1275_milliseconds.
19175
ac507d1b 191762005-01-03 Hollis Blanchard <hollis@penguinppc.org>
19177
19178 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
19179 variable.
19180 (find_options): New function.
19181 (cmain): Call find_options.
19182 * include/grub/powerpc/ieee1275/ieee1275.h
19183 (grub_ieee1275_realmode): New extern variable.
19184 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
19185 grub_map if grub_ieee1275_realmode is false.
19186
6b8fd1c4 191872004-12-29 Marco Gerards <metgerards@student.han.nl>
19188
19189 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
19190 lines are inserted and make it work like readline. Reported by
19191 Vincent Pelletier <subdino2004@yahoo.fr>.
19192
8514a1e0 191932004-12-28 Marco Gerards <metgerards@student.han.nl>
19194
19195 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
19196
19197 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
19198 `kern/powerpc/cache.S'.
19199
924b6140 192002004-12-27 Marco Gerards <metgerards@student.han.nl>
19201
19202 * genmk.rb: Handle the `Program' class in the main loop. Written
19203 by Johan Rydberg <jrydberg@gnu.org>.
19204 (Program): New class.
19205 (programs): New variable.
19206 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
19207 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
19208 instead of "grub/kernel.h". Include <grub/machine/init.h>.
19209 (help_arch): Function removed.
19210 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
19211 `powerpc/libgcc.h' and `loader.h'.
19212 (pkgdata_PROGRAMS): New variable.
19213 (sbin_UTILITIES): Variable removed.
19214 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
19215 (grubof_SOURCES): Variable re-defined so it only includes the
19216 core functionality.
19217 (grubof_CFLAGS): Remove `-DGRUBOF'.
19218 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
19219 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
19220 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
19221 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
19222 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
19223 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
19224 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
19225 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
19226 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
19227 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
19228 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
19229 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
19230 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
19231 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
19232 (pc_mod_CFLAGS): New variables.
19233 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
19234 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
19235 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
19236 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
19237 Moved from here...
19238 * include/grub/i386/pc/init.h (grub_os_area_addr)
19239 (rub_os_area_size): ... to here.
19240 * include/grub/powerpc/ieee1275/ieee1275.h
19241 (grub_ieee1275_entry_fn): Export symbol.
19242 * include/grub/powerpc/ieee1275/init.h: New file.
19243 * include/grub/powerpc/libgcc.h: Likewise.
19244 * include/grub/cache.h: Likewise.
19245 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
19246 <hollis@penguinppc.org>.
19247 * kern/dl.c: Include <grub/cache.h>.
19248 (grub_dl_flush_cache): New function.
19249 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
19250 for this module.
19251 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
19252 (grub_console_init): Removed prototypes.
19253 (grub_machine_init): Don't initialize the modules anymore.
19254 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
19255 static.
19256 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
19257 Macro undef removed.
19258 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
19259 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
19260 relocation `R_PPC_REL32'. Return an error when the relocation is
19261 unknown.
19262 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
19263 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
19264 * util/misc.c (grub_arch_sync_caches): Likewise.
19265
e4b47e0c 192662004-12-19 Marco Gerards <metgerards@student.han.nl>
19267
19268 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
19269 `symlist.c', add `grubof_symlist.c'.
19270 (symlist.c): Variable removed.
19271 (grubof_HEADERS): Variable added.
19272 (grubof_symlist.c): New target.
19273 (kernel_syms.lst): Use `grubof_HEADERS' instead of
19274 `kernel_img_HEADERS'.
19275 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
19276 * kern/powerpc/dl.c: New file.
19277 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
19278 Function removed.
19279 (grub_arch_dl_relocate_symbols): Likewise.
19280 (grub_register_exported_symbols): Likewise.
19281
4ceb3636 192822004-12-13 Marco Gerards <metgerards@student.han.nl>
19283
19284 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
19285 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
19286 to fail instead. Reported by Vincent Pelletier
19287 <subdino2004@yahoo.fr>.
19288
19289 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
19290 it is not allocated. Reported by Vincent Pelletier
19291 <subdino2004@yahoo.fr>.
19292
19293 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
19294 output so the output looks better.
f19dbdb7 19295
3f1578fe 192962004-12-04 Marco Gerards <metgerards@student.han.nl>
19297
19298 Modulize the partition map support and add support for the amiga
19299 partition map.
f19dbdb7 19300
3f1578fe 19301 * commands/ls.c: Include <grub/partition.h> instead of
19302 <grub/machine/partition.h>.
19303 * kern/disk.c: Likewise.
19304 * kern/rescue.c: Likewise.
19305 * loader/i386/pc/chainloader.c: Likewise.
19306 * normal/cmdline.c: Likewise.
19307 * kern/powerpc/ieee1275/init.c: Likewise.
19308 (grub_machine_init): Call `grub_pc_partition_map_init',
19309 `grub_amiga_partition_map_init' and
19310 `grub_apple_partition_map_init'.
19311 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
19312 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
19313 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
19314 `partition.h' and `pc_partition.h'.
19315 (grub_setup_SOURCES): Remove
19316 `disk/i386/pc/partition.c'. Add `kern/partition.c',
19317 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
19318 (grub_emu_SOURCES): Likewise.
19319 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
19320 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
19321 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
19322 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
19323 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
19324 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
19325 (grubof_SOURCES): Likewise.
19326 * disk/i386/pc/partition.c: File removed.
19327 * disk/powerpc/ieee1275/partition.c: Likewise.
19328 * include/grub/powerpc/ieee1275/partition.h: Likewise.
19329 * include/grub/i386/pc/partition.h: Likewise.
19330 * kern/partition.c: New file.
19331 * partmap/amiga.c: Likewise.
19332 * partmap/apple.c: Likewise.
19333 * partmap/pc.c: Likewise.
19334 * include/grub/partition.h: Likewise..
19335 * include/grub/pc_partition.h: Likewise.
19336 * util/grub-emu.c: Include <grub/partition.h> instead of
19337 <grub/machine/partition.h>.
19338 (main): Call `grub_pc_partition_map_init',
19339 `grub_amiga_partition_map_init' and
19340 `grub_apple_partition_map_init' and deinitialize afterwards.
19341 * util/i386/pc/biosdisk.c: Include `#include
19342 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
19343 `<grub/machine/partition.h>'.
19344 * util/i386/pc/grub-setup.c: Likewise.
19345 * util/i386/pc/biosdisk.c: Likewise.
19346 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
19347 partition information in case of a PC partition.
19348 * util/i386/pc/grub-setup.c: Include `#include
19349 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
19350 `<grub/machine/partition.h>'.
19351 (setup): Only access the PC specific partition information in case
19352 of a PC partition.
19353
0ef4ced9 193542004-11-17 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 19355
0ef4ced9 19356 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
19357 (grub_longjmp): Likewise.
19358 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
19359 20.
19360 * normal/powerpc/setjmp.S: New file.
19361 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
19362 `normal/powerpc/setjmp.S'.
19363 (grubof_CFLAGS): Add `-DGRUBOF'.
19364 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
19365 [GRUB_UTIL && !GRUBOF].
f19dbdb7 19366
19950e29 193672004-11-16 Marco Gerards <metgerards@student.han.nl>
19368
19369 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
19370 property named `name'. Correctly handle the error returned by
19371 `grub_ieee1275_finddevice' if a device can not be opened.
19372
a2fea427 193732004-11-02 Hollis Blanchard <hollis@penguinppc.org>
19374
19375 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
19376 `actual' for negativity.
19377 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
19378 kern/fshelp.c.
19379
41ea0ea3 193802004-11-01 Marco Gerards <metgerards@student.han.nl>
19381
19382 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
19383 (PAGE_OFFSET): New macro.
19384 (CRTC_ADDR_PORT): Likewise.
19385 (CRTC_DATA_PORT): Likewise.
19386 (START_ADDR_HIGH_REGISTER): Likewise.
19387 (START_ADDR_LOW_REGISTER): Likewise.
19388 (GRAPHICS_ADDR_PORT): Likewise.
19389 (GRAPHICS_DATA_PORT): Likewise.
19390 (READ_MAP_REGISTER): Likewise.
19391 (INPUT_STATUS1_REGISTER): Likewise.
19392 (INPUT_STATUS1_VERTR_BIT): Likewise.
19393 (page): New variable.
19394 (wait_vretrace): New function.
19395 (set_read_map): Likewise.
19396 (set_start_address): Likewise.
19397 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
19398 the right page.
19399 (check_vga_mem): Take the page into account.
19400 (write_char): Likewise.
19401 (write_cursor): Likewise.
19402 (scroll_up): Likewise. Copy the page to the page that is not
19403 shown and switch between both pages.
19404 (grub_vga_putchar): Fix off by one error.
19405 (grub_vga_cls): Wait for the vertical retrace. Take the page into
19406 account.
19407
ad0bd20b 194082004-11-01 Marco Gerards <metgerards@student.han.nl>
19409
19410 Add support for iso9660 (including rockridge).
f19dbdb7 19411
ad0bd20b 19412 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
19413 (iso9660_mod_SOURCES): New variable.
19414 (iso9660_mod_CFLAGS): Likewise.
19415 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
19416 * include/grub/fs.h (grub_iso9660_init): New prototype.
19417 * util/grub-emu.c (main): Call `grub_iso9660_init'.
19418 * fs/iso9660.c: New file.
19419
19420 * include/grub/misc.h (grub_strncat): New prototype.
19421 * kern/misc.c (grub_strncat): New function.
f19dbdb7 19422
ad0bd20b 19423 * fs/hfs.c (grub_hfs_mount): Translate the error
19424 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
19425 * fs/jfs.c (grub_jfs_mount): Likewise.
19426 * fs/ufs.c (grub_ufs_mount): Likewise.
19427
a5477a59 194282004-10-28 Hollis Blanchard <hollis@penguinppc.org>
19429
19430 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
19431 which initialized BAT registers.
19432 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
19433 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
19434 Move from here...
19435 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
19436 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
19437 ... to here.
19438 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
19439 (grub_mapclaim): Likewise.
19440 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
19441 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
19442 hand.
19443
9304c1f8 194442004-10-19 Hollis Blanchard <hollis@penguinppc.org>
19445
19446 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
19447 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
19448 -ffreestanding and -msoft-float.
19449
86f4ae25 194502004-10-15 Hollis Blanchard <hollis@penguinppc.org>
19451
19452 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
19453 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
19454 set in grub_ieee1275_flags.
19455
38912228 194562004-10-14 Hollis Blanchard <hollis@penguinppc.org>
19457
19458 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
19459 prototype.
19460 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
19461 grub_console_init first.
19462 Change the memory range used for grub_ieee1275_claim and
19463 grub_mm_init_region.
19464 Print an error message if the claim fails.
19465 Include <grub/misc.h>.
19466
d1923dc8 194672004-10-13 Hollis Blanchard <hollis@penguinppc.org>
19468
19469 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
19470 Call grub_children_iterate for device nodes of type `scsi',
19471 `ide', or `ata'.
19472 (grub_ofdisk_open): Remove manual device alias resolution.
19473 Fix memory leak when device cannot be opened.
f19dbdb7 19474 * include/grub/powerpc/ieee1275/ieee1275.h
d1923dc8 19475 (grub_children_iterate): New prototype.
19476 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
19477 New function.
19478 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
19479 Return -1 if args.size was -1.
19480
4512e4f3 194812004-10-11 Hollis Blanchard <hollis@penguinppc.org>
19482
19483 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
19484 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
19485 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
19486 Open Firmware's memory for it; claim memory from _start to _end.
19487 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
19488 (_end): New extern.
19489 (_start): Zero BSS from __bss_start to _end.
19490 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
19491 New extern.
19492 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
19493
4d61feb0 194942004-10-11 Hollis Blanchard <hollis@penguinppc.org>
19495
ad0bd20b 19496 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
19497 -1 if args.base was -1.
4d61feb0 19498
026fa2f9 194992004-10-08 Hollis Blanchard <hollis@penguinppc.org>
19500
19501 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
19502 escape sequence instead of a literal ^L. Also call
19503 grub_ofconsole_gotoxy.
19504
9f2220ef 195052004-10-03 Hollis Blanchard <hollis@penguinppc.org>
19506
19507 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
19508 void * arguments to grub_addr_t. All callers updated. Also make
19509 the `result' argument optional.
19510 (grub_ieee1275_release): change void * arguments to grub_addr_t.
19511 All callers updated.
19512
8a572cd7 195132004-09-22 Hollis Blanchard <hollis@penguinppc.org>
19514
19515 * commands/ls.c (grub_ls_list_files): Use the string following the
19516 initial ')', if present, as the filesystem path.
19517 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
19518
19519 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
19520
18aa81f2 195212004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
19522
19523 Make the source code of the menu interface more readable.
f19dbdb7 19524
18aa81f2 19525 * normal/menu.c: Include grub/mm.h.
19526 (TERM_WIDTH): New macro.
19527 (TERM_HEIGHT): Likewise.
19528 (TERM_INFO_HEIGHT): Likewise.
19529 (TERM_MARGIN): Likewise.
19530 (TERM_SCROLL_WIDTH): Likewise.
19531 (TERM_TOP_BORDER_Y): Likewise.
19532 (TERM_LEFT_BORDER_X): Likewise.
19533 (TERM_BORDER_WIDTH): Likewise.
19534 (TERM_MESSAGE_HEIGHT): Likewise.
19535 (TERM_BORDER_HEIGHT): Likewise.
19536 (TERM_NUM_ENTRIES): Likewise.
19537 (TERM_FIRST_ENTRY_Y): Likewise.
19538 (TERM_ENTRY_WIDTH): Likewise.
19539 (TERM_CURSOR_X): Likewise.
19540 (draw_border): Use macros instead of magic numbers.
19541 (print_entry): Likewise.
19542 (print_entries): Likewise.
19543 (run_menu): Likewise. Also, handle the key 'e'.
19544 (run_menu_entry): Ignore empty command lines.
19545 (print_message): Added a new argument EDIT. If EDIT is true,
19546 print a different message.
19547 (init_page): Likewise.
19548 (edit_menu_entry): New function. Not implemented yet.
19549
b47efe30 195502004-09-17 Marco Gerards <metgerards@student.han.nl>
19551
19552 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
19553 can be loaded from normal mode.
f19dbdb7 19554
b47efe30 19555 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
19556 `multiboot.mod'.
19557 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
19558 (multiboot_mod_CFLAGS): New variables.
19559 * loader/i386/pc/linux_normal.c: New file.
f19dbdb7 19560 * loader/i386/pc/multiboot_normal.c: Likewise.
19561
b47efe30 19562 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
19563 attribute `unused'.
f19dbdb7 19564
b47efe30 19565 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
19566 `fdiro' to read the mode information from instead of `diro'.
19567
19568 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
19569 looking up a symlink.
19570
19571 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
19572 macro.
19573 * normal/command.c (grub_command_execute): Don't parse the
19574 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
19575 flags of the command.
19576
19577 * normal/menu.c (grub_menu_run): Fix typo.
19578
da75ac71 195792004-09-14 Hollis Blanchard <hollis@penguinppc.org>
19580
19581 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
19582
19583 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
19584 `y + 1' instead of `y - 1'.
19585
19586 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
f19dbdb7 19587
062b24c2 195882004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
19589
19590 From Hollis Blanchard <hollis@penguinppc.org>:
19591 * kern/misc.c (memmove): New alias for grub_memmove.
19592 (memcmp): New alias for grub_memcmp.
19593 (memset): New alias for grub_memset.
f19dbdb7 19594 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
062b24c2 19595 Change "int handle" to "grub_ieee1275_phandle_t handle".
f19dbdb7 19596 * include/grub/powerpc/ieee1275/ieee1275.h
062b24c2 19597 (grub_ieee1275_get_property): Likewise.
f19dbdb7 19598
8ddad845 195992004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
19600
19601 Added normal mode command `chainloader' as module chain.mod, which
19602 depends on normal.mod and _chain.mod.
f19dbdb7 19603
8ddad845 19604 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
19605 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
19606 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
19607 Deleted prototype.
19608 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
19609 but arguments parsing moved to ...
19610 (grub_chainloader_cmd): ... here. New function.
19611 * include/grub/i386/pc/chainloader.h: New file.
19612 * loader/i386/pc/chainloader_normal.c: Likewise.
19613
2c1f4ce3 196142004-09-11 Marco Gerards <metgerards@student.han.nl>
19615
19616 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
19617 (grub_mkimage_LDFLAGS): Likewise.
19618 (grub_emu_SOURCES): Likewise.
19619 (kernel_img_HEADERS): Added fshelp.h.
19620 * fs/ext2.c: Include <grub/fshelp.h>.
19621 (FILETYPE_REG): New macro.
19622 (FILETYPE_INO_REG): Likewise.
19623 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
19624 Changed all users.
19625 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
19626 all users.
19627 (grub_fshelp_node): New struct.
19628 (grub_ext2_data): Added member `diropen'. Changed member `inode'
19629 to a pointer.
19630 (grub_ext2_get_file_block): Removed function.
19631 (grub_ext2_read_block): New function.
19632 (grub_ext2_read_file): Replaced parameter `data' by `node'.
19633 This function was written.
19634 (grub_ext2_mount): Read the root inode. Create a diropen struct.
19635 (grub_ext2_find_file): Removed function.
19636 (grub_ext2_read_symlink): New function.
19637 (grub_ext2_iterate_dir): Likewise.
19638 (grub_ext2_open): Rewritten.
19639 (grub_ext2_dir): Rewritten.
19640 * include/grub/fshelp.h: New file.
19641 * fs/fshelp.c: Likewise.
19642
3c52136a 196432004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
19644
19645 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
19646 (print_message): Add a missing newline.
19647 (run_menu): Added timeout support.
19648 (run_menu_entry): New local function.
19649 (grub_menu_run): Added support for booting.
19650
19651 * kern/loader.c (grub_loader_is_loaded): New function.
19652
19653 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
19654 (grub_get_rtc): Exported.
19655
19656 * include/grub/i386/pc/time.h: Include grub/symbol.h.
19657 (grub_get_rtc): Exported.
19658
19659 * include/grub/normal.h (struct grub_command_list): Remove
19660 constant from the member `command'.
19661
19662 * include/grub/loader.h (grub_loader_is_loaded): Declared.
19663
19664 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
19665
19666 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
19667
aa033560 196682004-08-28 Marco Gerards <metgerards@student.han.nl>
19669
19670 Add support for the JFS filesystem.
19671
19672 * fs/jfs.c: New file.
19673 * include/grub/fs.h (grub_jfs_init): New prototype.
19674 (grub_jfs_fini): New prototype.
19675 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
19676 (grub_emu_SOURCES): Likewise.
19677 (pkgdata_MODULES): Add jfs.mod.
19678 (jfs_mod_SOURCES): New variable.
19679 (jfs_mod_CFLAGS): Likewise.
19680 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
19681 (grubof_SOURCES): Likewise.
19682 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
19683
19684 * fs/fat.c (grub_fat_find_dir): Convert the filename little
19685 endian to the host endian.
19686 (grub_fat_utf16_to_utf8): Move function from there...
19687 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
fe987087 19688 the endianness of the source string anymore.
aa033560 19689 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
19690
94bc45af 196912004-08-24 Marco Gerards <metgerards@student.han.nl>
19692
19693 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
19694 (grub_boot_fini) [GRUB_UTIL]: Likewise.
19695 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
19696 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
f19dbdb7 19697
94bc45af 19698 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
19699 (grub_hfs_iterate_dir): Make the function static. Add prototypes
19700 for `node_found' and `it_dir'.
19701 (grub_hfs_dir): Add prototype for `dir_hook'.
19702
19703 * fs/minix.c (grub_minix_get_file_block): Add prototype for
19704 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
19705 and `indir32' to silence a gcc warning.
19706
19707 * include/grub/fs.h (grub_hfs_init): New prototype.
19708 (grub_hfs_fini): Likewise.
f19dbdb7 19709
19710
97543f08 197112004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
19712
19713 Each disk device has its own id now. This is useful to make use
19714 of multiple disk devices.
f19dbdb7 19715
97543f08 19716 * include/grub/disk.h (grub_disk_dev_id): New enum.
19717 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
19718 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
19719
19720 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
19721 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
19722
19723 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
19724 GRUB_DISK_DEVICE_OFDISK_ID as an id.
19725
19726 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
19727 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
19728
19729 * include/grub/disk.h (struct grub_disk_dev): Added a new member
19730 "id" which is used by the cache manager.
19731
19732 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
19733 of just "GRUB".
19734
64372eb4 197352004-08-18 Marco Gerards <metgerards@student.han.nl>
19736
19737 * fs/hfs.c: New file.
19738 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
19739 (grub_emu_SOURCES): Likewise.
19740 (pkgdata_MODULES): Add hfs.mod.
19741 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
19742 (grubof_SOURCES): Likewise.
19743 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
19744
19745 * include/grub/misc.h (grub_strncasecmp): Add prototype.
19746 * kern/misc.c (grub_strncasecmp): Add function.
19747
cc61b58f 197482004-08-14 Marco Gerards <metgerards@student.han.nl>
19749
19750 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
19751 with parentheses.
19752
19753 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
19754 (grub_ext2_dir): In case the directory entry type is unknown, read
19755 it from the inode.
19756
0ef123f6 197572004-08-02 Peter Bruin <pjbruin@dds.nl>
19758
19759 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
19760 grub_load_linux instead of grub_rescue_cmd_linux as second
19761 argument of grub_rescue_register_command.
19762
19763 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
19764
a447c5df 197652004-07-27 Marco Gerards <metgerards@student.han.nl>
19766
19767 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
19768 function.
19769 * commands/boot.c: Remove the check for `GRUB_UTIL'.
19770 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
19771 `loader/powerpc/ieee1275/linux.c',
19772 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
19773 * include/grub/powerpc/ieee1275/ieee1275.h
19774 (grub_ieee1275_release): New prototype.
19775 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
19776 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
19777 normal, boot, linux and linux_normal.
19778 * loader/powerpc/ieee1275/linux.c: New file.
19779 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
19780
5a9e3546 197812004-07-12 Marco Gerards <metgerards@student.han.nl>
19782
19783 * normal/arg.c (grub_arg_parse): Correct error handling after
19784 reallocating the argumentlist (check if `argl' is not null instead
19785 of checking if `args' is not null).
19786 * kern/mm.c (grub_realloc): Return the same pointer when using the
19787 same region, instead of returning the header address.
19788
e15199cb 197892004-07-11 Marco Gerards <metgerards@student.han.nl>
19790
19791 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
19792 one block instead of two when looking for the initial partition.
19793 (grub_partition_probe): Initialize the local variable `p' with 0.
19794 Use base 10 for the grub_strtoul call.
19795 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
19796 need for one local variable.
19797 (grub_strtoul): Don't add the new value to `num', instead of that
19798 just assign it.
19799
020616c2 198002004-07-11 Marco Gerards <metgerards@student.han.nl>
19801
19802 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
19803 (pxeboot_img_SOURCES): New variable.
19804 (pxeboot_img_ASFLAGS): Likewise.
19805 (pxeboot_img_LDFLAGS): Likewise.
19806 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
19807 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
19808 <lode_leroy@hotmail.com>.
19809
6c51eb64 198102004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
19811
19812 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
19813 there was no input.
19814
cfb12aff 198152004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
19816
19817 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
19818 the history buffer logic.
19819
6eabba74 198202004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
19821
19822 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
19823 (FILETYPE_INO_SYMLINK): New macros.
19824 (grub_ext2_find_file): Check if the node is a directory using the
19825 inode stat information instead of using the filetype in the
19826 dirent. Exclude the first character of an absolute symlink.
19827 (grub_ext2_dir): Mask out the filetype part of the mode member of
19828 the inode.
19829
66e19ef8 198302004-05-24 Marco Gerards <metgerards@student.han.nl>
19831
19832 Add support for UFS version 1 and 2. Add support for the minix
19833 filesystem version 1 and 2, both the variants with 14 and 30 long
19834 filenames.
f19dbdb7 19835
66e19ef8 19836 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
19837 fs/minix.c.
19838 (grub_emu_SOURCES): Likewise.
19839 (pkgdata_MODULES): Add ufs.mod and minix.mod.
19840 (ufs_mod_SOURCES): New variable.
19841 (ufs_mod_CFLAGS): Likewise.
19842 (minix_mod_SOURCES): Likewise.
19843 (minix_mod_CFLAGS): Likewise.
19844 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
19845 fs/minix.c.
19846 (grubof_SOURCES): Likewise.
19847 * fs/ufs.c: New file.
19848 * fs/minix.c: New file.
19849 * include/grub/fs.h (grub_ufs_init): New prototype.
19850 (grub_ufs_fini): Likewise.
19851 (grub_minix_init): Likewise.
19852 (grub_minix_fini): Likewise.
19853 * util/grub-emu.c (main): Initialize and deinitialize UFS and
19854 minix fs.
19855
cc2e748a 198562004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
19857
19858 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
19859 commands/ls.c, commands/terminal.c, commands/boot.c,
19860 commands/cmp.c and commands/cat.c.
19861 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
19862
19863 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
19864 "env.h"
19865
4b13b216 198662004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
19867
19868 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
19869 and grub_, respectively. Because the conversion is trivial and
19870 mechanical, I omit the details here. Please refer to the CVS
19871 if you need more information.
19872
6a142551 198732004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
19874
19875 * include/pupa: Renamed to ...
19876 * include/grub: ... this.
19877 * util/i386/pc/pupa-mkimage.c: Renamed to ...
19878 * util/i386/pc/grub-mkimage.c: ... this.
19879 * util/i386/pc/pupa-setup.c: Renamed to ...
19880 * util/i386/pc/grub-setup.c: ... this.
19881 * util/pupa-emu.c: Renamed to ...
19882 * util/grub-emu.c: ... this.
19883
e56cdf21 198842004-03-29 Marco Gerards <metgerards@student.han.nl>
19885
19886 Add support for the newworld apple macintosh (PPC). This has been
19887 tested on the powerbook 2000 only. It only adds support for
19888 generic ieee1275 functions, console and disk support. This should
19889 be easy to port to other architectures with support for Open
19890 Firmware.
f19dbdb7 19891
e56cdf21 19892 * configure.ac: Accept the powerpc as host_cpu. In the case of
19893 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
19894 specific tests are only executed while building for the i386.
19895 Inverse test for crosscompile.
19896 * genmk.rb (Utility): Allow assembler files.
19897 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
19898 * conf/powerpc-ieee1275.rmk: New file.
19899 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
19900 * disk/powerpc/ieee1275/partition.c: Likewise.
19901 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
19902 * include/pupa/powerpc/ieee1275/console.h: Likewise.
19903 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
19904 * include/pupa/powerpc/ieee1275/time.h: Likewise.
19905 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
19906 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
19907 * include/pupa/powerpc/ieee1275/loader.h
19908 * include/pupa/powerpc/setjmp.h: Likewise.
19909 * include/pupa/powerpc/types.h: Likewise.
19910 * kern/powerpc/ieee1275/init.c: Likewise.
19911 * kern/powerpc/ieee1275/openfw.c: Likewise.
19912 * term/powerpc/ieee1275/ofconsole.c: Likewise.
19913
19914 These files were written by Johan Rydberg
19915 (jrydberg@night.trouble.net) and I only modified them slightly.
f19dbdb7 19916
e56cdf21 19917 * boot/powerpc/ieee1275/cmain.c: New file.
19918 * boot/powerpc/ieee1275/crt0.S: Likewise.
19919 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
19920 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
19921
8c8cc205 199222004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
19923
19924 * Makefile.in: Update copyright.
19925 * genmodsrc.sh: Likewise.
19926 * gensymlist.sh: Likewise.
19927 * term/i386/pc/vga.c: Indent correctly.
19928
19929 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
19930 bugreporting address.
19931 * util/i386/pc/pupa-setup.c (usage): Likewise,
19932 (main): Call pupa_ext2_init and pupa_ext2_fini.
19933
f19dbdb7 19934 * fs/fat.c (log2): Renamed to ...
8c8cc205 19935 (fat_log2): ... this.
19936 All callers changed.
19937 * kern/misc.c (memcpy): Alias to pupa_memmove.
19938 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
19939 lvalue cast.
19940 * util/console.c (pupa_ncurses_fini): Return 0.
19941
19942 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
19943 Move fail label here.
19944 [__GNU__]: Don't warn when using stat.
19945 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
19946 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
19947 long int. Use strtol instead of strtoul.
f19dbdb7 19948
db1771cf 199492004-03-14 Marco Gerards <metgerards@student.han.nl>
19950
19951 * commands/boot.c: New file.
19952 * commands/cat.c: Likewise.
19953 * commands/cmp.c: Likewise.
19954 * commands/ls.c: Likewise.
19955 * commands/terminal.c: Likewise.
19956 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
19957 (pupa_register_command): Changed interface to match the new
19958 argument parser.
19959 (pupa_command_execute): Changed (almost rewritten) so it uses
19960 pupa_split_command. Added support for setting variables using the
19961 syntax `foo=bar'.
19962 (rescue_command): Changed to work with the new argument parser.
19963 (terminal_command): Moved from here to commands/terminal.c.
19964 (set_command): New function.
19965 (unset_command): New function.
19966 (insmod_command): New function.
19967 (rmmod_command): New function.
19968 (lsmod_command): New function.
19969 (pupa_command_init): Don't initialize the command terminal
19970 anymore. Initialize the commands set, unset, insmod, rmmod and
19971 lsmod.
19972 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
19973 (kernel_img_HEADERS): Add arg.h and env.h.
19974 (pupa_mkimage_LDFLAGS): Add kern/env.c.
19975 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
19976 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
19977 normal/arg.c.
19978 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
19979 terminal.mod.
19980 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
19981 (boot_mod_SOURCES): New variable.
19982 (terminal_mod_SOURCES): Likewise.
19983 (ls_mod_SOURCES): Likewise.
19984 (cmp_mod_SOURCES): Likewise.
19985 (cat_mod_SOURCES): Likewise.
19986
19987 * normal/arg.c: New file.
19988 * kern/env.c: Likewise.
19989 * include/pupa/arg.h: Likewise.
19990 * include/pupa/env.h: Likewise.
19991 * font/manager.c (font_command): Changed to match argument parsing
19992 interface changes.
19993 (PUPA_MOD_INIT): Likewise.
19994 * hello/hello.c (pupa_cmd_hello): Likewise.
19995 (PUPA_MOD_INIT): Likewise.
19996 * include/pupa/disk.h: Include <pupa/device.h>.
19997 (pupa_print_partinfo): New prototype.
19998 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
19999 (pupa_dl_get_prefix): Likewise.
20000 * include/pupa/misc.h: Include <pupa/err.h>.
20001 (pupa_isgraph): New prototype.
20002 (pupa_isdigit): Likewise.
20003 (pupa_split_cmdline): Likewise.
20004 * include/pupa/normal.h: Include <pupa/arg.h>.
20005 (pupa_command): Changed the prototype of the member `func' to
20006 match the argument parsing interface. Added member `options'.
20007 (pupa_register_command): Updated to match function.
20008 (pupa_arg_parse): New prototype.
20009 (pupa_hello_init) [PUPA_UTIL]: New prototype.
20010 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
20011 (pupa_ls_init) [PUPA_UTIL]: Likewise.
20012 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
20013 (pupa_cat_init) [PUPA_UTIL]: Likewise.
20014 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
20015 (pupa_boot_init) [PUPA_UTIL]: Likewise.
20016 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
20017 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
20018 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
20019 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
20020 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
20021 * kern/disk.c: Include <pupa/file.h>.
20022 (pupa_print_partinfo): New function.
20023 * kern/dl.c: Include <pupa/env.h>.
20024 (pupa_dl_dir): Variable removed.
20025 (pupa_dl_load): Use the environment variable `prefix' instead of
20026 the variable pupa_dl_dir.
20027 (pupa_dl_set_prefix): Function removed.
20028 (pupa_dl_get_prefix): Likewise.
20029 * kern/i386/pc/init.c: Include <pupa/env.h>.
20030 (pupa_machine_init): Use the environment variable `prefix' instead of
20031 using pupa_dl_set_prefix to set the prefix.
20032 * kern/main.c: Include <pupa/env.h>.
20033 (pupa_set_root_dev): Use the environment variable `prefix' instead of
20034 using pupa_dl_get_prefix to get the prefix.
20035 * kern/misc.c: Include <pupa/env.h>.
20036 (pupa_isdigit): New function.
20037 (pupa_isgraph): Likewise.
20038 (pupa_ftoa): Likewise.
20039 (pupa_vsprintf): Added support for printing values of the type
20040 `double'. Make it possible to format variable output when using
20041 formatting like `%1.2%f'.
20042 (pupa_split_cmdline): New function.
20043 * kern/rescue.c: Include <pupa/env.h>.
20044 (next_word): Removed function.
20045 (pupa_rescue_cmd_prefix): Likewise.
20046 (pupa_rescue_cmd_set): New function.
20047 (pupa_rescue_cmd_unset): New function.
20048 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
20049 split the command line instead of splitting it here. Added
20050 support for setting variables using the syntax `foo=bar'. Don't
20051 initialize the prefix command anymore. Initialized the set and
20052 unset commands.
20053 * normal/cmdline.c: Include <pupa/env.h>.
20054 (pupa_tab_complete): Added prototypes for print_simple_completion,
20055 print_partition_completion, add_completion, iterate_commands,
20056 iterate_dev, iterate_part and iterate_dir. Moved code to print
20057 partition information from here to kern/disk.c.
fe6b695a 20058 (pupa_cmdline_run): Don't check if the function exists anymore.
db1771cf 20059 * normal/main.c: Include <pupa/env.h>.
20060 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
20061 instead of using pupa_dl_get_prefix to get the prefix.
20062 * term/i386/pc/vga.c: Include <pupa/arg.h>.
20063 (check_vga_mem): Cast pointers to `void *' to silence a gcc
20064 warning.
20065 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
20066 (pupa_vga_setcolor): Declare unused variables with `__attribute__
20067 ((unused))' to silence a gcc warning.
20068 (pupa_vga_setcolor): Likewise.
20069 (debug_command): Changed to match argument parsing
20070 interface changes.
20071 * util/pupa-emu.c: Include <pupa/env.h>.
20072 (options): Added 0's for unused fields to silence a gcc warning.
20073 (argp): Likewise.
20074 (main): Use the environment variable `prefix' instead of using
20075 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
20076 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
20077 and terminal.
20078
20079 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
20080 * util/misc.c: Include <malloc.h>.
20081 (pupa_malloc): Rewritten so errors are correctly reported.
20082 (pupa_realloc): Likewise.
20083 (pupa_memalign): Likewise.
20084 (pupa_mm_init_region): Declare unused variables with
20085 `__attribute__ ((unused))' to silence a gcc warning.
20086 * normal/i386/setjmp.S: Remove tab at the end of the file to
20087 silence a gcc warning.
20088 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
20089 variables with `__attribute__ ((unused))' to silence a gcc
20090 warning.
20091 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
20092 local variable i unsigned to silence a gcc warning.
20093
20094 * kern/term.c: Include <pupa/misc.h>.
20095 (pupa_more_lines): New variable.
20096 (pupa_more): Likewise.
20097 (pupa_putcode): When the pager is active pause at the end of every
20098 screen.
20099 (pupa_set_more): New function.
20100 * include/pupa/term.h (pupa_set_more): New prototype.
20101
20102
3b1139cb 201032004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
20104
20105 Now this project is GRUB 2 rather than PUPA. The location of
20106 the CVS repository was moved to GRUB's.
f19dbdb7 20107
3b1139cb 20108 * configure.ac: Use bug-grub as the reporting address.
20109 Use GRUB instead of PUPA.
20110 Change the version number to 1.90.
20111
8367695c 201122004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
20113
20114 * genkernsyms.sh: Updated copyright information.
20115 * genmk.rb: Likewise.
20116 * genmodsrc.sh: Likewise.
20117 * gensymlist.sh: Likewise.
20118 * boot/i386/pc/boot.S: Likewise.
20119 * boot/i386/pc/diskboot.S: Likewise.
20120 * disk/i386/pc/biosdisk.c: Likewise.
20121 * disk/i386/pc/partition.c: Likewise.
20122 * font/manager.c: Likewise.
20123 * fs/ext2.c: Likewise.
20124 * fs/fat.c: Likewise.
20125 * include/pupa/boot.h: Likewise.
20126 * include/pupa/device.h: Likewise.
20127 * include/pupa/disk.h: Likewise.
20128 * include/pupa/dl.h: Likewise.
20129 * include/pupa/elf.h: Likewise.
20130 * include/pupa/err.h: Likewise.
20131 * include/pupa/file.h: Likewise.
20132 * include/pupa/font.h: Likewise.
20133 * include/pupa/fs.h: Likewise.
20134 * include/pupa/kernel.h: Likewise.
20135 * include/pupa/loader.h: Likewise.
20136 * include/pupa/misc.h: Likewise.
20137 * include/pupa/mm.h: Likewise.
20138 * include/pupa/net.h: Likewise.
20139 * include/pupa/normal.h: Likewise.
20140 * include/pupa/rescue.h: Likewise.
20141 * include/pupa/setjmp.h: Likewise.
20142 * include/pupa/symbol.h: Likewise.
20143 * include/pupa/term.h: Likewise.
20144 * include/pupa/types.h: Likewise.
20145 * include/pupa/i386/setjmp.h: Likewise.
20146 * include/pupa/i386/types.h: Likewise.
20147 * include/pupa/i386/pc/biosdisk.h: Likewise.
20148 * include/pupa/i386/pc/boot.h: Likewise.
20149 * include/pupa/i386/pc/console.h: Likewise.
20150 * include/pupa/i386/pc/init.h: Likewise.
20151 * include/pupa/i386/pc/kernel.h: Likewise.
20152 * include/pupa/i386/pc/linux.h: Likewise.
20153 * include/pupa/i386/pc/loader.h: Likewise.
20154 * include/pupa/i386/pc/memory.h: Likewise.
20155 * include/pupa/i386/pc/multiboot.h: Likewise.
20156 * include/pupa/i386/pc/partition.h: Likewise.
20157 * include/pupa/i386/pc/time.h: Likewise.
20158 * include/pupa/i386/pc/vga.h: Likewise.
20159 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
20160 * include/pupa/util/getroot.h: Likewise.
20161 * include/pupa/util/misc.h: Likewise.
20162 * include/pupa/util/resolve.h: Likewise.
20163 * kern/device.c: Likewise.
20164 * kern/disk.c: Likewise.
20165 * kern/dl.c: Likewise.
20166 * kern/err.c: Likewise.
20167 * kern/file.c: Likewise.
20168 * kern/fs.c: Likewise.
20169 * kern/loader.c: Likewise.
20170 * kern/main.c: Likewise.
20171 * kern/misc.c: Likewise.
20172 * kern/mm.c: Likewise.
20173 * kern/rescue.c: Likewise.
20174 * kern/term.c: Likewise.
20175 * kern/i386/dl.c: Likewise.
20176 * kern/i386/pc/init.c: Likewise.
20177 * kern/i386/pc/lzo1x.S: Likewise.
20178 * kern/i386/pc/startup.S: Likewise.
20179 * loader/i386/pc/chainloader.c: Likewise.
20180 * loader/i386/pc/linux.c: Likewise.
20181 * loader/i386/pc/multiboot.c: Likewise.
20182 * normal/cmdline.c: Likewise.
20183 * normal/command.c: Likewise.
20184 * normal/main.c: Likewise.
20185 * normal/menu.c: Likewise.
20186 * normal/i386/setjmp.S: Likewise.
20187 * term/i386/pc/console.c: Likewise.
20188 * term/i386/pc/vga.c: Likewise.
20189 * util/console.c: Likewise.
20190 * util/genmoddep.c: Likewise.
20191 * util/misc.c: Likewise.
20192 * util/pupa-emu.c: Likewise.
20193 * util/resolve.c: Likewise.
20194 * util/unifont2pff.rb: Likewise.
20195 * util/i386/pc/biosdisk.c: Likewise.
20196 * util/i386/pc/getroot.c: Likewise.
20197 * util/i386/pc/pupa-mkimage.c: Likewise.
20198 * util/i386/pc/pupa-setup.c: Likewise.
20199
e6eced71 202002004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
20201
20202 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
20203 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
20204 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
20205 reading and reset it after reading.
20206 (pupa_ext2_close): Return PUPA_ERR_NONE.
20207
20208 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
20209 Correct value.
20210 (struct linux_kernel_header): Add kernel_version and
20211 initrd_addr_max.
20212 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
20213 pupa_file_read succeeds.
20214 (pupa_rescue_cmd_initrd): Implement.
20215
5aded270 202162003-12-03 Marco Gerards <metgerards@student.han.nl>
20217
20218 * fs/ext2.c (pupa_ext2_label): New function.
20219 (pupa_ext2_fs): Added label.
20220 * fs/fat.c (pupa_fat_label): New function.
20221 (pupa_fat_fs): Added label.
20222 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
20223
20224 * kern/misc.c (pupa_strndup): New function.
20225 * include/pupa/misc.h (pupa_strndup): New prototype.
20226
20227 * include/pupa/normal.h: Include <pupa/err.h>.
20228 (pupa_set_history): New prototype.
20229 (pupa_iterate_commands): New prototype.
20230 * normal/cmdline.c: Include <pupa/machine/partition.h>,
20231 <pupa/disk.h>, <pupa/file.h>.
20232 (hist_size): New variable.
20233 (hist_lines): Likewise.
20234 (hist_end): Likewise.
20235 (hist_used): Likewise.
20236 (pupa_set_history): New function.
20237 (pupa_history_get): Likewise.
20238 (pupa_history_add): Likewise.
20239 (pupa_history_replace): Likewise.
20240 (pupa_tab_complete): Likewise.
20241 (pupa_cmdline_run): Added tab completion and history buffer. Tab
20242 completion shows partitionnames while completing partitions, this
20243 feature was suggested by Jeff Bailey.
20244 * normal/command.c (pupa_iterate_commands): New function.
20245 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
20246 (pupa_normal_init): Initialize history buffer.
20247 (PUPA_MOD_INIT): Likewise.
20248 (pupa_normal_fini): Free the history buffer.
20249 (PUPA_MOD_FINI): Likewise.
20250
20251 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
20252 key.
20253
20254 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
20255 * configure.ac [i386]: Check for regparam bug.
20256 (NESTED_FUNC_ATTR) [! i386]: Defined.
20257
1f7315a3 202582003-11-17 Marco Gerards <metgerards@student.han.nl>
20259
20260 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
20261 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
20262 (pupa_emu_SOURCES): New variable.
20263 (pupa_emu_LDFLAGS): Likewise.
20264 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
20265 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
20266 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
20267 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
20268 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
20269 (pupa_jmp_buf): New typedef.
20270 (pupa_setjmp) [PUPA_UTIL]: New macro.
20271 (pupa_longjmp) [PUPA_UTIL]: Likewise.
20272 * include/pupa/term.h (struct pupa_term): New member `refresh'.
20273 (pupa_refresh): New prototype.
20274 * include/pupa/util/getroot.h: New file.
20275 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
20276 it.
20277 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
20278 (pupa_rescue_cmd_cat): Likewise.
20279 (pupa_rescue_cmd_ls): Likewise.
20280 (pupa_rescue_cmd_testload): Likewise.
20281 (pupa_rescue_cmd_lsmod): Likewise.
20282 * normal/cmdline.c (pupa_cmdline_get): Likewise.
20283 * normal/menu.c (run_menu): Likewise.
20284 * kern/term.c (pupa_cls): Likewise.
20285 (pupa_refresh): New function.
20286 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
20287 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
20288 * util/console.c: New file.
f19dbdb7 20289
1f7315a3 20290 * util/i386/pc/getroot.c: New file.
20291 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
20292 (pupa_putchar): New function.
20293 (pupa_refresh): Likewise.
20294 (xgetcwd): Function moved to ...
20295 (strip_extra_slashes): Likewise.
20296 (get_prefix): Likewise.
f19dbdb7 20297 * util/i386/pc/getroot.c: ... here.
1f7315a3 20298 (find_root_device): Function moved and renamed to...
20299 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
20300 Changed all callers.
20301 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
20302 and renamed to...
20303 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
20304 Changed all callers.
20305 * util/misc.c (pupa_memalign): New function.
20306 (pupa_mm_init_region): Likewise.
20307 (pupa_register_exported_symbols): Likewise.
20308 (pupa_putchar): Function removed.
20309 * util/pupa-emu.c: New file.
20310
9a5c1ade 203112003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
20312
20313 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
20314 (_multiboot_mod_SOURCES): New variable.
20315 (_multiboot_mod_CFLAGS): Likewise.
20316 * loader/i386/pc/multiboot.c: New file.
20317 * include/pupa/i386/pc/multiboot.h: Likewise.
20318 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
20319 (pupa_multiboot_real_boot): New function.
20320 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
20321 (pupa_multiboot_real_boot): New prototype.
20322 (pupa_rescue_cmd_multiboot): Likewise
20323 (pupa_rescue_cmd_module): Likewise.
20324
20325 * kern/loader.c (pupa_loader_set): Continue when
20326 pupa_loader_unload_func() fails.
20327 (pupa_loader_unset): New function.
20328 * include/pupa/loader.h (pupa_loader_unset): New prototype.
20329
20330 * kern/misc.c (pupa_stpcpy): New function.
20331 * include/pupa/misc.h (pupa_stpcpy): New prototype.
20332
8e72a9c0 203332003-11-12 Marco Gerards <metgerards@student.han.nl>
20334
20335 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
20336 for available extensions.
20337
20338 * include/pupa/i386/pc/time.h: New file.
20339 * kern/disk.c: Include <pupa/machine/time.h>.
20340 (PUPA_CACHE_TIMEOUT): New macro.
20341 (pupa_last_time): New variable.
20342 (pupa_disk_open): Flush the cache when there was a timeout.
20343 (pupa_disk_close): Reset the timer.
20344 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
20345 pupa_currticks.
20346 * util/misc.c: Include <sys/times.h>
20347 (pupa_get_rtc): New function.
20348
c4adbd32 203492003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
20350
20351 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
20352 as blocks.
20353 (pupa_ext2_get_file_block): Use blocks member.
20354
20355 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
20356 first block. Return -1 instead of pupa_errno on error.
20357
bfd30f06 203582003-10-27 Marco Gerards <metgerards@student.han.nl>
20359
20360 * README: In the pupa-mkimage example use _chain instead of chain
20361 and ext2 instead of fat.
20362 * TODO: Replace ext2fs with jfs as an example. Add an item for
20363 adding journal playback for ext2fs.
20364 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
20365 (pkgdata_MODULES): Added ext2.mod.
20366 (ext2_mod_SOURCES): New variable.
20367 (ext2_mod_CFLAGS): Likewise.
20368 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
20369 * include/pupa/misc.h (pupa_strncpy): New prototype.
20370 (pupa_strcat): Likewise.
20371 (pupa_strncmp): Likewise.
20372 * kern/misc.c (pupa_strcat): Enable function.
20373 (pupa_strncpy): New function.
20374 (pupa_strncmp): Likewise.
20375 * fs/ext2.c: New file.
f19dbdb7 20376
bfd30f06 20377 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
20378 when the read failed before retrying.
20379 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
20380 (_FILE_OFFSET_BITS): Likewise.
20381 * configure.ac: Added AC_SYS_LARGEFILE.
20382
98d15063 203832003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
20384
20385 * genmk.rb (PModule#rule): Make sure to get only symbol names
20386 from the output of nm.
20387 Reported by Robert Millan <zeratul2@wanadoo.es>.
20388
18d9c7cd 203892003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
20390
20391 I forgot to check in these changes for a long time. This adds
20392 incomplete support for VGA console, and this is still very
20393 buggy. Also, a lot of consideration is required for I18N,
20394 UNICODE, and VGA font issues. Therefore, assume that this is
20395 such that "better than nothing".
f19dbdb7 20396
18d9c7cd 20397 * font/manager.c: New file.
20398 * include/pupa/font.h: Likewise.
20399 * include/pupa/i386/pc/vga.h: Likewise.
20400 * term/i386/pc/vga.c: Likewise.
20401 * util/unifont2pff.rb: Likewise.
20402
20403 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
20404 (pkgdata_MODULES): Added vga.mod and font.mod.
20405 (vga_mod_SOURCES): New variables.
20406 (vga_mod_CFLAGS): Likewise.
20407 (font_mod_SOURCES): Likewise.
20408 (font_mod_CFLAGS): Likewise.
20409
20410 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
20411
20412 * include/pupa/term.h: Include pupa/err.h.
f19dbdb7 20413 (struct pupa_term): Added init and fini.
18d9c7cd 20414 Changed the argument of putchar to pupa_uint32_t.
20415
20416 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
20417 (pupa_console_real_putchar): New prototype.
20418 (pupa_console_putchar): Removed.
20419 (pupa_console_checkkey): Exported.
20420 (pupa_console_getkey): Likewise.
20421
20422 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
20423 characters.
20424
20425 * kern/term.c (pupa_term_set_current): Rewritten.
20426 (pupa_putchar): Likewise.
20427 (pupa_putcode): New function.
20428
20429 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
20430 (pupa_console_real_putchar): ... this.
20431 (pupa_vga_set_mode): New function.
20432 (pupa_vga_get_font): Likewise.
20433
20434 * normal/command.c: Include pupa/term.h.
20435 (terminal_command): New function.
20436 (pupa_command_init): Register the command "terminal".
20437
20438 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
20439 (DISP_UP): Likewise.
20440 (DISP_RIGHT): Likewise.
20441 (DISP_DOWN): Likewise.
20442 (DISP_HLINE): Likewise.
20443 (DISP_VLINE): Likewise.
20444 (DISP_UL): Likewise.
20445 (DISP_UR): Likewise.
20446 (DISP_LL): Likewise.
20447 (DISP_LR): Likewise.
20448
20449 * term/i386/pc/console.c (pupa_console_putchar): New function.
f19dbdb7 20450
977329f5 204512003-02-08 NIIBE Yutaka <gniibe@m17n.org>
20452
20453 * util/resolve.c (pupa_util_resolve_dependencies): BUG
20454 FIX. Reverse the path_list.
20455
20456 * include/pupa/normal.h: Export pupa_register_command and
20457 pupa_unregister_command.
20458
20459 * hello/hello.c (pupa_cmd_hello): New module.
20460 * conf/i386-pc.rmk: Added hello.mod.
20461
1f5ab428 204622003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
20463
20464 * kern/i386/pc/lzo1x.S: New file.
f19dbdb7 20465
1f5ab428 20466 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
20467 (compress_kernel): New variable.
20468 (generate_image): Heavily modified to support compressing a
20469 large part of the core image.
20470
20471 * util/misc.c (pupa_util_read_image): Fix a file descriptor
20472 leak.
20473 (pupa_util_load_image): New function.
20474
20475 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
20476 (pupa_compressed_size): New variable.
20477 (codestart): Enable Gate A20 here.
20478 Decompress the compressed part of the core image.
20479 Rearrange the code to put functions and variables which are
20480 required for initialization in the non-compressed part.
20481 Include lzo1x.S.
20482
20483 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
20484 here.
20485
20486 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
20487
f19dbdb7 20488 * include/pupa/i386/pc/kernel.h
1f5ab428 20489 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
20490 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
20491 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
20492 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
20493 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
20494
20495 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
20496
20497 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
20498 (Utility#rule): Likewise.
20499
20500 * configure.ac: Check if LZO is available.
20501
ce5bf700 205022003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
20503
20504 * include/pupa/normal.h: New file.
20505 * include/pupa/setjmp.h: Likewise.
20506 * include/pupa/i386/setjmp.h: Likewise.
20507 * normal/cmdline.c: Likewise.
20508 * normal/command.c: Likewise.
20509 * normal/main.c: Likewise.
20510 * normal/menu.c: Likewise.
20511 * normal/i386/setjmp.S: Likewise.
f19dbdb7 20512
ce5bf700 20513 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
20514 (pupa_rescue_cmd_initrd): Likewise.
20515
20516 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
20517 Likewise.
20518
20519 * kern/i386/pc/startup.S (translation_table): New variable.
20520 (translate_keycode): New function.
20521 (pupa_console_getkey): Call translate_keycode.
20522
20523 * kern/rescue.c (attempt_normal_mode): New function.
20524 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
20525 it failed, print a message.
20526
20527 * kern/mm.c (pupa_real_malloc): Print more information when a
20528 free magic is broken.
20529 (pupa_free): If the first free header is not free actually, set
20530 it to P.
20531
20532 * kern/main.c (pupa_load_normal_mode): Just load the module
20533 "normal".
20534 (pupa_main): Don't print the message
20535 "Entering into rescue mode..." here.
20536
20537 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
20538 Declared.
20539 (pupa_rescue_cmd_initrd): Likewise.
20540 (pupa_rescue_cmd_initrd): Likewise.
20541
20542 * include/pupa/symbol.h (FUNCTION): Specify the type.
20543 (VARIABLE): Likewise.
20544
20545 * include/pupa/err.h (pupa_err_t): Added
20546 PUPA_ERR_UNKNOWN_COMMAND.
20547
20548 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
20549 (pupa_dl_get_prefix): Likewise.
20550
20551 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
20552 Added _chain.mod and _linux.mod instead of chain.mod and
20553 linux.mod.
20554 (chain_mod_SOURCES): Renamed to ...
20555 (_chain_mod_SOURCES): ... this.
20556 (chain_mod_CFLAGS): Renamed to ...
20557 (_chain_mod_CFLAGS): ... this.
20558 (linux_mod_SOURCES): Renamed to ...
20559 (_linux_mod_SOURCES): ... this.
20560 (linux_mod_CFLAGS): Renamed to ...
20561 (_linux_mod_CFLAGS): ... this.
20562 (normal_mod_SOURCES): New variable.
20563 (normal_mod_CFLAGS): Likewise.
20564 (normal_mod_ASFLAGS): Likewise.
20565
205662003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
20567
20568 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
20569 possible.
20570
fe6b695a 20571 * kern/dl.c (pupa_dl_ref): Refer depending modules
ce5bf700 20572 recursively.
20573 (pupa_dl_unref): Unrefer depending modules recursively.
20574 Don't call pupa_dl_unload implicitly, because PUPA can crash if
20575 a module is unloaded before one depending on that module is
20576 unloaded.
20577 (pupa_dl_unload): Unload depending modules explicitly,
20578 if possible.
20579
c04da074 205802003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
20581
20582 * include/pupa/i386/pc/linux.h: New file.
20583 * loader/i386/pc/linux.c: Likewise.
f19dbdb7 20584
c04da074 20585 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
20586 Removed.
20587 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
20588 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
20589 of PUPA_CHAINLOADER_BOOT_SECTOR.
20590
20591 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
20592 (pupa_linux_prot_size): New variable.
20593 (pupa_linux_tmp_addr): Likewise.
20594 (pupa_linux_real_addr): Likewise.
20595 (pupa_linux_boot_zimage): New function.
20596 (pupa_linux_boot_bzimage): Likewise.
20597
20598 * kern/i386/pc/init.c (struct mem_region): New structure.
20599 (MAX_REGIONS): New macro.
20600 (mem_regions): New variable.
20601 (num_regions): Likewise.
20602 (pupa_os_area_addr): Likewise.
20603 (pupa_os_area_size): Likewise.
20604 (pupa_lower_mem): Likewise.
20605 (pupa_upper_mem): Likewise.
20606 (add_mem_region): New function.
20607 (compact_mem_regions): Likewise.
20608 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
20609 the size of the conventional memory and that of so-called upper
20610 memory (before the first memory hole).
20611 Instead of adding each found region to free memory, use
20612 add_mem_region and add them after removing overlaps.
20613 Also, add only 1/4 of the upper memory to free memory. The rest
20614 is used for loading OS images. Maybe this is ad hoc, but this
20615 makes it much easier to relocate OS images when booting.
20616
20617 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
20618 (pupa_enter_rescue_mode): Don't register initrd and module.
20619
20620 * kern/mm.c: Include pupa/dl.h.
20621
20622 * kern/main.c: Include pupa/file.h and pupa/device.h.
20623
20624 * kern/loader.c (pupa_loader_load_module_func): Removed.
20625 (pupa_loader_load_module): Likewise.
20626
20627 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
20628 ``.o''.
20629
20630 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
20631 (pupa_linux_tmp_addr): Likewise.
20632 (pupa_linux_real_addr): Likewise.
20633 (pupa_linux_boot_zimage): Likewise.
20634 (pupa_linux_boot_bzimage): Likewise.
20635
20636 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
20637 (pupa_upper_mem): Likewise.
20638 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
20639 module is too dangerous.
20640
20641 * include/pupa/loader.h (pupa_os_area_addr): Declared.
20642 (pupa_os_area_size): Likewise.
20643 (pupa_loader_set): Remove the first argument. Loader doesn't
20644 manage modules or initrd any longer.
20645 (pupa_loader_load_module): Removed.
20646
20647 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
20648 (linux_mod_SOURCES): New variable.
20649 (linux_mod_CFLAGS): Likewise.
20650
a13f9237 206512003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
20652
20653 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
20654 the length of a blocklist correctly.
20655
20656 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
20657 Use ioctl only if the OS file is a block device.
20658 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
20659 not very useful for normal files.
20660
20661 * kern/main.c (pupa_set_root_dev): New function.
20662 (pupa_load_normal_mode): Likewise.
20663 (pupa_main): Call those above.
20664
20665 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
20666 pupa_uint16_t.
20667
20668 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
20669
a5ffe966 206702003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
20671
20672 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
20673 (setup): Configure the installed partition information and the
20674 dl prefix.
20675
20676 * loader/i386/pc/chainloader.c (my_mod): New variable.
20677 (pupa_chainloader_unload): New function.
20678 (pupa_rescue_cmd_chainloader): Refer itself.
20679 (PUPA_MOD_INIT): Save its own module in MY_MOD.
20680
20681 * kern/i386/pc/startup.S (install_partition): Removed.
20682 (version_string): Likewise.
20683 (config_file): Likewise.
20684 (pupa_install_dos_part): New variable.
20685 (pupa_install_bsd_part): Likewise.
20686 (pupa_prefix): Likewise.
20687 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
20688
20689 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
20690 and pupa/misc.h.
20691 (make_install_device): New function.
20692 (pupa_machine_init): Set the dl prefix.
20693
20694 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
20695 (buf): Renamed to ...
20696 (linebuf): ... this.
20697 (pupa_rescue_cmd_prefix): New function.
20698 (pupa_rescue_cmd_insmod): Likewise.
20699 (pupa_rescue_cmd_rmmod): Likewise.
20700 (pupa_rescue_cmd_lsmod): Likewise.
20701 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
20702 rmmod and lsmod.
20703
20704 * kern/mm.c (pupa_memalign): If failed even after invalidating
20705 disk caches, unload unneeded modules and retry.
20706
20707 * kern/misc.c (pupa_memmove): New function.
20708 (pupa_memcpy): Removed.
20709 (pupa_strcpy): New function.
20710 (pupa_itoa): Made static.
20711
20712 * kern/dl.c (pupa_dl_iterate): New function.
20713 (pupa_dl_ref): Likewise.
20714 (pupa_dl_unref): Likewise.
20715 (pupa_dl_unload): Return if succeeded or not.
20716 (pupa_dl_unload_unneeded): New function.
20717 (pupa_dl_unload_all): Likewise.
20718 (pupa_dl_init): Renamed to ...
20719 (pupa_dl_set_prefix): ... this.
20720 (pupa_dl_get_prefix): New function.
20721
20722 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
20723 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
20724 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
20725 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
20726 (pupa_install_dos_part): Declared.
20727 (pupa_install_bsd_part): Likewise.
20728 (pupa_prefix): Likewise.
20729 (pupa_boot_drive): Likewise.
20730
20731 * include/pupa/types.h: Fix a typo.
20732
20733 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
20734 pupa_memmove.
20735 (pupa_memmove): Declared.
20736 (pupa_strcpy): Likewise.
20737
20738 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
20739 pupa_mod_init takes one argument, its own module.
20740 (pupa_dl_unload_unneeded): Declared.
20741 (pupa_dl_unload_all): Likewise.
20742 (pupa_dl_ref): Likewise.
20743 (pupa_dl_unref): Likewise.
20744 (pupa_dl_iterate): Likewise.
20745 (pupa_dl_init): Renamed to ...
20746 (pupa_dl_set_prefix): ... this.
20747 (pupa_dl_get_prefix): Declared.
20748
20749 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
f19dbdb7 20750 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
a5ffe966 20751 unloaded.
20752 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
20753 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
20754
20755 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
20756 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
20757
012d7999 207582003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
20759
20760 * util/i386/pc/pupa-setup.c (setup): Define the internal
20761 function find_first_partition_start at the top level, because GCC
20762 3.0.x cannot compile internal functions in deeper scopes
20763 correctly.
20764 (find_root_device): Use lstat instead of stat.
20765 Don't follow symbolic links.
20766 Fix the path-constructing code.
20767
20768 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
20769 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
20770 by a BLKGETSIZE ioctl first, because block devices don't fill
20771 the member st_mode of the structure stat on Linux.
20772 [__linux__] (linux_find_partition): Use a temporary buffer
20773 REAL_DEV for the working space. Copy it to DEV before returning.
20774 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
20775 buffer cache consistent.
20776 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
20777 strncmp. The previous value was merely wrong.
20778 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
20779
20780 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
20781 FAT size is 12. The previous value was merely wrong.
20782
20783 * kern/main.c (pupa_main): Don't split the starting message from
20784 newlines.
20785
20786 * kern/term.c (pupa_putchar): Put CR after LF instead of before
20787 LF, because BIOS goes crazy about character attributes in this
20788 case.
20789
1cc73a62 207902003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
20791
20792 * include/i386/pc/util/biosdisk.h: New file.
20793 * util/i386/pc/biosdisk.c: Likewise.
20794 * util/i386/pc/pupa-setup.c: Likewise.
f19dbdb7 20795
1cc73a62 20796 * Makefile.in (INCLUDE_DISTFILES): Added
20797 include/pupa/i386/pc/util/biosdisk.h.
20798 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
20799 directory util/i386/pc.
20800 (install-local): Added a rule for sbin_UTILITIES.
20801 (uninstall): Likewise.
20802
20803 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
20804
20805 * util/misc.c (xrealloc): New function.
20806 (pupa_malloc): Likewise.
20807 (pupa_free): Likewise.
20808 (pupa_realloc): Likewise.
20809 (pupa_stop): Likewise.
20810 (pupa_putchar): Likewise.
20811
20812 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
20813
20814 * include/pupa/util/misc.h (xrealloc): Declared.
20815
20816 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
20817 macro.
20818 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
20819 (PUPA_BOOT_MACHINE_BPB_END): ... this.
20820
20821 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
20822 [PUPA_UTIL] (pupa_fat_fini): Likewise.
20823
20824 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
20825 way should be implemented.
20826 [PUPA_UTIL] (pupa_fat_fini): Likewise.
20827
20828 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
20829 the size of NAME for safety.
20830 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
20831 0x88.
20832
20833 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
20834 (pupa_setup_SOURCES): Likewise.
20835
20836 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
20837
08b70fe8 208382002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
20839
20840 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
20841 bunch of pushl's from pusha, because this destroys the return
20842 value.
20843
62ddcc8f 208442002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
20845
20846 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
20847 This means that any missing prototypes could be fatal. Also, you
20848 must take care when writing assembly code. See the comments at
20849 the beginning of startup.S, for more details.
f19dbdb7 20850
62ddcc8f 20851 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
20852 compilation mechanism.
20853 (pupa_chainloader_real_boot): Likewise.
20854 (pupa_biosdisk_rw_int13_extensions): Likewise.
20855 (pupa_biosdisk_rw_standard): Likewise.
20856 (pupa_biosdisk_check_int13_extensions): Likewise.
20857 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
20858 (pupa_biosdisk_get_diskinfo_standard): Likewise.
20859 (pupa_get_memsize): Likewise.
20860 (pupa_get_mmap_entry): Likewise.
20861 (pupa_console_putchar): Likewise.
20862 (pupa_console_setcursor): Likewise.
20863 (pupa_getrtsecs): Use pushl instead of push.
20864
20865 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
20866 memory instead of the stack for a mmap entry, because some
20867 BIOSes may ignore the maximum size and overflow.
20868
20869 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
20870
20871 * genmk.rb (PModule#rule): Compile automatically generated
20872 sources with module-specific CFLAGS as well as other sources.
20873
9962ed99 208742002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
20875
20876 * configure.ac: Check ld.
20877 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
20878 respectively, before checking endianness and sizes.
20879
20880 * Makefile.in (LD): New variable.
f19dbdb7 20881
abdfc3c5 208822002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
20883
20884 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
20885
6a161fa9 208862002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
20887
20888 * Changelog: New file.
20889