]> git.proxmox.com Git - grub2.git/blame - ChangeLog
2009-11-21 Robert Millan <rmh.grub@aybabtu.com>
[grub2.git] / ChangeLog
CommitLineData
13774a2f
RM
12009-11-21 Robert Millan <rmh.grub@aybabtu.com>
2
3 * util/grub-mkrescue.in: Use source directory direcly (without copiing
4 or hardlinking it). Remove -J option, Joliet is not compatible with
5 multiple source directories.
6
efda854e
RM
72009-11-21 Carles Pina i Estany <carles@pina.cat>
82009-11-21 Robert Millan <rmh.grub@aybabtu.com>
9
10 * util/grub-mkrescue.in: Recognize `--override-directory' option.
11 (process_input_dir): New function. Process an arbitrary input
12 directory.
13 Misc adjustments to support both "override mode" and system-wide mode.
14
6c09890c
FZ
152009-11-20 Felix Zielcke <fzielcke@z-51.de>
16
17 * configure.ac (UNIFONT_BDF): Rename to ...
18 (FONT_SOURCE): ... this. Update all users.
19
a797824f
FZ
202009-11-20 Felix Zielcke <fzielcke@z-51.de>
21
22 * configure.ac: Add `/usr/share/fonts/X11/misc/unifont.pcf.gz'
23 to the list of unifont files to look for.
24
cd4f42b0
RM
252009-11-19 Robert Millan <rmh.grub@aybabtu.com>
26
27 Patch from Joe Auricchio <jauricchio@gmail.com>
28 * commands/minicmd.c (grub_mini_cmd_clear): New function.
29 (GRUB_MOD_INIT(minicmd)): Register grub_mini_cmd_clear().
30 (GRUB_MOD_FINI(minicmd)): Unregister grub_mini_cmd_clear().
31
393c783d
FZ
322009-11-19 Felix Zielcke <fzielcke@z-51.de>
33
34 * Makefile.in (install-local): Add a missing backslash.
35
b2f1e327
FZ
362009-11-19 Felix Zielcke <fzielcke@z-51.de>
37
38 * include/grub/x86_64/io.h: New file.
39
f577f7a0
RM
402009-11-19 Robert Millan <rmh.grub@aybabtu.com>
41
42 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `gnulib/progname.c'.
43 * util/i386/pc/grub-setup.c: Include `<grub/i18n.h>'.
44 Include `"progname.h"'.
45 (main): Initialize gettext.
46 * util/i386/pc/grub-setup.c: Gettexttize.
47 * util/i386/pc/grub-mkimage.c: Likewise.
48
49 * Makefile.in (po/*.po): Redefine as ...
50 ($(foreach lang, $(LINGUAS), po/$(lang).po)): ... this.
51
52 * po/POTFILES: Add `util/i386/pc/grub-setup.c'.
53
c37943b6
RM
542009-11-19 Robert Millan <rmh.grub@aybabtu.com>
55
56 * conf/common.rmk (grub_mkisofs_SOURCES): Add `gnulib/progname.c'.
57 * util/mkisofs/mkisofs.c: Include `"progname.h"'.
58 (program_name): Remove.
59 (main): Initialize gettext support.
6323f705
RM
60 * util/mkisofs/mkisofs.h: Include `<locale.h>'.
61 Include `<libintl.h>'.
62 (_): New macro.
c37943b6
RM
63
64 * util/mkisofs/eltorito.c: Gettexttize.
65 * util/mkisofs/joliet.c: Likewise.
66 * util/mkisofs/mkisofs.c: Likewise.
c37943b6
RM
67 * util/mkisofs/multi.c: Likewise.
68 * util/mkisofs/rock.c: Likewise.
69 * util/mkisofs/tree.c: Likewise.
70 * util/mkisofs/write.c: Likewise.
71
72 * po/POTFILES: Update with new files.
73
5ce77c6e
RM
742009-11-18 Robert Millan <rmh.grub@aybabtu.com>
75
76 * util/mkisofs/eltorito.c: Fix minor mistake in license text.
77 * util/mkisofs/iso9660.h: Likewise.
78 * util/mkisofs/joliet.c: Likewise.
79 * util/mkisofs/mkisofs.c: Likewise.
80 * util/mkisofs/mkisofs.h: Likewise.
81 * util/mkisofs/rock.c: Likewise.
82 * util/mkisofs/tree.c: Likewise.
83 * util/mkisofs/write.c: Likewise.
84
85 * util/mkisofs/eltorito.c (rcsid): Remove.
86 * util/mkisofs/hash.c: Likewise.
87 * util/mkisofs/joliet.c: Likewise.
88 * util/mkisofs/name.c: Likewise.
89 * util/mkisofs/rock.c: Likewise.
90 * util/mkisofs/tree.c: Likewise.
91 * util/mkisofs/write.c: Likewise.
92
1dabbc77
RM
932009-11-18 Robert Millan <rmh.grub@aybabtu.com>
94
95 * util/mkisofs/match.c: Rewrite from scratch, using a linked list
96 instead of static allocation.
97 * util/mkisofs/match.h: Likewise.
98
633877cb
RM
992009-11-18 Robert Millan <rmh.grub@aybabtu.com>
100
101 * po/POTFILES-shell: New file. List `util/grub.d/10_kfreebsd.in'
102 and `util/grub.d/10_linux.in'.
103 * Makefile.in (po/$(PACKAGE).pot): Process `po/POTFILES-shell' for
104 translatable Shell files.
105
af1c0c85
RM
1062009-11-18 Robert Millan <rmh.grub@aybabtu.com>
107
108 * Makefile.in ($(srcdir)/aclocal.m4): New target.
109
769ae37b
RM
1102009-11-17 Robert Millan <rmh.grub@aybabtu.com>
111
112 * INSTALL: Document Automake is needed for bootstrap.
113 * po/ca.po: Fix PO-Revision-Date and Language-Team fields.
114 * util/grub.d/10_kfreebsd.in (bindir): New variable.
115 Add gettext initialization.
116 (kfreebsd_entry): Make menuentry output translatable.
117
1182009-11-17 Robert Millan <rmh.grub@aybabtu.com>
119
120 * Makefile.in (XGETTEXT, MSGMERGE, MSGFMT): New variables.
121 (po/$(PACKAGE).pot): Replace `xgettext' with `$(XGETTEXT)'.
122 (po/*.po): Replace `msgmerge' with `$(MSGMERGE)'.
123 (po/%.mo): Replace `msgfmt' with `$(MSGFMT)'.
124 (LINGUAS): Auto-generate using `po/LINGUAS'.
125 * po/LINGUAS: New file.
126
1272009-11-17 Robert Millan <rmh.grub@aybabtu.com>
128
129 * configure.ac: Call AM_GNU_GETTEXT() (defines localedir, among
130 other things).
131 * Makefile.in (CPPFLAGS): Add `-DLOCALEDIR=\"$(localedir)\"'.
132 * util/i386/pc/grub-mkimage.c (main): Issue setlocale() and
133 bindtextdomain() calls for gettext initialization.
134
1352009-11-17 Robert Millan <rmh.grub@aybabtu.com>
136
137 * gnulib/progname.c: New file (imported from Gnulib).
138 * gnulib/progname.h: Likewise.
139 * conf/i386-pc.rmk (grub_mkimage_SOURCES): Add `gnulib/progname.c'.
140 * util/i386/pc/grub-mkimage.c: Include `"progname.h"'.
141 (usage): Replace `progname' with `program_name'.
142 (main): Use set_program_name() for program name initialization.
143
1442009-11-17 Robert Millan <rmh.grub@aybabtu.com>
145
146 * conf/common.rmk (grub_mkisofs_CFLAGS): Move `-I$(srcdir)/gnulib'
147 from here ...
148 * Makefile.in (CPPFLAGS): ... to here.
149
1502009-11-16 Robert Millan <rmh.grub@aybabtu.com>
151
152 * aclocal.m4: Move from here ...
153 * acinclude.m4: ... to here.
154 * autogen.sh: Add call to `aclocal'.
155 * configure.ac: Add AM_INIT_AUTOMAKE() after AC_INIT() call.
156
1572009-11-16 Robert Millan <rmh.grub@aybabtu.com>
158
159 * Makefile.in (CLEANFILES): Add `po/*.mo'.
160 (LINGUAS): New variable.
161 (all-local): Add `$(foreach lang, $(LINGUAS), po/$(lang).mo)'.
162 (install-local): Install MO files.
163 (po/$(PACKAGE).pot, po/*.po, po/%.mo): New rules.
164 * include/grub/i18n.h: New file.
165 * po/POTFILES: New file.
166 * po/ca.po: New file.
167 * util/grub.d/10_linux.in (bindir): New variable.
168 Add gettext initialization.
169 (linux_entry): Make menuentry output translatable.
170 * util/i386/pc/grub-mkimage.c: Include `<grub/i18n.h>'.
171 (usage): Make --help output translatable.
172 (main): Initialize gettext.
173
02c0a6ad
RM
1742009-11-17 Robert Millan <rmh.grub@aybabtu.com>
175
176 * import_gcry.py: New file (written by Vladimir with minor
177 adjustments).
178 * autogen.sh: Use import_gcry.py to auto-generate GRUB-ified
179 ciphers.
180 * INSTALL: Document that Python is required for bootstrap.
181
1822009-11-17 Robert Millan <rmh.grub@aybabtu.com>
183
184 Import ciphers from libgcrypt 1.4.4.
185
186 * lib/libgcrypt/cipher/ChangeLog
187 * lib/libgcrypt/cipher/ac.c
188 * lib/libgcrypt/cipher/arcfour.c
189 * lib/libgcrypt/cipher/bithelp.h
190 * lib/libgcrypt/cipher/blowfish.c
191 * lib/libgcrypt/cipher/camellia-glue.c
192 * lib/libgcrypt/cipher/camellia.c
193 * lib/libgcrypt/cipher/camellia.h
194 * lib/libgcrypt/cipher/cast5.c
195 * lib/libgcrypt/cipher/cipher.c
196 * lib/libgcrypt/cipher/crc.c
197 * lib/libgcrypt/cipher/des.c
198 * lib/libgcrypt/cipher/dsa.c
199 * lib/libgcrypt/cipher/ecc.c
200 * lib/libgcrypt/cipher/elgamal.c
201 * lib/libgcrypt/cipher/hash-common.c
202 * lib/libgcrypt/cipher/hash-common.h
203 * lib/libgcrypt/cipher/hmac-tests.c
204 * lib/libgcrypt/cipher/md.c
205 * lib/libgcrypt/cipher/md4.c
206 * lib/libgcrypt/cipher/md5.c
207 * lib/libgcrypt/cipher/primegen.c
208 * lib/libgcrypt/cipher/pubkey.c
209 * lib/libgcrypt/cipher/rfc2268.c
210 * lib/libgcrypt/cipher/rijndael-tables.h
211 * lib/libgcrypt/cipher/rijndael.c
212 * lib/libgcrypt/cipher/rmd.h
213 * lib/libgcrypt/cipher/rmd160.c
214 * lib/libgcrypt/cipher/rsa.c
215 * lib/libgcrypt/cipher/seed.c
216 * lib/libgcrypt/cipher/serpent.c
217 * lib/libgcrypt/cipher/sha1.c
218 * lib/libgcrypt/cipher/sha256.c
219 * lib/libgcrypt/cipher/sha512.c
220 * lib/libgcrypt/cipher/tiger.c
221 * lib/libgcrypt/cipher/twofish.c
222 * lib/libgcrypt/cipher/whirlpool.c
223
af2f93ac
RM
2242009-11-16 Robert Millan <rmh.grub@aybabtu.com>
225
226 Fix build for systems without error().
227
228 * gnulib/error.c: New file (imported from Gnulib).
229 * gnulib/error.h: Likewise.
230 * conf/common.rmk (grub_mkisofs_SOURCES): Add `gnulib/error.c'.
231 * util/mkisofs/mkisofs.c (program_name): Remove `static' qualifier
232 (this variable is now used by error()).
233
73fb3dd5
FZ
2342009-11-16 Felix Zielcke <fzielcke@z-51.de>
235
814f5e96
FZ
236 * util/mkisofs/name.c (iso9660_file_length): Use isascii macro
237 instead of relying that char is signed.
73fb3dd5 238
a691ca33
VS
2392009-11-16 Vladimir Serbinenko <phcoder@gmail.com>
240
241 * fs/i386/pc/pxe.c (grub_pxefs_open): Correctly handle PXE choosing
242 blocksize different from specified.
243 (grub_pxefs_read): Likewise.
244
2af8f0f4
FZ
2452009-11-16 Felix Zielcke <fzielcke@z-51.de>
246
247 Enable ata.mod on x86_64-efi, i386-efi and i386-ieee1275.
248
249 * disk/ata.c (grub_ata_dumpinfo): Add a cast.
250 (grub_ata_readwrite): Likewise. Update 2 format strings.
251 (grub_atapi_read): Likewise.
252
253 * conf/i386-coreboot.rmk (pkglib_MODULES): Move `ata.mod' from here ...
254 * conf/i386.rmk (pkglib_MODULES): ... to here ...
255 * conf/x86_64-efi.rmk (pkglib_MODULES): ... and here.
256 * conf/i386-coreboot.rmk (ata_mod_SOURCES, ata_mod_CFLAGS)
257 (ata_mod_LDFLAGS): Move from here ...
258 * conf/i386.rmk: ... to here ...
259 * conf/x86_64-efi.rmk: ... and here.
260 * conf/i386-pc.rmk (pkglib_MODULES): Remove `ata.mod'
261 (ata_mod_SOURCES, ata_mod_CFLAGS, ata_mod_LDFLAGS): Remove.
262
83bdecaf
RM
2632009-11-16 Robert Millan <rmh.grub@aybabtu.com>
264
265 Relicense multiboot.h, with RMS' blessing.
266
267 * include/multiboot.h: Change to X11 license.
268
fd6fd3d7
RM
2692009-11-15 Robert Millan <rmh.grub@aybabtu.com>
270
271 Support --version in grub-mkisofs.
272
273 * util/mkisofs/mkisofs.c (rcsid): Remove variable.
274 (OPTION_VERSION): New macro.
275 (ld_options): Recognize --version.
276 (usage): Move `program_name' from here ...
277 (program_name): ... to here. Add `static' qualifier.
278 (main): Recognize `OPTION_VERSION'.
279
16a88c49
FZ
2802009-11-15 Felix Zielcke <fzielcke@z-51.de>
281
282 * Makefile.in (TARGET_CPPFLAGS): Replace `-isystem=$(srcdir)/include'
283 with `-nostdinc -isystem $(shell $(TARGET_CC) -print-file-name=include)'.
284
a4158476
RM
2852009-11-14 Robert Millan <rmh.grub@aybabtu.com>
286
287 Fix help2man generation for mkisofs.
288
289 * util/mkisofs/mkisofs.c (ld_options): Recognize --help.
290 (usage): Send output to stdout (rather than stderr).
291
fc2208b0
RM
2922009-11-14 Robert Millan <rmh.grub@aybabtu.com>
293
294 * conf/i386-coreboot.rmk (grub_mkrescue_SOURCES): Replace
295 `util/i386/coreboot/grub-mkrescue.in' with `util/grub-mkrescue.in'.
296 * conf/i386-pc.rmk (grub_mkrescue_SOURCES): Replace
297 `util/i386/pc/grub-mkrescue.in' with `util/grub-mkrescue.in'.
298 (bin_SCRIPTS): Add `grub-mkfloppy'.
299 (grub_mkfloppy_SOURCES): New variable.
300
301 * util/grub-mkrescue.in: New file.
302 * util/i386/pc/grub-mkfloppy.in: New file.
303
304 * util/i386/coreboot/grub-mkrescue.in: Remove.
305 * util/i386/pc/grub-mkrescue.in: Remove.
306
8d0edf4a
RM
3072009-11-13 Robert Millan <rmh.grub@aybabtu.com>
308
309 * include/grub/multiboot.h (struct grub_multiboot_header): Move
310 from here ...
311 * include/multiboot.h (struct multiboot_header): ... to here. Update
312 all users.
313 * include/grub/multiboot.h (struct grub_multiboot_info): Move
314 from here ...
315 * include/multiboot.h (struct multiboot_info): ... to here. Update
316 all users.
317 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): Move
318 from here ...
319 * include/multiboot.h (struct multiboot_mmap_entry): ... to here.
320 Update all users.
321 * include/grub/multiboot.h (struct grub_mod_list): Move
322 from here ...
323 * include/multiboot.h (struct multiboot_mod_list): ... to here.
324 Update all users.
325
a73f5969
RM
3262009-11-13 Robert Millan <rmh.grub@aybabtu.com>
327
328 * include/multiboot2.h (multiboot_word): Rename from this ...
329 (multiboot2_word): ... to this. Update all users.
330 (multiboot_header): Rename from this ...
331 (multiboot2_header): ... to this. Update all users.
332 (multiboot_tag_header): Rename from this ...
333 (multiboot2_tag_header): ... to this. Update all users.
334 (multiboot_tag_start): Rename from this ...
335 (multiboot2_tag_start): ... to this. Update all users.
336 (multiboot_tag_name): Rename from this ...
337 (multiboot2_tag_name): ... to this. Update all users.
338 (multiboot_tag_module): Rename from this ...
339 (multiboot2_tag_module): ... to this. Update all users.
340 (multiboot_tag_memory): Rename from this ...
341 (multiboot2_tag_memory): ... to this. Update all users.
342 (multiboot_tag_unused): Rename from this ...
343 (multiboot2_tag_unused): ... to this. Update all users.
344 (multiboot_tag_end): Rename from this ...
345 (multiboot2_tag_end): ... to this. Update all users.
346
1c8927f0
RM
3472009-11-13 Robert Millan <rmh.grub@aybabtu.com>
348
349 Disable Multiboot2 in i386-ieee1275. It didn't actually work, and on
350 this platform we should support Multiboot1 first.
351
352 * conf/i386-ieee1275.rmk (pkglib_MODULES): Remove `multiboot.mod'.
353 (multiboot_mod_SOURCES, multiboot_mod_CFLAGS)
354 (multiboot_mod_LDFLAGS, multiboot_mod_ASFLAGS): Remove.
355
6e1e0d89
RM
3562009-11-12 Robert Millan <rmh.grub@aybabtu.com>
357
358 * util/mkisofs/eltorito.c (init_boot_catalog): Handle return code
359 of write calls (converting them to fwrite() if they aren't already).
360 (get_torito_desc): Likewise.
361 * util/mkisofs/rock.c (generate_rock_ridge_attributes): Likewise.
362
7f2b34d8
RM
3632009-11-12 Robert Millan <rmh.grub@aybabtu.com>
364
365 * util/i386/pc/grub-install.in: Move from here ...
366 * util/grub-install.in: ... to here. Update all users.
367
c0ef3311
CW
3682009-11-11 Colin Watson <cjwatson@ubuntu.com>
369
370 * util/powerpc/ieee1275/grub-mkrescue.in: Fix --version output.
371
e1f240ff
RM
3722009-11-11 Robert Millan <rmh.grub@aybabtu.com>
373
374 Support for El Torito without floppy emulation.
375
376 * util/mkisofs/eltorito.c: Include `<errno.h>'.
377 (init_boot_catalog): Improve error handling.
378 (get_torito_desc): Don't use floppy emulation unless requested by
379 user. Patch boot information table when requested via
380 `-boot-info-table'.
381 * util/mkisofs/iso9660.h (struct eltorito_boot_info): New struct.
382 * util/mkisofs/mkisofs.c (use_eltorito_emul_floppy)
383 (use_boot_info_table): New variables.
384 (OPTION_BOOT_INFO_TABLE, OPTION_NO_EMUL_BOOT)
385 (OPTION_ELTORITO_EMUL_FLOPPY): New macros.
386 (ld_options): Handle `-boot-info-table', `-no-emul-boot' and
387 `--eltorito-emul-floppy'.
388 (main): Handle `OPTION_BOOT_INFO_TABLE', `OPTION_NO_EMUL_BOOT'
389 and `OPTION_ELTORITO_EMUL_FLOPPY'.
390 * util/mkisofs/mkisofs.h (use_eltorito_emul_floppy)
391 (use_boot_info_table, get_731): New prototypes.
392 * util/mkisofs/write.c (get_731): New function.
393
af7d4de5
FZ
3942009-11-11 Felix Zielcke <fzielcke@z-51.de>
395
396 Fix the generation of the man page.
397
398 * util/pc/i386/grub-install.in: Source
399 `${libdir}/grub/grub-mkconfig_lib' after options have been parsed.
400
2c55dbc0
RM
4012009-11-11 Robert Millan <rmh.grub@aybabtu.com>
402
403 Large file support for grub-mkisofs.
404
405 * conf/common.rmk (grub_mkisofs_CFLAGS): Add `-D_FILE_OFFSET_BITS=64'.
406 * util/mkisofs/mkisofs.c (next_extent, last_extent)
407 (session_start): Upgrade type to `uint64_t'. Update all users.
408 * util/mkisofs/mkisofs.h: Include `<stdint.h>'.
409 (struct directory_entry): Upgrade type of `starting_block' and
410 `size' to `uint64_t'. Update all users.
411 (struct deferred): Remove unused structure.
412 (xfwrite): Upgrade type of `count' and `size' to `uint64_t'.
413 Update all users.
414 * util/mkisofs/tree.c (stat_filter, lstat_filter): Return -1 when
415 file is larger than `UINT32_MAX'.
416 * util/mkisofs/write.c (xfwrite): Upgrade type of `count' and
417 `size' to `uint64_t'. Update all users. Fix handling of fwrite()
418 return value.
419 (struct deferred_write): Upgrade type of `extent' and `size' to
420 `uint64_t'. Update all users.
421 (last_extent_written): Upgrade type to `uint64_t'. Update all
422 users.
423 (write_one_file): Upgrade type of `count' and `size' to `uint64_t'.
424 Update all users. Upgrade type of `remain' to `int64_t' and
425 `use' to `size_t'. Use error() to handle fread() errors.
426 (write_files): Rely on write_one_file() rather than calling
427 xfwrite() directly.
428
6a9cead5
FZ
4292009-11-09 Felix Zielcke <fzielcke@z-51.de>
430
431 * util/mkisofs/mkisofs.c (ld_options): Fix a spelling mistake.
432
4825d790
RM
4332009-11-09 Robert Millan <rmh.grub@aybabtu.com>
434
435 * util/mkisofs/fnmatch.c: Remove.
436 * util/mkisofs/getopt1.c: Likewise.
437 * util/mkisofs/getopt.c: Likewise.
438 * conf/common.rmk (grub_mkisofs_SOURCES): Replace
439 `util/mkisofs/fnmatch.c', `util/mkisofs/getopt1.c' and
440 `util/mkisofs/getopt.c' with `gnulib/fnmatch.c',
441 `gnulib/getopt1.c' and `gnulib/getopt.c'.
442 (grub_mkisofs_CFLAGS): Add `-I$(srcdir)/gnulib'.
443
444 * configure.ac: Detect `mingw32msvc' host_os.
445 Check for lstat(), getuid() and getgid().
446
447 * util/mkisofs/joliet.c: Include `<stdint.h>'. Replace all
448 instances of `u_char' with `uint8_t'.
449
450 * util/mkisofs/mkisofs.h: Include `<sys/stat.h>'.
451 [!HAVE_GETUID] (getuid): New function (stub).
452 [!HAVE_GETGID] (getgid): Likewise.
453 [!HAVE_LSTAT] (lstat): Likewise.
454 [!S_IROTH] (S_IROTH): New macro (dummy).
455 [!S_IRGRP] (S_IRGRP): Likewise.
456
84b860d8
RM
4572009-11-09 Robert Millan <rmh.grub@aybabtu.com>
458
459 * gnulib/fnmatch_loop.c (EXT): Fix warning (signed and unsigned type in
460 conditional expression).
461
66e9b712
RM
4622009-11-09 Robert Millan <rmh.grub@aybabtu.com>
463
464 Import from Gnulib.
465
466 * gnulib/fnmatch.c: New file.
467 * gnulib/fnmatch.h: Likewise.
468 * gnulib/fnmatch_loop.c: Likewise.
469 * gnulib/getopt.c: Likewise.
470 * gnulib/getopt.h: Likewise.
471 * gnulib/getopt1.c: Likewise.
472 * gnulib/getopt_int.h: Likewise.
473 * gnulib/gettext.h: Likewise.
474
34f4a5b0
RM
4752009-11-09 Robert Millan <rmh.grub@aybabtu.com>
476
477 * normal/dyncmd.c (read_command_list): Replace `0' with `NULL'.
478 * normal/handler.c (read_handler_list): Likewise.
479
ac451143
RM
4802009-11-09 Robert Millan <rmh.grub@aybabtu.com>
481
482 Misc cleanup.
483
484 * kern/command.c (grub_register_command_prio): Use
485 grub_zalloc() instead of explicitly zeroing data.
486 * kern/list.c: Include `<grub/mm.h>'.
487 (grub_named_list_find): Replace `0' with `NULL'.
488 * normal/autofs.c (struct grub_fs_module_list): Remove ad-hoc type.
489 (fs_module_list): Change type to `grub_named_list_t'. Update all
490 users.
491 * normal/dyncmd.c (read_command_list): Add space between function
492 call and parenthesis.
493 * normal/handler.c (read_handler_list): Likewise.
494
4089b167
RM
4952009-11-09 Robert Millan <rmh.grub@aybabtu.com>
496
497 * normal/auth.c (punishment_delay): Moved from here ...
498 (grub_auth_strcmp): ... to here (inside function).
499
325f5037
RM
5002009-11-09 Robert Millan <rmh.grub@aybabtu.com>
501
502 * include/grub/list.h (struct grub_named_list): Remove `const'
503 qualifier from `name'.
504 (struct grub_prio_list): Likewise.
505
7aea29a3
RM
5062009-11-09 Robert Millan <rmh.grub@aybabtu.com>
507
508 * normal/auth.c: Include `<grub/time.h>'.
509 (grub_auth_strcmp): Replace `strcmp' with `grub_strcmp'.
510
3fd6f044
RM
5112009-11-09 Robert Millan <rmh.grub@aybabtu.com>
512
513 * normal/auth.c (punishment_delay): New variable.
514 (grub_auth_strcmp): Rewrite using grub_get_time_ms ().
515 (grub_auth_check_authentication): Punish failed login attempts with
516 an incremental (2^N) delay.
517
a4cd68e4
RM
5182009-11-09 Robert Millan <rmh.grub@aybabtu.com>
519
520 * conf/common.rmk (grub_mkisofs_CFLAGS): Prefix include
521 path with $(srcdir).
522
7ad12f43
VS
5232009-11-09 Vladimir Serbinenko <phcoder@gmail.com>
524
525 * normal/auth.c (grub_auth_strcmp): Fixed incorrect variable usage.
526
c1129f03
RM
5272009-11-09 Robert Millan <rmh.grub@aybabtu.com>
528
529 * util/i386/coreboot/grub-mkrescue.in: New file.
530 * conf/i386-coreboot.rmk (bin_SCRIPTS, grub_mkrescue_SOURCES): New
531 variables.
532
533 * conf/common.rmk (bin_UTILITIES): Add `grub-mkisofs'.
534 (grub_mkisofs_SOURCES, grub_mkisofs_CFLAGS): New variables.
535 * configure.ac: Add header and function checks to satisfy grub-mkisofs
536 requirements.
537 * util/mkisofs/defaults.h: New file.
538 * util/mkisofs/eltorito.c: Likewise.
539 * util/mkisofs/exclude.h: Likewise.
540 * util/mkisofs/fnmatch.c: Likewise.
541 * util/mkisofs/getopt.c: Likewise.
542 * util/mkisofs/getopt1.c: Likewise.
543 * util/mkisofs/hash.c: Likewise.
544 * util/mkisofs/include/fctldefs.h: Likewise.
545 * util/mkisofs/include/mconfig.h: Likewise.
546 * util/mkisofs/include/prototyp.h: Likewise.
547 * util/mkisofs/include/statdefs.h: Likewise.
548 * util/mkisofs/iso9660.h: Likewise.
549 * util/mkisofs/joliet.c: Likewise.
550 * util/mkisofs/match.c: Likewise.
551 * util/mkisofs/match.h: Likewise.
552 * util/mkisofs/mkisofs.c: Likewise.
553 * util/mkisofs/mkisofs.h: Likewise.
554 * util/mkisofs/multi.c: Likewise.
555 * util/mkisofs/name.c: Likewise.
556 * util/mkisofs/rock.c: Likewise.
557 * util/mkisofs/tree.c: Likewise.
558 * util/mkisofs/write.c: Likewise.
559
ec8bb77d
VS
5602009-11-09 Vladimir Serbinenko <phcoder@gmail.com>
561
562 * normal/auth.c (grub_auth_strcmp): Fix bug which resulted in function
563 being insecure.
564
3716b12c
RM
5652009-11-08 Robert Millan <rmh.grub@aybabtu.com>
566
567 * util/i386/pc/grub-mkrescue.in: Fix miss-identification as
568 `grub-mkimage' (and use $0 when possible).
569
b97b7b91
RM
5702009-11-08 Robert Millan <rmh.grub@aybabtu.com>
571
572 * kern/i386/multiboot_mmap.c (grub_machine_mmap_init): Improve
573 error message for excessively large memory map.
574
04114812
RM
5752009-11-08 Robert Millan <rmh.grub@aybabtu.com>
576
577 * autogen.sh: Use `sh gendistlist.sh' to avoid reliing on
578 executable bit.
579
e4eb2373
RM
5802009-11-08 Robert Millan <rmh.grub@aybabtu.com>
581
582 * kern/i386/multiboot_mmap.c (grub_machine_mmap_init): Improve error
583 message for coreboot users.
584
c926e1d5 5852009-11-07 Robert Millan <rmh.grub@aybabtu.com>
586
587 Fix build with GNU gold.
588
589 * conf/i386-pc.rmk (boot_img_LDFLAGS, pxeboot_img_LDFLAGS)
590 (diskboot_img_LDFLAGS, lnxboot_img_LDFLAGS)
591 (cdboot_img_LDFLAGS): Prepend `0x' qualifier to hexadecimal
592 link addresses.
593 * aclocal.m4: Likewise.
594
86e5b1db 5952009-11-04 Felix Zielcke <fzielcke@z-51.de>
596
597 * configure.ac (AC_PREREQ): Bump to 2.59d.
598 * INSTALL: Make it more clear when Autoconf and Ruby are
599 needed and when to run `./autogen.sh'.
600
246cd78f 6012009-11-03 Samuel Thibault <samuel.thibault@ens-lyon.org>
602
603 * util/grub.d/30_os-prober.in: Restore default behavior for unsupported
604 OSes.
605
4f9dfb37 6062009-11-02 Samuel Thibault <samuel.thibault@ens-lyon.org>
607
608 * util/grub.d/30_os-prober.in: Add GNU/Hurd support
609
b82bd5e1 6102009-11-02 Samuel Thibault <samuel.thibault@ens-lyon.org>
611
612 * util/grub.d/10_hurd.in: Drop /dev/ prefix from root device path before
613 giving it to GNU Mach.
614
ff1a9bca 6152009-11-02 Samuel Thibault <samuel.thibault@ens-lyon.org>
616
617 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): Subtract 1 from
618 GNU partition number to get internal GRUB partition number.
619
61697d9c 6202009-11-02 Samuel Thibault <samuel.thibault@ens-lyon.org>
621
622 * util/grub.d/10_hurd.in: Call prepare_grub_to_access_device
623 ${GRUB_DEVICE_BOOT} before loading /boot kernel.
624
a50569e1 6252009-11-01 Robert Millan <rmh.grub@aybabtu.com>
626
627 Based on patch from BVK Chaitanya <bvk.groups@gmail.com>
628 * kern/misc.c (grub_strchr, grub_strrchr): Fix to handle c == '\0'
629 case.
630
5b153867 6312009-11-01 Felix Zielcke <fzielcke@z-51.de>
632
633 * Makefile.in (TARGET_CPPFLAGS): Add `-I$(srcdir)/include'.
634
d9e2cd70 6352009-10-30 Robert Millan <rmh.grub@aybabtu.com>
636
637 Fix build problem.
638
639 * Makefile.in (TARGET_CPPFLAGS): Replace `-nostdinc' with
640 `-isystem=$(srcdir)/include'.
641
805111a4 6422009-10-30 Robert Millan <rmh.grub@aybabtu.com>
643
644 * util/i386/pc/grub-install.in: Remove hint that device.map should be
645 checked (grub-install doesn't currently rely on it).
646
fa6e945f 6472009-10-29 Robert Millan <rmh.grub@aybabtu.com>
648
649 Revert SVN r2660.
650
651 * conf/common.rmk (script/sh/lexer.c_DEPENDENCIES): Moved from here ...
652 * conf/i386-coreboot.rmk (script/sh/lexer.c_DEPENDENCIES): ... to here.
653 * conf/i386-efi.rmk (script/sh/lexer.c_DEPENDENCIES): ... and here.
654 * conf/i386-ieee1275.rmk: Likewise.
655 * conf/i386-pc.rmk: Likewise.
656 * conf/powerpc-ieee1275.rmk: Likewise.
657 * conf/sparc64-ieee1275.rmk: Likewise.
658 * conf/x86_64-efi.rmk: Likewise.
659
cee15086 6602009-10-28 Robert Millan <rmh.grub@aybabtu.com>
661
662 * Makefile.in (TARGET_CPPFLAGS): Add `-nostdinc'.
663
95b9239e 6642009-10-28 Robert Millan <rmh.grub@aybabtu.com>
665
666 * include/grub/misc.h: Stop checking for APPLE_CC.
667
2ed19dfd 6682009-10-28 Robert Millan <rmh.grub@aybabtu.com>
669
670 * kern/i386/coreboot/init.c (grub_exit): Reimplement in a way that
671 doesn't cause an infinite call loop.
672
fdcdde19 6732009-10-28 Felix Zielcke <fzielcke@z-51.de>
674
675 * commands/acpi.c (grub_cmd_acpi): Fix the out of memory error
676 strings.
677
cefabfe1 6782009-10-26 Robert Millan <rmh.grub@aybabtu.com>
679
680 * autogen.sh: Support addition of external modules via `GRUB_CONTRIB'
681 variable.
682 * Makefile.in: Likewise.
683
ed96ab6d 6842009-10-26 Robert Millan <rmh.grub@aybabtu.com>
685
686 * gendistlist.sh: Simplify .svn check. Skip .bzr as well.
687
0579b753 6882009-10-26 Robert Millan <rmh.grub@aybabtu.com>
689
690 * Makefile.in (RMKFILES): Rewrite using $(wildcard).
691
478df409 6922009-10-26 Robert Millan <rmh.grub@aybabtu.com>
693
694 * disk/scsi.c: Remove `<grub/machine/kernel.h>' (not needed).
695
083d1679 6962009-10-26 Robert Millan <rmh.grub@aybabtu.com>
697
698 * gensymlist.sh.in (COMPILE_TIME_ASSERT): Copy macro declaration
699 from here ...
700 * include/grub/misc.h (COMPILE_TIME_ASSERT): ... to here.
701
5947ae32 7022009-10-26 Robert Millan <rmh.grub@aybabtu.com>
703
704 * Makefile.in (docs/grub.info): Use make syntax to ignore errors
705 in $(MAKEINFO) invocation. This makes it clear in output that
706 errors are being ignored.
707
94180ff6 7082009-10-26 Robert Millan <rmh.grub@aybabtu.com>
709
710 * conf/i386-coreboot.rmk (script/sh/lexer.c_DEPENDENCIES): Moved
711 from here ...
712 * conf/common.rmk (script/sh/lexer.c_DEPENDENCIES): ... to here.
713 * conf/i386-efi.rmk (script/sh/lexer.c_DEPENDENCIES): Remove.
714 * conf/i386-ieee1275.rmk: Likewise.
715 * conf/i386-pc.rmk: Likewise.
716 * conf/powerpc-ieee1275.rmk: Likewise.
717 * conf/sparc64-ieee1275.rmk: Likewise.
718 * conf/x86_64-efi.rmk: Likewise.
719
9031b03a 7202009-10-26 Colin Watson <cjwatson@ubuntu.com>
721
722 * util/grub-editenv.c (main): If only a command is given, use
723 DEFAULT_DIRECTORY "/" GRUB_ENVBLK_DEFCFG as a default file name.
724 (usage): FILENAME is now optional and has a default.
725
e4f6809b 7262009-10-26 Colin Watson <cjwatson@ubuntu.com>
727
728 Improve grub-mkconfig performance when there are several menu
729 entries on a single filesystem.
730
731 * util/grub.d/10_linux.in (linux_entry): Cache the output of
732 prepare_grub_to_access_device.
733 * util/grub.d/10_kfreebsd.in (kfreebsd_entry): Likewise.
734 * util/grub.d/30_os-prober.in: Likewise.
735
67937d4d 7362009-10-26 Robert Millan <rmh.grub@aybabtu.com>
737
738 * util/grub.d/10_freebsd.in: Remove.
739 * util/grub.d/10_kfreebsd.in: New file (based on 10_linux.in).
740 * configure.ac: Set host_kernel=kfreebsd for FreeBSD and GNU/kFreeBSD.
741
ee3756cc 7422009-10-26 Robert Millan <rmh.grub@aybabtu.com>
743
5c35048e 744 * docs/grub.cfg: Fix example usage of *BSD loaders.
ee3756cc 745
4dea1c6f 7462009-10-25 Robert Millan <rmh.grub@aybabtu.com>
747
748 * util/i386/pc/grub-setup.c (setup): Add missing parameter to
749 grub_util_error() call.
750
042484d7 7512009-10-25 Robert Millan <rmh.grub@aybabtu.com>
752
753 * include/grub/fs.h [GRUB_UTIL] (struct grub_fs): Add
754 `reserved_first_sector' member.
755 * fs/ext2.c [GRUB_UTIL] (grub_ext2_fs): Initialize
756 `reserved_first_sector' to 1.
757 * fs/fat.c [GRUB_UTIL] (grub_fat_fs): Likewise.
758 * fs/ntfs.c [GRUB_UTIL] (grub_ntfs_fs): Likewise.
759 * fs/hfsplus.c [GRUB_UTIL] (grub_hfsplus_fs): Likewise.
760 * util/i386/pc/grub-setup.c (setup): Add safety check that probes for
761 filesystems which begin at first sector.
762 (options): New option --skip-fs-probe.
763 (main): Handle --skip-fs-probe and pass it to setup().
764
d64448a7 7652009-10-25 Robert Millan <rmh.grub@aybabtu.com>
766
767 * include/grub/misc.h: Fix wrong evaluation of APPLE_CC.
768 (memset): Fix function prototype.
769
508d42ec 7702009-10-25 Robert Millan <rmh.grub@aybabtu.com>
7712009-10-25 Vasily Averin <vvs@parallels.com>
772
773 * fs/ext2.c (grub_ext2_iterate_dir): Avoid infinite loop when
774 `dirent.direntlen == 0'.
775
b240e30c 7762009-10-25 Robert Millan <rmh.grub@aybabtu.com>
777
778 * fs/cpio.c [MODE_USTAR]: Initialize `tar' module instead of
779 `cpio'.
780 [! MODE_USTAR]: Initialize `cpio' module instead of `tar'.
781
346e7fbe 7822009-10-25 Robert Millan <rmh.grub@aybabtu.com>
783
784 * configure.ac: Check for `__ashldi3', `__ashrdi3', `__lshrdi3',
785 `__trampoline_setup' and `__ucmpdi2'.
786 * include/grub/powerpc/libgcc.h: Only export symbols for functions
787 that libgcc provides.
788
cdb308b0 7892009-10-25 Robert Millan <rmh.grub@aybabtu.com>
790
791 * include/grub/powerpc/libgcc.h (memset): Remove function prototype.
792 * include/grub/sparc64/libgcc.h (memset): Likewise.
793 * include/grub/misc.h (memset, memcmp): New function prototypes.
794
fb26abc2 7952009-10-25 Robert Millan <rmh.grub@aybabtu.com>
796
797 * fs/cpio.c [MODE_USTAR]: Finish `tar' module instead of
798 `cpio'.
799 [! MODE_USTAR]: Finish `cpio' module instead of `tar'.
800
f6693890 8012009-10-25 Robert Millan <rmh.grub@aybabtu.com>
802
803 Patch from Samuel Thibault <samuel.thibault@ens-lyon.org>
804 * docs/grub.cfg: Compensate for recent change in multiboot
805 loader (since 2009-08-14 it won't pass filename to payload).
806 * util/grub.d/10_hurd.in: Likewise.
807
0933cdc0 8082009-10-21 Felix Zielcke <fzielcke@z-51.de>
809
810 * config.guess: Update to latest version from config git
811 repository.
812 * config.sub: Likewise.
813
3b2fe8c2 8142009-10-20 Robert Millan <rmh.grub@aybabtu.com>
815
816 Fix build on sparc64.
817
818 * configure.ac: Perform checks for libgcc symbols before
819 adding `-nostdlib' to LDFLAGS.
820
46695a62 8212009-10-16 Vladimir Serbinenko <phcoder@gmail.com>
822
823 Let user specify OpenBSD root device.
824
825 * loader/i386/bsd.c (openbsd_root): New variable.
826 (openbsd_opts): New option 'root'.
827 (OPENBSD_ROOT_ARG): New macro.
828 (grub_openbsd_boot): Use 'openbsd_root'.
829 (grub_cmd_openbsd): Fill 'openbsd_root'.
830
d2b6b7fc 8312009-10-16 Robert Millan <rmh.grub@aybabtu.com>
832
833 * NEWS: Misc adjustments.
834
421bd7ac 8352009-10-16 Vladimir Serbinenko <phcoder@gmail.com>
836
837 * NEWS: Mentioned XNU, ACPI, gptsync, password and parttool.
838
f1d29d87 8392009-10-16 Robert Millan <rmh.grub@aybabtu.com>
840
841 * configure.ac: Bump version to 1.97.
842
6f3cd880 8432009-10-16 Colin Watson <cjwatson@ubuntu.com>
844
845 * configure.ac (TARGET_CFLAGS): Add -mno-mmx -mno-sse -mno-sse2
846 -mno-3dnow on x86 architectures. Some toolchains enable these
847 features by default, but they rely on registers that aren't enabled
848 in GRUB. Thanks to Vladimir Serbinenko for the suggestion.
849
035f7122 8502009-10-15 Robert Millan <rmh.grub@aybabtu.com>
851
852 Make entry text a bit more readable.
853
854 * util/grub.d/10_linux.in: Add `with' before `Linux'.
855
44998e58 8562009-10-15 Vladimir Serbinenko <phcoder@gmail.com>
857
858 * loader/i386/pc/xnu.c (grub_xnu_set_video): Fix loading splash image.
859
cd2851b3 8602009-10-15 Vladimir Serbinenko <phcoder@gmail.com>
861
862 * commands/xnu_uuid.c (grub_cmd_xnu_uuid): Remove duplicated bitwise
863 operations.
864
c6f3b249 8652009-10-15 Vladimir Serbinenko <phcoder@gmail.com>
866
867 * configure.ac: Add missing dollar.
868
6b5886ba 8692009-10-15 Vladimir Serbinenko <phcoder@gmail.com>
870
871 Revert 2009-06-10 Pavel Roskin <proski@gnu.org>
872
873 * configure.ac: Put checks for __bswapsi2 and __bswapdi2.
874 * include/grub/powerpc/libgcc.h: Don't use weak attribute for all
875 exports.
876 * include/grub/sparc64/libgcc.h: Likewise. Use
877 preprocessor conditionals.
878
e9d66f6d 8792009-10-14 Robert Millan <rmh.grub@aybabtu.com>
880
881 * conf/common.rmk (grub-dumpbios): Remove rule.
882 (sbin_SCRIPTS, CLEANFILES): Remove `grub-dumpbios'.
883 * util/grub-dumpbios.in: Remove file.
884
9155bc17 8852009-10-14 Robert Millan <rmh.grub@aybabtu.com>
886
887 Refer to kernel of FreeBSD "kFreeBSD" to avoid confusion between
888 the Operating System (FreeBSD) and its kernel (kernel of FreeBSD).
889
890 * loader/i386/bsd.c (grub_freebsd_boot): Read kernel environment
891 from "kFreeBSD" namespace (rather than "FreeBSD"). Update all
892 users.
893
894 (GRUB_MOD_INIT (bsd)): Rename "freebsd" command to "kfreebsd",
895 "openbsd" to "kopenbsd", "netbsd" to "knetbsd", "freebsd_loadenv"
896 to "kfreebsd_loadenv", "freebsd_module" to "kfreebsd_module",
897 and "freebsd_module_elf" to "kfreebsd_module_elf". Update all
898 users.
899
bf7f7a18 9002009-10-12 Robert Millan <rmh.grub@aybabtu.com>
901
902 * term/tparm.c: Switch to GPLv3.
903
86564c26 9042009-10-09 Robert Millan <rmh.grub@aybabtu.com>
905
906 * include/grub/i386/cpuid.h: Add header protection.
907
5c936493 9082009-10-09 Robert Millan <rmh.grub@aybabtu.com>
909
910 Fail gracefuly when attempting to load 64-bit kFreeBSD on IA32 CPU.
911
912 * include/grub/i386/cpuid.h: New file.
913 * commands/i386/cpuid.c: Include `<grub/i386/cpuid.h>'.
914 (has_longmode): Rename to ...
915 (grub_cpuid_has_longmode): ... this. Update all users. Remove
916 `static' attribute.
917 * loader/i386/bsd.c: Include `<grub/i386/cpuid.h>'.
918 (grub_bsd_load_elf): Fail if load of 64-bit kernel was requested
919 on a CPU that doesn't implement AMD64 instruction set.
920
186e7cf2 9212009-10-06 Colin Watson <cjwatson@ubuntu.com>
922
923 * Makefile.in (docs/stamp-vti): Depend on configure.ac as well, so
924 that version.texi is rebuilt on version number changes.
925
83b65c4a 9262009-10-06 Colin Watson <cjwatson@ubuntu.com>
927
928 * Makefile.in: Don't set info_INFOS unless makeinfo was found.
929 Fixes bug #27602.
930
d244281c 9312009-10-06 Colin Watson <cjwatson@ubuntu.com>
932
933 * util/i386/pc/grub-install.in: Source
934 ${libdir}/grub/grub-mkconfig_lib before option processing, in order
935 that the --grub-probe option will work.
936 * util/sparc64/ieee1275/grub-install.in: Likewise.
937
da25306d 9382009-10-05 Robert Millan <rmh.grub@aybabtu.com>
939
940 * configure.ac: Bump version to 1.97~beta4.
941
e8ee83c0 9422009-10-03 Robert Millan <rmh.grub@aybabtu.com>
943
944 Resync grub-mkdevicemap in x86_64-efi.
945
946 * conf/x86_64-efi.rmk (sbin_UTILITIES): Enable `grub-mkdevicemap'.
947 (grub_mkdevicemap_SOURCES): Add missing `util/deviceiter.c' and
948 `util/devicemap.c'.
949
50dcabcf 9502009-10-01 Colin Watson <cjwatson@ubuntu.com>
951
952 * util/grub-editenv.c (create_envblk_file): Write new block with a
953 .new suffix and then rename it into place, to ensure atomic
954 creation.
955
0e51c3a7 9562009-09-28 Robert Millan <rmh.grub@aybabtu.com>
957
958 Do not automatically install headers.
959
960 * Makefile.in (include_DATA): Remove. Update all users.
961
31299a95 9622009-09-26 Robert Millan <rmh.grub@aybabtu.com>
963
964 * conf/common.rmk (pkglib_MODULES): Remove `lua.mod'.
965 (lua_mod_SOURCES, lua_mod_CFLAGS, lua_mod_LDFLAGS): Remove.
966
967 * util/osdetect.lua: Remove.
968 * script/lua/lauxlib.c: Likewise.
969 * script/lua/ldebug.c: Likewise.
970 * script/lua/grub_main.c: Likewise.
971 * script/lua/lauxlib.h: Likewise.
972 * script/lua/ldebug.h: Likewise.
973 * script/lua/ltablib.c: Likewise.
974 * script/lua/liolib.c: Likewise.
975 * script/lua/lstrlib.c: Likewise.
976 * script/lua/lualib.h: Likewise.
977 * script/lua/ldo.c: Likewise.
978 * script/lua/ldump.c: Likewise.
979 * script/lua/ldo.h: Likewise.
980 * script/lua/loslib.c: Likewise.
981 * script/lua/lundump.c: Likewise.
982 * script/lua/grub_lib.c: Likewise.
983 * script/lua/ldblib.c: Likewise.
984 * script/lua/lundump.h: Likewise.
985 * script/lua/lmem.c: Likewise.
986 * script/lua/grub_lib.h: Likewise.
987 * script/lua/lmathlib.c: Likewise.
988 * script/lua/lstate.c: Likewise.
989 * script/lua/ltm.c: Likewise.
990 * script/lua/lvm.c: Likewise.
991 * script/lua/lmem.h: Likewise.
992 * script/lua/lstate.h: Likewise.
993 * script/lua/ltm.h: Likewise.
994 * script/lua/ltable.c: Likewise.
995 * script/lua/lvm.h: Likewise.
996 * script/lua/llex.c: Likewise.
997 * script/lua/lgc.c: Likewise.
998 * script/lua/grub_lua.h: Likewise.
999 * script/lua/loadlib.c: Likewise.
1000 * script/lua/lfunc.c: Likewise.
1001 * script/lua/lopcodes.c: Likewise.
1002 * script/lua/lparser.c: Likewise.
1003 * script/lua/ltable.h: Likewise.
1004 * script/lua/llex.h: Likewise.
1005 * script/lua/lgc.h: Likewise.
1006 * script/lua/lfunc.h: Likewise.
1007 * script/lua/lbaselib.c: Likewise.
1008 * script/lua/lopcodes.h: Likewise.
1009 * script/lua/lparser.h: Likewise.
1010 * script/lua/lzio.c: Likewise.
1011 * script/lua/linit.c: Likewise.
1012 * script/lua/lobject.c: Likewise.
1013 * script/lua/llimits.h: Likewise.
1014 * script/lua/lstring.c: Likewise.
1015 * script/lua/lzio.h: Likewise.
1016 * script/lua/lapi.c: Likewise.
1017 * script/lua/lcode.c: Likewise.
1018 * script/lua/lua.h: Likewise.
1019 * script/lua/lobject.h: Likewise.
1020 * script/lua/lstring.h: Likewise.
1021 * script/lua/lapi.h: Likewise.
1022 * script/lua/lcode.h: Likewise.
1023 * script/lua/luaconf.h: Likewise.
1024
cb8a2c38 10252009-09-26 Colin Watson <cjwatson@ubuntu.com>
1026
1027 * docs/grub.texi (Command-line and menu entry commands): Document
1028 date and echo commands.
1029
6b9b6276 10302009-09-24 Pavel Roskin <proski@gnu.org>
1031
1032 * include/grub/kernel.h (struct grub_module_header): Remove
1033 `grub_module_header_types'. Make `type' unsigned. Make `size'
1034 32-bit on all platforms.
1035 * util/elf/grub-mkimage.c (load_modules): Treat `type' as an
1036 8-bit field. Use grub_host_to_target32() for `size'.
1037 * util/i386/efi/grub-mkimage.c (make_mods_section): Likewise.
1038 * util/i386/pc/grub-mkimage.c (generate_image): Likewise.
1039 * util/sparc64/ieee1275/grub-mkimage.c (generate_image): Likewise.
1040
4e5a02a7 10412009-09-24 Robert Millan <rmh.grub@aybabtu.com>
1042
1043 Fix "lost keypress" bug in at_keyboard.
1044
1045 * term/i386/pc/at_keyboard.c (grub_at_keyboard_checkkey): New function.
1046 Checks for readyness of input buffer (without flushing it).
1047 (grub_at_keyboard_term): Use grub_at_keyboard_checkkey() rather
1048 than grub_at_keyboard_getkey_noblock() for `checkkey' struct member.
1049
c6dcedf6 10502009-09-24 Robert Millan <rmh.grub@aybabtu.com>
1051
1052 * util/i386/pc/grub-mkimage.c (generate_image): Enclose BIOS-specific
1053 size check within GRUB_MACHINE_PCBIOS section.
1054
74c958b1 10552009-09-24 Robert Millan <rmh.grub@aybabtu.com>
1056
1057 * include/grub/i386/at_keyboard.h (KEYBOARD_ISREADY): Negate
1058 return value.
1059 * term/i386/pc/at_keyboard.c (grub_keyboard_getkey): Negate
1060 KEYBOARD_ISREADY check.
1061 (grub_at_keyboard_checkkey): Rename to ...
1062 (grub_at_keyboard_getkey_noblock): ... this. Update all users.
1063 Remove gratuitous cast.
1064
ff420223 10652009-09-23 Colin Watson <cjwatson@ubuntu.com>
1066
1067 * configure.ac: Call AC_PROG_MKDIR_P.
1068 * Makefile.in (docs/stamp-vti): Create docs directory. Create
1069 version.texi in $(builddir) rather than $(srcdir).
1070 (docs/grub.info): Create docs directory. Prepend $(builddir)/docs
1071 to makeinfo's @include search path.
1072
d96875df 10732009-09-23 Felix Zielcke <fzielcke@z-51.de>
1074
1075 * util/grub-mkconfig_lib.in (grub_file_is_not_garbage): Cope with `*.dpkg-*'
1076
9b3f8365 10772009-09-23 Felix Zielcke <fzielcke@z-51.de>
1078
1079 * util/grub-mkconfig_lib.in (grub_file_is_not_garbage): Add support
1080 for `*.dpkg-new'.
1081
c44c90db 10822009-09-21 Colin Watson <cjwatson@ubuntu.com>
1083
1084 Build info documentation. Some code borrowed from Automake.
1085
1086 * configure.ac: Check for makeinfo.
1087 * Makefile.in (MAKEINFO, INFOS, info_INFOS): New variables.
1088 (MAINTAINER_CLEANFILES): Add $(INFOS), docs/stamp-vti, and
1089 docs/version.texi.
1090 (MOSTLYCLEANFILES): Add vti.tmp.
1091 (docs/version.texi, docs/stamp-vti): Update automatically.
1092 (docs/grub.info): Build info documentation. Use --force and ignore
1093 errors for now.
1094 (all-local): Add $(INFOS).
1095 (install-local): Install info files.
1096 (uninstall): Uninstall info files.
1097 * docs/version.texi: Remove from revision control. This file is
1098 automatically generated on build now.
1099 * gendistlist.sh: Add `*.info'.
1100
e0b37bb5 11012009-09-21 Felix Zielcke <fzielcke@z-51.de>
1102
1103 * kern/term.c: Fix indentation.
1104
5a78865b 11052009-09-21 Felix Zielcke <fzielcke@z-51.de>
1106
1107 * util/hostdisk.c: Fix a comment.
1108
dace7e8a 11092009-09-20 Robert Millan <rmh.grub@aybabtu.com>
1110
1111 Fix regression introduced in r2539.
1112
1113 * term/usb_keyboard.c (USB_HID_DEVICE_TO_HOST): Change from 0x61
1114 to 0xA1.
1115
a83d079b 11162009-09-19 Colin Watson <cjwatson@ubuntu.com>
1117
1118 * util/grub.d/30_os-prober.in: Don't throw away stderr from
4cbbccec 1119 os-prober. Under normal operation, it does not print anything to
1120 stderr; if it does, we need to debug it, and throwing away stderr
1121 makes that excessively difficult.
a83d079b 1122
be94a509 11232009-09-16 Vladimir Serbinenko <phcoder@gmail.com>
1124
1125 * mmap/mmap.c (grub_cmd_badram): Fix off-by-one error.
1126
63f745e8 11272009-09-16 Robert Millan <rmh.grub@aybabtu.com>
1128
1129 * aclocal.m4 (AC_LANG_PROGRAM): New macro. Overrides stock
1130 AC_LANG_PROGRAM from autoconf.
1131 (grub_ASM_USCORE, grub_PROG_OBJCOPY_ABSOLUTE): Add missing
1132 prototypes (fixes warning).
1133
1134 * configure.ac: Add `-Werror' to TARGET_CFLAGS unless
1135 `--disable-werror' was used.
1136
bbb2a70f 11372009-09-16 Robert Millan <rmh.grub@aybabtu.com>
1138
1139 * partmap/msdos.c (pc_partition_map_iterate): Fix possible use of
1140 uninitialized `lastaddr'.
1141
77c24f1d 11422009-09-15 Vladimir Serbinenko <phcoder@gmail.com>
1143
0f0b8c87 1144 * partmap/msdos.c (pc_partition_map_iterate): Detect and break loops.
77c24f1d 1145
07197f23 11462009-09-14 Colin Watson <cjwatson@ubuntu.com>
1147
1148 * commands/test.c (get_fileinfo): Return immediately if
1149 grub_fs_probe fails.
1150
dabf1798 11512009-09-14 José Martínez <xosemp@gmail.com>
1152
1153 * commands/acpi.c (grub_cmd_acpi): Fix loading ACPI tables from file.
1154
d52109a7 11552009-09-14 Colin Watson <cjwatson@ubuntu.com>
1156
1157 * util/grub.d/30_os-prober.in: Cope with Windows 7 in os-prober
1158 output.
1159
56532179 11602009-09-13 Robert Millan <rmh.grub@aybabtu.com>
1161
1162 * configure.ac: Remove --enable-grub-pe2elf. Only build
1163 grub-pe2elf when needed by the build system itself.
1164 * conf/common.rmk: Remove $(enable_grub_pe2elf) check.
1165
8ef070f5 11662009-09-12 Robert Millan <rmh.grub@aybabtu.com>
1167
1168 * configure.ac: Bump version to 1.97~beta3.
1169 * docs/version.texi: Likewise.
1170
61229557 11712009-09-12 Robert Millan <rmh.grub@aybabtu.com>
1172
1173 * video/i386/pc/vbe.c (grub_vbe_get_video_mode_info): Move packed
1174 mode special handling (grub_vbe_bios_set_dac_palette_width() call)
1175 from here ...
1176 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS]
1177 (grub_linux_setup_video): ... to here (with some adjustments).
1178
5c9f8d84 11792009-09-12 Robert Millan <rmh.grub@aybabtu.com>
1180
1181 Fix memory corruption issue (spotted by Colin Watson).
1182
1183 * kern/i386/pc/startup.S (grub_vbe_bios_getset_dac_palette): Fix bug
1184 causing returned size to be stored in an incorrect memory location.
1185 Fix use of uninitialized value when storing the returned size.
1186
e8f5d6e9 11872009-09-12 Yves Blusseau <blusseau@zetam.org>
1188
1189 Change clean rules to properly remove files
1190
1191 * genmk.rb: add new clean rules
1192 * Makefile.in (clean): add the new targets
1193 (mostlyclean): likewise
1194
cda2a409 11952009-09-11 Colin Watson <cjwatson@ubuntu.com>
1196
1197 * include/grub/ntfs.h (struct grub_fshelp_node): Change `size'
1198 to grub_uint64_t.
1199 * fs/ntfs.c (init_file): Understand 64-bit sizes for
1200 non-resident files.
1201
86695375 12022009-09-11 Colin Watson <cjwatson@ubuntu.com>
1203
1204 * configure.ac: Don't look for help2man when cross-compiling. Fixes
1205 part of bug #27349.
1206
8aa1541a 12072009-09-10 Felix Zielcke <fzielcke@z-51.de>
1208
1209 * util/grub-mkconfig.in: Make the created config mode 400 and
1210 print a warning if it fails.
1211
48d9bb0a 12122009-09-10 Robert Millan <rmh.grub@aybabtu.com>
1213
1214 * util/grub.d/40_custom.in: Ask user to type custom entries below
1215 comment, rather than below 'exec tail' line.
1216
3b0521be 12172009-09-10 Colin Watson <cjwatson@ubuntu.com>
1218
1219 * util/grub.d/40_custom.in: Make sure that the explanatory text is
1220 visible in grub.cfg.
1221
50051d55 12222009-09-10 Colin Watson <cjwatson@ubuntu.com>
1223
1224 * util/grub.d/40_custom.in: Make it a little clearer how to use this
1225 file.
1226
c0d34387 12272009-09-10 Felix Zielcke <fzielcke@z-51.de>
1228
1229 * docs/grub.cfg: Add an example menu entry for memtest86+.
1230
80a608f3 12312009-09-09 Felix Zielcke <fzielcke@z-51.de>
1232
a2094832 1233 * config.guess: Update to latest version from config git.
80a608f3 1234 * config.sub: Likewise.
1235
99423078 12362009-09-08 Colin Watson <cjwatson@ubuntu.com>
1237
1238 * script/sh/execute.c (grub_script_execute_cmdline): Set "?" in
1239 unknown-command case. Fixes bug #27320.
1240
44454e4c 12412009-09-08 Felix Zielcke <fzielcke@z-51.de>
1242
1243 * kern/rescue_parser.c (grub_rescue_parse_line): Only suggest to try
1244 `help' if the command exists.
1245
e30d87ad 12462009-09-06 Robert Millan <rmh.grub@aybabtu.com>
1247
1248 * INSTALL: Require GCC 4.1.3 or later.
1249
9a86f1ec 12502009-09-06 Yves Blusseau <blusseau@zetam.org>
1251
1252 * Makefile.in (RMKFILES): add i386-qemu.rmk
1253 (MAINTAINER_CLEANFILES): add $(srcdir)/DISTLIST $(srcdir)/config.h.in
1254 $(srcdir)/stamp-h.in
1255
7f26d466 12562009-09-05 Robert Millan <rmh.grub@aybabtu.com>
1257
1258 * util/grub-probe.c (probe): Comment out buggy codepath, which
1259 was unexpectedly enabled by Colin Watson's 2009-09-02 fix. This
1260 should be re-enabled after 1.97.
1261
3a613259 12622009-09-05 Felix Zielcke <fzielcke@z-51.de>
1263
1264 * gendistlist.sh: Add `grub-dumpdevtree' and `*.lua' to the list
1265 find searches for.
1266
197f76c7 12672009-09-04 Vladimir Serbinenko <phcoder@gmail.com>
1268
1269 * loader/i386/xnu.c (grub_cpu_xnu_fill_devicetree): Remove
1270 unnecessary calls to grub_error.
1271
70ba68ce 12722009-09-04 Colin Watson <cjwatson@ubuntu.com>
1273
1274 * NEWS: Mention `keystatus' and Unicode fonts.
1275
4ff0d7a4 12762009-09-04 Robert Millan <rmh.grub@aybabtu.com>
1277
1278 * configure.ac: Bump version to 1.97~beta2.
1279 * docs/version.texi: Likewise.
1280
77c55a87 12812009-09-03 Colin Watson <cjwatson@ubuntu.com>
1282
1283 * configure.ac: By default, GCC 4.4 generates .eh_frame sections
1284 containing unwind information in some cases where it previously did
1285 not. Use -fno-dwarf2-cfi-asm if available to restore the old
1286 behaviour. See http://patchwork.kernel.org/patch/8555/ for related
1287 discussion.
1288
f79572cd 12892009-09-02 Yves BLUSSEAU <blusseau@zetam.org>
1290
1291 Embedding loadenv module into grub-emu
1292
1293 * conf/i386-pc.rmk (grub_emu_SOURCES): add lib/envblk.c and
1294 commands/loadenv.c
1295 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise
1296 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise
1297 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise
1298 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise
1299 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise
1300 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise
1301
93a81088 13022009-09-03 Magnus Granberg <zorry@ume.nu>
1303
1304 * aclocal.m4: Add grub_CHECK_PIE. It check if the compiler
1305 include -fPIE in the default specs.
1306 * configure.ac: Check if pie_possible is yes and add -fno-PIE
1307 to TARGET_CFLAGS.
1308
160034b2 13092009-09-03 Felix Zielcke <fzielcke@z-51.de>
1310
1311 * INSTALL: Note that GNU Bison 2.3 or later is required.
1312
087c07c4 13132009-09-03 Colin Watson <cjwatson@ubuntu.com>
1314
1315 * kern/i386/pc/startup.S: Fix typo.
1316
cbf978c0 13172009-09-02 Vladimir Serbinenko <phcoder@gmail.com>
1318
1319 * efiemu/loadcore.c (SUFFIX (grub_efiemu_loadcore_load)): Fix style
1320 according to GCS.
1321
13222009-09-02 Colin Watson <cjwatson@ubuntu.com>
f0910644 1323
1324 * docs/grub.texi (Naming convention): Describe one-based partition
1325 numbering.
1326 (Device syntax): Likewise.
1327 (File name syntax): Likewise.
1328 (Block list syntax): Likewise.
1329 (Making a GRUB bootable CD-ROM): Talk about grub.cfg rather than
1330 menu.lst.
1331 (File name syntax): Likewise.
1332 (Command-line and menu entry commands): Document acpi, blocklist,
1333 crc, export, insmod, keystatus, ls, set, and unset commands.
1334
f3e8cdfd 13352009-09-02 Colin Watson <cjwatson@ubuntu.com>
1336
1337 * commands/keystatus.c (GRUB_MOD_INIT (keystatus)): Adjust summary
1338 to avoid implying that only one of --shift, --ctrl, or --alt may be
1339 used.
1340
c0bc232b 13412009-09-02 Colin Watson <cjwatson@ubuntu.com>
1342
1343 * util/grub-probe.c (probe): Test st.st_mode using S_ISREG macro
1344 rather than comparing against S_IFREG, which will almost never work.
1345
aa0f752d 13462009-09-01 Vladimir Serbinenko <phcoder@gmail.com>
1347
1348 * commands/loadenv.c (check_blocklists): Fix off-by-one error.
1349 (write_blocklists): Likewise.
1350
ecb3166a 13512009-09-01 Colin Watson <cjwatson@ubuntu.com>
1352
1353 * script/lua/grub_lua.h (fputs): Supply a format string as the first
1354 argument to grub_printf.
1355
c403a125 13562009-09-01 Felix Zielcke <fzielcke@z-51.de>
31aba781 1357
1358 * genmk.rb: Add quotes around $(TARGET_OBJ2ELF) to cope with
c403a125 1359 non GNU test.
31aba781 1360
b5e7312c 13612009-08-30 Vladimir Serbinenko <phcoder@gmail.com>
1362
1363 * kern/file.c (grub_file_read): Spelling fix
1364
fe00f472 13652009-08-30 Vladimir Serbinenko <phcoder@gmail.com>
1366
1367 * loader/i386/bsdXX.c (SUFFIX (grub_freebsd_load_elfmodule)): Fix
1368 loading of headers in some cases.
1369
cc55302e 13702009-08-30 Robert Millan <rmh.grub@aybabtu.com>
1371
1372 * configure.ac: Bump version to 1.97~beta1.
1373 * docs/version.texi: Likewise.
1374
5c90cdd2 13752009-08-29 Vladimir Serbinenko <phcoder@gmail.com>
64bf71d0 1376
1377 * include/grub/i386/xnu.h: Add license header.
1378 include grub/err.h explicitly.
1379
c90edae4 13802009-08-29 Robert Millan <rmh.grub@aybabtu.com>
1381
1382 * util/grub.d/10_freebsd.in: Detect `ufs1' and `ufs2' and map them
1383 to `ufs' in the vfs.root.mountfrom kernel parameter.
1384
d8888b5c 13852009-08-29 Robert Millan <rmh.grub@aybabtu.com>
1386
1387 * term/i386/pc/serial.c: Include `<grub/machine/memory.h>'.
1388
1389 [GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Macroify initialization
1390 value (0x0400 -> GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR).
1391
1392 [! GRUB_MACHINE_PCBIOS] (GRUB_SERIAL_PORT_NUM): Calculate using
1393 `ARRAY_SIZE' macro.
1394
6f07b921 13952009-08-28 Vladimir Serbinenko <phcoder@gmail.com>
1396
1397 * kern/file.c (grub_file_read): Check offset.
1398 * fs/hfs.c (grub_hfs_read_file): Remove unnecessary offset check.
1399 * fs/jfs.c (grub_jfs_read_file): Likewise.
1400 * fs/ntfs.c (grub_ntfs_read): Likewise.
1401 * fs/reiserfs.c (grub_reiserfs_read): Likewise.
1402 * fs/minix.c (grub_minix_read_file): Correct offset check.
1403 * fs/ufs.c (grub_ufs_read_file): Likewise.
1404
b4f34077 14052009-08-28 Colin Watson <cjwatson@ubuntu.com>
1406
1407 * term/i386/pc/console.c (bios_data_area): Cast
1408 GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR explicitly.
1409
e7c69859 14102009-08-28 Vladimir Serbinenko <phcoder@gmail.com>
1411
1412 1-bit optimised blitters.
1413
1414 * include/grub/fbblit.h (grub_video_fbblit_replace_32bit_1bit): New
1415 prototype.
1416 (grub_video_fbblit_replace_24bit_1bit): Likewise.
1417 (grub_video_fbblit_replace_16bit_1bit): Likewise.
1418 (grub_video_fbblit_replace_8bit_1bit): Likewise.
1419 (grub_video_fbblit_blend_XXXA8888_1bit): Likewise.
1420 (grub_video_fbblit_blend_XXX888_1bit): Likewise.
1421 (grub_video_fbblit_blend_XXX565_1bit): Likewise.
1422 * video/fb/fbblit.c (grub_video_fbblit_replace_32bit_1bit): New
1423 function.
1424 (grub_video_fbblit_replace_24bit_1bit): Likewise.
1425 (grub_video_fbblit_replace_16bit_1bit): Likewise.
1426 (grub_video_fbblit_replace_8bit_1bit): Likewise.
1427 (grub_video_fbblit_blend_XXXA8888_1bit): Likewise.
1428 (grub_video_fbblit_blend_XXX888_1bit): Likewise.
1429 (grub_video_fbblit_blend_XXX565_1bit): Likewise.
1430 * video/fb/video_fb.c (common_blitter): Use 1-bit optimised blitters
1431 when possible.
1432 * video/video.c (grub_video_get_blit_format): Return
1433 GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED if bpp = 1.
1434
a57da43f 14352009-08-28 Colin Watson <cjwatson@ubuntu.com>
1436
1437 * normal/cmdline.c (grub_cmdline_get): Supply a format string as
1438 the first argument to grub_printf.
1439
4cbe67e5 14402009-08-28 Colin Watson <cjwatson@ubuntu.com>
14412009-08-28 Robert Millan <rmh.grub@aybabtu.com>
1442
1443 Add `getkeystatus' terminal method. Add a new `keystatus' command
1444 to query it.
1445
1446 * include/grub/term.h (GRUB_TERM_STATUS_SHIFT,
1447 GRUB_TERM_STATUS_CTRL, GRUB_TERM_STATUS_ALT): Definitions for
1448 modifier key bitmasks.
1449 (struct grub_term_input): Add `getkeystatus' member.
1450 (grub_getkeystatus): Add prototype.
1451 * kern/term.c (grub_getkeystatus): New function.
1452
1453 * include/grub/i386/pc/memory.h
1454 (GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR): New macro.
1455 (struct grub_machine_bios_data_area): Define necessary parts of BIOS
1456 Data Area layout.
1457 * term/i386/pc/console.c (grub_console_getkeystatus): New function.
1458 (grub_console_term_input): Set `getkeystatus' member.
1459 * term/usb_keyboard.c (grub_usb_hid): Macroify HID protocol
1460 constants.
1461 (grub_usb_keyboard_getreport): Likewise.
1462 (grub_usb_keyboard_checkkey): Likewise.
1463 (grub_usb_keyboard_getkeystatus): New function.
1464 (grub_usb_keyboard_term): Set `getkeystatus' member.
1465
1466 * commands/keystatus.c: New file.
1467 * conf/common.rmk (pkglib_MODULES): Add keystatus.mod.
1468 (keystatus_mod_SOURCES): New variable.
1469 (keystatus_mod_CFLAGS): Likewise.
1470 (keystatus_mod_LDFLAGS): Likewise.
1471 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add
1472 commands/keystatus.c.
1473 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1474 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1475 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
1476 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1477 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1478 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4cbe67e5 1479
6e2a9085 14802009-08-28 Vladimir Serbinenko <phcoder@gmail.com>
1481
1482 Split befs.mod and afs.mod into *_be.mod and *.mod
1483
1484 * conf/common.rmk (grub_probe_SOURCES): Add afs_be.c and befs_be.c.
1485 (grub_fstest_SOURCES): Likewise.
1486 (pkglib_MODULES): Add afs_be.mod and befs_be.mod.
1487 (afs_be_mod_SOURCES): New variable.
1488 (afs_be_mod_CFLAGS): Likewise.
1489 (afs_be_mod_LDFLAGS): Likewise.
1490 (befs_be_mod_SOURCES): Likewise.
1491 (befs_be_mod_CFLAGS): Likewise.
1492 (befs_be_mod_LDFLAGS): Likewise.
1493 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add afs_be.c and befs_be.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_setup_SOURCES): Likewise.
1497 (grub_emu_SOURCES): Likewise.
1498 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1499 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1500 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1501 * fs/afs_be.c: New file.
1502 * fs/befs_be.c: New file.
1503 * fs/afs.c (GRUB_AFS_FSNAME_SUFFIX): New definition.
1504 (GRUB_AFS_FSNAME): Use GRUB_AFS_FSNAME_SUFFIX.
1505 (U16): Replaced with ...
1506 (grub_afs_to_cpu16): ...this. All users updated.
1507 (U32): Replaced with ...
1508 (grub_afs_to_cpu32): ...this. All users updated.
1509 (U64): Replaced with ...
1510 (grub_afs_to_cpu64): ...this. All users updated.
1511 (GRUB_AFS_BO_LITTLE_ENDIAN): Remove.
1512 (GRUB_AFS_BO_BIG_ENDIAN): Likewise.
ad8ea1f4 1513 (grub_afs_validate_sblock): Check only one endianness.
6e2a9085 1514 (GRUB_MOD_INIT (befs)) [MODE_BIGENDIAN && MODE_BFS]: Rename to ..
1515 (GRUB_MOD_INIT (befs_be)) [MODE_BIGENDIAN && MODE_BFS]: ... this.
1516 (GRUB_MOD_INIT (afs)) [MODE_BIGENDIAN && !MODE_BFS]: Rename to ..
1517 (GRUB_MOD_INIT (afs_be)) [MODE_BIGENDIAN && !MODE_BFS]: ... this.
1518 (GRUB_MOD_FINI (befs)) [MODE_BIGENDIAN && MODE_BFS]: Rename to ..
1519 (GRUB_MOD_FINI (befs_be)) [MODE_BIGENDIAN && MODE_BFS]: ... this.
1520 (GRUB_MOD_FINI (afs)) [MODE_BIGENDIAN && !MODE_BFS]: Rename to ..
1521 (GRUB_MOD_FINI (afs_be)) [MODE_BIGENDIAN && !MODE_BFS]: ... this.
1522
32a71655 15232009-08-26 Bean <bean123ch@gmail.com>
1524
1525 * fs/xfs.c (GRUB_XFS_INO_INOINAG): Replace 1L with 1LL to support
1526 64-bit number.
1527 (GRUB_XFS_FSB_TO_BLOCK): Likewise.
1528 (grub_xfs_inode_block): Change return type to grub_uint64_t.
1529 (grub_xfs_read_inode): Change type of block to grub_uint64_t.
1530
552bf6c5 15312009-08-25 Vladimir Serbinenko <phcoder@gmail.com>
1532
1533 NetBSD memory map support.
1534
1535 * include/grub/i386/bsd.h (NETBSD_BTINFO_MEMMAP): New definition.
1536 (grub_netbsd_btinfo_mmap_header): New structure.
1537 (grub_netbsd_btinfo_mmap_entry): Likewise.
1538 * loader/i386/bsd.c (grub_netbsd_boot): Pass memory map.
1539
1ae2078c 15402009-08-25 Vladimir Serbinenko <phcoder@gmail.com>
1541
1542 Enable bsd.mod on coreboot.
1543
1544 * conf/i386-coreboot.rmk (pkglib_MODULES): Add bsd.mod.
1545 (bsd_mod_SOURCES): New variable.
1546 (bsd_mod_CFLAGS): Likewise.
1547 (bsd_mod_LDFLAGS): Likewise.
1548 (bsd_mod_ASFLAGS): Likewise.
1549 * loader/i386/bsd.c [!GRUB_MACHINE_PCBIOS]: Fix includes.
1550 (grub_bsd_get_device) [!GRUB_MACHINE_PCBIOS]: Set *biosdev to 0xff.
1551
beefc598 15522009-08-25 Vladimir Serbinenko <phcoder@gmail.com>
1553
1554 Cleanup NetBSD root support.
1555
1556 * loader/i386/bsd.c (grub_netbsd_boot): Remove call to
1557 grub_bsd_get_device.
1558 Fix typo.
1559
3b76e68b 15602009-08-25 Felix Zielcke <fzielcke@z-51.de>
1561
1562 * util/grub.d/00_header.in: Move check for the video backend of
1563 gfxterm from here ...
1564 * util/grub-mkconfig.in: ... to here. Enable gfxterm if there's
1565 a suitable video backend.
1566
aea664ea 15672009-08-25 Vladimir Serbinenko <phcoder@gmail.com>
1568
1569 Fix breakage in grub-setup.
1570
1571 * util/i386/pc/grub-setup.c (setup): Use "part_msdos" instead of
1572 "msdos_partition_map".
1573
ff747d50 15742009-08-25 Vladimir Serbinenko <phcoder@gmail.com>
1575
1576 Fix breakage in normal/auth.c.
1577
1578 * normal/auth.c (grub_iswordseparator): New function.
1579
e7e1f93f 15802009-08-25 Vladimir Serbinenko <phcoder@gmail.com>
1581
1582 Authentication support.
1583
1584 * commands/password.c: New file.
1585 * conf/common.rmk (pkglib_MODULES): Add password.mod.
1586 (password_mod_SOURCES): New variable.
1587 (password_mod_CFLAGS): Likewise.
1588 (password_mod_LDFLAGS): Likewise.
1589 (normal_mod_SOURCES): Add normal/auth.c.
1590 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add commands/password.c and
1591 normal/auth.c.
1592 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1593 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1594 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
1595 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1596 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1597 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1598 * include/grub/auth.h: New file.
1599 * include/grub/err.h (grub_err_t): New enum value
1600 GRUB_ERR_ACCESS_DENIED.
1601 * include/grub/menu.h (grub_menu_entry): New fields 'restricted' and
1602 'users'.
1603 * include/grub/normal.h (grub_cmdline_get): New argument 'history'.
1604 * normal/cmdline.c (grub_cmdline_get): New argument 'history'. All
1605 users updated.
1606 * normal/auth.c: New file.
1607 * normal/main.c (grub_normal_add_menu_entry): Handle --users option.
1608 (grub_cmdline_run): Don't allow to go to command line without
1609 authentication.
1610 * normal/menu.c (grub_menu_execute_entry): Handle restricted entries.
1611 * normal/menu_entry.c (grub_menu_entry_run): Don't allow editing
1612 menuentry without superuser rights.
1613 * normal/menu_viewer.c (grub_menu_viewer_show_menu): Don't exit if
1614 user isn't a superuser.
1615
70f1161d 16162009-08-24 Vladimir Serbinenko <phcoder@gmail.com>
1617
1618 Save space by inlining misc.c functions.
1619
1620 * kern/misc.c (grub_iswordseparator): Made static.
1621 * kern/misc.c (grub_strcat): Moved from here ...
1622 * include/grub/misc.h (grub_strcat): ... here. Inlined.
1623 * kern/misc.c (grub_strncat): Moved from here ...
1624 * include/grub/misc.h (grub_strncat): ... here. Inlined.
1625 * kern/misc.c (grub_strcasecmp): Moved from here ...
1626 * include/grub/misc.h (grub_strcasecmp): ... here. Inlined.
1627 * kern/misc.c (grub_strncasecmp): Moved from here ...
1628 * include/grub/misc.h (grub_strncasecmp): ... here. Inlined.
1629 * kern/misc.c (grub_isalpha): Moved from here ...
1630 * include/grub/misc.h (grub_isalpha): ... here. Inlined.
1631 * kern/misc.c (grub_isdigit): Moved from here ...
1632 * include/grub/misc.h (grub_isdigit): ... here. Inlined.
1633 * kern/misc.c (grub_isgraph): Moved from here ...
1634 * include/grub/misc.h (grub_isgraph): ... here. Inlined.
1635 * kern/misc.c (grub_tolower): Moved from here ...
1636 * include/grub/misc.h (grub_tolower): ... here. Inlined.
1637
48e40bff 16382009-08-24 Vladimir Serbinenko <phcoder@gmail.com>
1639
1640 * script/sh/function.c (grub_script_function_find): Cut error message
1641 not to flood terminal.
1642 * script/sh/lexer.c (grub_script_yylex): Remove command line length
1643 limit.
1644 * script/sh/script.c (grub_script_arg_add): Duplicate string.
1645
c385bfc3 16462009-08-24 Colin Watson <cjwatson@ubuntu.com>
1647
1648 * term/usb_keyboard.c (grub_usb_keyboard_getreport): Make
1649 `report' grub_uint8_t *.
1650 (grub_usb_keyboard_checkkey): Make `data' elements grub_uint8_t.
1651 Use a 50-millisecond timeout rather than just repeating
1652 grub_usb_keyboard_getreport 50 times.
1653 (grub_usb_keyboard_getkey): Make `data' elements grub_uint8_t.
1654
2d21e3e8 16552009-08-24 Vladimir Serbinenko <phcoder@gmail.com>
1656
1657 Rename *_partition_map to part_*
1658
1659 * partmap/acorn.c (grub_acorn_partition_map): Set name to 'part_acorn'.
1660 * partmap/amiga.c (grub_amiga_partition_map): Set name to 'part_amiga'.
1661 * partmap/apple.c (grub_apple_partition_map): Set name to 'part_apple'.
1662 * partmap/gpt.c (grub_gpt_partition_map): Set name to 'part_gpt'.
1663 All users updated.
1664 * partmap/msdos.c (grub_msdos_partition_map): Set name to 'part_msdos'.
1665 All users updated.
1666 * partmap/sun.c (grub_sun_partition_map): Set name to 'part_sun'.
1667 * util/grub-probe.c (probe_partmap): Don't transform partition name
1668 to get module name.
1669
dd103c4e 16702009-08-24 Vladimir Serbinenko <phcoder@gmail.com>
1671
1672 Fix OpenBSD and NetBSD support.
1673
1674 * include/grub/i386/bsd.h (GRUB_BSD_TEMP_BUFFER): Change to resolve
1675 memory address conflict.
1676 (OPENBSD_MMAP_ACPI): New definition.
1677 (OPENBSD_MMAP_NVS): Likewise.
1678 * loader/i386/bsd.c (grub_openbsd_boot): Support OPENBSD_MMAP_ACPI
1679 and OPENBSD_MMAP_NVS.
1680 Add memory map terminator
1681 Explicit cast when calling grub_unix_real_boot.
ad8ea1f4 1682 (grub_netbsd_boot): Explicit cast when calling grub_unix_real_boot.
dd103c4e 1683
16c84d74 16842009-08-24 Vladimir Serbinenko <phcoder@gmail.com>
1685
1686 Let user specify NetBSD root device.
1687
1688 * loader/i386/bsd.c (netbsd_root): New variable.
1689 (netbsd_opts): New option 'root'.
1690 (NETBSD_ROOT_ARG): New macro.
1691 (grub_netbsd_boot): Use 'netbsd_root'.
1692 (grub_bsd_unload): Free 'netbsd_root'.
1693 (grub_cmd_netbsd): Fill 'netbsd_root'.
1694
adb29902 16952009-08-24 Vladimir Serbinenko <phcoder@gmail.com>
1696
1697 Support for 64-bit NetBSD.
1698
1699 * loader/i386/bsd.c (grub_bsd_load_elf): Apply correct mask to entry
1700 point when booting non-FreeBSD.
1701
f5ae9f74 17022009-08-24 Vladimir Serbinenko <phcoder@gmail.com>
1703
1704 Support --no-smp and --no-acpi for NetBSD.
1705
1706 * include/grub/i386/bsd.h (NETBSD_AB_NOSMP): New definition.
1707 (NETBSD_AB_NOACPI): Likewise.
1708 * loader/i386/bsd.c (netbsd_opts): New entries no-smp and no-acpi.
1709 (netbsd_flags): Add NETBSD_AB_NOSMP, NETBSD_AB_NOACPI.
1710
de74f136 17112009-08-23 Vladimir Serbinenko <phcoder@gmail.com>
1712
1713 * fs/hfsplus.c (grub_hfsplus_mount): Don't ignore grub_hfsplus_read_file
1714 errors.
1715 (grub_hfsplus_btree_iterate_node): Don't ignore grub_hfsplus_read_file
1716 errors. Call grub_error when needed.
1717
e9a925da 17182009-08-23 Vladimir Serbinenko <phcoder@gmail.com>
1719
1720 * commands/search.c (search_fs): Try searching without autoload first.
1721 * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Load
1722 filesystem module explicitly for faster booting.
1723
5174302b 17242009-08-23 Colin Watson <cjwatson@ubuntu.com>
1725
1726 * util/grub-mkconfig.in: Export GRUB_DISABLE_OS_PROBER.
1727
c8c80635 17282009-08-23 Colin Watson <cjwatson@ubuntu.com>
1729
1730 * util/grub.d/30_os-prober.in: Disable os-prober if
1731 `GRUB_DISABLE_OS_PROBER' was set to true.
1732
71acf5e5 17332009-08-23 Robert Millan <rmh.grub@aybabtu.com>
1734
1735 * partmap/pc.c: Rename to ...
1736 * partmap/msdos.c: ... this. Update all users.
1737 (grub_pc_partition_map): Rename to ...
1738 (grub_msdos_partition_map): ... this. Update all users.
1739
1740 * parttool/pcpart.c: Rename to ...
1741 * parttool/msdospart.c: ... this. Update all users.
1742
1743 * include/grub/pc_partition.h: Rename to ...
1744 * include/grub/msdos_partition.h: ... this. Update all users.
1745 (grub_pc_partition_bsd_entry): Rename to ...
1746 (grub_msdos_partition_bsd_entry): ... this. Update all users.
1747 (grub_pc_partition_disk_label): Rename to ...
1748 (grub_msdos_partition_disk_label): ... this. Update all users.
1749 (grub_pc_partition_entry): Rename to ...
1750 (grub_msdos_partition_entry): ... this. Update all users.
1751 (grub_pc_partition_mbr): Rename to ...
1752 (grub_msdos_partition_mbr): ... this. Update all users.
1753 (grub_pc_partition): Rename to ...
1754 (grub_msdos_partition): ... this. Update all users.
1755 (grub_pc_partition_is_empty): Rename to ...
1756 (grub_msdos_partition_is_empty): ... this. Update all users.
1757 (grub_pc_partition_is_extended): Rename to ...
1758 (grub_msdos_partition_is_extended): ... this. Update all users.
1759 (grub_pc_partition_is_bsd): Rename to ...
1760 (grub_msdos_partition_is_bsd): ... this. Update all users.
1761
1762 * conf/common.rmk (amiga_mod_SOURCES, amiga_mod_CFLAGS)
1763 (amiga_mod_LDFLAGS, apple_mod_SOURCES, apple_mod_CFLAGS)
1764 (apple_mod_LDFLAGS, msdos_mod_SOURCES, msdos_mod_CFLAGS)
1765 (msdos_mod_LDFLAGS, sun_mod_SOURCES, sun_mod_CFLAGS)
1766 (sun_mod_LDFLAGS, acorn_mod_SOURCES, acorn_mod_CFLAGS)
1767 (acorn_mod_LDFLAGS, gpt_mod_SOURCES, gpt_mod_CFLAGS)
1768 (gpt_mod_LDFLAGS): Rename to ...
1769 (part_amiga_mod_SOURCES, part_amiga_mod_CFLAGS, part_amiga_mod_LDFLAGS)
1770 (part_apple_mod_SOURCES, part_apple_mod_CFLAGS, part_apple_mod_LDFLAGS)
1771 (part_msdos_mod_SOURCES, part_msdos_mod_CFLAGS, part_msdos_mod_LDFLAGS)
1772 (part_sun_mod_SOURCES, part_sun_mod_CFLAGS, part_sun_mod_LDFLAGS)
1773 (part_acorn_mod_SOURCES, part_acorn_mod_CFLAGS, part_acorn_mod_LDFLAGS)
1774 (part_gpt_mod_SOURCES, part_gpt_mod_CFLAGS)
1775 (part_gpt_mod_LDFLAGS): ... this.
1776 (pkglib_MODULES): Prefix partition modules with `part_'. Rename
1777 `pcpart.mod' to `msdospart.mod'.
1778 (pcpart_mod_SOURCES, pcpart_mod_CFLAGS, pcpart_mod_LDFLAGS): Rename
1779 to ...
1780 (msdospart_mod_SOURCES, msdospart_mod_CFLAGS)
1781 (msdospart_mod_LDFLAGS): ... this.
1782
c11fded5 17832009-08-23 Vladimir Serbinenko <phcoder@gmail.com>
1784
1785 * loader/i386/bsd.c (freebsd_opts): Rewritten to use extcmd.
1786 (openbsd_opts): Likewise.
1787 (netbsd_opts): Likewise.
1788 (freebsd_flags): Added 0 terminator.
1789 (openbsd_flags): Likewise.
1790 (netbsd_flags): Likewise.
1791 (grub_bsd_parse_flags): Rewritten to use extcmd. All users updated.
1792 (grub_cmd_freebsd): Transformed into extended command.
1793 (grub_cmd_openbsd): Likewise.
1794 (grub_cmd_netbsd): Likewise.
1795 (cmd_freebsd): Changed type to grub_extcmd_t.
1796 (cmd_openbsd): Likewise.
1797 (cmd_netbsd): Likewise.
1798 (GRUB_MOD_INIT (bsd)): Register grub_cmd_freebsd, grub_cmd_netbsd and
1799 grub_cmd_openbsd as extended commands.
1800 (GRUB_MOD_FINI (bsd)): Use grub_unregister_extcmd for cmd_freebsd,
1801 cmd_netbsd and cmd_openbsd
1802
11d1c769 18032009-08-22 Vladimir Serbinenko <phcoder@gmail.com>
1804
1805 * commands/xnu_uuid.c (transform): Use grub_memcpy instead of memcpy.
1806
7a9094e5 18072009-08-21 Pavel Roskin <proski@gnu.org>
1808
5496c37e 1809 * Makefile.in (install-local): When checking if a file is in the
1810 build directory, use "test -e" to detect symlinks.
1811
7a9094e5 1812 * Makefile.in (install-local): Remove all files in
1813 $(DESTDIR)$(pkglibdir) before installing new files there.
1814
e53cea11 18152009-08-18 Felix Zielcke <fzielcke@z-51.de>
1816
1817 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Use
1818 grub-mkelfimage.
1819
9aced544 18202009-08-18 Felix Zielcke <fzielcke@z-51.de>
1821
1822 * util/grub-mkconfig.in: Don't use gfxterm by default if not
1823 explicitly specified by the user.
1824
b7da6bab 18252009-08-18 Pavel Roskin <proski@gnu.org>
1826
1827 * include/grub/fbfill.h (struct grub_video_fbrender_target): Use
1828 grub_uint8_t pointer for data.
1829 * include/grub/fbutil.h (struct grub_video_fbblit_info):
1830 Likewise.
1831 * video/fb/fbutil.c: Remove unnecessary casts.
1832
19f1b335 18332009-08-17 Michal Suchanek <hramrach@centrum.cz>
1834
1835 VBE cleanup.
1836
1837 * video/i386/pc/vbe.c (vbe_mode_in_use): Removed (duplicate).
1838 (grub_vbe_set_video_mode): Save active mode info
1839 only after setting the mode.
1840 (grub_video_vbe_setup): Call 'grub_vbe_set_video_mode' with NULL as
1841 second argument.
1842
2f467aa9 18432009-08-17 Michal Suchanek <hramrach@centrum.cz>
1844
1845 Rename variables for clarity.
1846
1847 * video/i386/pc/vbe.c (active_mode_info): Renamed to ...
1848 (active_vbe_mode_info): ... this. All users updated.
1849 (framebuffer): Rename 'active_mode' to 'active_vbe_mode'.
1850 All users updated.
1851 (initial_mode): Rename to ...
1852 (initial_vbe_mode): ... this. All users updated.
1853 (mode_in_use): Rename to ..
1854 (vbe_mode_in_use): ... this. All users updated.
1855 (mode_list): Rename to ..
1856 (vbe_mode_list): ... this. All users updated.
1857 (grub_vbe_set_video_mode): Rename 'mode' to 'vbe_mode', 'mode_info' to
1858 'vbe_mode_info' and 'old_mode' to 'old_vbe_mode'.
1859 (grub_video_vbe_init): Rename 'rm_mode_list' to 'rm_vbe_mode_list' and
1860 'mode_list_size' to 'vbe_mode_list_size'.
1861 (grub_video_vbe_setup): Rename 'mode_info' to 'vbe_mode_info',
1862 'best_mode_info' to 'best_vbe_mode_info' and
1863 'best_mode' to 'best_vbe_mode'
1864
6025fcd7 18652009-08-17 Michal Suchanek <hramrach@centrum.cz>
1866
1867 Remove duplicate grub_video_fb_get_video_ptr.
1868
1869 * include/grub/fbutil.h (get_data_ptr): Rename to ...
1870 (grub_video_fb_get_video_ptr): ... this.
1871 * include/grub/video_fb.h (grub_video_fb_get_video_ptr): Removed.
1872 * video/fb/fbutil.c: Add comment about addressing.
1873 (get_data_ptr): Rename to ...
1874 (grub_video_fb_get_video_ptr): ... this. All users updated.
1875 * video/fb/video_fb.c (grub_video_fb_get_video_ptr): Remove.
1876
cc8c6faf 18772009-08-17 Robert Millan <rmh.grub@aybabtu.com>
1878
1879 * fs/fat.c (grub_fat_read_data): Remove `#if 0' braces around the
1880 grub_dprintf() that was just added.
1881
08aa61f0 18822009-08-17 Robert Millan <rmh.grub@aybabtu.com>
1883
1884 * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT)
1885 (DEFAULT_VIDEO_MODE): Remove macros.
1886 (grub_linux_boot): Remove assumption that Linux has FB support,
1887 and use "text" as default video mode.
1888
7cef4f75 18892009-08-15 Vladimir Serbinenko <phcoder@gmail.com>
1890
1891 * fs/affs.c (grub_affs_read_symlink): Change leftover grub_printf into
1892 grub_dprintf.
1893 * fs/fat.c (grub_fat_read_data): Likewise.
1894
e1f39873 18952009-08-14 Vladimir Serbinenko <phcoder@gmail.com>
1896
1897 * loader/i386/multiboot.c (grub_multiboot): Don't pass filename to
1898 payload.
1899 (grub_module): Likewise.
1900
c166d79e 19012009-08-14 Vladimir Serbinenko <phcoder@gmail.com>
1902
1903 * loader/i386/multiboot.c (grub_multiboot_unload): Don't free mbi and
1904 mbi->cmdline but free playground.
1905
c60cee8e 19062009-08-14 Vladimir Serbinenko <phcoder@gmail.com>
1907
1908 Handle group offset on UFS1.
1909
1910 * fs/ufs.c (grub_ufs_sblock): New field 'cylg_mask'.
1911 (grub_ufs_read_inode) [!MODE_UFS2]: handle cylg_offset and cylg_mask.
1912
c0d8b5d4 19132009-08-14 Vladimir Serbinenko <phcoder@gmail.com>
1914
1915 Split ufs.mod into ufs1.mod and ufs2.mod.
1916
1917 * conf/common.rmk (grub_probe_SOURCES): Add fs/ufs2.c.
1918 (grub_fstest_SOURCES): Likewise.
1919 (pkglib_MODULES): Remove ufs.mod. Add ufs1.mod and ufs2.mod.
1920 (ufs_mod_SOURCES): Remove.
1921 (ufs_mod_CFLAGS): Likewise.
1922 (ufs_mod_LDFLAGS): Likewise.
1923 (ufs1_mod_SOURCES): New variable.
1924 (ufs1_mod_CFLAGS): Likewise.
1925 (ufs1_mod_LDFLAGS): Likewise.
25fbd77a 1926 (ufs2_mod_SOURCES): New variable.
1927 (ufs2_mod_CFLAGS): Likewise.
1928 (ufs2_mod_LDFLAGS): Likewise.
c0d8b5d4 1929 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add fs/ufs2.c.
1930 * conf/i386-efi.rmk (util/i386/efi/grub-mkimage.c_DEPENDENCIES):
1931 Likewise.
1932 (grub_emu_SOURCES): Likewise.
1933 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1934 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
1935 (grub_setup_SOURCES): Likewise.
1936 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1937 * conf/sparc64.rmk (grub_emu_SOURCES): Likewise.
1938 (grub_setup_SOURCES): Likewise.
1939 * conf/x86_64-efi.rmk (util/i386/efi/grub-mkimage.c_DEPENDENCIES):
1940 Likewise.
1941 * fs/ufs2.c: New file.
1942 * fs/ufs.c: Separate UFS1 from UFS2 by using preprocessor.
1943
d3539132 19442009-08-14 Vladimir Serbinenko <phcoder@gmail.com>
1945
1946 Framebuffer split.
1947
1948 * commands/i386/pc/vbetest.c (grub_cmd_vbetest): Restore video
1949 subsystem at the end.
1950 * conf/common.rmk (pkglib_MODULES): Add video_fb.mod.
1951 (video_fb_mod_SOURCES): New variable.
1952 (video_fb_mod_CFLAGS): Likewise.
1953 (video_fb_mod_LDFLAGS): Likewise.
1954 * conf/i386-pc.rmk (vbe_mod_SOURCES): Remove video/i386/pc/vbeblit.c,
1955 video/i386/pc/vbefill.c and video/i386/pc/vbeutil.c.
1956 * video/i386/pc/vbeblit.c: Moved from here ...
1957 * video/fb/fbblit.c: ..here. Replaced 'vbe' with 'fb'.
1958 * video/i386/pc/vbefill.c: Moved from here ...
1959 * video/fb/fbfill.c: ..here. Replaced 'vbe' with 'fb'.
1960 * video/i386/pc/vbeutil.c: Moved from here ...
1961 * video/fb/fbutil.c: ..here. Replaced 'vbe' with 'fb'.
1962 * include/grub/i386/pc/vbeblit.h: Moved from here ...
1963 * include/grub/fbblit.h: ... here. Replaced 'vbe' with 'fb'.
1964 * include/grub/i386/pc/vbefill.h: Moved from here ...
1965 * include/grub/fbfill.h: ... here. Replaced 'vbe' with 'fb'.
1966 * include/grub/i386/pc/vbeutil.h: Moved from here ...
1967 * include/grub/fbutil.h: ... here. Replaced 'vbe' with 'fb'.
1968 * include/grub/i386/pc/vbe.h: Moved framebuffer part ...
1969 * include/grub/video_fb.h: ... here. Replaced 'vbe' with 'fb'.
1970 * include/grub/video.h (GRUB_VIDEO_RENDER_TARGET_FRONT_BUFFER): Removed.
1971 (GRUB_VIDEO_RENDER_TARGET_BACK_BUFFER): Likewise.
1972 (grub_video_adapter): Added 'get_info_and_fini'.
1973 (grub_video_get_info_and_fini): New prototype.
1974 (grub_video_set_mode): make modestring const char *.
1975 * loader/i386/linux.c (grub_linux_setup_video): Use
1976 grub_video_get_info_and_fini.
1977 (grub_linux_boot): Move modesetting just before booting.
1978 * loader/i386/pc/xnu.c (grub_xnu_set_video): Use
1979 grub_video_get_info_and_fini.
1980 * video/i386/pc/vbe.c: Moved framebuffer part ...
1981 * video/fb/video_fb.c: ... here. Replaced 'vbe' with 'fb'.
1982 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): Use
1983 grub_video_fbstd_colors and grub_video_fb_set_palette.
1984 (grub_video_vbe_init): Clear 'framebuffer' variable and use
1985 grub_video_fb_init.
1986 (grub_video_vbe_fini): Use grub_video_fb_fini.
1987 (grub_video_vbe_setup): Use framebuffer.render_target instead of
1988 render_target and use grub_video_fb_set_active_render_target and
1989 grub_video_fb_set_palette.
1990 (grub_video_vbe_set_palette): Use grub_video_fb_set_palette.
1991 (grub_video_vbe_set_viewport): Use grub_video_fb_set_viewport.
1992 (grub_video_vbe_adapter): Use framebuffer.
1993 * video/video.c (grub_video_get_info_and_fini): New function.
1994 (grub_video_set_mode): Make modestring const char *.
1995 (GRUB_MOD_INIT(video_video)): Don't set variables to 0 since these
1996 values are already initialised.
1997
d404ee56 19982009-08-14 Pavel Roskin <proski@gnu.org>
1999
2000 * boot/i386/pc/cdboot.S: Use LOCAL for local labels. Eliminate
2001 ABS and APPLE_CC.
2002 * boot/i386/pc/diskboot.S: Likewise.
2003 * boot/i386/pc/lnxboot.S: Likewise. Hardcode the number of code
2004 sectors allow compilation on MacOSX.
2005 * conf/i386-pc.rmk: Enable unconditional compilation of
2006 lnxboot.img.
2007
9a10df16 20082009-08-13 Colin Watson <cjwatson@ubuntu.com>
2009
2010 * util/grub-mkconfig.in: Export GRUB_HIDDEN_TIMEOUT.
2011 * util/grub.d/00_header.in: Enter interruptible sleep if
2012 GRUB_HIDDEN_TIMEOUT is set.
2013
be3c9ca7 20142009-08-13 Yves Blusseau <blusseau@zetam.org>
2015
2016 * include/grub/symbol.h: Add the LOCAL macro.
2017 * boot/i386/pc/boot.S: Use the LOCAL macro for all labels
2018 starting with "L_".
2019
1f9e557e 20202009-08-13 Pavel Roskin <proski@gnu.org>
2021
9ca62843 2022 * boot/i386/pc/boot.S: Remove ABS macro, it's not required by
2023 any modern compilers we support.
2024
1f9e557e 2025 * boot/i386/pc/boot.S: Remove all code dependent on APPLE_CC.
2026 Use local labels starting with "L_" so that Apple assembler
2027 knows they are local.
2028
81623db6 20292009-08-10 Robert Millan <rmh.grub@aybabtu.com>
2030
2031 * include/grub/i386/bsd.h (KERNEL_TYPE_NONE, KERNEL_TYPE_FREEBSD)
2032 (KERNEL_TYPE_OPENBSD, KERNEL_TYPE_NETBSD): Convert to ...
2033 (bsd_kernel_types): ... this enum.
2034
2035 * loader/i386/bsd.c (grub_cmd_freebsd_loadenv, grub_cmd_freebsd_module)
2036 (grub_cmd_freebsd_module_elf): Abort with "You need to load the
2037 kernel first." when `kernel_type' is set to KERNEL_TYPE_NONE.
2038
2039 (grub_bsd_load_aout, grub_bsd_load, grub_cmd_freebsd_loadenv)
2040 (grub_cmd_freebsd_module, grub_cmd_freebsd_module_elf)
2041 (GRUB_MOD_INIT (bsd)): Fix capitalization in a few error
2042 messages.
2043
f5d35e7a 20442009-08-08 Robert Millan <rmh.grub@aybabtu.com>
2045
2046 * util/grub-dumpdevtree: Moved from here ...
2047 * util/i386/efi/grub-dumpdevtree: ... to here.
2048 (hexify): New function. Converts a string to its hex version.
2049 Generate hex versions of "efi" and "device-properties" by calling
2050 hexify() on the ASCII strings rather than by hardcoding numbers.
2051
d1e1d527 20522009-08-08 Robert Millan <rmh.grub@aybabtu.com>
2053
2054 * fs/jfs.c: Update copyright year.
2055
1ebbe064 20562009-08-08 Felix Zielcke <fzielcke@z-51.de>
2057
2058 * util/grub.d/00_header.in: Fix a comment.
2059 * util/grub.d/10_linux.in: Likewise.
2060 * util/grub.d/10_windows.in: Likewise.
2061 * util/grub.d/10_hurd.in: Likewise.
2062
a78c8d24 20632009-08-08 Felix Zielcke <fzielcke@z-51.de>
2064
2065 * util/grub-mkconfig.in: Allow the user to specify the used font
2066 with GRUB_FONT.
2067
29a6b9e8 20682009-08-08 Pavel Roskin <proski@gnu.org>
2069
b5f16cc4 2070 * include/grub/powerpc/libgcc.h: Export __ashrdi3() if
2071 available, xfs.mod needs it now.
2072
2f5cb827 2073 * util/grub-mkconfig_lib.in (version_test_numeric): Don't use
2074 the "g" modifier in sed when the intention is to strip something
2075 once. This fixes comparison of kernels with multiple dashes.
2076
29a6b9e8 2077 * util/grub-mkconfig.in: Define datarootdir, datadir may depend
2078 on it. Add missing space before closing bracket. Fix
2079 misleading formatting.
2080
892a3d98 20812009-08-07 Robert Millan <rmh.grub@aybabtu.com>
2082
2083 * docs/grub.texi: Major overhaul. Remove all sections that are
2084 specific to GRUB Legacy, or mostly composed of Legacy-specific
2085 information.
2086
ed94253f 20872009-08-07 Robert Millan <rmh.grub@aybabtu.com>
2088
2089 * docs/version.texi: New file. Provides version information for
2090 grub.texi.
2091
126d6628 20922009-08-07 Robert Millan <rmh.grub@aybabtu.com>
2093
2094 * docs/grub.texi: Update CVS information to SVN.
2095 Replace outdated "GRUB 2 will include" phrase with "GRUB 2 includes".
2096
998b5aa9 20972009-08-07 Felix Zielcke <fzielcke@z-51.de>
2098
2099 * util/grub-mkconfig.in: Remove a wrong `fi'.
2100
818e094a 21012009-08-07 Felix Zielcke <fzielcke@z-51.de>
2102
2103 * fs/uuid.c (grub_jfs_superblock): New fields unused2 and uuid.
2104 (grub_jfs_uuid): New function.
2105 (grub_jfs_fs): Set uuid field to grub_jfs_uuid.
2106
b969c52f 21072009-08-07 Felix Zielcke <fzielcke@z-51.de>
2108
2109 * util/grub-mkconfig_lib.in (font_path): Move the functionality
2110 of it to ...
2111 * util/grub-mkconfig.in: ... here. Prefer unicode.pf2 and
2112 unifont.pf2 over ascii.pf2. Export LANG=C in case ascii.pf2 gets used.
2113
7a4894cc 21142009-08-07 Robert Millan <rmh.grub@aybabtu.com>
2115
2116 * util/grub.d/10_linux.in (test_numeric): Moved from here ...
2117 * util/grub-mkconfig_lib.in (version_test_numeric): ... to here.
2118 Update all users.
2119
2120 * util/grub.d/10_linux.in (test_gt): Strip any basename prefix,
2121 not just "vmlinu[zx]".
2122 Moved from here ...
2123 * util/grub-mkconfig_lib.in (version_test_gt): ... to here. Update
2124 all users.
2125
2126 * util/grub.d/10_linux.in (find_latest): Moved from here ...
2127 * util/grub-mkconfig_lib.in (version_find_latest): ... to here. Update
2128 all users.
2129
4e2171f8 21302009-08-07 Robert Millan <rmh.grub@aybabtu.com>
2131
2132 * util/grub.d/10_freebsd.in: Use an absolute device path for
2133 `vfs.root.mountfrom'. Set `vfs.root.mountfrom.options=rw'.
2134
6dcfcb32 21352009-08-06 Felix Zielcke <fzielcke@z-51.de>
2136
2137 * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Fix
2138 handling of multiple abstraction modules.
2139
f56a8756 21402009-08-04 Robert Millan <rmh.grub@aybabtu.com>
2141
2142 Fix a bug resulting in black screen when loading Linux using a
2143 packed video mode.
2144
2145 * kern/i386/pc/startup.S (grub_vbe_bios_getset_dac_palette_width): New
2146 function.
2147
2148 * include/grub/i386/pc/vbe.h (GRUB_VBE_CAPABILITY_DACWIDTH): New macro.
2149 (grub_vbe_bios_getset_dac_palette_width): New function.
2150 (grub_vbe_bios_get_dac_palette_width)
2151 (grub_vbe_bios_set_dac_palette_width): New macros (act as wrappers for
2152 grub_vbe_bios_getset_dac_palette_width()).
2153
2154 * video/i386/pc/vbe.c (grub_vbe_probe): Use `GRUB_VBE_STATUS_OK' to
2155 check for return status.
2156 (grub_vbe_get_video_mode_info): When getting information for a packed
2157 mode (<= 8 bpp), obtain DAC palette width using
2158 grub_vbe_bios_getset_dac_palette_width(), and use that for initializing
2159 {red,green,blue}_mark_size.
2160
222671b2 21612009-08-04 Felix Zielcke <fzielcke@z-51.de>
2162
ecb1a6d9 2163 * commands/search.c (options): Fix help output to match actual code.
222671b2 2164
f84114f5 21652009-08-02 Vladimir Serbinenko <phcoder@gmail.com>
2166
2167 * commands/hexdump.c (grub_cmd_hexdump): Use grub_disk_read instead
2168 of homegrown code.
2169
bd288a20 21702009-08-01 Vladimir Serbinenko <phcoder@gmail.com>
e768b770 2171
2172 * util/hostfs.c (grub_hostfs_dir): Don't use DT_DIR: It doesn't work
2173 on XFS or ReiserFS.
2174
8aab5e25 21752009-08-01 Vladimir Serbinenko <phcoder@gmail.com>
2176
2177 Support Apple partition map with sector size different from 512 bytes.
2178
2179 * partmap/apple.c (grub_apple_header): New field 'blocksize'.
2180 (apple_partition_map_iterate): Respect 'aheader.blocksize'
2181 and 'apart.partmap_size'.
2182
6ad6258a 21832009-08-01 Vladimir Serbinenko <phcoder@gmail.com>
21842009-08-01 Robert Millan <rmh.grub@aybabtu.com>
2185
2186 Fix cpuid command.
2187
2188 * commands/i386/cpuid.c (options): New variable.
2189 (grub_cmd_cpuid): Return real error.
2190 (GRUB_MOD_INIT(cpuid)): Declare options.
2191
67459bc6 21922009-07-31 Vladimir Serbinenko <phcoder@gmail.com>
2193
2194 * partmap/pc.c (pc_partition_map_iterate): Check that boot flags are
2195 valid.
2196
fbc6ab54 21972009-07-31 Bean <bean123ch@gmail.com>
2198
2199 * fs/xfs.c (grub_xfs_sblock): Change unused5 field to log2_sect and
2200 log2_inode.
2201 (grub_fshelp_node): Move inode field to the end.
2202 (grub_xfs_data): Remove inode field.
2203 (grub_xfs_inode_block): Calculate inode size using sblock.
2204 (grub_xfs_inode_offset): Likewise.
2205 (grub_xfs_read_inode): Calculate inode size using sblock.
2206 (grub_xfs_read_block): Replace XFS_INODE_EXTENTS with nrec.
2207 (grub_xfs_iterate_dir): Calculate inode size using sblock.
2208 (grub_xfs_mount): Use grub_zalloc instead of grub_malloc. Realloc data
2209 to match inode size.
2210 (grub_xfs_dir): goto mount_fail when mount fails, as data->diropen is
2211 not accessible when data is null.
2212 (grub_xfs_open): Likewise.
2213
f45d6cfc 22142009-07-31 Bean <bean123ch@gmail.com>
2215
2216 * disk/lvm.c (grub_lvm_scan_device): Ignore extra copy of metadata.
2217 Don't change pv->disk if it's already set.
2218
2219 * disk/raid.c (grub_raid_scan_device): Merge this function into ...
2220 (grub_raid_register): ... here.
2221 (grub_raid_rescan): Removed.
2222
2223 * include/grub/raid.h (grub_raid_rescan): Removed.
2224
2225 * util/grub-fstest.c: Remove include file <grub/raid.h>.
2226 (fstest): Replace grub_raid_rescan with module fini function followed
2227 by init function.
2228
2229 * util/grub-probe.c: Add include file <grub/raid.h>.
2230 (probe_raid_level): New function.
2231 (probe): Detect abstraction by walking the disk device, support two
2232 level of abstraction (LVM on RAID) when detecting partition map.
2233
24443b5a 22342009-07-31 Pavel Roskin <proski@gnu.org>
2235
2236 * disk/raid5_recover.c (grub_raid5_recover): Revert conversion
2237 to grub_zalloc(), it was erroneous.
2238 Reported by Bean <bean123ch@gmail.com>
2239
a275d9e7 22402009-07-30 Vladimir Serbinenko <phcoder@gmail.com>
2241
2242 * util/i386/pc/grub-setup.c (setup): Check that no partition is in
ad8ea1f4 2243 embedding zone, not only the first one.
a275d9e7 2244
56c5a47f 22452009-07-29 Joe Auricchio <jauricchio@gmail.com>
2246
2247 * term/gfxterm.c (clear_char): New function.
2248 (grub_virtual_screen_setup): Use clear_char.
2249 (scroll_up): Likewise.
2250 (grub_virtual_screen_cls): Likewise.
2251
67bb323a 22522009-07-29 Felix Zielcke <fzielcke@z-51.de>
2253
2254 * util/deviceiter.c (get_acceleraid_disk_name): New static
2255 function.
2256 (grub_util_iterate_devices): Handle Accelraid devices.
2257 * util/hostdisk.c (convert_system_partition_to_system_disk): Likewise.
2258
388a7c75 22592009-07-28 Robert Millan <rmh.grub@aybabtu.com>
2260
2261 * loader/i386/linux.c (grub_cmd_linux): Use ',' rather than ';' as
2262 separator for the suggested gfxpayload string (';' collides with the
2263 parser and needs escaping).
2264
3bb7abcf 22652009-07-28 Vladimir Serbinenko <phcoder@gmail.com>
2266
2267 * loader/i386/multiboot_helper.S (grub_multiboot_backward_relocator):
2268 Clear direction flag before jumping to OS.
2269 (grub_multiboot2_real_boot): Likewise.
2270
2ddd36d7 22712009-07-28 Felix Zielcke <fzielcke@z-51.de>
2272
2273 * util/i386/pc/grub-install: Fix parsing of --disk-module
2274 option.
2275
c521b62b 22762009-07-28 Felix Zielcke <fzielcke@z-51.de>
2277
2278 * util/i386/pc/grub-setup.c (setup): Fix 2 incorrect checks
2279 when embedding.
2280
880e0a0c 22812009-07-26 Felix Zielcke <fzielcke@z-51.de>
2282
2283 * util/grub-mkconfig.in (package_version): New variable.
2284 Use it do display the version.
2285
2366e356 22862009-07-25 Felix Zielcke <fzielcke@z-51.de>
2287
2288 * kern/file.c (grub_file_open): Revert to previous check with
2289 grub_errno.
2290
7ad8c80e 22912009-07-25 Vladimir Serbinenko <phcoder@gmail.com>
2292
2293 * commands/probe.c (GRUB_MOD_INIT (probe)): Remove "[--target=target]"
2294 from help line. It's out of sync with code.
2295
72b9658b 22962009-07-25 Vladimir Serbinenko <phcoder@gmail.com>
2297
2298 * kern/parser.c (grub_parser_execute): Fix a bug causing truncated
2299 entries on failed boot.
2300
77435277 23012009-07-25 Felix Zielcke <fzielcke@z-51.de>
2302
2303 * kern/file.c (grub_file_open): Fix an error check.
2304
fcaa8b21 23052009-07-24 Vladimir Serbinenko <phcoder@gmail.com>
2306
35d16c74 2307 * util/i386/pc/grub-setup.c (setup): Fix segmentation fault when
2308 partition map couldn't be identified.
fcaa8b21 2309
48904cd1 23102009-07-23 Pavel Roskin <proski@gnu.org>
2311
ef3c317f 2312 * commands/xnu_uuid.c (transform): Use GRUB_CPU_WORDS_BIGENDIAN
2313 instead of WORDS_BIGENDIAN. Use grub_le_to_cpu32(), so that the
2314 case of little endian words becomes just an optimization.
2315 Respect const modifier.
ad8ea1f4 2316 (md5_final): Use code that doesn't depend on endianness.
ef3c317f 2317
48904cd1 2318 * include/grub/misc.h (ALIGN_UP): Cast align to the type of addr
2319 to avoid loss of upper bits if align is unsigned and shorter
2320 than addr.
2321
260c9a89 23222009-07-21 Vladimir Serbinenko <phcoder@gmail.com>
2323
2324 UUID support for UFS
2325
2326 * fs/ufs.c (grub_ufs_sblock): Add uuidhi and uuidlow.
2327 (grub_ufs_uuid): New function.
2328 (grub_ufs_fs): add .uuid
2329
f76ce889 23302009-07-21 Pavel Roskin <proski@gnu.org>
2331
2332 * kern/dl.c (grub_dl_check_header): Make static.
2333
6a6cbcaf 23342009-07-21 Felix Zielcke <fzielcke@z-51.de>
2335
2336 * util/grub.d/30_os-prober.in: Remove unused CHAINROOT. Don't
2337 add drivemap for Vista. It breaks Windows 7.
2338
cffcddb2 23392009-07-21 Vladimir Serbinenko <phcoder@gmail.com>
2340
2341 * fs/ufs.c (grub_ufs_sblock): Fix offset of mtime2 which was off by
2342 128 bytes
2343
1ef44b80 23442009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
2345
2346 Add BFS support
2347
2348 * conf/common.rmk (grub_probe_SOURCES): Add fs/befs.c.
2349 (grub_fstest_SOURCES): Likewise.
2350 (pkglib_MODULES): Add befs.mod.
2351 (befs_mod_SOURCES): New variable.
2352 (befs_mod_CFLAGS): Likewise.
2353 (befs_mod_LDFLAGS): Likewise.
2354 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2355 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2356 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2357 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
2358 (grub_setup_SOURCES): Likewise.
2359 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2360 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2361 (grub_setup_SOURCES): Likewise.
2362 * fs/befs.c: New file.
2363 * fs/afs.c (GRUB_AFS_FSNAME): New declaration.
2364 (GRUB_AFS_SBLOCK_SECTOR): Likewise.
2365 (GRUB_AFS_SBLOCK_MAGIC1) [MODE_BFS]: New conditional declaration.
2366 (GRUB_AFS_BTREE_MAGIC) [MODE_BFS]: Likewise
2367 (B_KEY_INDEX_ALIGN): New declaration.
2368 (B_KEY_INDEX_OFFSET): Use B_KEY_INDEX_ALIGN.
2369 (grub_afs_bnode) [MODE_BFS]: Make key_count and key_size 16-bit
2370 (grub_afs_btree) [MODE_BFS]: New conditional declaration.
2371 (grub_afs_sblock) [MODE_BFS]: Remove link_count.
2372 (grub_afs_validate_sblock) [MODE_BFS]: Support BFS
2373 (grub_afs_mount) [MODE_BFS]: Likewise.
2374 (grub_afs_dir) [MODE_BFS]: Divide mtime by 65536 and not 1000000.
2375 (grub_afs_fs): Use GRUB_AFS_FSNAME
2376 (GRUB_MOD_INIT (afs)) [MODE_BFS]: Rename to ...
2377 (GRUB_MOD_INIT (befs)) [MODE_BFS]: ... this
2378 (GRUB_MOD_FINI (afs)) [MODE_BFS]: Rename to ...
2379 (GRUB_MOD_FINI (befs)) [MODE_BFS]: ... this
2380
4f253044 23812009-07-19 Yves BLUSSEAU <yves.grub-devel@zetam.org>
2382
2383 * util/getroot.c (find_root_device): Add support for MacOSX.
2384 * util/hostdisk.c: Likewise.
2385
57a55913 23862009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
2387
2388 * font/font.c (find_glyph): Check whether a font is present to avoid
2389 segmentation fault.
75421ca9 2390
23912009-07-20 Joe Auricchio <jauricchio@gmail.com>
04c7c429 2392
2393 * term/gfxterm.c (grub_virtual_screen_setup): Clear virtual_screen.
2394
e98cd0c2 23952009-07-20 Pavel Roskin <proski@gnu.org>
2396
2397 * configure.ac: Trim excessively wordy excuses.
2398
1d2d169a 23992009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
2400
2401 Add symlink, mtime and label support to AtheFS.
2402
2403 * fs/afs.c (grub_afs_sblock): Declare `name' as char.
2404 (grub_afs_iterate_dir): Handle symlinks.
2405 (grub_afs_open): Use grub_afs_read_symlink.
2406 (grub_afs_dir): Likewise.
2407 Pass mtime.
2408 (grub_afs_label): New function.
2409 (grub_afs_fs): Add grub_afs_label.
2410 (grub_afs_read_symlink): New function.
2411
186f3189 24122009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
2413
2414 Fix AtheFS support.
2415
2416 * fs/afs.c: Fix comments style.
2417 (grub_afs_blockrun): Declare as packed.
2418 (grub_afs_datastream): Likewise.
2419 (grub_afs_bnode): Likewise.
2420 (grub_afs_btree): Likewise.
2421 (grub_afs_sblock): Likewise.
2422 Declare `name' as char.
2423 (grub_afs_inode): Declare as packed.
2424 Change void *vnode to grub_uint32_t unused.
2425 (grub_afs_iterate_dir): Check that key_size is positive.
2426 (grub_afs_mount): Don't read superblock twice.
75421ca9 2427 (grub_afs_dir): Don't free node in case of error,
186f3189 2428 grub_fshelp_find_file already handles this.
2429 (grub_afs_open): Likewise.
2430
5680109e 24312009-07-19 Pavel Roskin <proski@gnu.org>
2432
2433 * Makefile.in: Remove LIBLZO and enable_lzo.
2434 * conf/i386-pc.rmk: Remove lzo support.
2435 * configure.ac: Remove checks for lzo, don't define ENABLE_LZMA.
2436 * include/grub/i386/pc/kernel.h: Define ENABLE_LZMA. Remove lzo
2437 support.
2438 * kern/i386/pc/lzo1x.S: Remove.
2439 * kern/i386/pc/startup.S: Remove lzo support.
2440 * util/i386/pc/grub-mkimage.c: Likewise.
2441
ac70fa32 24422009-07-19 Vladimir Serbinenko <phcoder@gmail.com>
2443
2444 * disk/usbms.c (grub_usbms_transfer): Fix double semicolon.
2445 * fs/xfs.c (grub_xfs_dir): Likewise.
2446 * fs/afs.c (grub_afs_dir): Likewise.
2447 * fs/iso9660.c (grub_iso9660_iterate_dir): Likewise.
2448 (grub_iso9660_open): Likewise.
2449 * fs/jfs.c (grub_jfs_open): Likewise.
2450 * fs/ext2.c (grub_ext2_dir): Likewise.
2451 * include/grub/macho.h (grub_macho_fat_arch): Likewise.
2452 * script/sh/lexer.c (grub_script_yylex): Likewise.
75421ca9 2453
eab58da2 24542009-07-16 Pavel Roskin <proski@gnu.org>
2455
d2838156 2456 * configure.ac: Never add "-c" to CFLAGS.
2457
55c70904 2458 * configure.ac: Fix incorrect comparison for grub_cv_cc_efiemu.
2459
43e6200c 2460 * configure.ac: Fix wrong use of grub_cv_cc_no_red_zone where
2461 grub_cv_cc_efiemu should be used.
2462
ce7a733d 2463 * configure.ac: Typo fixes.
2464
eab58da2 2465 * kern/mm.c (grub_zalloc): New function.
2466 (grub_debug_zalloc): Likewise.
2467 * include/grub/mm.h: Declare grub_zalloc() and
2468 grub_debug_zalloc().
2469 * util/misc.c (grub_zalloc): New function.
2470 * bus/usb/uhci.c (grub_uhci_pci_iter): Use grub_zalloc()
2471 instead of grub_malloc(), remove unneeded initializations.
2472 * bus/usb/usbhub.c (grub_usb_hub_add_dev): Likewise.
2473 * commands/extcmd.c (grub_extcmd_dispatcher): Likewise.
2474 * commands/parttool.c (grub_cmd_parttool): Likewise.
2475 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Likewise.
2476 * disk/raid5_recover.c (grub_raid5_recover): Likewise.
2477 * disk/raid6_recover.c (grub_raid6_recover): Likewise.
2478 * disk/usbms.c (grub_usbms_finddevs): Likewise.
2479 * efiemu/mm.c (grub_efiemu_request_memalign): Likewise.
2480 * efiemu/pnvram.c (grub_efiemu_pnvram): Likewise.
2481 (grub_cmd_efiemu_pnvram): Likewise.
2482 * fs/i386/pc/pxe.c (grub_pxefs_open): Likewise.
2483 * fs/iso9660.c (grub_iso9660_mount): Likewise.
2484 (grub_iso9660_iterate_dir): Likewise.
2485 * fs/jfs.c (grub_jfs_opendir): Likewise.
2486 * fs/ntfs.c (list_file): Likewise.
2487 (grub_ntfs_mount): Likewise.
2488 * kern/disk.c (grub_disk_open): Likewise.
2489 * kern/dl.c (grub_dl_load_core): Likewise.
2490 * kern/elf.c (grub_elf_file): Likewise.
2491 * kern/env.c (grub_env_context_open): Likewise.
2492 (grub_env_set): Likewise.
2493 (grub_env_set_data_slot): Likewise.
2494 * kern/file.c (grub_file_open): Likewise.
2495 * kern/fs.c (grub_fs_blocklist_open): Likewise.
2496 * loader/i386/multiboot.c (grub_module): Likewise.
2497 * loader/xnu.c (grub_xnu_create_key): Likewise.
2498 (grub_xnu_create_value): Likewise.
2499 * normal/main.c (grub_normal_add_menu_entry): Likewise.
2500 (read_config_file): Likewise.
2501 * normal/menu_entry.c (make_screen): Likewise.
2502 * partmap/sun.c (sun_partition_map_iterate): Likewise.
2503 * script/sh/lexer.c (grub_script_lexer_init): Likewise.
2504 * script/sh/script.c (grub_script_parse): Likewise.
2505 * video/bitmap.c (grub_video_bitmap_create): Likewise.
2506 * video/readers/jpeg.c (grub_video_reader_jpeg): Likewise.
2507 * video/readers/png.c (grub_png_output_byte): Likewise.
2508 (grub_video_reader_png): Likewise.
2509
830afef7 25102009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
5ce5507f 2511
2512 Enable all targets that can be built by default
2513
830afef7 2514 * configure.ac: enable efiemu runtime, grub-emu, grub-emu-usb,
5ce5507f 2515 grub-mkfont and grub-fstest if they can be built
2516
ee293aee 25172009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
2518
2519 Fix hang and segmentation fault in grub-emu-usb
2520
2521 * disk/scsi.c (grub_scsi_open): return err and not grub_errno
2522 * util/usb.c (grub_libusb_devices): likewise
2523 (grub_libusb_init): rename to ...
2524 (GRUB_MOD_INIT (libusb)):...this
2525 (grub_libusb_fini): rename to ..
2526 (GRUB_MOD_FINI (libusb)):...this
2527 * disk/usbms.c (grub_usbms_transfer): fix retry logic
2528 * include/grub/disk.h (grub_raid_init): removed, it's useless
2529 (grub_raid_fini): likewise
2530 (grub_lvm_init): likewise
2531 (grub_lvm_fini): likewise
2532 * util/grub-emu.c (main): don't call grub_libusb_init, it's done
2533 by grub_init_all
2534
94414221 25352009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
2536
2537 Fix libusb
2538
2539 * Makefile.in (LIBUSB): new macro
2540 * genmk.rb (Utility/print_tail): new method
2541 (Utility/rule): use intermediary variable #{prefix}_OBJECTS
2542 (top level): call util.print_tail at the end.
2543
59ade63d 25442009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
2545
2546 Make FreeBSD accept zpool.cache
2547
2548 * loader/i386/bsd.c (grub_freebsd_add_meta_module): spoof filename if
2549 type is /boot/zfs/zpool.cache
2550
a58da8c7 25512009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
2552
2553 Fix 64-bit efiemu
2554
2555 * include/grub/efiemu/efiemu.h (grub_efiemu_configuration_table64_t):
2556 correct wrong typedef
2557 * efiemu/prepare.c (SUFFIX (grub_efiemu_prepare)): minor style fixes
2558
20591577 25592009-07-15 Pavel Roskin <proski@gnu.org>
2560
560ca572 2561 * include/grub/disk.h (struct grub_disk_dev): Use enum for id.
2562 * kern/disk.c (struct grub_disk_cache): Likewise.
2563
e8e8e4fd 2564 * commands/probe.c (options): Typo fix.
2565
fde24e10 2566 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_BPB_END):
2567 Increase to 0x5a to accommodate FAT32. Adjust other offsets
2568 accordingly.
2569 Original patch by Yves Blusseau <yves.grub-devel@zetam.org>
2570
379c54c1 2571 * boot/i386/pc/boot.S (general_error_string): Add DOS newline at
2572 the end of "Error" to make the message more readable.
2573
7bd8f5bf 2574 * boot/i386/pc/boot.S (kernel_segment): Remove.
2575 (copy_buffer): Use GRUB_BOOT_MACHINE_KERNEL_ADDR in segment 0
2576 for destination.
2577
40b132c5 2578 * boot/i386/pc/boot.S (boot_version): Remove.
2579 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_VER_MAJ):
2580 Remove.
2581
20591577 2582 * include/grub/i386/pc/boot.h: Sort all offsets.
2583 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Remove, it's unused.
2584 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Likewise.
2585 * boot/i386/pc/boot.S: Assert location of every offset listed in
2586 include/grub/i386/pc/boot.h.
2587
2df32b2c 25882009-07-13 Pavel Roskin <proski@gnu.org>
2589
44b5d879 2590 * include/grub/i386/coreboot/machine.h: Rename
2591 GRUB_MACHINE_LINUXBIOS to GRUB_MACHINE_COREBOOT.
2592 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Allow
2593 multiboot 1 for GRUB_MACHINE_COREBOOT and GRUB_MACHINE_QEMU.
2594
17dc3751 2595 * kern/dl.c: Force native word size to suppress warnings when
2596 compiling grub-emu.
2597
2df32b2c 2598 * kern/device.c (grub_device_iterate): Change struct part_ent to
2599 hold the name, not a pointer to it. Use one grub_malloc() per
2600 partition, not two. Free partition_name if grub_malloc() fails.
2601 Set ents to NULL only before grub_partition_iterate() is called.
2602
75c59f59 26032009-07-11 Bean <bean123ch@gmail.com>
2604
2605 * kern/ieee1275/openfw.c (grub_children_iterate): Fix size of
2606 childname.
2607
0ae1bf88 26082009-07-10 Bean <bean123ch@gmail.com>
26092009-07-10 Robert Millan <rmh.grub@aybabtu.com>
2610
2611 * kern/ieee1275/openfw.c (grub_children_iterate)
2612 (grub_devalias_iterate): Fix size evaluation for property or path
2613 strings, which was broken since r2132.
2614
8279cade 26152009-07-07 Pavel Roskin <proski@gnu.org>
2616
7d8a52d3 2617 * commands/search.c (search_file): Merge into ...
2618 (search_fs): ... this. Accept search type as argument.
2619 (grub_cmd_search): Pass search type to search_fs().
2620
25f9a05a 2621 * include/grub/util/console.h: New file.
2622 * util/console.c: Use it instead of grub/machine/console.h.
2623 * util/grub-emu.c: Likewise.
2624
8279cade 2625 * lib/arg.c (find_long_option): Remove.
2626 (find_long): Add `len' argument, make `s' const char *.
2627 (grub_arg_parse): Parse long options in place, not in a
2628 temporary buffer.
2629
4a11b60f 26302009-07-06 Pavel Roskin <proski@gnu.org>
2631
99f68041 2632 * commands/search.c (search_fs): Fix potential NULL pointer
2633 dereference.
2634
4a11b60f 2635 * commands/search.c (search_fs): Replace QUID macro with quid_fn
2636 function pointer.
2637
e110f4de 26382009-07-06 Daniel Mierswa <impulze@impulze.org>
2639
2640 * commands/search.c (search_fs): Use grub_strcasecmp() for UUID
2641 comparison.
2642
46eeb6a2 26432009-07-05 Pavel Roskin <proski@gnu.org>
2644
bab74958 2645 * include/grub/i386/linux.h (struct linux_kernel_params):
2646 Restore padding3, it's still needed.
2647
46eeb6a2 2648 * util/grub.d/10_freebsd.in: Fix spelling of `device.hints' on
2649 FreeBSD.
2650 * util/osdetect.lua: Likewise.
2651
b4a1dc79 26522009-07-05 Bean <bean123ch@gmail.com>
2653
2654 * conf/common.rmk (lua_mode_SOURCES): Add script/lua/lstrlib.c.
2655
2656 * script/lua/grub_lib.c (grub_lua_run): Check input parameter.
2657 (grub_lua_getenv): Likewise.
2658 (grub_lua_setenv): Likewise.
2659 (save_errno): New function.
2660 (push_result): Likewise.
2661 (grub_lua_enum_device): Likewise.
2662 (grub_lua_enum_file): Likewise.
2663 (grub_lua_file_open): Likewise.
2664 (grub_lua_file_close): Likewise.
2665 (grub_lua_file_seek): Likewise.
2666 (grub_lua_file_read): Likewise.
2667 (grub_lua_file_getline): Likewise.
2668 (grub_lua_file_getsize): Likewise.
2669 (grub_lua_file_getpos): Likewise.
2670 (grub_lua_file_eof): Likewise.
2671 (grub_lua_file_exist): Likewise.
2672 (grub_lua_add_menu): Likewise.
2673
2674 * script/lua/grub_lua.h (isupper): New inline function.
2675 (islower): Likewise.
2676 (ispunct): Likewise.
2677 (isxdigit): Likewise.
2678 (strcspn): Change to normal function.
2679 (strpbkr): New function declaration.
2680 (memchr): Likewise.
2681
2682 * script/lua/grub_main.c (scan_str): New function.
2683 (strcspn): Likewise.
2684 (strpbrk): Likewise.
2685 (memchr): Likewise.
2686
2687 * script/lua/linit.c (lualibs): Enable the string library.
2688
2689 * util/osdetect.lua: New file.
2690
2da92295 26912009-07-04 Robert Millan <rmh.grub@aybabtu.com>
2692
2693 * include/grub/i386/linux.h (struct linux_kernel_params): Add
2694 `capabilities' member.
2695
b2582ec9 26962009-07-02 Pavel Roskin <proski@gnu.org>
2697
2698 * genparttoollist.sh: Add missing newline at the end.
2699
32622956 27002009-07-01 Pavel Roskin <proski@gnu.org>
2701
87a7339e 2702 * kern/x86_64/efi/callwrap.S: Add missing newline at the end.
2703
d23af54e 2704 * util/hostdisk.c (open_device): Remove `const' from
2705 `sysctl_size', as sysctlbyname() can change it (in this case it
2706 doesn't actually happen).
2707
c94b18a9 2708 * include/grub/types.h: Define GRUB_LONG_MAX and GRUB_LONG_MIN
2709 using signed long int constants.
2710
c6cd3ef0 2711 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): Make `p'
2712 constant to avoid a warning on FreeBSD.
2713
0df63420 2714 * util/hostdisk.c (device_is_wholedisk): Compile only on systems
2715 where it's needed.
2716
999577f1 2717 * Makefile.in: Install include/grub/machine symlink.
2718
6f41557f 2719 * Makefile.in: When installing symlinks, use "cp -fR", which
2720 works on FreeBSD and MacOSX.
2721 From Yves Blusseau <cl7m42e02@sneakemail.com>
2722
c8d22988 2723 * kern/dl.c (grub_dl_resolve_symbol): Make static.
2724 * include/grub/dl.h: Remove grub_dl_resolve_symbol().
2725
1b96e952 2726 * util/misc.c: Move grub_reboot() and grub_halt() ...
2727 * util/grub-emu.c: ... here. Make main_env static.
2728 * include/grub/util/misc.h: Remove main_env.
2729
2ef0084d 2730 * kern/mm.c: Use correct format to print size_t.
2731
32622956 2732 * include/grub/elf.h: Define Elf_Sword and Elf_Xword.
2733 * kern/i386/dl.c: Use ELF symbols without "32" or "64".
2734 * kern/powerpc/dl.c: Likewise.
2735 * kern/sparc64/dl.c: Likewise.
2736 * kern/x86_64/dl.c: Likewise.
2737
3f7f0cd0 27382009-07-01 Robert Millan <rmh.grub@aybabtu.com>
2739
2740 Fix grub-emu build on sparc64-ieee1275.
2741
75421ca9 2742 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Synchronize with ...
3f7f0cd0 2743 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): ... this.
2744
211d06b5 27452009-07-01 Robert Millan <rmh.grub@aybabtu.com>
2746
2747 * util/misc.c: Include `<setjmp.h>' and `<grub/machine/machine.h>'.
2748 (grub_reboot, grub_halt): New functions.
2749
2750 * util/i386/pc/misc.c: Delete. Update all users.
2751 * util/sparc64/ieee1275/misc.c: Likewise.
2752 * util/powerpc/ieee1275/misc.c: Likewise.
2753
aaf53e3c 27542009-07-01 Robert Millan <rmh.grub@aybabtu.com>
2755
2756 * conf/i386.rmk (setjmp_mod_SOURCES)
2757 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Move to ...
2758 * conf/common.rmk (setjmp_mod_SOURCES)
2759 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): ... here, and modify
2760 to use $(target_cpu).
2761 * conf/x86_64-efi.rmk (setjmp_mod_SOURCES)
2762 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Remove.
2763 * conf/powerpc-ieee1275.rmk: Likewise.
2764 * conf/sparc64-ieee1275.rmk: Likewise.
2765
2766 * conf/i386-pc.rmk (kernel_img_SOURCES): Use
2767 $(target_cpu) for kern/$(target_cpu)/dl.c.
2768 * conf/i386-efi.rmk: Likewise.
2769 * conf/i386-ieee1275.rmk: Likewise.
2770 * conf/x86_64-efi.rmk: Likewise.
2771 * conf/i386-coreboot.rmk: Likewise.
2772 * conf/powerpc-ieee1275.rmk (kernel_img_SOURCES): Use
2773 $(target_cpu) for kern/$(target_cpu)/dl.c and for
2774 kern/$(target_cpu)/cache.S.
2775 * conf/sparc64-ieee1275.rmk: Likewise.
2776
a337130b 27772009-07-01 Robert Millan <rmh.grub@aybabtu.com>
2778
2779 * include/grub/i386/linux.h (linux_kernel_params): Change `mmap_size'
2780 type to `grub_uint8_t', and adjust `padding9' accordingly.
2781
c6fe4d53 27822009-06-29 Robert Millan <rmh.grub@aybabtu.com>
2783
b09db61d 2784 * include/grub/i386/linux.h (GRUB_VIDEO_TYPE_TEXT): New macro.
2785
c6fe4d53 2786 * loader/i386/linux.c [__i386__] (grub_linux_boot): Simplify inline
2787 assembly in final jump, using register constraints.
2788
b09db61d 2789 (grub_linux_boot): For text mode, initialize `have_vga' using
2790 GRUB_VIDEO_TYPE_TEXT rather than 0 (this changes its value to 1).
2791
2792 Initialize `video_cursor_x' and `video_cursor_y' as late as possible,
2793 right before the final jump.
2794
2795 Set `video_mode' to 0x3.
2796
2797 Document initialization of `video_page', `video_mode' and
2798 `video_ega_bx'.
2799
28333ad0 28002009-06-29 Robert Millan <rmh.grub@aybabtu.com>
2801
2802 * include/grub/i386/linux.h (GRUB_LINUX_FLAG_QUIET): New macro.
2803 * loader/i386/linux.c (grub_cmd_linux): Recognize "quiet" option,
75421ca9 2804 and set GRUB_LINUX_FLAG_QUIET appropriately.
28333ad0 2805
02164e1b 28062009-06-29 Robert Millan <rmh.grub@aybabtu.com>
2807
2808 Fix build on Debian / sparc.
2809
2810 * configure.ac: Recognize `sparc' target_cpu (as sparc64).
2811
18b6c557 28122009-06-28 Pavel Roskin <proski@gnu.org>
2813
85f2aab6 2814 * kern/i386/qemu/mmap.c (grub_machine_mmap_iterate): Use cast to
2815 fix a warning.
2816
18b6c557 2817 * util/grub.d/10_linux.in: Match SUSE style initrd names.
2818
ad760f81 28192009-06-27 Robert Millan <rmh.grub@aybabtu.com>
2820
2821 * loader/i386/linux.c (grub_linux_boot): Fix uninitialized use of
2822 `err'.
2823
87a4623b 28242009-06-27 Robert Millan <rmh.grub@aybabtu.com>
2825
2826 Revert r2338.
2827
2828 * loader/i386/linux.c (grub_cmd_linux): Don't call grub_error when
2829 file can't be opened. grub_file_open() is already supposed to set
75421ca9 2830 grub_errno / grub_errmsg appropriately.
87a4623b 2831 * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
2832
8231fb77 28332009-06-27 Pavel Roskin <proski@gnu.org>
28342009-06-27 Robert Millan <rmh.grub@aybabtu.com>
2835
2836 * include/grub/dl.h: Include grub/elf.h.
2837 (struct grub_dl): Add symtab field.
2838 * kern/dl.c [GRUB_MACHINE_QEMU]: Define
2839 GRUB_MODULES_MACHINE_READONLY.
2840 (grub_dl_resolve_symbols): Populate mod->symtab, making a copy
2841 of the header for read-only modules.
2842 (grub_dl_unload): Free mod->symtab for read-only modules.
2843 * kern/i386/dl.c: Use mod->symtab.
2844 * kern/powerpc/dl.c: Likewise.
2845 * kern/sparc64/dl.c: Likewise.
2846 * kern/x86_64/dl.c: Likewise.
2847
2848 * conf/i386-qemu.rmk: New file.
2849 * kern/i386/qemu/startup.S: Likewise.
2850 * kern/i386/qemu/mmap.c: Likewise.
2851 * boot/i386/qemu/boot.S: Likewise.
2852 * include/grub/i386/qemu/time.h: Likewise.
2853 * include/grub/i386/qemu/serial.h: Likewise.
2854 * include/grub/i386/qemu/kernel.h: Likewise.
2855 * include/grub/i386/qemu/console.h: Likewise.
2856 * include/grub/i386/qemu/boot.h: Likewise.
2857 * include/grub/i386/qemu/init.h: Likewise.
2858 * include/grub/i386/qemu/machine.h: Likewise.
2859 * include/grub/i386/qemu/loader.h: Likewise.
2860 * include/grub/i386/qemu/memory.h: Likewise.
2861
2862 * conf/i386-coreboot.rmk (GRUB_BOOT_MACHINE_LINK_ADDR)
2863 (GRUB_KERNEL_MACHINE_LINK_ADDR): New variables.
2864 [qemu] (pkglib_IMAGES): Add `boot.img'.
2865 [qemu] (boot_img_SOURCES, boot_img_ASFLAGS, boot_img_LDFLAGS)
2866 [qemu] (boot_img_FORMAT): New variables.
2867 [qemu] (bin_UTILITIES): Add `grub-mkimage'.
2868 [qemu] (grub_mkimage_SOURCES, grub_mkimage_CFLAGS): New variables.
2869 [qemu] (kernel_img_SOURCES, kernel_img_HEADERS, kernel_img_CFLAGS)
2870 [qemu] (kernel_img_ASFLAGS, kernel_img_LDFLAGS)
2871 [qemu] (kernel_img_FORMAT): New variables.
2872
2873 * configure.ac: Recognise `i386-qemu'.
2874
2875 * util/i386/pc/grub-mkimage.c (compress_kernel): Add dummy variant
2876 (for no compression).
2877 [GRUB_MACHINE_QEMU] (generate_image): Misc adjustments to produce
2878 a valid i386 ROM image. Make `GRUB_KERNEL_MACHINE_COMPRESSED_SIZE',
2879 `GRUB_KERNEL_MACHINE_INSTALL_DOS_PART' and
2880 `GRUB_KERNEL_MACHINE_INSTALL_BSD_PART' optional features (with
2881 ifdefs).
2882
97fe384e 28832009-06-27 Pavel Roskin <proski@gnu.org>
2884
2885 * efiemu/prepare.c: Eliminate TYPE macro, it makes code hard to
2886 read.
2887 * efiemu/prepare32.c: Likewise.
2888 * efiemu/prepare64.c: Likewise.
2889
c402ab17 28902009-06-26 Pavel Roskin <proski@gnu.org>
2891
2892 * include/grub/types.h: Define GRUB_TARGET_WORDSIZE.
2893 * include/grub/elf.h: Define symbols without "32" or "64" based
2894 on GRUB_TARGET_WORDSIZE.
2895 * include/grub/multiboot2.h: Use GRUB_TARGET_WORDSIZE.
2896 * efiemu/loadcore32.c: Redefine GRUB_TARGET_WORDSIZE, remove own
2897 ELF definitions.
2898 * efiemu/loadcore64.c: Likewise.
2899 * loader/i386/bsd32.c: Likewise.
2900 * loader/i386/bsd64.c: Likewise.
2901 * kern/dl.c: Remove own ELF definitions.
2902 * util/i386/efi/grub-mkimage.c: Likewise.
2903
9bbdfd4d 29042009-06-23 Robert Millan <rmh.grub@aybabtu.com>
2905
2906 * kern/i386/pc/startup.S (real_to_prot): Access `gdtdesc' using
2907 segment 0x0 unconditionally, because the reference generated by
2908 GAS is an absolute address.
2909
a42ce6e9 29102009-06-22 Robert Millan <rmh.grub@aybabtu.com>
2911
2912 * include/grub/i386/kernel.h: Include `<grub/machine/machine.h>'.
2913 [! GRUB_MACHINE_IEEE1275]: Set `GRUB_MOD_ALIGN' to 0x1.
2914
c952cf92 29152009-06-22 Robert Millan <rmh.grub@aybabtu.com>
2916
2917 * commands/search.c (grub_cmd_search): Macroify hardcoded args[]
2918 indexes. Check for -f explicitly.
cc3752ad 2919 (search_file): Improve error message.
2920 (GRUB_MOD_INIT(search)): Add missing `-n' to help output.
c952cf92 2921
132a0a59 29222009-06-22 Robert Millan <rmh.grub@aybabtu.com>
2923
2924 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): Rename to ...
2925 (GRUB_KERNEL_MACHINE_LINK_ADDR): ... this. Update all users.
2926
387a140c 29272009-06-22 Robert Millan <rmh.grub@aybabtu.com>
2928
2929 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/misc.S'.
2930 * conf/i386-ieee1275.rmk: Likewise.
2931 * conf/i386-coreboot.rmk: Likewise.
2932
2933 * kern/i386/pc/startup.S (grub_stop): Remove function.
2934 * kern/i386/ieee1275/startup.S: Likewise.
2935 * kern/i386/coreboot/startup.S: Likewise.
2936 * kern/i386/misc.S (grub_stop): New function.
2937
41da9665 29382009-06-22 Robert Millan <rmh.grub@aybabtu.com>
2939
2940 * kern/i386/pc/startup.S (real_to_prot): Move from here ...
2941 * kern/i386/realmode.S (real_to_prot): ... to here.
2942
bf337234 29432009-06-22 Robert Millan <rmh.grub@aybabtu.com>
2944
2945 * conf/i386-ieee1275.rmk (pkglib_PROGRAMS): Replace `kernel.elf'
2946 with `kernel.img'.
2947 (kernel_elf_SOURCES): Rename to ...
2948 (kernel_img_SOURCES): ... this.
2949 (kernel_elf_HEADERS): Rename to ...
2950 (kernel_img_HEADERS): ... this. Update all users.
2951 (kernel_elf_ASFLAGS): Rename to ...
2952 (kernel_img_ASFLAGS): ... this.
2953 (kernel_elf_CFLAGS): Rename to ...
2954 (kernel_img_CFLAGS): ... this.
2955 (kernel_elf_LDFLAGS): Rename to ...
2956 (kernel_img_LDFLAGS): ... this.
2957 * conf/i386-coreboot.rmk: Likewise.
2958 * conf/powerpc-ieee1275.rmk: Likewise.
2959
2960 * util/elf/grub-mkimage.c (add_segments): Replace "kernel.elf"
2961 with "kernel.img".
2962
f52196ff 29632009-06-21 Pavel Roskin <proski@gnu.org>
2964
c3cee413 2965 * loader/powerpc/ieee1275/linux.c (offset_phdr): Fix prototypes
2966 to match nested functions.
2967 * loader/sparc64/ieee1275/linux.c: Likewise.
2968
f52196ff 2969 * conf/i386-ieee1275.rmk: Define kernel_elf_ASFLAGS.
2970
58750afc 29712009-06-21 Robert Millan <rmh.grub@aybabtu.com>
2972
2973 * configure.ac: Enable `END_SYMBOL' / `BSS_START_SYMBOL' test on
2974 all i386 platforms.
2975
15355c7d 29762009-06-21 Robert Millan <rmh.grub@aybabtu.com>
2977
2978 Fix asm file handling on ELF, and remove workarounds.
2979
2980 * genmk.rb (class Programs): Detect assembly files, and set ASFLAGS
75421ca9 2981 and -DASM_FILE=1 appropriately (copied from `class Images' stanza).
15355c7d 2982 * kern/i386/ieee1275/startup.S (ASM_FILE): Remove macro.
2983 * kern/i386/coreboot/startup.S (ASM_FILE): Likewise.
2984
3f3ec72b 29852009-06-21 Vladimir Serbinenko <phcoder@gmail.com>
2986
2987 Load BSD ELF modules
2988
2989 * conf/i386-pc.rmk (bsd_mod_SOURCES): Add loader/i386/bsd32.c
2990 and loader/i386/bsd64.c
2991 * include/grub/i386/bsd.h (FREEBSD_MODTYPE_MODULE): Remove
2992 (FREEBSD_MODTYPE_ELF_MODULE): New definition
2993 (FREEBSD_MODTYPE_ELF_MODULE_OBJ): Likewise
2994 (grub_freebsd_load_elfmodule32): New declaration
2995 (grub_freebsd_load_elfmoduleobj64): Likewise
2996 (grub_freebsd_load_elf_meta32): Likewise
2997 (grub_freebsd_load_elf_meta64): Likewise
2998 (grub_freebsd_add_meta): Likewise
2999 (grub_freebsd_add_meta_module): Likewise
3000 * loader/i386/bsd.c (grub_freebsd_add_meta): Make global
3001 (grub_freebsd_add_meta_module): Likewise and move module-specific
3002 parts to grub_cmd_freebsd and grub_cmd_freebsd_module
3003 (grub_cmd_freebsd): Add elf-kernel specific parts
3004 based on grub_freebsd_add_meta_module
3005 (grub_cmd_freebsd_module): Add type parsing moved from
3006 grub_freebsd_add_meta_module
3007 (grub_cmd_freebsd_module_elf): New function
3008 (cmd_freebsd_module_elf): New variable
3009 (GRUB_MOD_INIT): Register freebsd_module_elf
3010 * loader/i386/bsd32.c: New file
3011 * loader/i386/bsd64.c: Likewise
3012 * loader/i386/bsdXX.c: Likewise
3013 * kern/elf.c (grub_elf32_load): Let hook decide which pheaders to load
3014 (grub_elf64_load): Likewise
3015 * include/grub/elfload.h (grub_elf32_load_hook_t): New parameter do_load
3016 All users updated
3017 (grub_elf64_load_hook_t): Likewise
3018
0db15301 30192009-06-21 Colin Watson <cjwatson@ubuntu.com>
3020
3021 * util/grub-mkconfig.in (GRUB_DISABLE_LINUX_RECOVERY): Export
3022 variable.
3023 * util/grub.d/10_linux.in: If GRUB_DISABLE_LINUX_RECOVERY is true,
3024 don't write a menu entry for recovery mode.
3025
546796c1 30262009-06-20 Robert Millan <rmh.grub@aybabtu.com>
3027
3028 * util/i386/pc/grub-mkimage.c (main): Oops, free `output' only
3029 after it's no longer needed.
3030
cd7310d5 30312009-06-20 Robert Millan <rmh.grub@aybabtu.com>
3032
3033 * include/grub/i386/loader.h (grub_linux_prot_size)
3034 (grub_linux_tmp_addr, grub_linux_real_addr)
3035 (grub_linux_is_bzimage, grub_linux16_boot): Declare only on
3036 GRUB_MACHINE_PCBIOS.
3037 * util/i386/pc/grub-mkimage.c (compress_kernel): Move
3038 common grub_util_info() call to ...
3039 (generate_image): ... here.
3040 Fix use of uninitialized memory, comparison of signed with
3041 unsigned integers and memory leak.
3042 Remove bogus module address message.
3043
ab32d3b5 30442009-06-20 Vladimir Serbinenko <phcoder@gmail.com>
3045
3046 * disk/mdraid_linux.c (GRUB_MOD_FINI): use grub_raid_unregister and not
3047 grub_raid_register
3048 * disk/dmraid_nvidia.c (GRUB_MOD_FINI): likewise
3049
024ef597 30502009-06-19 Pavel Roskin <proski@gnu.org>
3051
3052 * configure.ac: Remove stray AC_MSG_CHECKING.
3053
3ac72b51 30542009-06-19 Vladimir Serbinenko <phcoder@gmail.com>
3055
3056 * disk/scsi.c (grub_scsi_open): use continue instead of big if
dd74360c 3057
e14cd814 30582009-06-18 Pavel Roskin <proski@gnu.org>
3059
3060 * conf/common.rmk: Add fs_file.mod.
3061 * disk/fs_file.c: New file.
3062 * include/grub/disk.h (enum grub_disk_dev_id): Add
3063 GRUB_DISK_DEVICE_FILE_ID.
3064
26586d98 30652009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
3066
3067 Fix build with Apple's toolchain. Part 2
3068
3069 * aclocal.m4 (grub_PROG_TARGET_CC): add missing prototype for main and
3070 a fake start
3071
26de2bcd 30722009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
3073
3074 Fix build with Apple's toolchain. Part 1
3075
3076 * commands/i386/pc/drivemap_int13h.S: use assembly-time constants
3077 for long calls
3078 * configure.ac: remove a leftover AC_MSG_RESULT
dd74360c 3079 (CFLAGS): don't add -Wl,--defsym,___main=0x8100 when building with
26de2bcd 3080 Apple's toolchain
3081
09b3490b 30822009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
3083
3084 Fix warnings
3085
3086 * fs/ntfscomp.c (decomp_get16): initialize c1 and c2
3087 (decomp_block): initialize ch
3088 use grub_memcpy instead of memcpy
3089
c22a006a 30902009-06-17 Pavel Roskin <proski@gnu.org>
3091
d3638678 3092 * include/grub/i386/coreboot/console.h: Don't use the i386-pc
3093 version, use declarations needed to use vga_text as the startup
3094 console.
3095
c22a006a 3096 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Remove
3097 term/i386/pc/at_keyboard.c, it doesn't need to be compiled into
3098 the kernel.
3099 * kern/i386/coreboot/init.c: Don't call grub_at_keyboard_init()
3100 and grub_at_keyboard_fini(), it's done on module load and
3101 unload.
3102
05b129e0 31032009-06-17 Felix Zielcke <fzielcke@z-51.de>
3104
3105 * loader/i386/linux.c (grub_cmd_linux): Set grub_error if the
3106 file can't be found.
3107 * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
3108
cf24ed9e 31092009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
3110
3111 Fix newline handling
3112
3113 * include/grub/script_sh.h (grub_lexer_param): new field was_newline
dd74360c 3114 * script/sh/lexer.c (grub_script_lexer_init): initialize was_newline
cf24ed9e 3115 (grub_script_yylex): don't segfault on unterminated script
3116 newline terminates command and variable
3117
74aa8e4b 31182009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
3119
3120 avoid double grub_adjust_range call. Bug reported by David Simner
3121
3122 * kern/disk.c (grub_disk_write): change to raw disk access before
3123 calling disk_read
3124
1bd265f3 31252009-06-17 Colin Watson <cjwatson@ubuntu.com>
3126
3127 * util/elf/grub-mkimage.c (usage): Prefix each option line with two
3128 spaces, for the benefit of help2man.
3129 * util/i386/efi/grub-mkimage.c (usage): Likewise.
3130
a2d08c06 31312009-06-16 Pavel Roskin <proski@gnu.org>
3132
3133 * kern/i386/halt.c: Include grub/machine/init.h.
3134 * kern/i386/reboot.c: Include grub/cpu/reboot.h.
3135
b97bcb19 31362009-06-16 Felix Zielcke <fzielcke@z-51.de>
3137
3138 * util/grub.d/30_os-prober.in: Use ${root} in the generated
3139 drivemap menuentry.
3140
0644f96c 31412009-06-16 James Jarvis <James.Jarvis@ed.ac.uk>
3142
3143 * commands/help.c GRUB_MOD_INIT(echo): Fix the help output of
3144 `echo' command.
3145
3ef17a2e 31462009-06-16 Pavel Roskin <proski@gnu.org>
3147
3148 * boot/i386/pc/boot.S: Remove root_drive. Assert offset of
3149 boot_drive_check by using GRUB_BOOT_MACHINE_DRIVE_CHECK. Don't
3150 save %dx, we only need %dl and we never change it.
3151 * boot/i386/pc/cdboot.S: Don't set the root drive.
3152 * boot/i386/pc/pxeboot.S: Likewise.
3153 * include/grub/i386/pc/boot.h: Remove
3154 GRUB_BOOT_MACHINE_ROOT_DRIVE, adjust
3155 GRUB_BOOT_MACHINE_DRIVE_CHECK.
3156 * include/grub/i386/pc/kernel.h: Remove grub_root_drive.
3157 * kern/i386/pc/init.c (make_install_device): Remove references
3158 to grub_root_drive.
3159 * kern/i386/pc/startup.S: Likewise.
3160 * util/i386/pc/grub-setup.c (setup): Don't set root_drive.
3161
693fe637 31622009-06-16 Vladimir Serbinenko <phcoder@gmail.com>
3163
3164 xnu_uuid command
3165
3166 * commands/xnu_uuid.c: new file
3167 * conf/common.rmk (pkglib_MODULES): add xnu_uuid.mod
3168 (xnu_uuid_mod_SOURCES): new variable
3169 (xnu_uuid_mod_CFLAGS): likewise
3170 (xnu_uuid_mod_LDFLAGS): likewise
3171 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
3172 * conf/i386-ieee1275.rmk: likewise
3173 * conf/i386-pc.rmk: likewise
3174 * conf/powerpc-ieee1275.rmk: likewise
3175 * conf/sparc64-ieee1275.rmk: likewise
3176 * util/grub.d/30_os-prober.in: use UUID for Mac OS X/Darwin
3177
c9da87d0 31782009-06-16 Pavel Roskin <proski@gnu.org>
3179
3180 * configure.ac: Avoid '==' in test command, it's not portable.
3181
9c6f4596 31822009-06-16 Vladimir Serbinenko <phcoder@gmail.com>
3183
3184 Probe command
3185
3186 * commands/probe.c: new file
3187 * conf/common.rmk (pkglib_MODULES): add probe.mod
3188 (probe_mod_SOURCES): new variable
3189 (probe_mod_CFLAGS): likewise
3190 (probe_mod_LDFLAGS): likewise
3191 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
3192 * conf/i386-ieee1275.rmk: likewise
3193 * conf/i386-pc.rmk: likewise
3194 * conf/powerpc-ieee1275.rmk: likewise
3195 * conf/sparc64-ieee1275.rmk: likewise
3196
70b7f9fd 31972009-06-15 Vladimir Serbinenko <phcoder@gmail.com>
3198
3199 Fix handling of string like \"hello\" and "a
3200 b"
3201
3202 * script/sh/lexer.c (check_textstate): accept GRUB_PARSER_STATE_ESC
3203 (grub_script_yylex): fix parsing of quoting, escaping and newline
3204
71c79a6b 32052009-06-13 Vladimir Serbinenko <phcoder@gmail.com>
3206
dd74360c 3207 * loader/i386/multiboot.c (grub_multiboot_get_bootdev): fix partition
71c79a6b 3208 handling
dd74360c 3209
0644f96c 32102009-06-13 Jun Inoue <jun.lambda@gmail.com>
880fc3c4 3211
3212 * util/grub-mkconfig.in: Fix parsing of --output option.
3213
e40893c3 32142009-06-12 Pavel Roskin <proski@gnu.org>
3215
3216 * Makefile.in (pkgdata_SRCDIR): Remove. genmodsrc.sh and
3217 genmk.rb don't need to be generated or installed.
3218
3a1acfe2 32192009-06-12 Vladimir Serbinenko <phcoder@gmail.com>
3220
3221 * commands/i386/pc/drivemap_int13h.S: add more comments
3222
3a4575d4 32232009-06-11 Pavel Roskin <proski@gnu.org>
3224
0658e928 3225 * Makefile.in (uninstall): Uninstall manuals.
3226
ca0388f0 3227 * Makefile.in: Rename lib_DATA to lib_SCRIPTS, move it from
3228 PKGLIB to SCRIPTS. This fixes installation of grub-mkconfig_lib
3229 and update-grub_lib in two places.
3230 * conf/common.rmk: Rename lib_DATA to lib_SCRIPTS.
3231
e3b27c39 3232 * disk/usbms.c (grub_usbms_transfer): Initialize `err' to fix
3233 a compiler warning.
3234
3a4575d4 3235 * loader/i386/bsd.c (grub_freebsd_boot): Rename `entry' to
3236 `entry_lo' to fix variable shadowing.
3237
af1f4f55 32382009-06-11 Christian Franke <franke@computer.org>
3239
3240 * kern/misc.c (__enable_execute_stack): Add missing return type
3241 to prevent gcc warning.
3242
5225e649 32432009-06-11 Felix Zielcke <fzielcke@z-51.de>
3244
3245 * conf/i386-ieee1275.rmk (COMMON_LDFLAGS): Remove `-static -lgcc'.
3246
7d83bd47 32472009-06-11 Pavel Roskin <proski@gnu.org>
3248
c1cb63ba 3249 * Makefile.in: Don't rely on any scripts being executable.
3250 Always use $(SHELL) to run shell scripts.
3251
7d83bd47 3252 * configure.ac: Always define ___main if using -nostdlib. This
3253 fixes tests on Cygwin.
3254
948f48e7 32552009-06-11 Giuseppe Caizzone <acaizzo@gmail.com>
3256
3257 UDF fix
3258
7d83bd47 3259 * fs/udf.c (grub_udf_read_block): handle the fact that ad->length
948f48e7 3260 is in bytes and not in blocks
7d83bd47 3261
8ada9bc1 32622009-06-11 Pavel Roskin <proski@gnu.org>
3263
3264 * kern/i386/halt.c (grub_halt): Make `i' unsigned to fix a
3265 warning.
3266
25ad2323 32672009-06-11 Felix Zielcke <fzielcke@z-51.de>
3268
3269 * util/grub.d/30_os-prober.in: Fix a comment. Source
3270 ${libdir}/grub/grub-mkconfig_lib. Use prepare_grub_to_access_device
3271 to set the root device. Place drivemap command in the generated
3272 chain entry.
3273
e65acb0c 32742009-06-11 Pavel Roskin <proski@gnu.org>
3275
3276 * configure.ac: Remove host_m32. Issues with 64-bit utilities
3277 have long been resolved.
3278
f285fe2d 32792009-06-11 Colin Watson <cjwatson@ubuntu.com>
3280
bd47b0b5 3281 * util/grub.d/10_linux.in: Capitalise "Linux".
3282
f285fe2d 3283 * util/grub-pe2elf.c (usage): Fix references to grub-editenv.
3284
a0c62e4e 32852009-06-11 Pavel Roskin <proski@gnu.org>
3286
b6783cb2 3287 * kern/efi/efi.c (grub_exit): Add infinite loop at the end to
3288 fix a gcc warning and ensure that the function won't ever exit.
3289
dde032e8 3290 * kern/i386/ieee1275/init.c: Add missing prototype for
3291 grub_stop_floppy().
3292
22cd079d 3293 * loader/ieee1275/multiboot2.c [__i386__]: Include
3294 grub/cpu/multiboot.h.
3295
a0c62e4e 3296 * term/i386/pc/serial.c (serial_translate_key_sequence): Avoid
3297 casts to short - they are not portable and cause warnings. Fix
3298 use of uninitialized values in input_buf. Use ARRAY_SIZE.
3299
63963d17 33002009-06-11 Vladimir Serbinenko <phcoder@gmail.com>
3301
3302 Drivemap fixes
3303
3304 * commands/i386/pc/drivemap.c (grub_get_root_biosnumber_drivemap):
3305 new function
3306 (grub_get_root_biosnumber_saved): new variable
3307 (GRUB_MOD_INIT): register grub_get_root_biosnumber_drivemap
3308 (GRUB_MOD_FINI): unregister grub_get_root_biosnumber_drivemap
775dbc4d 3309 * commands/i386/pc/drivemap_int13h.S (grub_drivemap_handler): restore
63963d17 3310 %dx after the call if necessary
3311 * conf/common.rmk (pkglib_MODULES): remove boot.mod
3312 (boot_mod_SOURCES): remove
3313 (boot_mod_CFLAGS): remove
3314 (boot_mod_LDFLAGS): remove
3315 * conf/i386-coreboot.rmk (pkglib_MODULES): add boot.mod
3316 (boot_mod_SOURCES): new variable
3317 (boot_mod_CFLAGS): likewise
3318 (boot_mod_LDFLAGS): likewise
3319 * conf/i386-efi.rmk: likewise
3320 * conf/i386-ieee1275.rmk: likewise
3321 * conf/i386-pc.rmk: likewise
3322 * conf/powerpc-ieee1275.rmk: likewise
3323 * conf/sparc64-ieee1275.rmk: likewise
3324 * conf/x86_64-efi.rmk: likewise
3325 * include/grub/i386/pc/biosnum.h: new file
3326 * lib/i386/pc/biosnum.c: likewise
3327 * loader/i386/bsd.c (grub_bsd_get_device): use grub_get_root_biosnumber
3328 * loader/i386/multiboot.c (grub_multiboot_get_bootdev): likewise
3329 * loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise
775dbc4d 3330
33abf7ae 33312009-06-10 Pavel Roskin <proski@gnu.org>
3332
5ac35b35 3333 * io/gzio.c (test_header): Don't reuse one buffer for all data.
3334 Use separate variables. Read only the file size at the end, but
3335 not the checksum that we don't use.
3336
5c5215d5 3337 * kern/file.c (grub_file_read): Use void pointer for the buffer.
3338 Adjust all callers.
3339
27d5fef7 3340 * kern/ieee1275/openfw.c: Remove libc includes.
3341 * kern/ieee1275/cmain.c: Likewise.
3342 * include/grub/ieee1275/ieee1275.h: Likewise.
3343
33abf7ae 3344 * kern/i386/coreboot/init.c: Include grub/cpu/tsc.h to fix
3345 compiler warnings.
3346
19d50c2b 33472009-06-10 Felix Zielcke <fzielcke@z-51.de>
3348
3349 * Makefile.in: Remove all trailing whitespace.
3350 * conf/i386-pc.rmk: Likewise.
3351 * conf/powerpc-ieee1275.rmk: Likewise.
3352 * conf/sparc64-ieee1275.rmk: Likewise.
3353 * docs/grub.texi: Likewise.
3354 * docs/texinfo.tex: Likewise.
3355 * disk/fs_uuid.c: Likewise.
3356 * disk/lvm.c: Likewise.
3357 * disk/scsi.c: Likewise.
3358 * disk/ata.c: Likewise.
3359 * disk/ieee1275/ofdisk.c: Likewise.
3360 * disk/i386/pc/biosdisk.c: Likewise.
3361 * disk/host.c: Likewise.
3362 * disk/raid.c: Likewise.
3363 * disk/efi/efidisk.c: Likewise.
3364 * disk/usbms.c: Likewise.
3365 * disk/memdisk.c: Likewise.
3366 * disk/loopback.c: Likewise.
3367 * kern/powerpc/dl.c: Likewise.
3368 * kern/device.c: Likewise.
3369 * kern/dl.c: Likewise.
3370 * kern/sparc64/dl.c: Likewise.
3371 * kern/ieee1275/ieee1275.c: Likewise.
3372 * kern/term.c: Likewise.
3373 * kern/fs.c: Likewise.
3374 * kern/i386/dl.c: Likewise.
3375 * kern/i386/pc/startup.S: Likewise.
3376 * kern/i386/pc/init.c: Likewise.
3377 * kern/i386/pc/mmap.c: Likewise.
3378 * kern/i386/pc/lzo1x.S: Likewise.
3379 * kern/i386/ieee1275/init.c: Likewise.
3380 * kern/i386/realmode.S: Likewise.
3381 * kern/i386/tsc.c: Likewise.
3382 * kern/partition.c: Likewise.
3383 * kern/corecmd.c: Likewise.
3384 * kern/file.c: Likewise.
3385 * kern/efi/efi.c: Likewise.
3386 * kern/efi/init.c: Likewise.
3387 * kern/efi/mm.c: Likewise.
3388 * kern/main.c: Likewise.
3389 * kern/err.c: Likewise.
3390 * kern/env.c: Likewise.
3391 * kern/disk.c: Likewise.
3392 * kern/generic/millisleep.c: Likewise.
3393 * kern/generic/rtc_get_time_ms.c: Likewise.
3394 * kern/misc.c: Likewise.
3395 * kern/parser.c: Likewise.
3396 * genmk.rb: Likewise.
3397 * configure.ac: Likewise.
3398 * boot/i386/pc/diskboot.S: Likewise.
3399 * boot/i386/pc/pxeboot.S: Likewise.
3400 * boot/i386/pc/boot.S: Likewise.
3401 * boot/i386/pc/lnxboot.S: Likewise.
3402 * boot/i386/pc/cdboot.S: Likewise.
3403 * parttool/pcpart.c: Likewise.
3404 * video/readers/tga.c: Likewise.
3405 * video/video.c: Likewise.
3406 * video/bitmap.c: Likewise.
3407 * lib/envblk.c: Likewise.
3408 * lib/i386/setjmp.S: Likewise.
3409 * fs/xfs.c: Likewise.
3410 * fs/afs.c: Likewise.
3411 * fs/fat.c: Likewise.
3412 * fs/ntfs.c: Likewise.
3413 * fs/udf.c: Likewise.
3414 * fs/affs.c: Likewise.
3415 * fs/iso9660.c: Likewise.
3416 * fs/hfs.c: Likewise.
3417 * fs/fshelp.c: Likewise.
3418 * fs/ext2.c: Likewise.
3419 * fs/jfs.c: Likewise.
3420 * fs/reiserfs.c: Likewise.
3421 * fs/hfsplus.c: Likewise.
3422 * fs/minix.c: Likewise.
3423 * fs/cpio.c: Likewise.
3424 * fs/sfs.c: Likewise.
3425 * fs/ufs.c: Likewise.
3426 * efiemu/prepare.c: Likewise.
3427 * efiemu/loadcore_common.c: Likewise.
3428 * efiemu/runtime/efiemu.sh: Likewise.
3429 * efiemu/runtime/efiemu.S: Likewise.
3430 * efiemu/runtime/efiemu.c: Likewise.
3431 * efiemu/pnvram.c: Likewise.
3432 * efiemu/main.c: Likewise.
3433 * efiemu/i386/pc/cfgtables.c: Likewise.
3434 * efiemu/i386/loadcore64.c: Likewise.
3435 * efiemu/i386/loadcore32.c: Likewise.
3436 * efiemu/loadcore.c: Likewise.
3437 * efiemu/symbols.c: Likewise.
3438 * efiemu/mm.c: Likewise.
3439 * include/grub/autoefi.h: Likewise.
3440 * include/grub/datetime.h: Likewise.
3441 * include/grub/term.h: Likewise.
3442 * include/grub/hfs.h: Likewise.
3443 * include/grub/lvm.h: Likewise.
3444 * include/grub/i386/tsc.h: Likewise.
3445 * include/grub/i386/linux.h: Likewise.
3446 * include/grub/i386/xnu.h: Likewise.
3447 * include/grub/i386/efiemu.h: Likewise.
3448 * include/grub/i386/pc/biosdisk.h: Likewise.
3449 * include/grub/i386/pc/memory.h: Likewise.
3450 * include/grub/i386/pc/vbe.h: Likewise.
3451 * include/grub/parttool.h: Likewise.
3452 * include/grub/video.h: Likewise.
3453 * include/grub/memory.h: Likewise.
3454 * include/grub/fs.h: Likewise.
3455 * include/grub/partition.h: Likewise.
3456 * include/grub/xnu.h: Likewise.
3457 * include/grub/efi/api.h: Likewise.
3458 * include/grub/efi/pe32.h: Likewise.
3459 * include/grub/efi/memory.h: Likewise.
3460 * include/grub/multiboot.h: Likewise.
3461 * include/grub/usbdesc.h: Likewise.
3462 * include/grub/multiboot2.h: Likewise.
3463 * include/grub/acpi.h: Likewise.
3464 * include/grub/efiemu/efiemu.h: Likewise.
3465 * include/grub/disk.h: Likewise.
3466 * include/grub/ieee1275/ieee1275.h: Likewise.
3467 * include/grub/net.h: Likewise.
3468 * include/grub/machoload.h: Likewise.
3469 * include/grub/macho.h: Likewise.
3470 * include/multiboot.h: Likewise.
3471 * genmoddep.awk: Likewise.
3472 * normal/main.c: Likewise.
3473 * normal/menu_entry.c: Likewise.
3474 * normal/menu_viewer.c: Likewise.
3475 * normal/completion.c: Likewise.
3476 * normal/cmdline.c: Likewise.
3477 * normal/misc.c: Likewise.
3478 * normal/datetime.c: Likewise.
3479 * bus/usb/usbtrans.c: Likewise.
3480 * bus/usb/ohci.c: Likewise.
3481 * bus/usb/uhci.c: Likewise.
3482 * bus/usb/usb.c: Likewise.
3483 * mmap/efi/mmap.c: Likewise.
3484 * mmap/i386/pc/mmap_helper.S: Likewise.
3485 * mmap/i386/pc/mmap.c: Likewise.
3486 * mmap/i386/mmap.c: Likewise.
3487 * mmap/i386/uppermem.c: Likewise.
3488 * mmap/mmap.c: Likewise.
3489 * commands/acpi.c: Likewise.
3490 * commands/echo.c: Likewise.
3491 * commands/blocklist.c: Likewise.
3492 * commands/loadenv.c: Likewise.
3493 * commands/usbtest.c: Likewise.
3494 * commands/boot.c: Likewise.
3495 * commands/parttool.c: Likewise.
3496 * commands/search.c: Likewise.
3497 * commands/cat.c: Likewise.
3498 * commands/i386/pc/play.c: Likewise.
3499 * commands/i386/pc/drivemap.c: Likewise.
3500 * commands/i386/pc/vbeinfo.c: Likewise.
3501 * commands/i386/pc/acpi.c: Likewise.
3502 * commands/i386/pc/vbetest.c: Likewise.
3503 * commands/ls.c: Likewise.
3504 * commands/cmp.c: Likewise.
3505 * commands/test.c: Likewise.
3506 * commands/efi/acpi.c: Likewise.
3507 * commands/gptsync.c: Likewise.
3508 * commands/help.c: Likewise.
3509 * partmap/amiga.c: Likewise.
3510 * partmap/apple.c: Likewise.
3511 * partmap/acorn.c: Likewise.
3512 * partmap/pc.c: Likewise.
3513 * partmap/sun.c: Likewise.
3514 * partmap/gpt.c: Likewise.
3515 * script/sh/lexer.c: Likewise.
3516 * script/sh/function.c: Likewise.
3517 * font/font.c: Likewise.
3518 * font/font_cmd.c: Likewise.
3519 * loader/powerpc/ieee1275/linux.c: Likewise.
3520 * loader/efi/chainloader.c: Likewise.
3521 * loader/multiboot_loader.c: Likewise.
3522 * loader/macho.c: Likewise.
3523 * loader/i386/multiboot.c: Likewise.
3524 * loader/i386/linux.c: Likewise.
3525 * loader/i386/pc/linux.c: Likewise.
3526 * loader/i386/pc/multiboot2.c: Likewise.
3527 * loader/i386/pc/chainloader.c: Likewise.
3528 * loader/i386/pc/xnu.c: Likewise.
3529 * loader/i386/bsd_trampoline.S: Likewise.
3530 * loader/i386/efi/linux.c: Likewise.
3531 * loader/i386/multiboot_elfxx.c: Likewise.
3532 * loader/i386/bsd_helper.S: Likewise.
3533 * loader/i386/bsd.c: Likewise.
3534 * loader/i386/linux_trampoline.S: Likewise.
3535 * loader/i386/xnu_helper.S: Likewise.
3536 * loader/i386/xnu.c: Likewise.
3537 * loader/i386/bsd_pagetable.c: Likewise.
3538 * loader/i386/multiboot_helper.S: Likewise.
3539 * loader/xnu.c: Likewise.
3540 * loader/xnu_resume.c: Likewise.
3541 * io/gzio.c: Likewise.
3542 * term/efi/console.c: Likewise.
3543 * term/terminfo.c: Likewise.
3544 * term/ieee1275/ofconsole.c: Likewise.
3545 * term/i386/pc/serial.c: Likewise.
3546 * term/i386/pc/vesafb.c: Likewise.
3547 * term/i386/pc/vga.c: Likewise.
3548 * term/usb_keyboard.c: Likewise.
3549 * term/gfxterm.c: Likewise.
3550 * aclocal.m4: Likewise.
3551 * util/lvm.c: Likewise.
3552 * util/grub.d/30_os-prober.in: Likewise.
3553 * util/grub.d/10_hurd.in: Likewise.
3554 * util/console.c: Likewise.
3555 * util/grub-macho2img.c: Likewise.
3556 * util/grub-probe.c: Likewise.
3557 * util/hostfs.c: Likewise.
3558 * util/i386/pc/grub-mkimage.c: Likewise.
3559 * util/i386/pc/grub-setup.c: Likewise.
3560 * util/i386/efi/grub-mkimage.c: Likewise.
3561 * util/grub-mkconfig.in: Likewise.
3562 * util/raid.c: Likewise.
3563 * util/resolve.c: Likewise.
3564 * util/grub-mkdevicemap.c: Likewise.
3565 * util/grub-emu.c: Likewise.
3566 * util/getroot.c: Likewise.
3567 * util/hostdisk.c: Likewise.
3568 * util/usb.c: Likewise.
3569 * util/grub-editenv.c: Likewise.
3570 * util/misc.c: Likewise.
3571
d2d49665 35722009-06-10 Felix Zielcke <fzielcke@z-51.de>
3573
3574 * gendistlist.sh (EXTRA_DISTFILES): Add `genhandlerlist.sh' and
3575 `genparttoollist.sh'.
3576 (DISTDIRS): Add `efiemu', `mmap', `parttool' and `script'.
3577 Add `*.sh' to the list find searches for and change `mdate.sh'
3578 to `mdate-sh'.
3579
fe052e37 35802009-06-10 Pavel Roskin <proski@gnu.org>
3581
2763ac18 3582 * include/grub/multiboot2.h: Provide compatibility defines for
3583 multiboot2.h.
3584 * include/multiboot2.h: Include stdint.h only if needed, using
3585 angle brackets.
3586 * loader/i386/pc/multiboot2.c: Include multiboot2.h after
3587 grub/multiboot2.h.
3588 * loader/ieee1275/multiboot2.c: Likewise.
3589 * loader/multiboot2.c: Likewise.
3590 * loader/multiboot_loader.c: Likewise.
3591
437e6adc 3592 * configure.ac: Use -nostdlib when probing for the target. It
3593 should not be required to have libc for the target.
3594
06a6836c 3595 * configure.ac: Remove checks for __bswapsi2 and __bswapdi2,
3596 they fail without libc headers for the target.
3597 * include/grub/powerpc/libgcc.h: Use weak attribute for all
3598 exports.
3599 * include/grub/sparc64/libgcc.h: Likewise. Don't use
3600 preprocessor conditionals.
3601
fe052e37 3602 * conf/common.rmk: Compile tar.mod from tar.c, not cpio.c. The
3603 build system doesn't need to be aware of the tar.c internals.
3604
afd22553 36052009-06-09 Michel Hermier <michel.hermier@gmail.com>
87b8f28c 3606
afd22553 3607 * fs/i386/pc/pxe.c (grub_pxefs_read): Fix returned values.
8ec4a6d0 3608
6b787c4f 36092009-06-09 Robert Millan <rmh.grub@aybabtu.com>
3610
3611 * util/deviceiter.c (grub_util_iterate_devices): Increase number of
3612 disk limit to 26 for IDE, Virtio, Xen and SCSI.
3613
36142009-06-09 Felix Zielcke <fzielcke@z-51.de>
3615
3616 * util/i386/pc/grub-install.in: Change the error message if UUIDs
473d1e45 3617 aren't available if ata.mod gets used.
6b787c4f 3618
473d1e45 36192009-06-09 Oliver Henshaw <oliver.henshaw@gmail.com>
e23721e8 3620
473d1e45 3621 * bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
e23721e8 3622 initialising controller.
473d1e45 3623 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
e23721e8 3624
255a27d4 36252009-06-08 Felix Zielcke <fzielcke@z-51.de>
3626
3627 * util/i386/pc/grub-install.in: Add a parameter --disk-module
3628 to choose between ata and biosdisk module on i386-pc.
3629
473d1e45 36302009-06-08 Oliver Henshaw <oliver.henshaw@gmail.com>
69da8877 3631
d55842d8 3632 * bus/usb/ohci.c (grub_ohci_pci_iter): Define the Class,
3633 Subclass and Programming Interface fields in terms of the 3 byte
3634 Class Code register.
3635 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
3636
fa5db0b1 3637 * bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
3638 interface is OHCI. Add grub_dprintf for symmetry with
3639 bus/usb/uhci.c.
3640 * bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
3641 interface is UHCI. Add interf variable for programming
3642 interface. Print interface with class/subclass.
3643
c0947beb 3644 * bus/usb/ohci.c: Set interf with correct field.
3645
69da8877 3646 * bus/usb/uhci.c: Remove unneeded doubled lines.
3647 * bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
3648 Remove whitespace inside comment.
3649
9e172e30 36502009-06-08 Robert Millan <rmh.grub@aybabtu.com>
3651
3652 * loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
3653 as fallback an equivalent option without depth.
3654
de65ee2b 36552009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
3656
3657 Not fail if unable to retrieve C/H/S on LBA disks
3658
473d1e45 3659 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully
de65ee2b 3660 if unable to retrieve C/H/S on LBA disks
3661
b57ea2c9 36622009-06-08 Pavel Roskin <proski@gnu.org>
3663
3664 * fs/hfs.c (grub_hfs_find_dir): Use union to avoid a warning
3665 about aliasing.
3666
af361263 36672009-06-08 Felix Zielcke <fzielcke@z-51.de>
3668
3669 * Makefile.in (uninstall): Remove all $lib_DATA files.
3670
4c9ec6b3 36712009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
3672
3673 Bugfix: install on partitionless device
3674
3675 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): check if os_dev
3676 is a whole disk
3677
e76fc924 36782009-06-08 Felix Zielcke <fzielcke@z-51.de>
3679
3680 * Makefile.in (uninstall): Remove all $include_DATA files.
3681
ba5a0d05 36822009-06-08 Felix Zielcke <fzielcke@z-51.de>
3683
3684 * commands/true.c: New file. Implement the true and false commands.
3685 * conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
3686 (true_mod_SOURCES): New variable.
3687 (true_mod_CFLAGS): Likewise.
3688 (true_mod_LDFLAGS): Likewise.
3689
c8048e32 36902009-06-05 Colin D Bennett <colin@gibibit.com>
3691
3692 Optimized font character lookup using binary search instead of linear
3693 search. Fonts now are required to have the character index ordered by
3694 code point.
3695
3696 * font/font.c (load_font_index): Verify that fonts have ordered
3697 character indices.
3698 (find_glyph): Use binary search instead of linear search to find a
3699 character in a font.
3700
408305be 37012009-06-05 Michael Scherer <misc@mandriva.org>
3702
3703 * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
3704 uses case sensitive btree.
3705 (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
3706 only for case insensitive filesystems.
3707
8ee1e0d9 37082009-06-05 Vladimir Serbinenko <phcoder@gmail.com>
3709
3710 * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
3711 * conf/common.rmk (search_mod_CFLAGS): likewise
3712
a9966eb1 37132009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3714
473d1e45 3715 * kern/i386/pc/startup.S [APPLE_CC]: block of nops to
a9966eb1 3716 compensate a compiler bug
3717
9e7100fb 37182009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3719
473d1e45 3720 * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitly define as 8
9e7100fb 3721 instead of '\b'
473d1e45 3722
ede21d71 37232009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3724
3725 Definitions for creating asm symbols with Apple's CC
3726
3727 * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
3728 [APPLE_CC] (VARIABLE): likewise
3729
9dbf7653 37302009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3731
3732 Disable lnxboot.img when compiled
3733 with Apple's CC
3734
3735 * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
3736 pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
3737 * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
3738 [! APPLE_CC] (CODE_LENG): skip
3739 [! APPLE_CC] (setup_sects): likewise
3740 [! APPLE_CC]: skip filling
473d1e45 3741
e93cdc3d 37422009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3743
3744 Address in trampolines based on 32-bit registers when compiled
3745 with Apple's CC
3746
473d1e45 3747 * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
e93cdc3d 3748 for addresses
3749 * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
3750
6c688477 37512009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3752
3753 Avoid aliases when compiling with Apple's CC for PCBIOS machine
3754
3755 * kern/misc.c [APPLE_CC] (memcpy): new function
3756 [APPLE_CC] (memmove): likewise
3757 [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
473d1e45 3758 (memcpy): define alias conditionally on !APPLE_CC
6c688477 3759 (memset): likewise
3760 (abort): likewise
3761 * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
3762 APPLE_CC are defined
3763 * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
3764 (grub_assert_fail): make prototype conditional
3765
e37ffc5c 37662009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3767
3768 Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
3769
473d1e45 3770 * conf/common.rmk (bin_UTILITIES): add (on false on condition)
3771 grub-macho2img
e37ffc5c 3772 (CLEANFILES): add grub-macho2img
3773 (grub_macho2img_SOURCES): new variable
3774 * kern/i386/pc/startup.S (bss_start): new variable
3775 (bss_end): likewise
3776 * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
3777 * util/grub-macho2img.c: new file
3778
cf00df31 37792009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3780
3781 Use objconv when compiling with Apple's CC
3782
3783 * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
3784 (efiemu64.o): likewise
3785 (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
3786 when compiling with Apple's CC
3787 (efiemu64_s.o): likewise
3788 * configure.ac: check for objconv when compiling with Apple's CC
3789 * genmk.rb: use objconv for modules when compiled with Apple's CC
473d1e45 3790
d119a20c 37912009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3792
3793 Define segment as well as section when compiling with
3794 Apple's CC
3795
3796 * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
3797 (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
3798 (efiemu_convert_pointer): likewise
3799 (efiemu_set_virtual_address_map): likewise
3800 (efiemu_convert_pointer): likewise
3801 (efiemu_getcrc32): likewise
3802 (init_crc32_table): likewise
3803 (reflect): likewise
3804 * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
3805 (GRUB_MOD_DEP): likewise
473d1e45 3806
c8600122 38072009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3808
3809 Allow a compilation without -mcmodel=large
3810
3811 * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
3812 when compiled without -mcmodel=large
473d1e45 3813 (filter_memory_map): remove memory post 4 GiB when compiled
c8600122 3814 without -mcmodel=large
473d1e45 3815 * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
c8600122 3816 TARGET_CFLAGS when -mcmodel=large isn't supported
473d1e45 3817
e8df1d4e 38182009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3819
3820 Remove nested functions in efiemu core
3821
3822 * efiemu/runtime/efiemu.c (reflect): make static instead of nested
473d1e45 3823
cc6c3ac1 38242009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3825
3826 Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
3827
3828 * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
3829 temporary storage
473d1e45 3830 * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
3831 using Apple's CC
cc6c3ac1 3832 (grub_cpu_is_tsc_supported): likewise
3833 * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
473d1e45 3834
3e325901 38352009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3836
3837 Absolute addressing through constant with Apple's cc
3838
3839 * kern/i386/pc/startup.S: Define necessary constants
3840 and address through it when using ABS with Apple's CC
3841 * boot/i386/pc/diskboot.S: likewise
3842 * boot/i386/pc/boot.S: likewise
3843 * boot/i386/pc/lnxboot.S: likewise
3844 * boot/i386/pc/cdboot.S: likewise
3845 * mmap/i386/pc/mmap_helper.S: likewise
3846 * commands/i386/pc/drivemap_int13h.S: likewise
3847
2b167a72 38482009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3849
3850 Check if compiler is apple cc
3851
3852 * Makefile.in (ASFLAGS): new variable
3853 (TARGET_ASFLAGS): likewise
3854 (TARGET_MODULE_FORMAT): likewise
3855 (TARGET_APPLE_CC): likewise
3856 (OBJCONV): likewise
3857 (TARGET_IMG_CFLAGS): likewise
3858 (TARGET_CPPFLAGS): add includedir
3859 * configure.ac: call grub_apple_cc and grub_apple_target_cc
3860 (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
3861 Check for linker script only if compiler isn't Apple's CC
3862 (TARGET_MODULE_FORMAT): set
3863 (TARGET_APPLE_CC): likewise
3864 (TARGET_ASFLAGS): likewise
3865 (ASFLAGS): likewise
3866 Check for objcopy only if compiler isn't Apple's CC
3867 Check for BSS symbol only if compiler isn't Apple's CC
3868 * genmk.rb: adapt nm options if we use Apple's utils
3869 * aclocal.m4 (grub_apple_cc): new test
3870 (grub_apple_target_cc): likewise
473d1e45 3871
fb14123e 38722009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3873
3874 Simplify sed expressions and improve awk
3875
3876 * Makefile.in (install-local): simplify sed expression
3877 * gencmdlist.sh: likewise
3878 * genmoddep.awk: avoid adding module as a dependency of itself
3879
5b889789 38802009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3881
3882 Add missing start symbols
3883
3884 * boot/i386/pc/boot.S: add start
fb14123e 3885 * boot/i386/pc/pxeboot.S: likewise
473d1e45 3886
fd2bf2e3 38872009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3888
3889 Fix wrong assumptions with grub-mkimage on EFI
473d1e45 3890
3891 * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefix here
fd2bf2e3 3892 (relocate_addresses): consider both r_addend and value at offset
3893 (make_mods_section): zerofill modinfo and header
3894 (convert_elf): write prefix here
473d1e45 3895
5389763d 38962009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3897
3898 Use .asciz instead of .string
3899
3900 * i386/pc/diskboot.S: use .asciz instead of .string
3901 * i386/pc/boot.S: likewise
3902 * include/grub/dl.h (GRUB_MOD_DEP): likewise
3903 (GRUB_MOD_NAME): likewise
473d1e45 3904
3eb5ed4e 39052009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3906
3907 gfxpayload support
3908
3909 * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
3910 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
3911 (grub_video_setup): remove
3912 (grub_video_set_mode): new prototype
3913 * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
3914 (vid_mode): remove
3915 (linux_vesafb_res): compile only on PCBIOS
3916 (grub_linux_boot): support gfxpayload
3917 * loader/i386/pc/xnu.c (video_hook): new function
3918 (grub_xnu_set_video): support gfxpayload
3919 * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
3920 (DEFAULT_VIDEO_HEIGHT): likewise
3921 (DEFAULT_VIDEO_FLAGS): likewise
3922 (DEFAULT_VIDEO_MODE): new definition
3923 (video_hook): new function
3924 (grub_gfxterm_init): use grub_video_set_mode
473d1e45 3925 * util/grub.d/30_os-prober.in: remove explicit modesetting before
3eb5ed4e 3926 loading xnu
3927 * video/video.c (grub_video_setup): removed
473d1e45 3928 (grub_video_set_mode): new function based on grub_gfxterm_init and
3eb5ed4e 3929 grub_video_setup
3930
4b0e1143 39312009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3932
3933 Avoid calling biosdisk in drivemap
3934
3935 * commands/i386/pc/drivemap.c (parse_biosdisk): remove
3936 (revparse_biosdisk): likewise
3937 (list_mappings): derive name from id directly
3938 (grub_cmd_drivemap): use tryparse_diskstring
473d1e45 3939
fda6cb98 39402009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3941
3942 Script fixes
3943
3944 * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
3945 (grub_lexer_param): add tokenonhold
3946 (grub_script_create_cmdline): remove cmdline. All callers updated
3947 (grub_script_function_create): make functionname
3948 grub_script_arg. All callers updated
3949 (grub_script_execute_argument_to_string): new prototype
3950 * kern/parser.c (state_transitions): reorder
3951 (grub_parser_cmdline_state): fix a bug and make more compact
473d1e45 3952 * script/sh/execute.c (grub_script_execute_argument_to_string):
fda6cb98 3953 make global
3954 (grub_script_execute_cmdline): use new format
3955 * script/sh/function.c (grub_script_function_create): make functionname
3956 grub_script_arg. All callers updated
473d1e45 3957 * script/sh/lexer.c (grub_script_lexer_init): initialize tokenonhold
fda6cb98 3958 (grub_script_yylex): remove
3959 (grub_script_yylex2): renamed to ...
3960 (grub_script_yylex): ...renamed
3961 parse the expressions like a${b}c
3962 * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
3963 (GRUB_PARSER_TOKEN_VAR): remove
3964 (GRUB_PARSER_TOKEN_NAME): likewise
3965 ("if"): declare as typeless
3966 ("while"): likewise
3967 ("function"): likewise
3968 ("else"): likewise
3969 ("then"): likewise
3970 ("fi"): likewise
3971 (text): remove
3972 (argument): likewise
3973 (script): accept empty scripts and make exit on error
3974 (arguments): use GRUB_PARSER_TOKEN_ARG
3975 (function): likewise
3976 (command): move error handling to script
3977 (menuentry): move grub_script_lexer_ref before
473d1e45 3978 * script/sh/script.c (grub_script_create_cmdline): remove cmdline
fda6cb98 3979 argument. All callers updated
3980
f4448a07 39812009-06-04 Robert Millan <rmh.grub@aybabtu.com>
3982
3983 Prevent GRUB from probing floppies during boot.
3984
3985 * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
3986 * commands/search.c (options): Add --no-floppy.
3987 (search_fs, search_file, grub_cmd_search): Support --no-floppy.
3988 * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
3989 --no-floppy when searching for UUIDs.
3990
2bf5885a 39912009-06-04 Robert Millan <rmh.grub@aybabtu.com>
3992
3993 Simplify the code duplication in commands/search.c.
3994
3995 * commands/search.c (search_label, search_fs_uuid): Merge into ...
3996 (search_fs): ... this. Update all users.
3997
f6fd460a 39982009-06-03 Felix Zielcke <fzielcke@z-51.de>
3999
4000 * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
4001
cbb3c83e 40022009-05-28 Pavel Roskin <proski@gnu.org>
4003
57788cfd 4004 * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
4005 Remove the original symlink explicitly.
4006
cbb3c83e 4007 * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
4008 just one slash. That's how grub_fshelp_find_file() does it.
4009
cd0d5e30 40102009-05-26 Pavel Roskin <proski@gnu.org>
4011
f0f8bbe2 4012 * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
4013 to `str'.
4014
cd0d5e30 4015 * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
4016 possibly unused.
4017
8c2cab51 40182009-05-25 Christian Franke <franke@computer.org>
4019
4020 * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
4021 register.
4022 (grub_atapi_identify): Add wait after drive select.
4023 (grub_ata_identify): Do more strict status register check before
4024 calling grub_atapi_identify (). Suppress error message if status
4025 register is 0x00 after command failure. Add status register
4026 check after PIO read to avoid bogus identify due to stuck DRQ.
4027 Thanks to Pavel Roskin for testing.
4028 (grub_device_initialize): Remove unsafe status register check.
4029 Thanks to 'phcoder' for problem report and patch.
4030 Prevent sign extension in debug message.
4031
230c0ad6 40322009-05-23 Colin D Bennett <colin@gibibit.com>
4033
4034 Cleaned up `include/grub/normal.h'. Grouped prototypes by
4035 definition file, and functions defined in `normal/menu.c' have had
4036 their prototypes moved to `include/grub/menu.h' for consistency.
4037
4038 * include/grub/menu.h (grub_menu_execute_callback): Added; moved
4039 from normal.h.
4040 (grub_menu_get_entry): Likewise.
4041 (grub_menu_get_timeout): Likewise.
4042 (grub_menu_set_timeout): Likewise.
4043 (grub_menu_execute_entry): Likewise.
4044 (grub_menu_execute_with_fallback): Likewise.
4045 (grub_menu_entry_run): Likewise.
4046
4047 * include/grub/normal.h: Re-ordered and grouped function
4048 prototypes by file that the function is defined in.
4049 (grub_menu_execute_callback): Removed; moved to menu.h.
4050 (grub_menu_get_entry): Likewise.
4051 (grub_menu_get_timeout): Likewise.
4052 (grub_menu_set_timeout): Likewise.
4053 (grub_menu_execute_entry): Likewise.
4054 (grub_menu_execute_with_fallback): Likewise.
4055 (grub_menu_entry_run): Likewise.
4056 (grub_menu_addentry): Renamed from this ...
4057 (grub_normal_add_menu_entry): ... to this.
4058
4059 * normal/main.c (grub_menu_addentry): Renamed from this ...
4060 (grub_normal_add_menu_entry): ... to this.
4061
4062 * script/sh/execute.c (grub_script_execute_menuentry): Update
4063 reference to renamed grub_menu_addentry function.
4064
861f03a5 40652009-05-23 Felix Zielcke <fzielcke@z-51.de>
4066
4067 * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
4068
96b1619a 40692009-05-22 Pavel Roskin <proski@gnu.org>
4070
bf6a5fb2 4071 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
4072 * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG. Define
4073 NESTED_FUNC_ATTR using AH_BOTTOM. Use regparm(1) only when
4074 compiling for the i386 targets, but not for the utilities.
4075
96b1619a 4076 * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
4077 to grub_uint8_t.
4078 (grub_root_drive): Likewise.
4079 * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
4080 remove alignment.
4081 (grub_root_drive): Change size to byte.
4082 (grub_start_addr): Remove.
4083 (grub_end_addr): Likewise.
4084 (grub_apm_bios_info): Likewise.
4085
b729776b 40862009-05-21 Felix Zielcke <fzielcke@z-51.de>
4087
4088 * normal/i386: Remove.
4089 * normal/powerpc: Likewise.
4090 * normal/sparc64: Likewise.
4091 * normal/x86_64: Likewise.
4092
0a15ce80 40932009-05-19 Vladimir Serbinenko <phcoder@gmail.com>
4094
4095 * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
473d1e45 4096 * loader/i386/linux_trampoline.S: Fix indentation
0a15ce80 4097 * loader/i386/xnu_helper.S: Likewise
d6da58e6 4098
33db9015 40992009-05-18 Colin D Bennett <colin@gibibit.com>
4100
d6da58e6 4101 Display error messages when parsing a Lua statement fails.
4102 Previously, executing a syntactically invalid statement like
4103 ")foo" or "bar;" would silently fail.
33db9015 4104
4105 * script/lua/grub_main.c (handle_lua_error): New function.
d6da58e6 4106 (grub_lua_parse_line): Improved reporting of Lua parser and
4107 execution errors.
33db9015 4108
46422c89 41092009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
4110
4111 Remove -Werror which causes build to fail on some systems
4112
4113 * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
4114 * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
4115 * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
18f547ad 4116
22f53a96 41172009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
4118
4119 trampoline for linux on 64-bit platform
4120
18f547ad 4121 * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
4122 loader/i386/efi/linux_trampoline.S
4123 * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
473d1e45 4124 declaration
d6da58e6 4125 * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
4126 here
22f53a96 4127 * loader/i386/linux_trampoline.S: moved here
d6da58e6 4128 * loader/i386/efi/linux.c (allocate_pages): reserve space for
4129 trampoline
22f53a96 4130 (jumpvector): removed
4131 (grub_linux_trampoline_start): new declaration
4132 (grub_linux_trampoline_end): likewise
4133 (grub_linux_boot): use trampoline when on 64-bit platform
4134 * loader/i386/linux.c: likewise
4135
cb5a0f40 41362009-05-16 Pavel Roskin <proski@gnu.org>
4137
4138 * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
4139 const to avoid a warning.
4140 (grub_lua_setenv): Likewise.
4141 * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
4142 lmsg to fix a warning.
4143
334f2c28 41442009-05-16 Felix Zielcke <fzielcke@z-51.de>
4145
4146 * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
7dd10fce 4147 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
4148 * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
4149 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
4150 * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
4151 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
4152 * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
4153 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
334f2c28 4154
59e5d3ec 41552009-05-16 Felix Zielcke <fzielcke@z-51.de>
4156
4157 * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
4158
9d87a1ba 41592009-05-16 Bean <bean123ch@gmail.com>
4160
4161 * conf/common.rmk (pkglib_MODULES): Add lua.mod.
4162 (lua_mod_SOURCES): New variable.
4163 (lua_mod_CFLAGS): Likewise.
4164 (lua_mod_LDFLAGS): Likewise.
4165
4166 * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
4167 (setjmp_mod_SOURCES): New variable.
4168 (setjmp_mod_CFLAGS): Likewise.
4169 (setjmp_LDFLAGS): Likewise.
4170
4171 * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
4172 (setjmp_mod_SOURCES): New variable.
4173 (setjmp_mod_CFLAGS): Likewise.
4174 (setjmp_LDFLAGS): Likewise.
4175
4176 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
4177 (setjmp_mod_SOURCES): New variable.
4178 (setjmp_mod_CFLAGS): Likewise.
4179 (setjmp_LDFLAGS): Likewise.
4180
4181 * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
4182 (setjmp_mod_SOURCES): New variable.
4183 (setjmp_mod_CFLAGS): Likewise.
4184 (setjmp_LDFLAGS): Likewise.
4185
4186 * normal/i386/setjmp.S: Moved from here ...
4187 * lib/i386/setjmp.S: ... Moved here
4188 * normal/x86_64/setjmp.S: Moved from here ...
4189 * lib/x86_64/setjmp.S: ... Moved here
4190 * normal/powerpc/setjmp.S: Moved from here ...
4191 * lib/powerpc/setjmp.S: ... Moved here
4192 * normal/sparc64/setjmp.S: Moved from here ...
4193 * lib/sparc64/setjmp.S: ... Moved here
4194
4195 * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
4196 returns_twice in mingw.
4197
4198 * script/lua/grub_lib.c: New file.
4199 * script/lua/grub_lib.h: Likewise.
4200 * script/lua/grub_lua.h: Likewise.
4201 * script/lua/grub_main.c: Likewise.
4202 * script/lua/lapi.c: Likewise.
4203 * script/lua/lapi.h: Likewise.
4204 * script/lua/lauxlib.c: Likewise.
4205 * script/lua/lauxlib.h: Likewise.
4206 * script/lua/lbaselib.c: Likewise.
4207 * script/lua/lcode.c: Likewise.
4208 * script/lua/lcode.h: Likewise.
4209 * script/lua/ldblib.c: Likewise.
4210 * script/lua/ldebug.c: Likewise.
4211 * script/lua/ldebug.h: Likewise.
4212 * script/lua/ldo.c: Likewise.
4213 * script/lua/ldo.h: Likewise.
4214 * script/lua/ldump.c: Likewise.
4215 * script/lua/lfunc.c: Likewise.
4216 * script/lua/lfunc.h: Likewise.
4217 * script/lua/lgc.c: Likewise.
4218 * script/lua/lgc.h: Likewise.
4219 * script/lua/linit.c: Likewise.
4220 * script/lua/liolib.c: Likewise.
4221 * script/lua/llex.c: Likewise.
4222 * script/lua/llex.h: Likewise.
4223 * script/lua/llimits.h: Likewise.
4224 * script/lua/lmathlib.c: Likewise.
4225 * script/lua/lmem.c: Likewise.
4226 * script/lua/lmem.h: Likewise.
4227 * script/lua/loadlib.c: Likewise.
4228 * script/lua/lobject.c: Likewise.
4229 * script/lua/lobject.h: Likewise.
4230 * script/lua/lopcodes.c: Likewise.
4231 * script/lua/lopcodes.h: Likewise.
4232 * script/lua/loslib.c: Likewise.
4233 * script/lua/lparser.c: Likewise.
4234 * script/lua/lparser.h: Likewise.
4235 * script/lua/lstate.c: Likewise.
4236 * script/lua/lstate.h: Likewise.
4237 * script/lua/lstring.c: Likewise.
4238 * script/lua/lstring.h: Likewise.
4239 * script/lua/lstrlib.c: Likewise.
4240 * script/lua/ltable.c: Likewise.
4241 * script/lua/ltable.h: Likewise.
4242 * script/lua/ltablib.c: Likewise.
4243 * script/lua/ltm.c: Likewise.
4244 * script/lua/ltm.h: Likewise.
4245 * script/lua/lua.h: Likewise.
4246 * script/lua/luaconf.h: Likewise.
4247 * script/lua/lualib.h: Likewise.
4248 * script/lua/lundump.c: Likewise.
4249 * script/lua/lundump.h: Likewise.
4250 * script/lua/lvm.c: Likewise.
4251 * script/lua/lvm.h: Likewise.
4252 * script/lua/lzio.c: Likewise.
4253 * script/lua/lzio.h: Likewise.
4254
5e898c9d 42552009-05-16 Bean <bean123ch@gmail.com>
4256
4257 * include/grub/kernel.h (grub_module_header_types): Add type
4258 OBJ_TYPE_CONFIG.
4259
4260 * kern/main.c (grub_load_config): New function.
4261 (grub_main): Call grub_load_config to read boot config.
4262
4263 * grub-mkimage (generate_image): New parameter config_path.
4264 (options): New option --config.
4265 (main): Parse --config option, and pass it to generate_image.
4266
cf353a47 42672009-05-14 Christian Franke <franke@computer.org>
4268
4269 * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
4270 This fixes build on Cygwin.
4271
3834887f 42722009-05-14 Pavel Roskin <proski@gnu.org>
4273
4274 * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
4275 jump. This saves two bytes, so the typical case of 2 swapped
4276 drives would fit 32 bytes.
4277
8090fc01 42782009-05-13 Pavel Roskin <proski@gnu.org>
4279
ac963883 4280 * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
4281 grub_uint32_t to avoid a warning.
4282
8090fc01 4283 * loader/i386/linux.c (allocate_pages): When assigning
4284 real_mode_mem, cast through grub_size_t to fix a warning. The
4285 code already makes sure that the value would fit a pointer.
4286 (grub_linux_setup_video): Cast render_target->data to
4287 grub_size_t to fix a warning.
4288
18f547ad 42892009-05-13 Javier Martín <lordhabbit@gmail.com>
4246b8a9 4290
4291 * commands/i386/pc/drivemap.c: New file - implement drivemap
4292 command.
4293 * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
4294 * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
4295
6f6a8b28 42962009-05-13 Pavel Roskin <proski@gnu.org>
4297
4298 * util/i386/pc/grub-setup.c (setup): Remove unused variable
4299 embedding_area_exists.
4300
15fbf4c4 43012009-05-13 Robert Millan <rmh.grub@aybabtu.com>
4302
4303 * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
4304 it easier to understand / work with.
59978c8a 4305 Improve warning messages for cases where there's no embedding area,
4306 or when it is too small (or core.img too large).
15fbf4c4 4307
238e871f 43082009-05-13 Pavel Roskin <proski@gnu.org>
4309
0ab3a9a4 4310 * loader/i386/pc/multiboot2.c: Add necessary includes for
4311 grub_multiboot2_real_boot().
4312
a2c8c5f8 4313 * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
4314 PX record is always little-endian. We only need the lower 2
4315 bytes of the mode.
4316
faec96af 4317 * fs/cpio.c: Use the same name "struct head" for tar and cpio to
4318 facilitate code reuse.
4319 (grub_cpio_mount): Use "struct head", not a char buffer. This
4320 fixes a warning reported by gcc 4.4.
4321
238e871f 4322 * kernel/disk.c (grub_disk_read): Use void pointer for the
4323 buffer.
4324 (grub_disk_write): Use const void pointer for the buffer.
4325 Adjust all callers. Remove unnecessary casts.
4326
901d2f0c 43272009-05-10 Robert Millan <rmh.grub@aybabtu.com>
4328
4329 * util/i386/pc/grub-install.in: Update copyright year.
4330
18f547ad 43312009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
2eac4c16 4332
4333 gptsync
4334
4335 * commands/gptsync.c: new file
4336 * conf/common.rmk (pkglib_MODULES): add gptsync.mod
4337 (gptsync_mod_SOURCES): new variable
4338 (gptsync_mod_CFLAGS): likewise
4339 (gptsync_mod_LDFLAGS): likewise
18f547ad 4340 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
2eac4c16 4341 new definition
4342 (GRUB_PC_PARTITION_TYPE_HFS): likewise
4343 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
4344 * conf/i386-ieee1275.rmk: likewise
4345 * conf/i386-pc.rmk: likewise
4346 * conf/powerpc-ieee1275.rmk: likewise
4347
b4ba690a 43482009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
4349
4350 Fixed grub-emu
4351
4352 * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
4353 (grub_dl_ref): likewise
4354
317e1a44 43552009-05-08 Robert Millan <rmh.grub@aybabtu.com>
4356
4357 * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
4358 split in two functions (one for msdos and one for gpt).
4359
041b8094 43602009-05-08 Pavel Roskin <proski@gnu.org>
4361
752473c2 4362 * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
4363 not modified.
4364
041b8094 4365 * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
4366 uninitialized err[0] and err[1]. Rename them to bad1 and bad2.
4367 Initialize them with -1. Add sanity check for bad1. Eliminate
4368 nerr variable.
4369
172800ce 43702009-05-08 David S. Miller <davem@davemloft.net>
4371
4372 * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
4373
29aa5e81 43742009-05-06 Robert Millan <rmh.grub@aybabtu.com>
4375
4376 * util/i386/pc/grub-setup.c (setup): Fix check for embed region
473d1e45 4377 existence.
29aa5e81 4378
96613b62 43792009-05-05 Felix Zielcke <fzielcke@z-51.de>
4380
4381 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
1905c57b 4382 `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
96613b62 4383
eef73c8a 43842009-05-05 David S. Miller <davem@davemloft.net>
4385
4386 * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
4387
119494b5 43882009-05-05 Pavel Roskin <proski@gnu.org>
4389
4390 * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
4391 of grub_dl_ref() and grub_dl_unref().
4392 * commands/parttool.c: Remove preprocessor conditionals around
4393 grub_dl_ref() and grub_dl_unref().
4394 * fs/affs.c: Likewise.
4395 * fs/afs.c: Likewise.
4396 * fs/cpio.c: Likewise.
4397 * fs/ext2.c: Likewise.
4398 * fs/fat.c: Likewise.
4399 * fs/hfs.c: Likewise.
4400 * fs/hfsplus.c: Likewise.
4401 * fs/iso9660.c: Likewise.
4402 * fs/jfs.c: Likewise.
4403 * fs/minix.c: Likewise.
4404 * fs/ntfs.c: Likewise.
4405 * fs/reiserfs.c: Likewise.
4406 * fs/sfs.c: Likewise.
4407 * fs/udf.c: Likewise.
4408 * fs/ufs.c: Likewise.
4409 * fs/xfs.c: Likewise.
4410 * include/grub/dl.h: Likewise.
4411 * loader/xnu.c: Likewise.
4412
de5fd76e 44132009-05-04 Pavel Roskin <proski@gnu.org>
4414
4415 * commands/acpi.c: Remove unused variable my_mod.
4416 * partmap/amiga.c: Likewise.
4417 * partmap/apple.c: Likewise.
4418 * partmap/gpt.c: Likewise.
4419 * partmap/pc.c: Likewise.
4420 * partmap/sun.c: Likewise.
4421 * term/gfxterm.c: Likewise.
4422 * term/i386/pc/vesafb.c: Likewise.
4423 * term/i386/pc/vga.c: Likewise.
4424
983598ad 44252009-05-04 David S. Miller <davem@davemloft.net>
4426
4427 * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
4428 pointer args to grub_ieee1275_get_property().
4429
8aadec43 4430 * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
4431
9554b15e 4432 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
4433 devices, and do not traverse down under controller nodes.
4434
67e23c90 4435 * disk/ieee1275/ofdisk.c (compute_dev_path): New.
4436 (grub_ofdisk_open): Use it to un-escape "," characters.
4437 * kern/disk.c (find_part_sep): New.
4438 (grub_disk_open): Use it to find the first non-escaped ','
4439 character in the disk name.
4440 * util/ieee1275/devicemap.c (escape_of_path): New.
4441 (grub_util_emit_devicemap_entry): Use it.
4442 * util/sparc64/ieee1275/grub-install.in: Update script to
4443 strip partition specifiers properly by not triggering on
4444 '\' escaped ',' characters.
4445
74bfdd2f 44462009-05-04 Robert Millan <rmh.grub@aybabtu.com>
4447
4448 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
4449 to 0x300.
4450 * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
4451 resolutions.
4452 (linux_vesafb_modes): Add a lot of additional modes to the list (based
4453 on documentation from Wikipedia).
4454
4241d2b1 44552009-05-04 Pavel Roskin <proski@gnu.org>
4456
4457 * disk/ata.c: Spelling fixes.
4458 * disk/raid.c: Likewise.
4459 * disk/usbms.c: Likewise.
4460 * disk/dmraid_nvidia.c: Likewise.
4461 * kern/ieee1275/openfw.c: Likewise.
4462 * kern/ieee1275/init.c: Likewise.
4463 * kern/ieee1275/cmain.c: Likewise.
4464 * boot/i386/pc/cdboot.S: Likewise.
4465 * video/readers/png.c: Likewise.
4466 * video/i386/pc/vbe.c: Likewise.
4467 * fs/udf.c: Likewise.
4468 * fs/hfs.c: Likewise.
4469 * fs/reiserfs.c: Likewise.
4470 * efiemu/runtime/efiemu.c: Likewise.
4471 * efiemu/main.c: Likewise.
4472 * efiemu/mm.c: Likewise.
4473 * include/grub/elf.h: Likewise.
4474 * include/grub/xnu.h: Likewise.
4475 * include/grub/usbdesc.h: Likewise.
4476 * include/grub/usb.h: Likewise.
4477 * include/grub/script_sh.h: Likewise.
4478 * include/grub/lib/LzmaEnc.h: Likewise.
4479 * include/grub/efiemu/efiemu.h: Likewise.
4480 * include/grub/command.h: Likewise.
4481 * normal/menu.c: Likewise.
4482 * normal/main.c: Likewise.
4483 * normal/datetime.c: Likewise.
4484 * bus/usb/uhci.c: Likewise.
4485 * mmap/i386/uppermem.c: Likewise.
4486 * mmap/mmap.c: Likewise.
4487 * commands/acpi.c: Likewise.
4488 * commands/test.c: Likewise.
4489 * partmap/apple.c: Likewise.
4490 * font/font.c: Likewise.
4491 * loader/sparc64/ieee1275/linux.c: Likewise.
4492 * loader/macho.c: Likewise.
4493 * loader/i386/bsd_trampoline.S: Likewise.
4494 * loader/i386/bsd.c: Likewise.
4495 * loader/xnu.c: Likewise.
4496 * term/i386/pc/vesafb.c: Likewise.
4497 * term/usb_keyboard.c: Likewise.
4498 * util/resolve.c: Likewise.
4499 * util/getroot.c: Likewise.
4500
0cfc0083 45012009-05-04 Felix Zielcke <fzielcke@z-51.de>
4502
4503 * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
4504
7c1d00cd 45052009-05-04 Robert Millan <rmh.grub@aybabtu.com>
4506
4507 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
4508 build error.
4509
b01f0548 45102009-05-04 Robert Millan <rmh.grub@aybabtu.com>
4511
4512 * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
4513 parameter only available on BIOS.
4514
ecc3eb22 45152009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
4516
4517 Removed wrong semicolon in declaration
4518
4519 * grub/misc.h (grub_dprintf): remove semicolon
4520
112972a9 45212009-05-04 Robert Millan <rmh.grub@aybabtu.com>
4522
4523 * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
4524 (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
4525 is done by grub_cmd_linux() now).
4526 [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
4527 restore video to text mode.
4528 (grub_cmd_linux): Default `vid_mode' initialization to 0, which
4529 indicates lack of "vga=" parameter. "vga=0" is mapped to
4530 `GRUB_LINUX_VID_MODE_NORMAL'.
4531
afd5c115 45322009-05-04 Felix Zielcke <fzielcke@z-51.de>
4533
4534 * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
4535 `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
4536 and `normal/script.c'. Add `kern/rescue_reader.c',
18f547ad 4537 `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
afd5c115 4538 `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
4539 `grub_script.tab.c'.
4540
4541 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4542 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4543 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4544 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
4545 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4546
faa517ce 4547 * Makefile.in: Remove duplicated 2008 in Copyright line.
4548
ae0c0bdc 45492009-05-04 Robert Millan <rmh.grub@aybabtu.com>
4550
473d1e45 4551 * util/misc.c (grub_util_warn): New function. Emits a warning
ae0c0bdc 4552 unconditionally.
4553 * include/grub/util/misc.h (grub_util_warn): New declaration.
4554
4555 * util/i386/pc/grub-install.in: Understand --force and pass it down
4556 to grub-setup.
4557
4558 * util/i386/pc/grub-setup.c (main): Understand --force and pass it
4559 down to setup().
4560 (setup): Improve error messages and add warnings when requested to
4561 install in odd layouts. Refuse to install using blocklists unless
4562 --force was set.
4563
18f547ad 45642009-05-04 martin f. krafft <madduck@madduck.net>
c149b500 4565
4566 * disk/raid.c (grub_raid_scan_device): Improve debug message.
4567
6d260daa 45682009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
4569
4570 Updated copyright year
4571
4572 * fs/hfsplus.c: updated copyright year
18f547ad 4573
69f853f8 45742009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
4575
4576 HFS+ UUID
4577
18f547ad 4578 * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
69f853f8 4579 in the space previously used by unused3
4580 (grub_hfsplus_uuid): new function
4581 (grub_hfsplus_fs): added uuid field
4582
4c402e73 45832009-05-03 Pavel Roskin <proski@gnu.org>
4584
4585 * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
4586 suppress warnings. It's no longer needed.
4587 * disk/host.c: Likewise.
4588 * disk/ata_pthru.c: Likewise.
4589 * disk/loopback.c: Likewise.
4590 * hook/datehook.c: Likewise.
4591 * parttool/pcpart.c: Likewise.
4592 * fs/i386/pc/pxe.c: Likewise.
4593 * fs/ntfscomp.c: Likewise.
4594 * efiemu/main.c: Likewise.
4595 * mmap/mmap.c: Likewise.
4596 * commands/crc.c: Likewise.
4597 * commands/hexdump.c: Likewise.
4598 * commands/hdparm.c: Likewise.
4599 * commands/acpi.c: Likewise.
4600 * commands/echo.c: Likewise.
4601 * commands/minicmd.c: Likewise.
4602 * commands/blocklist.c: Likewise.
4603 * commands/memrw.c: Likewise.
4604 * commands/loadenv.c: Likewise.
4605 * commands/usbtest.c: Likewise.
4606 * commands/lsmmap.c: Likewise.
4607 * commands/boot.c: Likewise.
4608 * commands/parttool.c: Likewise.
4609 * commands/configfile.c: Likewise.
4610 * commands/search.c: Likewise.
4611 * commands/ieee1275/suspend.c: Likewise.
4612 * commands/cat.c: Likewise.
4613 * commands/i386/pc/pxecmd.c: Likewise.
4614 * commands/i386/pc/play.c: Likewise.
4615 * commands/i386/pc/halt.c: Likewise.
4616 * commands/i386/pc/vbeinfo.c: Likewise.
4617 * commands/i386/pc/vbetest.c: Likewise.
4618 * commands/lspci.c: Likewise.
4619 * commands/date.c: Likewise.
4620 * commands/handler.c: Likewise.
4621 * commands/ls.c: Likewise.
4622 * commands/test.c: Likewise.
4623 * commands/cmp.c: Likewise.
4624 * commands/efi/loadbios.c: Likewise.
4625 * commands/efi/fixvideo.c: Likewise.
4626 * commands/halt.c: Likewise.
4627 * commands/help.c: Likewise.
4628 * commands/reboot.c: Likewise.
4629 * hello/hello.c: Likewise.
4630 * script/sh/main.c: Likewise.
4631 * loader/xnu.c: Likewise.
4632 * term/terminfo.c: Likewise.
4633 * term/i386/pc/serial.c: Likewise.
4634 * term/usb_keyboard.c: Likewise.
4635
515b5079 46362009-05-03 David S. Miller <davem@davemloft.net>
4637
4638 * normal/menu.c: Include grub/parser.h
4639
dfc31a22 46402009-05-03 Pavel Roskin <proski@gnu.org>
4641
2fee74f1 4642 * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
4643 not char*.
4644 * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
4645 Suggested by Javier Martín <lordhabbit@gmail.com>
4646
dfc31a22 4647 * util/i386/pc/grub-mkrescue.in: Allow for the case when
4648 efiemu??.o doesn't exist.
4649 * util/i386/pc/grub-install.in: Likewise. Use "cp -f" for
4650 copying.
4651
18f547ad 46522009-05-03 Bean <bean123ch@gmail.com> Vladimir Serbinenko <phcoder@gmail.com>
cef17233 4653
4654 FreeBSD 64-bit support
4655
18f547ad 4656 * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
cef17233 4657 and loader/i386/bsd_trampoline.S
4658 (bsd_mod_ASFLAGS): new variable
4659 * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
4660 (FREEBSD_MODTYPE_KERNEL64): likewise
4661 (grub_bsd64_trampoline_start): likewise
4662 (grub_bsd64_trampoline_end): likewise
4663 (grub_bsd64_trampoline_selfjump): likewise
4664 (grub_bsd64_trampoline_gdt): likewise
4665 * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
4666 * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
4667 * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
4668 * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
18f547ad 4669 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
cef17233 4670 of "attrib" member
4671 * loader/i386/bsd_pagetable.c: new file
4672 * loader/i386/bsd_trampoline.S: likewise
4673 * loader/i386/bsd.c (ALIGN_QWORD): new macro
4674 (ALIGN_VAR): likewise
4675 (entry_hi): new variable
4676 (kern_end_mdofs): likewise
4677 (is_64bit): likewise
4678 (grub_freebsd_add_meta): use ALIGN_VAR
4679 (grub_e820_mmap): new declaration
4680 (grub_freebsd_add_mmap): new function
4681 (grub_freebsd_add_meta_module): support 64 bit kernels
4682 (grub_freebsd_list_modules): use ALIGN_VAR
4683 (gdt_descriptor): new declaration
4684 (grub_freebsd_boot): support 64 bit kernels
4685 (grub_bsd_elf64_hook): new function
4686 (grub_bsd_load_elf): support elf64
4687
038c5720 46882009-05-03 Bean <bean123ch@gmail.com>
4689
4690 * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
4691 after we get the result of if statement.
4692
fc45fb58 46932009-05-03 Bean <bean123ch@gmail.com>
4694
4695 * Makefile.in (enable_efiemu): New variable.
4696
4697 * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
4698 set.
4699 (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
4700 path.
4701 (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
4702 path, add -mno-red-zone option.
4703 (efiemu64_s.o): Likewise.
4704 (efiemu64.o): Use macro $^ for source file.
4705
4706 * configure.ac (--enable-efiemu): New option.
4707
bbee0f2b 47082009-05-03 Vladimir Serbinenko <phcoder@gmail.com>
4709
4710 xnu support
4711
4712 * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
4713 (pkglib_MODULES): add xnu.mod
4714 (xnu_mod_SOURCES): new variable
4715 (xnu_mod_CFLAGS): likewise
4716 (xnu_mod_LDFLAGS): likewise
4717 (xnu_mod_ASFLAGS): likewise
4718 * conf/i386-pc.rmk: likewise
4719 * conf/x86_64-efi.rmk: likewise
7dd4a573 4720 * include/grub/efi/efi.h (grub_efi_finish_boot_services):
bbee0f2b 4721 new declaration
4722 * include/grub/i386/macho.h: new file
4723 * include/grub/i386/xnu.h: likewise
4724 * include/grub/macho.h: likewise
4725 * include/grub/machoload.h: likewise
4726 * include/grub/x86_64/macho.h: likewise
4727 * include/grub/x86_64/xnu.h: likewise
4728 * include/grub/xnu.h: likewise
4729 * kern/efi/efi.c (grub_efi_finish_boot_services): new function
4730 * kern/efi/mm.c (MAX_HEAP_SIZE): increase
4731 * loader/i386/efi/xnu.c: new file
4732 * loader/i386/pc/xnu.c: likewise
4733 * loader/i386/xnu.c: likewise
4734 * loader/i386/xnu_helper.S: likewise
4735 * loader/macho.c: likewise
4736 * loader/xnu.c: likewise
4737 * loader/xnu_resume.c: likewise
4738 * util/grub-dumpdevtree: likewise
4739 * include/grub/i386/pit.h: include grub/err.h
4740 (grub_pit_wait): export
4741 * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
7dd4a573 4742
5caf964d 47432009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
4744
4745 Efiemu
7dd4a573 4746
5caf964d 4747 * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
7dd4a573 4748 _linux_efi, linux_efi.
4749 new files in grub-emu
5caf964d 4750 new targets efiemu32.o and efiemu64.o
4751 * loader/linux_normal_efiemu.c: likewise
4752 * loader/i386/efi/linux.c: added preliminary efiemu support
7dd4a573 4753 * util/i386/pc/grub-install.in: add efiemu??.o to the list of
5caf964d 4754 files to copy
4755 * include/grub/autoefi.h: new file
7dd4a573 4756 * include/grub/i386/efiemu.h: likewise
5caf964d 4757 * include/grub/i386/pc/efiemu.h: likewise
4758 * include/grub/efi/api.h: add LL suffix when necessary
4759 new definitions relating to tables
4760 * include/grub/efiemu/efiemu.h: new file
4761 * include/grub/efiemu/runtime.h: likewise
4762 * efiemu/prepare.c: likewise
4763 * efiemu/loadcore_common.c: likewise
4764 * efiemu/loadcore64.c: likewise
4765 * efiemu/runtime/efiemu.sh: likewise
4766 * efiemu/runtime/efiemu.S: likewise
4767 * efiemu/runtime/efiemu.c: likewise
4768 * efiemu/runtime/config.h: likewise
4769 * efiemu/prepare32.c: likewise
4770 * efiemu/main.c: likewise
4771 * efiemu/modules/pnvram.c: likewise
4772 * efiemu/modules/i386: likewise
4773 * efiemu/modules/i386/pc: likewise
4774 * efiemu/modules/acpi.c: likewise
4775 * efiemu/i386/pc/cfgtables.c: likewise
4776 * efiemu/i386/loadcore64.c: likewise
4777 * efiemu/i386/loadcore32.c: likewise
4778 * efiemu/prepare64.c: likewise
4779 * efiemu/loadcore.c: likewise
4780 * efiemu/symbols.c: likewise
4781 * efiemu/mm.c: likewise
4782 * efiemu/loadcore32.c: likewise
7dd4a573 4783
47842009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
f8efe3ad 4785
4786 ACPI spoofing
4787
4788 * commands/acpi.c: new file
4789 * commands/i386/pc/acpi.c: likewise
4790 * commands/efi/acpi.c: likewise
4791 * include/grub/acpi.h: likewise
4792 * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
4793 (acpi_mod_SOURCES): new variable
4794 (acpi_mod_CFLAGS): likewise
4795 (acpi_mod_LDFLAGS): likewise
4796 * conf/i386-efi.rmk: likewise
4797 * conf/x86_64-efi.rmk: likewise
4798
7dd4a573 47992009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
28a85665 4800
4801 Missing part from mmap patch
4802
4803 * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
4804 (grub_mmap_unregister)
4805 (grub_mmap_free_and_unregister): use grub_mmap_register
4806
7dd4a573 48072009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
09d842b9 4808
4809 Mmap services
4810
4811 * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
4812 * loader/i386/linux.c (find_mmap_size): likewise
4813 (allocate_pages): likewise
4814 * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
4815 (grub_fill_multiboot_mmap): likewise
4816 (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
4817 * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
4818 * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
4819 (OPENBSD_MMAP_RESERVED): likewise
4820 * include/grub/i386/pc/memory.h: include grub/memory.h
4821 (grub_lower_mem): removed
4822 (grub_upper_mem): likewise
4823 (GRUB_MACHINE_MEMORY_ACPI): new definition
4824 (GRUB_MACHINE_MEMORY_NVS): likewise
4825 (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
4826 (GRUB_MACHINE_MEMORY_HOLE): likewise
4827 (grub_machine_mmap_register): likewise
4828 (grub_machine_mmap_unregister): likewise
4829 (grub_machine_get_upper): likewise
4830 (grub_machine_get_lower): likewise
4831 (grub_machine_get_post64): likewise
4832 * include/grub/i386/efi/memory.h: new file
4833 * include/grub/x86_64/efi/memory.h: likewise
4834 * include/grub/efi/memory.h: likewise
4835 * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
4836 (mmap_mod_SOURCES): new variable
4837 (mmap_mod_LDFLAGS): likewise
4838 (mmap_mod_ASFLAGS): likewise
4839 * conf/i386-coreboot.rmk: likewise
4840 * conf/i386-ieee1275.rmk: likewise
4841 * conf/i386-efi.rmk: likewise
4842 * conf/x86_64-efi.rmk: likewise
4843 * include/grub/types.h (UINT_TO_PTR): new macro
4844 (PTR_TO_UINT32): likewise
4845 (PTR_TO_UINT64): likewise
4846 * include/grub/memory.h: new file
4847 * mmap/i386/pc/mmap.c: likewise
4848 * mmap/i386/pc/mmap_helper.S: likewise
4849 * mmap/i386/uppermem.c: likewise
4850 * mmap/mmap.c: likewise
4851 * mmap/efi/mmap.c: likewise
7dd4a573 4852 * kern/i386/coreboot/init.c (grub_machine_init): don't use
09d842b9 4853 grub_upper_mem
4854 * kern/i386/pc/init.c (grub_lower_mem): removed variable
4855 (grub_upper_mem): likewise
4856 (grub_machine_init): don't use grub_upper_mem,
4857 make grub_lower_mem local
4858 * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
4859 grub_mmap_iterate and grub_mmap_get_upper
4860 (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
4861
d558e6b5 48622009-05-02 Bean <bean123ch@gmail.com>
4863
4864 * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
4865 script/sh/parser.y.
4866 (pkglib_MODULES): Add normal.mod and sh.mod.
4867 (normal_SOURCES): New variable.
4868 (normal_mod_CFLAGS): Likewise.
4869 (normal_mod_LDFLAGS): Likewise.
4870 (sh_mod_SOURCES): Likewise.
4871 (sh_mod_CFLAGS): Likewise.
4872 (sh_mod_LDFLAGS): Likewise.
4873
4874 * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
4875 script/sh/lexer.c_DEPENDENCIES.
4876 (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
4877 kern/rescue_reader.c and kern/rescue_parser.c.
4878 (kernel_img_HEADERS): Remove rescue.h, add reader.h.
4879 (grub_emu_SOURCES): Change source files.
4880 (pkglib_MODULES): Remove normal.mod.
4881 (normal_SOURCES): Removed.
4882 (normal_mod_CFLAGS): Likewise.
4883 (normal_mod_LDFLAGS): Likewise.
4884 * conf/i386-coreboot.rmk: Likewise.
4885 * conf/i386-efi.rmk: Likewise.
4886 * conf/i386-ieee1276.rmk: Likewise.
4887 * conf/powerpc-ieee1275.rmk: Likewise.
4888 * conf/sparc64-ieee1275.rmk: Likewise.
4889 * conf/x86_64-efi.rmk: Likewise.
4890
4891 * include/grub/command.h (grub_command_execute): New inline function.
4892
4893 * include/grub/menu.h (grub_menu_entry): Removed commands field.
4894
4895 * include/grub/normal.h: Remove <grub/setjmp.h>.
4896 (grub_fs_module_list): Moved to normal/autofs.c.
4897 (grub_exit_env): Removed.
4898 (grub_command_execute): Likewise.
4899 (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
4900 parameter script.
4901 (read_command_list): New function declaration.
4902 (read_fs_list): Likewise.
4903
4904 * include/parser.h: Include <grub/reader.h>.
4905 (grub_parser_split_cmdline): Change type of getline parameter.
4906 (grub_parser): New structure.
4907 (grub_parser_class): New variable.
4908 (grub_parser_execute): New function declaration.
4909 (grub_register_rescue_parser): Likewise.
4910 (grub_parser_register): New inline function.
4911 (grub_parser_unregister): Likewise.
4912 (grub_parser_get_current): Likewise.
4913 (grub_parser_set_current): Likewise.
4914
4915 * include/grub/reader.h: New file.
4916 * kern/reader.c: Likewise.
4917 * kern/rescue_parser.c: Likewise.
4918 * kern/rescue_reader.c: Likewise.
4919 * normal/autofs.c: Likewise.
4920 * normal/dyncmd.c: Likewise.
4921
4922 * include/grub/rescue.h: Removed.
4923 * normal/command.h: Likewise.
4924
4925 * include/grub/script.h: Moved to ...
4926 * include/grub/script_sh.h: ... Moved here.
4927 * normal/execute.c: Moved to ...
4928 * script/sh/execute.c: ... Moved here.
4929 * normal/function.c: Moved to ...
4930 * script/sh/function.c: ... Moved here.
4931 * normal/lexer.c: Moved to ...
4932 * script/sh/lexer.c: ... Moved here.
4933 * normal/parser.y: Moved to ...
4934 * script/sh/parser.y: ... Moved here.
4935 * normal/script.c: Moved to ...
4936 * script/sh/script.c: ... Moved here.
4937
4938 * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
4939 <grub/reader.h>.
4940 (grub_exit_env): Removed.
4941 (fs_module_list): Moved to normal/autofs.c.
4942 (grub_file_getline): Don't handle comment here.
4943 (free_menu): Skip removed field entry->commands.
4944 (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
4945 script parameter.
4946 (read_config_file): Removed nested parameter, change getline function.
4947 (grub_enter_normal_mode): Removed.
4948 (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
4949 (read_command_list): Likewise.
4950 (autoload_fs_module): Moved to normal/autofs.c.
4951 (read_fs_list): Likewise.
4952 (reader_nested): New variable.
4953 (grub_normal_execute): Run parser.sh to switch to sh parser.
4954 (grub_cmd_rescue): Removed.
4955 (cmd_normal): Removed.
4956 (grub_cmd_normal): Unregister itself at the beginning. Don't register
4957 rescue command.
4958 (grub_cmdline_run): New function.
4959 (grub_normal_reader_init): Likewise.
4960 (grub_normal_read_line): Likewise.
4961 (grub_env_write_pager): Likewise.
4962 (cmdline): New variable.
4963 (grub_normal_reader): Likewise.
4964 (GRUB_MOD_INIT): Register normal reader and set as current, register
4965 pager hook, register normal command with grub_register_command_prio,
4966 so that it won't show up in command.lst.
4967 (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
4968 grub_fs_autoload_hook.
4969
4970 * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
4971 (grub_menu_execute_entry): Replace grub_script_execute with
4972 grub_parser_execute, change parameter to grub_command_execute.
4973
4974 * normal/menu_text.c: Remove <grub/script.h>.
4975
4976 * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
4977 and <grub/parser.h>.
4978 (run): Change editor_getline to use new parser interface. Change
4979 parameter to grub_command_execute.
4980
4981 * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
4982 <grub/reader.h> and <grub/parser.h>.
4983 (grub_load_normal_mode): Execute normal command.
4984 (grub_main): Call grub_register_core_commands,
4985 grub_register_rescue_parser and grub_register_rescue_reader, use
4986 grub_reader_loop to enter input loop.
4987
7dd4a573 4988 * kern/parser.c (grub_parser_split_cmdline): Change type of
4989 getline parameter.
d558e6b5 4990 (grub_parser_class): New variable.
4991 (grub_parser_execute): New function.
4992
4993 * loader/i386/multiboot.c: Remove <grub/rescue.h>.
4994 * loader/multiboot2.c: Likewise.
4995 * loader/sparc64/ieee1275/linux.c: Likewise.
4996
4997 * util/grub-emu.c (read_command_list): New dummy function.
4998
18db813d 49992009-05-02 Robert Millan <rmh.grub@aybabtu.com>
5000
5001 * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
5002 count to 16 for CCISS and IDA.
5003
6c67de15 50042009-05-02 Robert Millan <rmh.grub@aybabtu.com>
5005
5006 * normal/menu_text.c (grub_wait_after_message): Print a newline
5007 after waiting for user input.
5008
5009 * loader/i386/linux.c: Include `<grub/normal.h>'.
5010 (grub_cmd_linux): Improve the error message about `ask' mode, by
5011 waiting for user input so it's not missed (we can do this, since
5012 user requested interaction).
5013
d9dc87b0 50142009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
5015
5016 Added missing lst to grub-mkrescue
5017
5018 * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
5019 and ${input_dir}/parttool.lst
5020
ac8a2baa 50212009-04-30 David S. Miller <davem@davemloft.net>
5022
ad22a610 5023 * util/hostdisk.c (device_is_wholedisk): New function.
5024 (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
5025 zero only if device_is_wholedisk() returns true.
5026
6966215d 5027 * util/hostdisk.c (convert_system_partition_to_system_disk):
5028 Handle virtual disk devices named /dev/vdiskX as found on sparc
5029 and powerpc.
5030
ac8a2baa 5031 * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
5032 lettered partition specifier is found, convert to numbered.
5033
979b4fb4 50342009-04-29 David S. Miller <davem@davemloft.net>
5035
e2bf39b2 5036 * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
5037 * include/grub/sparc64/ieee1275/memory.h: Likewise.
5038
3c64e104 5039 * normal/command.c: Add missing newline at end of file.
5040
979b4fb4 5041 * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
5042 warnings.
5043 * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
5044 * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
5045 grub_ofdisk_read): Likewise, and deal similarly with the fact that
5046 ihandles have a 32-bit type but need to be stored in a "void *".
5047
136d9f82 50482009-04-28 Pavel Roskin <proski@gnu.org>
5049
9459c306 5050 * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
5051 not disk. Adjust all dependencies.
2e08a26a 5052 (grub_fs_uuid_close): Use grub_device_close(), not
9459c306 5053 grub_disk_close().
5054
136d9f82 5055 * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
5056 parent's partition, don't copy it by reference, as it gets freed
5057 on close.
5058
7dd4a573 50592009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
75a807cf 5060
5061 Preboot hooks support
5062
5063 * commands/boot.c (struct grub_preboot_t): new declaration
5064 (preboots_head): new variable
5065 (preboots_tail): likewise
5066 (grub_loader_register_preboot_hook): new function
5067 (grub_loader_unregister_preboot_hook): likewise
5068 (grub_loader_set): launch preboot hooks
5069 * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
5070 (grub_loader_register_preboot_hook): new declaration
5071 (grub_loader_unregister_preboot_hook): likewise
5072
5af922b5 50732009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
5074
5075 Warning fix
5076
7dd4a573 5077 * disk/scsi.c (grub_scsi_open): added missing cast when
5af922b5 5078 calling grub_dprintf
5079
a5562c30 50802009-04-26 Vladimir Serbinenko <phcoder@gmail.com>
5081
5082 Bug and warning fixes
5083
7dd4a573 5084 * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
a5562c30 5085 declaration
5086 * commands/test.c (test_parse): fixed bug with file tests and corrected
5087 declaration of find_file
5088
4006f85c 50892009-04-26 Pavel Roskin <proski@gnu.org>
5090
5091 * Makefile.in: Don't install empty manual pages if help2man is
5092 missing. Use help2man option for output, not shell redirection.
5093
5c77c3de 50942009-04-26 David S. Miller <davem@davemloft.net>
5095
5096 * util/grub-mkdevicemap.c (make_device_map): Add missing
5097 NESTED_FUNC_ATTR to process_device().
5098
033b10a8 50992009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
5100
5101 Test command
5102
5103 * commands/test.c: rewritten to use bash-like test
5104
e4343593 51052009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
5106
5107 Parttool autoloading and improvements
5108
7dd4a573 5109 * Makefile.in (pkglib_DATA): add parttool.lst
e4343593 5110 (parttool.lst): new target
5111 * genmk.rb: generate parttool-*
5112 (CLEANFILES): add #{parttool}
5113 (PARTTOOLFILES): new variable
5114 * genparttoollist.sh: new file
7dd4a573 5115 * parttool/pcpart.c (grub_pcpart_boot): more feedback
e4343593 5116 (grub_pcpart_type): likewise
5117 * commands/parttool.c (helpmsg): new variable
5118 (grub_cmd_parttool): output help if not enough arguments are supplied
5119 autoload modules
5120 (GRUB_MOD_INIT(parttool)): use helpmsg
5121
0d312500 51222009-04-24 David S. Miller <davem@davemloft.net>
5123
7dd4a573 5124 Avoiding opening same device multiple times in device iterator.
0d312500 5125
5126 * kern/device.c: (grub_device_iterate): Define struct part_ent,
7dd4a573 5127 and use it to build a list of partitions in iterate_disk() and
0d312500 5128 iterate_partition().
5129
ac20caff 5130 * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
5131 on disk->data.
5132
0dcf7495 5133 * disk/ieee1275/nand.c (grub_nand_iterate): Return
5134 grub_devalias_iterate() result instead of unconditional 0.
5135 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
5136 Also, capture hook return value, either directly or via
5137 grub_children_iterate(), and propagate to caller.
5138 * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
5139 grub_children_iterate): Return value is now 'int' instead of
5140 'grub_err_t'.
5141 * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
5142 like a proper iterator, stopping when hooks return non-zero.
5143 (grub_devalias_iterate): Likewise.
5144
c8c08833 51452009-04-23 David S. Miller <davem@davemloft.net>
5146
5147 * kern/sparc64/ieee1275/openfw.c: Unused, delete.
5148
f01005a8 51492009-04-22 David S. Miller <davem@davemloft.net>
5150
5151 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
5152 is larger than address_cells, use that value for address_cells too.
5153
4e8269da 5154 * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
5155 IEEE1275_MAX_PATH_LEN): Define.
5156 * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
5157 allocate 'childtype', 'childpath', 'childname', and 'fullname'.
5158 (grub_devalias_iterate): Dynamically allocate 'aliasname' and
5159 'devtype'. Explicitly NULL terminate devalias expansion.
5160
a1447506 5161 * util/sparc64/ieee1275/misc.c: New file.
5162 * util/sparc64/ieee1275/grub-setup.c: New file.
5163 * util/sparc64/ieee1275/grub-ofpathname.c: New file.
5164 * util/sparc64/ieee1275/grub-mkimage.c: New file.
5165 * util/sparc64/ieee1275/grub-install.in: New file.
5166 * util/ieee1275/ofpath.c: New file.
5167 * util/ieee1275/devicemap.c: New file.
5168 * util/devicemap.c: New file.
5169 * util/deviceiter.c: New file.
5170 * kern/sparc64/ieee1275/init.c: New file.
5171 * include/grub/util/ofpath.h: New file.
5172 * include/grub/util/deviceiter.h: New file.
5173 * util/grub-mkdevicemap.c: Include deviceiter.h.
5174 Implement using grub_util_emit_devicemap_entry and
5175 grub_util_iterate_devices.
5176 * conf/i386-corebook.rmk: Build util/deviceiter.c and
5177 util/devicemap.c into grub-mkdevicemap
5178 * conf/i386-efi.rmk: Likewise.
5179 * conf/i386-ieee1275.rmk: Likewise.
5180 * conf/i386-pc.rmk: Likewise.
5181 * conf/powerpc-ieee1275.rmk: Likewise.
5182 * conf/sparc64-ieee1275.rmk: Add rules to build boot block
5183 images and installation utilities. Build kernel as image
5184 instead of as elf binary. Use common rules as much as possible.
5185
7dd4a573 51862009-04-19 Vladimir Serbinenko <phcoder@gmail.com>
0aefc632 5187
5188 Correct GPT definition
5189
7dd4a573 5190 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
0aefc632 5191 of "attrib" member
5192
c6c5219f 51932009-04-19 Felix Zielcke <fzielcke@z-51.de>
5194
5195 * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
5196
0552ff9f 51972009-04-19 David S. Miller <davem@davemloft.net>
5198
5199 * loader/sparc64/ieee1275/linux.c: Include grub/command.h
5200 (grub_rescue_cmd_linux): Rename to...
5201 (grub_cmd_linux): and fix prototype.
5202 (grub_rescue_cmd_initrd): Rename to...
5203 (grub_cmd_initrd): and fix prototype.
5204 (cmd_linux, cmd_initrd): New.
5205 (GRUB_MOD_INIT(linux)): Use grub_register_command().
5206 (GRUB_MOD_FINI(linux): Use grub_unregister_command().
5207
d1a282fc 52082009-04-17 Pavel Roskin <proski@gnu.org>
5209
07c5039f 5210 * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
5211 format.
5212 (grub_ohci_transfer): Likewise.
5213
b012002d 5214 * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
5215
1bc09c35 5216 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
5217 return without a value. Fix inconsistent indentation.
5218
e0ff9126 5219 * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
5220 match struct grub_fs.
5221
d1a282fc 5222 * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
5223 * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
5224 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
5225 * commands/lspci.c (grub_lspci_iter): Likewise.
5226
a96df3f2 52272009-04-16 Bean <bean123ch@gmail.com>
5228
5229 * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
5230 value.
5231
41bb0fe9 52322009-04-15 Pavel Roskin <proski@gnu.org>
5233
5234 * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
5235 LONG_MAX to GRUB_LONG_MAX. Introduce GRUB_LONG_MIN. Update all
5236 users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
5237 definitions.
5238
596c6970 52392009-04-15 Felix Zielcke <fzielcke@z-51.de>
5240
5241 * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
7dd4a573 5242 that no multiple data or metadata areas are supported and `Unknown
596c6970 5243 metadata header'.
5244
7dd4a573 52452009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
0d5d5653 5246
5247 Move loader out of the kernel
5248
5249 * kern/loader.c: moved to ...
5250 * commands/boot.c: ... moved here
5251 * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
5252 * commands/boot.c (grub_cmd_boot): moved here. All users updated
5253 * include/grub/kernel.h (grub_machine_fini): export
5254 * include/grub/loader.h (grub_loader_is_loaded): update declaration
5255 (grub_loader_set): likewise
5256 (grub_loader_unset): likewise
5257 (grub_loader_boot): likewise
5258 * conf/common.rmk: new module boot.mod
5259 (pkglib_MODULES): add boot.mod
5260 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
5261 (grub_emu_SOURCES): likewise
5262 * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
5263 (grub_emu_SOURCES): likewise
5264 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
5265 (grub_emu_SOURCES): likewise
5266 * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
5267 (grub_emu_SOURCES): likewise
5268 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
5269 (grub_emu_SOURCES): likewise
7dd4a573 5270 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
5271 (grub_emu_SOURCES): likewise
0d5d5653 5272 * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
7dd4a573 5273 (grub_emu_SOURCES): likewise
0d5d5653 5274
7dd4a573 52752009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
5999d619 5276
5277 use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
7dd4a573 5278
5999d619 5279 * kern/misc.c (grub_itoa): Removed function
5280 (grub_ltoa): likewise
5281 (grub_vsprintf): use grub_lltoa
5282
7dd4a573 52832009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
13c00781 5284
5285 Restore grub-emu
5286
5287 * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
5288 * conf/i386-coreboot.rmk: likewise
5289 * conf/i386-ieee1275.rmk: likewise
5290 * conf/powerpc-ieee1275.rmk: likewise
7dd4a573 5291
20318222 52922009-04-15 Felix Zielcke <fzielcke@z-51.de>
5293
5294 * INSTALL: Add that `./autogen.sh' needs to be run before
5295 `./configure.'.
5296
d05f0df3 52972009-04-14 Bean <bean123ch@gmail.com>
5298
5299 * Makefile.in (pkglib_DATA): Add handler.lst.
5300 (handler.lst): New rule.
5301
5302 * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
5303 * conf/i386-coreboot.rmk: Likewise.
5304 * conf/i386-ieee1275.rmk: Likewise.
5305 * conf/i386-efi.rmk: Likewise.
5306 * conf/x86_64-efi.rmk: Likewise.
5307 * conf/powerpc-ieee1275.rmk: Likewise.
5308 * conf/sparc64-ieee1275.rmk: Likewise.
5309
5310 * genhandlerlist.sh: New file.
5311
5312 * genmk.rb: Add rules to generate handler.lst.
5313
5314 * include/grub/normal.h (grub_file_getline): New function definition.
5315 (read_handler_list): Likewise.
5316 (free_handler_list): Likewise.
5317
5318 * include/grub/term.h (grub_term_register_input): Add name parameter
5319 for auto generation of handler.lst.
5320 (grub_term_register_output): Likewise.
5321
5322 * normal/handler.c: New file.
5323
5324 * normal/main.c (get_line): Renamed to grub_file_getline.
5325 (read_config_file): Use the newly renamed grub_file_getline.
5326 (read_command_list): Likewise.
5327 (read_fs_list): Likewise.
5328 (grub_normal_execute): Call read_handler_list to parse handler.lst.
5329 (GRUB_MOD_FINI): Call free_handler_list to free handler list.
5330
5331 * term/efi/console.c (grub_console_init): Add name parameter for auto
5332 generation of handler.lst.
5333 * term/gfxterm.c: Likewise.
5334 * term/i386/pc/at_keyboard.c: Likewise.
5335 * term/i386/pc/console.c: Likewise.
5336 * term/i386/pc/serial.c: Likewise.
5337 * term/i386/pc/vesafb.c: Likewise.
5338 * term/i386/pc/vga.c: Likewise.
5339 * term/i386/pc/vga_text.c: Likewise.
5340 * term/ieee1275/ofconsole.c: Likewise.
5341 * term/usb_keyboard.c: Likewise.
5342
33c846be 53432009-04-14 Bean <bean123ch@gmail.com>
5344
5345 * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
5346 properly with null character.
5347
4484e01e 53482009-04-14 Felix Zielcke <fzielcke@z-51.de>
5349
5350 * configure: Remove.
5351 * config.h.in: Likewise.
f93d668e 5352 * stamp-h.in: Likewise.
4484e01e 5353 * DISTLIST: Likewise.
5354 * conf/common.mk: Likewise.
5355 * conf/i386-coreboot.mk: Likewise.
5356 * conf/i386-efi.mk: Likewise.
5357 * conf/i386-ieee1275.mk: Likewise.
5358 * conf/i386.mk: Likewise.
5359 * conf/i386-pc.mk: Likewise.
5360 * conf/powerpc-ieee1275.mk: Likewise.
5361 * conf/sparc64-ieee1275.mk: Likewise.
5362 * conf/x86_64-efi.mk: Likewise.
5363
5364 * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
5365 develop on GRUB.
5366
7dd4a573 53672009-04-14 John Stanley <jpsinthemix@verizon.net>
5c5bf96a 5368 David S. Miller <davem@davemloft.net>
5369
5370 * util/hostdisk.c (make_device_name): Fix buffer length
5371 calculations.
5372
e25b5a8c 53732009-04-14 Felix Zielcke <fzielcke@z-51.de>
5374
5375 * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
5376 <sys/param.h> and <sys/sysctl.h>.
5377 (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
5378 to add 0x10 to `kern.geom.debugflags' if it's not already set, before
5379 opening the device and reset them afterwards.
5380
1f1f580c 53812009-04-13 Pavel Roskin <proski@gnu.org>
5382
5383 * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
5384 Reported by John Stanley <jpsinthemix@verizon.net>
5385
7ebc2d6b 53862009-04-13 Robert Millan <rmh@aybabtu.com>
5387
5388 * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
7dd4a573 5389 that name for menuentries when appropriate.
7ebc2d6b 5390
d8ba3667 53912009-04-13 Felix Zielcke <fzielcke@z-51.de>
5392
5393 * util/grub.d/10_freebsd.in: Add a missing `fi'.
5394
cba416eb 53952009-04-13 Robert Millan <rmh@aybabtu.com>
5396
5397 * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
5398 to Linux, simply abort telling the user it's no longer supported.
5399
a547a745 54002009-04-13 Felix Zielcke <fzielcke@z-51.de>
5401
5402 * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
7dd4a573 5403 doesn't exist. Check also for /boot/kernel/kernel.gz. Print
a547a745 5404 `freebsd_loadenv' only when devices.hints exist.
5405
232a769c 54062009-04-13 Pavel Roskin <proski@gnu.org>
5407
5408 * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
5409
c3012039 54102009-04-13 Felix Zielcke <fzielcke@z-51.de>
5411
5412 * util/i386/pc/grub-install.in (install_drive): Remove the BSD
5413 partition number.
5414 (grub_drive): Likewise.
5415
234022fe 54162009-04-13 David S. Miller <davem@davemloft.net>
5417
5418 * kern/sparc64/ieee1275/ieee1275.c: New file.
5419 * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
5420 IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
5421 IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
5422 IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
5423 (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
5424 grub_ieee1275_alloc_physmem): Declare new exported functions.
5425
d8e1836c 5426 * include/grub/sparc64/ieee1275/loader.h: New file.
5427 * include/grub/sparc64/ieee1275/memory.h: Likewise.
5428 * include/grub/sparc64/kernel.h: Likewise.
5429 * loader/sparc64/ieee1275/linux.c: Likewise.
5430
96bd81ec 5431 * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
5432 (grub_fstest_SOURCES): Likewise.
5433
6a4737e5 5434 * util/hostdisk.c (make_device_name): Do not make any assumptions
5435 about the length of drive names.
5436
1d7a72fd 5437 * kern/dl.c (grub_dl_load_file): Close file immediately when
5438 we are done using it.
5439
56bc2471 54402009-04-12 David S. Miller <davem@davemloft.net>
5441
5442 * kern/misc.c (grub_ltoa): Fix cast when handling negative
5443 values. Noticed by Pavel Roskin.
5444
df38d0bb 5445 * configure.ac: Check for __bswapsi2 and__bswapdi2 using
5446 target compiler.
7dd4a573 5447
e382e93a 5448 * genmk.rb: Add more flexible image type specification, also
5449 pass --strip-unneeded to objcopy.
5450 * conf/i386-pc.rmk: Use *_FORMAT.
5451 * conf/i386-pc.mk: Rebuilt.
5452
f5dbbca9 5453 * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
5454 (OFDISK_HASH_SZ): Define.
5455 (ofdisk_hash): New hash table.
5456 (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
5457 (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
5458 instead of device phandle which is not unique.
5459
91c88b12 5460 * kern/sparc64/ieee1275/init.c: Delete, replace with...
5461 * kern/sparc64/ieee1275/crt0.S: assembler implementation.
5462 * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
5463 (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
5464 GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
5465 GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
5466 GRUB_KERNEL_MACHINE_DATA_END): Define.
5467 (grub_kernel_image_size, grub_total_module_size): Declare.
5468
5b5d4aa5 54692009-04-12 Pavel Roskin <proski@gnu.org>
5470
7dd4a573 5471 * configure.ac: Change the logic when we check for target tools.
5472 Do it when the target is specified and it's different from the
5473 specified value of the host.
5b5d4aa5 5474
c91e1793 54752009-04-11 Felix Zielcke <fzielcke@z-51.de>
5476
5477 * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
5478 (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
5479 GNU/kFreeBSD. Check if a device is a character device. Use
5480 DIOCGMEDIASIZE to get the size.
5481 (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
5482 support for GNU/kFreeBSD.
5483 (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
5484 is a character device instead of a block device. Add support for
5485 FreeBSD device names.
5486
5487 * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
5488 is a character device instead of a block device.
5489
5490 * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
5491 is a character device instead of a block device.
5492
b1ac8644 54932009-04-11 Andrey Shuvikov <mr_hyro@yahoo.com>
5494
5495 * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
5496 (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
5497 FreeBSD. Check if a device is a character device. Use
5498 DIOCGMEDIASIZE to get the size.
5499 (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
5500 support for FreeBSD.
5501 (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
5502 is a character device instead of a block device. Add support for
5503 FreeBSD device names.
5504
5505 * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
5506 a character device instead of a block device.
5507 (grub_util_check_char_device): New function.
5508
5509 * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
5510 a character device instead of a block device.
5511
5512 * include/grub/util/getroot.h (grub_util_check_char_device): New
5513 prototype.
5514
a3f7515a 55152009-04-11 David S. Miller <davem@davemloft.net>
5516
5517 * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
5518 static libgcc.
5519 * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
5520 * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
5521 function, if present.
5522 (__bswapdi2): Likewise.
5523
0d44993d 5524 * include/grub/sparc64/ieee1275/boot.h: New file.
5525 * boot/sparc64/ieee1275/boot.S: Likewise.
5526 * boot/sparc64/ieee1275/diskboot.S: Likewise.
5527
ed3d2bc2 5528 * kern/misc.c (grub_ltoa): New function.
5529 (grub_vsprintf): Use it to format 'long' integers.
5530
d3bfb59c 55312009-04-10 David S. Miller <davem@davemloft.net>
5532
5533 * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
5534 slots are of type grub_ieee1275_cell_t.
5535 (grub_nand_read): Likewise.
5536 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
5537 IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
5538 macros are used to compare values in arg/ret block of the call.
5539 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
5540 grub_ieee1275_next_property, grub_ieee1275_get_property_length,
5541 grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
5542 grub_ieee1275_instance_to_path, grub_ieee1275_write,
5543 grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
5544 grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
5545 grub_ieee1275_close, grub_ieee1275_set_property,
5546 grub_ieee1275_set_color): All ieee1275 call arg slots are of type
5547 grub_ieee1275_cell_t.
5548 * kern/ieee1275/openfw.c (grub_map): Likewise.
5549 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
5550 grub_ieee1275_phandle_t): Define as grub_unit32_t type.
5551
450e2238 5552 * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
5553 * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
5554 (grub_devalias_iterate): Likewise.
5555
7dd4a573 55562009-04-10 Vladimir Serbinenko <phcoder@gmail.com>
6df8cc76 5557
5558 UFS improvements
5559
5560 * fs/ufs.c (INODE_NBLOCKS): new definition
5561 (struct grub_ufs_dirent): added fields for non-BSD dirents
5562 (grub_ufs_get_file_block): fixed double indirect handling
5563 (grub_ufs_lookup_symlink): use more robust way to determine whether
5564 symlink is inline
5565 (grub_ufs_find_file): support for non-BSD dirents
5566 (grub_ufs_dir): support for non-BSD dirents
5567
e7e6862a 55682009-04-10 Bean <bean123ch@gnail.com>
5569
5570 * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
5571 attribute, otherwise the size would be wrong for i386 platform.
5572
5573 * include/grub/pci.h (grub_pci_read_word): New inline function.
5574 (grub_pci_read_byte): Likewise.
5575 (grub_pci_write): Likewise.
5576 (grub_pci_write_word): Likewise.
5577 (grub_pci_write_byte): Likewise.
5578
5579 * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
5580
5581 * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
5582 (find_framebuf): Scan pci to locate the frame buffer address.
5583
5584 * commands/efi/fixvideo.c: New file.
5585
5586 * commands/efi/loadbios.c: Likewise.
5587
5588 * commands/memrw.c: Likewise.
5589
5590 * util/grub-dumpbios.in: Likewise.
5591
5592 * conf/common.rmk (grub-dumpbios): New utility.
5593 (pkglib_MODULES): New module memrw.mod.
5594 (memrw_mod_SOURCE): New macro.
5595 (memrw_mod_CFLAGS): Likewise.
5596 (memrw_mod_LDFLAGS): Likewise.
5597
7dd4a573 5598 * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
e7e6862a 5599 fixvideo.mod.
5600 (loadbios_mod_SOURCE): New macro.
5601 (loadbios_mod_CFLAGS): Likewise.
5602 (loadbios_mod_LDFLAGS): Likewise.
5603 (fixvideo_mod_SOURCE): Likewise.
5604 (fixvideo_mod_CFLAGS): Likewise.
5605 (fixvideo_mod_LDFLAGS): Likewise.
5606
7dd4a573 5607 * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
e7e6862a 5608 fixvideo.mod.
5609 (loadbios_mod_SOURCE): New macro.
5610 (loadbios_mod_CFLAGS): Likewise.
5611 (loadbios_mod_LDFLAGS): Likewise.
5612 (fixvideo_mod_SOURCE): Likewise.
5613 (fixvideo_mod_CFLAGS): Likewise.
5614 (fixvideo_mod_LDFLAGS): Likewise.
5615
af63ada2 56162009-04-08 Felix Zielcke <fzielcke@z-51.de>
5617
5618 * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
5619
c2cdde70 56202009-04-07 David S. Miller <davem@davemloft.net>
5621
5622 * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
5623 support for R_SPARC_OLO10 relocations. Fix compile warning for
5624 R_SPARC_WDISP30 case.
ea3f72cf 5625 * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
c2cdde70 5626
761319cf 56272009-04-06 Pavel Roskin <proski@gnu.org>
5628
1007d1f5 5629 * include/grub/misc.h (ARRAY_SIZE): New macro.
5630 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
5631 New macro.
5632 * loader/i386/linux.c (allocate_pages): Use free_pages().
5633 (grub_linux_unload): Don't use free_pages().
5634 (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
5635 wrong index. Treat all other modes as text modes.
5636 (grub_cmd_linux): Initialize vid_mode unconditionally to
5637 GRUB_LINUX_VID_MODE_NORMAL. Recognize and support "vga=ask".
5638
761319cf 5639 * commands/help.c (print_command_help): Use cmd->prio, not
5640 cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
5641
ea761d40 56422009-04-06 Vladimir Serbinenko <phcoder@gmail.com>
7dd4a573 5643
ea761d40 5644 Parttool
5645
5646 * parttool/pcpart.c: new file
5647 * commands/parttool.c: likewise
5648 * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
5649 (parttool_mod_SOURCES): new variable
5650 (parttool_mod_CFLAGS): likewise
5651 (parttool_mod_LDFLAGS): likewise
5652 (pcpart_mod_SOURCES): likewise
5653 (pcpart_mod_CFLAGS): likewise
5654 (pcpart_mod_LDFLAGS): likewise
7dd4a573 5655 * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
ea761d40 5656 and parttool/pcpart.c
5657 * conf/i386-efi.rmk: likewise
5658 * conf/i386-ieee1275.rmk: likewise
5659 * conf/i386-pc.rmk: likewise
5660 * conf/powerpc-ieee1275.rmk: likewise
5661 * conf/sparc64-ieee1275.rmk: likewise
5662 * conf/x86_64-ieee1275.rmk: likewise
5663
05aaebfb 56642009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
5665
5666 Support for mtime and further expandability of dir command
5667
5668 * include/grub/lib/datetime.h: moved to ...
7dd4a573 5669 * include/grub/datetime.h: ... moved here and added
05aaebfb 5670 declaration of grub_unixtime2datetime. All users updated
7dd4a573 5671 * include/grub/fs.h: new syntax for dir and mtime functions in
5672 struct grub_fs
05aaebfb 5673 * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
5674 and GRUB_FSHELP_FLAGS_MASK
5675 * commands/ls.c (grub_ls_list_files): Write mtime in long format
5676 * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
5677 (grub_ext2_mtime): new function
5678 * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
5679 (grub_hfsplus_mtime): new function
5680 * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
5681 (GRUB_UFS_ATTR_FILE): likewise
5682 (GRUB_UFS_ATTR_LNK): likewise
5683 (struct grub_ufs_sblock): new fields mtime
5684 (grub_ufs_read_inode): new parameter to read inode to a separate buffer
5685 all users updated
5686 (grub_ufs_dir): mtime support
5687 (grub_ufs_mtime): new function
5688 * fs/affs.c (grub_affs_dir): use new dir syntax
5689 * fs/afs.c (grub_afs_dir): likewise
5690 * fs/cpio.c (grub_cpio_dir): likewise
5691 * fs/fat.c (grub_fat_find_dir): likewise
5692 * fs/hfs.c (grub_hfs_dir): likewise
5693 * fs/iso9660.c (grub_iso9660_dir): likewise
5694 * fs/jfs.c (grub_jfs_dir): likewise
5695 * fs/minix.c (grub_minix_dir): likewise
5696 * fs/ntfs.c (grub_ntfs_dir): likewise
5697 * fs/reiserfs.c (grub_reiserfs_dir): likewise
5698 * fs/sfs.c (grub_sfs_dir): likewise
5699 * fs/xfs.c (grub_xfs_dir): likewise
5700 * util/hostfs.c (grub_hostfs_dir): likewise
5701 * lib/datetime.c: moved to ...
5702 * normal/datetime.c: ... moved here
5703 (grub_unixtime2datetime): new function
5704 * kern/rescue.c (grub_rescue_print_files): use new dir syntax
7dd4a573 5705 * normal/completion.c (iterate_dir): use new dir syntax
5706 * normal/misc.c (grub_normal_print_device_info): tell the
05aaebfb 5707 last modification time of a volume
7dd4a573 5708 * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
05aaebfb 5709 * conf/common.rmk: added lib/datetime.c to ls.mod
7dd4a573 5710 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
05aaebfb 5711 (normal_mod_SOURCES): likewise
5712 (datetime_mod_SOURCES): Removed lib/datetime.c
5713 * conf/i386-efi.rmk: likewise
7dd4a573 5714 * conf/i386-ieee1275.rmk: likewise
05aaebfb 5715 * conf/i386-pc.rmk: likewise
5716 * conf/powerpc-ieee1275.rmk: likewise
7dd4a573 5717 * conf/sparc64-ieee1275.rmk: likewise
5718 * conf/x86_64-efi.rmk: likewise
05aaebfb 5719
8a7e1a14 57202009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
5721
5722 Trim trailing spaces in FAT label and support mtools-like labels
7dd4a573 5723
5724 * fs/fat.c (grub_fat_iterate_dir): New function based
8a7e1a14 5725 on grub_fat_find_dir
5726 (grub_fat_find_dir): use grub_fat_iterate_dir
5727 (grub_fat_label): likewise
5728
04186a9c 57292009-04-04 Vladimir Serbinenko <phcoder@gmail.com>
5730
7dd4a573 5731 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
04186a9c 5732 and command.h
5733 remove extraneous kernel_elf_HEADERS
5734
da4c0bb6 57352009-04-04 Bean <bean123ch@gnail.com>
5736
5737 * include/grub/util/misc.h: Add dummy function fsync for mingw.
5738
5739 * util/misc.c: Likewise.
5740
54ad9555 57412009-04-04 Yoshinori K. Okuji <okuji@enbug.org>
5742
5743 * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
5744 instead of grub_printf.
5745
7a6bf9f2 57462009-04-03 Robert Millan <rmh@aybabtu.com>
5747
5748 * loader/i386/linux.c (grub_linux_setup_video): Fill
5749 `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
5750 values from `mode info' structure instead of hardcoded
5751 values.
5752
3fcc2083 57532009-04-01 Pavel Roskin <proski@gnu.org>
5754
5755 * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
5756 unused now.
5757 * genmk.rb: Likewise.
5758 * configure.ac: Likewise.
5759
5ec9740b 57602009-04-01 Manoel Abranches <mrabran@linux.vnet.ibm.com>
5761
5762 * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
5763 TARGET_LDFLAGS. This corrects a problem with grub-mkelfimage.
5764
5270cec8 57652009-04-01 David S. Miller <davem@davemloft.net>
5766
5767 * normal/sparc64/setjmp.S: Fix setjmp implementation.
7dd4a573 5768 * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
5270cec8 5769 (grub_setjmp): Mark with 'returns_twice' attribute.
5770 * include/grub/i386/setjmp.h (grub_setjmp): Likewise
5771 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
5772 * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
5773
9c3dd854 57742009-04-01 Robert Millan <rmh@aybabtu.com>
5775
5776 Reapply fix from 2008-07-28 which was accidentally reverted; also
5777 perform the same fix to a similar check in same function.
5778
5779 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
5780 with the same number are found, just use issue a warning with
5781 grub_dprintf(), as this error has been reported to be non-fatal.
5782
0d818b7e 57832009-03-31 Pavel Roskin <proski@gnu.org>
5784
5785 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
5786 for cross-compilation.
5787
95646d92 57882009-03-30 Robert Millan <rmh@aybabtu.com>
5789
5790 Fix i386-ieee1275 build.
5791
5792 * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
5793 Remove declaration.
5794
6a003ed1 57952009-03-30 Pavel Roskin <proski@gnu.org>
5796
5797 * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
5798 (grub_hfs_cmp_catkeys): ... this. Don't assume strings to be
5799 zero-terminated, rely only on the strlen value. Fix comparison
5800 of strings differing in length.
5801
92f33540 58022009-03-30 Robert Millan <rmh@aybabtu.com>
5803
5804 * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
5805 checking for abi version. Improve error messages on BIOS to notify
5806 user about `linux16' command.
5807
a8c48fd5 58082009-03-29 Vladimir Serbinenko <phcoder@gmail.com>
5809
f968172e 5810 Leak fixes
a8c48fd5 5811
f968172e 5812 * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
5813 in case of collision
5814 * disk/scsi.c (grub_scsi_open): free scsi in case of error
a8c48fd5 5815
9c323f09 58162009-03-29 Robert Millan <rmh@aybabtu.com>
5817
5818 * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
5819 set `vid_mode' accordingly.
5820 (grub_linux_boot): Process `vid_mode' and set video mode.
5821
ae68f423 58222009-03-29 Robert Millan <rmh@aybabtu.com>
5823
5824 * util/grub.d/10_linux.in (linux_entry): New function.
5825 Factorize generation of Linux boot entries.
5826
5709cfc4 58272009-03-29 Yoshinori K. Okuji <okuji@enbug.org>
5828
5829 Make the format of Environment Block plain text. The boot loader
5830 part is not tested well yet.
7dd4a573 5831
5709cfc4 5832 * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
5833 (buffer): Removed.
5834 (envblk): Likewise.
5835 (usage): Remove "info" and "clear". Add "unset". Update the
5836 description of "set", as this does not delete variables any
5837 longer.
5838 (create_envblk_file): Complete rewrite.
5839 (open_envblk_file): Likewise.
5840 (cmd_info): Removed.
5841 (cmd_list): Likewise.
5842 (cmd_set): Likewise.
5843 (cmd_clear): Likewise.
5844 (list_variables): New function.
5845 (write_envblk): Likewise.
5846 (set_variables): Likewise.
5847 (unset_variables): Likewise.
5848 (main): Complete rewrite.
5849
5850 * commands/loadenv.c (buffer): Removed.
5851 (envblk): Likewise.
5852 (open_envblk_file): New function.
5853 (read_envblk_file): Complete rewrite.
5854 (grub_cmd_load_env): Likewise.
5855 (grub_cmd_list_env): Likewise.
5856 (struct blocklist): New struct.
5857 (free_blocklists): New function.
5858 (check_blocklists): Likewise.
5859 (write_blocklists): Likewise.
5860 (grub_cmd_save_env): Complete rewrite.
5861
5862 * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
5863 a plain text signature.
5864 (GRUB_ENVBLK_MAXLEN): Removed.
5865 (struct grub_envblk): Complete rewrite.
5866 (grub_envblk_find): Removed.
5867 (grub_envblk_insert): Likewise.
5868 (grub_envblk_open): New prototype.
5869 (grub_envblk_set): Likewise.
5870 (grub_envblk_delete): Put const to VALUE.
5871 (grub_envblk_iterate): Put const to NAME and VALUE.
5872 (grub_envblk_close): New prototype.
5873 (grub_envblk_buffer): New inline function.
5874 (grub_envblk_size): Likewise.
5875
5876 * lib/envblk.c: Include grub/mm.h.
5877 (grub_env_find): Removed.
5878 (grub_envblk_open): New function.
5879 (grub_envblk_close): Likewise.
5880 (escaped_value_len): Likewise.
5881 (find_next_line): Likewise.
5882 (grub_envblk_insert): Removed.
5883 (grub_envblk_set): New function.
5884 (grub_envblk_delete): Complete rewrite.
5885 (grub_envblk_iterate): Likewise.
5886
a9368fd3 58872009-03-28 Robert Millan <rmh@aybabtu.com>
5888
5889 * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
5890 (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
5891 variables. Use 16-bit loader.
5892 (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
5893 loader.
5894 * kern/i386/loader.S (grub_linux_boot): Rename to ...
5895 (grub_linux16_boot): ... this. Update all users.
5896 * loader/i386/linux.c (grub_linux32_boot): Rename to ...
5897 (grub_linux_boot): ... this. Update all users.
5898
5899 * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
5900 (GRUB_MOD_INIT(linux16)): ... this. Rename `linux' and `initrd'
5901 commands to `linux16' and `initrd16'.
5902 (GRUB_MOD_FINI(linux)): Rename to ...
5903 (GRUB_MOD_FINI(linux16)): ... this.
5904
e4dd5a7e 59052009-03-24 Pavel Roskin <proski@gnu.org>
5906
5907 * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
5908 not just for compilation.
5909
c04d6e05 59102009-03-22 Vladimir Serbinenko <phcoder@gmail.com>
5911
5912 Move multiboot helper out of kernel
5913
5914 * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
5915 `loader/i386/multiboot_helper.S'.
5916 * conf/i386-coreboot.rmk: Likewise
5917 * conf/i386-ieee1275.rmk: Likewise
5918
5919 * kern/i386/loader.S: Move multiboot helpers from here...
5920 * loader/i386/multiboot_helper.S: ...moved here
5921 * include/grub/i386/loader.h: Move declarations of multiboot
5922 helpers from here...
5923 * include/grub/i386/multiboot.h: ...moved here
5924 * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
5925
42a5b3fc 59262009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
5927
5928 * kern/env.c (grub_env_context_open): Added an argument to specify
5929 whether a new context inherits exported variables from current
5930 one. This is useful when making a sandbox to interpret a config
5931 file.
5932 All callers updated.
5933
5934 * include/grub/env.h (grub_env_context_open): Updated the prototype.
5935
b28bbc4e 59362009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
5937
5938 * kern/env.c (grub_env_context_close): Fix memory leaks.
5939
f04f02e4 59402009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
5941
5942 * normal/main.c (grub_normal_execute): Added an argument
5943 BATCH to specify if an interactive interface should be provided
5944 after reading a config file.
5945 All callers updated.
5946 (read_command_list): Prevent being executed twice.
5947 (read_fs_list): Likewise.
5948
42a5b3fc 5949 * include/grub/normal.h (grub_normal_execute): Updated the
5950 prototype.
f04f02e4 5951
41473ac2 59522009-03-22 Pavel Roskin <proski@gno.org>
5953
fbc00b0c 5954 * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
5955 _start.
5956 * kern/i386/pc/startup.S: Likewise.
5957 * kern/i386/efi/startup.S: Likewise.
5958 * kern/i386/ieee1275/startup.S: Likewise.
5959 * kern/i386/coreboot/startup.S: Likewise.
5960 * kern/x86_64/efi/startup.S: Likewise.
5961
41473ac2 5962 * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
5963 * configure.ac: Don't call grub_CHECK_START_SYMBOL.
5964 * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
5965
2274cc8f 59662009-03-21 Vladimir Serbinenko <phcoder@gmail.com>
5967
5968 Bugfixes in multiboot for bugs uncovered by solaris kernel.
5969
5970 * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
5971 limit detection.
5972 Use vaddr of correct segment for entry_point.
5973
b1b797cb 59742009-03-21 Bean <bean123ch@gmail.com>
5975
5976 * commands/blocklist.c: Add include file <grub/command.h>, remove
5977 <grub/normal.h> and <grub/arg.h>.
5978 (grub_cmd_blocklist): Use the new command interface.
5979 (GRUB_MOD_INIT): Likewise.
5980 (GRUB_MOD_FINI): Likewise.
5981 * commands/boot.c: Likewise.
5982 * commands/cat.c: Likewise.
5983 * commands/cmp.c: Likewise.
5984 * commands/configfile.c: Likewise.
5985 * commands/crc.c: Likewise.
5986 * commands/echo.c: Likewise.
5987 * commands/halt.c: Likewise.
5988 * commands/handler.c: Likewise.
5989 * commands/hdparm.c: Likewise.
5990 * commands/help.c: Likewise.
5991 * commands/hexdump.c: Likewise.
5992 * commands/loadenv.c: Likewise.
5993 * commands/ls.c: Likewise.
5994 * commands/lsmmap.c: Likewise.
5995 * commands/lspci.c: Likewise.
5996 * commands/loadenv.c: Likewise.
5997 * commands/read.c: Likewise.
5998 * commands/reboot.c: Likewise.
5999 * commands/search.c: Likewise.
6000 * commands/sleep.c: Likewise.
6001 * commands/test.c: Likewise.
6002 * commands/usbtest.c: Likewise.
6003 * commands/videotest.c: Likewise.
6004 * commands/i386/cpuid.c: Likewise.
6005 * commands/i386/pc/halt.c: Likewise.
6006 * commands/i386/pc/play.c: Likewise.
6007 * commands/i386/pc/pxecmd.c: Likewise.
6008 * commands/i386/pc/vbeinfo.c: Likewise.
6009 * commands/i386/pc/vbetest.c: Likewise.
6010 * commands/ieee1275/suspend.c: Likewise.
6011 * disk/loopback.c: Likewise.
6012 * font/font_cmd.c: Likewise.
6013 * hello/hello.c: Likewise.
6014 * loader/efi/appleloader.c: Likewise.
6015 * loader/efi/chainloader.c: Likewise.
6016 * loader/i386/bsd.c: Likewise.
6017 * loader/i386/efi/linux.c: Likewise.
6018 * loader/i386/ieee1275/linux.c: Likewise.
6019 * loader/i386/linux.c: Likewise.
6020 * loader/i386/pc/chainloader.c: Likewise.
6021 * loader/i386/pc/linux.c: Likewise.
6022 * loader/powerpc/ieee1275/linux.c: Likewise.
6023 * loader/multiboot_loader.c: Likewise.
6024 * term/gfxterm.c: Likewise.
6025 * term/i386/pc/serial.c: Likewise.
6026 * term/terminfo.c: Likewise.
6027
6028 * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
6029 * term/i386/pc/vga.c: Likewise.
6030 * video/readers/jpeg.c: Likewise.
6031 * video/readers/png.c: Likewise.
6032 * video/readers/tga.c: Likewise.
6033
6034 * util/grub-fstest (cmd_loopback): Removed.
6035 (cmd_blocklist): Likewise.
6036 (cmd_ls): Likewise.
6037 (grub_register_command): Likewise.
6038 (grub_unregister_command): Likewise.
6039 (execute_command): Use grub_command_find to locate command and execute
6040 it.
6041
6042 * include/grub/efi/chainloader.h: Removed.
6043 * loader/efi/chainloader_normal.c: Likewise.
6044 * loader/i386/bsd_normal.c: Likewise.
6045 * loader/i386/pc/chainloader_normal.c: Likewise.
6046 * loader/i386/pc/multiboot_normal.c: Likewise.
6047 * loader/linux_normal.c: Likewise.
6048 * loader/multiboot_loader_normal.c: Likewise.
6049 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
6050
6051 * gencmdlist.sh: Scan new registration command grub_register_extcmd
6052 and grub_register_command_p1.
6053
6054 * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
6055 kern/command.c, lib/arg.c and commands/extcmd.c.
6056 (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
6057 (minicmd_mod_SOURCES): New variable.
6058 (minicmd_mod_CFLAGS): Likewise.
6059 (minicmd_mod_LDFLAGS): Likewise.
6060 (extcmd_mod_SOURCES): Likewise.
6061 (extcmd_mod_CFLAGS): Likewise.
6062 (extcmd_mod_LDFLAGS): Likewise.
6063 (boot_mod_SOURCES): Removed.
6064 (boot_mod_CFLAGS): Likewise.
6065 (boot_mod_LDFLAGS): Likewise.
6066
6067 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
6068 kern/corecmd.c.
6069 (kernel_img_HEADERS): Add command.h.
6070 (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
6071 commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
6072 and lib/arg.c.
6073 (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
6074 _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
6075 remove the corresponding normal mode command.
6076 (normal_mod_SOURCES): Remove normal/arg.c.
6077 * conf/i386-coreboot.rmk: Likewise.
6078 * conf/i386-efi.rmk: Likewise.
6079 * conf/i386-ieee1275.rmk: Likewise.
6080 * conf/powerpc-ieee1275.rmk: Likewise.
6081 * conf/x86_64-efi.rmk: Likewise.
6082
6083 * include/grub/arg.h: Move from here ...
6084 * include/grub/lib/arg.h: ... to here.
6085
6086 * normal/arg.c: Move from here ...
6087 * lib/arg.c: ... to here.
6088
6089 * commands/extcmd.c: New file.
6090 * commands/minicmd.c: Likewise.
6091 * include/grub/command.h: Likewise.
6092 * include/grub/extcmd.h: Likewise.
6093 * kern/command.c: Likewise.
6094 * kern/corecmd.c: Likewise.
6095
6096 * kern/list.c (grub_list_iterate): Return int instead of void.
6097 (grub_list_insert): New function.
6098 (grub_prio_list_insert): Likewise.
6099
6100 * kern/rescue.c (grub_rescue_command): Removed.
6101 (grub_rescue_command_list): Likewise.
6102 (grub_rescue_register_command): Likewise.
6103 (grub_rescue_unregister_command): Likewise.
6104 (grub_rescue_cmd_boot): Move to minicmd.c
6105 (grub_rescue_cmd_help): Likewise.
6106 (grub_rescue_cmd_info): Likewise.
6107 (grub_rescue_cmd_boot): Likewise.
6108 (grub_rescue_cmd_testload): Likewise.
6109 (grub_rescue_cmd_dump): Likewise.
6110 (grub_rescue_cmd_rmmod): Likewise.
6111 (grub_rescue_cmd_lsmod): Likewise.
6112 (grub_rescue_cmd_exit): Likewise.
6113 (grub_rescue_print_devices): Moved to corecmd.c.
6114 (grub_rescue_print_files): Likewise.
6115 (grub_rescue_cmd_ls): Likewise.
6116 (grub_rescue_cmd_insmod): Likewise.
6117 (grub_rescue_cmd_set): Likewise.
6118 (grub_rescue_cmd_unset): Likewise.
7d074e3c 6119 (attempt_normal_mode): Use grub_command_find to get normal module.
b1b797cb 6120 (grub_enter_rescue_mode): Use grub_register_core_commands to register
7d074e3c 6121 commands, remove grub_rescue_register_command calls.
b1b797cb 6122
7d074e3c 6123 * normal/command.c (grub_register_command): Removed.
b1b797cb 6124 (grub_unregister_command): Likewise.
6125 (grub_command_find): Likewise.
6126 (grub_iterate_commands): Likewise.
6127 (rescue_command): Likewise.
6128 (export_command): Moved to corecmd.c.
6129 (set_command): Removed.
6130 (unset_command): Likewise.
6131 (insmod_command): Likewise.
6132 (rmmod_command): Likewise.
6133 (lsmod_command): Likewise.
6134 (grub_command_init): Likewise.
6135
6136 * normal/completion.c (iterate_command): Use cmd->prio to check for
6137 active command.
6138 (complete_arguments): Use grub_extcmd_t structure to find options.
6139 (grub_normal_do_completion): Change function grub_iterate_commands to
6140 grub_command_iterate.
6141
6142 * normal/execute.c (grub_script_execute_cmd): No need to parse
6143 argument here.
6144
6145 * normal/main.c (grub_dyncmd_dispatcher): New function.
6146 (read_command_list): Register unload commands as dyncmd.
6147 (grub_cmd_normal): Use new command interface, register rescue,
6148 unregister normal at entry, register normal, unregister rescue at exit.
6149
6150 * include/grub/list.h (grub_list_test_t): New type.
6151 (grub_list_iterate): Return int instead of void.
6152 (grub_list_insert): New function.
6153 (GRUB_AS_NAMED_LIST_P): New macro.
6154 (GRUB_AS_PRIO_LIST): Likewise.
6155 (GRUB_AS_PRIO_LIST_P): Likewise.
6156 (GRUB_PRIO_LIST_PRIO_MASK): New constant.
6157 (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
6158 (grub_prio_list): New structure.
6159 (grub_prio_list_insert): New function.
6160 (grub_prio_list_remove): New inline function.
6161
6162 * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
6163 (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
6164 (GRUB_COMMAND_FLAG_MENU): Likewise.
6165 (GRUB_COMMAND_FLAG_BOTH): Likewise.
6166 (GRUB_COMMAND_FLAG_TITLE): Likewise.
6167 (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
6168 (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
6169 (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
6170 (grub_command): Likewise.
6171 (grub_register_command): Likewise.
6172 (grub_command_find): Likewise.
6173 (grub_iterate_commands): Likewise.
6174 (grub_command_init): Likewise.
6175 (grub_arg_parse): Likewise.
6176 (grub_arg_show_help): Likewise.
6177
6178 * include/grub/rescue.h (grub_rescue_register_command): Removed.
6179 (grub_rescue_unregister_command): Likewise.
6180
6181 * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
6182 grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
6183 grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
6184
6185 * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
6186 grub_rescue_cmd_initrd.
6187 * include/grub/i386/loader.h: Likewise.
6188 * include/grub/x86_64/loader.h: Likewise.
6189
6190 * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
6191
1f4147aa 61922009-03-21 Bean <bean123ch@gmail.com>
6193
6194 * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
6195 instead of stat in mingw environment.
6196
6197 * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
6198
6199 * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
6200
6201 * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
6202 AC_CONFIG_LINKS.
6203
2156d5ba 62042009-03-21 Bean <bean123ch@gmail.com>
6205
6206 * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
6207 out of range error.
6208
177b82ca 62092009-03-18 Michel Dänzer <michel@daenzer.net>
6210
6211 * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
6212 checking inode flags for EXT4_EXTENTS_FLAG.
6213
14aad807 62142009-03-18 Robert Millan <rmh@aybabtu.com>
6215
6216 * loader/i386/linux.c: Include `<grub/video.h>' and
6217 `<grub/i386/pc/vbe.h>'..
6218 (grub_linux_setup_video): New function. Loosely based on the EFI one.
6219 (grub_linux32_boot): Attempt to configure video settings with
6220 grub_linux_setup_video().
6221 (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
6222 to avoid grub_console_fini() which would step out of graphical mode
6223 unconditionally.
6224
8cf83a27 62252009-03-14 Robert Millan <rmh@aybabtu.com>
6226
6227 Fix build on powerpc.
6228 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
6229
40164e75 62302009-03-12 Vladimir Serbinenko <phcoder@gmail.com>
6231
6232 * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
6233 background image command.
6234
c58bc32a 62352009-03-12 Colin D Bennett <colin@gibibit.com>
6236
6237 * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
6238 (grub_gfxterm_putchar): Extract pairs of identical calls to
6239 draw_cursor out of conditional blocks.
6240
5415144a 62412009-03-11 Pavel Roskin <proski@gnu.org>
6242
6243 * fs/hfs.c (grub_hfs_strncasecmp): New function.
6244 (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
6245
6394042e 62462009-03-11 Robert Millan <rmh@aybabtu.com>
6247
6248 * loader/i386/multiboot_elfxx.c
6249 (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
6250
b7b50e5f 62512009-03-11 Felix Zielcke <fzielcke@z-51.de>
6252
6253 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
6254 `kern/handler.c'.
6255
1ca7fc96 62562009-03-11 Robert Millan <rmh@aybabtu.com>
6257
6258 * loader/i386/multiboot.c (code_size): New variable.
6259 (grub_multiboot): Define offsets by adding to `code_size' rather
7d074e3c 6260 than subtracting from `grub_multiboot_payload_size'. Provide
1ca7fc96 6261 4-byte alignment to MBI and others by increasing
7d074e3c 6262 `boot_loader_name_length' appropriately.
1ca7fc96 6263
6264 * loader/i386/multiboot_elfxx.c
6265 (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
6266
a83ea1d2 62672009-03-09 Felix Zielcke <fzielcke@z-51.de>
6268
6269 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
6270 `fs/ext2.c'.
6271
aa9f3bff 62722009-03-08 Robert Millan <rmh@aybabtu.com>
6273
6274 Make loader/i386/linux.c usable on i386-pc again.
6275
6276 * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
6277 memory to heap.
6278 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
6279 `#error' stanza.
6280
d8b3b60e 62812009-03-07 Bean <bean123ch@gmail.com>
6282
6283 * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
6284 allocation.
6285
b362c9e9 62862009-03-06 Robert Millan <rmh@aybabtu.com>
6287
6288 Fix display issue on terminals with screen size other than 80x25
6289 (e.g. gfxterm with resolution higher than 640x480).
6290
6291 * normal/main.c (grub_normal_init_page): Display title text in a
7d074e3c 6292 position relative to the center of the terminal instead of relying
b362c9e9 6293 on a hardcoded offset.
6294
9304eef1 62952009-03-04 Robert Millan <rmh@aybabtu.com>
6296
6297 Filter /etc/grub.d/10_* so that only add-ons for native kernels are
6298 installed.
6299
6300 * Makefile.in (host_kernel): New variable.
6301 * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
6302 scripts instead of just the windows one.
6303 * configure.ac: Initialize and AC_SUBST `host_kernel'.
6304
eabc95fb 63052009-03-04 Felix Zielcke <fzielcke@z-51.de>
2ba60b62 6306
6307 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
6308 `kern/handler.c'.
6309 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6310 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
6311 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
6312 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6313 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6314 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6315
ceb1223c 63162009-03-04 Felix Zielcke <fzielcke@z-51.de>
6317
6318 * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
6319 or if there's no space for the disk label and print the partition number on a
6320 invalid magic.
6321
4910684a 63222009-03-04 Felix Zielcke <fzielcke@z-51.de>
6323
6324 * util/misc.c: Include <time.h>.
6325 (grub_millisleep): New function.
6326
7e9ca17a 63272009-03-04 Bean <bean123ch@gmail.com>
6328
6329 * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
6330 another option -mno-red-zone.
6331
6332 * commands/handler.c: Change module description.
6333
6334 * kern/handler.c: Add missing space at the end of description line.
6335
6336 * kern/list.c: Likewise.
6337
f501677c 63382009-03-03 Robert Millan <rmh@aybabtu.com>
6339
6340 Move more components to the relocation area, and fix mbi pointer
6341 handling to use the destination rather than the origin (thanks to
6342 Vladimir Serbinenko for spotting).
6343
6344 * loader/i386/multiboot.c (mbi_dest): New variable.
6345 (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
6346 (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
6347 relocation area.
6348
9902d047 63492009-03-01 Bean <bean123ch@gmail.com>
6350
50fb7002 6351 * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
9902d047 6352 (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
6353 (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
6354 (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
6355
6356 * loader/i386/efi/linux.c (acpi_guid): New variable.
6357 (acpi_guid): Likewise.
6358 (EBDA_SEG_ADDR): New constant.
6359 (LOW_MEM_ADDR): Likewise.
6360 (FAKE_EBDA_SEG): Likewise.
6361 (fake_bios_data): New function.
6362 (grub_linux_boot): Call fake_bios_data.
6363
71b9f361 63642009-03-01 Bean <bean123ch@gmail.com>
6365
6366 * commands/terminal.c: Removed.
6367
6368 * commands/handler.c: New file.
6369
6370 * include/grub/list.h: Likewise.
6371
6372 * include/grub/handler.h: Likewise.
6373
6374 * kern/list.c: Likewise.
6375
6376 * kern/handler.c: Likewise.
6377
6378 * kern/term.h: Include header file <grub/handler.h>.
6379 (grub_term_input): Move next field to the beginning.
6380 (grub_term_output): Likewise.
6381 (grub_term_input_class): New variable.
6382 (grub_term_output_class): Likewise.
6383 (grub_term_register_input): Changed to inline function.
6384 (grub_term_register_output): Likewise.
6385 (grub_term_unregister_input): Likewise.
6386 (grub_term_unregister_output): Likewise.
6387 (grub_term_set_current_input): Likewise.
6388 (grub_term_set_current_output): Likewise.
6389 (grub_term_get_current_input): Likewise.
6390 (grub_term_get_current_output): Likewise.
6391 (grub_term_iterate_input): Removed.
6392 (grub_term_iterate_output): Likewise.
6393
6394 * kern/term.c (grub_term_list_input): Removed.
6395 (grub_term_list_output): Likewise.
6396 (grub_term_input_class): New variable.
6397 (grub_term_output_class): Likewise.
50fb7002 6398 (grub_cur_term_input): Change variable as macro.
71b9f361 6399 (grub_cur_term_output): Likewise.
6400 (grub_term_register_input): Removed.
6401 (grub_term_register_output): Likewise.
6402 (grub_term_unregister_input): Likewise.
6403 (grub_term_unregister_output): Likewise.
6404 (grub_term_set_current_input): Likewise.
6405 (grub_term_set_current_output): Likewise.
6406 (grub_term_iterate_input): Likewise.
6407 (grub_term_iterate_output): Likewise.
6408 (grub_term_get_current_input): Likewise.
6409 (grub_term_get_current_output): Likewise.
6410
6411 * util/grub-editenv.c: Include header file <grub/handler.h>.
6412 (grub_term_get_current_input): Removed.
6413 (grub_term_get_current_output): Likewise.
6414 (grub_term_input_class): New variable.
50fb7002 6415 (grub_term_output_class): Likewise.
71b9f361 6416
6417 * util/grub-fstest.c (grub_term_get_current_input): Removed.
6418 (grub_term_get_current_output): Likewise.
6419 (grub_term_input_class): New variable.
50fb7002 6420 (grub_term_output_class): Likewise.
71b9f361 6421
6422 * util/grub-probe.c (grub_term_get_current_input): Removed.
6423 (grub_term_get_current_output): Likewise.
6424 (grub_term_input_class): New variable.
50fb7002 6425 (grub_term_output_class): Likewise.
71b9f361 6426
6427 * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
6428 (grub_term_get_current_output): Likewise.
6429 (grub_term_input_class): New variable.
50fb7002 6430 (grub_term_output_class): Likewise.
71b9f361 6431
6432 * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
6433 (terminal_mod_SOURCES): Likewise.
6434 (terminal_mod_CFLAGS): Likewise.
6435 (terminal_mod_LDFLAGS): Likewise.
6436
6437 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
6438 handler.c.
6439 (kernel_img_SOURCES): Add list.c and handler.c.
6440 (kernel_img_HEADERS): Add list.h and handler.h.
6441
6442 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
6443 handler.c.
6444 (kernel_mod_SOURCES): Add list.c and handler.c.
6445 (kernel_mod_HEADERS): Add list.h and handler.h.
6446
6447 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
6448 handler.c.
6449 (kernel_elf_SOURCES): Add list.c and handler.c.
6450 (kernel_elf_HEADERS): Add list.h and handler.h.
6451
6452 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
6453 handler.c.
6454 (kernel_elf_SOURCES): Add list.c and handler.c.
6455 (kernel_elf_HEADERS): Add list.h and handler.h.
6456
6457 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
6458 handler.c.
6459 (kernel_mod_SOURCES): Add list.c and handler.c.
6460 (kernel_mod_HEADERS): Add list.h and handler.h.
6461
6462 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
6463 handler.c.
6464 (kernel_elf_SOURCES): Add list.c and handler.c.
6465 (kernel_elf_HEADERS): Add list.h and handler.h.
6466
8a31787f 64672009-02-27 Robert Millan <rmh@aybabtu.com>
6468
6469 Factorize elf32 / elf64 code in Multiboot loader. This will
6470 prevent it from getting out of sync again.
6471
6472 * loader/i386/multiboot.c (grub_multiboot_is_elf32,
6473 grub_multiboot_load_elf32, grub_multiboot_is_elf64,
6474 grub_multiboot_load_elf64): Move from here ...
6475 * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
6476 grub_multiboot_load_elf): ... to here (new file).
6477
51cd3dfc 64782009-02-27 Robert Millan <rmh@aybabtu.com>
6479
6480 * util/grub.d/10_linux.in: Rename "single-user mode" to
6481 "recovery mode".
6482
6e8c9c3a 64832009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
6484
6485 Don't leak in SCSI code.
6486 * disk/scsi.c (grub_scsi_close): free `scsi'.
6487
4b6bf4f9 64882009-02-27 Robert Millan <rmh@aybabtu.com>
6489
6490 * loader/i386/pc/multiboot.c: Move from here ...
6491 * loader/i386/multiboot.c: ... to here. Update all users.
6492
b9413424 64932009-02-27 Robert Millan <rmh@aybabtu.com>
6494
6495 Patch from Alexandre Bique <bique.alexandre@gmail.com>
6496 * util/i386/pc/grub-setup.c (setup): Fix directory path.
6497
50fb7002 64982009-02-27 Krzysztof Smiechowicz <deadwood@wp.pl>
34519c3f 6499
6500 * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
6501 b-tree.
6502
8cc50345 65032009-02-27 Robert Millan <rmh@aybabtu.com>
6504
6505 * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
6506 `0x' qualifier as 0 when base is specified as parameter).
6507
6e09b8b7 65082009-02-24 Bean <bean123ch@gmail.com>
6509
6510 * configure.ac: Check for -mcmodel=large in x86_64 target.
6511
6512 * include/grub/efi/api.h (efi_call_10): New macro.
6513 (efi_wrap_10): New function.
6514
6515 * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
6516 (GRUB_PE32_REL_BASED_HIGH): Likewise.
6517 (GRUB_PE32_REL_BASED_LOW): Likewise.
6518 (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
6519 (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
6520 (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
6521 (GRUB_PE32_REL_BASED_SECTION): Likewise.
6522 (GRUB_PE32_REL_BASED_REL): Likewise.
6523 (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
6524 (GRUB_PE32_REL_BASED_DIR64): Likewise.
6525 (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
6526
6527 * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
6528 issue.
6529
6530 * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
6531 (efi_wrap_10): New function.
6532
6533 * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
6534
6535 * loader/efi/appleloader.c (devpath_5): Add support for late 2008
6536 MB/MBP model (NV chipset).
6537 (devdata_devs): Add devpath_5 to the list.
6538
6539 * load/i386/efi/linux.c (video_base): Remove variable.
6540 (RGB_MASK): New macro.
6541 (RGB_MAGIC): Likewise.
6542 (LINE_MIN): Likewise.
6543 (LINE_MAX): Likewise.
6544 (FBTEST_STEP): Likewise.
6545 (FBTEST_COUNT): Likewise.
6546 (fb_list): New variable.
6547 (grub_find_video_card): Remove function.
6548 (find_framebuf): New function.
6549 (grub_linux_setup_video): Use find_framebuf to get frame buffer and
6550 line length.
6551
6552 * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
6553 problem for x86_64.
6554
74b21bee 65552009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
6556
6557 Patch #25624 by Kevin Lacquement <kevin@lacqui>.
6558
6559 * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
6560 coding tool name.
6561
a455f472 65622009-02-22 Robert Millan <rmh@aybabtu.com>
6563
6564 * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
6565 * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
6566 in our relocation, instead of using it directly from heap. Also
6567 use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
6568
6374daf3 65692009-02-21 Robert Millan <rmh@aybabtu.com>
6570
6571 Implement USB keyboard support (based on patch by Marco Gerards)
6572
6573 * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
6574 (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
6575 (usb_keyboard_mod_LDFLAGS): New variables.
6576
6577 * term/usb_keyboard.c: New file.
6578
8fa4ea70 65792009-02-14 Vladimir Serbinenko <phcoder@gmail.com>
6580
6581 Corrected wrong declaration
6582
6583 * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
6584
353976ac 65852009-02-14 Christian Franke <franke@computer.org>
6586
6587 * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
6588 (grub_lspci_iter): Print class code and programming interface byte.
6589
6aa1169b 65902009-02-14 Christian Franke <franke@computer.org>
6591
6592 * gendistlist.sh: Ignore `.svn' directories.
6593
265372ca 65942009-02-14 Felix Zielcke <fzielcke@z-51.de>
6595
6596 * fs/fat.c: Add 2009 to Copyright line.
6597
9ff516f3 65982009-02-14 Christian Franke <franke@computer.org>
6599
6600 * commands/hdparm.c: New file. Provides `hdparm' command
6601 which sends ATA commands via grub_disk_ata_pass_through ().
6602
6603 * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
6604
6605 * disk/ata.c: Include <grub/ata.h>. Move <grub/misc.h>
6606 and <grub/cpu/io.h> to include/grub/ata.h.
6607 (enum grub_ata_addressing_t): Move to include/grub/ata.h.
6608 (GRUB_CDROM_SECTOR_SIZE): Remove.
6609 (GRUB_ATA_*): Move to include/grub/ata.h.
6610 (GRUB_ATAPI_*): Likewise.
6611 (enum grub_ata_commands): Likewise.
6612 (enum grub_ata_timeout_milliseconds): Likewise.
6613 (struct grub_ata_device): Likewise.
6614 (grub_ata_regset): Likewise.
6615 (grub_ata_regget): Likewise.
6616 (grub_ata_regset2): Likewise.
6617 (grub_ata_regget2): Likewise.
6618 (grub_ata_check_ready): Likewise.
6619 (grub_ata_wait_not_busy): Remove static, exported in
6620 include/grub/ata.h.
6621 (grub_ata_wait_drq): Likewise.
6622 (grub_ata_pio_read): Likewise.
6623
6624 * disk/ata_pthru.c: New file. Provides grub_ata_pass_through ()
6625 function for hdparm.mod.
6626
6627 * include/grub/ata.h: New file, contains declarations from
6628 disk/ata.c.
6629 (enum grub_ata_commands): Add new commands for commands/hdparm.c.
6630
6631 * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
6632 (grub_disk_ata_pass_through): New exported variable.
6633
6634 * kern/disk.c (grub_disk_ata_pass_through): New variable.
6635
772e23da 66362009-02-13 Colin D Bennett <colin@gibibit.com>
6637
6638 Support multiple fallback entries, and provide an API to support
6639 executing default+fallback menu entries. Renamed the `terminal' menu
6640 viewer to `text'.
6641
6642 * include/grub/normal.h (grub_normal_text_menu_viewer): New global
6643 variable declaration.
6644 (grub_menu_execute_callback): New structure declaration.
6645 (grub_menu_execute_callback_t): New typedef.
6646 (grub_menu_execute_with_fallback): New function declaration.
6647 (grub_menu_get_entry): Likewise.
6648 (grub_menu_get_timeout): Likewise.
6649 (grub_menu_set_timeout): Likewise.
6650
6651 * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
6652
6653 * normal/menu.c (grub_wait_after_message): Moved to
6654 `normal/menu_text.c'.
6655 (draw_border): Likewise.
6656 (print_message): Likewise.
6657 (print_entry): Likewise.
6658 (print_entries): Likewise.
6659 (grub_menu_init_page): Likewise.
6660 (get_entry_number): Likewise.
6661 (print_timeout): Likewise.
6662 (run_menu): Likewise.
6663 (grub_menu_execute_entry): Likewise.
6664 (show_text_menu): Likewise.
6665 (get_and_remove_first_entry_number): New function.
6666 (grub_menu_execute_with_fallback): Likewise.
6667 (get_entry): Renamed to ...
6668 (grub_menu_get_entry): .. this and made it global.
6669 (get_timeout): Renamed to ...
6670 (grub_menu_get_timeout): ... this and made it global.
6671 (set_timeout): Renamed to ...
6672 (grub_menu_set_timeout): ... this and made it global.
6673 (grub_normal_terminal_menu_viewer): Renamed to ...
6674 (grub_normal_text_menu_viewer): ... this.
6675
6676 * normal/menu_text.c: New file. Extracted text-menu-specific code
6677 from normal/menu.c.
6678
6679 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
6680 (normal_mod_SOURCES): Likewise.
6681
6682 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6683 (normal_mod_SOURCES): Likewise.
6684
6685 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6686 (normal_mod_SOURCES): Likewise.
6687
6688 * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
6689 (normal_mod_SOURCES): Likewise.
6690
6691 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6692 (normal_mod_SOURCES): Likewise.
6693
6694 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6695 (normal_mod_SOURCES): Likewise.
6696
6697 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
6698 (normal_mod_SOURCES): Likewise.
6699
16ac430e 67002009-02-11 Robert Millan <rmh@aybabtu.com>
6701
6702 * util/grub.d/00_header.in: Update old reference to `font' command.
6703
06ff20fc 67042009-02-10 Felix Zielcke <fzielcke@z-51.de>
6705
6706 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
6707
6708 Based on patch from Javier Martín.
6709
96da9407 67102009-02-09 Felix Zielcke <fzielcke@z-51.de>
6711
6712 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
50fb7002 6713 to avoid false positives with FAT.
96da9407 6714 (grub_fstest_SOURCES): Likewise.
6715 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
6716 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
6717 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6718 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
6719 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6720 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6721
6dca6fe4 67222009-02-09 Felix Zielcke <fzielcke@z-51.de>
6723
06ff20fc 6724 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
6dca6fe4 6725 bpb.version_specific.fat12_or_fat16.fstype and
6726 bpb.version_specific.fat32.fstype.
6727
2550c62f 67282009-02-08 Robert Millan <rmh@aybabtu.com>
6729
be110b30 6730 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
2550c62f 6731
56978920 67322009-02-08 Robert Millan <rmh@aybabtu.com>
6733
6734 * Makefile.in (host_os, host_cpu): New variables.
6735 (target_os): Remove. Update all users.
6736
d64399b5 67372009-02-08 Marco Gerards <marco@gnu.org>
6738
6739 * Makefile.in (enable_grub_emu_usb): New variable.
6740 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
6741 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
6742 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
6743 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
6744 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
6745 `usbtest.mod' and `usbms.mod'.
6746 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
6747 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
6748 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
6749 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
6750 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
6751 variables.
6752
6753 * disk/usbms.c: New file.
6754
6755 * include/grub/usb.h: Likewise.
6756
6757 * include/grub/usbtrans.h: Likewise.
6758
6759 * include/grub/usbdesc.h: Likewise.
6760
6761 * bus/usb/usbtrans.c: Likewise.
6762
6763 * bus/usb/ohci.c: Likewise.
6764
6765 * bus/usb/uhci.c: Likewise.
6766
6767 * bus/usb/usbhub.c: Likewise.
6768
6769 * bus/usb/usb.c: Likewise.
6770
6771 * commands/usbtest.c: Likewise.
6772
6773 * util/usb.c: Likewise.
50fb7002 6774
d64399b5 6775 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
6776
6777 * configure.ac: Test for libusb presence.
50fb7002 6778
d64399b5 6779 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
6780
2b40d6bb 67812009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
6782
6783 * kern/mm.c: Add more comments.
6784
73a4ce81 67852009-02-08 Robert Millan <rmh@aybabtu.com>
6786
6787 Patch from Javier Martín.
6788 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
6789 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
6790
f821ce59 67912009-02-08 Robert Millan <rmh@aybabtu.com>
6792
6793 * fs/cpio.c: Split tar functionality to ...
6794 * fs/tar.c: ... here (new file). Update all users.
6795
aebfc4b0 67962009-02-07 Robert Millan <rmh@aybabtu.com>
6797
6798 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
6799 backward-incompatible features.
6800
6801 Based on patch from Javier Martín, with some adjustments.
6802
50fb7002 68032009-02-07 Michael Scherer <misc@mandriva.org>
cea15bca 6804
6805 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
6806
0bb5115e 68072009-02-07 Robert Millan <rmh@aybabtu.com>
6808
6809 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
6810 position of `disk/lvm.c' to ensure grub_init_all() always picks it
6811 after the RAID stuff.
6812
38a0f8e7 68132009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
6814
50fb7002 6815 Fixes problem when running vbetest command as reported by
38a0f8e7 6816 Vladimir Serbinenko <phcoder@gmail.com>.
6817
6818 * (grub_vbe_set_video_mode): Fixed problem with text modes.
6819
3143cc1c 68202009-02-04 Felix Zielcke <fzielcke@z-51.de>
6821
6822 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
6823 /dev/md/NpN style mdraid devices.
6824
9cba6fce 68252009-02-03 Felix Zielcke <fzielcke@z-51.de>
6826
6827 * util/unifont2pff.rb: Remove.
6828
e507a2c1 68292009-02-03 Felix Zielcke <fzielcke@z-51.de>
6830
6831 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
6832 `#'.
6833
d2c2b4cd 68342009-02-03 Felix Zielcke <fzielcke@z-51.de>
6835
6836 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
6837 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6838 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
6839 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
6840 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6841 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6842 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6843
b4315fb0 68442009-02-02 Christian Franke <franke@computer.org>
6845
6846 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
6847
de3aa260 68482009-02-01 Felix Zielcke <fzielcke@z-51.de>
6849
7c3ff286 6850 * INSTALL: Note that we now require at least autoconf 2.59 and
6851 that LZO is optional.
de3aa260 6852
825a182b 68532009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
6854
6855 Base on patch on bug #24154 created by Tomas Tintera
6856 <trosos@seznam.cz>.
6857
6858 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
6859
a69ef770 68602009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
6861
7c3ff286 6862 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
a69ef770 6863 <bero@arklinux.org>.
6864
6865 * normal/parser.y (script_init): Add missing semicolon.
6866
6fa42fa6 68672009-01-31 Colin D Bennett <colin@gibibit.com>
6868
7c3ff286 6869 * normal/main.c: Add include to grub/menu_viewer.h.
6fa42fa6 6870 (free_menu_entry_classes): Added.
6871 (grub_normal_menu_addentry): Added class property handling.
6872 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
6873 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
6874
6875 * normal/menu_viewer.c: New file.
6876
6877 * normal/menu.c (run_menu_entry): Renamed to ...
6878 (grub_menu_execute_entry): ... this and made it as global.
6879 (grub_menu_run): Renamed to ...
6880 (show_text_menu): ... this and made it local.
6881 (show_text_menu): Adapt to new function names.
6882 (grub_normal_terminal_menu_viewer): New global variable.
6883
6884 * include/grub/menu.h: New file.
6885
6886 * include/grub/menu_viewer.h: New file.
6887
6888 * include/grub/normal.h: Added include to grub/menu.h.
6889 (grub_menu_entry): Moved to include/grub/menu.h.
6890 (grub_menu_entry_t): Likewise.
6891 (grub_menu): Likewise.
6892 (grub_menu_t): Likewise.
6893 (grub_normal_terminal_menu_viewer): Added.
6894 (grub_menu_execute_entry): Likewise.
6895 (grub_menu_run): Removed.
6896
6897 * DISTLIST: Added include/grub/menu.h.
6898 Added include/grub/menu_viewer.h.
6899 Added normal/menu_viewer.c.
6900
69012009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
6902
6903 * normal/execute.c (grub_script_execute_menuentry): Changed to use
6904 arglist for menutitle arguments.
6905
6906 * normal/main.c (grub_normal_menu_addentry): Likewise.
6907
6908 * normal/parser.y (menuentry): Likewise.
6909
6910 * normal/script.c (grub_script_create_cmdmenu): Likewise.
6911
6912 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
6913 (grub_script_create_cmdmenu): Likewise.
6914
6915 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
6916
6917 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
6918 changes.
6919
6920 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
6921
6922 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
6923
6924 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
6925
6926 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
6927
6928 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
6929
6930 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
6931
56192c23 69322009-01-30 Christian Franke <franke@computer.org>
6933
6934 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
6935 in option help text.
6936
d72521b3 69372009-01-27 Pavel Roskin <proski@gnu.org>
6938
6939 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
6940
994b5e84 69412009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
6942
6943 * commands/lsmmap.c: Add include to grub/machine/memory.h.
6944
6945 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
6946
6947 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
6948 unregister function.
6949
6a7eab2c 69502009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
6951
6952 * disk/scsi.c (grub_scsi_read): Fix sign problem.
6953
6954 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
6955
6956 * util/grub-mkfont.c (usage): Fix typo.
6957
6958 * util/elf/grub-mkimage.c (load_modules): Fix warning.
6959
1806b56e 69602009-01-26 Daniel Mierswa <impulze@impulze.org>
6961
3fb18f09 6962 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
6963
336e1fb9 6964 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
6965
1806b56e 6966 * kern/misc.c (grub_strcasecmp): New function.
6967 (grub_strcasecmp): Use grub_size_t instead of int for length.
6968 Fix return value.
6969 * include/grub/misc.h: Update function prototypes.
6970
580b2a0f 69712009-01-26 Robert Millan <rmh@aybabtu.com>
6972
6973 * configure.ac: Fix cross-compilation check.
ef257b36 6974
d31c24f1 69752009-01-22 Christian Franke <franke@computer.org>
6976
6977 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
6978 (precision) digit string. Allow `.format2' without `format1' (width).
6979 Limit input chars for `%s' output to `format2' if specified. This is
6980 compatible with standard printf ().
6981
3138b44c 69822009-01-22 Christian Franke <franke@computer.org>
6983
6984 * disk/ata.c (grub_ata_wait_status): Replace by ...
6985 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
6986 other status bits may be invalid while BSY is asserted.
6987 (grub_ata_check_ready): New function.
6988 (grub_ata_cmd): Removed.
6989 (grub_ata_wait_drq): New function.
6990 (grub_ata_strncpy): Remove inline.
6991 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
6992 and error check now done by grub_ata_wait_drq ().
6993 (grub_ata_pio_write): Likewise.
6994 (grub_atapi_identify): Set DEV before check for !BSY. Use
6995 grub_ata_wait_drq () to wait for data.
6996 (grub_ata_device_initialize): Add status register check to
6997 detect missing SATA slave devices. Add debug messages.
6998 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
6999 (grub_atapi_packet): Set DEV before check for !BSY. Replace
7000 transfer loop by grub_ata_pio_write ().
7001 (grub_ata_identify): Set DEV before check for !BSY. Use
7002 grub_ata_wait_drq () to wait for data.
ef257b36 7003 (grub_ata_setaddress): Set DEV before check for !BSY.
3138b44c 7004 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
7005 read/write in one loop. Fix invalid command on write. Fix incomplete
7006 command on (size % batch) == 0. Add missing error check after write of
7007 last block. Add debug messages.
7008 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
7009
59a64ef6 70102009-01-19 Christian Franke <franke@computer.org>
7011
7012 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
7013 (GRUB_ATAPI_IREASON_*): Likewise.
7014 (grub_ata_pio_write): Fix timeout error return.
7015 (grub_atapi_identify): Add grub_ata_wait () after cmd.
7016 (grub_atapi_wait_drq): New function.
7017 (grub_atapi_packet): New parameter `size'.
7018 Use grub_atapi_wait_drq () and direct write instead of
7019 grub_ata_pio_write ().
7020 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
7021 reads the number of bytes requested by the device for each DRQ
7022 assertion.
7023 (grub_atapi_write): Remove old implementation, return not
7024 implemented instead.
7025
1cfe20b3 70262009-01-19 Christian Franke <franke@computer.org>
7027
7028 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
7029 of 512 to calculate data size.
7030 (grub_scsi_read12): Likewise.
7031 (grub_scsi_write10): Likewise.
7032 (grub_scsi_write12): Likewise.
7033 (grub_scsi_read): Adjust size according to blocksize.
7034 Add checks for invalid blocksize and unaligned transfer.
7035
bee5fe5d 70362009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
7037
7038 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
7039
ef257b36 7040 * term/gfxterm.c (write_char): Fix background rendering for wide
bee5fe5d 7041 width glyphs.
7042
3e643f8c 70432009-01-19 Robert Millan <rmh@aybabtu.com>
7044
7045 * config.guess: Update to latest version from config git.
7046 * config.sub: Likewise.
7047
4fa80998 70482009-01-17 Felix Zielcke <fzielcke@z-51.de>
7049
7050 * Makefile.in: Change font compilation to use new grub-mkfont instead
7051 of java version.
7052
7053 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
7054 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
7055 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
7056 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
7057 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
7058 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
7059 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
7060 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
7061 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
7062
7086085b 70632009-01-16 Christian Franke <franke@computer.org>
7064
7065 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
7066 (enum grub_ata_timeout_milliseconds): New enum.
7067 (grub_ata_wait_status): Add parameter milliseconds.
7068 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
7069 recovery from timed-out commands.
7070 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
7071 return grub_errno instead of REG_ERROR.
7072 (grub_ata_pio_write): Add parameter milliseconds.
7073 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
7074 Pass milliseconds to grub_ata_wait_status () and
7075 grub_ata_pio_read ().
7076 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
7077 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
7078 grub_ata_wait_status (). Fix IDENTIFY timeout check.
7079 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
7080 It is not suitable for device detection, because DEV bit is ignored,
7081 the command may run too long, and not all devices set the signature
7082 properly.
7083 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
7084 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
7085 Fix device selection, DEV bit must be set first to address the registers
7086 of the correct device.
7087 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
7088 grub_ata_pio_read/write ().
7089 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
7090 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
7091
4a412913 70922009-01-13 Carles Pina i Estany <carles@pina.cat>
7093
7094 * util/grub-editenv.c (main): Use fseeko(), not fseek().
7095
7795c55e 70962009-01-13 Bean <bean123ch@gmail.com>
d913988c 7097
7098 * util/grub-mkfont.c (write_font): forget to remove some debug code.
7099
7795c55e 71002009-01-13 Bean <bean123ch@gmail.com>
e52db1f7 7101
7102 * Makefile.in: (enable_grub_mkfont): New variable.
7103 (freetype_cflags): Likewise.
7104 (freetype_libs): Likewise.
7105
7106 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
7107 (grub_mkfont_SOURCES): New variable.
7108 (grub_mkfont_CFLAGS): Likewise.
7109 (grub_mkfont_LDFLAGS): Likewise.
7110
7111 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
7112 library if `--enable-grub-mkfont' is requested.
7113 (enable_grub_mkfont): New variable.
7114 (freetype_cflags): Likewise.
7115 (freetype_libs): Likewise.
7116
7117 * util/grub-mkfont.c: New file.
7118
093af1fe 71192009-01-12 Christian Franke <franke@computer.org>
7120
7121 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
7122 mode check. Fix setting of compat_use[].
7123
f36cc108 71242009-01-10 Robert Millan <rmh@aybabtu.com>
7125
7126 Update a few copyright years which we forgot to do in 2008 (only for
7127 files whose changes made in 2008 were copyright-significant)
7128
7129 * Makefile.in: Add 2008 to Copyright line.
7130 * disk/ieee1275/ofdisk.c: Likewise.
7131 * disk/efi/efidisk.c: Likewise.
7132 * kern/dl.c: Likewise.
7133 * kern/sparc64/ieee1275/init.c: Likewise.
7134 * kern/mm.c: Likewise.
7135 * kern/efi/mm.c: Likewise.
7136 * boot/i386/pc/boot.S: Likewise.
7137 * genfslist.sh: Likewise.
7138 * fs/iso9660.c: Likewise.
7139 * fs/hfs.c: Likewise.
7140 * fs/jfs.c: Likewise.
7141 * fs/minix.c: Likewise.
7142 * fs/ufs.c: Likewise.
7143 * gensymlist.sh.in: Likewise.
7144 * genkernsyms.sh.in: Likewise.
7145 * include/grub/misc.h: Likewise.
7146 * include/grub/types.h: Likewise.
7147 * include/grub/symbol.h: Likewise.
7148 * include/grub/elf.h: Likewise.
7149 * include/grub/kernel.h: Likewise.
7150 * include/grub/disk.h: Likewise.
7151 * include/grub/dl.h: Likewise.
7152 * include/grub/i386/linux.h: Likewise.
7153 * include/grub/i386/pc/biosdisk.h: Likewise.
7154 * include/grub/efi/api.h: Likewise.
7155 * include/grub/efi/pe32.h: Likewise.
7156 * include/grub/util/misc.h: Likewise.
7157 * normal/execute.c: Likewise.
7158 * normal/arg.c: Likewise.
7159 * normal/completion.c: Likewise.
7160 * normal/lexer.c: Likewise.
7161 * normal/parser.y: Likewise.
7162 * normal/misc.c: Likewise.
7163 * commands/i386/pc/vbeinfo.c: Likewise.
7164 * commands/hexdump.c: Likewise.
7165 * commands/terminal.c: Likewise.
7166 * commands/ls.c: Likewise.
7167 * commands/help.c: Likewise.
7168 * partmap/pc.c: Likewise.
7169 * loader/efi/chainloader.c: Likewise.
7170 * loader/multiboot_loader.c: Likewise.
7171 * loader/i386/pc/multiboot2.c: Likewise.
7172 * term/efi/console.c: Likewise.
7173 * term/i386/pc/serial.c: Likewise.
7174 * util/lvm.c: Likewise.
7175 * util/console.c: Likewise.
7176 * util/i386/efi/grub-mkimage.c: Likewise.
7177 * util/raid.c: Likewise.
7178
7f02114b 71792009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
7180
7181 * commands/videotest.c: Removed include to grub/machine/memory.h.
7182
7183 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
7184 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
7185 (video_mod_SOURCES): Removed.
7186 (video_mod_CFLAGS): Likewise.
7187 (video_mod_LDFLAGS): Likewise.
7188 (gfxterm_mod_SOURCES): Likewise.
7189 (gfxterm_mod_CFLAGS): Likewise.
7190 (gfxterm_mod_LDFLAGS): Likewise.
7191 (videotest_mod_SOURCES): Likewise.
7192 (videotest_mod_CFLAGS): Likewise.
7193 (videotest_mod_LDFLAGS): Likewise.
7194 (bitmap_mod_SOURCES): Likewise.
7195 (bitmap_mod_CFLAGS): Likewise.
7196 (bitmap_mod_LDFLAGS): Likewise.
7197 (tga_mod_SOURCES): Likewise.
7198 (tga_mod_CFLAGS): Likewise.
7199 (tga_mod_LDFLAGS): Likewise.
7200 (jpeg_mod_SOURCES): Likewise.
7201 (jpeg_mod_CFLAGS): Likewise.
7202 (jpeg_mod_LDFLAGS): Likewise.
7203 (png_mod_SOURCES): Likewise.
7204 (png_mod_CFLAGS): Likewise.
7205 (png_mod_LDFLAGS): Likewise.
7206
7207 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
7208 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
7209 (video_mod_SOURCES): Added.
7210 (video_mod_CFLAGS): Likewise.
7211 (video_mod_LDFLAGS): Likewise.
7212 (videotest_mod_SOURCES): Likewise.
7213 (videotest_mod_CFLAGS): Likewise.
7214 (videotest_mod_LDFLAGS): Likewise.
7215 (bitmap_mod_SOURCES): Likewise.
7216 (bitmap_mod_CFLAGS): Likewise.
7217 (bitmap_mod_LDFLAGS): Likewise.
7218 (tga_mod_SOURCES): Likewise.
7219 (tga_mod_CFLAGS): Likewise.
7220 (tga_mod_LDFLAGS): Likewise.
7221 (jpeg_mod_SOURCES): Likewise.
7222 (jpeg_mod_CFLAGS): Likewise.
7223 (jpeg_mod_LDFLAGS): Likewise.
7224 (png_mod_SOURCES): Likewise.
7225 (png_mod_CFLAGS): Likewise.
7226 (png_mod_LDFLAGS): Likewise.
7227 (gfxterm_mod_SOURCES): Likewise.
7228 (gfxterm_mod_CFLAGS): Likewise.
7795c55e 7229 (gfxterm_mod_LDFLAGS): Likewise.
7f02114b 7230
7231 * term/gfxterm.c: Removed include to grub/machine/memory.h,
7232 grub/machine/console.h.
7233
644fff97 72342009-01-04 Jerone Young <jerone@gmail.com>
7235
7236 Make on screen instructions clearer
7237
7238 Based on patch created by Jidanni <jidanni@jidanni.org>
7239
7240 * normal/menu.c: print clearer instructions on the screen
7241
1e901a75 72422009-01-02 Colin D Bennett <colin@gibibit.com>
7243
7244 New font engine.
34c44600 7245
1e901a75 7246 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
7247 build system and fixed gfxterm.c to work with different sized fonts.
7248
7249 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
34c44600 7250
1e901a75 7251 * configure: Re-generated.
34c44600 7252
1e901a75 7253 * DISTLIST: Removed font/manager.c.
7254 Added font/font.c.
7255 Added font/font_cmd.c.
34c44600 7256
1e901a75 7257 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
7258 compilation.
34c44600 7259
1e901a75 7260 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
34c44600 7261
7262 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
1e901a75 7263
7264 * kern/term.c: Changed users of grub_utf8_to_ucs4.
34c44600 7265
1e901a75 7266 * normal/menu.c: Likewise.
34c44600 7267
1e901a75 7268 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
7269 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
34c44600 7270
1e901a75 7271 * include/grub/font.h: Replaced with new file.
34c44600 7272
1e901a75 7273 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
7274 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
7275 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
7276 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
7277 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
34c44600 7278 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
1e901a75 7279 fg_red, fg_green, fg_blue, fg_alpha.
7280 (grub_video_adapter): Removed blit_glyph.
34c44600 7281 (grub_video_blit_glyph): Removed.
7282
1e901a75 7283 * font/manager.c: Removed file.
34c44600 7284
7285 * font/font.c: New file.
7286
1e901a75 7287 * font/font_cmd.c: Likewise.
34c44600 7288
1e901a75 7289 * video/video.c (grub_video_blit_glyph): Removed.
34c44600 7290
1e901a75 7291 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
7292 (grub_video_vbe_map_rgba): Likewise.
7293 (grub_video_vbe_unmap_color_int): Likewise.
7294 (grub_video_vbe_blit_glyph): Removed.
7295 (grub_video_vbe_adapter): Removed blit_glyph.
34c44600 7296
1e901a75 7297 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
7298 (get_pixel): Likewise.
34c44600 7299 (set_pixel): Likewise.
7300
1e901a75 7301 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
34c44600 7302
1e901a75 7303 * term/gfxterm.c: Adapted to new font engine.
34c44600 7304
1e901a75 7305 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
34c44600 7306
1e901a75 7307 * term/i386/pc/vga.c: Likewise.
34c44600 7308
1e901a75 7309 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
34c44600 7310
1e901a75 7311 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
34c44600 7312
1e901a75 7313 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 7314
1e901a75 7315 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 7316
1e901a75 7317 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
34c44600 7318
1e901a75 7319 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
34c44600 7320
1e901a75 7321 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
34c44600 7322
1e901a75 7323 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
34c44600 7324
1e901a75 7325 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
7326
7327 * util/grub.d/00_header.in: Changed to use new loadfont command.
34c44600 7328
1e901a75 7329 * util/grub-mkconfig_lib.in: Changed font extension.
7330
278922e8 73312008-12-28 Felix Zielcke <fzielcke@z-51.de>
7332
7333 * util/getroot.c (grub_util_get_grub_dev): Add support for
7334 /dev/md/dNNpNN style partitionable mdraid devices.
7335
3ced05cf 73362008-12-12 Alex Smith <alex@alex-smith.me.uk>
7337
7338 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
7339 at a time limit of the PXE TFTP API correctly.
7340 (grub_pxefs_close): Likewise.
7341
7fd0ee30 73422008-11-29 Robert Millan <rmh@aybabtu.com>
7343
34c44600 7344 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
7fd0ee30 7345 grub_ata_device_initialize() calls.
7346
34c44600 73472008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
0c5e79ab 7348
7349 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
7350 iteration failed.
7351 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
7352
89313780 73532008-11-28 Robert Millan <rmh@aybabtu.com>
7354
7355 Fix build on powerpc-ieee1275. Based on patch created by
7356 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
7357 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
7358 `kern/ieee1275/mmap.c'.
7359 * include/grub/powerpc/ieee1275/memory.h: New file.
7360
15257703 7361 Provide grub-install on coreboot.
7362 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
7363 (grub_install_SOURCES): New variable.
7364 * util/i386/pc/grub-install.in: Add a few condition checks to make it
7365 usable on coreboot.
7366
9fc5388a 73672008-11-25 Felix Zielcke <fzielcke@z-51.de>
7368
7369 * util/grub-fstest.c (grub_term_get_current_input): Change return type
7370 to `grub_term_input_t'.
7371 (grub_term_get_current_output): Change return type to
7372 `grub_term_output_t'.
7373
bc3a2f31 73742008-11-22 Robert Millan <rmh@aybabtu.com>
7375
34c44600 7376 Fix breakage on coreboot due to declaration mismatch.
bc3a2f31 7377 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
7378 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
7379 grub_vga_text_cls().
7380
80fc88f2 7381 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
34c44600 7382 comments. Avoid copying one more byte than necessary (just in case).
80fc88f2 7383
cbf36fd3 7384 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
7385 to 0x200000 (avoids trouble with some OFW implementations, and matches
7386 with the one in Yaboot).
7387 Reported by Manoel Abranches
7388
73e8e268 73892008-11-20 Robert Millan <rmh@aybabtu.com>
3cf6ac19 7390
7391 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
7392 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
7393
73e8e268 7394 * util/grub-mkconfig_lib.in (grub_warn): New function.
7395 (convert_system_path_to_grub_path): Use grub_warn() when issuing
7396 warnings, to obtain consistent formatting.
7397 * util/grub.d/00_header.in: Likewise.
7398 * util/update-grub_lib.in: Likewise.
7399
e94045a1 7400 * loader/i386/linux.c (allocate_pages): Fix a warning.
40f9faa4 7401 Move comment text to `#error' stanza.
e94045a1 7402
79d29fd7 7403 Harmonize ieee1275's grub_available_iterate() with the generic
7404 grub_machine_mmap_iterate() interface (fixes a recently-introduced
7405 build problem on i386-ieee1275):
7406 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
7407 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
7408 parameter `type'. Update all users of this function.
7409 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
7410 `kern/ieee1275/mmap.c'.
7411 * kern/ieee1275/init.c
7412 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
7413 with ...
7414 (grub_machine_mmap_iterate): ... this.
7415 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
7416 return type to `grub_err_t'. Update all implementations of this
7417 function prototype.
7418 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
7419 Likewise.
7420
60d6b16e 7421 Add `lsmmap' command (lists firmware-provided memory map):
7422 * commands/lsmmap.c: New file.
7423 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
7424 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
7425 variables.
7426 * conf/powerpc-ieee1275.rmk: Likewise.
7427 * conf/i386-coreboot.rmk: Likewise.
7428 * conf/i386-ieee1275.rmk: Likewise.
7429
ebaaf49b 74302008-11-19 Robert Millan <rmh@aybabtu.com>
7431
7432 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
92907110 7433 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
7434 constraints to initrd allocation (based on code from
7435 loader/i386/pc/linux.c). Without them, initrd was allocated too high
7436 for Linux to find it.
ebaaf49b 7437
dfab719f 74382008-11-14 Robert Millan <rmh@aybabtu.com>
7439
7440 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
7441 order to cope with duplicate slashes.
7442
10fc3eb9 74432008-11-14 Robert Millan <rmh@aybabtu.com>
7444
7445 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
7446 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
7447 don't want to mess with lower memory, because it is used in the Linux
7448 loader.
7449
7450 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
34c44600 7451 an appropriate place in lower memory, between 0x10000 and 0x90000,
10fc3eb9 7452 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
7453 is in our heap (probably as a result of it being corrupted during
2f2a3442 7454 decompression). Add #error instance with comment to explain why this
7455 loader isn't currently usable on PC/BIOS.
10fc3eb9 7456
e2e07847 74572008-11-14 Robert Millan <rmh@aybabtu.com>
7458
7459 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
34c44600 7460 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
e2e07847 7461
fe8e8d69 74622008-11-12 Robert Millan <rmh@aybabtu.com>
7463
7464 Make loader/i386/linux.c buildable on i386-pc (although disabled).
7465
7466 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
7467 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
7468 from here ...
7469 * include/grub/i386/pc/memory.h: ... to here.
7470
976b07d0 74712008-11-12 Robert Millan <rmh@aybabtu.com>
7472
7473 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
7474 split).
7475
7476 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
7477 (grub_console_cur_color, grub_console_real_putchar)
7478 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
7479 (grub_console_setcolorstate, grub_console_setcolor)
7480 (grub_console_getcolor): Move from here ...
7481 * include/grub/i386/vga_common.h: ... to here (new file).
7482
7483 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
7484 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
7485 `<grub/i386/io.h>'.
7486 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
7487 `<grub/i386/vga_common.h>'.
7488
76679cd3 74892008-11-12 Robert Millan <rmh@aybabtu.com>
7490
7491 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
7492 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
7493 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
7494 variables.
7495 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
7496 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
7497
7498 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
7499 grub_console_init() with call to grub_vga_text_init().
7500 (grub_machine_fini): Replace call to
7501 grub_console_fini() with call to grub_vga_text_fini() and
7502 grub_at_keyboard_fini().
7503
7504 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
7505 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
7506 (grub_console_setcolorstate, grub_console_setcolor)
7507 (grub_console_getcolor): New function prototypes.
7508
7509 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
7510 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
7511 (grub_vga_text_setcursor): Static-ize.
7512 (grub_vga_text_term): New structure.
7513 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
7514
7515 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
7516 (grub_console_cur_color, grub_console_standard_color)
7517 (grub_console_normal_color, grub_console_highlight_color)
7518 (map_char, grub_console_putchar, grub_console_getcharwidth)
7519 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
7520 (grub_console_getcolor): Move from here ...
7521 * term/i386/vga_common.c: ... to here (same function names).
7522
95b841d3 75232008-11-12 Robert Millan <rmh@aybabtu.com>
7524
7525 Use newly-added Multiboot support in coreboot.
7526
7527 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
7528 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
7529
7530 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
7531 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
7532 (codestart): Store the MBI in `startup_multiboot_info' when we're
7533 being loaded using Multiboot.
7534
7535 * kern/i386/coreboot/init.c (grub_machine_init): Move
7536 grub_at_keyboard_init() call to beginning of function (useful for
7537 debugging). Call grub_machine_mmap_init() before attempting to use
7538 grub_machine_mmap_iterate().
7539 (grub_lower_mem, grub_upper_mem): Move from here ...
7540 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
7541 here (new file).
7542
7543 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
7544 function prototype.
7545
761ca975 75462008-11-12 Robert Millan <rmh@aybabtu.com>
7547
7548 Fix a regression introduced by the at_keyboard.mod split. Because
7549 some terminals are default on some platforms and non-default on
7550 others, the first terminal being registered determines which is
7551 going to be default.
7552
7553 * kern/term.c (grub_term_register_input): If this is the first
7554 terminal being registered, set it as the current one.
7555 (grub_term_register_output): Likewise.
7556
7557 * term/efi/console.c (grub_console_init): Do not call
7558 grub_term_set_current_output() or grub_term_set_current_input().
7559 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
7560 * term/i386/pc/console.c (grub_console_init): Likewise.
7561 (grub_console_fini): Do not call grub_term_set_current_input()
7562 (but leave grub_term_set_current_output() to restore text mode).
7563
6c529df7 75642008-11-10 Robert Millan <rmh@aybabtu.com>
7565
7566 * util/grub.d/00_header.in: Add backward compatibility check for
7567 versions of terminal.mod that don't understand `terminal_input' or
7568 `terminal_output'.
7569
132e4113 75702008-11-09 Robert Millan <rmh@aybabtu.com>
7571
7572 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
7573 `terminal_input' / `terminal_output', not `terminal'.
7574
ac293d50 75752008-11-08 Robert Millan <rmh@aybabtu.com>
7576
7577 * Makefile.in (include_DATA): Fix srcdir=. assumption.
2a9c5940 7578 (DISTCLEANFILES): Add `build_env.mk'.
ac293d50 7579
0025933a 75802008-11-08 Robert Millan <rmh@aybabtu.com>
7581
7582 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
dba3f844 7583 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
0025933a 7584 members. Update all users.
7585 * util/console.c (grub_ncurses_term): Split in ...
7586 (grub_ncurses_term_input): ... this, and ...
7587 (grub_ncurses_term_output): ... this. Update all users.
dcb6fa0a 7588 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
0025933a 7589
37c86336 75902008-11-08 Robert Millan <rmh@aybabtu.com>
7591
7592 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
7593 (PKGDATA): Add $(pkgdata_SRCDIR).
7594 (pkglib_BUILDDIR): New variable.
7595 (pkgdata_SRCDIR): New variable.
7596 (build_env.mk): New target.
7597 (include_DATA): New variable.
7598 (install-local): Install $(include_DATA) files in $(includedir).
7599
b6c15a2d 76002008-11-07 Pavel Roskin <proski@gnu.org>
7601
d99d46f1 7602 * gendistlist.sh: Use C locale for sorting to ensure consistent
7603 output on all systems.
7604
b6c15a2d 7605 * util/grub.d/00_header.in: Remove incorrect space before
7606 "serial".
7607
c32ee8c9 76082008-11-07 Robert Millan <rmh@aybabtu.com>
7609
7610 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
7611 per specification.
7612 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
7613 * loader/multiboot_loader.c (find_multi_boot2_header): New function
7614 (based on find_multi_boot1_header).
7615 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
7616 using find_multi_boot2_header(), and abort if neither Multiboot or
7617 Multiboot headers were found.
7618
651c29b7 76192008-11-07 Robert Millan <rmh@aybabtu.com>
7620
7621 Modularize at_keyboard.mod:
7622
7623 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
7624 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
7625 (at_keyboard_mod_LDFLAGS): New variables.
7626
7627 Actual terminal split:
7628
7629 * include/grub/term.h (struct grub_term): Split in ...
7630 (struct grub_term_input): ... this, and ...
7631 (struct grub_term_output): ... this. Update all users.
7632 (grub_term_set_current): Split in ...
7633 (grub_term_set_current_input): ... this, and ...
7634 (grub_term_set_current_output): ... this.
7635 (grub_term_get_current): Split in ...
7636 (grub_term_get_current_input): ... this, and ...
7637 (grub_term_get_current_output): ... this.
7638 (grub_term_register): Split in ...
7639 (grub_term_register_input): ... this, and ...
7640 (grub_term_register_output): ... this.
7641 (grub_term_unregister): Split in ...
7642 (grub_term_unregister_input): ... this, and ...
7643 (grub_term_unregister_output): ... this.
7644 (grub_term_iterate): Split in ...
7645 (grub_term_iterate_input): ... this, and ...
7646 (grub_term_iterate_output): ... this.
7647
7648 * kern/term.c (grub_term_list): Split in ...
7649 (grub_term_list_input): ... this, and ...
7650 (grub_term_list_output): ... this. Update all users.
7651 (grub_cur_term): Split in ...
7652 (grub_cur_term_input): ... this, and ...
7653 (grub_cur_term_output): ... this. Update all users.
7654 (grub_term_set_current): Split in ...
7655 (grub_term_set_current_input): ... this, and ...
7656 (grub_term_set_current_output): ... this.
7657 (grub_term_get_current): Split in ...
7658 (grub_term_get_current_input): ... this, and ...
7659 (grub_term_get_current_output): ... this.
7660 (grub_term_register): Split in ...
7661 (grub_term_register_input): ... this, and ...
7662 (grub_term_register_output): ... this.
7663 (grub_term_unregister): Split in ...
7664 (grub_term_unregister_input): ... this, and ...
7665 (grub_term_unregister_output): ... this.
7666 (grub_term_iterate): Split in ...
7667 (grub_term_iterate_input): ... this, and ...
7668 (grub_term_iterate_output): ... this.
7669
7670 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
7671 a check for input and one for output (and only attempt to get keys
7672 from user when input works).
7673
7674 * util/grub-probe.c (grub_term_get_current): Split in ...
7675 (grub_term_get_current_input): ... this, and ...
7676 (grub_term_get_current_output): ... this.
7677 * util/grub-fstest.c: Likewise.
7678 * util/i386/pc/grub-setup.c: Likewise.
7679 * util/grub-editenv.c: Likewise.
7680
7681 Portability adjustments:
7682
7683 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
7684 `term/i386/pc/at_keyboard.c'.
7685 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
7686 grub_keyboard_controller_init() (now handled by terminal .init).
7687 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
7688 grub_at_keyboard_init().
7689 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
7690 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
7691 at_keyboard.mod via input terminal interface).
7692 * include/grub/i386/coreboot/console.h: Convert into a stub for
7693 `<grub/i386/pc/console.h>'.
7694
7695 Migrate full terminals to new API:
7696
7697 * term/efi/console.c (grub_console_term): Split into ...
7698 (grub_console_term_input): ... this, and ...
7699 (grub_console_term_output): ... this. Update all users.
7700 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
7701 (grub_ofconsole_init): Split into ...
7702 (grub_ofconsole_init_input): ... this, and ...
7703 (grub_ofconsole_init_output): ... this.
7704 (grub_ofconsole_term): Split into ...
7705 (grub_ofconsole_term_input): ... this, and ...
7706 (grub_ofconsole_term_output): ... this. Update all users.
7707 * term/i386/pc/serial.c (grub_serial_term): Split into ...
7708 (grub_serial_term_input): ... this, and ...
7709 (grub_serial_term_output): ... this. Update all users.
7710 * term/i386/pc/console.c (grub_console_term): Split into ...
7711 (grub_console_term_input): ... this, and ...
7712 (grub_console_term_output): ... this. Update all users.
7713 (grub_console_term_input): Only enable it on PC/BIOS platform.
7714 (grub_console_init): Remove grub_keyboard_controller_init() call.
7715
7716 Migrate input terminals to new API:
7717
7718 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
7719 `i386' and `i386/pc' to enable build on x86_64 (this driver is
7720 i386-specific anyway).
7721 (grub_console_checkkey): Rename to ...
7722 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
7723 users.
7724 (grub_keyboard_controller_orig): New variable.
7725 (grub_console_getkey): Rename to ...
7726 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
7727 users.
7728 (grub_keyboard_controller_init): Static-ize. Save original
7729 controller value so that it can be restored ...
7730 (grub_keyboard_controller_fini): ... here (new function).
7731 (grub_at_keyboard_term): New structure.
7732 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
7733 functions.
7734
7735 Migrate output terminals to new API:
7736
7737 * term/i386/pc/vga.c (grub_vga_term): Change type to
7738 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
7739 members. Update all users.
7740 * term/gfxterm.c (grub_video_term): Change type to
7741 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
7742 members. Update all users.
7743 * include/grub/i386/pc/console.h (grub_console_checkkey)
7744 (grub_console_getkey): Do not export (no longer needed by gfxterm,
7745 etc).
7746
7747 Migrate `terminal' command and userland tools to new API:
7748
7749 * commands/terminal.c (grub_cmd_terminal): Split into ...
7750 (grub_cmd_terminal_input): ... this, and ...
7751 (grub_cmd_terminal_output): ... this.
7752 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
7753 `terminal_input' and `terminal_output'.
7754 * util/grub.d/00_header.in: Adjust `terminal' calls to new
7755 `terminal_input' / `terminal_output' API.
7756 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
7757 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
7758 provided ${GRUB_TERMINAL}, convert it).
7759
96e5d876 77602008-11-04 Robert Millan <rmh@aybabtu.com>
7761
7762 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
7763 for FreeBSD.
7764 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
7765
556f3775 77662008-11-03 Bean <bean123ch@gmail.com>
7767
7768 * kern/elf.c (grub_elf32_load): Revert to previous code.
7769 (grub_elf64_load): Likewise.
7770
7771 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
7772
926b9823 77732008-11-01 Robert Millan <rmh@aybabtu.com>
7774
7775 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
7776 (TARGET_CPPFLAGS): Likewise.
7777 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
7778
1432e958 77792008-11-01 Carles Pina i Estany <carles@pina.cat>
7780
7781 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
7782
dba3f844 77832008-10-29 Guillem Jover <guillem.jover@nokia.com>
de4fa71c 7784
7785 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
7786 addition of objects until the code is not going to be able to fail.
7787
dba3f844 77882008-10-29 Guillem Jover <guillem.jover@nokia.com>
b7279447 7789
7790 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
7791 (add a missing NULL check, and correct them by moving the pointer
7792 operations after the actual check).
7793
7ab28c21 77942008-10-29 Robert Millan <rmh@aybabtu.com>
7795
7796 * util/i386/pc/grub-install.in: Handle empty string as output from
7797 make_system_path_relative_to_its_root().
7798
1b7748eb 77992008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
7800
7801 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
7802 circular metadata worst case scenario. If the metadata is circular
7803 then copy the wrap in place.
7804 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
7805 project lib/format_text/layout.h
7806 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
7807
c9618ab2 78082008-10-03 Felix Zielcke <fzielcke@z-51.de>
7809
7a36edca 7810 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
c9618ab2 7811
bf981c62 78122008-10-03 Felix Zielcke <fzielcke@z-51.de>
7813
7814 * util/update-grub_lib.in: Mention filename in warning message.
7815
6d994591 78162008-09-29 Felix Zielcke <fzielcke@z-51.de>
7817
7818 * NEWS: Update for rename of update-grub to grub-mkconfig.
7819
18ade780 78202008-09-29 Felix Zielcke <fzielcke@z-51.de>
7821
7822 * util/update-grub_lib.in: Copy to ...
7823 * util/grub-mkconfig_lib.in: ... this. Update all users.
7c3ff286 7824 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
18ade780 7825 * util/update-grub.in: Rename to ...
7826 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
7827 option. Add `--output' option to allow users to specify the generated
7828 configuration file. Default to stdout.
7829 (update_grub_dir): Rename to ...
7830 (grub_mkconfig_dir): ... this.
7831 (grub_cfg): Default to an empty string.
7832 * conf/common.rmk (update-grub): Rename to ...
7833 (grub-mkconfig): ... this.
7834 (update-grub_lib): Copy to ...
7835 (grub-mkconfig_lib): ... this.
7836 (update-grub_SCRIPTS): Copy to ...
7837 (grub-mkconfig_SCRIPTS): ... this. Update all users.
7838 (update-grub_DATA): Rename to ...
7839 (grub-mkconfig_DATA): ... this.
7840
556ce6ac 78412008-09-28 Robert Millan <rmh@aybabtu.com>
7842
7843 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
7844 to `modified'. Add the real `created' field.
7845 (grub_iso9660_uuid): Use `modified' rather than `created' for
7846 constructing the UUID.
7847
78482008-09-28 Felix Zielcke <fzielcke@z-51.de>
eb079ba9 7849
7850 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
7851 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
7852
92274e85 78532008-09-28 Bean <bean123ch@gmail.com>
7854
7855 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
7856 Thanks to Christian Franke for finding this bug.
7857
add6f17a 78582008-09-25 Robert Millan <rmh@aybabtu.com>
7859
7860 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
7861 instances of grub_util_get_disk_name() (see previous commit).
7862
d2a367b8 78632008-09-25 Robert Millan <rmh@aybabtu.com>
7864
7865 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
7866 `util/i386/get_disk_name.c'.
7867 * conf/i386-efi.rmk: Likewise.
7868 * conf/x86_64-efi.rmk: Likewise.
7869 * conf/i386-coreboot.rmk: Likewise.
7870 * conf/i386-ieee1275.rmk: Likewise.
7871 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
7872 `util/ieee1275/get_disk_name.c'.
7873 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
7874 * util/ieee1275/get_disk_name.c: Remove file.
7875 * util/i386/get_disk_name.c: Remove file.
7876 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
7877 "hd%d" for device.map entries, rather than using
7878 grub_util_get_disk_name().
7879
81a06771 78802008-09-24 Carles Pina i Estany <carles@pina.cat>
b0c301f7 7881
7882 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
7883 warning.
7884 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
7885
5a004279 78862008-09-24 Carles Pina i Estany <carles@pina.cat>
7887
7888 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
7889 Changed to 0x5100.
7890 (GRUB_TERM_PPAGE): Changed to 0x4900.
7891
397093d3 78922008-09-24 Robert Millan <rmh@aybabtu.com>
7893
7894 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
7895 macros (they were i386-pc specific).
7896 * include/grub/sparc64/ieee1275/console.h: Likewise.
7897 * include/grub/efi/console.h: Likewise.
7898
a91b6c7c 78992008-09-22 Bean <bean123ch@gmail.com>
7900
7901 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
7902 resident and in attribute list.
7903
7904 * include/grub/ntfs.h (BMP_LEN): Removed.
7905
c40fd116 79062008-09-22 Bean <bean123ch@gmail.com>
7907
81a06771 7908 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
c40fd116 7909 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
7910
7911 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
7912 error occurs, as grub_disk_open will call grub_disk_close, which will
7913 call p->close (scsi).
7914
81a06771 79152008-09-21 Felix Zielcke <fzielcke@z-51.de>
eb73121d 7916
7917 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
7918 (AC_PREREQ): Bumped to 2.59.
7919 (AC_TRY_COMPILE): Replace obsolete macro with ...
7920 (AC_COMPILE_IFELSE): ... this.
7921 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
7922 (AC_LINK_IFELSE): ... this.
7923
5dc43410 79242008-09-21 Felix Zielcke <fzielcke@z-51.de>
7925
7926 * autogen.sh: Add a call to `gendistlist.sh'.
7927
9035dce4 79282008-09-19 Christian Franke <franke@computer.org>
7929
7930 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
7931 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
7932 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
7933 Export __enable_execute_stack() to modules.
7934 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
7935 New function.
7936
7fd75377 79372008-09-09 Felix Zielcke <fzielcke@z-51.de>
7938
040030b3 7939 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
7940 Sort the list.
7941
79422008-09-09 Felix Zielcke <fzielcke@z-51.de>
7943
7944 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
7fd75377 7945 #include <grub/util/hostdisk.h>.
7946
89d5ffcf 79472008-09-08 Robert Millan <rmh@aybabtu.com>
7948
7949 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
7950 segments when their filesz is zero (grub_file_read() interprets
81a06771 7951 zero-size as "read until EOF", which results in memory corruption).
89d5ffcf 7952 Use `lowest_segment' rather than 0 for calculating the current
7953 segment load address.
7954
40da438f 79552008-09-08 Robert Millan <rmh@aybabtu.com>
7956
7957 * util/hostdisk.c (open_device): Replace a grub_util_info() call
7958 with grub_dprintf("hostdisk", ...), as it was so verbose that it
7959 clobbered useful information.
7960
ddbf5556 79612008-09-08 Robert Millan <rmh@aybabtu.com>
7962
7963 * include/grub/util/biosdisk.h: Move to ...
7964 * include/grub/util/hostdisk.h: ... here. Update all users.
7965 * util/biosdisk.c: Move to ...
7966 * util/hostdisk.c: ... here. Update all users.
7967
783d0f48 79682008-09-07 Robert Millan <rmh@aybabtu.com>
7969
7970 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
7971 variables.
7972 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
7973 and length can be stored directly in the `mbi->mmap_addr' and
7974 `mbi->mmap_length' struct fields.
7975
548e2ea5 79762008-09-07 Robert Millan <rmh@aybabtu.com>
7977
7978 * conf/i386.rmk: New file. Provides declaration for building
7979 `cpuid.mod'.
7980 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
7981 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
7982 variables.
7983 Include `conf/i386.mk'.
7984 * conf/i386-efi.rmk: Likewise.
7985 * conf/x86_64-efi.rmk: Likewise.
7986 * conf/i386-coreboot.rmk: Likewise.
7987 * conf/i386-ieee1275.rmk: Likewise.
7988
0ea85a37 79892008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
7990
7991 Based on patch created by Colin D Bennett <colin@gibibit.com>.
7992 Adds optimization support for BGR based modes.
7993
7994 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
7995 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
7996 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
7997 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
7998 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
7999 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
8000 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
8001 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
8002 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
8003 (grub_video_i386_vbeblit_index_index): Likewise.
8004 (grub_video_i386_vbeblit_replace_directN): Added.
8005 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
8006 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
8007 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
8008 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
8009 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
8010 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
81a06771 8011 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
0ea85a37 8012 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
8013 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
8014 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
8015 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
8016 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
8017 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
8018
8019 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
8020 (grub_video_i386_vbefill_R8G8B8): Likewise.
8021 (grub_video_i386_vbefill_index): Likewise.
8022 (grub_video_i386_vbefill_direct32): Added.
8023 (grub_video_i386_vbefill_direct24): Likewise.
8024 (grub_video_i386_vbefill_direct16): Likewise.
8025 (grub_video_i386_vbefill_direct8): Likewise.
8026
81a06771 8027 * include/grub/video.h (grub_video_blit_format): Removed
0ea85a37 8028 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
8029 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
8030 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
8031 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
8032 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
81a06771 8033
0ea85a37 8034 * video/video.c (grub_video_get_blit_format): Updated to use new
8035 blit formats. Added handling for 16 bit color modes.
81a06771 8036
8037 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
0ea85a37 8038 fillers.
8039 (common_blitter): Updated to use new blitters.
8040
8041 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
8042 Removed.
8043 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
8044 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
8045 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
8046 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
8047 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
8048 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
8049 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
8050 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
8051 (grub_video_i386_vbeblit_index_index): Likewise.
8052 (grub_video_i386_vbeblit_replace_directN): Added.
8053 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
8054 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
8055 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
8056 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
8057 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
8058 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
8059 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
8060 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
8061 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
8062 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
8063 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
8064 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
8065 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
81a06771 8066
0ea85a37 8067 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
8068 (grub_video_i386_vbefill_R8G8B8): Likewise.
8069 (grub_video_i386_vbefill_index): Likewise.
8070 (grub_video_i386_vbefill_direct32): Added.
8071 (grub_video_i386_vbefill_direct24): Likewise.
8072 (grub_video_i386_vbefill_direct16): Likewise.
8073 (grub_video_i386_vbefill_direct8): Likewise.
81a06771 8074
0ea85a37 8075 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
8076 types.
81a06771 8077
0ea85a37 8078 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
8079 types.
81a06771 8080
0ea85a37 8081 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
8082 blitter types.
81a06771 8083
0ea85a37 8084 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
8085 types.
8086
e8a83df6 80872008-09-06 Felix Zielcke <fzielcke@z-51.de>
8088
8089 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
8090 RAID level 1.
8091
6bcd8ee5 80922008-09-06 Felix Zielcke <fzielcke@z-51.de>
c375ae58 8093
6bcd8ee5 8094 * fs/iso9660.c (grub_iso9660_date): New structure.
8095 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
8096 (grub_iso9660_uuid): New function.
c375ae58 8097
59261157 80982008-09-05 Bean <bean123ch@gmail.com>
8099
8100 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
8101
8102 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
8103 insensitive bit for names in Win32 and Win32 & DOS namespace.
8104
8105 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
8106
8107 * include/grub/types.h (LONG_MAX): Likewise.
8108
58b6645a 81092008-09-04 Felix Zielcke <fzielcke@z-51.de>
8110
4ee55921 8111 * util/getroot.c: Include <config.h>.
8112 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
8113 add support for /dev/md/N devices and handle LVM double dash escaping.
8114
81152008-09-04 Felix Zielcke <fzielcke@z-51.de>
8116
8117 * config.guess: Update to latest version from config git.
8118 * config.sub: Likewise.
58b6645a 8119
9124f65d 81202008-09-03 Robert Millan <rmh@aybabtu.com>
8121
8122 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
8123 `disk->total_sectors'.
8124
81a06771 81252008-09-01 Colin D Bennett <colin@gibibit.com>
a0224a4e 8126
8127 * include/grub/normal.h: Fixed incorrect comment for
8128 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
8129
81a06771 81302008-09-01 Colin D Bennett <colin@gibibit.com>
f0619958 8131
8132 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
8133 values with defines.
8134
8135 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
8136 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
8137 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
8138 (GRUB_VBE_MODEATTR_COLOR): Likewise.
8139 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
8140 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
8141 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
8142 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
8143 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
8144 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
8145 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
8146 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
8147 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
8148 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
8149 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
8150 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
8151 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
8152 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
8153 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
8154
93d5cbf8 81552008-08-31 Robert Millan <rmh@aybabtu.com>
8156
8157 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
8158 declaration.
8159 (grub_multiboot): Fix a few warnings.
8160
21751d50 81612008-08-31 Robert Millan <rmh@aybabtu.com>
8162
8163 * loader/i386/pc/multiboot.c: Update comment not to say that
8164 boot_device support is unimplemented.
8165
e27a75c5 81662008-08-31 Robert Millan <rmh@aybabtu.com>
8167
8168 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
8169 or memory map support are unimplemented.
8170
81a06771 81712008-08-31 Colin D Bennett <colin@gibibit.com>
64d2d53c 8172
8173 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
8174
81a06771 81752008-08-31 Colin D Bennett <colin@gibibit.com>
c08a6c18 8176
8177 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
8178 total video memory in 'vbeinfo' output; show color format details for
8179 each video mode.
8180
7c5d8d95 81812008-08-30 Pavel Roskin <proski@gnu.org>
8182
8183 * util/genmoddep.c: Remove for real this time.
8184 * DISTLIST: Remove util/genmoddep.c.
8185
4cebd25a 81862008-08-30 Robert Millan <rmh@aybabtu.com>
8187
8188 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
8189 as required by Multiboot spec (it was already 4-byte aligned, but
8190 only by chance).
8191
b497a269 81922008-08-29 Pavel Roskin <proski@gnu.org>
8193
e3925185 8194 * kern/powerpc/ieee1275/crt0.S: Rename to ...
8195 * kern/powerpc/ieee1275/startup.S: ... this.
8196 * conf/powerpc-ieee1275.rmk: Adjust for the above.
8197 * DISTLIST: Likewise.
8198
b497a269 8199 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
8200 grub/cpu/kernel.h. Add start label for consistency with other
8201 platforms. Add grub_prefix immediately after start. Add jump
8202 to the code after grub_prefix.
8203 * include/grub/powerpc/kernel.h: Provide valid values for
8204 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
8205
6e5a42fe 82062008-08-29 Bean <bean123ch@gmail.com>
8207
8208 * configure.ac: Change host_os to cygwin for mingw.
8209 (asprintf): New check for function.
8210
8211 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
8212 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
8213
8214 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
81a06771 8215 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
6e5a42fe 8216 sync, sleep and grub_util_get_disk_size for mingw.
8217
8218 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
8219 to get size in mingw.
8220 (open_device): Use flag O_BINARY if it's defined.
8221 (find_root_device): Add dummy code for mingw.
8222
8223 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
8224 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
8225 (get_scsi_disk_name): Return 0 for mingw.
8226
8227 * util/hostfs.c: #include <grub/util/misc.h>.
8228 (grub_hostfs_open): Use "rb" flag to open file, use
8229 grub_util_get_disk_size to get disk size for mingw.
8230
8231 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
8232 (asprintf): New function if HAVE_ASPRINTF is not set.
8233 (sync): New function for mingw.
8234 (sleep): Likewise.
8235 (grub_util_get_disk_size): Likewise.
8236
ab3f2673 82372008-08-28 Pavel Roskin <proski@gnu.org>
8238
8239 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
8240 kern/time.c.
8241
1c282483 82422008-08-28 Robert Millan <rmh@aybabtu.com>
8243
8244 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
8245
678e849c 82462008-08-28 Robert Millan <rmh@aybabtu.com>
8247
8248 Change find_grub_drive() syntax so it doesn't prevent it from
8249 detecting NULL names as errors.
8250
8251 * util/biosdisk.c (find_grub_drive): Move free slot search code
8252 from here ...
8253 (find_free_slot): ... to here.
8254 (read_device_map): Use find_free_slot() to search for free slots.
8255
965c75ca 82562008-08-27 Marco Gerards <marco@gnu.org>
8257
8258 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
8259 (scsi_mod_SOURCES): New variable.
8260 (scsi_mod_CFLAGS): Likewise
8261 (scsi_mod_LDFLAGS): Likewise.
8262
8263 * disk/scsi.c: New file.
8264
8265 * include/grub/scsi.h: Likewise.
8266
8267 * include/grub/scsicmd.h: Likewise.
8268
8269 * disk/ata.c: Include <grub/scsi.h>.
8270 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
8271 instead.
8272 (grub_ata_iterate): Skip ATAPI devices.
8273 (grub_ata_open): Only handle ATAPI devices.
8274 (struct grub_atapi_read): Removed.
8275 (grub_atapi_readsector): Likewise.
8276 (grub_ata_read): No longer handle ATAPI devices.
8277 (grub_ata_write): Likewise.
8278 (grub_atapi_iterate): New function.
8279 (grub_atapi_read): Likewise.
8280 (grub_atapi_write): Likewise.
8281 (grub_atapi_open): Likewise.
8282 (grub_atapi_close): Likewise.
8283 (grub_atapi_dev): New variable.
8284 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
8285 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
8286
8287 * include/grub/disk.h (enum grub_disk_dev_id): Add
8288 `GRUB_DISK_DEVICE_SCSI_ID'.
8289
c07ae501 82902008-08-26 Robert Millan <rmh@aybabtu.com>
8291
8292 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
8293 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
8294 descriptive.
8295
5ed20adc 82962008-08-23 Bean <bean123ch@gmail.com>
8297
8298 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
8299 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
8300 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
8301 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
8302 dm_nv.mod.
8303 (raid5rec_mod_SOURCES): New macro.
8304 (raid5rec_mod_CFLAGS): Likewise.
8305 (raid5rec_mod_LDFLAGS): Likewise.
8306 (raid6rec_mod_SOURCES): Likewise.
8307 (raid6rec_mod_CFLAGS): Likewise.
8308 (raid6rec_mod_LDFLAGS): Likewise.
8309 (mdraid_mod_SOURCES): Likewise.
8310 (mdraid_mod_CFLAGS): Likewise.
8311 (mdraid_mod_LDFLAGS): Likewise.
8312 (dm_nv_mod_SOURCES): Likewise.
8313 (dm_nv_mod_CFLAGS): Likewise.
8314 (dm_nv_mod_LDFLAGS): Likewise.
8315
8316 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
8317 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
8318 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
8319
8320 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
8321 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
8322
8323 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8324
8325 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
8326
8327 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8328
8329 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8330
8331 * disk/raid5_recover.c: New file.
8332
8333 * disk/raid6_recover.c: Likewise.
8334
8335 * disk/mdraid_linux.c: Likewise.
8336
8337 * disk/dmraid_nvidia.c: Likewise.
8338
8339 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
8340 ULONG_MAX.
8341
8342 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
8343 calculate the size of raid device.
8344 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
8345 different layout of raid5.
8346 (grub_raid_scan_device): Remove code specific to mdraid.
8347 (grub_raid_list): New variable.
8348 (free_array): New function.
8349 (grub_raid_register): Likewise.
8350 (grub_raid_unregister): Likewise.
8351 (grub_raid_rescan): Likewise.
8352 (GRUB_MOD_INIT): Don't iterate device here.
8353 (GRUB_MOD_FINI): Use free_array to release resource.
8354
8355 * include/grub/raid.h: Remove macro and structure specific to mdraid.
8356 (grub_raid5_recover_func_t): New function variable type.
8357 (grub_raid6_recover_func_t): Likewise.
8358 (grub_raid5_recover_func): New variable.
8359 (grub_raid6_recover_func): Likewise.
8360 (grub_raid_register): New function.
8361 (grub_raid_unregister): Likewise.
8362 (grub_raid_rescan): Likewise.
8363 (grub_raid_block_xor): Likewise.
8364
8365 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
8366 (CMD_CRC): New macro.
8367 (part): Removed.
8368 (read_file): Handle device as well as file.
8369 (cmd_crc): New function.
8370 (fstest): Handle multiple disks.
8371 (options): Remove part, raw and long, add root and diskcount.
8372 (usage): Add crc, remove -p, -r, -l, add -r and -c.
dba3f844 8373 (main): Find the first non option entry and ignore subsequent options,
5ed20adc 8374 add handling for the new options, support multiple disks.
8375
8376 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
8377
29c18915 83782008-08-23 Bean <bean123ch@gmail.com>
8379
8380 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
8381
8382 * genfslist.sh: Ignore kernel.mod.
8383
8384 * genpartmaplist.sh: Likewise.
8385
8415f261 83862008-08-23 Robert Millan <rmh@aybabtu.com>
8387
8388 * util/getroot.c (find_root_device): Skip anything that starts with
8389 a dot, not just directories. This avoids things like /dev/.tmp.md0.
8390
d5a7dc5b 83912008-08-22 Felix Zielcke <fzielcke@z-51.de>
81a06771 8392
d5a7dc5b 8393 * util/update-grub.in (GRUB_GFXMODE): Export variable.
8394 * util/grub.d/00_header.in: Allow the administrator to change default
8395 gfxmode via ${GRUB_GFXMODE}.
8396
380cfbb4 83972008-08-21 Felix Zielcke <fzielcke@z-51.de>
8398
8399 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
8400
c9baafe7 84012008-08-21 Robert Millan <rmh@aybabtu.com>
8402
8403 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
8404 loader.
8405 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
8406 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
8407
e290bef2 84082008-08-20 Carles Pina i Estany <carles@pina.cat>
8409
8410 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
8411 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
8412
f9dbfc96 84132008-08-19 Robert Millan <rmh@aybabtu.com>
8414
8415 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
8416 (struct grub_virtual_screen): Remove `cursor_color'.
8417 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
8418 initialization.
8419 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
8420
dd6bd6ab 84212008-08-18 Robert Millan <rmh@aybabtu.com>
8422
8423 Unify (identical) linux_normal.c files.
8424 * loader/i386/efi/linux_normal.c: Move from here ...
8425 * loader/linux_normal.c: ... to here. Update all users.
8426 * loader/i386/pc/linux_normal.c: Delete. Update all users.
8427 * loader/i386/ieee1275/linux_normal.c: Likewise.
8428
7f42f83e 84292008-08-18 Robert Millan <rmh@aybabtu.com>
8430
8431 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
8432 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
8433 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
8434 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
8435 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
8436 New macros.
8437 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
8438 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
8439 (GRUB_LINUX_CL_END_OFFSET): ... to here.
8440 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
8441 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
8442 (GRUB_EFI_CL_END_OFFSET): Rename to ...
8443 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
8444 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
8445 Initialize `params->video_cursor_x' and `params->video_cursor_y'
8446 portably using grub_getxy().
8447 Replace `-EFI' with `-bzImage' in boot message.
8448
38487ddb 84492008-08-17 Robert Millan <rmh@aybabtu.com>
8450
8451 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
8452
deceb3ec 84532008-08-17 Robert Millan <rmh@aybabtu.com>
8454
8455 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
8456
8457 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
8458 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
8459 (grub_machine_mmap_iterate): New function declaration.
8460 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
8461 structure.
8462 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
8463 macros.
8464
8465 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
8466 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
8467 Move e820 parsing from here ...
8468 * kern/i386/pc/mmap.c: New file.
8469 (grub_machine_mmap_iterate): ... to here.
8470
8471 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
8472 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
8473 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
8474 (grub_available_iterate): Redeclare to return `void', and redeclare
8475 its hook to use grub_uint64_t as addr and size parameters, and rename
8476 to ...
8477 (grub_machine_mmap_iterate): ... this. Update all users.
8478
8479 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
8480 to make it more readable. Rename to ...
8481 (grub_machine_mmap_iterate): ... this.
8482
8483 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
8484 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
8485 (grub_multiboot): Allocate an extra region after the payload, and fill
8486 it with a Multiboot memory map. Adjust a.out loader to calculate size
8487 with the extra space.
8488 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
8489 with the extra space.
8490
f8aa0f43 84912008-08-17 Carles Pina i Estany <carles@pina.cat>
8492
9807deb9 8493 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
f8aa0f43 8494
605f5bb6 84952008-08-17 Felix Zielcke <fzielcke@z-51.de>
8496
8497 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
8498 mdate-sh to the list `find' searches for.
8499 * DISTLIST: Regenerated.
8500
210db6c6 85012008-08-16 Felix Zielcke <fzielcke@z-51.de>
8502
8503 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
8504 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
48cdbfd4 8505 genmoddep.awk, gensymlist.sh.in.
8506 (DISTDIRS): Add bus, docs, hook, lib.
210db6c6 8507 * DISTLIST: Regenerated.
48cdbfd4 8508 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
210db6c6 8509
1082b929 85102008-08-16 Robert Millan <rmh@aybabtu.com>
8511
8512 * disk/raid.c (grub_raid_init): Handle/report errors set by
8513 grub_device_iterate().
8514 * disk/lvm.c (grub_lvm_init): Likewise.
8515
42ce5170 85162008-08-15 Bean <bean123ch@gmail.com>
8517
8518 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
8519 and datehook.mod.
8520 (datetime_mod_SOURCES): New macro.
8521 (datetime_mod_CFLAGS): Likewise.
8522 (datetime_mod_LDFLAGS): Likewise.
8523 (date_mod_SOURCES): Likewise.
8524 (date_mod_CFLAGS): Likewise.
8525 (date_mod_LDFLAGS): Likewise.
8526 (datehook_mod_SOURCES): Likewise.
8527 (datehook_mod_CFLAGS): Likewise.
8528 (datehook_mod_LDFLAGS): Likewise.
8529
8530 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
8531 and datehook.mod.
8532 (datetime_mod_SOURCES): New macro.
8533 (datetime_mod_CFLAGS): Likewise.
8534 (datetime_mod_LDFLAGS): Likewise.
8535 (date_mod_SOURCES): Likewise.
8536 (date_mod_CFLAGS): Likewise.
8537 (date_mod_LDFLAGS): Likewise.
8538 (datehook_mod_SOURCES): Likewise.
8539 (datehook_mod_CFLAGS): Likewise.
8540 (datehook_mod_LDFLAGS): Likewise.
8541
8542 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
8543 and datehook.mod.
8544 (datetime_mod_SOURCES): New macro.
8545 (datetime_mod_CFLAGS): Likewise.
8546 (datetime_mod_LDFLAGS): Likewise.
8547 (date_mod_SOURCES): Likewise.
8548 (date_mod_CFLAGS): Likewise.
8549 (date_mod_LDFLAGS): Likewise.
8550 (datehook_mod_SOURCES): Likewise.
8551 (datehook_mod_CFLAGS): Likewise.
8552 (datehook_mod_LDFLAGS): Likewise.
8553
8554 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
8555 and datehook.mod.
8556 (datetime_mod_SOURCES): New macro.
8557 (datetime_mod_CFLAGS): Likewise.
8558 (datetime_mod_LDFLAGS): Likewise.
8559 (date_mod_SOURCES): Likewise.
8560 (date_mod_CFLAGS): Likewise.
8561 (date_mod_LDFLAGS): Likewise.
8562 (datehook_mod_SOURCES): Likewise.
8563 (datehook_mod_CFLAGS): Likewise.
8564 (datehook_mod_LDFLAGS): Likewise.
8565
8566 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
8567 and datehook.mod.
8568 (datetime_mod_SOURCES): New macro.
8569 (datetime_mod_CFLAGS): Likewise.
8570 (datetime_mod_LDFLAGS): Likewise.
8571 (date_mod_SOURCES): Likewise.
8572 (date_mod_CFLAGS): Likewise.
8573 (date_mod_LDFLAGS): Likewise.
8574 (datehook_mod_SOURCES): Likewise.
8575 (datehook_mod_CFLAGS): Likewise.
8576 (datehook_mod_LDFLAGS): Likewise.
8577
8578 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
8579
8580 * commands/date.c: New file.
8581
8582 * hook/datehook.c: Likewise.
8583
8584 * include/grub/lib/datetime.h: Likewise.
8585
8586 * include/grub/i386/cmos.h: Likewise.
8587
8588 * lib/datetime.c: Likewise.
8589
8590 * lib/i386/datetime.c: Likewise.
8591
8592 * lib/efi/datetime.c: Likewise.
8593
0e9242da 85942008-08-14 Robert Millan <rmh@aybabtu.com>
8595
8596 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
8597 (grub_mkelfimage_SOURCES): New variable.
8598 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
8599
8600 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
8601 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
8602 * conf/powerpc-ieee1275.rmk: Likewise.
8603 * conf/i386-ieee1275.rmk: Likewise.
8604
8605 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
8606 * kern/i386/coreboot/init.c: Likewise.
8607
8608 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
8609 with `<grub/cpu/kernel.h>'.
8610 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
8611 to ...
8612 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
8613 * kern/i386/coreboot/startup.S: Likewise.
8614
8615 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
8616 (GRUB_MOD_GAP): Remove.
8617 * include/grub/powerpc/kernel.h: New file.
8618 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
8619 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
8620 * include/grub/i386/kernel.h: New file.
8621 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
8622 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
8623 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
8624
8625 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
8626 `grub-mkelfimage'.
8627 Use --directory when invoking grub_mkimage.
8628
8629 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
8630 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
8631 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
8632 and GRUB_KERNEL_CPU_PREFIX.
8633
b86408f8 86342008-08-14 Felix Zielcke <fzielcke@z-51.de>
8635
d5e619ca 8636 * include/grub/err.h (grub_err_printf): New function prototype.
8637 * util/misc.c (grub_err_printf): New function.
8638 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
8639 grub_printf.
8640 * kern/err.c (grub_print_error): Use grub_err_printf.
b86408f8 8641
7161f0e0 86422008-08-13 Robert Millan <rmh@aybabtu.com>
8643
8644 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
8645
a1967522 86462008-08-13 Robert Millan <rmh@aybabtu.com>
8647
8648 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
8649 boot entry.
8650
371458b5 86512008-08-12 Robert Millan <rmh@aybabtu.com>
8652
8653 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
8654 of the relocation code from here ...
8655 (grub_multiboot): ... to here.
8656 (forward_relocator, backward_relocator): Move from here ...
8657 * kern/i386/loader.S (grub_multiboot_forward_relocator)
8658 (grub_multiboot_backward_relocator): ... to here.
8659 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
8660 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
8661 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
8662 (grub_multiboot_forward_relocator_end)
8663 (grub_multiboot_backward_relocator)
8664 (grub_multiboot_backward_relocator_end): New variables.
8665
05f9452b 86662008-08-12 Bean <bean123ch@gmail.com>
8667
8668 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
8669
20024ab0 86702008-08-11 Robert Millan <rmh@aybabtu.com>
8671
8672 * kern/i386/linuxbios/startup.S: Move from here ...
8673 * kern/i386/coreboot/startup.S: ... to here.
8674
8675 * kern/i386/linuxbios/init.c: Move from here ...
8676 * kern/i386/coreboot/init.c: ... to here.
8677
8678 * kern/i386/linuxbios/table.c: Move from here ...
8679 * kern/i386/coreboot/mmap.c: ... to here.
8680
8681 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
8682
e352e9cd 86832008-08-11 Robert Millan <rmh@aybabtu.com>
8684
8685 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
8686 errors. Leave it to the upper layer to handle them.
8687
2d05bc6a 86882008-08-09 Christian Franke <franke@computer.org>
8689
8690 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
8691 * conf/common.rmk: Install `grub-pe2elf' only if requested.
8692 Install `grub.d/10_windows' only on Cygwin.
8693 * configure.ac: Add subst of `target_os'.
8694 Check `target_os' also before setting TARGET_OBJ2ELF.
8695 Add `--enable-grub-pe2elf'.
8696
042bd419 86972008-08-08 Robert Millan <rmh@aybabtu.com>
8698
8699 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
8700 (grub_last_time): Change type to grub_uint64_t.
8701 (grub_disk_open): Migrate code from to using grub_get_time_ms().
8702 (grub_disk_close): Likewise.
8703
8704 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
8705 (run_menu): Migrate code from to using grub_get_time_ms().
8706
8707 * util/misc.c (grub_get_time_ms): New function.
8708
7f280db5 87092008-08-08 Marco Gerards <marco@gnu.org>
8710
8711 * disk/ata.c (grub_ata_regget): Change return type to
8712 `grub_uint8_t'.
8713 (grub_ata_regget2): Likewise.
8714 (grub_ata_wait_status): New function.
8715 (grub_ata_wait_busy): Removed function, updated all users to use
8716 `grub_ata_wait_status'.
8717 (grub_ata_wait_drq): Likewise.
8718 (grub_ata_cmd): New function.
8719 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
8720 error handling.
8721 (grub_ata_pio_write): Add error handling.
8722 (grub_atapi_identify): Likewise.
8723 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
8724 handling.
8725 (grub_ata_identify): Use `grub_ata_cmd' and improve error
8726 handling. Actually use the detected registers. Reorder the
8727 detection logic such that it is easier to read.
8728 (grub_ata_pciinit): Do not assign the same ID to each controller.
8729 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
8730 handling.
8731 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
8732
8733 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
8734
1fbc5e66 87352008-08-08 Marco Gerards <marco@gnu.org>
8736
8737 * NEWS: Update.
8738
819ce6c0 87392008-08-07 Bean <bean123ch@gmail.com>
8740
8741 * include/grub/x86_64/pci.h: New file.
8742
5c41d44d 87432008-08-07 Christian Franke <franke@computer.org>
8744
8745 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
8746 (TIMER2_GATE): Likewise.
8747 (grub_pit_wait): Add enable/disable of the timer2 gate
8748 bit of port 0x61. This fixes a possible infinite loop.
8749
5ebc275d 87502008-08-07 Bean <bean123ch@gmail.com>
8751
8752 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
8753 kern/i386/tsc.c and kern/i386/pit.c.
8754
8755 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
8756 x86_64 platform.
8757
8758 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
8759 <grub/i386/tsc.h>.
8760
8761 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
8762
e383b3d0 87632008-08-07 Bean <bean123ch@gmail.com>
8764
8765 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
8766
8767 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
8768
8769 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
8770 multiple inclusion. Add #include <grub/types.h>.
8771
1cbb58ac 87722008-08-06 Christian Franke <franke@computer.org>
8773
8774 * conf/common.rmk: Build and install `10_windows'.
8775 * util/grub.d/10_windows.in: New script.
8776
337f5a1e 87772008-08-06 Pavel Roskin <proski@gnu.org>
8778
8779 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
8780
057bc4ac 87812008-08-06 Robert Millan <rmh@aybabtu.com>
8782
8783 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
8784 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
8785
2b99f123 87862008-08-06 Bean <bean123ch@gmail.com>
8787
8788 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
8789 (grub_pxefs_fs_int): Remove dummy definition.
8790 (grub_pxefs_open): Use data->block_size to store the current block
8791 size setting.
8792 (grub_pxefs_read): Use block size stored in data->block_size. As the
8793 value of grub_pxe_blksize can be changed after the file is opened.
8794
9f0234cb 87952008-08-06 Bean <bean123ch@gmail.com>
8796
8797 * fs/i386/pc/pxe.c (curr_file): new variable.
8798 (grub_pxefs_open): Simply the handling of pxe file system. Don't
8799 require the dummy internal file system anymore.
8800 (grub_pxefs_read): Removed.
8801 (grub_pxefs_close): Likewise.
8802 (grub_pxefs_fs_int): Likewise.
8803 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
8804 connection when we switch file.
8805 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
8806
a55d42e0 88072008-08-06 Robert Millan <rmh@aybabtu.com>
8808
8809 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
8810 `halt.mod'.
8811 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
8812 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
8813
8814 * kern/i386/halt.c: New file.
8815 * kern/i386/reboot.c: Likewise.
8816 * include/grub/i386/reboot.h: Likewise.
8817 * include/grub/i386/halt.h: Likewise.
8818
8819 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
8820 Include `<grub/cpu/halt.h>'.
8821 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
8822 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
8823
8824 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
8825 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
8826 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
8827 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
8828 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
8829 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
8830 from here ...
8831 * include/grub/i386/at_keyboard.h: ... to here.
8832
24371d26 88332008-08-05 Robert Millan <rmh@aybabtu.com>
8834
8835 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
8836 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
8837 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
8838 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
8839 `kern/generic/millisleep.c'.
8840
8841 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
8842 instead of grub_get_rtc().
8843 (grub_tsc_init): Initialize `tsc_boot_time'.
8844
8845 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
8846 (grub_machine_init): Use grub_tsc_init() rather than
8847 installing an RTC-based handler via grub_install_get_time_ms().
8848
8849 * kern/i386/pit.c: New file.
8850 * include/grub/i386/pit.h: Likewise.
8851
9e7007b3 88522008-08-05 Bean <bean123ch@gmail.com>
8853
8854 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
8855
8856 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
8857 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
8858 (pxe_mod_SOURCES): New macro.
8859 (pxe_mod_CFLAGS): Likewise.
8860 (pxe_mod_LDFLAGS): Likewise.
8861 (pxecmd_mod_SOURCES): Likewise.
8862 (pxecmd_mod_CFLAGS): Likewise.
8863 (pxecmd_mod_LDFLAGS): Likewise.
8864
8865 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
8866 (grub_pxe_call): Likewise.
8867
8868 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
8869
8870 * commands/i386/pc/pxecmd.c: New file.
8871
9f0234cb 8872 * fs/i386/pc/pxe.c: Likewise.
9e7007b3 8873
8874 * include/grub/i386/pc/pxe.h: Likewise.
8875
6977d49f 88762008-08-05 Bean <bean123ch@gmail.com>
8877
8878 * util/console.c (grub_console_cur_color): New variable.
8879 (grub_console_standard_color): Likewise.
8880 (grub_console_normal_color): Likewise.
8881 (grub_console_highlight_color): Likewise.
8882 (color_map): Likewise.
8883 (use_color): Likewise.
8884 (NUM_COLORS): New macro.
8885 (grub_ncurses_setcolorstate): Handle color properly.
8886 (grub_ncurses_setcolor): Don't change color here, just remember the
8887 settings, color will be set in grub_ncurses_setcolorstate.
8888 (grub_ncurses_getcolor): New function.
8889 (grub_ncurses_init): Initialize color pairs.
8890 (grub_ncurses_term): New member grub_ncurses_getcolor.
8891
9c2ff3ee 88922008-08-05 Colin D Bennett <colin@gibibit.com>
337f5a1e 8893
9c2ff3ee 8894 High resolution timer support. Implemented for x86 CPUs using TSC.
8895 Extracted generic grub_millisleep() so it's linked in only as needed.
8896 This requires a Pentium compatible CPU; if the RDTSC instruction is
8897 not supported, then it falls back on the generic grub_get_time_ms()
8898 implementation that uses the machine's RTC.
8899
8900 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
8901 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
8902 `kern/generic/millisleep.c'.
8903
8904 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
8905 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
8906
8907 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
8908 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
8909
8910 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
8911
8912 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
8913 `kern/generic/millisleep.c'.
8914
8915 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
8916
8917 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
8918
8919 * kern/generic/rtc_get_time_ms.c: New file.
8920
8921 * kern/generic/millisleep.c: New file.
337f5a1e 8922
9c2ff3ee 8923 * kern/misc.c: Don't include
8924 <kern/time.h> anymore.
8925 (grub_millisleep_generic): Removed.
8926
8927 * commands/sleep.c (grub_interruptible_millisleep): Uses
8928 grub_get_time_ms() instead of grub_get_rtc().
8929
8930 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
8931 function.
8932 (grub_cpu_is_cpuid_supported): New inline function.
8933 (grub_cpu_is_tsc_supported): New inline function.
8934 (grub_tsc_init): New function prototype.
8935 (grub_tsc_get_time_ms): New function prototype.
8936
8937 * kern/i386/tsc.c (grub_get_time_ms): New file.
8938
8939 * include/grub/time.h: Include <grub/types.h.
8940 (grub_millisleep_generic): Removed.
8941 (grub_get_time_ms): New prototype.
8942 (grub_install_get_time_ms): New prototype.
8943 (grub_rtc_get_time_ms): New prototype.
8944
8945 * kern/time.c (grub_get_time_ms): New function.
8946 (grub_install_get_time_ms): New function.
8947
8948 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
8949 <grub/time.h> anymore.
8950 (grub_millisleep): Removed.
8951 (grub_machine_init): Call grub_tsc_init.
8952
8953 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
8954 get_time_ms() implementation.
8955
8956 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
8957 (ieee1275_get_time_ms): New function.
8958 (grub_machine_init): Install get_time_ms() implementation.
8959
8960 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
8961 (grub_machine_init): Call grub_tsc_init().
8962 (grub_millisleep): Removed.
bf06a93f 8963
9c2ff3ee 8964 * kern/ieee1275/init.c (grub_millisleep): Removed.
8965 (grub_machine_init): Install ieee1275_get_time_ms()
8966 implementation.
8967 (ieee1275_get_time_ms): New function.
8968 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
8969 real work.
8970
9ec92aaf 89712008-08-05 Marco Gerards <marco@gnu.org>
8972
8973 * disk/ata.c: Include <grub/pci.h>.
8974 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
8975 (grub_ata_initialize): Rewritten.
8976 (grub_ata_device_initialize): New function.
8977
8d23f507 89782008-08-04 Pavel Roskin <proski@gnu.org>
8979
8980 * kern/main.c: Include grub/mm.h.
8981
5e15ee3d 89822008-08-04 Robert Millan <rmh@aybabtu.com>
8983
8984 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
8985 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
8986 corruption problem).
8987
a9053f8f 89882008-08-04 Robert Millan <rmh@aybabtu.com>
8989
8990 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
8991 warnings introduced in my last commit.
8992
dd19c7d7 89932008-08-03 Robert Millan <rmh@aybabtu.com>
8994
8995 Make PCI available on all i386 architectures.
8996
8997 * include/grub/i386/pc/pci.h: Move from here ...
8998 * include/grub/i386/pci.h: ... to here.
8999
9000 * include/grub/i386/pc/pci.h: Remove.
9001 * include/grub/i386/efi/pci.h: Remove.
9002 * include/grub/x86_64/efi/pci.h: Remove.
9003
9004 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
9005 `<grub/cpu/pci.h>'.
9006
9007 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
9008 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
9009 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
9010
9011 * conf/i386-ieee1275.rmk: Likewise.
9012
e14a6184 90132008-08-03 Robert Millan <rmh@aybabtu.com>
9014
9015 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
9016 (grub_console_setcursor): Make it possible to set cursor off.
9017
52768e37 90182008-08-03 Robert Millan <rmh@aybabtu.com>
9019
9020 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
9021 of modules instead of assuming which platform provides what.
9022 * util/update-grub.in: Likewise.
9023
2d52f57f 90242008-08-03 Robert Millan <rmh@aybabtu.com>
9025
9026 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
9027 instead of `grub_install_dos_part' to determine whether a drive needs
9028 to be prepended to prefix (`grub_install_dos_part' is not reliable,
825aa57a 9029 because it can be overridden when loading GRUB via Multiboot).
2d52f57f 9030
2a5cd121 90312008-08-02 Robert Millan <rmh@aybabtu.com>
9032
9033 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
9034
93808428 90352008-08-02 Robert Millan <rmh@aybabtu.com>
9036
9037 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
9038 of informational grub_dprintf() calls.
9039
3bd0a12a 90402008-08-02 Robert Millan <rmh@aybabtu.com>
9041
9042 * disk/memdisk.c (memdisk_size): Don't initialize.
9043 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
9044
9045 * include/grub/i386/pc/kernel.h
9046 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
9047 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
9048 (grub_memdisk_image_size, grub_arch_memdisk_addr)
9049 (grub_arch_memdisk_size): Remove.
9050
9051 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
9052 field (was only used to transfer a constant). Add `type' field to
9053 support multiple module types.
9054 (grub_module_iterate): New function.
9055
9056 * kern/device.c (grub_device_open): Do not hide error messages
9057 when grub_disk_open() fails. Use grub_print_error() instead.
9058
9059 * kern/i386/pc/init.c (grub_arch_modules_addr)
9060 (grub_arch_memdisk_size): Remove functions.
9061 (grub_arch_modules_addr): Return the module address in high memory
9062 (now that it isn't copied anymore).
9063
9064 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
9065 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
9066 decompression routine (grub_total_module_size already includes that
9067 now). Don't copy modules back to low memory.
9068
9069 * kern/main.c: Include `<grub/mm.h>'.
9070 (grub_load_modules): Split out (and use) ...
9071 (grub_module_iterate): ... this function, which iterates through
9072 module objects and runs a hook.
9073 Comment out grub_mm_init_region() call, as it would cause non-ELF
9074 modules to be overwritten.
9075
9076 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
9077 the memdisk image in its own region, make it part of the module list.
9078 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
9079 (main): Parse --memdisk|-m option, and pass user-provided path as
9080 parameter to generate_image().
9081 (add_segments): Pass `memdisk_path' down to load_modules().
9082 (load_modules): Embed memdisk image in module section when requested.
9083 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
9084 `header.type' instead of `header.offset'.
9085
9086 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
9087 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
9088 (memdisk_mod_LDFLAGS): New variables.
9089 * conf/i386-coreboot.rmk: Likewise.
9090 * conf/i386-ieee1275.rmk: Likewise.
9091
a927cc73 90922008-08-02 Robert Millan <rmh@aybabtu.com>
9093
9094 * loader/i386/pc/multiboot.c (playground, forward_relocator)
9095 (backward_relocator): New variables. Used to allocate and relocate
9096 the payload, respectively.
9097 (grub_multiboot_load_elf32): Load into heap instead of requested
825aa57a 9098 address, install the appropriate relocator code in each bound of
a927cc73 9099 the payload, and set the entry point such that
9100 grub_multiboot_real_boot() will jump to one of them.
9101
9102 * kern/i386/loader.S (grub_multiboot_payload_size)
9103 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
9104 (grub_multiboot_payload_entry_offset): New variables.
9105 (grub_multiboot_real_boot): Set cpu context to what the relocator
9106 expects, and jump to the relocator instead of the payload.
9107
9108 * include/grub/i386/loader.h (grub_multiboot_payload_size)
9109 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
9110 (grub_multiboot_payload_entry_offset): Export.
9111
b15d8a0c 91122008-08-01 Bean <bean123ch@gmail.com>
9113
9114 * normal/menu_entry.c (editor_getline): Don't return the original
9115 string as result, as it will be released by lexer once it has done
9116 using it.
9117
cdfb3d22 91182008-08-01 Robert Millan <rmh@aybabtu.com>
9119
9120 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
9121 within menuentries, not before them.
9122 util/grub.d/10_hurd.in: Likewise.
9123
9175e93d 91242008-08-01 Bean <bean123ch@gmail.com>
9125
9126 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
9127 (bufio_mod_SOURCES): New macro.
9128 (bufio_mod_CFLAGS): Likewise.
9129 (bufio_mod_LDFLAGS): Likewise.
9130
9131 * include/grub/bufio.h: New file.
9132
9133 * io/bufio.c: Likewise.
9134
9135 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
9136 (grub_video_reader_png): Use grub_buffile_open to open file.
9137
9138 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
9139 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
9140
9141 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
9142 (grub_video_reader_tga): Use grub_buffile_open to open file.
9143
9144 * font/manager.c: Include <grub/bufio.h>.
9145 (add_font): Use grub_buffile_open to open file.
9146
3d8383e7 91472008-07-31 Robert Millan <rmh@aybabtu.com>
9148
9149 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
9150 ELF segments, use a macro for arbitrarily accessing any of them instead
9151 of preparing a pointer that allows access to one at a time.
9152 (grub_multiboot_load_elf64): Likewise.
9153
16e641b6 91542008-07-31 Bean <bean123ch@gmail.com>
9155
9156 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
9157 GRUB_KERNEL_MACHINE_DATA_END.
9158
59198b72 91592008-07-30 Robert Millan <rmh@aybabtu.com>
9160
9161 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
9162 Increase from 0x50 to 0x60.
9163 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
9164 use UUIDs to identify the root drive for them. If that's not
9165 possible, abort.
9166 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
9167 check, for cross-disk installs.
9168
ae88bca3 91692008-07-30 Robert Millan <rmh@aybabtu.com>
9170
9171 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
9172 is non-empty, use it to set the `prefix' environment variable instead
9173 of the usual approach.
9174 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
9175 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
9176 environment variable instead of dummy make_install_device().
9177
9178 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
9179 (start): Insert a data section, with `grub_prefix' variable.
825aa57a 9180 * kern/i386/linuxbios/startup.S: Likewise.
ae88bca3 9181
9182 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
9183 New variable reference.
9184 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
9185 New macro. Defines offset of `grub_prefix' within startup.S (relative
9186 to `start').
9187 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
9188 section within startup.S (relative to `start').
9189 * include/grub/i386/coreboot/kernel.h: Likewise.
9190
9191 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
9192 Overwrite grub_prefix with its contents, at the beginning of the
9193 first segment.
9194 (main): Understand -p|--prefix.
9195
14f41dd1 91962008-07-30 Robert Millan <rmh@aybabtu.com>
9197
9198 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
9199
4ca049a3 92002008-07-30 Robert Millan <rmh@aybabtu.com>
9201
9202 * term/i386/pc/vga_text.c (grub_console_cls): Use
9203 grub_console_gotoxy() to go back to beginning of the screen.
9204 Found by Patrick Georgi <patrick.georgi@coresystems.de>
9205
2921d337 92062008-07-29 Christian Franke <franke@computer.org>
9207
9208 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
9209 Add conversion of emulated mount points on Cygwin.
9210
b609876d 92112008-07-29 Christian Franke <franke@computer.org>
9212
9213 * util/update-grub.in: Add a check for admin
9214 group on Cygwin.
9215 Remove old `grub.cfg.new' before creation.
9216 Add `-f' to `mv' to handle the different filesystem
9217 semantics of Windows.
9218
e93e4679 92192008-07-29 Bean <bean123ch@gmail.com>
9220
9221 * normal/main.c (get_line): Fix buffer overflow bug.
9222
41694fd0 92232008-07-28 Robert Millan <rmh@aybabtu.com>
9224
9225 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
9226 (struct grub_apple_header): New struct. Describes the layout of
9227 the partmap header.
9228 (apple_partition_map_iterate): Check the header magic as well as the
9229 partition magic (which was already being checked).
9230
cfd0b4e6 92312008-07-28 Pavel Roskin <proski@gnu.org>
9232
9233 * genmk.rb: Add a warning to the beginning of the output that
9234 it's a generated file and should not be edited.
9235
93cce016 92362008-07-28 Robert Millan <rmh@aybabtu.com>
9237
9238 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
9239 with the same number are found, just use issue a warning with
9240 grub_dprintf(), as this error has been reported to be non-fatal.
c298def0 9241
cd1df915 92422008-07-27 Robert Millan <rmh@aybabtu.com>
9243
9244 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
9245 information.
9246
b70a8427 92472008-07-27 Bean <bean123ch@gmail.com>
9248
9249 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
9250 (grub_fat_find_dir): Ignore case when comparing filename.
9251
8f5e379f 92522008-07-27 Bean <bean123ch@gmail.com>
9253
9254 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
9255 smallino, as it's more descriptive, and i8count can be confused with
9256 the other field count.
9257 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
9258 inode type.
9259
a85cd5a0 92602008-07-27 Bean <bean123ch@gmail.com>
9261
9262 * commands/crc.c: New file.
9263
9264 * lib/crc.c: Likewise.
9265
9266 * include/grub/lib/crc.h: Likewise.
9267
9268 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
9269
9270 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
9271 (hexdump): Move this function to ...
9272
9273 * lib/hexdump.c: ... here.
9274
9275 * include/grub/hexdump.h: Renamed to ...
9276
9277 * include/grub/lib/hexdump.h: ... this.
9278
9279 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
9280
9281 * util/grub-editenv.c: Likewise.
9282
9283 * include/envblk.h: Renamed to ...
9284
9285 * include/lib/envblk.h: ... this.
9286
9287 * util/envblk.c: Renamed to ...
9288
9289 * lib/envblk.c: ... this.
9290
9291 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
9292 lib/hexdump.c.
9293 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
9294 (pkglib_MODULES): Add crc.mod.
9295 (hexdump_mod_SOURCES): Add lib/hexdump.c.
9296 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
9297 (crc_mod_SOURCES): New macro.
9298 (crc_mod_CFLAGS): Likewise.
9299 (crc_mod_LDFLAGS): Likewise.
9300
9301 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
9302
9303 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9304
9305 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
9306
9307 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9308
9309 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
9310
c298def0 93112008-07-27 Felix Zielcke <fzielcke@z-51.de>
8749e9e5 9312
9313 * commands/help.c: Include <grub/term.h>.
9314 (TERM_WIDTH): Removed. Updated all users.
9315
cc349fb3 93162008-07-27 Pavel Roskin <proski@gnu.org>
9317
9318 * util/getroot.c (find_root_device): Rephrase a comment to avoid
9319 spurious warnings about a comment within a comment.
9320
9051607e 93212008-07-25 Robert Millan <rmh@aybabtu.com>
9322
9323 * util/getroot.c (find_root_device): Skip devices that match
9324 /dev/dm-[0-9]. This lets the real device be found for any type of
9325 abstraction (LVM, EVMS, RAID..).
9326 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
9327 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
9328 device is found first, find_root_device() will now skip it.
9329
01453bfc 93302008-07-24 Pavel Roskin <proski@gnu.org>
9331
9332 * include/grub/types.h: Use __builtin_bswap32() and
9333 __builtin_bswap64() with gcc 4.3 and newer.
9334
6af9849f 93352008-07-24 Christian Franke <franke@computer.org>
9336
3a0fa256 9337 * util/i386/pc/grub-install.in: If `--debug' is specified,
9338 pass `--verbose' to grub-setup.
9339 Abort script if make_system_path_relative_to_its_root() fails.
9340
7810e747 93412008-07-24 Bean <bean123ch@gmail.com>
9342
9343 * configure.ac: Fixed a bug caused by the previous cygwin patch,
9344 variable `target_platform' should be `platform'.
9345
42290e17 93462008-07-24 Bean <bean123ch@gmail.com>
9347
51cc5193 9348 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
42290e17 9349 (grub_png_init_fixed_block): New function.
9350 (grub_png_decode_image_data): Handle fixed huffman code compression.
9351
2a8a80e4 93522008-07-24 Bean <bean123ch@gmail.com>
9353
9354 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
9355 (grub_pe2elf_SOURCES): New macro.
9356 (CLEANFILES): Add grub-pe2elf.
9357
9358 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
9359 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
9360 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
9361 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
9362 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
9363 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
9364 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
9365 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
9366 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
9367 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
9368 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
9369 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
9370 (GRUB_PE32_DT_FUNCTION): Likewise.
9371 (GRUB_PE32_REL_I386_DIR32): Likewise.
9372 (GRUB_PE32_REL_I386_REL32): Likewise.
9373 (grub_pe32_symbol): New structure.
9374 (grub_pe32_reloc): Likewise.
9375
9376 * util/grub-pe2elf.c: New file.
9377
9378 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
9379 start symbol in non pc platform.
9380
9381 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
9382
9383 The following patches are from Christian Franke.
9384
9385 * include/grub/dl.h: Remove .previous, gas supports this only
9386 for ELF format.
9387
9388 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
9389 Remove .type, gas supports this only for ELF format.
9390
9391 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
9392 nullbytes in symbol table. This fixes an infinite loop if table is
9393 zero filled.
9394
9395 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
9396 TARGET_IMG_LDFLAGS and EXEEXT.
9397
9398 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
9399 TARGET_IMG_LDFLAGS_AC.
9400 (grub_CHECK_STACK_ARG_PROBE): New function.
9401
9402 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
9403
9404 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
9405
9406 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
9407 to set TARGET_IMG_LD* accordingly.
9408 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
9409 Add call to grub_CHECK_STACK_ARG_PROBE.
9410 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
9411
9412 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
9413
9414 * genmk.rb: Add EXEEXT to CLEANFILES.
9415
12ccdb75 94162008-07-23 Robert Millan <rmh@aybabtu.com>
9417
9418 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
9419 define the codes for arrows and lines used for the menu).
9420 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
9421 as well.
9422
9423 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
9424 fonts, because the latter are too slow.
9425
18eeaf04 94262008-07-21 Bean <bean123ch@gmail.com>
9427
9428 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
9429 a20. Run keyboard test last, as it will cause macbook to halt.
9430
b095e2ad 94312008-07-18 Pavel Roskin <proski@gnu.org>
9432
9433 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
9434 load foreign architecture modules correctly anyway. Keep
9435 support for loading host architecture modules, whether we
9436 compile them or not.
9437
737feb35 94382008-07-17 Pavel Roskin <proski@gnu.org>
9439
3f4ce737 9440 * configure.ac: Use -m32 or -m64 regardless of whether we had to
9441 change target_cpu. The compiler default can mismatch target_cpu
9442 in any case.
9443
4ad2d049 9444 * disk/efi/efidisk.c: Fix format warnings on x86_64.
9445 * kern/efi/efi.c: Likewise.
9446
f6130a12 9447 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
9448 target compiler is functional.
9449 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
9450 are set up.
9451
58393a2d 9452 * configure.ac: Default to efi platform for x86_64-apple. Allow
9453 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
9454 adjustments from the rest, only do them if target is not
9455 explicitly given. Merge other adjustments with the final sanity
9456 check. Remove an extraneous check for supported CPU. Be
9457 specific which CPU and which platform is not supported.
9458
737feb35 9459 * configure.ac: Default to pc platform for x86_64.
9460
546f966a 94612008-07-17 Robert Millan <rmh@aybabtu.com>
9462
9463 Partial LinuxBIOS -> Coreboot rename.
9464
9465 * conf/i386-linuxbios.rmk: Renamed to ...
9466 * conf/i386-coreboot.rmk: ... this.
9467 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
9468 * configure.ac: Accept "coreboot" as input platform (but maintain
9469 compatibility with "linuxbios").
9470 * include/grub/i386/linuxbios: Renamed to ...
9471 * include/grub/i386/coreboot: ... this.
9472
20011694 94732008-07-17 Bean <bean123ch@gmail.com>
9474
9475 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
c11f6d16 9476 (appleldr_mod_SOURCE): New variable.
20011694 9477 (appleldr_mod_CFLAGS): Likewise.
9478 (appleldr_mod_LDFLAGS): Likewise.
9479 (pci_mod_SOURCES): Likewise.
9480 (pci_mod_CFLAGS): Likewise.
9481 (pci_mod_LDFLAGS): Likewise.
9482 (lspci_mod_SOURCES): Likewise.
9483 (lspci_mod_CFLAGS): Likewise.
9484 (lspci_mod_LDFLAGS): Likewise.
9485
9486 * conf/x86_64-efi.rmk: New file.
9487
9488 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
9489 macro.
9490 (grub_efidisk_write): Likewise.
9491
9492 * include/efi/api.h (efi_call_0): New macro.
9493 (efi_call_1): Likewise.
9494 (efi_call_2): Likewise.
9495 (efi_call_3): Likewise.
9496 (efi_call_4): Likewise.
9497 (efi_call_5): Likewise.
9498 (efi_call_6): Likewise.
9499
9500 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
9501 grub_rescue_cmd_chainloader.
9502
9503 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
9504 (grub_pe32_optional_header): Change some fields based on i386 or
9505 x86_64 platform.
9506 (GRUB_PE32_PE32_MAGIC): Likewise.
9507
9508 * include/grub/efi/uga_draw.h: New file.
9509
9510 * include/grub/elf.h (STN_ABS): New constant.
9511 (R_X86_64_NONE): Relocation constant for x86_64.
9512 (R_X86_64_64): Likewise.
9513 (R_X86_64_PC32): Likewise.
9514 (R_X86_64_GOT32): Likewise.
9515 (R_X86_64_PLT32): Likewise.
9516 (R_X86_64_COPY): Likewise.
9517 (R_X86_64_GLOB_DAT): Likewise.
9518 (R_X86_64_JUMP_SLOT): Likewise.
9519 (R_X86_64_RELATIVE): Likewise.
9520 (R_X86_64_GOTPCREL): Likewise.
9521 (R_X86_64_32): Likewise.
9522 (R_X86_64_32S): Likewise.
9523 (R_X86_64_16): Likewise.
9524 (R_X86_64_PC16): Likewise.
9525 (R_X86_64_8): Likewise.
9526 (R_X86_64_PC8): Likewise.
9527
9528 * include/grub/i386/efi/pci.h: New file.
9529
9530 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
9531 Change it value based on platform.
9532 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
9533 (GRUB_E820_RAM): Likewise.
9534 (GRUB_E820_RESERVED): Likewise.
9535 (GRUB_E820_ACPI): Likewise.
9536 (GRUB_E820_NVS): Likewise.
9537 (GRUB_E820_EXEC_CODE): Likewise.
9538 (GRUB_E820_MAX_ENTRY): Likewise.
9539 (grub_e820_mmap): New structure.
9540 (linux_kernel_header): Change the efi field according to different
9541 kernel version, also field from linux_kernel_header.
9542
9543 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
9544
9545 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
9546 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
9547 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
9548 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
9549 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
9550 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
9551 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
9552 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
9553 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
9554 (GRUB_PCI_ADDR_IO_MASK): Likewise.
9555
9556 * include/grub/x86_64/efi/kernel.h: New file.
9557
9558 * include/grub/x86_64/efi/loader.h: Likewise.
9559
9560 * include/grub/x86_64/efi/machine.h: Likewise.
9561
9562 * include/grub/x86_64/efi/pci.h: Likewise.
9563
9564 * include/grub/x86_64/efi/time.h: Likewise.
9565
9566 * include/grub/x86_64/linux.h: Likewise.
9567
9568 * include/grub/x86_64/setjmp.h: Likewise.
9569
9570 * include/grub/x86_64/time.h: Likewise.
9571
9572 * include/grub/x86_64/types.h: Likewise.
9573
9574 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
9575 GRUB_TARGET_SIZEOF_VOID_P.
9576
9577 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
9578 (grub_efi_locate_handle): Likewise.
9579 (grub_efi_open_protocol): Likewise.
9580 (grub_efi_set_text_mode): Likewise.
9581 (grub_efi_stall): Likewise.
9582 (grub_exit): Likewise.
9583 (grub_reboot): Likewise.
9584 (grub_halt): Likewise.
9585 (grub_efi_exit_boot_services): Likewise.
9586 (grub_get_rtc): Likewise.
9587
9588 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
9589 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
9590 (grub_efi_allocate_pages): Wrap efi calls.
9591 (grub_efi_free_pages): Wrap efi calls.
9592 (grub_efi_get_memory_map): Wrap efi calls.
9593
9594 * kern/x86_64/dl.c: New file.
9595
9596 * kern/x86_64/efi/callwrap.S: Likewise.
9597
9598 * kern/x86_64/efi/startup.S: Likewise.
9599
9600 * loader/efi/appleloader.c: Likewise.
9601
9602 * loader/efi/chainloader.c (cmdline): New variable.
9603 (grub_chainloader_unload): Wrap efi calls.
9604 (grub_chainloader_boot): Likewise.
9605 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
9606 command line.
9607
9608 * loader/efi/chainloader_normal.c (chainloader_command):
9609 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
9610 command line.
9611
9612 * loader/i386/efi/linux.c (allocate_pages): Change allocation
9613 method.
9614 (grub_e820_add_region): New function.
9615 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
9616 booting.
9617 (grub_find_video_card): New function.
9618 (grub_linux_setup_video): New function.
9619 (grub_rescue_cmd_linux): Probe for video information.
9620
9621 * normal/x86_64/setjmp.S: New file.
9622
9623 * term/efi/console.c (map_char): New function.
9624 (grub_console_putchar): Map unicode char.
9625 (grub_console_checkkey): Wrap efi calls.
9626 (grub_console_getkey): Likewise.
9627 (grub_console_getwh): Likewise.
9628 (grub_console_gotoxy): Likewise.
9629 (grub_console_cls): Likewise.
9630 (grub_console_setcolorstate): Likewise.
9631 (grub_console_setcursor): Likewise.
9632
9633 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
9634
59652a20 96352008-07-16 Pavel Roskin <proski@gnu.org>
9636
ef294055 9637 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
9638 format strings.
9639
59652a20 9640 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
9641 pointer, not an integer. This fixes a warning and prevents
9642 precision loss on 64-bit systems.
9643 (relocate_addresses): Remove unneeded cast.
9644
afc3b5d7 96452008-07-15 Pavel Roskin <proski@gnu.org>
9646
506b2b3e 9647 * kern/i386/ieee1275/init.c: Include grub/cache.h.
9648
62ead89c 9649 * term/ieee1275/ofconsole.c: Disable code unused on i386.
9650
c4cd51d7 9651 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
9652 Fix comparison between signed and unsigned.
9653
0d3d8f28 9654 * include/grub/i386/ieee1275/console.h: Declare
9655 grub_console_init() and grub_console_fini().
9656
8804b286 9657 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
9658 It's empty and unused.
9659
ee01cf35 9660 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
9661 beginning to avoid warnings with some compilers.
9662
afc3b5d7 9663 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
9664 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
9665
e4e8eaa5 96662008-07-14 Pavel Roskin <proski@gnu.org>
9667
407aceb4 9668 * kern/env.c (grub_register_variable_hook): Don't copy empty
9669 string, it leaks memory. Pass "" to grub_env_set(), it should
9670 handle constant strings.
9671
e4e8eaa5 9672 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
9673 * commands/cmp.c (grub_cmd_cmp): Likewise.
9674 * kern/dl.c (grub_dl_flush_cache): Likewise.
9675 (grub_dl_load_core): Likewise.
9676 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
9677 (grub_elf64_load_phdrs): Likewise.
9678
d4e2dad3 96792008-07-13 Pavel Roskin <proski@gnu.org>
9680
9681 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
9682 between signed and unsigned.
9683 (LzmaEnc_Finish): Fix warning about an unused parameter.
9684
aa24b516 96852008-07-13 Bean <bean123ch@gmail.com>
9686
9687 * Makefile.in (enable_lzo): New rule.
9688
9689 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
9690
9691 * configure.ac (ENABLE_LZO): New option --enable-lzo.
9692
9693 * boot/i386/pc/lnxboot.S: #include <config.h>.
9694
9695 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
fe987087 9696 its value according to the compression algorithm used, lzo or lzma.
aa24b516 9697
9698 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
9699 compression algorithm according to configure macro.
9700
9701 * kern/i386/pc/startup.S (codestart): Likewise.
9702
9703 * kern/i386/pc/lzma_decode.S: New file.
9704
9705 * include/grub/lib/LzFind.h: Likewise.
9706
9707 * include/grub/lib/LzHash.h: Likewise.
9708
9709 * include/grub/lib/LzmaDec.h: Likewise.
9710
9711 * include/grub/lib/LzmaEnc.h: Likewise.
9712
9713 * include/grub/lib/LzmaTypes.h: Likewise.
9714
9715 * lib/LzFind.c: Likewise.
9716
9717 * lib/LzmaDec.c: Likewise.
9718
9719 * lib/LzmaEnc.c: Likewise.
9720
4ae821ac 97212008-07-13 Bean <bean123ch@gmail.com>
9722
9723 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
9724 (grub_ext4_extent_header): New structure.
9725 (grub_ext4_extent): Likewise.
9726 (grub_ext4_extent_idx): Likewise.
9727 (grub_ext4_find_leaf): New function.
9728 (grub_ext2_read_block): Handle extents.
9729
9a745147 97302008-07-12 Robert Millan <rmh@aybabtu.com>
9731
9732 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
9733
d49a4cf6 97342008-07-11 Robert Millan <rmh@aybabtu.com>
9735
9736 * util/grub.d/40_custom.in: New file. Example on how to add custom
9737 entries to /etc/grub.d.
9738 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
9739 40_custom (implicitly, by merging all the grub.d rules).
9740
947414b4 97412008-07-11 Pavel Roskin <proski@gnu.org>
9742
0059cf6f 9743 * commands/read.c (grub_getline): Fix invalid memory access.
9744 Don't add newline to the variable value.
9745
947414b4 9746 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
9747 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
9748 (serial_hw_get_port): Check validity of the port number.
9749 (grub_cmd_serial): Check return value of serial_hw_get_port().
9750
62a02d00 97512008-07-07 Pavel Roskin <proski@gnu.org>
9752
9753 * boot/i386/pc/diskboot.S (notification_string): Replace
9754 "Loading kernel" with just "loading". This is shorter, less
9755 confusing and saves a few bytes for possible future changes.
9756
3e5581b0 97572008-07-05 Pavel Roskin <proski@gnu.org>
9758
ea387a48 9759 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
9760 size for ATAPI devices, they are undefined. Output sector
9761 number in decimal form.
9762
3e5581b0 9763 * disk/ata.c: Use named constants for status bits.
9764
fdecb8fd 97652008-07-04 Pavel Roskin <proski@gnu.org>
9766
bcd35b90 9767 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
9768 grub_addr_t before casting it to the void pointer to fix a
9769 warning. Non-addressable regions are discarded earlier.
9770 (grub_arch_modules_addr): Cast _end to grub_addr_t.
9771 * kern/i386/linuxbios/table.c: Include grub/misc.h.
9772 (check_signature): Don't shadow table_header.
9773 (grub_linuxbios_table_iterate): Cast numeric constants to
9774 grub_linuxbios_table_header_t.
9775 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
9776 grub_stop().
9777
af58ab3d 9778 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
9779 prevent warnings.
9780
1759aa57 9781 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
9782 pointer, which can cause warnings. Support 64-bit addresses.
9783
fdecb8fd 9784 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
9785 of sizeof(long). This fixes PowerPC image generation on x86_64.
9786
8516d2a8 97872008-07-04 Robert Millan <rmh@aybabtu.com>
9788
9789 This fixes a performance issue when pc & gpt partmap iterators
9790 didn't abort iteration even after our hook found what it was
fe987087 9791 looking for (often causing expensive probes of non-existent drives).
8516d2a8 9792
9793 Some callers relied on previous buggy behaviour, since they would
34c44600 9794 raise an error when their own hooks caused early abortion of its
8516d2a8 9795 iteration.
9796
9797 * kern/device.c (grub_device_open): Improve error message.
9798 * disk/lvm.c (grub_lvm_open): Likewise.
9799 * disk/raid.c (grub_raid_open): Likewise.
9800
9801 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
9802 when hook requests it, independently of grub_errno.
9803 (pc_partition_map_probe): Do not fail when find_func() caused
9804 early abortion of pc_partition_map_iterate().
9805
9806 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
9807 when hook requests it, independently of grub_errno.
9808 (gpt_partition_map_probe): Do not fail when find_func() caused
9809 early abortion of gpt_partition_map_iterate().
9810
9811 * kern/partition.c (grub_partition_iterate): Abort parent iteration
9812 when hook requests it, independently of grub_errno. Do not fail when
9813 part_map_iterate_hook() caused early abortion of p->iterate().
9814
9815 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
9816 when grub_partition_iterate() returned with non-zero.
9817
277d0de9 98182008-07-03 Pavel Roskin <proski@gnu.org>
9819
9820 * disk/ata.c (grub_ata_pio_write): Check status before writing,
9821 like we do in grub_ata_pio_read().
9822 (grub_ata_readwrite): Always write individual sectors. Fix the
9823 sector count for the remainder.
9824 (grub_ata_write): Enable writing to ATA devices. Correctly
9825 report error for ATAPI devices.
9826
d4c9b428 98272008-07-02 Pavel Roskin <proski@gnu.org>
9828
e43fc690 9829 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
9830 warning.
9831
f707af42 9832 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
9833 for every read sector, we already increment it for the whole
9834 batch. This fixes reading more than 256 sectors at once.
9835
11e16b15 9836 * util/grub-editenv.c (cmd_info): Cast argument to long
9837 explicitly. ptrdiff_t reduces to int on i386.
9838
cbabfdd4 9839 * util/grub-editenv.c (main): Be specific which parameter is
9840 missing.
9841
b8fbce0a 9842 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
9843 (memdisk): Make memdisk_orig_addr a pointer.
9844
c9c8e606 9845 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
9846 for file offsets, use grub_off_t instead. Fix printf format
9847 warnings.
9848
ca62e598 9849 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
9850 there. Real unexpected warnings should not drown in the noise
9851 about known problems.
9852
ce8d1766 9853 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
9854 grub_disk_addr_t for memory addresses.
9855
00c7a56a 9856 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
9857 explicitly to fix a warning.
9858
08d3ef09 9859 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
9860
cb71ba20 9861 * Makefile.in (MODULE_LDFLAGS): New variable.
9862 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
9863 the linker accepts --build-id=none.
9864 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
9865 MODULE_LDFLAGS.
9866 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
9867
d4c9b428 9868 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
9869 those in Linux XFS code. Provide a way to access 64-bit parent
9870 inode.
9871 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
9872 the end of struct grub_xfs_dir_header.
9873
d4156eee 98742008-07-02 Bean <bean123ch@gmail.com>
9875
9876 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
9877 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
9878 and GRUB_IEEE1275_FLAG_NO_ANSI.
9879
9880 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
9881 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
9882 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
9883
9884 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
9885 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
9886
9887 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
9888 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
9889
9890 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
9891 esc sequence on non ANSI terminal.
9892 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
9893
9894 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
9895 beginning of file.
9896
2270f77b 98972008-07-02 Bean <bean123ch@gmail.com>
9898
9899 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
9900 (grub_editenv_SOURCES): New variable.
9901 (pkglib_MODULES): Add loadenv.mod.
9902 (loadenv_mod_SOURCES): New variable.
9903 (loadenv_mod_CFLAGS): Likewise.
9904 (loadenv_mod_LDFLAGS): Likewise.
9905
9906 * include/grub/envblk.h: New file.
9907
9908 * util/envblk.c: New file.
9909
9910 * util/grub-editenv.c: New file.
9911
9912 * commands/loadenv.c: New file.
9913
0e9e51ec 99142008-07-01 Pavel Roskin <proski@gnu.org>
9915
d89b7634 9916 * include/multiboot2.h (struct multiboot_tag_module): Use char,
9917 not unsigned char. This fixes warnings and is consistent with
9918 other tags.
9919
bf1835b1 9920 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
9921
8222a04b 9922 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
9923
6a42d99d 9924 * term/tparm.c (analyze): Always set *popcount.
9925
10b159d1 9926 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
9927 cast to fix a warning.
9928
b8789f6c 9929 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
9930 cast to suppress a warning.
9931
29d7e38a 9932 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
9933 grub_fshelp_read_file() expects.
9934
f341f669 9935 * fs/fat.c: Fix UUID calculation on big-endian systems. We
9936 write uuid as a 32-bit value in CPU byte order, so declare and
9937 use it as such.
9938
0e9e51ec 9939 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
9940 long if the format specifier expects it.
9941 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
9942 * partmap/pc.c (pc_partition_map_iterate): Likewise.
9943 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
9944 long to fix a warning.
9945 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
9946 grub_dprintf() arguments to fix warnings.
9947
3aefa857 99482008-06-30 Pavel Roskin <proski@gnu.org>
9949
56c7668b 9950 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
9951 install_bsd_part immediately before core.img is embedded or
9952 modified on disk. This fixes core.img verification if core.img
9953 cannot be embedded.
9954
3aefa857 9955 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
9956 core_path to calculate the blocklist.
9957 Patch from Javier Martín <lordhabbit@gmail.com>
9958
5444088d 99592008-06-29 Robert Millan <rmh@aybabtu.com>
9960
9961 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
9962 block to disk block.
9963 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
9964 Patch from Niels Böhm <bitbucket@arcor.de>
9965
674835c8 99662008-06-29 Robert Millan <rmh@aybabtu.com>
9967
9968 * util/update-grub_lib.in (font_path): Search for fonts in
9969 /boot/grub first, which is more likely to be readable (we aren't
9970 deciding where fonts live, just looking for them).
9971
f527dbc8 99722008-06-26 Pavel Roskin <proski@gnu.org>
9973
6c2d8df6 9974 * util/biosdisk.c (read_device_map): Don't leave dead map
9975 entries for devices failing stat() check.
9976
f527dbc8 9977 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
9978 core_path_dev for the core.img path on the target device.
9979
aebe3d13 99802008-06-26 Robert Millan <rmh@aybabtu.com>
9981
9982 * disk/fs_uuid.c: New file.
9983 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
9984 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
9985 (fs_uuid_mod_LDFLAGS): New variables.
9986 * include/grub/disk.h (grub_disk_dev_id): Add
9987 `GRUB_DISK_DEVICE_UUID_ID'.
9988 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
9989 implement iterate().
9990
37aaf354 99912008-06-26 Robert Millan <rmh@aybabtu.com>
9992
9993 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
9994 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
9995 Linux image includes no initrd.
9996
25ff262a 99972008-06-21 Javier Martín <lordhabbit@gmail.com>
9998
9999 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
10000 call to resolve the core image location that effectively appended the
10001 name twice.
10002
76a2bd44 100032008-06-21 Robert Millan <rmh@aybabtu.com>
10004
10005 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
10006 call from here ...
10007
10008 * util/grub.d/10_hurd.in: ... to here ...
10009 * util/grub.d/10_linux.in: ... and here.
10010
650e1c79 100112008-06-19 Robert Millan <rmh@aybabtu.com>
10012
fe987087 10013 * kern/main.c (grub_main): Export `prefix' variable immediately
650e1c79 10014 after it has been set by grub_machine_set_prefix().
10015
6ce63911 100162008-06-19 Robert Millan <rmh@aybabtu.com>
10017
10018 * commands/search.c (search_label, search_fs_uuid, search_file): Print
10019 search result when not saving to variable, not the other way around.
10020 When saving to variable, abort iteration as soon as a match is found.
10021
73940cec 100222008-06-19 Robert Millan <rmh@aybabtu.com>
10023
10024 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
10025 check for partition that provides /boot/grub. Its logic is flawed,
10026 as it prevents prepare_grub_to_access_device() from being called
10027 multiple times.
10028
3c62a39d 100292008-06-19 Robert Millan <rmh@aybabtu.com>
10030
10031 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
10032 "insmod" command directly when abstraction modules are needed,
fe987087 10033 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
3c62a39d 10034 since it had already been processed).
10035
47395a42 100362008-06-19 Pavel Roskin <proski@gnu.org>
10037
10038 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
10039 changed. This is needed in case GRUB_LIBDIR changes.
10040 * conf/i386-ieee1275.rmk: Likewise.
10041 * conf/i386-linuxbios.rmk: Likewise.
10042 * conf/i386-pc.rmk: Likewise.
10043 * conf/powerpc-ieee1275.rmk: Likewise.
10044
a145ac2d 100452008-06-18 Pavel Roskin <proski@gnu.org>
10046
10047 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
10048 kernel_elf_symlist.c to symlist.c for consistency with other
10049 architectures. Update all users.
10050 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
10051
7847c51e 100522008-06-18 Robert Millan <rmh@aybabtu.com>
10053
10054 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
10055 it in prefix.
10056
10057 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
10058 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
10059 a RAID device, run setup() for all members independently on whether
10060 LVM abstraction is being used.
10061 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
10062 If grub-mkimage has set `*install_dos_part == -2', don't override this
10063 value.
10064 Perform *install_dos_part adjustments independently on whether
10065 we're embedding or not.
10066 Clarify error message when image is too big for embedding.
10067 Remove duplicate *install_dos_part stanza.
10068
b23e5644 100692008-06-17 Robert Millan <rmh@aybabtu.com>
10070
10071 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
10072 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
10073 variables.
10074 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
10075 values in grub_ofconsole_normal_color and
10076 grub_ofconsole_highlight_color (they're not directly related to
10077 background and foreground).
10078 (grub_ofconsole_setcolorstate): Extract background and foreground
10079 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
10080
0aac2f79 100812008-06-17 Robert Millan <rmh@aybabtu.com>
10082
10083 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
10084 /boot/grub for the check in last commit, not /boot (they could be
10085 different partitions).
10086
3cca7ef3 100872008-06-16 Robert Millan <rmh@aybabtu.com>
10088
10089 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
10090 asked to setup access for the same partition that provides /boot,
10091 don't bother using UUIDs since our root already has the value we
10092 want.
10093
347396d8 100942008-06-16 Robert Millan <rmh@aybabtu.com>
10095
10096 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
10097 I2O devices.
10098 Patch from Sven Mueller <sven@debian.org>.
10099
991477f8 101002008-06-16 Robert Millan <rmh@aybabtu.com>
10101
10102 * util/update-grub.in: Check for $EUID instead of $UID.
10103 Reported by Vincent Zweije.
10104
d31a32a1 101052008-06-16 Bean <bean123ch@gmail.com>
10106
fe987087 10107 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
d31a32a1 10108 (grub_ext2_read_block): Likewise.
10109 (grub_ext2_read_inode): Likewise.
10110 (grub_ext2_mount): Likewise.
10111 (grub_ext2_close): Likewise.
10112 (grub_ext3_get_journal): Removed.
10113
fe987087 10114 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
d31a32a1 10115 (grub_reiserfs_read_symlink): Likewise.
10116 (grub_reiserfs_mount): Likewise.
10117 (grub_reiserfs_open): Likewise.
10118 (grub_reiserfs_read): Likewise.
10119 (grub_reiserfs_close): Likewise.
10120 (grub_reiserfs_get_journal): Removed.
10121
10122 * fs/fshelp.c (grub_fshelp_read): Removed.
10123 (grub_fshelp_map_block): Likewise.
10124
10125 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
10126 (grub_fshelp_journal): Likewise.
10127 (grub_fshelp_read): Likewise.
10128 (grub_fshelp_map_block): Likewise.
10129
3540a760 101302008-06-16 Pavel Roskin <proski@gnu.org>
10131
10132 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
10133 floating point anymore.
10134 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
10135
95614c84 101362008-06-15 Pavel Roskin <proski@gnu.org>
10137
10138 * commands/ls.c (grub_ls_list_files): Use integer calculations
10139 for human readable format, avoid floating point use.
10140 * kern/misc.c (grub_ftoa): Remove.
10141 (grub_vsprintf): Remove floating point support.
10142
50465dd6 101432008-06-15 Robert Millan <rmh@aybabtu.com>
10144
fe6b695a 10145 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
50465dd6 10146 devices.
10147 Reported by Max Vozeler.
10148
a9207284 101492008-06-15 Robert Millan <rmh@aybabtu.com>
10150
10151 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
10152 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
10153 skipped later.
10154 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
10155 the beginning of the prefix.
10156
10157 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
10158 It is assumed that if we have a memdisk, grub-mkimage has set
10159 grub_prefix to include the "(memdisk)" drive in it.
10160
a7cbd45a 101612008-06-15 Robert Millan <rmh@aybabtu.com>
10162
10163 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
10164 Initialize keyboard controller after registering the terminal, so that
10165 grub_printf() can be called from grub_keyboard_controller_init().
10166
21cf716a 101672008-06-15 Robert Millan <rmh@aybabtu.com>
10168
10169 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
10170 extent-btree which is written as big endian on disk.
10171 Reported by Alain Greppin <al@chilibi.org>.
10172
23a64d8e 101732008-06-14 Robert Millan <rmh@aybabtu.com>
10174
10175 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
10176 * util/i386/pc/grub-install.in (modules): Likewise.
10177
d687651c 101782008-06-13 Pavel Roskin <proski@gnu.org>
10179
10180 * commands/ls.c (grub_ls_list_files): Fix format warnings.
10181
dfe9ddd4 101822008-06-13 Bean <bean123ch@gmail.com>
10183
10184 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
10185
10186 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
10187
10188 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
10189 to indicate sparse block.
10190
16ae7781 101912008-06-12 Pavel Roskin <proski@gnu.org>
10192
e6d1a308 10193 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
10194 number, grub_fshelp_read() does it for us.
10195
16ae7781 10196 * fs/fshelp.c (grub_fshelp_read): New function. Implement
10197 linear disk read with journal translation.
10198 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
10199 * include/grub/fshelp.h: Declare grub_fshelp_read().
10200
40fd3a2b 102012008-06-09 Pavel Roskin <proski@gnu.org>
10202
10203 * fs/minix.c (grub_minix_mount): Handle error reading
10204 superblock.
10205
f5679726 102062008-06-08 Robert Millan <rmh@aybabtu.com>
10207
10208 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
10209 don't append the RAID prefix afterwards.
10210 Reported by Clint Adams.
10211
ce525529 102122008-06-08 Robert Millan <rmh@aybabtu.com>
10213
10214 Based on description from Pavel:
10215 * kern/disk.c (grub_disk_check_range): Rename to ...
10216 (grub_disk_adjust_range): ... this. Add a comment explaining the
10217 tasks performed by this function.
10218
ad4936a0 102192008-06-08 Robert Millan <rmh@aybabtu.com>
10220
10221 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
10222 `num_serial' (for consistency with other variables).
10223 (struct grub_ntfs_data): Add `uuid' member.
10224 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
10225 (grub_ntfs_uuid): New function.
10226 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
10227
dc20b0f9 102282008-06-07 Pavel Roskin <proski@gnu.org>
10229
10230 * util/biosdisk.c (open_device): Revert last change to the
10231 function, it broke installation. The sector needs to be
10232 different dependent on which device is opened.
10233
c5e3cfba 102342008-06-06 Robert Millan <rmh@aybabtu.com>
10235
10236 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
10237 rest of GRUB, and breakage doesn't happen if its value were modified.
10238
10239 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
10240 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
10241 a constant (same value).
10242 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
10243 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
10244
26a1f8c4 102452008-06-06 Robert Millan <rmh@aybabtu.com>
10246
10247 * util/biosdisk.c (open_device): Do not modify sector offset when
10248 accessing a partition. kern/disk.c already handles this for us.
10249
25d6b327 102502008-06-06 Robert Millan <rmh@aybabtu.com>
10251
10252 * util/grub-emu.c (grub_machine_init): Move code in this function from
10253 here ...
10254 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
10255 segfault in case grub_printf() is called).
10256
10257 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
10258 grub_probe. Update all users not to explicitly add it again.
10259 (grub_device): New variable; contains corresponding device for grubdir.
10260 (fs_module, partmap_module, devabstraction_module): Pass
10261 `--device ${grub_device}' to grub_probe to avoid traversing /dev
10262 every time.
10263
9ece62fb 102642008-06-05 Robert Millan <rmh@aybabtu.com>
10265
10266 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
10267 is found, print it (same layout as with labels).
10268
1ad36d37 102692008-06-04 Robert Millan <rmh@aybabtu.com>
10270
10271 * util/biosdisk.c (get_drive): Rename to ...
10272 (find_grub_drive): ... this. Update all users.
10273
10274 (get_os_disk): Rename to ...
10275 (convert_system_partition_to_system_disk): ... this. Update all users.
10276
10277 (find_drive): Rename to ...
10278 (find_system_device): ... this. Update all users.
10279
e6a30859 102802008-06-04 Robert Millan <rmh@aybabtu.com>
10281
10282 * util/biosdisk.c (get_os_disk): Handle IDA devices.
10283 * util/grub-mkdevicemap.c (get_mmc_disk_name)
10284 (make_device_map): Likewise.
10285
00c108a4 102862008-06-01 Robert Millan <rmh@aybabtu.com>
10287
10288 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
10289 before dereferencing it.
10290
10291 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
10292 union with fat12/fat16-specific ones. Add some new fields, including
10293 `num_serial' for both versions.
10294 (struct grub_fat_data): Add `uuid' member.
10295 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
10296 names. Initialize `data->uuid' using `num_serial'.
10297 (grub_fat_uuid): New function.
10298 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
10299
10300 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
10301 (grub_reiserfs_uuid): New function.
10302 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
10303 member.
10304
10305 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
10306 (grub_xfs_uuid): New function.
10307 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
10308
1385c5bb 103092008-06-01 Robert Millan <rmh@aybabtu.com>
10310
10311 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
10312 code that is backward compatible with pre-uuid search command.
10313
c682dfd7 103142008-05-31 Robert Millan <rmh@aybabtu.com>
10315
10316 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
10317 floppies after everything else, to ensure floppy drive isn't accessed
10318 unnecessarily (patch from Bean).
10319
b7db5d47 103202008-05-31 Robert Millan <rmh@aybabtu.com>
10321
10322 * commands/search.c (search_label, search_fs_uuid, search_file): Do
10323 not print device names when we were asked to set a variable.
10324
6e037aa9 103252008-05-31 Robert Millan <rmh@aybabtu.com>
10326
10327 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
10328 using "cursor-on" and "cursor-off" commands (understood at least by
10329 the Open Firmware flavour on OLPC).
10330
41305bc8 103312008-05-31 Michael Gorven <michael@gorven.za.net>
10332
10333 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
10334 on and off sequences.
10335
69ba137e 103362008-05-31 Robert Millan <rmh@aybabtu.com>
10337
10338 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
10339 * util/update-grub.in: Likewise.
10340
520ae21b 103412008-05-30 Pavel Roskin <proski@gnu.org>
10342
10343 * util/biosdisk.c (linux_find_partition): Simplify logic and
10344 make the code more universal. Keep special processing for
10345 devfs, but use a simple rule for all other devices. If the
10346 device ends with a number, append 'p' and the partition number.
10347 Otherwise, append only the partition number.
10348
5786569b 103492008-05-30 Robert Millan <rmh@aybabtu.com>
10350
10351 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
10352 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
10353 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
10354 the `root' parameter to Linux.
10355
51500452 103562008-05-30 Robert Millan <rmh@aybabtu.com>
10357
10358 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
10359 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
10360 --fs_uuid with --fs-uuid.
10361 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
10362 all filesystems support them).
10363
811d3878 103642008-05-30 Robert Millan <rmh@aybabtu.com>
10365
10366 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
f19dbdb7 10367 grub_printf() flags, since we're printing in units of 2 bytes.
811d3878 10368
cab63c95 103692008-05-30 Robert Millan <rmh@aybabtu.com>
10370
10371 * util/grub.d/00_header.in: Remove obsolete comment referencing
10372 convert_system_path_to_grub_path().
10373 * util/update-grub.in: Likewise.
10374 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
10375 (convert_system_path_to_grub_path): Add a warning message explaining
10376 that this function is deprecated. Rely on is_path_readable_by_grub()
10377 for the readability checks.
10378 (font_path): Use is_path_readable_by_grub() for the readability
10379 check rather than convert_system_path_to_grub_path().
10380
972e2f7a 103812008-05-30 Robert Millan <rmh@aybabtu.com>
10382
10383 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
10384 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
10385 converting it first.
10386 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
10387 grub.cfg for access to font file, and afterwards call it again to set
10388 the root device.
10389
62191274 103902008-05-30 Robert Millan <rmh@aybabtu.com>
10391
10392 * commands/search.c (options): Add --fs_uuid option.
10393 (search_fs_uuid): New function.
10394 (grub_cmd_search): Fix --set argument passing.
10395 Use search_fs_uuid() when requested via --fs_uuid.
10396 (grub_search_init): Update help message.
10397 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
10398 and redeclare it as an array of 16-bit words.
10399 (grub_ext2_uuid): New function.
10400 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
10401 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
10402 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
10403 (GRUB_DEVICE_BOOT_UUID): New variables.
10404 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
10405 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
10406 whenever possible.
10407 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
10408 just assume `root' variable has the right value.
10409 * util/grub.d/10_linux.in: Likewise.
10410 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
10411 via PRINT_FS_UUID.
10412 (main): Recognise `-t fs_uuid' argument.
10413
01b73ec8 104142008-05-30 Robert Millan <rmh@aybabtu.com>
10415
10416 * util/biosdisk.c (map): Redefine structure to hold information
10417 about GRUB drive name.
fe6b695a 10418 (get_drive): Reimplement without assuming (and verifying) BIOS-like
01b73ec8 10419 drive names.
10420 (call_hook): Remove.
10421 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
10422 member. Assume drive has partitions.
10423 (grub_util_biosdisk_open): Access device names via `.device' struct
10424 member.
10425 (open_device): Likewise.
10426 (find_drive): Likewise.
10427 (read_device_map): Adjust map[] usage to match the new struct
10428 definition. Don't check for duplicates (still possible, but not cheap
10429 anymore).
10430 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
10431 (make_device_name): Remove assumption of BIOS-like drive names.
10432
22f16596 104332008-05-30 Pavel Roskin <proski@gnu.org>
10434
10435 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
10436 compiling execute.c doesn't need grub_script.tab.h anymore.
10437 (normal/command.c_DEPENDENCIES): Likewise.
10438 (normal/function.c_DEPENDENCIES): Likewise.
10439 * conf/i386-ieee1275.rmk: Likewise.
10440 * conf/i386-linuxbios.rmk: Likewise.
10441 * conf/i386-pc.rmk: Likewise.
10442 * conf/powerpc-ieee1275.rmk: Likewise.
10443 * conf/sparc64-ieee1275.rmk: Likewise.
10444
528ad8f2 104452008-05-29 Pavel Roskin <proski@gnu.org>
10446
d1dff95d 10447 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
10448 when scanning metadata for volume group name.
10449
528ad8f2 10450 * include/grub/script.h: Don't include grub_script.tab.h. It's
10451 a generated file, which may only be included from the files with
10452 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
10453 use union YYSTYPE, as the later allows forward declaration.
10454 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
10455
47248e08 104562008-05-29 Robert Millan <rmh@aybabtu.com>
10457
10458 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
10459 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
10460 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
10461 (grub_console_checkkey): Add grub_dprintf() call to report unknown
10462 scan codes.
10463
ee632529 104642008-05-29 Robert Millan <rmh@aybabtu.com>
10465
10466 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
10467 control key combinations.
10468
eee96e08 104692008-05-29 Robert Millan <rmh@aybabtu.com>
10470
10471 * util/powerpc/ieee1275/grub-install.in: Move from here ...
10472 * util/ieee1275/grub-install.in: ... to here.
10473 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
10474 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
10475 (grub_install_SOURCES): Likewise.
10476
da9a6a94 104772008-05-29 Robert Millan <rmh@aybabtu.com>
10478
10479 * fs/affs.c: Update copyright year.
10480 * fs/ext2.c: Likewise.
10481 * fs/fshelp.c: Likewise.
10482 * fs/hfsplus.c: Likewise.
10483 * fs/ntfs.c: Likewise.
10484 * fs/xfs.c: Likewise.
10485 * include/grub/fshelp.h: Likewise.
10486 * util/grub-mkdevicemap.c: Likewise.
10487
12e65f3a 104882008-05-28 Robert Millan <rmh@aybabtu.com>
10489
10490 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
10491 might need to be fatfs to support some firmware implementations
10492 (e.g. OFW or EFI).
10493
23023641 104942008-05-28 Robert Millan <rmh@aybabtu.com>
10495
10496 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
10497 devices.
10498 * util/grub-mkdevicemap.c (get_mmc_disk_name)
10499 (make_device_map): Likewise.
10500
887d2619 105012008-05-20 Bean <bean123ch@gmail.com>
10502
10503 * fs/fshelp.c (grub_fshelp_map_block): New function.
10504 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
10505 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
10506
10507 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
10508 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
10509 (grub_fshelp_journal): New structure.
10510 (grub_fshelp_map_block): New function prototype.
10511 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
10512 (grub_fshelp_map_block): Likewise.
10513
10514 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
10515 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
10516 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
10517 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
10518 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
10519 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
10520 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
10521 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
10522 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
10523 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
10524 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
10525 (grub_ext2_sblock): New members for journal support.
10526 (grub_ext3_journal_header): New structure.
10527 (grub_ext3_journal_revoke_header): Likewise.
10528 (grub_ext3_journal_block_tag): Likewise.
10529 (grub_ext3_journal_sblock): Likewise.
10530 (grub_fshelp_node): New members logfile and journal.
10531 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
10532 grub_fshelp_map_block to get real block number.
10533 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
10534 number.
10535 (grub_ext2_read_inode): Likewise.
10536 (grub_ext3_get_journal): New function.
10537 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
10538 (grub_ext2_close): Release memory used by journal.
10539
10540 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
10541 (REISERFS_MAGIC_DESC_BLOCK): New macro.
10542 (grub_reiserfs_transaction_header): Renamed to
10543 grub_reiserfs_description_block, replace field data with real_blocks.
10544 (grub_reiserfs_commit_block): New structure.
10545 (grub_reiserfs_data): New member journal.
10546 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
10547 number.
10548 (grub_reiserfs_read_symlink): Likewise.
10549 (grub_reiserfs_iterate_dir): Likewise.
10550 (grub_reiserfs_open): Likewise.
10551 (grub_reiserfs_read): Likewise.
10552 (grub_reiserfs_get_journal): New function.
10553 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
10554 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
10555 using grub_reiserfs_get_journal.
10556 (grub_reiserfs_close): Release memory used by journal.
10557
10558 * fs/affs.c (grub_affs_read_block): Change block type to
10559 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
10560
10561 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
10562
10563 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
10564
10565 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
10566
10567 * fs/udf.c (grub_udf_read_block): Change block type to
10568 grub_disk_addr_t. Use type cast to avoid warning.
10569
10570 * fs/xfs.c (grub_xfs_read_block): Likewise.
10571
b7c6bed5 105722008-05-16 Christian Franke <franke@computer.org>
10573
10574 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
10575 to ensure that break with ESC will always work.
10576 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
10577 Remove ESC from keyboard queue.
10578
eedf167f 105792008-05-16 Christian Franke <franke@computer.org>
10580
10581 * util/biosdisk.c: [__CYGWIN__] Add includes.
10582 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
10583 (get_os_disk): Move variable declarations to OS specific
10584 parts to avoid warning.
10585 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
10586 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
10587 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
10588 Cygwin.
10589 * util/getroot.c: [__CYGWIN__] Add includes.
10590 (strip_extra_slashes): Fix "/" case.
10591 [__CYGWIN__] (get_win32_path): New function.
10592 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
10593 [__CYGWIN__] (find_root_device): Disable.
10594 [__CYGWIN__] (get_bootsec_serial): New function.
10595 [__CYGWIN__] (find_cygwin_root_device): Likewise.
10596 [__linux__] (grub_guess_root_device): Add early returns to simplify
10597 structure.
10598 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
10599 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
10600 check for Linux only.
10601
a079699e 106022008-05-15 Bean <bean123ch@gmail.com>
10603
10604 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
10605 keyboard hang problem in apple's intel mac.
10606
1cf4059a 106072008-05-09 Robert Millan <rmh@aybabtu.com>
10608
10609 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
10610 devices.
10611 * util/grub-mkdevicemap.c (get_virtio_disk_name)
10612 (make_device_map): Likewise.
10613 Reported by Aurelien Jarno <aurel32@debian.org>
10614
ed759390 106152008-05-07 Ian Campbell <ijc@hellion.org.uk>
10616
10617 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
10618 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
10619 (make_device_map): Output entries for xvd type disks.
10620
b56c4eaa 106212008-05-07 Robert Millan <rmh@aybabtu.com>
10622
10623 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
10624 devices.
10625 * util/grub-mkdevicemap.c (get_cciss_disk_name)
10626 (make_device_map): Likewise.
10627 Reported by Roland Dreier <rdreier@cisco.com>
10628
7f8866ed 106292008-05-07 Robert Millan <rmh@aybabtu.com>
10630
10631 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
10632 grub_strstr() call. Correct a few mistakes in failure path handling.
10633
b0346e0f 106342008-05-06 Robert Millan <rmh@aybabtu.com>
10635
10636 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
10637 Do not print a trailing slash (therefore, the root directory is an
10638 empty string).
10639 (convert_system_path_to_grub_path): Do not remove trailing slash
10640 from make_system_path_relative_to_its_root() output.
10641
10642 * util/i386/pc/grub-install.in: Add trailing slash to output from
10643 make_system_path_relative_to_its_root().
10644
6cf12cbd 106452008-05-06 Robert Millan <rmh@aybabtu.com>
10646
10647 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
10648 ensures that output lines aren't intermangled with those sent to
10649 stderr (via grub_util_info()).
10650 * util/grub-probe.c (grub_refresh): Likewise.
10651 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
10652
0fbb3117 106532008-05-05 Christian Franke <franke@computer.org>
10654
10655 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
10656 Add Cygwin device names.
10657 (get_ide_disk_name) [__CYGWIN__]: Likewise.
10658 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
10659 (check_device): Return error instead of success on empty name.
10660 (make_device_map): Move label inside linux specific code to
10661 prevent compiler warning.
10662
8124cdb7 106632008-04-30 Robert Millan <rmh@aybabtu.com>
10664
10665 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
10666 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
10667 first boot option.
10668 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
10669
094c01d0 106702008-04-29 Robert Millan <rmh@aybabtu.com>
10671
10672 * docs/grub.cfg: New file (example GRUB configuration).
10673
f4b1fc02 106742008-04-26 Robert Millan <rmh@aybabtu.com>
10675
329ce2a5 10676 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
10677 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
10678 and `disk/ieee1275/nand.c'.
f4b1fc02 10679
25f16ec1 106802008-04-25 Bean <bean123ch@gmail.com>
f19dbdb7 10681
25f16ec1 10682 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
10683 i386-linuxbios.
10684
10685 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
10686 change the buffer size to 4096 for cdrom device.
10687
10688 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
10689 and nand.mod.
10690 (_linux_mod_SOURCES): New variable.
10691 (_linux_mod_CFLAGS): Likewise.
10692 (_linux_mod_LDFLAGS): Likewise.
10693 (linux_mod_SOURCES): Likewise.
10694 (linux_mod_CFLAGS): Likewise.
10695 (linux_mod_LDFLAGS): Likewise.
10696 (nand_mod_SOURCES): Likewise.
10697 (nand_mod_CFLAGS): Likewise.
10698 (nand_mod_LDFLAGS): Likewise.
10699
10700 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
10701 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
10702 type property. (nand device in olpc don't have this property)
10703
10704 * include/grub/disk.h (grub_disk_dev_id): New macro
10705 GRUB_DISK_DEVICE_NAND_ID.
10706
10707 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
10708 function prototype.
10709 (grub_rescue_cmd_initrd): Likewise.
10710
10711 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
10712 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
10713 ofw_cif_handler and ofw_idt, adjust padding number.
f19dbdb7 10714
25f16ec1 10715 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
10716 GRUB_MACHINE_IEEE1275 is defined.
10717
10718 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
10719 Use NESTED_FUNC_ATTR attribute on the hook parameter.
10720
10721 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
10722 on nested function heap_init.
10723 (grub_upper_mem): New variable for i386-ieee1275.
10724 (grub_get_extended_memory): New function for i386-ieee1275.
10725 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
10726
10727 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
10728 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
10729 property.
f19dbdb7 10730
25f16ec1 10731 * loader/i386/ieee1275/linux.c: New file.
10732
10733 * loader/i386/ieee1275/linux_normal.c: New file.
10734
10735 * disk/ieee1275/nand.c: New file.
10736
e89d61e9 107372008-04-18 Thomas Schwinge <tschwinge@gnu.org>
10738
10739 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
10740 value.
10741 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
10742
602566f6 107432008-04-18 Robert Millan <rmh@aybabtu.com>
10744
10745 Restructures early code path on ieee1275 to unify grub_main() as
10746 the first C function that is executed in every platform.
10747
10748 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
10749 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
10750 cmain().
10751 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
10752 * kern/ieee1275/cmain.c (cmain): Rename to ...
10753 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
10754 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
10755 at the beginning.
10756
57490c2b 107572008-04-18 Robert Millan <rmh@aybabtu.com>
10758
10759 * util/update-grub.in: Fix syntax error when setting
10760 `GRUB_PRELOAD_MODULES'.
10761 Reported by Stephane Chazelas <stephane@artesyncp.com>
10762
1977517d 107632008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
10764
10765 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
10766 section into account, newer toolchains generate unique build ids
10767 * configure.ac: remove the test for --build-id=none acceptance,
e0c5dacb 10768 we want build ids to be preserved
1977517d 10769 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
10770 far from other sections don't cause the raw binary images grow
10771 size
10772
bfb1f1a2 107732008-04-15 Robert Millan <rmh@aybabtu.com>
10774
10775 * disk/lvm.c: Update copyright year.
10776 * kern/misc.c: Likewise.
10777
01979850 107782008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
10779
10780 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
f19dbdb7 10781 there is no memory left for physical volume name.
01979850 10782
0a1150e2 107832008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
10784
10785 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
10786 volume name mapping to support bigger than 9 character names properly.
10787
82ead3fe 107882008-04-13 Robert Millan <rmh@aybabtu.com>
10789
10790 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
10791 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
10792
e54a72f5 107932008-04-13 Christian Franke <franke@computer.org>
10794
10795 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
10796 to create a floppy emulation boot CD when non emulation mode
10797 does not work.
10798 Enable Joliet CD filesystem extension.
10799
9fe86034 108002008-04-13 Robert Millan <rmh@aybabtu.com>
10801
10802 * kern/misc.c (grub_strncat): Fix off-by-one error.
10803 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
10804
10805 * kern/env.c (grub_env_context_close): Clear current context, not
10806 previous one.
10807 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
10808
10809 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
10810
7ceeee39 108112008-04-13 Robert Millan <rmh@aybabtu.com>
10812
10813 Improve robustness when handling LVM.
10814
10815 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
f19dbdb7 10816 (and leave `*p' unmodified).
7ceeee39 10817 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
10818 through it.
10819 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
10820 iterating through it.
10821 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
10822 through it.
fe6b695a 10823 (grub_lvm_scan_device): Check the return value (and fail gracefully
7ceeee39 10824 when due) on each grub_lvm_getvalue() or grub_strstr() call.
10825 Don't assume `vg->pvs != NULL' when iterating through it.
10826
58cd3d85 108272008-04-13 Robert Millan <rmh@aybabtu.com>
10828
10829 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
10830 * genmk.rb (partmap): New variable.
10831 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
10832 (#{partmap}): New target rule.
10833 * genpartmaplist.sh: New file.
10834 * Makefile.in (pkglib_DATA): Add partmap.lst.
10835 (partmap.lst): New target rule.
10836 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
10837 modules (including all partition maps), instead of preloading them.
10838
78b51059 108392007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
10840
10841 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
10842 `linux-boot-prober' (if installed) to detect other operating
10843 systems which are installed on the computer and add them to
10844 the boot menu.
10845 * conf/common.rmk: Build and install 30_os-prober.
10846
a91627b4 108472008-04-12 Robert Millan <rmh@aybabtu.com>
10848
10849 * kern/powerpc/ieee1275/init.c: Move from here ...
10850 * kern/ieee1275/init.c: ... to here. Update all users.
10851
10852 * kern/powerpc/ieee1275/cmain.c: Move from here ...
10853 * kern/ieee1275/cmain.c: ... to here. Update all users.
10854
10855 * kern/powerpc/ieee1275/openfw.c: Move from here ...
10856 * kern/ieee1275/openfw.c: ... to here. Update all users.
10857
10858 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
10859 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
10860
322562ea 108612008-04-10 Pavel Roskin <proski@gnu.org>
10862
10863 * configure.ac: Always use "_cv_" in cache variables for
10864 compatibility with Autoconf 2.62.
10865
a02a73c5 108662008-04-07 Robert Millan <rmh@aybabtu.com>
10867
10868 Revert grub/machine/init.h addition by Pavel (since it breaks on
10869 i386-ieee1275 and others):
10870 * util/i386/pc/misc.c: Remove grub/machine/init.h.
10871 * util/powerpc/ieee1275/misc.c: Likewise.
10872
25c024b1 108732008-04-07 Robert Millan <rmh@aybabtu.com>
10874
10875 * util/grub-probe.c (probe): Improve error message.
10876
3cbd2f98 108772008-04-07 Robert Millan <rmh@aybabtu.com>
10878
10879 * util/biosdisk.c (read_device_map): Skip devices that don't exist
10880 (this prevents the presence of a bogus entry from ruining the whole
10881 thing).
10882
87a297bf 108832008-04-06 Pavel Roskin <proski@gnu.org>
10884
36747a62 10885 * util/biosdisk.c: Include grub/util/biosdisk.h.
10886 * util/grub-fstest.c (execute_command): Make static.
10887 * util/grub-mkdevicemap.c (check_device): Likewise.
10888 * util/i386/pc/misc.c: Include grub/machine/init.h.
10889 * util/powerpc/ieee1275/misc.c: Likewise.
10890 * util/lvm.c: Include grub/util/lvm.h.
10891 * util/misc.c: Include grub/kernel.h, grub/misc.h and
10892 grub/cache.h.
10893 * util/raid.c: Include grub/util/raid.h.
10894 (grub_util_getdiskname): Make static.
10895
87a297bf 10896 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
10897 grub_hostfs_fini(), as they are called from grub_init_all() and
10898 grub_fini_all() respectively. This fixes an infinite loop in
10899 grub-fstest due to double registration of hostfs.
10900 Reported by Christian Franke <Christian.Franke@t-online.de>
10901
f6ce7629 109022008-04-05 Pavel Roskin <proski@gnu.org>
10903
10904 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
10905 all 8 functions. Otherwise, probe function 0 only.
10906
070e49e4 109072008-04-04 Pavel Roskin <proski@gnu.org>
10908
8b088a4c 10909 * commands/lspci.c (grub_lspci_iter): Print the bus number
10910 correctly.
10911
4f657021 10912 * commands/lspci.c (grub_pci_classes): Fix typos.
10913 (grub_lspci_iter): Don't print func twice. Print vendor ID
10914 before device ID, as it's normally done.
10915
070e49e4 10916 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
10917 Fix signedness warnings.
10918 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
10919 Likewise.
10920 * util/ieee1275/get_disk_name.c: Include config.h so that
10921 _GNU_SOURCE is defined and getline() is declared. Mark an
10922 unused argument as such. Fix a signedness warning.
10923
ba7328dc 109242008-04-02 Pavel Roskin <proski@gnu.org>
10925
26887f22 10926 * genkernsyms.sh.in: Use more robust assignments for CC and
10927 srcdir. Quote srcdir.
10928 * gensymlist.sh.in: Likewise. Assert at the compile time that
10929 the symbol table is not empty.
10930
ba7328dc 10931 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
10932 * fs/cpio.c (grub_cpio_read): Likewise.
10933
0f582c6b 109342008-04-01 Pavel Roskin <proski@gnu.org>
10935
4b6e1995 10936 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
10937 * disk/host.c (grub_host_open): Likewise.
10938 * disk/loopback.c (grub_loopback_open): Likewise.
10939 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
10940 disk->id as in disk/host.c, not a multi-character constant.
10941
828a2768 10942 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
10943 later is obsolete, potentially dangerous and sets a bad example.
10944 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
10945 * util/misc.c (grub_util_get_image_size): Likewise.
10946
2bb4fb47 10947 * disk/loopback.c (options): Improve help for "--partitions".
10948
0f582c6b 10949 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
10950 options to align them with the short options, e.g. "echo -e".
10951
a33224e0 109522008-03-31 Bean <bean123ch@gmail.com>
10953
10954 * video/reader/png.c (grub_png_data): New member is_16bit and
10955 image_data.
10956 (grub_png_decode_image_header): Detect 16 bit png image.
10957 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
10958 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
10959 (grub_video_reader_png): Release memory occupied by image_data.
10960
10961 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
10962 4096 bytes.
10963 (grub_nfs_mount): Skip the test for sector per cluster.
10964
10965 * include/grub/ntfs.h (MAX_SPC): Removed.
10966
86cb4f54 109672008-03-31 Bean <bean123ch@gmail.com>
10968
10969 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
10970 (grub_probe_SOURCES): Add fs/afs.c.
10971 (grub_fstest_SOURCES): Likewise.
10972 (afs_mod_SOURCES): New variable.
10973 (afs_mod_CFLAGS): Likewise.
10974 (afs_mod_LDFLAGS): Likewise.
10975
10976 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
10977 (grub_emu_SOURCES): Likewise.
10978
10979 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
10980
10981 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10982
10983 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
10984
10985 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10986
10987 * fs/afs.c: New file.
10988
17c74c21 109892008-03-30 Pavel Roskin <proski@gnu.org>
10990
4cb68e89 10991 * disk/host.c: Include grub/misc.h to fix a warning.
10992 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
10993 warnings about implicit declarations.
10994
8790bb04 10995 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
10996 variable.
10997 * include/grub/i386/loader.h: Change declaration of
10998 grub_linux_boot() to match what grub_loader_set() expects.
10999 * util/getroot.c (grub_guess_root_device): Return const char* to
11000 fix a warning.
11001 * util/grub-probe.c (probe): Fix a warning about uninitialized
11002 abstraction_name variable.
11003 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
11004 second argument as unused to fix a warning.
11005
9a3f3296 11006 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
11007 missing grub_error() call.
11008
0ecef90d 11009 * util/update-grub_lib.in: Define datarootdir, since Autoconf
11010 2.60 and newer uses it to define datadir.
11011
0bf6d401 11012 * commands/sleep.c: Fix warning about implicit declaration.
11013 * disk/memdisk.c: Likewise.
11014 * loader/aout.c: Likewise.
11015 * loader/i386/bsd_normal.c: Likewise.
11016 * util/grub-probe.c: Likewise.
11017
7cdacf97 11018 * commands/i386/cpuid.c (has_longmode): Make static.
11019 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
11020 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
11021
17c74c21 11022 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
11023 GDT. This is more robust, as %ds can change.
11024 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
11025 calling real_to_prot().
11026 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
11027
80a3e68b 110282008-03-28 Pavel Roskin <proski@gnu.org>
11029
11030 * kern/i386/pc/startup.S: Assert that uncompressed functions
11031 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
11032 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
11033 code, as they push parts of the code (error handlers) beyond
11034 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
11035 code as correctness and size.
11036
77bcd272 110372008-03-28 Pavel Roskin <proski@gnu.org>
11038
11039 * kern/i386/pc/startup.S
11040 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
11041 data block address to the real mode, keep offset minimal. This
11042 works around a bug in AWARD BIOS on old Athlon systems, which
11043 makes CD detection hang.
11044
c5dfd43b 110452008-03-26 Pavel Roskin <proski@gnu.org>
11046
11047 * normal/color.c (grub_parse_color_name_pair): Make `name' a
11048 const.
11049 * include/grub/normal.h: Add grub_parse_color_name_pair()
11050 declaration.
11051
bf962df2 110522008-03-24 Bean <bean123ch@gmail.com>
11053
11054 * disk/i386/pc/biosdisk.c (cd_start): Removed.
11055 (cd_count): Removed.
11056 (cd_drive): New variable.
11057 (grub_biosdisk_get_drive): Don't check for (cdN) device.
11058 (grub_biosdisk_call_hook): Likewise.
11059 (grub_biosdisk_iterate): Change cdrom detection method.
11060 (grub_biosdisk_open): Replace cd_start with cd_drive.
11061 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
11062 detect cdrom device.
11063
11064 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
11065 Removed.
11066 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
11067 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
11068 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
11069 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
11070 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
11071 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
11072 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
11073 (grub_biosdisk_cdrp): New structure.
11074 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
11075
11076 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
11077
11078 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
11079 device.
11080
11081 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
11082 New function.
11083
68e7fc7a 110842008-03-20 Robert Millan <rmh@aybabtu.com>
11085
11086 Remove 2 TiB limit in ata.mod.
11087 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
11088 (grub_ata_dumpinfo): Print sector count with 0x%llx.
11089 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
11090 grub_uint64_t instead of grub_uint32_t.
11091
38ad2cf5 110922008-03-05 Bean <bean123ch@gmail.com>
11093
11094 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
11095 (grub_multiboot): Set boot device.
11096
11097 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
11098
2b89344e 110992008-03-02 Bean <bean123ch@gmail.com>
11100
11101 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
11102 symlink_buffer.
11103
87a95d1f 111042008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
11105
11106 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
11107 texinfo.tex.
11108
11109 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
11110 modified.
11111
11112 * docs/fdl.texi: New file.
f19dbdb7 11113
87a95d1f 11114 * docs/mdate-sh: New file. Copied from gnulib.
11115 * docs/texinfo.tex: Likewise.
11116
11117 * config.guess: Updated from gnulib.
11118 * install-sh: Likewise.
11119
7dc15d8e 111202008-02-28 Robert Millan <rmh@aybabtu.com>
11121
11122 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
11123 (aout_mod_SOURCES): New variable.
11124 (aout_mod_CFLAGS): Likewise.
11125 (aout_mod_LDFLAGS): Likewise.
11126
11127 * conf/i386-ieee1275.rmk: Likewise.
11128
b00ab696 111292008-02-28 Robert Millan <rmh@aybabtu.com>
11130
11131 * util/update-grub.in: Reorganise terminal validity check. Accept
11132 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
11133 Based on suggestion by Franklin PIAT.
11134
79ca2d78 111352008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
11136
11137 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
11138 function.
11139 * util/getroot.c (grub_util_check_block_device): New function that
11140 returns the given argument if it is a block device and returns NULL else.
11141 * util/grub-probe.c (argument_is_device): New variable.
11142 (probe): Promote device_name from a variable to an argument. Receive
11143 device_name from grub_util_check_block_device() if path is NULL and from
11144 grub_guess_root_device() else. Do not free() device_name anymore.
f19dbdb7 11145 (options): Introduce new parameter '-d, --device'.
79ca2d78 11146 (main): Add description of the new parameter to the help screen.
11147 Rename path variable to argument. Set argument_is_device if the '-d'
11148 option is given. Pass argument to probe() depending on
11149 argument_is_device.
11150
0d16e571 111512008-02-24 Bean <bean123ch@gmail.com>
11152
11153 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
11154 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
11155 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
11156 (GRUB_ISO9660_VOLDESC_PART): Likewise.
11157 (GRUB_ISO9660_VOLDESC_END): Likewise.
11158 (grub_iso9660_primary_voldesc): New member escape.
11159 (grub_iso9660_data): New member joliet.
11160 (grub_iso9660_convert_string): New function.
11161 (grub_iso9660_mount): Detect joliet extension.
11162 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
11163 (grub_iso9660_iso9660_label): Likewise.
11164
11165 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
11166 (grub_setup_SOURCES): Add fs/udf.c.
11167 (grub_fstest_SOURCES): Likewise.
11168 (udf_mod_SOURCES): New variable.
11169 (udf_mod_CFLAGS): Likewise.
11170 (udf_mod_LDFLAGS): Likewise.
11171
11172 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
11173 (grub_emu_SOURCES): Likewise.
11174
11175 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
11176
11177 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11178
11179 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
11180
11181 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11182
11183 * fs/udf.c: New file.
11184
8a594a17 111852008-02-24 Robert Millan <rmh@aybabtu.com>
11186
11187 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
11188 (normal/lexer.c_DEPENDENCIES): New variables.
11189 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
11190 (normal/lexer.c_DEPENDENCIES): Likewise.
11191 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
11192 (normal/lexer.c_DEPENDENCIES): Likewise.
11193 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
11194 (normal/lexer.c_DEPENDENCIES): Likewise.
11195 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
11196 (normal/lexer.c_DEPENDENCIES): Likewise.
11197 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
11198 (normal/lexer.c_DEPENDENCIES): Likewise.
11199
2dc33c03 112002008-02-23 Robert Millan <rmh@aybabtu.com>
11201
11202 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
11203 since they were intended to be in hex. This didn't break previously
11204 because of a bug in gpt_partition_map_iterate() (see below).
11205
11206 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
11207 when checking the validity of GPT header.
11208 Remove `partno', since it always provides the same information as `i'.
11209
f6f4cfb0 112102008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
11211
11212 * include/grub/efi/time.h: Fix a wrong comment.
11213
79ff665f 112142008-02-19 Pavel Roskin <proski@gnu.org>
11215
11216 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
11217 message.
11218
d38e24c2 112192008-02-19 Bean <bean123ch@gmail.com>
11220
11221 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
11222 (aout_mod_SOURCES): New variable.
11223 (aout_mod_CFLAGS): Likewise.
11224 (aout_mod_LDFLAGS): Likewise.
11225 (_bsd_mod_SOURCES): New variable.
11226 (_bsd_mod_CFLAGS): Likewise.
11227 (_bsd_mod_LDFLAGS): Likewise.
11228 (bsd_mod_SOURCES): New variable.
11229 (bsd_mod_CFLAGS): Likewise.
11230 (bsd_mod_LDFLAGS): Likewise.
11231
11232 * include/grub/aout.h: New file.
11233
11234 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
11235
11236 * include/grub/i386/bsd.h: New file.
11237
11238 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
11239 to make it public.
11240
11241 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
11242 function is called, so that it's possible to change it inside the hook.
11243 (grub_elf64_load): Likewise.
11244 (grub_elf_file): Don't close the file if elf header is not found.
11245 (grub_elf_close): Close the file if grub_elf_file fails (The new
11246 grub_elf_file won't close it).
11247 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
11248 (grub_elf64_size): Likewise.
11249
11250 * kern/i386/loader.S (grub_unix_real_boot): New function.
11251
11252 * loader/aout.c: New file.
11253
11254 * loader/i386/bsd.c: New file.
11255
11256 * loader/i386/bsd_normal.c: New file.
11257
11258 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
11259
11260 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
fe987087 11261 can test other formats.
d38e24c2 11262
b93bdb0f 112632008-02-19 Robert Millan <rmh@aybabtu.com>
11264
11265 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
11266 (grub_gpt_partition_type_empty): Redefine with macro from
11267 `<grub/gpt_partition.h>'.
11268 (gpt_partition_map_iterate): Adjust partition type comparison.
11269
11270 Export `entry' as partmap-specific `part.data' struct.
11271 (grub_gpt_header, grub_gpt_partentry): Move from here ...
11272
11273 * include/grub/gpt_partition.h (grub_gpt_header)
11274 (grub_gpt_partentry): ... to here (new file).
11275
11276 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
11277
11278 (grub_gpt_partition_type_bios_boot): New const variable, defined
11279 with macro from `<grub/gpt_partition.h>'.
11280
11281 (setup): Replace `first_start' with `embed_region', which keeps
11282 track of the embed region (and is partmap-agnostic).
11283
11284 Replace find_first_partition_start() with find_usable_region(),
11285 which finds a usable region for embedding using partmap-specific
11286 knowledge (supports PC/MSDOS and GPT).
11287
11288 Fix all assumptions that the embed region start at sector 1, using
11289 `embed_region.start' from now on. Similarly, use `embed_region.end'
11290 rather than `first_start' to calculate available size.
11291
11292 In grub_util_info() message, replace "into after the MBR" with an
11293 indication of the specific sector our embed region starts at.
11294
66cb40f6 112952008-02-19 Robert Millan <rmh@aybabtu.com>
11296
11297 * DISTLIST: Replace `commands/ieee1275/halt.c' and
11298 `commands/ieee1275/reboot.c' with `commands/halt.c' and
11299 `commands/reboot.c'.
11300 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
11301 (halt_mod_SOURCES): Likewise.
11302 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
11303 (halt_mod_SOURCES): Likewise.
11304
b7202015 113052008-02-17 Christian Franke <franke@computer.org>
11306
11307 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
11308
32b0fc49 113092008-02-17 Robert Millan <rmh@aybabtu.com>
11310
11311 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
11312 set `first_start' to 0 for non-PC/MSDOS partition maps.
11313
aca63502 113142008-02-16 Robert Millan <rmh@aybabtu.com>
11315
11316 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
11317 do not assume partition map is PC/MSDOS before performing checks that
11318 are specific to that layout.
11319
0de8be86 113202008-02-13 Robert Millan <rmh@aybabtu.com>
11321
11322 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
11323 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
11324 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
11325
c3db8364 113262008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
11327
11328 * configure.ac: Only a cosmetic change on the handling of
11329 -fno-stack-protector.
11330
f714229e 113312008-02-12 Alexandre Boeglin <alex@boeglin.org>
11332
c3db8364 11333 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
11334 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
11335 reboot.c.
f714229e 11336 (grub_install_SOURCES): Add halt.mod and reboot.mod.
11337 (halt_mod_SOURCES): New variable.
11338 (halt_mod_CFLAGS): Likewise.
11339 (halt_mod_LDFLAGS): Likewise.
11340 (reboot_mod_SOURCES): Likewise.
11341 (reboot_mod_CFLAGS): Likewise.
11342 (reboot_mod_LDFLAGS): Likewise.
11343
c3db8364 11344 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
11345 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
11346 reboot.c.
f714229e 11347 (halt_mod_SOURCES): Likewise.
11348 (reboot_mod_SOURCES): Likewise.
11349
c3db8364 11350 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
11351 commands/i386/pc/reboot.c by commands/reboot.c.
f714229e 11352 (reboot_mod_SOURCES): Likewise.
11353
11354 * commands/i386/pc/reboot.c: merge this file ...
11355
11356 * commands/ieee1275/reboot.c: ... and this file ...
11357
11358 * commands/reboot.c: ... to this file.
c3db8364 11359 Add some precompiler directive to include the correct header for
11360 each machine.
f714229e 11361
11362 * commands/ieee1275/halt.c: move this file ...
11363
11364 * commands/halt.c: ... to here.
c3db8364 11365 Add some precompiler directive to include the correct header for
11366 each machine.
f714229e 11367
11368 * include/grub/efi/efi.h (grub_reboot): New function declaration.
11369 (grub_halt): Likewise.
11370
11371 * kern/efi/efi.c (grub_reboot): New function.
11372 (grub_halt): Likewise.
11373
c74493e0 113742008-02-12 Robert Millan <rmh@aybabtu.com>
11375
11376 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
11377 /dev (like it is done for /dev/mapper). This doesn't provide support
11378 for EVMS, but at least it is now easy to identify the problem when it
11379 arises.
11380
d0db4b04 113812008-02-11 Robert Millan <rmh@aybabtu.com>
11382
11383 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
11384 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
11385 comparing it with -1, not 0.
11386
bf748642 113872008-02-10 Robert Millan <rmh@aybabtu.com>
11388
11389 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
11390 `disk/lvm.c'.
11391 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11392 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
11393
11394 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
11395 `disk/lvm.c' to the end of the list.
11396 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
11397 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
11398
b5db202a 113992008-02-10 Robert Millan <rmh@aybabtu.com>
11400
11401 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
11402 grub_print_error() instead. This will let user know why we're entering
11403 rescue mode.
11404 Based on suggestions from Sam Morris.
11405
83abee31 114062008-02-10 Alexandre Boeglin <alex@boeglin.org>
11407
11408 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
11409 on remaining N args, instead of "--" arg N times.
11410
78d5a08b 114112008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
11412
11413 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
11414 (fill_with_default_glyph): Changed to use unknown_glyph for fill
11415 pattern for unknown glyphs.
11416
68807e5f 114172008-02-09 Robert Millan <rmh@aybabtu.com>
11418
11419 * configure.ac: Probe for `help2man'.
11420 * Makefile.in (builddir): New variable.
11421 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
11422 or otherwise add a few flags/options to it.
11423 (install-local): For every executable utility or script that is
11424 installed, invoke $(HELP2MAN) to install a manpage based on --help
11425 output.
11426
11427 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
11428 that it doesn't prevent --help from working in build tree.
11429
11430 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
11431 with `bug-grub@gnu.org'.
11432 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
11433 * util/update-grub.in (usage): New function.
11434 Implement proper argument check, with support for --help and --version
11435 (as well as existing -y).
11436
114372008-02-09 Christian Franke <franke@computer.org>
0d9ff7f0 11438
11439 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
11440 avoid overwriting previous output.
11441 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
11442
c1962162 114432008-02-09 Robert Millan <rmh@aybabtu.com>
11444
11445 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
11446 drawing the menu.
11447
3dac2e3f 114482008-02-09 Robert Millan <rmh@aybabtu.com>
11449
11450 * commands/sleep.c: New file.
11451 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
11452 (sleep_mod_SOURCES): New variable.
11453 (sleep_mod_CFLAGS): Likewise.
11454 (sleep_mod_LDFLAGS): Likewise.
11455
7a634e08 114562008-02-09 Robert Millan <rmh@aybabtu.com>
11457
11458 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
11459 situations in which we can deduce the RAID size and the superblock
11460 doesn't match it.
11461
b92f0c18 114622008-02-09 Robert Millan <rmh@aybabtu.com>
11463
11464 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
11465 and return a grub_diskmemberlist_t composed of LVM physical volumes.
11466 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
11467
11468 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
11469 and return a grub_diskmemberlist_t composed of physical array members.
11470 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
11471
11472 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
11473 prototype.
11474 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
11475 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
11476 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
11477
11478 * util/grub-probe.c (probe): Move partmap probing code from here ...
11479 (probe_partmap): ... to here.
11480 (probe): Use probe_partmap() once for the disk we're probing, and
11481 additionally, when such disk contains a memberlist() struct member,
11482 once for each disk that is contained in the structure returned by
11483 memberlist().
11484
91a4bf68 114852008-02-09 Robert Millan <rmh@aybabtu.com>
11486
11487 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
11488 environment variable to 'all' in order to obtain debug output from
11489 non-util/ code.
11490 * util/i386/pc/grub-setup.c (main): Likewise.
11491
a96f9caa 114922008-02-08 Robert Millan <rmh@aybabtu.com>
11493
11494 * disk/raid.c (grub_raid_scan_device): Check for
11495 `array->device[sb.this_disk.number]' rather than for
11496 `array->device[sb.this_disk.number]->name', since the latter is not
fe6b695a 11497 guaranteed to be accessible.
a96f9caa 11498
b37a9222 114992008-02-08 Robert Millan <rmh@aybabtu.com>
11500
11501 * disk/raid.c: Update copyright.
11502 * fs/cpio.c: Likewise.
11503 * include/grub/raid.h: Likewise.
11504 * loader/i386/pc/multiboot.c: Likewise.
11505 * util/hostfs.c: Likewise.
11506
5626aee1 115072008-02-08 Robert Millan <rmh@aybabtu.com>
11508
11509 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
11510 to a grub_disk_t array.
11511 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
11512 `device[x]'.
11513 (grub_raid_scan_device): Replace `device[x].name' accesses with
11514 `device[x]->name'. Simplify initialization of `array->device[x]'.
11515
554f0187 115162008-02-08 Robert Millan <rmh@aybabtu.com>
11517
11518 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
11519 grub_dprintf() calls.
11520 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
11521 error message.
11522
1ec8425d 115232008-02-07 Christian Franke <franke@computer.org>
11524
11525 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
11526 instead of fseek and ftell to support large files.
11527 (grub_hostfs_read): Likewise.
11528
f2156fda 115292008-02-07 Robert Millan <rmh@aybabtu.com>
11530
11531 Patch from Jeroen Dekkers.
11532 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
fe6b695a 11533 failure, since successfully reading all array members might not be
f2156fda 11534 required.
11535
9216e0e7 115362008-02-06 Robert Millan <rmh@aybabtu.com>
11537
11538 * util/grub-probe.c (probe): Simplify partmap probing (with the
11539 assumption that the first word up to the underscore equals to
11540 the module name).
11541
b0dfd29a 115422008-02-06 Christian Franke <franke@computer.org>
11543
11544 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
11545 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
11546 last block of a cpio or tar stream.
11547 Check for "TRAILER!!!" instead of any empty data
11548 block to detect last block of a cpio stream.
11549 (grub_cpio_dir): Fix constness of variable np.
11550 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
11551 cpio or tar trailer is detected. This fixes a crash
11552 on open of a non existing file.
11553
c32865bf 115542008-02-05 Bean <bean123ch@gmail.com>
11555
11556 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
11557 address of entry.
11558 (grub_multiboot_load_elf64): Likewise.
11559 (grub_multiboot): Initialize mbi structure.
11560
11561 * util/grub-fstest.c: Don't include unused header file script.h.
11562
fe6b695a 11563 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
c32865bf 11564 of file.
11565 (grub_fstest_SOURCES): Likewise.
11566
409480b7 115672008-02-05 Robert Millan <rmh@aybabtu.com>
11568
11569 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
11570 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
11571 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
11572 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
11573
11574 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
11575 (translation_table): Replace hardcoded values with macros
11576 provided by `<grub/term.h>'.
11577
11578 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
11579 (keyboard_map): Correct/add a few values, with macros provided
11580 by `<grub/term.h>'.
11581 (keyboard_map_shift): Zero values that don't differ from their
11582 `keyboard_map' equivalents.
11583 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
11584 Discard the second scan code that is always sent by Caps lock.
11585 Only use `keyboard_map_shift' when it provides a non-zero value,
11586 otherwise fallback to `keyboard_map'.
11587
99fadbaa 115882008-02-04 Bean <bean123ch@gmail.com>
11589
11590 * Makefile.in (enable_grub_fstest): New variable.
11591
11592 * conf/common.rmk (grub_fstest_init.lst): New rule.
11593 (grub_fstest_init.h): Likewise.
11594 (grub_fstest_init.c): Likewise.
11595 (util/grub-fstest.c_DEPENDENCIES): New variable.
11596 (grub_fstest_SOURCES): Likewise.
11597
11598 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
11599
11600 * util/grub-fstest.c: New file.
11601
bf567c50 116022008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
11603
11604 Make grub-setup handle a separate root device.
f19dbdb7 11605
bf567c50 11606 * util/i386/pc/grub-setup.c (setup): Always open the root device,
11607 so that the root device can be compared with the destination
11608 device.
11609 When embedding the core image, if the root and destination devices
11610 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
11611 0xFF.
11612 When not embedding, set ROOT_DRIVE to 0xFF.
f19dbdb7 11613
9be6b98b 116142008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
11615
11616 Add support for having a grub directory in a different drive. This
11617 is still only the data handling part.
f19dbdb7 11618
9be6b98b 11619 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
11620 (codestart): Save %dh in GRUB_ROOT_DRIVE.
11621 (grub_root_drive): New variable.
11622
11623 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
11624 instead of GRUB_BOOT_DRIVE to construct a device name. Set
11625 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
11626 as it was.
11627
11628 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
11629
11630 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
11631 macro.
11632 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
11633
11634 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
11635 is bogus, because PXE booting does not specify any drive
11636 correctly.
11637
11638 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
11639 am not sure if this is really correct.
11640
11641 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
11642 is always identical to the boot drive when booting from a CD.
11643
11644 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
11645 longer.
11646 (root_drive): New variable.
11647 (real_start): Unconditionally set %dh to ROOT_DRIVE.
11648 (setup_sectors): Push %dx right after popping it, because %dh will
11649 be modified later.
11650 (copy_buffer): Restore %dx.
11651
e0ca0677 116522008-02-03 Robert Millan <rmh@aybabtu.com>
11653
11654 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
11655 use `cdboot.img' for cdrom images.
11656
3b3f6629 116572008-02-03 Robert Millan <rmh@aybabtu.com>
11658
11659 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
11660 only setup gfxterm when `font' command has succeeded.
11661
d42b3672 116622008-02-03 Robert Millan <rmh@aybabtu.com>
11663
11664 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
11665 (grub_rescue_cmd_multiboot_loader)
11666 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
11667
fa370ea6 116682008-02-03 Pavel Roskin <proski@gnu.org>
11669
e0c5dacb 11670 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
fa370ea6 11671 %edx and %esi from stack only after grub_gate_a20() is called.
11672 grub_gate_a20() clobbers %edx.
11673
f2a76e1d 116742008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
11675
11676 * configure.ac (AC_INIT): Bumped to 1.96.
11677
11678 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
11679 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
11680 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
11681 video/readers/png.c.
11682
90fd32d1 116832008-02-03 Bean <bean123ch@gmail.com>
9be665dd 11684
11685 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
11686 (cdboot_img_SOURCES): New variable.
11687 (cdboot_img_ASFLAGS): New variable.
11688 (cdboot_img_LDFLAGS): New variable.
11689
11690 * boot/i386/pc/cdboot.S: New file.
11691
11692 * disk/i386/pc/biosdisk.c (cd_start): New variable.
11693 (cd_count): Likewise.
11694 (grub_biosdisk_get_drive): Add support for cd device.
11695 (grub_biosdisk_call_hook): Likewise.
11696 (grub_biosdisk_iterate): Likewise.
11697 (grub_biosdisk_open): Likewise.
11698 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
11699 (grub_biosdisk_rw): Support reading from cd device.
11700 (GRUB_MOD_INIT): Iterate cd devices.
11701
11702 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
11703 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
11704 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
11705
11706 * kern/i386/pc/init.c (make_install_device): Check for cd device.
11707
4020aa53 117082008-02-02 Robert Millan <rmh@aybabtu.com>
11709
11710 * commands/read.c: New file.
11711 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
11712 (read_mod_SOURCES): New variable.
11713 (read_mod_CFLAGS): Likewise.
11714 (read_mod_LDFLAGS): Likewise.
11715
e03a1132 117162008-02-02 Robert Millan <rmh@aybabtu.com>
11717
11718 * normal/main.c (grub_normal_execute): Check for `menu->size' when
11719 determining whether menu has to be displayed.
11720
58c69220 117212008-02-02 Marco Gerards <marco@gnu.org>
11722
11723 * bus/pci.c: New file.
11724
11725 * include/grub/pci.h: Likewise.
11726
11727 * include/grub/i386/pc/pci.h: Likewise.
11728
11729 * commands/lspci.c: Likewise.
11730
11731 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
11732 `lspci.mod'.
11733 (pci_mod_SOURCES): New variable.
11734 (pci_mod_CFLAGS): Likewise.
11735 (pci_mod_LDFLAGS): Likewise.
11736 (lspci_mod_SOURCES): Likewise.
11737 (lspci_mod_CFLAGS): Likewise.
f19dbdb7 11738 (lspci_mod_LDFLAGS): Likewise.
58c69220 11739
c004e1b4 117402008-02-02 Bean <bean123ch@gmail.com>
11741
11742 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
11743 (grub_ufs_get_file_block): Fix indirect block calculation problem.
11744
11745 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
11746 (grub_xfs_btree_node): New structure.
11747 (grub_xfs_btree_root): New structure.
11748 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
11749 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
11750 (GRUB_XFS_EXTENT_BLOCK): Likewise.
11751 (GRUB_XFS_EXTENT_SIZE): Likewise.
11752 (grub_xfs_read_block): Support btree format type.
11753 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
11754 Use directory block as basic unit.
11755
11756 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
11757
11758 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
11759 __attribute__ ((__regparm__ (1))).
11760
f95562bf 117612008-02-01 Robert Millan <rmh@aybabtu.com>
11762
11763 Correct a mistake in previous commit.
11764
11765 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
11766 top.
11767 (normal/command.c_DEPENDENCIES): New variable.
11768
7d31f41f 117692008-02-01 Robert Millan <rmh@aybabtu.com>
11770
11771 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
11772 top.
11773 (normal/command.c_DEPENDENCIES): New variable.
11774 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
11775 * conf/i386-ieee1275.rmk: Likewise.
11776 * conf/i386-linuxbios.rmk: Likewise.
11777 * conf/i386-pc.rmk: Likewise.
11778 * conf/sparc64-ieee1275.rmk: Likewise.
11779 * conf/powerpc-ieee1275.rmk: Likewise.
11780 (grub_emu_SOURCES): Add `fs/fshelp.c'.
11781
11782 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
11783
60b6be74 117842008-02-01 Robert Millan <rmh@aybabtu.com>
11785
11786 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
11787 call at beginning of function.
11788
078522ab 117892008-01-31 Pavel Roskin <proski@gnu.org>
11790
11791 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
d2c11005 11792 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
11793 (grub_mkrescue_SOURCES): Likewise.
078522ab 11794 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
11795
ccaa8a5f 117962008-01-30 Robert Millan <rmh@aybabtu.com>
11797
11798 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
11799 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
11800 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
11801 (grub_probe_SOURCES): ... to here.
11802
11803 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
11804 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
11805 * conf/i386-ieee1275.rmk: Likewise.
11806 * conf/i386-linuxbios.rmk: Likewise.
11807 * conf/powerpc-ieee1275.rmk: Likewise.
11808
ae5a9cd7 118092008-01-30 Tristan Gingold <gingold@free.fr>
11810
11811 * kern/rescue.c: Silently accept empty lines.
11812
70bc2ef2 118132008-01-29 Bean <bean123ch@gmail.com>
11814
11815 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
11816 (real_code_2): Code cleanup and change comment style.
11817 (move_memory): Avoid using 32-bit address mode.
11818
6a4d50ea 118192008-01-29 Bean <bean123ch@gmail.com>
11820
11821 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
11822 (png_mod_SOURCES): New variable.
11823 (png_mod_CFLAGS): Likewise.
11824 (png_mod_LDFLAGS): Likewise.
11825
11826 * video/readers/png.c: New file.
11827
11cc30ac 118282008-01-28 Robert Millan <rmh@aybabtu.com>
11829
11830 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
11831 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
11832 `ifndef GRUB_MOD_GAP' hack.
11833 * util/elf/grub-mkimage.c (add_segments): Likewise.
11834
3abc589f 118352008-01-27 Robert Millan <rmh@aybabtu.com>
11836
11837 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
11838 `GRUB_MOD_GAP' for platforms in which it's not defined.
962ca133 11839 * util/elf/grub-mkimage.c (add_segments): Likewise.
3abc589f 11840
e1907778 118412008-01-27 Robert Millan <rmh@aybabtu.com>
11842
11843 Get grub-emu to build again (including parallel builds).
11844
11845 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
11846 Split into ...
11847 (util/grub-emu.c_DEPENDENCIES): ... this, ...
11848 (normal/execute.c_DEPENDENCIES): ... this, ...
11849 (grub-emu_DEPENDENCIES): ... and this.
11850
11851 * conf/i386-efi.rmk: Likewise.
11852 * conf/i386-linuxbios.rmk: Likewise.
11853 * conf/i386-ieee1275.rmk: Likewise.
11854 * conf/powerpc-ieee1275.rmk: Likewise.
11855 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
11856
2216b101 118572008-01-27 Robert Millan <rmh@aybabtu.com>
11858
11859 * NEWS: Add a few items.
11860
f75172d9 118612008-01-27 Robert Millan <rmh@aybabtu.com>
11862
11863 Fix parallel builds with grub-emu. Based on earlier commit for
11864 grub-probe and grub-setup.
11865
11866 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
11867 (util/grub-emu.c_DEPENDENCIES): ... this.
11868 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
11869 (util/grub-emu.c_DEPENDENCIES): ... this.
11870 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
11871 (util/grub-emu.c_DEPENDENCIES): ... this.
11872 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
11873 (util/grub-emu.c_DEPENDENCIES): ... this.
11874 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
11875 (util/grub-emu.c_DEPENDENCIES): ... this.
11876
3f51de77 118772008-01-27 Pavel Roskin <proski@gnu.org>
11878
11879 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
11880 to create a gap between _end and the modules added to the image
11881 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
11882 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
11883 * util/elf/grub-mkimage.c (add_segments): Likewise.
11884
2033f53e 118852008-01-26 Pavel Roskin <proski@gnu.org>
11886
11887 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
11888 just return an error.
11889
22da1f6f 118902008-01-26 Bean <bean123ch@gmail.com>
11891
11892 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
11893 (grub_reiserfs_get_item): Save offset of the next item.
11894 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
11895
2a9525e6 118962008-01-25 Robert Millan <rmh@aybabtu.com>
11897
11898 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
11899 make all filesystem sources appear together (possibly fixing omissions
11900 while at it).
11901 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
11902 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11903 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
11904 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11905
11906 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
11907 add `kern/file.c'.
11908 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
11909 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
11910 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
11911 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
11912
11913 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
11914 (probe): Add a sanity check to make sure of our ability to read
11915 requested files when probing for filesystem type.
11916
11917 * genmk.rb: Update copyright year (2007).
11918
11919 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
11920 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
11921 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
11922 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
11923 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
11924 : Remove function prototypes.
11925
b95f71b5 119262008-01-25 Robert Millan <rmh@aybabtu.com>
11927
11928 Revert my previous commits (based on wrong assumption of how grub_errno
11929 works).
11930
fe6b695a 11931 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
b95f71b5 11932 * kern/file.c (grub_file_open): Likewise.
11933
d08bbb49 119342008-01-24 Pavel Roskin <proski@gnu.org>
11935
11936 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
11937 that hang if GRUB tries to setup colors.
11938 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
11939 colors for firmwares that don't support it.
11940 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
11941 Recognize Open Hack'Ware, set flags to work around its
11942 limitations.
11943
605e36ed 119442008-01-24 Robert Millan <rmh@aybabtu.com>
11945
11946 * kern/file.c (grub_file_open): Do not account previous failures of
11947 unrelated functions when grub_errno is checked for.
11948 Reported by Oleg Strikov.
11949
bac332a1 119502008-01-24 Bean <bean123ch@gmail.com>
11951
11952 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
11953 (grub_ufs_sblock): New member volume name.
11954 (grub_ufs_find_file): Fix string copy bug.
11955 (grub_ufs_label): Implement this function properly.
11956
11957 * fs/hfs.c (grub_hfs_cnid_type): New enum.
11958 (grub_hfs_iterate_records): Use the correct file number for extents
11959 and catalog file. Fix problem in next index calculation.
11960 (grub_hfs_find_node): Replace recursive function call with loop.
11961 (grub_hfs_iterate_dir): Replace recursive function call with loop.
11962
15c80c09 119632008-01-23 Robert Millan <rmh@aybabtu.com>
11964
11965 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
11966 `<grub/symbol.h>' and `<grub/multiboot.h>'.
11967 (grub_multiboot2_real_boot): New function prototype.
11968
11969 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
11970 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
11971
11972 * kern/i386/ieee1275/init.c (grub_os_area_addr)
11973 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
11974
305338fd 119752008-01-23 Robert Millan <rmh@aybabtu.com>
11976
11977 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
11978 #ifdef'ed out grub_printf().
11979
3ea52685 119802008-01-23 Robert Millan <rmh@aybabtu.com>
11981
11982 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
11983 grub_dprintf calls, since they make "debug=all" mode unusable.
11984 (grub_console_checkkey): Likewise.
11985
5882ae4b 119862008-01-23 Robert Millan <rmh@aybabtu.com>
11987
11988 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
11989 `term/i386/pc/at_keyboard.c'.
11990 (pkglib_MODULES): Add `serial.mod'.
11991 (serial_mod_SOURCES): New variable.
11992 (serial_mod_CFLAGS): Likewise.
11993 (serial_mod_LDFLAGS): Likewise.
11994
11995 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
11996 `<grub/powerpc/ieee1275/console.h>'.
11997 (grub_keyboard_controller_init): New function prototype.
11998 (grub_console_checkkey): Likewise.
11999 (grub_console_getkey): Likewise.
12000
12001 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
12002 keyboard on i386.
12003
12004 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
12005 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
12006
06ab5303 120072008-01-23 Robert Millan <rmh@aybabtu.com>
12008
12009 * kern/i386/pc/init.c (make_install_device): When memdisk image is
12010 present, "(memdisk)/boot/grub" becomes the default prefix.
12011
12012 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
12013 a memdisk tarball with all the modules. Add --overlay=DIR option that
12014 allows users to overlay additional files into the image.
12015
dbb475a4 120162008-01-23 Robert Millan <rmh@aybabtu.com>
12017
12018 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
12019 and `machine/memory.h'.
12020 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
12021 (_multiboot_mod_SOURCES): New variable.
12022 (_multiboot_mod_CFLAGS): Likewise.
12023 (_multiboot_mod_LDFLAGS): Likewise.
12024 (multiboot_mod_SOURCES): Likewise.
12025 (multiboot_mod_CFLAGS): Likewise.
12026 (multiboot_mod_LDFLAGS): Likewise.
12027
12028 * include/grub/i386/ieee1275/loader.h: New file.
12029
12030 * include/grub/i386/ieee1275/machine.h: Likewise.
12031
12032 * include/grub/i386/ieee1275/memory.h: Likewise.
12033
12034 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
12035 variable declaration.
12036 (grub_os_area_size): Likewise.
12037
12038 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
12039 (grub_lower_mem, grub_upper_mem): New variables.
12040 (grub_stop_floppy): New function (just to make
12041 grub_multiboot2_real_boot() happy).
12042
12043 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
12044 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
12045 (grub_stop): New function.
12046 Include `"../realmode.S"' and `"../loader.S"'.
12047
12048 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
12049 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
12050
12051 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
12052 rely on grub_multiboot2_real_boot() for final boot.
12053
25638629 120542008-01-22 Robert Millan <rmh@aybabtu.com>
12055
12056 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
12057 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
12058 device that doesn't look like an SD card.
12059 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
12060 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
12061 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
12062 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
12063 found.
12064
9dad816d 120652008-01-22 Robert Millan <rmh@aybabtu.com>
12066
12067 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
12068 avoid claiming over our own code.
12069
34842f2d 120702008-01-22 Bean <bean123ch@gmail.com>
12071
12072 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
12073 (jpeg_mod_SOURCES): New variable.
12074 (jpeg_mod_CFLAGS): Likewise.
12075 (jpeg_mod_LDFLAGS): Likewise.
12076
12077 * video/readers/jpeg.c : New file.
12078
44023a28 120792008-01-22 Bean <bean123ch@gmail.com>
12080
12081 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
12082 there are no more items.
12083
bc2d8ac6 120842008-01-21 Robert Millan <rmh@aybabtu.com>
12085
12086 * kern/mm.c (grub_mm_init_region): Improve debug message.
12087
261bd4bc 120882008-01-21 Robert Millan <rmh@aybabtu.com>
12089
12090 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
12091 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
12092 address.
12093 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
12094 a C macro.
12095 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
12096 Indicates start of upper memory.
12097 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
12098 (generate_image): Abort when image size is big enough to corrupt
12099 upper memory.
12100
12101 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
12102 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
12103 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
12104 instead of hardcoding 0xA0000.
12105 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
12106 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
12107 instead of hardcoding 0xA0000.
12108
f970b55e 121092008-01-21 Robert Millan <rmh@aybabtu.com>
12110
12111 * disk/memdisk.c (memdisk_size): New variable.
12112 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
12113 `memdisk_size'.
12114 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
12115 image to dynamic memory.
12116 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
12117 `memdisk_size'. Free memdisk block.
12118
1a8b0526 121192008-01-21 Robert Millan <rmh@aybabtu.com>
12120
12121 Fix detection of very small filesystems (like tar).
12122
12123 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
12124 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
12125 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
12126 a problem with this disk).
12127
6e9b4aab 121282008-01-21 Robert Millan <rmh@aybabtu.com>
12129
12130 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
12131 on grub_biosdisk_rw_standard() error.
12132
0d8837b2 121332008-01-21 Robert Millan <rmh@aybabtu.com>
12134
12135 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
12136 recent changes.
12137 * kern/elf.c: Likewise.
12138 * kern/ieee1275/ieee1275.c: Likewise.
12139 * kern/powerpc/ieee1275/openfw.c: Likewise.
12140 * term/ieee1275/ofconsole.c: Likewise.
12141
ffd36e34 121422008-01-21 Robert Millan <rmh@aybabtu.com>
12143
12144 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
12145
3f0093d0 12146 * include/grub/kernel.h (grub_arch_memdisk_addr)
12147 (grub_arch_memdisk_size): Moved from here ...
ffd36e34 12148
3f0093d0 12149 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
12150 (grub_arch_memdisk_size): ... to here.
ffd36e34 12151
6c391b21 121522008-01-21 Robert Millan <rmh@aybabtu.com>
12153
12154 Mostly based on bugfix from Bean.
12155
12156 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
12157 attribute with hook() parameter.
12158 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
12159 declaration.
12160 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
12161 attribute with hook() parameter.
12162 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
12163 declaration.
12164
55a581dc 121652008-01-21 Robert Millan <rmh@aybabtu.com>
12166
12167 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
12168 (pkglib_MODULES): Add `memdisk.mod'.
12169 (memdisk_mod_SOURCES): New variable.
12170 (memdisk_mod_CFLAGS): Likewise.
12171 (memdisk_mod_LDFLAGS): Likewise.
12172
12173 * disk/memdisk.c: New file.
12174
12175 * include/grub/disk.h (grub_disk_dev_id): Add
12176 `GRUB_DISK_DEVICE_MEMDISK_ID'.
12177
12178 * include/grub/i386/pc/kernel.h
12179 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
12180 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
12181 (grub_kernel_image_size): New variable declaration.
12182 (grub_total_module_size): Likewise.
12183 (grub_memdisk_image_size): Likewise.
12184
12185 * include/grub/i386/pc/memory.h
12186 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
12187
12188 * include/grub/kernel.h: Include `<grub/symbol.h>'.
12189 (grub_arch_memdisk_addr): New variable declaration.
12190 (grub_arch_memdisk_size): Likewise.
12191
12192 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
12193 (grub_arch_memdisk_size): Likewise.
12194
12195 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
12196 (codestart): Replace hardcoded `0x100000' with
12197 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
12198
12199 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
12200 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
12201 not NULL, append the contents of the file it refers to, at the end of
12202 the compressed kernel image. Initialize `grub_memdisk_image_size'
12203 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
12204 (options): Add "memdisk"|'m' option.
12205 (main): Parse --memdisk|-m option, and pass user-provided path as
12206 parameter to generate_image().
12207
3d7f54c9 122082008-01-20 Robert Millan <rmh@aybabtu.com>
12209
12210 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
12211 grub_dprintf() calls from here ...
12212 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
12213
0bf74728 122142008-01-20 Robert Millan <rmh@aybabtu.com>
12215
12216 Fix detection of "real mode" when /options/real-mode? doesn't exist.
12217
12218 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
12219 declaration.
12220 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
12221 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
12222 `GRUB_IEEE1275_FLAG_REAL_MODE'.
fe6b695a 12223 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
0bf74728 12224 property).
12225 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
12226 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
12227
33bf70a7 122282008-01-19 Robert Millan <rmh@aybabtu.com>
12229
fe6b695a 12230 Get rid of confusing function (superseded by
33bf70a7 12231 `grub_ieee1275_get_integer_property')
12232 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
12233 prototype.
12234 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
12235 function.
12236 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
12237 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
fe987087 12238 in native endianness from grub_ieee1275_get_integer_property().
33bf70a7 12239
e2da7d26 122402008-01-19 Robert Millan <rmh@aybabtu.com>
12241
12242 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
12243 command after "shut-down", since implementations differ on which
12244 the command for halt is.
12245
59f1fd8d 122462008-01-19 Robert Millan <rmh@aybabtu.com>
12247
12248 * include/grub/i386/linuxbios/console.h: Add header protection.
12249 (grub_keyboard_controller_init): New function prototype.
12250 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
12251 (KEYBOARD_COMMAND_READ): Likewise.
12252 (KEYBOARD_COMMAND_WRITE): Likewise.
12253 (KEYBOARD_SCANCODE_SET1): Likewise.
12254 (grub_keyboard_controller_write): New function.
12255 (grub_keyboard_controller_read): Likewise.
12256 (grub_keyboard_controller_init): Likewise.
12257
12258 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
12259 (grub_console_init): On coreboot/LinuxBIOS, call
12260 grub_keyboard_controller_init().
12261
5f5a7c15 122622008-01-19 Robert Millan <rmh@aybabtu.com>
12263
12264 PowerPC changes provided by Pavel Roskin.
12265
12266 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
12267 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
12268 don't rely on cmain() doing it.
12269 * kern/i386/ieee1275/startup.S (_start): Store %eax in
12270 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
12271
1210e168 122722008-01-16 Robert Millan <rmh@aybabtu.com>
12273
12274 * include/grub/i386/linuxbios/memory.h
12275 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
12276 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
12277 receive `table_header' as argument. Instead, probe for it in the
12278 known memory ranges where it can be present.
12279 (grub_available_iterate): Do not pass a fixed `table_header' address
12280 to grub_linuxbios_table_iterate().
12281
3d04eab8 122822008-01-15 Robert Millan <rmh@aybabtu.com>
12283
12284 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
12285 * conf/i386-ieee1275.rmk: New file.
12286 * include/grub/i386/ieee1275/console.h: Likewise.
12287 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
12288 * include/grub/i386/ieee1275/kernel.h: Likewise.
12289 * include/grub/i386/ieee1275/time.h: Likewise.
12290 * kern/i386/ieee1275/init.c: Likewise.
12291 * kern/i386/ieee1275/startup.S: Likewise.
12292
d1bc1b73 122932008-01-15 Robert Millan <rmh@aybabtu.com>
12294
12295 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
12296 when pointers are 32-bit (but still do set it to one when they are
12297 64-bit).
12298
66a65807 122992008-01-15 Robert Millan <rmh@aybabtu.com>
12300
12301 * include/grub/ieee1275/ieee1275.h
12302 (grub_ieee1275_get_integer_property): New function prototype.
12303
12304 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
12305 (grub_ieee1275_get_integer_property): New function. Wraps around
fe987087 12306 grub_ieee1275_get_property() to handle endianness.
66a65807 12307
12308 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
12309 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
fe6b695a 12310 where appropriate.
66a65807 12311 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
12312 (grub_map): Likewise.
12313 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
12314
a83ccafd 123152008-01-15 Bean <bean123ch@gmail.com>
12316
12317 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
12318 (grub_script_execute_cmdline): Reset grub_errno.
12319
12320 * normal/main.c (read_config_file): Reset grub_errno.
12321
12322 * normal/parse.y (script_init): New.
12323 (script): Move function and menuentry here.
12324 (delimiter): New.
12325 (command): Add delimiter at the end of command.
12326 (commands): Adjust to match the new command.
12327 (commandblock): Remove grub_script_lexer_record_start.
f19dbdb7 12328 (menuentry): Add grub_script_lexer_record_start, use the new commands.
a83ccafd 12329 (if): Use the new commands.
12330
12331 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
12332
df6ecfc6 123332008-01-15 Robert Millan <rmh@aybabtu.com>
12334
12335 * normal/menu.c (run_menu): Move timeout message from here ...
12336 (print_timeout): ... to here.
12337 (run_menu): Use print_timeout() once during initial draw to print
12338 the whole message, and again in every clock tick to update only
12339 the number of seconds.
12340
87ae25eb 123412008-01-15 Robert Millan <rmh@aybabtu.com>
12342
12343 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
12344 actual size of `available' from grub_ieee1275_get_property(), and
12345 restrict parsing to that bound.
12346
47bf09a4 123472008-01-15 Christian Franke <franke@computer.org>
12348
12349 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
12350 (argp_program_version): Remove variable.
12351 (argp_program_bug_address): Likewise.
12352 (options): Convert from struct argp_option to struct option.
12353 (struct arguments): Remove.
12354 (parse_opt): Remove.
12355 (usage): New function.
12356 (main): Replace struct args members by simple variables.
12357 Replace argp_parse() by getopt_long().
12358 Add switch to evaluate options.
12359 Add missing "(...)" around root_dev in prefix string.
12360
c86f1469 123612008-01-14 Robert Millan <rmh@aybabtu.com>
12362
12363 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
12364 for grub_ieee1275_exit(), in order to improve portability.
12365
e622c559 123662008-01-14 Robert Millan <rmh@aybabtu.com>
12367
12368 * util/grub.d/10_linux.in (prefix): Define.
12369 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
12370
44cb1ec8 123712008-01-13 Pavel Roskin <proski@gnu.org>
12372
12373 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
12374 grub_errno if no errors have been detected.
12375
1eb8c802 123762008-01-12 Robert Millan <rmh@aybabtu.com>
12377
12378 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
12379 (grub_util_get_dev_abstraction): New function prototype.
12380
12381 * util/getroot.c: Include `<grub/util/getroot.h>'
12382 (grub_util_get_grub_dev): Move detection of abstraction type to ...
12383 (grub_util_get_dev_abstraction): ... here (new function).
12384
12385 * util/grub-probe.c: Convert PRINT_* to an enum. Add
12386 `PRINT_ABSTRACTION'.
12387 (probe): Probe for abstraction type when requested.
12388 (main): Understand `--target=abstraction'.
12389
12390 * util/i386/efi/grub-install.in: Add abstraction module to core
12391 image when it is found to be necessary.
12392 * util/i386/pc/grub-install.in: Likewise.
12393 * util/powerpc/ieee1275/grub-install.in: Likewise.
12394
12395 * util/update-grub_lib.in (font_path): Return system path without
12396 converting to GRUB path.
12397 * util/update-grub.in: Convert system path returned by font_path()
12398 to a GRUB path. Use `grub-probe -t abstraction' to determine what
12399 abstraction module is needed for loading fonts (if any). Export
12400 that as `GRUB_PRELOAD_MODULES'.
12401 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
12402 insmod commands).
12403
52bd3de9 124042008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
12405
12406 Remove some unused code from reiserfs.
f19dbdb7 12407
52bd3de9 12408 * fs/reiserfs.c (struct grub_reiserfs_key)
12409 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
12410 (struct grub_reiserfs_node_body): Removed.
12411 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
12412 Likewise.
12413 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
12414 Likewise.
12415 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
12416 Likewise.
12417 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
12418 Likewise.
12419 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
12420 Likewise.
12421 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
12422 Likewise.
12423 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
12424 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
12425 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
12426
2f80039d 124272008-01-10 Robert Millan <rmh@aybabtu.com>
12428
12429 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
12430 Determines if a file is garbage left by packaging systems, etc.
12431 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
12432 for processing /etc/grub.d scripts.
12433 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
12434 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
12435 as a condition for processing Linux images.
12436
87888032 124372008-01-10 Pavel Roskin <proski@gnu.org>
12438
12439 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
12440 to compile reiserfs.c on PowerPC.
12441
7e54fced 124422008-01-10 Robert Millan <rmh@aybabtu.com>
de9993e0 12443
12444 * kern/device.c (grub_device_iterate): Do not abort device iteration
12445 when one of the devices cannot be opened.
12446 * kern/disk.c (grub_disk_open): Do not account previous failures of
12447 unrelated functions when grub_errno is checked for.
12448
5aa541e6 124492008-01-08 Robert Millan <rmh@aybabtu.com>
12450
12451 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
12452 `! grub_linux_is_bzimage', change order of address comparison to make
12453 it more intuitive, and improve "too big zImage" error message.
12454
7076340d 124552008-01-08 Robert Millan <rmh@aybabtu.com>
12456
12457 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
12458 `$(update-grub_DATA)'.
12459 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
12460 targets.
12461
9ca70333 124622008-01-07 Robert Millan <rmh@aybabtu.com>
12463
12464 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
12465 which instruction is modified by grub-setup during installation
12466 (since it wasn't obvious by only looking at this file).
12467
38ccf575 124682008-01-07 Robert Millan <rmh@aybabtu.com>
12469
12470 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
12471 listing actual TODO items.
12472
f5db4291 124732008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
12474
868967cf 12475 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
12476 correctly.
12477 (grub_reiserfs_get_key_offset): Likewise.
12478 (grub_reiserfs_set_key_offset): Likewise.
12479 (grub_reiserfs_set_key_type): Likewise.
fe6b695a 12480 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
868967cf 12481
12482 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
12483 better to remove the bitfield version completely.
f19dbdb7 12484
868967cf 124852008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 12486
f5db4291 12487 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
12488 allocated from the heap, due to the fshelp implementation.
12489 (grub_reiserfs_dir): Free NODE, due to the same reason.
12490
492e6d9d 124912008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
12492
12493 Mostly from Vincent Pelletier:
f19dbdb7 12494
492e6d9d 12495 * fs/reiserfs.c: New file.
f19dbdb7 12496
492e6d9d 12497 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
12498 (reiserfs_mod_SOURCES): New variable.
12499 (reiserfs_mod_CFLAGS): Likewise.
12500 (reiserfs_mod_LDFLAGS): Likewise.
12501
12502 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
12503 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
12504 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
12505 normal/color.c.
12506
9ce3e7c1 125072008-01-06 Robert Millan <rmh@aybabtu.com>
12508
12509 * normal/color.c: Remove `<grub/env.h>'.
12510
f3b58148 125112008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
12512
12513 * include/grub/normal.h: Include <grub/env.h>.
12514
7ac3bcfa 125152008-01-05 Robert Millan <rmh@aybabtu.com>
12516
12517 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
12518 usage example with `(hd0,1)'.
fb358190 12519 Reported by Samuel Thibault.
7ac3bcfa 12520
c8ee99d7 125212008-01-05 Robert Millan <rmh@aybabtu.com>
12522
12523 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
12524 (grub_linux_boot_zimage): Rename to ...
12525 (grub_linux_boot): ... this.
12526 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
12527 (grub_linux_boot_zimage): Conditionalize zImage copy.
12528
12529 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
12530 (grub_linux_boot_bzimage): Remove prototype.
12531 (grub_linux_boot_zimage): Rename to ...
12532 (grub_linux_boot): ... this.
12533
12534 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
12535 (grub_linux_boot): Remove function.
12536
0ece25b1 125372008-01-05 Robert Millan <rmh@aybabtu.com>
12538
12539 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
12540 (grub_env_write_color_highlight): Likewise.
12541 (grub_wait_after_message): Likewise.
12542
12543 * normal/color.c: New file.
12544
12545 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
12546 (normal_mod_DEPENDENCIES): Likewise.
12547
12548 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
12549 (normal_mod_DEPENDENCIES): Likewise.
12550
12551 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
12552 (normal_mod_DEPENDENCIES): Likewise.
12553
12554 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
12555 (normal_mod_DEPENDENCIES): Likewise.
12556
12557 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
12558 for waiting after a message is printed.
12559 * normal/main.c (read_config_file): Likewise.
12560 (grub_normal_init): Register grub_env_write_color_normal() and
12561 grub_env_write_color_highlight() hooks. Mark `color_normal' and
12562 `color_highlight' variables as global.
12563
12564 * normal/menu.c (grub_wait_after_message): New function.
12565 (grub_color_menu_normal): New variable. Replaces ...
12566 (GRUB_COLOR_MENU_NORMAL): ... this macro.
12567 (grub_color_menu_highlight): New variable. Replaces ...
12568 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
12569 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
12570 `GRUB_TERM_COLOR_STANDARD'.
12571 (print_message): Use `grub_setcolorstate' to reload colors. Rename
12572 `normal_code' and `highlight_code' to `old_color_normal' and
12573 `old_color_highlight', respectively.
12574 (grub_menu_init_page): Update colors when drawing the menu, based on
12575 `menu_color_normal' and `menu_color_highlight' variables.
12576 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
12577 a message is printed.
12578
182dd4e5 125792008-01-05 Robert Millan <rmh@aybabtu.com>
12580
12581 * kern/env.c (grub_env_context_open): Propagate hooks for global
12582 variables to new context.
12583
12584 * kern/main.c (grub_set_root_dev): Export `root' variable.
12585
ddf8f6ad 125862008-01-05 Robert Millan <rmh@aybabtu.com>
12587
12588 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
fe6b695a 12589 discs unconditionally, since udev and others have options to provide
ddf8f6ad 12590 them.
12591
d8b43d9b 125922008-01-05 Robert Millan <rmh@aybabtu.com>
12593
12594 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
12595
2bff2de3 125962008-01-04 Christian Franke <franke@computer.org>
12597
12598 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
12599 of eisa_mmap.
12600
97eab917 126012008-01-03 Pavel Roskin <proski@gnu.org>
12602
12603 * kern/i386/linuxbios/init.c: Put "void" to all function
12604 declarations with no arguments.
12605 * kern/powerpc/ieee1275/init.c: Likewise.
12606 * term/i386/pc/at_keyboard.c: Likewise.
12607 * term/i386/pc/vga_text.c: Likewise.
12608 * util/grub-mkdevicemap.c: Likewise.
12609
b9416d00 126102008-01-02 Robert Millan <rmh@aybabtu.com>
12611
12612 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
12613 message when loaded image is out of bounds.
12614 (grub_multiboot_load_elf64): Likewise.
12615
92695df9 126162008-01-02 Pavel Roskin <proski@gnu.org>
12617
12618 * util/grub.d/10_linux.in: Try version without ".old" when
12619 looking for initrd. It's better to use initrd from the newer
12620 kernel of the same version than no initrd at all.
12621
d98d9cad 126222008-01-01 Robert Millan <rmh@aybabtu.com>
12623
12624 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
12625
dbfdce36 126262008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
12627
f19dbdb7 12628 * include/grub/video.h: Added grub_video_unmap_color and
dbfdce36 12629 grub_video_get_active_render_target.
12630 (grub_video_adapter): Added unmap_color and get_active_render_target.
12631
f19dbdb7 12632 * video/video.c: Added grub_video_unmap_color and
dbfdce36 12633 grub_video_get_active_render_target.
12634 (grub_video_get_info): Changed method to accept NULL pointer as an
12635 argument to allow detection of active video adapter.
12636
12637 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
12638 grub_video_vbe_unmap_color_int.
12639 Added grub_video_vbe_unmap_color and
12640 grub_video_vbe_get_active_render_target.
12641 (grub_video_vbe_adapter): Added unmap_color and
12642 get_active_render_target.
12643
f19dbdb7 12644 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
dbfdce36 12645 with grub_video_vbe_unmap_color_int.
12646
12647 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
12648 (DEFAULT_NORMAL_COLOR): Likewise.
12649 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
12650 (DEFAULT_FG_COLOR): Removed.
12651 (DEFAULT_BG_COLOR): Likewise.
12652 (DEFAULT_CURSOR_COLOR): Changed value.
12653 (grub_virtual_screen): Added standard_color_setting,
12654 normal_color_setting, highlight_color_setting and term_color.
12655 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
12656 (bitmap_width): Added.
12657 (bitmap_height): Likewise.
12658 (bitmap): Likewise.
12659 (set_term_color): Likewise.
12660 (grub_virtual_screen_setup): Changed to use new terminal coloring
12661 settings.
12662 (grub_gfxterm_init): Added init for bitmap.
12663 (grub_gfxterm_fini): Added destroy for bitmap.
12664 (redraw_screen_rect): Updated to use background bitmap and new
12665 terminal coloring.
12666 (scroll_up): Added optimization for case when there is no bitmap.
12667 (grub_gfxterm_cls): Fixed to use correct background color.
12668 (grub_virtual_screen_setcolorstate): Changed to use new terminal
12669 coloring.
12670 (grub_virtual_screen_setcolor): Likewise.
12671 (grub_virtual_screen_getcolor): Added.
12672 (grub_gfxterm_background_image_cmd): Likewise.
12673 (grub_video_term): Added setcolor and getcolor.
12674 (MOD_INIT): Added registration of background_image command.
12675 (MOD_TERM): Added unregistration for background_image command.
12676
c3c20931 126772007-12-30 Pavel Roskin <proski@gnu.org>
12678
12679 * loader/multiboot_loader.c: Fix multiboot command
12680 unregistration. Fix all typos in the word "multiboot".
12681
df266716 126822007-12-29 Pavel Roskin <proski@gnu.org>
94239199 12683
12684 * util/grub.d/10_linux.in: Refactor search for initrd. Add
12685 support for initrd names used in Fedora.
12686
fc6e896c 126872007-12-26 Bean <bean123ch@gmail.com>
12688
12689 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
12690 (cpio_mod_SOURCES): New variable.
12691 (cpio_mod_CFLAGS): Likewise.
12692 (cpio_mod_LDFLAGS): Likewise.
12693
12694 * fs/cpio.c: New file.
12695
12696 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
12697
12698 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
12699
12700 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
12701
12702 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12703
533110ad 127042007-12-25 Robert Millan <rmh@aybabtu.com>
12705
12706 * include/grub/term.h (struct grub_term): Add `getcolor' function.
12707 (grub_getcolor): New function.
12708
12709 * kern/term.c (grub_getcolor): New function.
12710 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
12711 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
12712 (print_entry): Set normal and highlight colors to
12713 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
12714 respectively, before printing and restore them to old
12715 values afterwards.
12716 (grub_menu_init_page): Likewise. Fill an additional colored space
12717 that would otherwise be left blank.
12718
12719 * term/efi/console.c (grub_console_getcolor): New function.
12720 (struct grub_console_term.getcolor): New variable.
12721 * term/i386/pc/console.c (grub_console_getcolor): New function.
12722 (struct grub_console_term.getcolor): New variable.
12723 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
12724 (struct grub_console_term.getcolor): New variable.
12725
12726 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
12727 (struct grub_console_term.setcolor): Remove variable.
12728 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
12729 (struct grub_console_term.setcolor): Remove variable.
12730 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
12731 (struct grub_console_term.setcolor): Remove variable.
12732 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
12733 (struct grub_console_term.setcolor): Remove variable.
12734
4931827f 127352007-12-25 Robert Millan <rmh@aybabtu.com>
12736
12737 * configure.ac: Search for possible unifont.hex locations, and
12738 define UNIFONT_HEX if found.
12739
12740 * Makefile.in (UNIFONT_HEX): Define variable.
12741 (DATA): Rename to ...
12742 (PKGLIB): ... this. Update all users.
12743 (PKGDATA): New variable.
12744 (pkgdata_IMAGES): Rename to ...
12745 (pkglib_IMAGES): ... this. Update all users.
12746 (pkgdata_MODULES): Rename to ...
12747 (pkglib_MODULES): ... this. Update all users.
12748 (pkgdata_PROGRAMS): Rename to ...
12749 (pkglib_PROGRAMS): ... this. Update all users.
12750 (pkgdata_DATA): Rename to ...
12751 (pkglib_DATA): ... this. Update all users.
12752 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
12753 (unicode.pff, ascii.pff): New rules.
12754 (all-local): Add `$(PKGDATA)' dependency.
12755 (install-local): Process `$(PKGDATA)'.
12756
12757 * util/update-grub_lib.in (font_path): Search for *.pff files in
12758 a few more locations, including `${pkgdata}'.
12759
57e57e31 127602007-12-23 Robert Millan <rmh@aybabtu.com>
12761
12762 Patch from Bean <bean123ch@gmail.com>:
12763 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
12764 `size'.
12765
4bc72aa9 127662007-12-21 Bean <bean123ch@gmail.com>
12767
12768 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
12769 (ntfscomp_mod_SOURCES): New variable.
12770 (ntfscomp_mod_CFLAGS): Likewise.
12771 (ntfscomp_mod_LDFLAGS): Likewise.
12772
12773 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
12774 (grub_probe_SOURCES): Likewise.
12775 (grub_emu_SOURCES): Likewise.
12776
12777 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
12778 (grub_emu_SOURCES): Likewise.
12779
12780 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
12781 (grub_emu_SOURCES): Likewise.
12782
12783 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
12784 (grub_emu_SOURCES): Likewise.
12785
12786 * fs/ntfs.c (grub_ntfscomp_func): New variable.
12787 (read_run_list): Renamed to grub_ntfs_read_run_list.
12788 (decomp_nextvcn): Moved to ntfscomp.c.
12789 (decomp_getch): Likewise.
12790 (decomp_get16): Likewise.
12791 (decomp_block): Likewise.
12792 (read_block): Likewise.
12793 (read_data): Partially moved to ntfscomp.c.
12794 (fixup): Change unsigned to grub_uint16_t.
12795 (read_mft): Change unsigned long to grub_uint32_t.
12796 (read_attr): Likewise.
12797 (read_data): Likewise.
12798 (read_run_data): Likewise.
12799 (read_run_list): Likewise.
12800 (read_mft): Likewise.
12801
12802 * fs/ntfscomp.c: New file.
12803
12804 * include/grub/ntfs.h: New file.
12805
af680a87 128062007-12-16 Robert Millan <rmh@aybabtu.com>
12807
12808 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
12809 IDE disk check, since Linux is known to support 20 IDE disks.
12810 Reported by Colin Watson.
12811
84be7599 128122007-12-15 Bean <bean123ch@gmail.com>
12813
12814 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
12815 (lnxboot_img_SOURCES): New variable.
12816 (lnxboot_img_ASFLAGS): Likewise.
12817 (lnxboot_img_LDFLAGS): Likewise.
12818
12819 * boot/i386/pc/lnxboot.S: New file.
12820
6af9db01 128212007-11-24 Pavel Roskin <proski@gnu.org>
12822
12823 * configure.ac: Test if '--build-id=none' is supported by the
12824 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
12825 objcopy to generate incorrect binary files (binutils
12826 2.17.50.0.18-1 as shipped by Fedora 8).
12827 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
12828 linking, so that build ID doesn't break the test.
12829
7361cfe6 128302007-11-24 Pavel Roskin <proski@gnu.org>
12831
12832 * include/grub/i386/time.h: use "void" in the argument list
12833 of grub_cpu_idle().
12834 * include/grub/powerpc/time.h: Likewise.
12835 * include/grub/sparc64/time.h: Likewise.
12836
1593e10c 128372007-11-18 Christian Franke <franke@computer.org>
12838
12839 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
12840 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
12841 This fixes the problem that function keys did not work in grub-emu.
12842
3b8db1a8 128432007-11-18 Christian Franke <franke@computer.org>
12844
12845 * disk/host.c (grub_host_open): Remove attribute unused from
12846 name parameter. Add check for "host". This fixes the problem
12847 that grub-emu does not find partitions.
12848
2e29408d 128492007-11-18 Christian Franke <franke@computer.org>
12850
12851 * util/hostfs.c (is_dir): New function.
12852 (grub_hostfs_dir): Handle missing dirent.d_type case.
12853 (grub_hostfs_read): Add missing fseek().
12854 (grub_hostfs_label): Clear label pointer. This fixes a crash
12855 of grub-emu on "ls (host)".
12856
398cd047 128572007-11-18 Christian Franke <franke@computer.org>
12858
12859 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
12860 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
12861 to 64 bit boundary by default.
12862
c405c391 128632007-11-18 Bean <bean123ch@gmail.com>
12864
12865 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
12866 (hexdump_mod_SOURCES): New variable.
12867 (hexdump_mod_CFLAGS): Likewise.
12868 (hexdump_mod_LDFLAGS): Likewise.
f19dbdb7 12869
c405c391 12870 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
12871
12872 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
12873
12874 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
12875
12876 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
12877
12878 * include/grub/hexdump.h: New file.
12879
12880 * commands/hexdump.c: New file.
12881
5cced7fd 128822007-11-10 Robert Millan <rmh@aybabtu.com>
12883
12884 * commands/i386/pc/play.c (beep_off): Switch order of arguments
12885 in grub_outb() calls.
12886 (beep_on): Likewise.
12887
8b714eb0 128882007-11-10 Christian Franke <franke@computer.org>
12889
12890 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
12891 (grub_menu_run): Likewise.
12892
ce0f1839 128932007-11-10 Robert Millan <rmh@aybabtu.com>
12894
12895 * include/grub/i386/efi/machine.h: New file.
12896 * include/grub/i386/linuxbios/machine.h: Likewise.
12897 * include/grub/i386/pc/machine.h: Likewise.
12898 * include/grub/powerpc/ieee1275/machine.h: Likewise.
12899 * include/grub/sparc64/ieee1275/machine.h: Likewise.
12900
12901 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
12902 (serial_hw_io_addr): New variable.
12903 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
12904 instead of `(unsigned short *) 0x400'.
12905
270c237d 129062007-11-10 Bean <bean123ch@gmail.com>
12907
12908 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
12909
a87783bf 129102007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
12911
12912 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
12913 (vga_mod_SOURCES): Added.
12914 (vga_mod_CFLAGS): Likewise.
12915 (vga_mod_LDFLAGS): Likewise.
12916
12917 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
12918 grub_outb() calls.
12919 (set_map_mask): Likewise.
12920 (set_read_map): Likewise.
12921 (set_read_address): Likewise.
12922 (vga_font): Removed variable.
12923 (get_vga_glyph): Removed function.
12924 (invalidate_char): Likewise.
12925 (write_char): Changed to use grub_font_get_glyph() for font
12926 information.
12927 (grub_vga_putchar): Likewise.
12928 (grub_vga_getcharwidth): Likewise.
12929
6433b448 129302007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
12931
12932 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
12933 flags.
12934 (pxeboot_img_LDFLAGS): Likewise.
12935 (diskboot_img_LDFLAGS): Likewise.
12936 (kernel_img_LDFLAGS): Likewise.
12937
49178511 129382007-11-06 Robert Millan <rmh@aybabtu.com>
12939
12940 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
12941 in grub_outb() calls.
12942 (serial_hw_init): Likewise.
12943
53b052de 129442007-11-05 Robert Millan <rmh@aybabtu.com>
12945
12946 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
12947 spaces. Skip non-regular files.
12948
5ab33bba 129492007-11-05 Robert Millan <rmh@aybabtu.com>
12950
12951 * kern/disk.c (grub_disk_firmware_fini)
12952 (grub_disk_firmware_is_tainted): New variables.
12953
12954 * include/grub/disk.h (grub_disk_firmware_fini)
12955 (grub_disk_firmware_is_tainted): Likewise.
12956
12957 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
12958 (grub_disk_biosdisk_fini): ... to here.
12959 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
12960 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
12961 is set. Register grub_disk_biosdisk_fini() in
12962 `grub_disk_firmware_fini'.
12963
12964 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
12965 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
12966 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
12967 to finish existing firmware disk interface.
12968
12969 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
12970 (ata_mod_SOURCES): New variable.
12971 (ata_mod_CFLAGS): Likewise.
12972 (ata_mod_LDFLAGS): Likewise.
12973
0149ab7c 129742007-11-05 Robert Millan <rmh@aybabtu.com>
12975
12976 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
12977 (grub_ata_wait): Reimplement using grub_millisleep().
12978
12979 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
12980 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
12981
be7ac41e 129822007-11-03 Marco Gerards <marco@gnu.org>
12983
12984 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
12985 (CRTC_ADDR_PORT): New macro.
12986 (CRTC_DATA_PORT): Likewise.
12987 (CRTC_CURSOR): Likewise.
12988 (CRTC_CURSOR_ADDR_HIGH): Likewise.
12989 (CRTC_CURSOR_ADDR_LOW): Likewise.
12990 (update_cursor): New function.
12991 (grub_console_real_putchar): Call `update_cursor'.
12992 (grub_console_gotoxy): Likewise.
12993 (grub_console_cls): Set the default color when clearing the
12994 screen.
12995 (grub_console_setcursor): Implemented.
12996
bb06ab2e 129972007-11-03 Marco Gerards <marco@gnu.org>
12998
12999 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
13000 become activate.
13001 (grub_ata_pio_write): Likewise.
13002
13003 (grub_atapi_identify): Wait after issuing an ATA command.
13004 (grub_atapi_packet): Likewise.
13005 (grub_ata_identify): Likewise.
13006 (grub_ata_readwrite): Likewise.
13007
cf8f780b 130082007-11-03 Marco Gerards <marco@gnu.org>
13009
13010 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
13011 (grub_ata_pio_write): Likewise.
13012 (grub_ata_readwrite): Use `grub_error', instead of
13013 returning `grub_errno'.
13014
ed649e54 130152007-11-03 Marco Gerards <marco@gnu.org>
13016
13017 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
13018 grub_ata_pio_write once for every single sector, instead of for
13019 multiple sectors.
13020
ca25d8f0 130212007-10-31 Robert Millan <rmh@aybabtu.com>
13022
13023 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
13024
13025 * conf/i386-linuxbios.rmk: New file.
13026
13027 * kern/i386/pc/hardware.c: Likewise.
13028 * term/i386/pc/at_keyboard.c: Likewise.
13029 * term/i386/pc/vga_text.c: Likewise.
13030
13031 * include/grub/i386/linuxbios/boot.h: Likewise.
13032 * include/grub/i386/linuxbios/console.h: Likewise.
13033 * include/grub/i386/linuxbios/init.h: Likewise.
13034 * include/grub/i386/linuxbios/kernel.h: Likewise.
13035 * include/grub/i386/linuxbios/loader.h: Likewise.
13036 * include/grub/i386/linuxbios/memory.h: Likewise.
13037 * include/grub/i386/linuxbios/serial.h: Likewise.
13038 * include/grub/i386/linuxbios/time.h: Likewise.
13039
13040 * kern/i386/linuxbios/init.c: Likewise.
13041 * kern/i386/linuxbios/startup.S: Likewise.
13042 * kern/i386/linuxbios/table.c: Likewise.
13043
e911ecc1 130442007-10-31 Marco Gerards <marco@gnu.org>
13045
13046 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
13047 (ata_mod_SOURCES): New variable.
13048 (ata_mod_CFLAGS): Likewise.
13049 (ata_mod_LDFLAGS): Likewise.
13050
13051 * disk/ata.c: New file.
13052
13053 * include/grub/disk.h (grub_disk_dev_id): Add
13054 `GRUB_DISK_DEV_ATA_ID'.
f19dbdb7 13055
7f66d0e0 130562007-10-31 Robert Millan <rmh@aybabtu.com>
13057
13058 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
13059 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
13060
13061 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
13062 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
13063
13064 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
13065 `<grub/types.h>'.
13066
13067 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
13068
5cd7dd46 130692007-10-27 Robert Millan <rmh@aybabtu.com>
13070
3236ca65 13071 * include/grub/types.h (ULONG_MAX): Define macro.
5cd7dd46 13072
2ebfc90f 130732007-10-22 Robert Millan <rmh@aybabtu.com>
13074
13075 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
13076 `"../realmode.S"'.
13077 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
13078
73fcb0f3 130792007-10-22 Robert Millan <rmh@aybabtu.com>
13080
13081 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
13082 (pkgdata_MODULES): Add `biosdisk.mod'.
13083 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
13084 variables.
13085
13086 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
13087 (grub_biosdisk_init): Replace with ...
13088 (GRUB_MOD_INIT(biosdisk)): ... this.
13089 (grub_biosdisk_fini): Replace with ...
13090 (GRUB_MOD_FINI(biosdisk)): ... this.
13091
13092 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
13093 (grub_machine_init): Remove call to grub_biosdisk_init().
13094 (grub_machine_fini): Remove call to grub_machine_fini().
13095
13096 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
13097
3381d274 130982007-10-22 Robert Millan <rmh@aybabtu.com>
13099
13100 * include/grub/time.h: New file.
13101 * include/grub/i386/time.h: Likewise.
13102 * include/grub/powerpc/time.h: Likewise.
13103 * include/grub/sparc64/time.h: Likewise.
13104
13105 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
13106 instances to ...
13107 (KERNEL_MACHINE_TIME_HEADER): ... this.
13108 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
13109 instances to ...
13110 (KERNEL_MACHINE_TIME_HEADER): ... this.
13111 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
13112 instances to ...
13113 (KERNEL_MACHINE_TIME_HEADER): ... this.
13114
13115 * kern/i386/efi/init.c: Include `<grub/time.h>'.
13116 (grub_millisleep): New function.
13117 * kern/i386/pc/init.c: Include `<grub/time.h>'.
13118 (grub_millisleep): New function.
13119 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
13120 Remove `grub/machine/time.h' include.
13121 (grub_millisleep): New function.
13122 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
13123 Remove `grub/machine/time.h' include.
13124 (grub_millisleep): New function.
13125
13126 * include/grub/misc.h (grub_div_roundup): New function.
13127
13128 * kern/misc.c: Include `<grub/time.h>'.
13129 (grub_millisleep_generic): New function.
13130
13131 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
13132 Add `time.h'.
13133 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
13134 Add `time.h'.
13135 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
13136 `machine/time.h'. Add `time.h'.
13137 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
13138
a39a0312 131392007-10-21 Robert Millan <rmh@aybabtu.com>
13140
13141 * include/grub/misc.h (grub_max): New function.
13142
2aad70e2 131432007-10-21 Robert Millan <rmh@aybabtu.com>
13144
13145 * util/misc.c (grub_util_info): Call fflush() before returning.
13146
54b71c4b 131472007-10-20 Robert Millan <rmh@aybabtu.com>
13148
13149 * genmk.rb (Image): Copy `extra_flags' from here ...
13150 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
13151
13152 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
13153 to `argc' and `args' arguments.
13154
a979f513 131552007-10-17 Robert Millan <rmh@aybabtu.com>
13156
13157 * kern/i386/loader.S: New file.
13158
13159 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
13160 * kern/i386/loader.S (grub_linux_prot_size)... to here.
13161 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
13162 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
13163 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
13164 * kern/i386/loader.S (grub_linux_real_addr)... to here.
13165 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
13166 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
13167 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
13168 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
13169 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
13170 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
13171 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
13172 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
13173
13174 * kern/i386/realmode.S: New file.
13175
13176 * kern/i386/pc/startup.S (protstack): Moved from here ...
13177 * kern/i386/realmode.S (protstack)... to here.
13178 * kern/i386/pc/startup.S (gdt): Moved from here ...
13179 * kern/i386/realmode.S (gdt)... to here.
13180 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
13181 * kern/i386/realmode.S (prot_to_real)... to here.
13182
13183 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
13184 `kern/i386/realmode.S'.
13185
825fc8fd 131862007-10-17 Robert Millan <rmh@aybabtu.com>
13187
13188 * include/grub/i386/loader.h: New file.
13189
13190 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
13191 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
13192 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
13193 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
13194 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
13195 * include/grub/i386/loader.h (grub_linux_prot_size)
13196 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
13197 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
13198 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
13199 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
13200
13201 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
13202
e179b2f4 132032007-10-15 Robert Millan <rmh@aybabtu.com>
13204
13205 * normal/misc.c (grub_normal_print_device_info): Do not probe for
13206 filesystem when dev->disk is unset.
13207 Do probe for filesystem even when dev->disk->has_partitions is set.
13208 In case a filesystem is found, always report it.
13209 In case it isn't, if dev->disk->has_partitions is set, report that
13210 a partition table was found instead of reporting that no filesystem
13211 could be identified.
13212
5db82af6 132132007-10-12 Robert Millan <rmh@aybabtu.com>
13214
13215 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
13216 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
13217
68f6ac74 13218 * include/grub/types.h (grub_host_to_target16): New macro.
13219 (grub_host_to_target32): Likewise.
13220 (grub_host_to_target64): Likewise.
13221 (grub_target_to_host16): Likewise.
13222 (grub_target_to_host32): Likewise.
13223 (grub_target_to_host64): Likewise.
5db82af6 13224
13225 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
13226 Renamed from to ...
13227 (GRUB_MOD_ALIGN): ...this. Update all users.
13228
68f6ac74 13229 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
13230 grub_host_to_target32.
13231 Replace grub_be_to_cpu32 with grub_target_to_host32.
13232 (load_modules): Likewise.
13233 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
13234 Replace grub_be_to_cpu32 with grub_target_to_host32.
13235 Replace grub_cpu_to_be16 with grub_host_to_target16.
13236 Replace grub_cpu_to_be32 grub_host_to_target32.
5db82af6 13237
3cf497cc 132382007-10-12 Robert Millan <rmh@aybabtu.com>
13239
13240 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
13241 * util/elf/grub-mkimage.c: ... here.
13242
13243 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
13244 `util/powerpc/ieee1275/grub-mkimage.c'.
13245
c8cc3692 132462007-10-07 Robert Millan <rmh@aybabtu.com>
adbc4c9d 13247
c8cc3692 13248 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
13249 and make it easier to figure out.
13250 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
13251 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
13252 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
13253 leave us with less than HEAP_MIN_SIZE total heap.
13254 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
adbc4c9d 13255
5c58b791 132562007-10-03 Robert Millan <rmh@aybabtu.com>
13257
13258 * include/grub/i386/io.h: New file.
13259 * commands/i386/pc/play.c (inb): Removed.
13260 (outb): Removed.
13261 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
13262 with grub_outb().
afcd2ef8 13263 * term/i386/pc/serial.c (inb): Removed.
13264 (outb): Removed.
13265 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
13266 with grub_outb().
13267 * term/i386/pc/vga.c (inb): Removed.
13268 (outb): Removed.
13269 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
13270 with grub_outb().
5c58b791 13271
1a477ed6 132722007-10-02 Robert Millan <rmh@aybabtu.com>
13273
13274 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
13275 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13276 Reported by Marcin Kurek.
13277
6b5d80fa 132782007-09-07 Robert Millan <rmh@aybabtu.com>
13279
13280 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
13281 SmartFirmware version updates (as released by Sven Luther), and avoid
13282 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
13283 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
13284 known broken.
13285
5618afbf 132862007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
13287
13288 From Hitoshi Ozeki:
13289 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
13290 when merging two regions.
13291
6139dcd9 132922007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
13293
508e39ee 13294 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
13295 * normal/completion.c (grub_normal_do_completion): Likewise.
13296 Reported by Hitoshi Ozeki.
13297
132982007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 13299
6139dcd9 13300 Do not use devices at boot in chainloading.
f19dbdb7 13301
6139dcd9 13302 * loader/i386/pc/chainloader.c (boot_drive): New variable.
13303 (boot_part_addr): Likewise.
13304 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
13305 with BOOT_DRIVE and BOOT_PART_ADDR.
13306 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
13307 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
13308
38da6516 133092007-08-29 Robert Millan <rmh@aybabtu.com>
13310
13311 Patch from Simon Peter <dn.tlp@gmx.net>:
13312 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
13313 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
13314 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
13315 util/i386/pc/grub-setup.c_DEPENDENCIES.
13316 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
13317 util/grub-probe.c_DEPENDENCIES.
13318 * conf/powerpc-ieee1275.rmk: Likewise.
13319
29d0928c 133202007-08-28 Robert Millan <rmh@aybabtu.com>
13321
13322 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
13323 to tell grub-mkdevicemap how to name devices.
13324 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
13325 feature).
13326
13327 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
13328 util/i386/get_disk_name.c.
13329 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
13330 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
13331 util/ieee1275/get_disk_name.c.
13332
13333 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
13334
13335 * DISTLIST: Add util/i386/get_disk_name.c and
13336 util/ieee1275/get_disk_name.c.
13337
13338 * util/grub-mkdevicemap.c: Replace device naming logic with
13339 grub_util_get_disk_name() calls.
13340
5a0d3cca 133412007-08-20 Robert Millan <rmh@aybabtu.com>
13342
13343 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
13344 (so that it works for both plural and singular quantities).
13345
8b72db2f 133462007-08-05 Robert Millan <rmh@aybabtu.com>
13347
13348 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
13349 so that [xz] isn't taken into account when determining order.
13350
352466bf 133512007-08-02 Marco Gerards <marco@gnu.org>
13352
13353 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
13354 `include/multiboot2.h', `include/grub/elfload.h',
13355 `include/multiboot.h', `include/grub/multiboot.h',
13356 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
13357 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
13358 `kern/elf.c', `loader/multiboot_loader.c',
13359 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
13360 `loader/i386/pc/multiboot2.c',
13361 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
13362 `util/i386/pc/grub-mkrescue.in'. Remove
13363 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
13364 `include/grub/i386/pc/util/biosdisk.h' and
13365 `include/grub/powerpc/ieee1275/multiboot.h'.
13366
8f096014 133672007-08-02 Bean <bean123ch@gmail.com>
13368
13369 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
13370 (ntfs_mod_SOURCES): New variable.
13371 (ntfs_mod_CFLAGS): Likewise.
13372 (ntfs_mod_LDFLAGS): Likewise.
13373
13374 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
13375 (grub_probe_SOURCES): Likewise.
13376 (grub_emu_SOURCES): Likewise.
13377
13378 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
13379 (grub_emu_SOURCES): Likewise.
13380
13381 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
13382 (grub_emu_SOURCES): Likewise.
f19dbdb7 13383
8f096014 13384 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
13385
13386 * fs/ntfs.c: New file.
13387
9959f7db 133882007-08-02 Bean <bean123ch@gmail.com>
13389
13390 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
13391
13392 * file.h (grub_file): Likewise.
13393
13394 * fshelp.h (grub_fshelp_read_file): Likewise.
13395
13396 * util/i386/pc/grub-setup.c (setup): Likewise.
13397 (save_first_sector): Likewise.
13398 (save_blocklists): Likewise.
f19dbdb7 13399
9959f7db 13400 * fs/affs.c (grub_affs_read_file): Likewise.
13401
13402 * fs/ext2.c (grub_ext2_read_file): Likewise.
13403
13404 * fs/fat.c (grub_fat_read_data): Likewise.
13405
13406 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
13407
13408 * fs/hfs.c (grub_hfs_read_file): Likewise.
13409
13410 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
13411
13412 * fs/jfs.c (grub_jfs_read_file): Likewise.
13413
13414 * fs/minix.c (grub_minix_read_file): Likewise.
13415
13416 * fs/sfs.c (grub_sfs_read_file): Likewise.
13417
13418 * fs/ufs.c (grub_ufs_read_file): Likewise.
f19dbdb7 13419
9959f7db 13420 * fs/xfs.c (grub_xfs_read_file): Likewise.
13421
13422 * command/blocklist.c (read_blocklist): Likewise.
13423 (print_blocklist): Likewise.
13424
0a203f83 134252007-08-02 Marco Gerards <marco@gnu.org>
13426
13427 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
13428 `util/hostfs.c'.
13429
13430 * disk/host.c: New file.
13431
13432 * util/hostfs.c: Likewise.
13433
13434 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
13435 return `GRUB_ERR_BAD_FS'.
13436 * fs/sfs.c (grub_sfs_mount): Likewise.
13437 * fs/xfs.c (grub_xfs_mount): Likewise.
13438
13439 * include/grub/disk.h (enum grub_disk_dev_id): Add
13440 `GRUB_DISK_DEVICE_HOST_ID'.
13441
13442 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
13443
e5dfe777 134442007-07-24 Jerone Young <jerone@gmail.com>
13445
f19dbdb7 13446 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
e5dfe777 13447 modules for compilation.
13448 * conf/powerpc-ieee1275.rmk: Likewise.
13449
13450 * include/multiboot.h: Move multiboot definitions to one file. Rename
13451 many definitions to not get grub specific.
13452 * include/multiboot2.h: Create header with multiboot 2 definitions.
13453 * include/grub/multiboot.h: Header for grub specific function
13454 prototypes and definitions.
13455 * include/grub/multiboot2.h: Likewise.
13456 * include/grub/multiboot_loader.h: Likewise.
13457 * include/grub/i386/pc/multiboot.h: Removed.
13458 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
13459
13460 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
13461 and 2 to allow for one multiboot and module commands.
13462 * loader/multiboot2.c: Add multiboot2 functionality.
13463 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
13464 and definition names.
13465 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
13466 2 functions.
13467 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
13468 ieee1275 specific multiboot2 code.
13469
13470 * kern/i386/pc/startup.S: Change headers and definition names for
13471 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
13472
daf0f0ba 134732007-07-22 Robert Millan <rmh@aybabtu.com>
13474
13475 * geninitheader.sh: Process file specified in first parameter rather
13476 than hardcoding grub_modules_init.lst.
fe6b695a 13477 * geninit.sh: Likewise. Also, construct header name dynamically rather
daf0f0ba 13478 than hardcoding grub_modules_init.h.
13479
13480 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
13481 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
13482 grub_probe_init.[ch] and grub_setup_init.[ch].
13483
13484 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
13485 grub_modules_init.h with grub_emu_init.h.
13486 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
13487 grub_probe_init.[ch] files.
13488 * conf/i386-efi.rmk: Likewise.
13489 * conf/i386-pc.rmk: Likewise.
13490 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
13491 grub_setup_init.[ch] files.
13492
13493 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
13494 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
13495 to initialize modules rather than a list of hardcoded functions.
13496 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
13497 grub_init_all() to initialize modules rather than a list of hardcoded
13498 functions.
13499
54cdc1cc 135002007-07-22 Robert Millan <rmh@aybabtu.com>
13501
13502 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
13503 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
13504
ad0686cc 135052007-07-22 Robert Millan <rmh@aybabtu.com>
13506
13507 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
13508 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
13509 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
13510 flag when running on SmartFirmware.
13511 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
13512 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
13513 was set.
13514
13515 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
13516 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
13517 rather than decreasing it.
13518
13519 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
13520 there's not enough space to do it, fail in the same way as when it
13521 can't be done because there are no partitions.
13522
13523 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
13524 when nvsetenv failed.
13525
969c02ec 135262007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
13527
13528 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
13529 because this rule is automatically generated.
13530 (grub-mkrescue): Removed for the same reason as above.
13531
5a79f472 135322007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
13533
13534 Migrate to GNU General Public License Version 3.
f19dbdb7 13535
5a79f472 13536 * COPYING: Replaced with the plain text version of GPLv3.
13537
13538 * config.guess: Updated from gnulib.
13539 * config.sub: Likewise.
13540
13541 * geninit.sh: Output a GPLv3 copyright notice.
13542 * geninitheader.sh: Likewise.
13543 * genmodsrc.sh: Likewise.
13544 * gensymlist.sh.in: Likewise.
13545
13546 * boot/i386/pc/boot.S: Upgraded to GPLv3.
13547 * boot/i386/pc/diskboot.S: Likewise.
13548 * boot/i386/pc/pxeboot.S: Likewise.
13549 * commands/blocklist.c: Likewise.
13550 * commands/boot.c: Likewise.
13551 * commands/cat.c: Likewise.
13552 * commands/cmp.c: Likewise.
13553 * commands/configfile.c: Likewise.
13554 * commands/echo.c: Likewise.
13555 * commands/help.c: Likewise.
13556 * commands/ls.c: Likewise.
13557 * commands/search.c: Likewise.
13558 * commands/terminal.c: Likewise.
13559 * commands/test.c: Likewise.
13560 * commands/videotest.c: Likewise.
13561 * commands/i386/cpuid.c: Likewise.
13562 * commands/i386/pc/halt.c: Likewise.
13563 * commands/i386/pc/play.c: Likewise.
13564 * commands/i386/pc/reboot.c: Likewise.
13565 * commands/i386/pc/vbeinfo.c: Likewise.
13566 * commands/i386/pc/vbetest.c: Likewise.
13567 * commands/ieee1275/halt.c: Likewise.
13568 * commands/ieee1275/reboot.c: Likewise.
13569 * commands/ieee1275/suspend.c: Likewise.
13570 * disk/loopback.c: Likewise.
13571 * disk/lvm.c: Likewise.
13572 * disk/raid.c: Likewise.
13573 * disk/efi/efidisk.c: Likewise.
13574 * disk/i386/pc/biosdisk.c: Likewise.
13575 * disk/ieee1275/ofdisk.c: Likewise.
13576 * font/manager.c: Likewise.
13577 * fs/affs.c: Likewise.
13578 * fs/ext2.c: Likewise.
13579 * fs/fat.c: Likewise.
13580 * fs/fshelp.c: Likewise.
13581 * fs/hfs.c: Likewise.
13582 * fs/hfsplus.c: Likewise.
13583 * fs/iso9660.c: Likewise.
13584 * fs/jfs.c: Likewise.
13585 * fs/minix.c: Likewise.
13586 * fs/sfs.c: Likewise.
13587 * fs/ufs.c: Likewise.
13588 * fs/xfs.c: Likewise.
13589 * hello/hello.c: Likewise.
13590 * include/grub/acorn_filecore.h: Likewise.
13591 * include/grub/arg.h: Likewise.
13592 * include/grub/bitmap.h: Likewise.
13593 * include/grub/boot.h: Likewise.
13594 * include/grub/cache.h: Likewise.
13595 * include/grub/device.h: Likewise.
13596 * include/grub/disk.h: Likewise.
13597 * include/grub/dl.h: Likewise.
13598 * include/grub/elfload.h: Likewise.
13599 * include/grub/env.h: Likewise.
13600 * include/grub/err.h: Likewise.
13601 * include/grub/file.h: Likewise.
13602 * include/grub/font.h: Likewise.
13603 * include/grub/fs.h: Likewise.
13604 * include/grub/fshelp.h: Likewise.
13605 * include/grub/gzio.h: Likewise.
13606 * include/grub/hfs.h: Likewise.
13607 * include/grub/kernel.h: Likewise.
13608 * include/grub/loader.h: Likewise.
13609 * include/grub/lvm.h: Likewise.
13610 * include/grub/misc.h: Likewise.
13611 * include/grub/mm.h: Likewise.
13612 * include/grub/net.h: Likewise.
13613 * include/grub/normal.h: Likewise.
13614 * include/grub/parser.h: Likewise.
13615 * include/grub/partition.h: Likewise.
13616 * include/grub/pc_partition.h: Likewise.
13617 * include/grub/raid.h: Likewise.
13618 * include/grub/rescue.h: Likewise.
13619 * include/grub/script.h: Likewise.
13620 * include/grub/setjmp.h: Likewise.
13621 * include/grub/symbol.h: Likewise.
13622 * include/grub/term.h: Likewise.
13623 * include/grub/terminfo.h: Likewise.
13624 * include/grub/tparm.h: Likewise.
13625 * include/grub/types.h: Likewise.
13626 * include/grub/video.h: Likewise.
13627 * include/grub/efi/api.h: Likewise.
13628 * include/grub/efi/chainloader.h: Likewise.
13629 * include/grub/efi/console.h: Likewise.
13630 * include/grub/efi/console_control.h: Likewise.
13631 * include/grub/efi/disk.h: Likewise.
13632 * include/grub/efi/efi.h: Likewise.
13633 * include/grub/efi/pe32.h: Likewise.
13634 * include/grub/efi/time.h: Likewise.
13635 * include/grub/i386/linux.h: Likewise.
13636 * include/grub/i386/setjmp.h: Likewise.
13637 * include/grub/i386/types.h: Likewise.
13638 * include/grub/i386/efi/kernel.h: Likewise.
13639 * include/grub/i386/efi/loader.h: Likewise.
13640 * include/grub/i386/efi/time.h: Likewise.
13641 * include/grub/i386/pc/biosdisk.h: Likewise.
13642 * include/grub/i386/pc/boot.h: Likewise.
13643 * include/grub/i386/pc/chainloader.h: Likewise.
13644 * include/grub/i386/pc/console.h: Likewise.
13645 * include/grub/i386/pc/init.h: Likewise.
13646 * include/grub/i386/pc/kernel.h: Likewise.
13647 * include/grub/i386/pc/loader.h: Likewise.
13648 * include/grub/i386/pc/memory.h: Likewise.
13649 * include/grub/i386/pc/multiboot.h: Likewise.
13650 * include/grub/i386/pc/serial.h: Likewise.
13651 * include/grub/i386/pc/time.h: Likewise.
13652 * include/grub/i386/pc/vbe.h: Likewise.
13653 * include/grub/i386/pc/vbeblit.h: Likewise.
13654 * include/grub/i386/pc/vbefill.h: Likewise.
13655 * include/grub/i386/pc/vbeutil.h: Likewise.
13656 * include/grub/i386/pc/vga.h: Likewise.
13657 * include/grub/ieee1275/ieee1275.h: Likewise.
13658 * include/grub/ieee1275/ofdisk.h: Likewise.
13659 * include/grub/powerpc/libgcc.h: Likewise.
13660 * include/grub/powerpc/setjmp.h: Likewise.
13661 * include/grub/powerpc/types.h: Likewise.
13662 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
13663 * include/grub/powerpc/ieee1275/console.h: Likewise.
13664 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
13665 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
13666 * include/grub/powerpc/ieee1275/loader.h: Likewise.
13667 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
13668 * include/grub/powerpc/ieee1275/time.h: Likewise.
13669 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
13670 * include/grub/sparc64/libgcc.h: Likewise.
13671 * include/grub/sparc64/setjmp.h: Likewise.
13672 * include/grub/sparc64/types.h: Likewise.
13673 * include/grub/sparc64/ieee1275/console.h: Likewise.
13674 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
13675 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
13676 * include/grub/sparc64/ieee1275/time.h: Likewise.
13677 * include/grub/util/biosdisk.h: Likewise.
13678 * include/grub/util/getroot.h: Likewise.
13679 * include/grub/util/lvm.h: Likewise.
13680 * include/grub/util/misc.h: Likewise.
13681 * include/grub/util/raid.h: Likewise.
13682 * include/grub/util/resolve.h: Likewise.
13683 * io/gzio.c: Likewise.
13684 * kern/device.c: Likewise.
13685 * kern/disk.c: Likewise.
13686 * kern/dl.c: Likewise.
13687 * kern/elf.c: Likewise.
13688 * kern/env.c: Likewise.
13689 * kern/err.c: Likewise.
13690 * kern/file.c: Likewise.
13691 * kern/fs.c: Likewise.
13692 * kern/loader.c: Likewise.
13693 * kern/main.c: Likewise.
13694 * kern/misc.c: Likewise.
13695 * kern/mm.c: Likewise.
13696 * kern/parser.c: Likewise.
13697 * kern/partition.c: Likewise.
13698 * kern/rescue.c: Likewise.
13699 * kern/term.c: Likewise.
13700 * kern/efi/efi.c: Likewise.
13701 * kern/efi/init.c: Likewise.
13702 * kern/efi/mm.c: Likewise.
13703 * kern/i386/dl.c: Likewise.
13704 * kern/i386/efi/init.c: Likewise.
13705 * kern/i386/efi/startup.S: Likewise.
13706 * kern/i386/pc/init.c: Likewise.
13707 * kern/i386/pc/lzo1x.S: Likewise.
13708 * kern/i386/pc/startup.S: Likewise.
13709 * kern/ieee1275/ieee1275.c: Likewise.
13710 * kern/powerpc/cache.S: Likewise.
13711 * kern/powerpc/dl.c: Likewise.
13712 * kern/powerpc/ieee1275/cmain.c: Likewise.
13713 * kern/powerpc/ieee1275/crt0.S: Likewise.
13714 * kern/powerpc/ieee1275/init.c: Likewise.
13715 * kern/powerpc/ieee1275/openfw.c: Likewise.
13716 * kern/sparc64/cache.S: Likewise.
13717 * kern/sparc64/dl.c: Likewise.
13718 * kern/sparc64/ieee1275/init.c: Likewise.
13719 * kern/sparc64/ieee1275/openfw.c: Likewise.
13720 * loader/efi/chainloader.c: Likewise.
13721 * loader/efi/chainloader_normal.c: Likewise.
13722 * loader/i386/efi/linux.c: Likewise.
13723 * loader/i386/efi/linux_normal.c: Likewise.
13724 * loader/i386/pc/chainloader.c: Likewise.
13725 * loader/i386/pc/chainloader_normal.c: Likewise.
13726 * loader/i386/pc/linux.c: Likewise.
13727 * loader/i386/pc/linux_normal.c: Likewise.
13728 * loader/i386/pc/multiboot.c: Likewise.
13729 * loader/i386/pc/multiboot_normal.c: Likewise.
13730 * loader/powerpc/ieee1275/linux.c: Likewise.
13731 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
13732 * normal/arg.c: Likewise.
13733 * normal/cmdline.c: Likewise.
13734 * normal/command.c: Likewise.
13735 * normal/completion.c: Likewise.
13736 * normal/execute.c: Likewise.
13737 * normal/function.c: Likewise.
13738 * normal/lexer.c: Likewise.
13739 * normal/main.c: Likewise.
13740 * normal/menu.c: Likewise.
13741 * normal/menu_entry.c: Likewise.
13742 * normal/misc.c: Likewise.
13743 * normal/parser.y: Likewise.
13744 * normal/script.c: Likewise.
13745 * normal/i386/setjmp.S: Likewise.
13746 * normal/powerpc/setjmp.S: Likewise.
13747 * normal/sparc64/setjmp.S: Likewise.
13748 * partmap/acorn.c: Likewise.
13749 * partmap/amiga.c: Likewise.
13750 * partmap/apple.c: Likewise.
13751 * partmap/gpt.c: Likewise.
13752 * partmap/pc.c: Likewise.
13753 * partmap/sun.c: Likewise.
13754 * term/gfxterm.c: Likewise.
13755 * term/terminfo.c: Likewise.
13756 * term/efi/console.c: Likewise.
13757 * term/i386/pc/console.c: Likewise.
13758 * term/i386/pc/serial.c: Likewise.
13759 * term/i386/pc/vesafb.c: Likewise.
13760 * term/i386/pc/vga.c: Likewise.
13761 * term/ieee1275/ofconsole.c: Likewise.
13762 * util/biosdisk.c: Likewise.
13763 * util/console.c: Likewise.
13764 * util/genmoddep.c: Likewise.
13765 * util/getroot.c: Likewise.
13766 * util/grub-emu.c: Likewise.
13767 * util/grub-mkdevicemap.c: Likewise.
13768 * util/grub-probe.c: Likewise.
13769 * util/lvm.c: Likewise.
13770 * util/misc.c: Likewise.
13771 * util/raid.c: Likewise.
13772 * util/resolve.c: Likewise.
13773 * util/update-grub.in: Likewise.
13774 * util/update-grub_lib.in: Likewise.
13775 * util/grub.d/00_header.in: Likewise.
13776 * util/grub.d/10_hurd.in: Likewise.
13777 * util/grub.d/10_linux.in: Likewise.
13778 * util/i386/efi/grub-install.in: Likewise.
13779 * util/i386/efi/grub-mkimage.c: Likewise.
13780 * util/i386/pc/grub-install.in: Likewise.
13781 * util/i386/pc/grub-mkimage.c: Likewise.
13782 * util/i386/pc/grub-mkrescue.in: Likewise.
13783 * util/i386/pc/grub-setup.c: Likewise.
13784 * util/i386/pc/misc.c: Likewise.
13785 * util/powerpc/ieee1275/grub-install.in: Likewise.
13786 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
13787 * util/powerpc/ieee1275/misc.c: Likewise.
13788 * video/bitmap.c: Likewise.
13789 * video/video.c: Likewise.
13790 * video/i386/pc/vbe.c: Likewise.
13791 * video/i386/pc/vbeblit.c: Likewise.
13792 * video/i386/pc/vbefill.c: Likewise.
13793 * video/i386/pc/vbeutil.c: Likewise.
13794 * video/readers/tga.c: Likewise.
13795
3572d015 137962007-07-02 Robert Millan <rmh@aybabtu.com>
13797
13798 * conf/i386-efi.rmk: Replace obsolete reference to
13799 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
13800 with util/getroot.c.
13801 * conf/powerpc-ieee1275.rmk: Likewise.
13802 * conf/sparc64-ieee1275.rmk: Likewise.
13803
13804 * util/grub-emu.c (main): Fix unchecked pointer handling.
13805
2c2a681b 138062007-07-02 Robert Millan <rmh@aybabtu.com>
13807
13808 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
13809 invocation to fail, in order to support partition-less media.
13810
13811 * util/i386/pc/grub-install.in: Likewise.
13812
13813 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
13814 which fs or partmap modules are needed (akin to its sister scripts).
13815
13816 Also use grub-probe to get rid of unportable /proc/mounts check.
13817
13818 Print the same informational message that the other scripts do, before
fe6b695a 13819 exiting.
2c2a681b 13820
6193defe 138212007-06-23 Robert Millan <rmh@aybabtu.com>
13822
fe6b695a 13823 * util/update-grub_lib.in (font_path): New function. Determine whether
6193defe 13824 a font file can be found and, if so, echo the GRUB path to it.
13825
13826 * util/update-grub.in: Handle multiple terminals depending on user
13827 input, platform availability and font file presence. Propagate
13828 variables of our findings to /etc/grub.d/ children.
13829
13830 * util/grub.d/00_header.in: Handle multiple terminals, based on
13831 environment setup by update-grub.
13832
eface1dc 138332007-06-23 Robert Millan <rmh@aybabtu.com>
13834
ba50d28f 13835 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
eface1dc 13836
bf697e28 138372007-06-21 Robert Millan <rmh@aybabtu.com>
13838
13839 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
13840 indicate end of data section in kernel image.
13841 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
13842 GRUB_KERNEL_MACHINE_DATA_END.
13843
13844 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
13845 space for it.
13846 * kern/i386/efi/startup.S: Likewise.
13847
13848 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
13849 during image generation. Implement --prefix option to override this
13850 patch.
13851 * util/i386/efi/grub-mkimage.c: Likewise.
13852
13853 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
13854 code to make path relative to its root into a separate function.
13855
13856 * util/i386/pc/grub-install.in: Use newly provided
13857 make_system_path_relative_to_its_root() to convert ${grubdir}, then
13858 pass the result to grub-install --prefix.
13859
baa574b4 138602007-06-13 Robert Millan <rmh@aybabtu.com>
13861
13862 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
13863 DEFAULT_DEVICE_MAP.
13864 * util/grub-emu.c: Use above definitions from misc.h instead of
13865 defining them.
13866 * util/grub-mkdevicemap.c: Likewise.
13867 * util/i386/pc/grub-setup.c: Likewise.
13868 * util/grub-probe.c: Likewise.
13869 (probe): Abort with grub_util_error() when either
13870 grub_guess_root_device or grub_util_get_grub_dev fails.
13871
0215dcbf 138722007-06-12 Robert Millan <rmh@aybabtu.com>
13873
13874 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
13875 "pager" assignment.
13876 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
13877 "pcdata".
13878 * util/grub-probe.c (probe): Likewise for "drive_name".
13879
8af2ab7b 138802007-06-11 Robert Millan <rmh@aybabtu.com>
13881
13882 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
13883 not just the cdrom one.
13884
59d31694 138852007-06-11 Robert Millan <rmh@aybabtu.com>
13886
13887 * util/i386/pc/grub-mkrescue.in: Add "set -e".
13888 Add --pkglibdir=DIR option to override pkglibdir.
13889 Mention --image-type=TYPE in help output.
13890 Fix --grub-mkimage (it was a no-op).
fe6b695a 13891 Abort gracefully when no parameter is given.
59d31694 13892
7ee367e4 138932007-06-11 Robert Millan <rmh@aybabtu.com>
13894
13895 * util/i386/pc/grub-mkrescue.in: New file.
13896 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
13897 * Makefile.in: Handle bin_SCRIPTS.
13898
29b0ed46 138992007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
13900
13901 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
13902 list of video modes.
13903
c0f90770 139042007-06-06 Robert Millan <rmh@aybabtu.com>
13905
13906 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
13907 file doesn't exist, or if it is in a filesystem grub can't read.
13908
13909 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
13910 not abort if GRUB_DRIVE could not be defined. Rearrange generated
13911 header comment to fit in 80 columns when the variables are resolved.
13912
13913 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
13914 could be identified by update-grub. Remove redundant check for
fe6b695a 13915 unifont.pff existence (since convert_system_path_to_grub_path now
c0f90770 13916 handles that).
13917
fb36dc26 139182007-06-04 Robert Millan <rmh@aybabtu.com>
13919
13920 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
13921
13922 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
13923
13924 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
13925
0c68c93e 139262007-06-04 Robert Millan <rmh@aybabtu.com>
13927
13928 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
13929
13930 * include/grub/partition.h: Declare grub_apple_partition_map_init and
13931 grub_apple_partition_map_fini.
13932
13933 * util/biosdisk.c
13934 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
13935 to access >2 TiB disks).
13936
13937 Print disk->total_sectors with %llu instead of %lu, since this
13938 variable is always 64-bit (prevents wrong disk size from being displayed
13939 on either >2 TiB disk or big-endian CPU).
13940
13941 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
13942 into a generic case that supports all (sane) partition maps.
13943
13944 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
13945 breaks big-endian.
13946
13947 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
13948 and grub_apple_partition_map_fini() after that.
13949
0f23eb74 139502007-06-01 Robert Millan <rmh@aybabtu.com>
13951
13952 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
13953
13954 * util/grub.d/00_header.in: Only enable gfxterm when
13955 convert_system_path_to_grub_path() succeeds.
13956
42c71976 139572007-05-20 Robert Millan <rmh@aybabtu.com>
13958
13959 * util/update-grub_lib.in: New file.
13960 * DISTLIST: Add update-grub_lib.in.
13961 * conf/common.rmk: Generate update-grub_lib and install it in
13962 $(lib_DATA).
13963 * Makefile.in: Add install routine for $(lib_DATA).
13964
13965 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
13966 function provided by update-grub_lib to support arbitrary paths of
13967 unifont.pff.
13968 * util/update-grub.in: Use convert_system_path_to_grub_path() to
13969 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
13970
5beb2291 139712007-05-19 Robert Millan <rmh@aybabtu.com>
13972
13973 * commands/i386/cpuid.c: New module.
13974 * DISTLIST: Add it.
13975 * conf/i386-efi.rmk: Enable cpuid.mod.
13976 * conf/i386-pc.rmk: Likewise.
13977
7262eca1 139782007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
13979
13980 * kern/disk.c (grub_disk_read): Check return value of
13981 grub_realloc().
13982
260ba823 139832007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
13984
13985 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
13986 arrays.
13987 * disk/raid.c (grub_raid_open): Likewise.
13988
1ecb6cf2 139892007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
13990
13991 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
13992 stack instead of on the heap.
13993
13994 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
13995 before doing a read on it.
13996
13997 * configure.ac: Only use -fno-stack-protector for the target
13998 environment.
f19dbdb7 13999
21c8cbb1 140002007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
14001
14002 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
14003 __attribute_ ((unused)) to mode_type argument.
14004
14005 * util/getroot.c (grub_guess_root_device): Fix #endif.
f19dbdb7 14006
21c8cbb1 14007 * kern/misc.c (memcmp): Fix prototype.
14008
14009 * include/grub/partition.h [GRUB_UTIL]
14010 (grub_gpt_partition_map_init): Add prototype.
14011 (grub_gpt_partition_map_fini): Likewise.
14012
14013 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
14014 at the right place.
14015
14016 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
14017 (grub_fat_read_data): Likewise.
14018 (grub_fat_find_dir): Likewise.
14019
14020 * font/manager.c (find_glyph): Make table a const.
14021 (grub_font_get_glyph): Remove bitmap from if statement.
f19dbdb7 14022
849d55d3 140232007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
14024
14025 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
14026 code, first search for device in /dev/mapper, then in /dev.
14027 (grub_util_get_grub_dev): New function.
14028 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
14029 prototype.
14030 * util/grub-probe.c (probe): Remove check for RAID, call
14031 grub_util_get_grub_dev() instead of
14032 grub_util_biosdisk_get_grub_dev().
14033 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
14034 grub_util_biosdisk_get_grub_dev().
14035 * util/i386/pc/grub-setup.c (main): Likewise.
14036
8fff7c2f 140372007-05-16 Robert Millan <rmh@aybabtu.com>
14038
14039 * DISTLIST: Update for the latest changes.
14040 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
14041 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
14042 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
14043 grub/util/biosdisk.h.
14044 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
14045 grub/util/biosdisk.h.
14046
48e12b52 140472007-05-16 Robert Millan <rmh@aybabtu.com>
14048
14049 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
14050
46b9d128 140512007-05-16 Robert Millan <rmh@aybabtu.com>
14052
14053 * util/i386/efi/grub-install.in: New.
14054 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
14055 newly added grub-install.
14056 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
14057 include.
14058 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
14059 grub/util/biosdisk.h.
14060 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
14061 grub/util/biosdisk.h.
14062
2d1a40a9 140632007-05-16 Robert Millan <rmh@aybabtu.com>
14064
14065 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
14066 * include/grub/util/biosdisk.h: ... here.
14067 * util/i386/pc/biosdisk.c: Moved to ...
14068 * util/biosdisk.c: ... here.
14069 * util/i386/pc/getroot.c: Moved to ...
14070 * util/getroot.c: ... here.
14071 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
14072 * util/grub-mkdevicemap.c: ... here.
14073 * util/i386/pc/grub-probe.c: Moved to ...
14074 * util/grub-probe.c: ... here.
14075
9e26e3bc 140762007-05-15 Robert Millan <rmh@aybabtu.com>
14077
14078 * util/update-grub.in: Remove duplicated line in grub.cfg header
14079 message.
14080
57f96397 140812007-05-13 Robert Millan <rmh@aybabtu.com>
14082
14083 * util/update-grub.in: Fix a few assumptions about the devices holding
14084 /, /boot and /boot/grub being the same.
14085 * util/grub.d/00_header.in: Likewise.
14086 * util/grub.d/10_hurd.in: Likewise.
14087 * util/grub.d/10_linux.in: Likewise.
14088
14089 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
14090 patterns. Use that to define the `.old' suffix as older than `'.
14091
14092 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
14093
14094 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
14095 the grub.cfg header message.
14096
2e610d62 140972007-05-11 Robert Millan <rmh@aybabtu.com>
14098
14099 * util/update-grub.in: Create device.map if it doesn't already exist,
14100 before attempting to run grub-probe.
14101 Check for grub-probe and grub-mkdevicemap with the same code
14102 grub-install is using.
14103 Remove test mode.
14104
3f6a10ef 141052007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
14106
14107 * Makefile.in: Add the datarootdir autoconf variable.
14108
02e7b75e 141092007-05-09 Robert Millan <rmh@aybabtu.com>
14110
14111 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
f19dbdb7 14112 fail gracefully if dev->disk->partition == NULL.
02e7b75e 14113
75f396cc 141142007-05-07 Robert Millan <rmh@aybabtu.com>
14115
14116 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
14117 determine partition map module.
14118 * util/i386/pc/grub-install.in: Use this feature to decide which
14119 partition module to load, instead of hardcoding pc and gpt.
14120
da65cb36 141212007-05-07 Robert Millan <rmh@aybabtu.com>
14122
14123 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
14124 source directory differs from build directory.
14125
b57d6a91 141262007-05-05 Robert Millan <rmh@aybabtu.com>
14127
14128 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
14129 initialisation.
14130
509d00f1 141312007-05-05 Robert Millan <rmh@aybabtu.com>
14132
14133 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
14134
c48f23ef 141352007-05-05 Robert Millan <rmh@aybabtu.com>
14136
14137 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
14138 command-line arguments via ${GRUB_CMDLINE_LINUX}.
14139
20b97658 141402007-05-05 Robert Millan <rmh@aybabtu.com>
14141
14142 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
14143 (grub_probe_SOURCES): Likewise.
14144 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
14145 GPT and initialize dos_part and bsd_part accordingly.
14146 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
14147 install_bsd_part.
14148 (main): Activate gpt module for use during partition identification,
14149 and deactivate it afterwards.
14150 * util/i386/pc/grub-install.in: Add gpt module to core.img.
14151 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
14152 partition identification, and deactivate it afterwards.
14153
99123174 141542007-05-05 Robert Millan <rmh@aybabtu.com>
14155
14156 * term/i386/pc/console.c (grub_console_fini): Call
14157 grub_term_set_current() before grub_term_unregister().
14158
ebd97f6e 141592007-05-04 Robert Millan <rmh@aybabtu.com>
14160
14161 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
14162 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
14163 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
14164 and update-grub_DATA.
14165 * conf/common.rmk: Build and install update-grub components.
14166 * conf/common.mk: Regenerate.
14167 * util/update-grub.in: New. Core of update-grub.
14168 * util/grub.d/00_header.in: New. Generates grub.cfg header.
14169 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
14170 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
14171 * util/grub.d/README: New. Document grub.d directory layout.
14172
b06a264d 141732007-05-01 Robert Millan <rmh@aybabtu.com>
14174
14175 * util/grub-emu.c: Move initialization functions
14176 grub_util_biosdisk_init() and grub_init_all() before
14177 grub_util_biosdisk_get_grub_dev(), which relies on them.
14178
41f0050e 141792007-04-19 Robert Millan <rmh@aybabtu.com>
14180
14181 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
14182 it is used later.
14183
04582bb3 141842007-04-18 Jerone Young <jerone@gmail.com>
14185
f19dbdb7 14186 * kernel/elf.c: Add missing parenthesis for conditional statement
04582bb3 14187 stanza.
14188
08db4632 141892007-04-10 Jerone Young <jerone@gmail.com>
49892fdf 14190
08db4632 14191 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
14192 continue on and look for device node with real device name.
14193
801b76be 141942007-04-10 Jerone Young <jerone@gmail.com>
f19dbdb7 14195
fe6b695a 14196 * configure.ac: Add argument for autoconf to use transformation
1d543c3e 14197 ability.
14198 * Makefile.in: Add autoconf package transformation code.
14199 * util/i386/pc/grub-install.in: Likewise.
14200 * util/powerpc/ieee1275/grub-install.in: Likewise.
14201
6795c4e1 142022007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
14203
14204 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
14205 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
14206 (EXT2_REVISION): Likewise.
14207 (EXT2_INODE_SIZE): Likewise.
14208 (struct grub_ext2_block_group): Added a missing member
14209 "used_dirs".
14210 (grub_ext2_read_inode): Divide by the inode size in a superblock
14211 instead of 128 to obtain INODES_PER_BLOCK.
14212 Use the macro EXT2_INODE_SIZE instead of directly using
14213 SBLOCK->INODE_SIZE.
14214
d70af616 142152007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
14216
14217 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
14218 superblock instead of the structure size to compute an
14219 offset. This fixes the problem that GRUB could not read a
14220 filesystem when inode size is different from 128-byte.
14221
3b801603 142222007-03-05 Marco Gerards <marco@gnu.org>
14223
14224 * normal/main.c (read_config_file): When "menu" is not set, create
14225 an initial context.
14226
4785bfe4 142272007-02-21 Hollis Blanchard <hollis@penguinppc.org>
14228
14229 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
14230 (HEAP_LIMIT): New macro.
14231 (grub_claim_heap): Claim memory up to `heaplimit'.
14232
a0cbb023 142332007-02-21 Hollis Blanchard <hollis@penguinppc.org>
14234
14235 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
14236 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
14237 (_start): Likewise.
14238 (grub_arch_modules_addr): Return address after `_end'.
14239 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
14240 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
14241 (add_segments): Calculate `_end' from phdr size and location.
14242 (ALIGN_UP): Moved to ...
14243 * include/grub/misc.h: here.
14244 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
14245 New macro.
14246 (GRUB_IEEE1275_MODULE_BASE): Removed.
14247
fd7d8eba 142482007-02-20 Hollis Blanchard <hollis@penguinppc.org>
14249
14250 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
14251 loop boundary.
14252
9b09e6fc 142532007-02-20 Hollis Blanchard <hollis@penguinppc.org>
14254
14255 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
14256 All users updated.
14257 (grub_elf64_load_hook_t): Likewise.
14258 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
14259 debug output.
14260
3ce27299 142612007-02-20 Hollis Blanchard <hollis@penguinppc.org>
14262
14263 * kern/mm.c: Update copyright.
14264 (grub_mm_debug): Correct syntax error.
14265 (grub_mm_dump_free): New function.
14266 (grub_debug_free): Call `grub_free'.
14267 * include/grub/mm.h: Update copyright.
14268 (grub_mm_dump_free): Add declaration.
14269
077d5fee 142702007-02-12 Hollis Blanchard <hollis@penguinppc.org>
14271
14272 * include/grub/ieee1275/ieee1275.h: Update copyright.
14273 * kern/powerpc/ieee1275/init.c: Likewise.
14274 * kern/powerpc/ieee1275/openfw.c: Likewise.
14275
14276 * loader/powerpc/ieee1275/linux.c: Likewise.
14277 * include/grub/elfload.h: Likewise.
14278 * kern/elf.c: Likewise.
14279 (grub_elf32_load): Pass `base' and `size' parameters. Update all
14280 callers.
14281 (grub_elf64_load): Likewise.
14282 (grub_elf32_load_segment): Move to a nested function.
14283 (grub_elf64_load_segment): Likewise.
14284
dc946850 142852007-02-12 Hollis Blanchard <hollis@penguinppc.org>
14286
14287 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
14288 prototype.
14289 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
14290 (grub_heap_len): Likewise.
14291 (HEAP_SIZE): New macro.
14292 (grub_claim_heap): New function.
14293 (grub_machine_init): Don't claim heap directly. Call
14294 `grub_claim_heap'.
14295 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
14296 (grub_available_iterate): New function.
14297
baa2a121 142982007-02-03 Thomas Schwinge <tschwinge@gnu.org>
14299
14300 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
14301 * configure.ac: Use it for testing the HOST and TARGET compilers.
14302
4fe9862e 143032006-12-13 Thomas Schwinge <tschwinge@gnu.org>
14304
14305 * Makefile.in (enable_grub_emu): New variable.
14306 * configure.ac (--enable-grub-emu): New option.
14307 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
14308 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
14309 * conf/i386-pc.rmk: Likewise.
14310 * conf/powerpc-ieee1275.rmk: Likewise.
14311 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
14312
a8aa5762 143132006-12-12 Marco Gerards <marco@gnu.org>
14314
14315 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
14316
14317 * kern/env.c (grub_env_unset): Don't free the member `value' when
14318 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
14319 pointer.
14320
14321 * normal/main.c (current_menu): Removed.
14322 (free_menu): Unset the `menu' environment variable.
14323 (grub_normal_menu_addentry): Make use of the environment variable
14324 `menu', instead of using the global `current_menu'. Allocate
14325 memory for the sourcecode of this entry.
14326 (read_config_file): New argument `nested', changed all callers.
14327 Only in the case of a new context, initialize a new menu. Set the
14328 `menu' environment variable.
14329 (grub_normal_execute): Don't set and unset the environment
14330 variable `menu' here anymore. Only free the menu when leaving the
14331 context.
14332
14333 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
14334 leak.
14335
957b3a3e 143362006-12-11 Marco Gerards <marco@gnu.org>
14337
14338 * normal/menu_entry.c (run): Fix off by one bug so the last line
14339 is executed. Move the loader check to outside the loop.
14340
ef875714 143412006-12-08 Hollis Blanchard <hollis@penguinppc.org>
14342
14343 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
14344
4e739985 143452006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
14346
14347 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
14348 the number of sectors. Reported by Andrey Shuvikov
14349 <mr_hyro@yahoo.com>.
f19dbdb7 14350
790707f2 143512006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
14352
14353 * kern/disk.c (grub_disk_read): When there is a read error, always
14354 try to read only the necessary data.
f19dbdb7 14355
790707f2 14356 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
14357 disk/raid.c.
14358 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
14359 prototype.
14360 [GRUB_UTIL] (grub_raid_fini): Likewise.
14361 [GRUB_UTIL] (grub_lvm_init): Likewise.
f19dbdb7 14362 [GRUB_UTIL] (grub_lvm_fini): Likewise.
790707f2 14363 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
14364 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
14365 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
14366 and grub_raid_fini().
f19dbdb7 14367
03e58196 143682006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
14369
14370 * include/grub/types.h (__unused): Rename to UNUSED.
14371 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
14372 (grub_elf64_size): Likewise.
f19dbdb7 14373
ae4f23bf 143742006-11-03 Hollis Blanchard <hollis@penguinppc.org>
14375
14376 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
14377 grub_error_push and grub_error_pop in the error-handling path.
14378 (grub_elf32_load_segment): Only call grub_file_read with non-zero
14379 length.
14380
2166cc83 143812006-11-03 Hollis Blanchard <hollis@penguinppc.org>
14382
14383 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
14384 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
14385 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14386 (kernel_elf_SOURCES): Likewise.
14387 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
14388 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
14389 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
14390 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
14391 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
14392 (elf_mod_SOURCES): New variable.
14393 (elf_mod_CFLAGS): Likewise.
14394 (elf_mod_LDFLAGS): Likewise.
14395 * include/grub/types.h (__unused): New macro.
14396 * include/grub/elfload.h: New file.
14397 * kern/elf.c: Likewise.
14398 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
14399 (ELF32_LOADMASK): New macro.
14400 (ELF64_LOADMASK): Likewise.
14401 (vmlinux): Removed.
14402 (grub_linux_load32): New function.
14403 (grub_linux_load64): Likewise.
14404 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
14405 Use grub_elf_t instead of grub_file_t.
14406
a09d5aa5 144072006-11-02 Hollis Blanchard <hollis@penguinppc.org>
14408
14409 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
14410 `catch_result' to struct set_color_args.
14411
d976fc51 144122006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
14413
14414 * normal/menu.c: Include grub/script.h.
14415 * normal/menu_entry.c: Likewise.
14416 * include/grub/normal.h: Do not include grub/script.h.
14417
67507549 144182006-10-27 Hollis Blanchard <hollis@penguinppc.org>
14419
14420 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
14421
69203a99 144222006-10-27 Hollis Blanchard <hollis@penguinppc.org>
14423
14424 * kern/disk.c (grub_disk_open): Print debug messages when opening a
14425 disk.
14426 (grub_disk_close): Print debug messages when closing a disk.
14427 (grub_disk_read): Print debug messages when disk read fails.
14428 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
14429 filesystem type.
14430 * kern/partition.c: Include misc.h.
14431 (grub_partition_iterate): Print debug messages when detecting
14432 partition type.
14433
e2b8278c 144342006-10-27 Hollis Blanchard <hollis@penguinppc.org>
14435
14436 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
14437 is negative.
14438 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
14439
97b2f2ff 144402006-10-26 Hollis Blanchard <hollis@penguinppc.org>
14441
14442 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
14443 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
14444
6555d655 144452006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
14446
14447 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
14448 instead of sizeof(lv). Patch by Michael Guntsche.
14449
4d42b77f 144502006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
14451
14452 * disk/lvm.c: Rename VGS to VG_LIST.
14453 (grub_lvm_iterate): Change VGS->LV to VG-LV.
14454 (grub_lvm_open): Likewise.
14455 Thanks to Michael Guntsche for finding this bug.
14456
5d74d927 144572006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
14458
14459 * configure.ac (AC_INIT): Bumped to 1.95.
14460
a1bb27e4 144612006-10-14 Robert Millan <rmh@aybabtu.com>
14462
14463 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
14464 with "/dev/.static/dev/md".
14465
e0994b8b 144662006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
14467
14468 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
14469 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
14470 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
14471 DRIVE_NAME are always freed.
14472
14473 * util/i386/pc/biosdisk.c (make_device_name): Add one into
14474 DOS_PART, as a DOS partition is counted from one instead of zero
14475 now. Reported by Robert Millan.
14476
ddd5cee9 144772006-10-14 Robert Millan <rmh@aybabtu.com>
14478
14479 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
14480 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
14481 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
14482 string returned by grub_guess_root_device.
14483 * util/i386/pc/grub-setup.c: Likewise.
14484 * util/i386/pc/grub-probefs.c: Likewise.
14485
14486 * util/i386/pc/grub-probefs.c: Rename to ...
14487 * util/i386/pc/grub-probe.c: ... this.
14488 * DISTLIST: Remove grub-probefs, add grub-probe.
14489 * conf/i386-efi.rmk: Likewise.
14490 * conf/i386-pc.rmk: Likewise.
14491 * util/i386/pc/grub-install.in: Likewise.
14492
14493 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
14494 choose which information we want to print.
14495
2b002173 144962006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
14497
14498 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
14499 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
14500 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
14501 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
14502 video/readers/tga.c and video/i386/pc/vbeutil.c.
14503
145042006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
14505
14506 Added support for RAID and LVM.
f19dbdb7 14507
2b002173 14508 * disk/lvm.c: New file.
14509 * disk/raid.c: Likewise.
14510 * include/grub/lvm.h: Likewise.
f19dbdb7 14511 * include/grub/raid.h: Likewise.
2b002173 14512 * include/grub/util/lvm.h: Likewise.
14513 * include/grub/util/raid.h: Likewise.
14514 * util/lvm.c: Likewise.
14515 * util/raid.c: Likewise.
14516
14517 * include/grub/disk.h (grub_disk_dev_id): Add
14518 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
14519 (grub_disk_get_size): New prototype.
14520 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
14521 returns a partition.
14522 (grub_disk_get_size): New function.
f19dbdb7 14523
2b002173 14524 * kern/i386/pc/init.c (make_install_device): Copy the prefix
14525 verbatim if grub_install_dos_part is -2.
14526
14527 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
14528 and LVM devices.
14529
14530 * util/i386/pc/grub-setup.c (setup): New argument
14531 MUST_EMBED. Force embedding of GRUB when the argument is
14532 true. Close FILE before returning.
14533 (main): Add support for RAID and LVM.
f19dbdb7 14534
2b002173 14535 * conf/common.rmk: Add RAID and LVM modules.
14536 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
14537 util/lvm.c.
14538 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
14539
14540 * kern/misc.c (grub_strstr): New function.
14541 * include/grub/misc.h (grub_strstr): New prototype.
14542
050548d0 145432006-10-10 Tristan Gingold <tristan.gingold@bull.net>
14544
14545 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
14546
da849d2d 145472006-10-05 Tristan Gingold <tristan.gingold@bull.net>
14548
14549 * kern/misc.c (grub_strtoull): Guess the base only if not
14550 specified.
14551
97b2f2ff 145522006-10-01 Hollis Blanchard <hollis@penguinppc.org>
4f0acd39 14553
14554 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
14555 PowerMac support.
14556
97b2f2ff 145572006-10-01 Hollis Blanchard <hollis@penguinppc.org>
fba51f48 14558
14559 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
14560
14561 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
14562 Remove `flags' argument. All callers changed.
14563 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
14564 (IEEE1275_IHANDLE_INVALID): New variable.
14565 (IEEE1275_CELL_INVALID): New variable.
14566 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
14567 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
14568 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
14569 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
14570 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
14571 codes from Open Firmware. All callers updated.
14572 (grub_ieee1275_next_property): Directly return Open Firmware return
14573 code.
14574 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
14575 Standardize error checking from `grub_ieee1275_get_property'.
14576 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
14577 `devalias' to `aliases'. Correct comments. Consolidate error paths.
14578
97b2f2ff 145792006-10-01 Hollis Blanchard <hollis@penguinppc.org>
cc6d3df3 14580
14581 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
14582 `instance_to_package_args' to `instance_to_path_args'.
14583
14584 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
14585 `grub_ieee1275_chosen'.
14586
14587 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
14588 `grub_ieee1275_interpret'.
14589
97b2f2ff 145902006-09-25 Hollis Blanchard <hollis@penguinppc.org>
02bb8acc 14591
14592 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
14593
97b2f2ff 145942006-09-25 Hollis Blanchard <hollis@penguinppc.org>
663b72f0 14595
14596 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
14597 (__cmpdi): Likewise.
14598
14599 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
14600 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
14601 `grub_ssize_t'.
14602
02bb8acc 14603 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
663b72f0 14604
14605 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
14606 to type `grub_ssize_t'.
14607 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
14608
7f9a8531 146092006-09-22 Marco Gerards <marco@gnu.org>
14610
14611 * normal/script.c (grub_script_create_cmdmenu): Skip leading
14612 newlines.
14613
b5ef1102 146142006-09-22 Marco Gerards <marco@gnu.org>
14615
14616 * commands/echo.c: New file.
14617
14618 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
14619
14620 * conf/common.rmk (echo_mod_SOURCES): New variable.
14621 (echo_mod_CFLAGS): Likewise.
14622 (echo_mod_LDFLAGS): Likewise.
14623
2cff3677 146242006-09-22 Marco Gerards <marco@gnu.org>
14625
14626 * normal/main.c (get_line): Malloc memory instead of using
14627 preallocated memory. Removed the arguments `cmdline' and
14628 `max_len'. Updated all callers.
14629
6ba4688b 146302006-09-22 Marco Gerards <marco@gnu.org>
14631
14632 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
14633 (normal_mod_DEPENDENCIES): Likewise.
14634
14635 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
14636 (normal_mod_DEPENDENCIES): Likewise.
14637
14638 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
14639
e02ac02c 146402006-09-22 Johan Rydberg <jrydberg@gnu.org>
14641
14642 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
14643 programs.
14644 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
14645 (normal_mod_DEPENDENCIES): Likewise.
14646 * conf/i386-pc.mk: Regenerate.
14647 * conf/i386-efi.mk: Likewise
14648 * conf/common.mk: Likewise.
14649 * conf/powerpc-ieee1275.mk: Likewise.
14650 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 14651
8d252e44 146522006-09-22 Robert Millan <rmh@aybabtu.com>
14653
14654 Sync with i386 version.
14655 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
14656 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
14657
209bf7ac 146582006-09-21 Robert Millan <rmh@aybabtu.com>
14659
14660 Import from GRUB Legacy (lib/device.c):
14661 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
14662 (init_device_map) [__linux__]: Add support for I2O devices.
14663
6b146090 146642006-09-14 Marco Gerards <marco@gnu.org>
14665
14666 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
14667 `-melf_i386'.
14668
e38600a8 146692006-09-14 Robert Millan <rmh@aybabtu.com>
2952da5d 14670
14671 * util/i386/pc/grub-install.in: Skip menu.lst when removing
14672 /boot/grub/*.lst.
78fa1790 14673
2952da5d 14674 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
6b146090 14675
2952da5d 14676 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
14677 before adding it to device.map.
14678
01b82a64 146792006-08-15 Johan Rydberg <jrydberg@gnu.org>
14680
fe6b695a 14681 * genmk.rb: Let GCC generate dependencies the first time it
01b82a64 14682 compiles a file; using the -MD option.
14683 * conf/common.mk: Regenerate.
14684 * conf/i386-pc.mk: Likewise.
14685 * conf/i386-efi.mk: Likewise.
14686 * conf/powerpc-ieee1275.mk: Likewise.
14687 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 14688
1064790d 146892006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
14690
14691 Move the prototypes of grub_setjmp and grub_longjmp to
14692 cpu/setjmp.h, so that each architecture may specify different
14693 attributes.
f19dbdb7 14694
1064790d 14695 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
14696 (grub_longjmp): Likewise.
14697 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
14698 (grub_longjmp): Likewise.
14699 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
14700 (grub_longjmp): Likewise.
14701
14702 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
14703 [!GRUB_UTIL] (grub_longjmp): Removed.
14704
29dda3ed 147052006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
14706
14707 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
14708 "color!" method does not return any value.
14709
ad2a06ed 147102006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
14711
14712 * include/grub/bitmap.h: New file.
14713
14714 * include/grub/i386/pc/vbeutil.h: Likewise.
14715
14716 * video/bitmap.c: Likewise.
14717
14718 * video/readers/tga.c: Likewise.
14719
14720 * video/i386/pc/vbeutil.c: Likewise.
14721
14722 * commands/videotest.c: Code cleanup and updated to reflect to new
14723 video API.
14724
14725 * term/gfxterm.c: Likewise.
14726
14727 * video/video.c: Likewise.
14728
14729 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
14730 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
14731 (bitmap_mod_SOURCES): New entry.
14732 (bitmap_mod_CFLAGS): Likewise.
14733 (bitmap_mod_LDFLAGS): Likewise.
14734 (tga_mod_SOURCES): Likewise.
14735 (tga_mod_CFLAGS): Likewise.
14736 (tga_mod_LDFLAGS): Likewise.
14737
14738 * include/grub/video.h (grub_video_blit_operators): New enum type.
14739 (grub_video_render_target): Changed as forward declaration and moved
14740 actual definition to be video driver specific.
14741 (grub_video_adapter.blit_bitmap): Added blitting operator.
14742 (grub_video_adapter.blit_render_target): Likewise.
14743 (grub_video_blit_bitmap): Likewise.
14744 (grub_video_blit_render_target): Likewise.
14745
14746 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
14747 driver specific render target definition.
14748 (grub_video_vbe_map_rgba): Added driver internal helper.
14749 (grub_video_vbe_unmap_color): Updated to use
14750 grub_video_i386_vbeblit_info.
14751 (grub_video_vbe_get_video_ptr): Likewise.
14752
14753 * include/grub/i386/pc/vbeblit.h
14754 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
14755 grub_video_i386_vbeblit_info.
14756 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
14757 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
14758 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
14759 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
14760 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
14761 (grub_video_i386_vbeblit_index_index): Likewise.
14762 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
14763 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
14764 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
14765 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
14766 operator.
14767 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
14768 operator.
14769
14770 * video/i386/pc/vbeblit.c: Updated to reflect changes on
14771 include/grub/i386/pc/vbeblit.h.
14772
14773 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
14774 Updated to use grub_video_i386_vbeblit_info.
14775 (grub_video_i386_vbefill_R8G8B8): Likewise.
14776 (grub_video_i386_vbefill_index): Likewise.
14777 (grub_video_i386_vbefill): Added generic filler.
14778
14779 * video/i386/pc/vbefill.c: Updated to reflect changes on
14780 include/grub/i386/pc/vbefill.h.
14781
14782 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
14783 grub_video_i386_vbeblit_info.
14784 (grub_video_vbe_unmap_color): Likewise.
14785 (grub_video_vbe_blit_glyph): Likewise.
14786 (grub_video_vbe_scroll): Likewise.
14787 (grub_video_vbe_draw_pixel): Removed function.
14788 (grub_video_vbe_get_pixel): Likewise.
14789 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
14790 updated code to use it.
14791 (common_blitter): Added common blitter for render target and bitmap.
14792 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
14793 (grub_video_vbe_blit_render_target): Likewise.
14794
bc8c036d 147952006-07-30 Johan Rydberg <jrydberg@gnu.org>
14796
14797 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
14798 is in text mode if there is no console control protocol instance
14799 available.
14800
684a8eff 148012006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
14802
14803 * include/grub/video.h: Code cleanup.
14804
14805 * include/grub/i386/pc/vbe.h: Likewise.
14806
14807 * video/i386/pc/vbe.c: Likewise.
14808
14809 * video/i386/pc/vbeblit.c: Likewise.
14810
14811 * video/i386/pc/vbefill.c: Likewise.
14812
14813 * video/video.c: Likewise. Also added more comments.
14814
5915059b 148152006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
14816
14817 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
14818 (struct grub_biosdisk_dap): Likewise.
14819
14820 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
14821 linkage settings for all functions.
14822
90ce5d56 148232006-07-12 Marco Gerards <marco@gnu.org>
14824
14825 * configure.ac (--enable-mm-debug): Fix typo.
14826
14827 * genkernsyms.sh.in: Use proper quoting for `CC'.
14828
43e7f879 148292006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
14830
14831 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
14832 (normal_mod_ASFLAGS): Remove "-m32".
14833
4889bdec 148342006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
14835
14836 * util/misc.c: Include config.h.
14837 [!HAVE_MEMALIGN]: Do not include malloc.h.
14838 (grub_memalign): Use posix_memalign, if present. Then, use
14839 memalign, if present. Otherwise, emit an error.
14840
14841 * util/grub-emu.c: Do not include malloc.h.
14842
14843 * include/grub/util/misc.h: Include unistd.h. This is required for
14844 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
14845 D. Eades III <hde@foobar-qux.org>.
14846
14847 * configure.ac (AC_GNU_SOURCE): Added.
14848 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
14849 type.
14850
fd39d4da 148512006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
14852
14853 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
14854 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
14855
b786f3b5 148562006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
14857
14858 * include/grub/types.h (grub_host_addr_t): Rename to
14859 grub_target_addr_t.
14860 (grub_host_off_t): Rename to grub_target_off_t.
14861 (grub_host_size_t): Rename to grub_target_size_t.
14862 (grub_host_ssize_t): Rename to grub_target_ssize_t.
14863 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
14864
14865 * include/grub/kernel.h (struct grub_module_header): Change type
14866 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
14867 (grub_module_info): Likewise.
f19dbdb7 14868
051988bb 148692006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
14870
14871 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
14872 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
14873 Velazquez <jesus.velazquez@gmail.com>.
14874
deae281b 148752006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
14876
14877 Count partitions from 1 instead of 0 in the string representation
14878 of partitions. Still use 0-based internally.
f19dbdb7 14879
deae281b 14880 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
14881 (sun_partition_map_iterate): Use grub_partition_t instead of
14882 struct grub_partition *. Cast DESC->START_CYLINDER to
14883 grub_uint64_t after converting the endian.
14884 (sun_partition_map_probe): Subtract 1 for PARTNUM.
14885 (sun_partition_map_get_name): Add 1 to P->INDEX.
14886
14887 * partmap/pc.c (grub_partition_parse): Subtract 1 for
14888 PCDATA->DOS_PART.
14889 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
14890
14891 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
14892 zero instead of one.
14893 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
14894 (gpt_partition_map_get_name): Add 1 into P->INDEX.
14895
14896 * partmap/apple.c (apple_partition_map_iterate): Change the type
14897 of POS to unsigned.
14898 (apple_partition_map_probe): Subtract 1 for PARTNUM.
14899 (apple_partition_map_get_name): Add 1 into P->INDEX.
14900
14901 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
14902 of POS to unsigned.
14903 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
14904 calculate the offset of a partition.
14905 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
14906 (amiga_partition_map_get_name): Add 1 into P->INDEX.
14907
14908 * partmap/acorn.c (acorn_partition_map_find): Change the type of
14909 SECTOR to grub_disk_addr_t.
14910 (acorn_partition_map_iterate): Likewise.
14911 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
14912 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
14913 top.
14914 (acorn_partition_map_get_name): Add 1 into P->INDEX.
14915
14916 * kern/i386/pc/init.c (make_install_device): Add 1 into
14917 GRUB_INSTALL_DOS_PART.
14918
14919 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
14920 conditional.
14921
524a1e6a 149222006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
14923
14924 Clean up the code to support 64-bit addressing in disks and
14925 files. This change is not enough for filesystems yet.
f19dbdb7 14926
524a1e6a 14927 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
14928 type of "start" to grub_uint64_t.
14929 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
14930 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
14931 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
14932 convert addresses.
14933
14934 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
14935 to grub_disk_addr_t.
14936
14937 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
14938 string.
14939
14940 * partmap/pc.c (pc_partition_map_iterate): Likewise.
14941
14942 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
14943 to char *.
14944
14945 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
14946
14947 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
14948
14949 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
14950
14951 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
14952 to grub_off_t, to detect an error from grub_file_seek.
14953 (grub_multiboot_load_elf32): Likewise.
14954
14955 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
14956 maximum unsigned long value when an overflow is detected.
14957 (grub_strtoull): New function.
14958 (grub_divmod64): Likewise.
14959 (grub_lltoa): use grub_divmod64.
14960
14961 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
14962 grub_disk_addr_t.
14963 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
14964 the pointer to next character. Use grub_strtoull instead of
14965 grub_strtoul.
14966 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
14967 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
14968 respectively.
14969
fe6b695a 14970 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
524a1e6a 14971 return value is signed.
14972 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
14973 test if OFFSET is less than zero, as OFFSET is unsigned now.
14974
14975 * kern/disk.c (struct grub_disk_cache): Change the type of
14976 "sector" to grub_disk_addr_t.
14977 (grub_disk_cache_get_index): Change the type of SECTOR to
14978 grub_disk_addr_t. Calculate the hash with SECTOR casted to
14979 unsigned after shifting.
14980 (grub_disk_cache_invalidate): Change the type of SECTOR to
14981 grub_disk_addr_t.
14982 (grub_disk_cache_unlock): Likewise.
14983 (grub_disk_cache_store): Likewise.
14984 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
14985 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
14986 grub_disk_addr_t and grub_uint64_t, respectively.
14987 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
14988 body, as the value of OFFSET is tweaked by
14989 grub_disk_check_range. Change the types of START_SECTOR, LEN and
14990 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
14991 respectively.
14992 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
14993 body, as the value of OFFSET is tweaked by
14994 grub_disk_check_range. Change the types of LEN and N to
14995 grub_size_t.
14996
14997 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
14998 and "saved_offset" to grub_off_t.
14999 (test_header): Cast BUF to char *.
15000 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
15001 to char *.
15002 (grub_gzio_read): Change the types of OFFSET and SIZE to
15003 grub_off_t and grub_size_t, respectively.
15004
15005 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
15006 Removed.
15007 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
15008 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
15009 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
15010 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
15011 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
15012
15013 * include/grub/types.h (grub_off_t): Unconditionally set to
15014 grub_uint64_t.
15015 (grub_disk_addr_t): Changed to grub_uint64_t.
15016
15017 * include/grub/partition.h (struct grub_partition): Change the
15018 types of "start", "len" and "offset" to grub_disk_addr_t,
15019 grub_uint64_t and grub_disk_addr_t, respectively.
15020 (grub_partition_get_start): Return grub_disk_addr_t.
15021 (grub_partition_get_len): Return grub_uint64_t.
15022
15023 * include/grub/misc.h (grub_strtoull): New prototype.
15024 (grub_divmod64): Likewise.
15025
15026 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
15027 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
15028 grub_off_t, respectively.
15029 All callers and references changed.
15030
15031 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
15032 grub_size_t in "read".
15033 All callers and references changed.
15034
15035 * include/grub/file.h (struct grub_file): Change the types of
15036 "offset" and "size" to grub_off_t and grub_off_t,
15037 respectively. Change the type of SECTOR to grub_disk_addr_t in
15038 "read_hook".
15039 (grub_file_read): Change the type of LEN to grub_size_t.
15040 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
15041 grub_off_t.
15042 (grub_file_size): Return grub_off_t.
15043 (grub_file_tell): Likewise.
15044 All callers and references changed.
15045
15046 * include/grub/disk.h (struct grub_disk_dev): Change the types of
15047 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
15048 "write".
15049 (struct grub_disk): Change the type of "total_sectors" to
15050 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
f19dbdb7 15051 "read_hook".
524a1e6a 15052 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
15053 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
15054 (grub_disk_write): Likewise.
15055 All callers and references changed.
15056
15057 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
15058 char * for grub_strncmp to silence gcc.
15059 (grub_iso9660_mount): Likewise.
15060 (grub_iso9660_mount): Likewise.
15061 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
15062 return statement.
15063 (grub_iso9660_iterate_dir): Likewise.
15064 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
15065
15066 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
15067 LEN to grub_disk_addr_t and grub_size_t, respectively.
15068
15069 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
15070
15071 * fs/jfs.c (grub_jfs_read_file): Likewise.
15072
15073 * fs/minix.c (grub_jfs_read_file): Likewise.
15074
15075 * fs/sfs.c (grub_jfs_read_file): Likewise.
15076
15077 * fs/ufs.c (grub_jfs_read_file): Likewise.
15078
15079 * fs/xfs.c (grub_jfs_read_file): Likewise.
15080
15081 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
15082 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
15083 respectively.
15084
15085 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
15086 BLKNR to -1 instead of returning GRUB_ERRNO.
15087 (grub_ext2_read_file): Change the types of SECTOR and
15088 LEN to grub_disk_addr_t and grub_size_t, respectively.
15089
15090 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
15091 LEN to grub_disk_addr_t and grub_size_t, respectively.
15092
15093 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
15094 grub_file_read.
15095
15096 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
15097 string. Do not cast SECTOR explicitly.
15098
15099 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
15100 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
15101 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
15102 grub_disk_addr_t and grub_size_t, respectively. If the sector is
15103 over 2TB and LBA mode is not supported, raise an error.
15104 (get_safe_sectors): New function.
15105 (grub_biosdisk_read): Use get_safe_sectors.
15106 (grub_biosdisk_write): Likewise.
15107
15108 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
15109 (grub_efidisk_write): Likewise.
15110
15111 * disk/loopback.c (delete_loopback): Cosmetic changes.
15112 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
15113 correctly.
15114 (grub_loopback_open): Likewise.
15115 (grub_loopback_read): Likewise. Also, change the type of POS to
15116 grub_off_t, and fix the usage of grub_memset.
15117
15118 * commands/i386/pc/play.c: Include grub/machine/time.h.
15119
15120 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
15121 print FILE->SIZE.
15122
15123 * commands/configfile.c: Include grub/env.h.
15124
15125 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
15126 GRUB_ERRNO directly instead. Change the type of POS to
15127 grub_off_t. Follow the coding standard.
15128
15129 * commands/blocklist.c: Include grub/partition.h.
15130 (grub_cmd_blocklist): Return an error if the underlying device is
15131 not a disk. Take the starting sector of a partition into account,
15132 if a partition is used.
15133
15134 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
15135 a length field.
15136 (lba_mode): Support 64-bit addresses.
15137 (chs_mode): Likewise.
15138 (copy_buffer): Adapted to the new offsets of a length field and a
15139 segment field.
15140 (blocklist_default_start): Allocate 64-bit space.
15141
15142 * boot/i386/pc/boot.S (force_lba): Removed.
15143 (boot_drive): Moved to under KERNEL_SECTOR.
fe987087 15144 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
524a1e6a 15145 space.
15146 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
15147 is useless.
15148 (lba_mode): Refactored to support a 64-bit address. More size
15149 optimization.
15150 (setup_sectors): Likewise.
15151
53af98ad 151522006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
15153
15154 * DISTLIST: Added include/grub/i386/linux.h. Removed
15155 include/grub/i386/pc/linux.h
15156
15157 * configure.ac (AC_INIT): Bumped to 1.94.
15158
15159 * config.guess: Updated from gnulib.
15160 * config.sub: Likewise.
15161 * install-sh: Likewise.
15162 * mkinstalldirs: Likewise.
15163
b4c1940a 151642006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
15165
15166 * conf/common.rmk (grub_modules_init.lst): Depended on
15167 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
15168 MODSRCFILES.
15169
15170 * genmk.rb (PModule::rule): Reverted the previous change.
15171
cfca1cfd 151722006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
15173
15174 * conf/common.rmk (grub_modules_init.lst): Depends on
15175 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
15176 that the target does not exist before producing.
15177 (grub_modules_init.h): Remove the target before generating.
15178 (grub_emu_init.c): Likewise.
15179
15180 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
15181
aa6d7826 151822006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
15183
15184 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
15185 for the target-specific tests. Make sure that we also have the
15186 up-to-date target variables for those tests.
15187
26c607b9 151882006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
15189
15190 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
15191 (PModule::rule): Likewise.
15192
0162321a 151932006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
15194
15195 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
15196 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
15197 target-specific flags should be prefixed.
15198 (PModule::rule): Likewise.
15199
6c826348 152002006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
15201
15202 * configure.ac (CMP): Check if cmp is available explicitly.
15203
b977bf01 152042006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
15205
15206 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
15207 (target_cpu): New variable.
15208 (pkglibdir): Use target_cpu instead of host_cpu.
f19dbdb7 15209
b977bf01 15210 * util/i386/pc/grub-install.in (host_cpu): Removed.
15211 (target_cpu): New variable.
15212 (pkglibdir): Use target_cpu instead of host_cpu.
15213
15214 * util/genmoddep.c: Removed.
f19dbdb7 15215
b977bf01 15216 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
15217 instead of GRUB_HOST_SIZEOF_VOID_P.
15218 * kern/dl.c: Likewise.
15219
15220 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
15221 ...
15222 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
15223 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
15224 (GRUB_TARGET_SIZEOF_LONG): ... this.
15225 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
15226 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
15227 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
15228 to ...
15229 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
15230 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
15231 (GRUB_TARGET_SIZEOF_LONG): ... this.
15232 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
15233 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
15234 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
15235 to ...
15236 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
15237 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
15238 (GRUB_TARGET_SIZEOF_LONG): ... this.
15239 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
15240 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
15241
15242 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
15243 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
15244 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
15245 instead of GRUB_HOST_SIZEOF_LONG.
15246 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
15247 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
15248 GRUB_CPU_WORDS_BIGENDIAN.
15249 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
15250 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
15251 grub_host_ssize_t.
15252
15253 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
15254 (genmoddep_SOURCES): Likewise.
15255 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
15256 (genmoddep_SOURCES): Likewise.
15257 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
15258 (genmoddep_SOURCES): Likewise.
15259 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
15260 Likewise.
15261 (genmoddep_SOURCES): Likewise.
15262
15263 * genmoddep.awk: New file.
15264
15265 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
15266 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
15267 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
15268 (PModule::rule): Likewise.
15269 (Program::rule): Likewise.
15270 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
15271 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
15272 respectively.
15273
15274 * configure.ac: Rewritten intensively to use host and target
15275 instead of build and host, respectively.
15276
15277 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
15278 (host_cpu): Removed.
15279 (target_cpu): New variable.
15280 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
15281 (BUILD_CC): Removed.
15282 (BUILD_CFLAGS): Likewise.
15283 (BUILD_CPPFLAGS): Likewise.
15284 (TARGET_CC): New variable.
15285 (TARGET_CFLAGS): Likewise.
15286 (TARGET_CPPFLAGS): Likewise.
15287 (TARGET_LDFLAGS): Likewise.
15288 (AWK): Likewise.
15289 (include): Use target_cpu instead of host_cpu.
15290 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
f19dbdb7 15291
b977bf01 15292 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
15293
f09771a1 152942006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
15295
15296 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
15297 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
15298 field 'false' to 'exec_on_false'.
15299 (grub_script_create_cmdif): Renamed argument names to reflect above
15300 changes.
15301
15302 * normal/execute.c (grub_script_execute_cmdif): Likewise.
15303
15304 * normal/script.c (grub_script_create_cmdif): Likewise.
15305
118f4fb3 153062006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
15307
15308 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
15309 top.
15310 (grub_hfsplus_btree_recptr): Likewise.
15311 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
15312 FILEBLOCK both to pass a block number and store next block
15313 number.
15314 (grub_hfsplus_read_block): Rewritten heavily to support an extent
15315 overflow file correctly. Specify errors appropriately, because
15316 fshelp expects that GRUB_ERRNO is set when fails. Reuse
15317 grub_hfsplus_btree_recptr to get the pointer to a found key.
15318 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
15319 is found.
15320
15321 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
15322 linux.mod.
15323 (_linux_mod_SOURCES): New variable.
15324 (_linux_mod_CFLAGS): Likewise.
15325 (_linux_mod_LDFLAGS): Likewise.
15326 (linux_mod_SOURCES): Likewise.
15327 (linux_mod_CFLAGS): Likewise.
15328 (linux_mod_LDFLAGS): Likewise.
15329
15330 * DISTLIST: Added loader/i386/efi/linux.c,
15331 loader/i386/efi/linux_normal.c and
15332 include/grub/i386/efi/loader.h.
15333
15334 * loader/i386/efi/linux.c: New file.
15335 * loader/i386/efi/linux_normal.c: Likewise.
15336 * include/grub/i386/efi/loader.h: Likewise.
15337
89a7d726 153382006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
15339
15340 * commands/blocklist.c: New file.
15341
15342 * DISTLIST: Added commands/blocklist.c.
15343
15344 * term/efi/console.c (grub_console_highlight_color): Use a lighter
43b553ad 15345 color for the background, and a darker color for the foreground.
89a7d726 15346 (grub_console_checkkey): Return READ_KEY.
15347 (grub_console_cls): Set the background to
15348 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
15349
15350 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
15351
15352 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
15353 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
15354
15355 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
15356 prototype.
15357
15358 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
15359 BG. The spec is wrong again.
15360
15361 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
15362 prototype.
15363 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
15364
15365 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15366 commands/blocklist.c.
15367 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
f19dbdb7 15368
89a7d726 15369 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
15370 (blocklist_mod_SOURCES): New variable.
15371 (blocklist_mod_CFLAGS): Likewise.
15372 (blocklist_mod_LDFLAGS): Likewise.
15373
75c8f258 153742006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
15375
15376 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
15377 duplication.
15378 (lba_mode): Use %eax more intensively to reduce the code size.
15379
da2eb181 153802006-05-20 Marco Gerards <marco@gnu.org>
15381
15382 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
15383
15384 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
15385 for `menuentry'.
15386 (script): Accept leading newlines.
15387 (newlines): New rule to describe 0 or more newlines.
15388 (commands): Accept `command' with trailing newline. Fixed the
15389 order in which arguments were passed to `grub_script_add_cmd'.
15390 Accept commands separated by newlines.
15391 (function): Changed to accept newlines.
15392 (menuentry) Rewritten.
15393
15394 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
15395 front of the list, instead of to the end.
15396
577b4050 153972006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
15398
15399 * util/i386/pc/grub-install.in (bindir): New variable.
15400 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
15401 Shaver <lbgwjl@gmail.com>.
15402
0d6e1189 154032006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
15404
15405 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
15406 grub/machine/linux.h
15407 * loader/i386/pc/linux.c: Likewise.
15408
15409 * include/grub/i386/pc/linux.h: Moved to ...
15410 * include/grub/i386/linux.h: ... here.
15411
15412 * include/grub/i386/linux.h (struct linux_kernel_params): New
15413 struct.
f19dbdb7 15414
31b86e9f 154152006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
15416
15417 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
15418 checking.
15419 (grub_video_vbe_blit_glyph): Likewise.
15420 (grub_video_vbe_blit_bitmap): Likewise.
15421 (grub_video_vbe_blit_render_target): Likewise.
15422
83b984de 154232006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
15424
15425 * configure.ac (--with-platform): Properly quote the square
15426 brackets.
15427
5f0413bd 154282006-05-08 Marco Gerards <marco@gnu.org>
15429
15430 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
15431 this...
15432 (kernel_elf_HEADERS): ...to this. Updated all users.
15433 (grubof_symlist.c): Renamed from this...
15434 (kernel_elf_symlist.c): ...to this. Updated all users.
15435 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
15436 (grubof_SOURCES): Renamed from this...
15437 (kernel_elf_SOURCES): ...to this.
15438 (grubof_HEADERS): Renamed from this...
15439 (kernel_elf_HEADERS): ...to this.
15440 (grubof_CFLAGS): Renamed from this...
15441 (kernel_elf_CFLAGS): ...to this.
15442 (grubof_ASFLAGS): Renamed from this...
15443 (kernel_elf_ASFLAGS): ...to this.
15444 (grubof_LDFLAGS): Renamed from this...
15445 (kernel_elf_LDFLAGS): ...to this.
15446
15447 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
15448 this...
15449 (kernel_elf_HEADERS): ...to this. Updated all users.
15450 (grubof_symlist.c): Renamed from this...
15451 (kernel_elf_symlist.c): ...to this. Updated all users.
15452 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
15453 (grubof_SOURCES): Renamed from this...
15454 (kernel_elf_SOURCES): ...to this.
15455 (grubof_HEADERS): Renamed from this...
15456 (kernel_elf_HEADERS): ...to this.
15457 (grubof_CFLAGS): Renamed from this...
15458 (kernel_elf_CFLAGS): ...to this.
15459 (grubof_ASFLAGS): Renamed from this...
15460 (kernel_elf_ASFLAGS): ...to this.
15461 (grubof_LDFLAGS): Renamed from this...
15462 (kernel_elf_LDFLAGS): ...to this.
15463
15464 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
15465 `kernel.elf' instead of `grubof'.
15466
05568c2e 154672006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
15468
15469 Add --with-platform to configure. Use pkglibdir instead of
15470 pkgdatadir. This is reported by Roger Leigh.
15471
15472 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
15473 (host_vendor): Likewise.
15474 (host_os): Likewise.
15475 (pkgdatadir): Likewise.
15476 (platform): New variable.
15477 (pkglibdir): Likewise.
15478 Use PKGLIBDIR instead of PKGDATADIR.
f19dbdb7 15479
05568c2e 15480 * util/i386/pc/grub-install.in (datadir): Removed.
15481 (host_vendor): Likewise.
15482 (host_os): Likewise.
15483 (pkgdatadir): Likewise.
15484 (platform): New variable.
15485 (pkglibdir): Likewise.
15486 Use PKGLIBDIR instead of PKGDATADIR.
15487
15488 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
15489 instead of GRUB_DATADIR.
15490 (main): Likewise.
15491 * util/i386/pc/grub-mkimage.c (usage): Likewise.
15492 (main): Likewise.
15493 * util/i386/efi/grub-mkimage.c (usage): Likewise.
15494 (main): Likewise.
15495
15496 * configure.ac (--with-platform): New option.
15497 Use PLATFORM instead of HOST_VENDOR to specify a platform.
15498
15499 * Makefile.in: Include a makefile based on PLATFORM instead of
15500 HOST_VENDOR.
15501 (pkgdatadir): Not appended by the machine type.
15502 (pkglibdir): Appended by the machine type.
15503 (host_vendor): Removed.
15504 (platform): New variable.
15505 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
15506 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
15507 (uninstall): Likewise.
15508
4e93851c 155092006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
15510
15511 Use the environment context in the menu. Remove the commands
15512 "default" and "timeout", and use variables instead.
f19dbdb7 15513
4e93851c 15514 * normal/menu.c: Include grub/env.h.
15515 (print_entry): Cast TITLE to silence gcc.
15516 (get_timeout): New function.
15517 (set_timeout): Likewise.
15518 (get_entry_number): Likewise.
15519 (run_menu): Use a default entry, a fallback entry and a timeout
15520 in the environment variables "default", "fallback" and
15521 "timeout". Also, tweak the default entry if it is not within the
15522 current menu entries.
15523 (grub_menu_run): Use a fallback entry in the environment variable
15524 "fallback".
15525
15526 * normal/main.c (read_config_file): Do not initialize
15527 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
15528 NEWMENU->TIMEOUT.
15529 (grub_normal_execute): Use a data slot to store the menu.
15530
15531 * include/grub/normal.h (struct grub_menu): Removed default_entry,
15532 fallback_entry and timeout.
15533 (struct grub_menu_list): Removed.
15534 (grub_menu_list_t): Likewise.
15535 (struct grub_context): Likewise.
15536 (grub_context_t): Likewise.
15537 (grub_context_get): Likewise.
15538 (grub_context_get_current_menu): Likewise.
15539 (grub_context_push_menu): Likewise.
15540 (grub_context_pop_menu): Likewise.
15541 (grub_default_init): Likewise.
15542 (grub_default_fini): Likewise.
15543 (grub_timeout_init): Likewise.
15544 (grub_timeout_fini): Likewise.
15545
15546 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
15547 and timeout.mod.
15548 (normal_mod_SOURCES): Removed normal/context.c.
15549
15550 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
15551 commands/default.c, commands/timeout.c and normal/context.c.
15552 (normal_mod_SOURCES): Removed normal/context.c.
15553
15554 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
15555 commands/timeout.c and normal/context.c.
15556 (normal_mod_SOURCES): Removed normal/context.c.
15557
15558 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
15559 commands/default.c, commands/timeout.c and normal/context.c.
15560 (normal_mod_SOURCES): Removed normal/context.c.
15561
15562 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
15563 timeout.mod.
15564 (default_mod_SOURCES): Removed.
15565 (default_mod_CFLAGS): Likewise.
15566 (default_mod_LDFLAGS): Likewise.
15567 (timeout_mod_SOURCES): Removed.
15568 (timeout_mod_CFLAGS): Likewise.
15569 (timeout_mod_LDFLAGS): Likewise.
15570
15571 * DISTLIST: Removed commands/default.c, commands/timeout.c and
15572 normal/context.c.
15573
15574 * commands/default.c: Removed.
15575 * commands/timeout.c: Likewise.
15576 * normal/context.c: Likewise.
15577
1eb9cc1d 155782006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
15579
15580 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
15581
385bd9c1 155822006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
15583
15584 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
15585 "next" to "prev" for readability.
15586 (struct grub_env_sorted_var): New struct.
15587 (grub_env_context): Renamed to ...
15588 (initial_context): ... this.
15589 (grub_env_var_context): Renamed to ...
15590 (current_context): ... this.
15591 (grub_env_find): Look only at CURRENT_CONTEXT.
15592 (grub_env_context_open): Rewritten to copy exported variables from
15593 previous context.
15594 (grub_env_context_close): Rewritten according to the new
15595 scheme. Also, add an assertion to prevent the initial context from
15596 removed.
15597 (grub_env_insert): Removed the code for the sorted list.
15598 (grub_env_remove): Likewise.
15599 (grub_env_export): Simply mark the variable with
15600 GRUB_ENV_VAR_GLOBAL.
15601 (grub_env_set): A cosmetic change for naming consistency.
15602 (grub_env_get): Likewise.
15603 (grub_env_unset): Likewise.
15604 (grub_env_iterate): Rewritten to sort variables within this
15605 function.
15606 (grub_register_variable_hook): Fixed for naming consistency. Call
15607 grub_env_find again, only if NAME is not found at the first time.
15608 (mangle_data_slot_name): New function.
15609 (grub_env_set_data_slot): Likewise.
15610 (grub_env_get_data_slot): Likewise.
15611 (grub_env_unset_data_slot): Likewise.
15612
15613 * include/grub/env.h (grub_env_var_type): New enum.
15614 (GRUB_ENV_VAR_LOCAL): New constant.
15615 (GRUB_ENV_VAR_GLOBAL): Likewise.
15616 (GRUB_ENV_VAR_DATA): Likewise.
15617 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
15618 "type".
15619 (grub_env_set): Replace VAR with NAME for consistency.
15620 (grub_register_variable_hook): Likewise.
15621 (grub_env_export): Specify the name of the argument.
15622 (grub_env_set_data_slot): New prototype.
15623 (grub_env_get_data_slot): Likewise.
15624 (grub_env_unset_data_slot): Likewise.
15625
7f362539 156262006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
15627
15628 Extend the loader so that GRUB can accept a loader which comes
15629 back to GRUB when a loaded image exits. Also, this change adds
15630 support for a chainloader on EFI.
f19dbdb7 15631
7f362539 15632 * term/efi/console.c: Include grub/misc.h.
15633 (grub_console_checkkey): Display a scan code on the top for
15634 debugging. This will be removed once the EFI port gets stable.
15635 Correct the scan code mapping.
15636
15637 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
15638 allocate memory from larger regions, in order to reduce the number
15639 of allocated regions. Otherwise, the MacOSX loader panics.
15640 (filter_memory_map): Avoid less than 1MB for compatibility with
15641 other loaders.
15642 (add_memory_regions): Allocate from the tail of a region, if
15643 possible, to avoid allocating a region near to 1MB, for the MacOSX
15644 loader.
15645
15646 * kern/efi/init.c (grub_efi_set_prefix): Specify
15647 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
15648
15649 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
15650 argument IMAGE_HANDLE and specify it to get a loaded image.
15651 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
15652 grub_efi_get_loaded_image.
fe6b695a 15653 (grub_efi_get_filename): Divide the length by the size of
7f362539 15654 grub_efi_char16_t.
15655 (grub_efi_get_device_path): New function.
15656 (grub_efi_print_device_path): Print End Device Path nodes. Divide
15657 the length by the size of grub_efi_char16_t for a file path device
15658 path node.
15659
15660 * kern/loader.c (grub_loader_noreturn): New variable.
15661 (grub_loader_set): Accept a new argument NORETURN. Set
15662 GRUB_LOADER_NORETURN to NORETURN.
15663 All callers changed.
15664 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
15665 grub_machine_fini.
15666
15667 * include/grub/efi/efi.h (grub_efi_get_device_path): New
15668 prototype.
15669 (grub_efi_get_loaded_image): Take an argument to specify an image
15670 handle.
15671
15672 * include/grub/loader.h (grub_loader_set): Added one more argument
15673 NORETURN.
15674
15675 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
15676 instead of grub_efi_open_protocol.
15677 (grub_efidisk_get_device_name): Likewise.
15678 (grub_efidisk_close): Print a newline.
15679 (grub_efidisk_get_device_handle): Fixed to use
15680 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
15681 GRUB_EFI_DEVICE_PATH_TYPE.
15682
15683 * disk/efi/efidisk.c (device_path_guid): Moved to ...
15684 * kern/efi/efi.c (device_path_guid): ... here.
15685
15686 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
15687 chain.mod.
15688 (kernel_mod_HEADERS): Added efi/disk.h.
15689 (_chain_mod_SOURCES): New variable.
15690 (_chain_mod_CFLAGS): Likewise.
15691 (_chain_mod_LDFLAGS): Likewise.
15692 (chain_mod_SOURCES): Likewise.
15693 (chain_mod_CFLAGS): Likewise.
15694 (chain_mod_LDFLAGS): Likewise.
15695
15696 * DISTLIST: Added include/grub/efi/chainloader.h,
15697 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
15698
15699 * include/grub/efi/chainloader.h: New file.
15700 * loader/efi/chainloader.c: Likewise.
15701 * loader/efi/chainloader_normal.c: Likewise.
15702
c0111d6e 157032006-04-30 Marco Gerards <marco@gnu.org>
15704
15705 * commands/configfile.c (grub_cmd_source): New function.
15706 (GRUB_MOD_INIT): Register the commands `source' and `.'.
15707 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
15708
df5341da 157092006-04-30 Marco Gerards <marco@gnu.org>
15710
15711 * normal/execute.c (grub_script_execute_cmd): Change the return
15712 type to `grub_err_t'. Correctly return the error.
15713 (grub_script_execute_cmdline): In case a command line is not a
15714 command or a function, try to interpret it as an assignment.
15715
f85934bd 157162006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
15717
15718 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
15719 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
15720 skip a node whose name is obviously invalid as UTF-16,
15721 i.e. contains a NUL character. Stop the iteration when the last
15722 directory entry is found. Instead of using the return value of
15723 grub_hfsplus_btree_iterate_node, store the value in RET and use
15724 it, because the iterator can be stopped by the last directory
15725 entry.
15726
8f8a2cf8 157272006-04-30 Marco Gerards <marco@gnu.org>
15728
15729 * include/grub/env.h (grub_env_export): New prototype. Reported
15730 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
15731
a27e84ce 157322006-04-30 Marco Gerards <marco@gnu.org>
15733
15734 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
15735 size of the extents in a catalog file record.
15736
eaef0553 157372006-04-29 Marco Gerards <marco@gnu.org>
15738
15739 * commands/configfile.c (grub_cmd_configfile): Execute the
15740 configfile within its own context.
15741
15742 * include/grub/env.h (grub_env_context_open): New prototype.
15743 (grub_env_context_close): Likewise.
15744
15745 * kern/env.c (grub_env): Removed.
15746 (grub_env_sorted): Likewise.
15747 (grub_env_context): New variable.
15748 (grub_env_var_context): Likewise.
15749 (grub_env_find): Search both the active context and the global
15750 context.
15751 (grub_env_context_open): New function.
15752 (grub_env_context_close): Likewise.
15753 (grub_env_insert): Likewise.
15754 (grub_env_remove): Likewise.
15755 (grub_env_export): Likewise.
15756 (grub_env_set): Changed to use helper functions to avoid code
15757 duplication.
15758 (grub_env_iterate): Rewritten so both the current context and the
15759 global context are being used.
15760
15761 * normal/command.c (export_command): New function.
15762 (grub_command_init): Register the `export' function.
15763
7b455f4d 157642006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
15765
15766 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
15767 explicitly to suppress gcc's warnings.
15768 * fs/fat.c (grub_fat_find_dir): Likewise.
15769 (grub_fat_label): Likewise.
15770 * fs/xfs.c (grub_xfs_read_inode): Likewise.
15771 (grub_xfs_mount): Likewise.
15772 (grub_xfs_label): Likewise.
15773 * fs/affs.c (grub_affs_mount): Likewise.
15774 (grub_affs_label): Likewise.
15775 (grub_affs_iterate_dir): Likewise.
15776 * fs/sfs.c (grub_sfs_mount): Likewise.
15777 (grub_sfs_iterate_dir): Likewise.
15778 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
15779 * fs/hfs.c (grub_hfs_mount): Likewise.
15780 (grub_hfs_cmp_catkeys): Likewise.
15781 (grub_hfs_find_dir): Likewise.
15782 (grub_hfs_dir): Likewise.
15783 (grub_hfs_label): Likewise.
15784 * fs/jfs.c (grub_jfs_mount): Likewise.
15785 (grub_jfs_opendir): Likewise.
15786 (grub_jfs_getent): Likewise.
15787 (grub_jfs_lookup_symlink): Likewise.
15788 (grub_jfs_label): Likewise.
15789 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
15790 (grub_hfsplus_iterate_dir): Likewise.
15791 (grub_hfsplus_btree_iterate_node): Made static.
15792
15793 * util/grub-emu.c (prefix): New variable.
15794 (grub_machine_set_prefix): New function.
15795 (main): Do not set the environment variable "prefix" here. Only
15796 set PREFIX, which is used later by grub_machine_set_prefix.
15797
15798 * include/grub/video.h: Do not include grub/symbol.h.
15799 (grub_video_register): Not exported. This symbol is not defined in
15800 the kernel.
15801 (grub_video_unregister): Likewise.
15802 (grub_video_iterate): Likewise.
15803 (grub_video_setup): Likewise.
15804 (grub_video_restore): Likewise.
15805 (grub_video_get_info): Likewise.
15806 (grub_video_get_blit_format): Likewise.
15807 (grub_video_set_palette): Likewise.
15808 (grub_video_get_palette): Likewise.
15809 (grub_video_set_viewport): Likewise.
15810 (grub_video_get_viewport): Likewise.
15811 (grub_video_map_color): Likewise.
15812 (grub_video_map_rgb): Likewise.
15813 (grub_video_map_rgba): Likewise.
15814 (grub_video_fill_rect): Likewise.
15815 (grub_video_blit_glyph): Likewise.
15816 (grub_video_blit_bitmap): Likewise.
15817 (grub_video_blit_render_target): Likewise.
15818 (grub_video_scroll): Likewise.
15819 (grub_video_swap_buffers): Likewise.
15820 (grub_video_create_render_target): Likewise.
15821 (grub_video_delete_render_target): Likewise.
15822 (grub_video_set_active_render_target): Likewise.
15823
15824 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
15825 Undefined.
15826 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
15827
15828 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
15829 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
15830 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
15831 instead of $(srcdir)/genkernsyms.sh.
15832
15833 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
15834 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
15835 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
15836 instead of $(srcdir)/genkernsyms.sh.
15837
15838 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
15839 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
15840 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
15841 instead of $(srcdir)/genkernsyms.sh.
15842
15843 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
15844 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
15845 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
15846 instead of $(srcdir)/genkernsyms.sh.
15847
15848 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
15849 genkernsyms.sh.
15850
15851 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
15852 genkernsyms.sh.
15853 (gensymlist.sh): New target.
15854 (genkernsyms.sh): Likewise.
15855
15856 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
15857 genkernsyms.sh.in and gensymlist.sh.in.
15858
15859 * genkernsyms.sh: Removed.
15860 * gensymlist.sh: Likewise.
f19dbdb7 15861
7b455f4d 15862 * genkernsyms.sh.in: New file.
15863 * gensymlist.sh.in: Likewise.
15864
1885bb27 158652006-04-25 Hollis Blanchard <hollis@penguinppc.org>
15866
15867 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
15868 clobber "prefix", since we may have already set it manually.
15869
71538dff 158702006-04-25 Hollis Blanchard <hollis@penguinppc.org>
15871
15872 * kern/misc.c (abort): New alias for grub_abort.
15873
2965c7cc 158742006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
15875
15876 A new machine-specific function "grub_machine_set_prefix" is
15877 defined. This is called after loading modules, so that a prefix
15878 initialization can use modules. Also, this change adds an
15879 intensive debugging feature for the memory manager via the
15880 configure option "--enable-mm-debug".
f19dbdb7 15881
2965c7cc 15882 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
15883 PART.LEN.
15884
15885 * kern/sparc64/ieee1275/init.c (abort): Removed.
15886 (grub_stop): Likewise.
15887 (grub_exit): New function.
15888 (grub_set_prefix): Renamed to ...
15889 (grub_machine_set_prefix): ... this.
15890 (grub_machine_init): Do not call grub_set_prefix.
15891
15892 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
15893 (grub_machine_set_prefix): ... this.
15894 (grub_machine_init): Do not call grub_set_prefix.
15895
15896 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
15897 (grub_machine_init): Do not set the prefix here.
15898
15899 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
15900
15901 * kern/efi/init.c: Include grub/mm.h.
15902 (grub_efi_set_prefix): New function.
15903
15904 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
15905 (grub_efi_get_filename): New function.
15906 (grub_print_device_path): Renamed to ...
15907 (grub_efi_print_device_path): ... this.
15908
15909 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
15910 [MM_DEBUG] (grub_realloc): Likewise.
15911 [MM_DEBUG] (grub_free): Likewise.
15912 [MM_DEBUG] (grub_memalign): Likewise.
15913 [MM_DEBUG] (grub_mm_debug): New variable.
15914 [MM_DEBUG] (grub_debug_malloc): New function.
15915 [MM_DEBUG] (grub_debug_free): New function.
15916 [MM_DEBUG] (grub_debug_realloc): New function.
15917 [MM_DEBUG] (grub_debug_memalign): New function.
15918
15919 * kern/misc.c (grub_abort): Print a newline to distinguish
15920 the message.
15921
15922 * kern/main.c (grub_main): Call grub_machine_set_prefix and
15923 grub_set_root_dev after loading modules. This is necessary when
15924 setting a prefix depends on modules.
15925
15926 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
15927 (grub_efi_print_device_path): ... this.
15928 (grub_efi_get_filename): New prototype.
15929 (grub_efi_set_prefix): Likewise.
15930
15931 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
15932 and grub/disk.h.
15933 (grub_efidisk_get_device_handle): New prototype.
15934 (grub_efidisk_get_device_name): Likewise.
15935
15936 * include/grub/mm.h: Include config.h.
15937 (MM_DEBUG): Removed.
15938 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
15939 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
15940 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
15941 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
15942 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
15943 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
15944 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
15945 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
15946 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
15947
15948 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
15949
15950 * disk/efi/efidisk.c: Include grub/partition.h.
15951 (iterate_child_devices): New function.
15952 (add_device): First, compare only last device path nodes, so that
15953 devices are sorted by the types.
15954 (grub_efidisk_get_device_handle): New function.
15955 (grub_efidisk_get_device_name): Likewise.
15956
15957 * configure.ac (--enable-mm-debug): New option to enable the
15958 memory manager debugging feature. This makes the binary much
15959 bigger, so is disabled by default.
15960
9cacaa17 159612006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
15962
15963 Use grub_abort instead of grub_stop, and grub_exit must be
15964 define in each architecture now. Also, this change adds support
15965 for EFI disks.
f19dbdb7 15966
9cacaa17 15967 * util/i386/pc/grub-probefs.c: Include grub/term.h.
15968 (grub_getkey): New function.
15969 (grub_term_get_current): Likewise.
15970
15971 * util/i386/pc/grub-setup.c: Include grub/term.h.
15972 (grub_getkey): New function.
15973 (grub_term_get_current): Likewise.
15974
15975 * util/misc.c (grub_stop): Renamed to ...
15976 (grub_exit): ... this.
15977
15978 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
15979 (grub_exit): ... this.
15980 (grub_machine_init): Use grub_abort instead of abort.
15981 (grub_stop): Removed.
15982
15983 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
15984 abort.
15985
15986 * kern/i386/pc/startup.S (grub_exit): New function.
15987 (cold_reboot): New label.
15988
15989 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
15990 (grub_efi_init): Call grub_efidisk_init.
15991 (grub_efi_fini): Call grub_efidisk_fini.
15992
15993 * kern/efi/efi.c: Include grub/mm.h.
15994 (grub_efi_console_control_guid): Renamed to ...
15995 (console_control_guid): ... this.
15996 (grub_efi_loaded_image_guid): Renamed to ...
15997 (loaded_image_guid): ... this.
15998 (grub_efi_locate_handle): New function.
15999 (grub_efi_open_protocol): Likewise.
16000 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
16001 GRUB_EFI_CONSOLE_CONTROL_GUID.
16002 (grub_efi_exit): Removed.
16003 (grub_stop): Likewise.
16004 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
16005 (grub_exit): New function.
16006 (grub_print_device_path): Likewise.
16007
16008 * kern/rescue.c (grub_rescue_cmd_exit): New function.
16009 (grub_enter_rescue_mode): Register "exit".
16010
16011 * kern/misc.c (grub_real_dprintf): A cosmetic change.
16012 (grub_abort): New function.
16013
16014 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
16015
16016 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
16017
16018 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
16019
16020 * include/grub/efi/efi.h (grub_efi_exit): Removed.
16021 (grub_print_device_path): New prototype.
16022 (grub_efi_locate_handle): Likewise.
16023 (grub_efi_open_protocol): Likewise.
16024
16025 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
16026 * disk/efi/efidisk.c: Likewise.
16027
16028 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
16029
16030 * include/grub/efi/console_control.h
16031 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
16032
16033 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
16034 last 8 bytes as an array.
16035 (GRUB_EFI_DISK_IO_GUID): New macro.
16036 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
16037 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
16038 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
16039 grub_uint8_t.
16040 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
16041 (struct grub_efi_device_path): Rename the member "sub_type" to
16042 "subtype".
16043 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
16044 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
16045 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
16046 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
16047 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
16048 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
16049 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
16050 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
16051 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
16052 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
16053 (struct grub_efi_pci_device_path): New structure.
16054 (grub_efi_pci_device_path_t): New type.
16055 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
16056 (struct grub_efi_pccard_device_path): New structure.
16057 (grub_efi_pccard_device_path_t): New type.
16058 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
16059 (struct grub_efi_memory_mapped_device_path): New structure.
16060 (grub_efi_memory_mapped_device_path_t): New type.
16061 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
16062 (struct grub_efi_vendor_device_path): New structure.
16063 (grub_efi_vendor_device_path_t): New type.
16064 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
16065 (struct grub_efi_controller_device_path): New structure.
16066 (grub_efi_controller_device_path_t): New type.
16067 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
16068 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
16069 (struct grub_efi_acpi_device_path): New structure.
16070 (grub_efi_acpi_device_path_t): New type.
16071 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
16072 (struct grub_efi_expanded_acpi_device_path): New structure.
16073 (grub_efi_expanded_acpi_device_path_t): New type.
16074 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
16075 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
16076 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
16077 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
16078 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
16079 (struct grub_efi_atapi_device_path): New structure.
16080 (grub_efi_atapi_device_path_t): New type.
16081 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
16082 (struct grub_efi_fibre_channel_device_path): New structure.
16083 (grub_efi_fibre_channel_device_path_t): New type.
16084 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
16085 (struct grub_efi_1394_device_path): New structure.
16086 (grub_efi_1394_device_path_t): New type.
16087 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
16088 (struct grub_efi_usb_device_path): New structure.
16089 (grub_efi_usb_device_path_t): New type.
16090 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
16091 (struct grub_efi_usb_class_device_path): New structure.
16092 (grub_efi_usb_class_device_path_t): New type.
16093 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
16094 (struct grub_efi_i2o_device_path): New structure.
16095 (grub_efi_i2o_device_path_t): New type.
16096 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
16097 (struct grub_efi_mac_address_device_path): New structure.
16098 (grub_efi_mac_address_device_path_t): New type.
16099 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
16100 (struct grub_efi_ipv4_device_path): New structure.
16101 (grub_efi_ipv4_device_path_t): New type.
16102 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
16103 (struct grub_efi_ipv6_device_path): New structure.
16104 (grub_efi_ipv6_device_path_t): New type.
16105 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
16106 (struct grub_efi_infiniband_device_path): New structure.
16107 (grub_efi_infiniband_device_path_t): New type.
16108 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
16109 (struct grub_efi_uart_device_path): New structure.
16110 (grub_efi_uart_device_path_t): New type.
16111 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
16112 (struct grub_efi_vendor_messaging_device_path): New structure.
16113 (grub_efi_vendor_messaging_device_path_t): New type.
16114 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
16115 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
16116 (struct grub_efi_hard_drive_device_path): New structure.
16117 (grub_efi_hard_drive_device_path_t): New type.
16118 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
16119 (struct grub_efi_cdrom_device_path): New structure.
16120 (grub_efi_cdrom_device_path_t): New type.
16121 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
16122 (struct grub_efi_vendor_media_device_path): New structure.
16123 (grub_efi_vendor_media_device_path_t): New type.
16124 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
16125 (struct grub_efi_file_path_device_path): New structure.
16126 (grub_efi_file_path_device_path_t): New type.
16127 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
16128 (struct grub_efi_protocol_device_path): New structure.
16129 (grub_efi_protocol_device_path_t): New type.
16130 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
16131 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
16132 (struct grub_efi_bios_device_path): New structure.
16133 (grub_efi_bios_device_path_t): New type.
16134 (struct grub_efi_disk_io): New structure.
16135 (grub_efi_disk_io_t): New type.
16136 (struct grub_efi_block_io_media): New structure.
16137 (grub_efi_block_io_media_t): New type.
16138 (struct grub_efi_block_io): New structure.
16139 (grub_efi_block_io_t): New type.
16140
16141 * include/grub/misc.h (grub_stop): Removed.
16142 (grub_exit): New prototype.
16143 (grub_abort): Likewise.
16144
16145 * include/grub/disk.h (enum grub_disk_dev_id): Added
16146 GRUB_DISK_DEVICE_EFIDISK_ID.
16147
16148 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
16149 disk/efi/efidisk.c.
16150 (kernel_syms.lst): Remove the target if an error occurs.
16151
49986a9f 161522006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
16153
16154 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
16155 as it was simply too buggy.
16156
970d3b8a 161572006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
16158
16159 * kern/misc.c (grub_lltoa): New function.
16160 (grub_vsprintf): Added support for the long long suffix,
16161 i.e. "ll".
16162
ff04ec24 161632006-04-20 Hollis Blanchard <hollis@penguinppc.org>
16164
16165 * Makefile.in (LDFLAGS): Add variable.
16166 (LD): Remove variable.
16167 * configure.ac: Add -m32 to LDFLAGS.
16168 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
16169 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
16170 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
16171 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
16172 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
16173 variables.
16174 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
16175 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
16176 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
16177
37e5e1a4 161782006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
16179
16180 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
16181 length for unknown glyph.
16182
c352d8dd 161832006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
16184
2eab1c0d 16185 Add support for pre-loaded modules into the EFI port.
f19dbdb7 16186
2eab1c0d 16187 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
16188 completely. Accept one more argument DIR. The caller has changed.
16189
16190 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
16191
16192 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
16193 (grub_efi_loaded_image_guid): New variable.
16194 (grub_efi_get_loaded_image): New function.
16195 (grub_arch_modules_addr): Likewise.
16196
16197 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
16198 prototype.
16199
16200 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
16201 (struct grub_efi_loaded_image): New structure.
16202 (grub_efi_loaded_image_t): New type.
16203
162042006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 16205
c352d8dd 16206 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
16207 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
16208 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
16209
6d01d6b4 162102006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
16211
16212 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
16213
976a4ea0 162142006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
16215
16216 * DISTLIST: Added include/grub/efi/console.h,
16217 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
16218 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
16219
16220 * include/grub/efi/console.h: New file.
16221 * include/grub/efi/time.h: Likewise.
16222 * include/grub/i386/efi/kernel.h: Likewise.
16223 * kern/efi/init.c: Likewise.
16224 * kern/efi/mm.c: Likewise.
16225 * term/efi/console.c: Likewise.
f19dbdb7 16226
976a4ea0 16227 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
16228 (grub_stop): Removed.
16229 (grub_get_rtc): Likewise.
16230 (grub_machine_init): Simply call grub_efi_init.
16231 (grub_machine_fini): Call grub_efi_fini.
16232
16233 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
16234 (grub_efi_output_string): Removed.
16235 (grub_efi_stall): New function.
16236 (grub_stop): Likewise.
16237 (grub_get_rtc): Likewise.
16238
16239 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
16240 (grub_efi_stall): New prototype.
16241 (grub_efi_allocate_pages): Likewise.
16242 (grub_efi_free_pages): Likewise.
16243 (grub_efi_get_memory_map): Likewise.
16244 (grub_efi_mm_init): Likewise.
16245 (grub_efi_mm_fini): Likewise.
16246 (grub_efi_init): Likewise.
16247 (grub_efi_fini): Likewise.
16248
16249 * include/grub/i386/efi/time.h: Do not include
16250 grub/symbol.h. Include grub/efi/time.h.
16251 (GRUB_TICKS_PER_SECOND): Removed.
16252 (grub_get_rtc): Likewise.
16253
16254 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
16255 Added padding. The EFI spec is buggy.
16256 (GRUB_EFI_BLACK): New macro.
16257 (GRUB_EFI_BLUE): Likewise.
16258 (GRUB_EFI_GREEN): Likewise.
16259 (GRUB_EFI_CYAN): Likewise.
16260 (GRUB_EFI_RED): Likewise.
16261 (GRUB_EFI_MAGENTA): Likewise.
16262 (GRUB_EFI_BROWN): Likewise.
16263 (GRUB_EFI_LIGHTGRAY): Likewise.
16264 (GRUB_EFI_BRIGHT): Likewise.
16265 (GRUB_EFI_DARKGRAY): Likewise.
16266 (GRUB_EFI_LIGHTBLUE): Likewise.
16267 (GRUB_EFI_LIGHTGREEN): Likewise.
16268 (GRUB_EFI_LIGHTCYAN): Likewise.
16269 (GRUB_EFI_LIGHTRED): Likewise.
16270 (GRUB_EFI_LIGHTMAGENTA): Likewise.
16271 (GRUB_EFI_YELLOW): Likewise.
16272 (GRUB_EFI_WHITE): Likewise.
16273 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
16274 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
16275 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
16276 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
16277 (GRUB_EFI_BACKGROUND_RED): Likewise.
16278 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
16279 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
16280 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
16281 (GRUB_EFI_TEXT_ATTR): Likewise.
16282
16283 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
16284 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
16285 (kernel_mod_HEADERS): Added efi/time.h.
16286
83709125 162872006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
16288
16289 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
16290 include/grub/efi/api.h, include/grub/efi/console_control.h,
16291 include/grub/efi/efi.h, include/grub/efi/pe32.h,
16292 include/grub/i386/efi/time.h, kern/efi/efi.c,
16293 kern/i386/efi/init.c, kern/i386/efi/startup.S,
16294 and util/i386/efi/grub-mkimage.c.
16295
16296 * Makefile.in (RMKFILES): Added i386-efi.rmk.
16297
16298 * genmk.rb (PModule#rule): Do not export symbols if
16299 #{prefix}_EXPORTS is set to "no".
16300
16301 * conf/i386-efi.mk: New file.
16302 * conf/i386-efi.rmk: Likewise.
16303 * include/grub/efi/api.h: Likewise.
16304 * include/grub/efi/console_control.h: Likewise.
16305 * include/grub/efi/efi.h: Likewise.
16306 * include/grub/efi/pe32.h: Likewise.
16307 * include/grub/i386/efi/time.h: Likewise.
16308 * kern/efi/efi.c: Likewise.
16309 * kern/i386/efi/init.c: Likewise.
16310 * kern/i386/efi/startup.S: Likewise.
16311 * util/i386/efi/grub-mkimage.c: Likewise.
16312
163132006-04-17 Marco Gerards <marco@gnu.org>
bfa2bd9e 16314
16315 * include/grub/script.h: Include <grub/parser.h> and
16316 "grub_script.tab.h".
16317 (struct grub_lexer_param): New struct.
16318 (struct grub_parser_param): Likewise.
16319 (grub_script_create_arglist): Pass the state in an argument.
16320 (grub_script_add_arglist): Likewise.
16321 (grub_script_create_cmdline): Likewise.
16322 (grub_script_create_cmdblock): Likewise.
16323 (grub_script_create_cmdif): Likewise.
16324 (grub_script_create_cmdmenu): Likewise.
16325 (grub_script_add_cmd): Likewise.
16326 (grub_script_arg_add): Likewise.
16327 (grub_script_lexer_ref): Likewise.
16328 (grub_script_lexer_deref): Likewise.
16329 (grub_script_lexer_record_start): Likewise.
16330 (grub_script_lexer_record_stop): Likewise.
16331 (grub_script_mem_record): Likewise.
16332 (grub_script_mem_record_stop): Likewise.
16333 (grub_script_malloc): Likewise.
16334 (grub_script_yylex): Likewise.
16335 (grub_script_yyparse): Likewise.
16336 (grub_script_yyerror): Likewise.
16337 (grub_script_yylex): Likewise.
16338 (grub_script_lexer_init): Return the state.
16339
16340 * normal/lexer.c (grub_script_lexer_state): Removed variable.
16341 (grub_script_lexer_done): Likewise.
16342 (grub_script_lexer_getline): Likewise.
16343 (grub_script_lexer_refs): Likewise.
16344 (script): Likewise.
16345 (newscript): Likewise.
16346 (record): Likewise.
16347 (recording): Likewise.
16348 (recordpos): Likewise.
16349 (recordlen): Likewise.
16350 (grub_script_lexer_init): Return the state instead of setting
16351 global variables.
16352 (grub_script_lexer_ref): Use the newly added argument for state
16353 instead of globals.
16354 (grub_script_lexer_deref): Likewise.
16355 (grub_script_lexer_record_start): Likewise.
16356 (grub_script_lexer_record_stop): Likewise.
16357 (recordchar): Likewise.
16358 (nextchar): Likewise.
16359 (grub_script_yylex2): Likewise.
16360 (grub_script_yylex): Likewise.
16361 (grub_script_yyerror): Likewise.
16362
16363 * normal/parser.y (func_mem): Removed variable.
16364 (menu_entry): Likewise.
16365 (err): Likewise.
16366 (%lex-param): New parser option.
16367 (%parse-param): Likewise.
16368 (script): Always return the AST.
16369 (argument): Pass the state around.
16370 (arguments): Likewise.
16371 (grubcmd): Likewise.
16372 (commands): Likewise.
16373 (function): Likewise.
16374 (menuentry): Likewise.
16375 (if_statement): Likewise.
16376 (if): Likewise.
16377
16378 * normal/script.c (grub_script_memused): Removed variable.
16379 (grub_script_parsed): Likewise.
16380 (grub_script_malloc): Added a state argument. Use that instead of
16381 global variables.
16382 (grub_script_mem_record): Likewise.
16383 (grub_script_mem_record_stop): Likewise.
16384 (grub_script_arg_add): Likewise.
16385 (grub_script_add_arglist): Likewise.
16386 (grub_script_create_cmdline): Likewise.
16387 (grub_script_create_cmdif): Likewise.
16388 (grub_script_create_cmdmenu): Likewise.
16389 (grub_script_add_cmd): Likewise.
16390 (grub_script_parse): Setup the state before calling the parser.
f19dbdb7 16391
e2a8c904 163922006-04-16 Marco Gerards <marco@gnu.org>
6de2ee99 16393
16394 * normal/command.c (grub_command_init): Remove the title command.
16395
16396 * normal/lexer.c (grub_script_yylex): Renamed from this...
16397 (grub_script_yylex2): ... to this.
16398 (grub_script_yylex): New function. Temporary
16399 introduced to filter some tokens.
16400 (grub_script_yyerror): Print a newline.
16401
16402 * normal/main.c (read_config_file): Output information about the
16403 lines that contain errors. Wait for a key after all lines have
16404 been processed. Don't return an empty menu.
16405
16406 * normal/parser.y (func_mem): Don't initialize.
16407 (menu_entry): Likewise.
16408 (err): New variable.
16409 (script): Don't return anything when an error was encountered.
16410 (ws, returns): Removed rules.
16411 (argument): Disabled concatenated variable support.
16412 (arguments): Remove explicit separators.
16413 (grubcmd): Likewise.
16414 (function): Likewise.
16415 (menuentry): Likewise.
16416 (if): Likewise.
16417 (commands): Likewise. Add error handling.
16418
16419 * normal/script.c (grub_script_create_cmdline): If
16420 `grub_script_parsed' is 0, assume the parser encountered an error.
16421
c9a86192 164222006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
16423
16424 * configure.ac: Add support for EFI. Fix the typo
16425 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
16426
70f3b243 164272006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
16428
16429 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
16430 foreign multibyte characters should be shown correctly.
16431
65f201ad 164322006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
16433
16434 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
16435 calculation.
16436 (read_config_file): Made it to close file before returning.
16437
b4b93674 164382006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
16439
16440 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
16441 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
16442 video/i386/pc/vbefill.c.
16443
16444 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
16445 video/i386/pc/vbefill.c.
16446
16447 * include/grub/video.h (grub_video_blit_format): New enum.
16448 (grub_video_mode_info): Added new member blit_format.
16449 (grub_video_get_blit_format): New function prototype.
16450
16451 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
16452 function prototype.
16453 (grub_video_vbe_map_rgb): Likewise.
16454 (grub_video_vbe_unmap_color): Likewise.
16455
16456 * include/grub/i386/pc/vbeblit.h: New file.
16457
16458 * include/grub/i386/pc/vbefill.h: New file.
16459
16460 * video/video.c (grub_video_get_blit_format): New function.
16461 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
16462 (grub_video_vbe_map_rgb): Likewise.
16463 (grub_video_vbe_unmap_color): Likewise.
16464
16465 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
16466 optimized fills.
16467 (grub_video_vbe_blit_render_target): Changed to use more optimized
16468 blits.
16469 (grub_video_vbe_setup): Added detection for optimized settings.
16470 (grub_video_vbe_create_render_target): Likewise.
16471
16472 * video/i386/pc/vbeblit.c: New file.
16473
16474 * video/i386/pc/vbefill.c: New file.
16475
c2379b9c 164762006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
16477
16478 * font/manager.c (grub_font_get_glyph): Removed font fixup from
16479 here...
16480
16481 * util/unifont2pff.rb: ... and moved it to here. Improved argument
16482 parsing to support both hex and dec ranges. If filename was missing
16483 show usage information.
16484
bd0d7896 164852006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
16486
16487 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
16488 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
16489
16490 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
16491 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
16492 (video_mod_SOURCES): Added.
16493 (video_mod_CFLAGS): Likewise.
16494 (video_mod_LDFLAGS): Likewise.
16495 (gfxterm_mod_SOURCES): Likewise.
16496 (gfxterm_mod_CFLAGS): Likewise.
16497 (gfxterm_mod_LDFLAGS): Likewise.
16498 (videotest_mod_SOURCES): Likewise.
16499 (videotest_mod_CFLAGS): Likewise.
16500 (videotest_mod_LDFLAGS): Likewise.
16501 (vesafb_mod_SOURCES): Removed.
16502 (vesafb_mod_CFLAGS): Likewise.
16503 (vesafb_mod_LDFLAGS): Likewise.
16504 (vga_mod_SOURCES): Likewise.
16505 (vga_mod_CFLAGS): Likewise.
16506 (vga_mod_LDFLAGS): Likewise.
16507
16508 * commands/videotest.c: New file.
16509
16510 * font/manager.c (fill_with_default_glyph): Modified to use
16511 grub_font_glyph.
16512 (grub_font_get_glyph): Likewise.
16513 (fontmanager): Renamed from this...
16514 (font_manager): ... to this.
16515
16516 * include/grub/font.h (grub_font_glyph): Added new structure.
16517 (grub_font_get_glyph): Modified to use grub_font_glyph.
16518
16519 * include/grub/misc.h (grub_abs): Added as inline function.
16520
16521 * include/grub/video.h: New file.
16522
16523 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
16524 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
16525 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
16526 (grub_vbe_get_controller_info): Renamed from this...
16527 (grub_vbe_bios_get_controller_info): ... to this.
16528 (grub_vbe_get_mode_info): Renamed from this...
16529 (grub_vbe_bios_get_mode_info): ... to this.
16530 (grub_vbe_set_mode): Renamed from this...
16531 (grub_vbe_bios_set_mode): ... to this.
16532 (grub_vbe_get_mode): Renamed from this...
16533 (grub_vbe_bios_get_mode): ... to this.
16534 (grub_vbe_set_memory_window): Renamed from this...
16535 (grub_vbe_bios_set_memory_window): ... to this.
16536 (grub_vbe_get_memory_window): Renamed from this...
16537 (grub_vbe_bios_get_memory_window): ... to this.
16538 (grub_vbe_set_scanline_length): Renamed from this...
16539 (grub_vbe_set_scanline_length): ... to this.
16540 (grub_vbe_get_scanline_length): Renamed from this...
16541 (grub_vbe_bios_get_scanline_length): ... to this.
16542 (grub_vbe_set_display_start): Renamed from this...
16543 (grub_vbe_bios_set_display_start): ... to this.
16544 (grub_vbe_get_display_start): Renamed from this...
16545 (grub_vbe_bios_get_display_start): ... to this.
16546 (grub_vbe_set_palette_data): Renamed from this...
16547 (grub_vbe_bios_set_palette_data): ... to this.
16548 (grub_vbe_set_pixel_rgb): Removed.
16549 (grub_vbe_set_pixel_index): Likewise.
16550
16551 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
16552 from this...
16553 (grub_vbe_bios_get_controller_info): ... to this.
16554 (grub_vbe_get_mode_info): Renamed from this...
16555 (grub_vbe_bios_get_mode_info): ... to this.
16556 (grub_vbe_set_mode): Renamed from this...
16557 (grub_vbe_bios_set_mode): ... to this.
16558 (grub_vbe_get_mode): Renamed from this...
16559 (grub_vbe_bios_get_mode): ... to this.
16560 (grub_vbe_set_memory_window): Renamed from this...
16561 (grub_vbe_bios_set_memory_window): ... to this.
16562 (grub_vbe_get_memory_window): Renamed from this...
16563 (grub_vbe_bios_get_memory_window): ... to this.
16564 (grub_vbe_set_scanline_length): Renamed from this...
16565 (grub_vbe_set_scanline_length): ... to this.
16566 (grub_vbe_get_scanline_length): Renamed from this...
16567 (grub_vbe_bios_get_scanline_length): ... to this.
16568 (grub_vbe_set_display_start): Renamed from this...
16569 (grub_vbe_bios_set_display_start): ... to this.
16570 (grub_vbe_get_display_start): Renamed from this...
16571 (grub_vbe_bios_get_display_start): ... to this.
16572 (grub_vbe_set_palette_data): Renamed from this...
16573 (grub_vbe_bios_set_palette_data): ... to this.
16574 (grub_vbe_bios_get_controller_info): Fixed problem with registers
16575 getting corrupted after calling it. Added more pushes and pops.
16576 (grub_vbe_bios_set_mode): Likewise.
16577 (grub_vbe_bios_get_mode): Likewise.
16578 (grub_vbe_bios_get_memory_window): Likewise.
16579 (grub_vbe_bios_set_scanline_length): Likewise.
16580 (grub_vbe_bios_get_scanline_length): Likewise.
16581 (grub_vbe_bios_get_display_start): Likewise.
16582 (grub_vbe_bios_set_palette_data): Likewise.
16583
16584 * normal/cmdline.c (cl_set_pos): Refresh the screen.
16585 (cl_insert): Likewise.
16586 (cl_delete): Likewise.
16587
16588 * term/gfxterm.c: New file.
16589
16590 * term/i386/pc/vesafb.c: Removed file.
16591
16592 * video/video.c: New file.
16593
16594 * video/i386/pc/vbe.c (real2pm): Added new function.
16595 (grub_video_vbe_draw_pixel): Likewise.
16596 (grub_video_vbe_get_video_ptr): Likewise.
16597 (grub_video_vbe_get_pixel): Likewise
16598 (grub_video_vbe_init): Likewise.
16599 (grub_video_vbe_fini): Likewise.
16600 (grub_video_vbe_setup): Likewise.
16601 (grub_video_vbe_get_info): Likewise.
16602 (grub_video_vbe_set_palette): Likewise.
16603 (grub_video_vbe_get_palette): Likewise.
16604 (grub_video_vbe_set_viewport): Likewise.
16605 (grub_video_vbe_get_viewport): Likewise.
16606 (grub_video_vbe_map_color): Likewise.
16607 (grub_video_vbe_map_rgb): Likewise.
16608 (grub_video_vbe_map_rgba): Likewise.
16609 (grub_video_vbe_unmap_color): Likewise.
16610 (grub_video_vbe_fill_rect): Likewise.
16611 (grub_video_vbe_blit_glyph): Likewise.
16612 (grub_video_vbe_blit_bitmap): Likewise.
16613 (grub_video_vbe_blit_render_target): Likewise.
16614 (grub_video_vbe_scroll): Likewise.
16615 (grub_video_vbe_swap_buffers): Likewise.
16616 (grub_video_vbe_create_render_target): Likewise.
16617 (grub_video_vbe_delete_render_target): Likewise.
16618 (grub_video_vbe_set_active_render_target): Likewise.
16619 (grub_vbe_set_pixel_rgb): Remove function.
16620 (grub_vbe_set_pixel_index): Likewise.
16621 (index_color_mode): Remove static variable.
16622 (active_mode): Likewise.
16623 (framebuffer): Likewise.
16624 (bytes_per_scan_line): Likewise.
16625 (grub_video_vbe_adapter): Added new static variable.
16626 (framebuffer): Likewise.
16627 (render_target): Likewise.
16628 (initial_mode): Likewise.
16629 (mode_in_use): Likewise.
16630 (mode_list): Likewise.
16631
5f97350b 166322006-03-10 Marco Gerards <marco@gnu.org>
16633
16634 * configure.ac (AC_INIT): Bumped to 1.93.
16635
16636 * DISTLIST: Added `include/grub/hfs.h'.
16637
a3c5c6f8 166382006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
16639
16640 * boot/i386/pc/boot.S (general_error): Before looping, try INT
16641 18H, which might help the BIOS falling back to next boot media.
16642
6de53d26 166432006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
16644
16645 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
16646 Poe Chen <poe.poechen@gmail.com>.
16647
77c4a393 166482006-01-17 Marco Gerards <marco@gnu.org>
16649
16650 * include/grub/normal.h: Include <grub/script.h>.
16651 (grub_command_list): Removed struct.
16652 (grub_command_list_t): Removed type.
16653 (grub_menu_entry): Remove members `num' and `command_list'. Add
16654 members `commands' and `sourcecode'.
16655 * include/grub/script.h: Add inclusion guards.
16656 (grub_script_cmd_menuentry): New struct.
16657 (grub_script_execute_menuentry): New prototype.
16658 (grub_script_lexer_record_start): Likewise.
16659 (grub_script_lexer_record_stop): Likewise.
16660 * normal/execute.c (grub_script_execute_menuentry): New function.
16661 * normal/lexer.c (record, recording, recordpos, recordlen): New
16662 variables.
16663 (grub_script_lexer_record_start): New function.
16664 (grub_script_lexer_record_stop): Likewise.
16665 (recordchar): Likewise.
16666 (nextchar): Likewise.
16667 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
16668 2048 as the buffer size. Add the tokens `menuentry' and `@'.
16669 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
16670 (current_menu): New variable.
16671 (free_menu): Mainly rewritten.
16672 (grub_normal_menu_addentry): New function.
16673 (read_config_file): Rewritten.
16674 * normal/menu.c (run_menu_entry): Mainly rewritten.
fe987087 16675 * normal/menu_entry.c (make_screen): Rewritten the code to insert
77c4a393 16676 the menu entry.
16677 (run): Mainly rewritten.
16678 * normal/parser.y (menu_entry): New variable.
16679 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
16680 (menuentry): New rule.
16681 (command): Add `menuentry'.
16682 (if_statement): Allow additional returns before `fi'.
16683 * normal/script.c (grub_script_create_cmdmenu): New function.
16684
144f1f98 166852006-01-03 Marco Gerards <marco@gnu.org>
16686
16687 * INSTALL: GNU Bison is required.
16688 * configure.ac: Rewritten the test to detect Bison.
16689 * Makefile.in (YACC): New variable. Reported by Xun Sun
16690 <xun.sun.cn@gmail.com>.
16691
af4b2d89 166922006-01-03 Marco Gerards <marco@gnu.org>
16693
16694 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
16695 the HFS+ filesystem to filesystem blocks.
16696 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
16697 GCC warning is silenced.
16698
15643b71 166992006-01-03 Marco Gerards <marco@gnu.org>
16700
16701 * partmap/apple.c (apple_partition_map_iterate): Convert the data
16702 read from disk from big endian to host byte order.
16703
00905879 167042006-01-03 Hollis Blanchard <hollis@penguinppc.org>
16705
16706 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
16707 documentation.
16708 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
16709 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
16710 embedded HFS+ filesystem.
16711 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
16712 (grub_hfs_sblock): Move from here...
16713 * include/grub/hfs.h: To here... New file.
16714 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
16715 documentation.
16716 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
16717 New macros.
16718 (grub_hfsplus_volheader): Change type of member `magic' to
16719 `grub_uint16_t'.
16720 (grub_hfsplus_data): Add new member `embedded_offset'.
16721 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
16722 returned block.
16723 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
16724 Calculate the offset.
16725
8899bc3e 167262005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
16727
16728 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
16729 Removed.
16730 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
16731
ae8c0277 167322005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
16733
16734 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
16735 ENV->NAME is NULL after allocating ENV->VALUE.
16736
07084456 167372005-12-25 Marco Gerards <marco@gnu.org>
16738
16739 * kern/env.c (grub_env_set): Rewritten the error handling code.
16740
4750f5f1 167412005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
16742
16743 * geninit.sh: Made more robust, and more portable.
16744
50214199 167452005-12-25 Marco Gerards <marco@gnu.org>
16746
16747 Add support for Apple HFS+ filesystems.
f19dbdb7 16748
50214199 16749 * fs/hfsplus.c: New file.
16750
16751 * DISTLIST: Added `fs/hfsplus.c'.
16752
16753 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
16754 (hfsplus_mod_SOURCES): New variable.
16755 (hfsplus_mod_CFLAGS): Likewise.
16756 (hfsplus_mod_LDFLAGS): Likewise.
16757 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
16758 (grub_setup_SOURCES): Likewise.
16759 (grub_mkdevicemap_SOURCES): Likewise.
16760 (grub_emu_SOURCES): Likewise.
16761 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
16762
16763 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
16764
16765 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
16766
befaed6c 167672005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
16768
16769 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
16770 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
16771 include/grub/parser.h, include/grub/script.h, kern/parser.c,
16772 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
16773 normal/lexer.c, normal/parser.y, normal/script.c, and
16774 partmap/gpt.c.
16775 Removed kern/sparc64/cache.c.
16776
16777 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
16778 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
16779 grub_emu_init.c.
16780
16781 * configure.ac (AC_INIT): Bumped to 1.92.
16782
6a124103 167832005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
16784
16785 * kern/err.c (grub_error_push): Added new function to support error
16786 stacks.
16787 (grub_error_pop): Likewise.
16788 (grub_error_stack_items): New local variable to support error stacks.
16789 (grub_error_stack_pos): Likewise.
16790 (grub_error_stack_assert): Likewise.
16791 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
16792 stack depth.
16793 (grub_print_error): Added support to print errors from error stack.
16794
16795 * include/grub/err.h (grub_error_push): Added function prototype.
16796 (grub_error_pop): Likewise.
16797
be973c1b 167982005-12-09 Hollis Blanchard <hollis@penguinppc.org>
16799
16800 * configure.ac: Accept `powerpc64' as host_cpu.
16801 (amd64): Rename to `biarch32'.
16802
16803 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
16804 non-cacheline-aligned addresses.
16805
16806 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
16807 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
16808 if `size' is non-zero.
16809
b04216ab 168102005-12-03 Marco Gerards <mgerards@xs4all.nl>
16811
16812 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
16813 and `cd' to make sure the filename is not prefixed with a
16814 directory name.
16815 (pkgdata_MODULES): Add `gpt.mod'.
16816 (gpt_mod_SOURCES): New variable.
16817 (gpt_mod_CFLAGS): Likewise.
16818 (gpt_mod_LDFLAGS): Likewise.
16819
16820 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
16821
16822 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
16823 New macro.
16824
16825 * partmap/gpt.c: New file.
16826
16827 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
16828 GPT partition map is detected.
16829
41730ed9 168302005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
16831
16832 * commands/i386/pc/play.c: New file.
16833 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
16834 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
16835 macros.
f19dbdb7 16836
95dc3643 168372005-11-27 Marco Gerards <mgerards@xs4all.nl>
16838
16839 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
16840 ((unused))' to silence gcc warning.
16841
1569ec51 168422005-11-26 Hollis Blanchard <hollis@penguinppc.org>
16843
16844 * configure.ac: Correct `AC_PROG_YACC' test.
16845
9abde152 168462005-11-22 Hollis Blanchard <hollis@penguinppc.org>
16847
16848 * util/powerpc/ieee1275/grub-install.in: Run the mount point
16849 check before installing files.
16850
44b83271 168512005-11-22 Mike Small <smallm@panix.com>
16852
16853 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
16854 number regex so multidigit numbers are recognized correctly.
16855
168562005-11-22 Mike Small <smallm@panix.com>
16857
16858 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
16859 debugging message before attempting to claim memory.
16860 (grub_rescue_cmd_initrd): Add a claim debugging message and try
16861 multiple addresses in case of failure.
16862
9c12956b 168632005-11-22 Hollis Blanchard <hollis@penguinppc.org>
16864
16865 * term/tparm.c (get_space): Remove empty `if' statement.
16866
16867 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
16868
16869 * kern/parser.c (check_varstate): Rename `state' to 's'.
16870
aeaf81d9 168712005-11-22 Hollis Blanchard <hollis@penguinppc.org>
16872
16873 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
16874 variable definitions to the beginning of each function. Sort stack
16875 variables by size.
16876 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
16877 `buf' argument to `char *'.
16878
79bbb63f 168792005-11-22 Hollis Blanchard <hollis@penguinppc.org>
16880
16881 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
16882 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 16883 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
79bbb63f 16884 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
16885 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
16886 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
16887 configfile.mod, search.mod, gzio.mod and test.mod.
16888 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
16889 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
16890 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
16891 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
16892 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
16893 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
16894 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
16895 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
16896 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
16897 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
16898 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
16899 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
16900 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
16901 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
16902 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
16903 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
16904 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
16905 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
16906 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
16907 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
16908 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
16909 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
16910 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
16911
16912 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
16913 `grep --include'.
16914 (pkgdata_MODULES): Add test.mod.
16915
233b1628 169162005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
16917
16918 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
16919 appending to variables with "+=".
16920 (PModule): Use full pathname to generate *.lst filenames.
16921
16922 * Makefile.in: Fixed list rules moved from genmk.rb.
16923 (.DELETE_ON_ERROR): New special target.
16924 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
16925
16926 * conf/i386-pc.rmk: Include conf/common.mk.
16927 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 16928 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
233b1628 16929 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
16930 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
16931 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
16932 configfile.mod, search.mod, gzio.mod and test.mod.
16933 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
16934 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
16935 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
16936 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
16937 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
16938 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
16939 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
16940 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
16941 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
16942 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
16943 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
16944 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
16945 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
16946 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
16947 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
16948 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
16949 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
16950 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
16951 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
16952 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
16953 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
16954 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
16955 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
16956 here...
16957 * conf/common.rmk: ... to here. New file.
16958
16959 * conf/common.mk: New file.
16960
16f820c8 169612005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
16962
16963 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
16964 (grub_script.tab.c): ... here.
16965
16966 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
16967 (grub_script.tab.c): ... here.
16968
16969 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
16970 (grub_script.tab.c): ... here.
16971
16972 * normal/command.c (grub_command_find): Fixed a memory leak of
16973 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
16974
63ba1554 169752005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
16976
16977 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
16978 "@" which marks the start of a comment on ARM.
16979 (VARIABLE): Likewise.
16980
7f67dc13 169812005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
16982
79bbb63f 16983 Add support for Linux/ADFS partition tables.
7f67dc13 16984
16985 * partmap/acorn.c: New file.
16986
16987 * include/grub/acorn_filecore.h: Likewise.
16988
16989 * DISTLIST: Added `partmap/acorn.c' and
16990 `include/grub/acorn_filecore.h'.
f19dbdb7 16991
7f67dc13 16992 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16993 `partmap/acorn.c'.
16994 (pkgdata_MODULES): Add `acorn.mod'.
16995 (acorn_mod_SOURCES): New variable.
16996 (acorn_mod_CFLAGS): Likewise.
16997
16998 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
16999 `partmap/acorn.c'.
17000 (pkgdata_MODULES): Add `acorn.mod'.
17001 (acorn_mod_SOURCES): New variable.
17002 (acorn_mod_CFLAGS): Likewise.
17003
17004 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
17005 (pkgdata_MODULES): Add `acorn.mod'.
17006 (acorn_mod_SOURCES): New variable.
17007 (acorn_mod_CFLAGS): Likewise.
17008 (acorn_mod_LDFLAGS): Likewise.
17009
17010 * include/types.h (grub_disk_addr_t): New typedef.
17011
6d099807 170122005-11-13 Marco Gerards <mgerards@xs4all.nl>
17013
17014 * geninit.sh: New file.
17015
17016 * geninitheader.sh: Likewise.
17017
17018 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
17019 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
17020 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
17021 * commands/configfile.c (grub_configfile_init)
17022 (grub_configfile_fini): Likewise.
17023 * commands/default.c (grub_default_init, grub_default_fini):
17024 Likewise.
17025 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
17026 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
17027 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
17028 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
17029 Likewise.
17030 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
17031 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
17032 Likewise.
17033 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
fe6b695a 17034 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
6d099807 17035 Likewise.
17036 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
17037 Likewise.
fe6b695a 17038 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
6d099807 17039 Likewise.
17040 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
17041 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
17042 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
17043 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
17044 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
17045 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
17046 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
17047 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
17048 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
17049 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
17050 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
17051 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
17052 * partmap/amiga.c (grub_amiga_partition_map_init)
17053 (grub_amiga_partition_map_fini): Likewise.
17054 * partmap/apple.c (grub_apple_partition_map_init)
17055 (grub_apple_partition_map_fini): Likewise.
17056 * partmap/pc.c (grub_pc_partition_map_init)
17057 (grub_pc_partition_map_fini): Likewise.
17058 * partmap/sun.c (grub_sun_partition_map_init,
17059 grub_sun_partition_map_fini): Likewise.
17060 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
17061 Likewise.
17062
17063 * util/grub-emu.c: Include <grub_modules_init.h>.
17064 (main): Don't initialize and de-initialize any modules directly,
17065 use `grub_init_all' and `grub_fini_all' instead.
17066
17067 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
17068 `grub_vesafb_mod_init'.
17069 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
17070 all users.
17071 * term/i386/pc/vga.c (grub_vga_init): Renamed to
17072 `grub_vga_mod_init'. Updated all users.
17073 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
f19dbdb7 17074
6d099807 17075 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
17076 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
17077 rules.
17078
17079 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
17080 Generate a function to initialize the module in utilities.
17081 Updated all callers.
17082 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
17083 initialize the module in utilities. Updated all callers.
17084
9046bcf0 170852005-11-09 Hollis Blanchard <hollis@penguinppc.org>
17086
17087 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
17088 escape sequence and a literal ^L to clear the screen.
17089
17090 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
17091 when returning from Open Firmware.
17092
d13ea639 170932005-11-09 Hollis Blanchard <hollis@penguinppc.org>
17094
17095 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
17096 (grub_ofconsole_height): Likewise.
17097 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
17098 manually insert a '\n'.
17099 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
17100 `grub_ofconsole_height'. Return early if these are already set.
17101
a8fcf206 171022005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
17103
17104 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
17105 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
17106 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
17107 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
17108 and `normal/script.c'.
17109 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
17110 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
17111 (test_mod_SOURCES): New variable.
17112 (test_mod_CFLAGS): Likewise.
17113 (test_mod_LDFLAGS): Likewise.
17114 (pkgdata_MODULES): Add `test.mod'.
17115 (grub_script.tab.c): New rule.
17116 (grub_script.tab.h): Likewise.
17117
b6b32745 171182005-11-07 Marco Gerards <mgerards@xs4all.nl>
17119
17120 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
17121 `commands/test.c', `normal/execute.c', `normal/lexer.c',
17122 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
17123 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
17124 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
17125 (test_mod_SOURCES): New variable.
17126 (test_mod_CFLAGS): Likewise.
17127 (pkgdata_MODULES): Add `test.mod'.
17128 (grub_script.tab.c): New rule.
17129 (grub_script.tab.h): Likewise.
17130
daac212a 171312005-11-06 Marco Gerards <mgerards@xs4all.nl>
17132
17133 Add initial scripting support.
17134
17135 * commands/test.c: New file.
17136 * include/grub/script.h: Likewise.
17137 * normal/execute.c: Likewise.
17138 * normal/function.c: Likewise.
17139 * normal/lexer.c: Likewise.
17140 * normal/parser.y: Likewise.
17141 * normal/script.c: Likewise.
17142
17143 * configure.ac: Add `AC_PROG_YACC' test.
f19dbdb7 17144
daac212a 17145 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
17146 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
17147 `normal/function.c' and `normal/script.c'.
17148 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
17149 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
b6b32745 17150 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
17151 variables.
daac212a 17152 (pkgdata_MODULES): Add `test.mod'.
17153 (grub_script.tab.c): New rule.
17154 (grub_script.tab.h): Likewise.
17155
17156 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
17157
17158 * include/grub/normal.h (grub_test_init): New prototype.
17159 (grub_test_fini): Likewise.
f19dbdb7 17160
daac212a 17161 * normal/command.c: Include <grub/script.h>.
17162 (grub_command_execute): Rewritten.
f19dbdb7 17163
daac212a 17164 * util/grub-emu.c (main): Call `grub_test_init' and
17165 `grub_test_fini'.
17166
77500b2b 171672005-11-03 Hollis Blanchard <hollis@penguinppc.org>
17168
17169 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
17170 to 0.
17171 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
17172 there are no pending characters.
17173
e45deb9e 171742005-11-03 Hollis Blanchard <hollis@penguinppc.org>
17175
17176 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
17177 `grub_strndup' to drop device arguments. Replace unnecessary
17178 `grub_strndup' with `grub_strdup'.
17179
4ce32619 171802005-11-03 Hollis Blanchard <hollis@penguinppc.org>
17181
17182 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
17183 `debug' environment variable has been set.
17184
171852005-11-02 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 17186
4ce32619 17187 * Makefile.in (install-local): Use $(DATA).
17188 (uninstall): Likewise.
17189 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
17190 (sbin_UTILITIES): ... to here.
17191 (sbin_SCRIPTS): New variable.
17192 (grub_install_SOURCES): New variable.
17193 * util/powerpc/ieee1275/grub-install.in: New file.
17194 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
17195 variable.
17196 (add_segments): Call `grub_util_get_path'.
17197
25fe6f03 171982005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
17199
17200 From Timothy Baldwin:
17201 * commands/ls.c (grub_ls_list_files): Close FILE with
17202 grub_file_close.
17203 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
17204
04ccf3ec 172052005-10-24 Marco Gerards <mgerards@xs4all.nl>
17206
17207 * include/grub/parser.h: New file.
17208
17209 * kern/parser.c: Likewise.
17210
17211 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
17212 (grub_setup_SOURCES): Likewise.
17213 (grub_probefs_SOURCES): Likewise.
17214 (grub_emu_SOURCES): Likewise.
17215 (kernel_img_HEADERS): Add `parser.h'.
17216
17217 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
17218 (grub_emu_SOURCES): Add `kern/parser.c'.
17219 (grubof_SOURCES): Likewise.
17220
17221 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
17222 (grubof_SOURCES): Add `kern/parser.c'.
17223
17224 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
17225
17226 * kern/misc.c (grub_split_cmdline): Removed function.
17227
17228 * kern/rescue.c: Include <grub/parser.h>.
17229 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
17230 of `grub_split_cmdline'.
17231
17232 * normal/command.c: Include <grub/parser.h>.
17233 (grub_command_execute): Use `grub_parser_split_cmdline' instead
17234 of `grub_split_cmdline'.
17235
17236 * normal/completion.c: Include <grub/parser.h>.
17237 (cmdline_state): New variable.
17238 (iterate_dir): End the filename with a quote depending on the
17239 command line state.
17240 (get_state): new function.
17241 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
17242 split the arguments and determine the current argument. When the
17243 argument string is not quoted, escape all spaces.
17244
6d8f4b0e 172452005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
17246
17247 * normal/sparc64/setjmp.S: New file.
17248
15cf03ed 172492005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
17250
17251 * include/grub/sparc64/libgcc.h: New file.
17252 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
17253 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
17254 normal/sparc64/setjmp.c.
17255
03e8661a 172562005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
17257
17258 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
17259 * kern/sparc64/cache.S: New file.
17260 * kern/sparc64/cache.c: Removed.
17261 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
17262 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
17263 -mtune=ultrasparc.
17264 (COMMON_LDFLAGS): Add -melf64_sparc.
17265 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
17266 (grubof_SOURCES): Use cache.S instead of cache.c.
17267 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
17268 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
17269 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
17270 commented though.
17271 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
17272 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
17273 (linux_mod_CFLAGS): Commented out.
17274 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
17275 out because module isn't built.
17276 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
17277 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
17278 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
17279 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
17280 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
17281 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
17282 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
17283 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
17284 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
17285 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
17286 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
17287 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
17288 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
17289 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
17290
34eeec8a 172912005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
17292
17293 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
17294 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
17295 longer, because HFS should not be used on PC.
17296
708367a3 172972005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
17298
17299 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
17300 consistently within the loop.
17301
6fa1251a 173022005-10-15 Marco Gerards <mgerards@xs4all.nl>
17303
17304 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
17305 directory can not be read.
17306
4801580b 173072005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
17308
17309 * configure.ac (AC_INIT): Increase the version number to 1.91.
17310
17311 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
17312 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
17313 term/i386/pc/serial.c.
17314
219ad426 173152005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
17316
17317 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
17318 file size must be permitted.
17319
17320 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
17321 between %ah and %al.
17322
688e5699 173232005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
17324
17325 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
17326 grub_uint64_t.
17327 Call the hook with a NUL-terminated filename.
17328 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
17329 grub_cpu_to_be32.
17330
17331 * kern/term.c (cursor_state): New variable.
17332 (grub_term_set_current): Reset the cursor state on a new
17333 terminal.
17334 (grub_setcursor): Rewritten to use CURSOR_STATE.
17335 (grub_getcursor): New function.
17336
17337 * include/grub/term.h (grub_getcursor): New prototype.
17338
17339 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
17340 integers on ARM. Reported by Timothy Baldwin
17341 <T.E.Baldwin99@members.leeds.ac.uk>.
17342
bb34586c 173432005-10-11 Marco Gerards <mgerards@xs4all.nl>
17344
17345 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
17346 allocated.
17347 (grub_sfs_dir): Likewise.
17348
9a909877 173492005-10-09 Marco Gerards <mgerards@xs4all.nl>
17350
17351 Add support for the SFS filesystem.
17352
17353 * fs/sfs.c: New file.
17354
17355 * DISTLIST: Added `fs/sfs.c'.
17356
17357 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
17358 (grub_probefs_SOURCES): Likewise.
17359 (grub_emu_SOURCES): Likewise.
17360 (pkgdata_MODULES): Add `sfs.mod'.
17361 (sfs_mod_SOURCES): New variable.
17362 (sfs_mod_CFLAGS): Likewise.
17363 (sfs_mod_LDFLAGS): Likewise.
17364
17365 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
17366 (pkgdata_MODULES): Add `sfs.mod'.
17367 (sfs_mod_SOURCES): New variable.
17368 (sfs_mod_CFLAGS): Likewise.
17369
17370 * util/grub-emu.c (main): Call `grub_sfs_init' and
17371 `grub_sfs_fini'.
17372
17373 * include/grub/fs.h (grub_sfs_init): New prototype.
17374 (grub_sfs_fini): Likewise.
17375
57bdbde3 173762005-10-07 Marco Gerards <mgerards@xs4all.nl>
17377
17378 Add support for the AFFS filesystem.
17379
17380 * fs/affs.c: New file.
17381
17382 * DISTLIST: Added `fs/affs.c'.
17383
17384 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
17385 (grub_probefs_SOURCES): Likewise.
17386 (grub_emu_SOURCES): Likewise.
17387 (pkgdata_MODULES): Add `affs.mod'.
17388 (affs_mod_SOURCES): New variable.
17389 (affs_mod_CFLAGS): Likewise.
17390 (affs_mod_LDFLAGS): Likewise.
17391
17392 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
17393 (pkgdata_MODULES): Add `affs.mod'.
17394 (affs_mod_SOURCES): New variable.
17395 (affs_mod_CFLAGS): Likewise.
17396
17397 * util/grub-emu.c (main): Call `grub_affs_init' and
17398 `grub_affs_fini'.
17399
17400 * include/grub/fs.h (grub_affs_init): New prototype.
17401 (grub_affs_fini): Likewise.
17402
047b67e0 174032005-10-01 Marco Gerards <mgerards@xs4all.nl>
17404
17405 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
17406
59b8208a 174072005-10-01 Marco Gerards <mgerards@xs4all.nl>
17408
17409 * configure.ac: Accept `x86_64' as host_cpu. In that case add
17410 `-m32' to CFLAGS.
17411
17412 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
17413 linking.
f19dbdb7 17414
59b8208a 17415 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
17416 (COMMON_LDFLAGS): New variable.
17417 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
17418 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
17419 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
17420 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
17421 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
17422 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
17423 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
17424 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
17425 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
17426 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
17427 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
17428 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
17429 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
17430 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
17431 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
17432 variables.
17433 (normal_mod_ASFLAGS): Add `-m32'.
17434
17435 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
17436 (grub_host_size_t, grub_host_ssize_t): New types.
17437 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
fe6b695a 17438 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
59b8208a 17439 `GRUB_HOST_SIZEOF_VOID_P'.
17440
17441 * include/grub/kernel.h (struct grub_module_header): Type of
17442 member offset changed to `grub_host_off_t'. Type of member size
17443 changed to `grub_host_size_t'.
17444 (struct grub_module_info): Type of member offset changed to
17445 `grub_host_off_t'. Type of member size changed to
17446 `grub_host_size_t'.
17447
b4093103 174482005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
17449
17450 Make GRUB's kernel compliant to Multiboot Specification.
f19dbdb7 17451
b4093103 17452 * kern/i386/pc/startup.S (multiboot_header): New label.
17453 (multiboot_entry): Likewise.
17454 (multiboot_trampoline): Likewise.
17455
17456 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
17457 Increased to 0x4A0.
17458
17459 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
17460 put parentheses after a question mark.
17461 [!GRUB_UTIL] (my_mod): New variable.
17462
17463 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
17464
b2499b29 174652005-09-28 Marco Gerards <mgerards@xs4all.nl>
17466
17467 Adds support for the XFS filesystem. Btrees are not supported
17468 yet.
17469
17470 * fs/xfs.c: New file.
17471
17472 * DISTLIST: Added `fs/xfs.c'.
17473
17474 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
17475 (grub_probefs_SOURCES): Likewise.
17476 (grub_emu_SOURCES): Likewise.
17477 (pkgdata_MODULES): Add `xfs.mod'.
17478 (xfs_mod_SOURCES): New variable.
17479 (xfs_mod_CFLAGS): Likewise.
17480
17481 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
17482 (pkgdata_MODULES): Add `xfs.mod'.
17483 (xfs_mod_SOURCES): New variable.
17484 (xfs_mod_CFLAGS): Likewise.
17485
17486 * util/grub-emu.c (main): Call `grub_xfs_init' and
17487 `grub_xfs_fini'.
17488
17489 * include/grub/fs.h (grub_xfs_init): New prototype.
17490 (grub_xfs_fini): Likewise.
17491
f19dbdb7 17492
83d37a62 174932005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
17494
17495 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
17496 color modes, allow greater than 16 colors to be configured as
17497 a default palette.
17498
47d2d65e 174992005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
17500
17501 * normal/completion.c (complete_arguments): Add the qualifier
17502 const into OPTIONS.
17503
17504 From Omniflux <omniflux+lists@omniflux.com>:
17505 * include/grub/terminfo.h: New file.
17506 * include/grub/tparm.h: Likewise.
17507 * include/grub/i386/pc/serial.h: Likewise.
17508 * term/terminfo.c: Likewise.
17509 * term/tparm.c: Likewise.
17510 * term/i386/pc/serial.c: Likewise.
17511 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
17512 serial.mod.
17513 (terminfo_mod_SOURCES): New variable.
17514 (terminfo_mod_CFLAGS): Likewise.
17515 (serial_mod_SOURCES): Likewise.
17516 (serial_mod_CFLAGS): Likewise.
17517
48b671ff 175182005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
17519
17520 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
17521 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
17522 and kern/powerpc/ieee1275/cmain.c, respectively.
17523
17524 * boot/powerpc/ieee1275/crt0.S: Moved to ...
17525 * kern/powerpc/ieee1275/crt0.S: ... here.
17526
17527 * boot/powerpc/ieee1275/cmain.c: Moved to ...
17528 * kern/powerpc/ieee1275/cmain.c: ... here.
f19dbdb7 17529
48b671ff 17530 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
17531 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
17532 instead of boot/powerpc/ieee1275/crt0.S and
17533 boot/powerpc/ieee1275/cmain.c, respectively.
17534
17535 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
17536 sectors. It was not used anyway.
17537
09fc77a7 175382005-08-30 Hollis Blanchard <hollis@penguinppc.org>
17539
17540 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
17541 `unused parameter' warning.
17542
003789c7 175432005-08-30 Hollis Blanchard <hollis@penguinppc.org>
17544
17545 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
17546 function.
17547 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
17548 getcharwidth.
17549
67f44c86 175502005-08-28 Marco Gerards <metgerards@student.han.nl>
17551
17552 * include/grub/normal.h (enum grub_completion_type): Added
17553 `GRUB_COMPLETION_TYPE_ARGUMENT'.
17554
17555 * normal/cmdline.c (print_completion): Handle
17556 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
17557 * normal/menu_entry.c (store_completion): Likewise.
17558
17559 * normal/completion.c (complete_arguments): New function.
17560 (grub_normal_do_completion): Call `complete_arguments' when the
17561 current words start with a dash.
17562
0b5abe02 175632005-08-27 Marco Gerards <metgerards@student.han.nl>
17564
17565 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
17566 `gzio.mod' instead of `io.mod').
17567
d9864ee1 175682005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
17569
17570 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
17571 (DISTDIRS): Added io and video.
17572 Rewrite the search routine to make an output consistently.
17573
17574 * DISTLIST: Added conf/sparc64-ieee1275.mk,
17575 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
17576 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
17577 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
17578 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
17579 util/powerpc/ieee1275/misc.c.
f19dbdb7 17580
d9864ee1 17581 * include/grub/gzio.h: New file.
17582 * io/gzio.c: Likewise.
f19dbdb7 17583
d9864ee1 17584 * kern/file.c (grub_file_close): Call grub_device_close only if
17585 FILE->DEVICE is not NULL.
17586
17587 * include/grub/mm.h [!NULL] (NULL): New macro.
17588
17589 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
17590
17591 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
17592 (pkgdata_MODULES): Added gzio.mod.
17593 (gzio_mod_SOURCES): New variable.
17594 (gzio_mod_CFLAGS): Likewise.
17595
17596 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
17597 (pkgdata_MODULES): Added gzio.mod.
17598 (gzio_mod_SOURCES): New variable.
17599 (gzio_mod_CFLAGS): Likewise.
17600
17601 * commands/cat.c: Include grub/gzio.h.
17602 (grub_cmd_cat): Use grub_gzfile_open instead of
17603 grub_file_open.
f19dbdb7 17604
d9864ee1 17605 * commands/cmp.c: Include grub/gzio.h.
17606 (grub_cmd_cmp): Use grub_gzfile_open instead of
17607 grub_file_open.
17608
17609 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
17610 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
17611 grub_file_open.
17612 (grub_rescue_cmd_module): Likewise.
17613
fa46f4b5 176142005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
17615
17616 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
17617 kern/sparc64/ieee1275/init.c because it contains _start.
17618 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
17619
e9211b5d 176202005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
17621
17622 * configure.ac: Add support for sparc64 host with ieee1275
17623 firmware.
17624 * configure: Generated from configure.ac.
17625 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
17626 instead of int.
17627 (grub_ofdisk_read): Likewise.
17628 (grub_ofdisk_open): Use %p to print pointer values, and cast the
17629 pointers as (void *) to remove a warning.
17630 (grub_ofdisk_close): Likewise.
17631 (grub_ofdisk_read): Likewise.
17632 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
17633 returns, so make it return void to remove a warning.
17634 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
17635 Corresponding prototype change.
17636 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
17637 values, and cast the pointers as (void *) to remove a warning.
17638 (grub_mm_dump): Likewise.
17639 * conf/sparc64-ieee1275.mk: New file.
17640 * conf/sparc64-ieee1275.rmk: Likewise.
17641 * include/grub/sparc64/setjmp.h: Likewise.
17642 * include/grub/sparc64/types.h: Likewise.
17643 * include/grub/sparc64/ieee1275/console.h: Likewise.
17644 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
17645 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
17646 * include/grub/sparc64/ieee1275/time.h: Likewise.
17647 * kern/sparc64/cache.c: Likewise.
17648 * kern/sparc64/dl.c: Likewise.
17649 * kern/sparc64/ieee1275/init.c: Likewise.
17650 * kern/sparc64/ieee1275/openfw.c: Likewise.
17651
385c6a92 176522005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
17653
17654 * util/console.c (grub_ncurses_putchar): If C is greater than
17655 0x7f, set C to a question mark.
17656 (grub_ncurses_getcharwidth): New function.
17657 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
17658 getcharwidth.
17659
17660 * normal/menu.c (print_entry): Made aware of Unicode. First,
17661 convert TITLE to UCS-4, and predict the cursor position by
17662 grub_getcharwidth.
17663
17664 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
17665 const to SRC.
17666 * kern/misc.c (grub_utf16_to_utf8): Likewise.
17667
16ccb8b1 176682005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
17669
17670 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
17671 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
17672 grub_strcat.
17673
17674 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
17675 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
17676 grub_strcpy and grub_strlen. Take it into account that a space
17677 character is inserted as a delimiter.
17678
6a85ce79 176792005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
17680
17681 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
fe6b695a 17682 invalid magic in the error.
6a85ce79 17683
17684 * commands/search.c: New file.
f19dbdb7 17685
6a85ce79 17686 * util/grub-emu.c (main): Call grub_search_init and
17687 grub_search_fini.
17688
17689 * kern/rescue.c (grub_rescue_print_disks): Removed.
17690 (grub_rescue_print_devices): New function.
17691 (grub_rescue_cmd_ls): Use grub_device_iterate with
17692 grub_rescue_print_devices instead of grub_disk_dev_iterate with
17693 grub_rescue_print_disks.
17694
17695 * kern/partition.c (grub_partition_iterate): Return the result of
17696 PARTMAP->ITERATE instead of GRUB_ERRNO.
17697
17698 * kern/device.c: Include grub/partition.h.
17699 (grub_device_iterate): New function.
17700
17701 * include/grub/partition.h (grub_partition_iterate): Return int
17702 instead of grub_err_t.
17703
17704 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
17705 prototype.
17706 [GRUB_UTIL] (grub_search_fini): Likewise.
17707
17708 * include/grub/device.h (grub_device_iterate): New prototype.
17709
17710 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
17711 commands/search.c.
17712 (pkgdata_MODULES): Added search.mod.
17713 (search_mod_SOURCES): New variable.
17714 (search_mod_CFLAGS): Likewise.
17715
17716 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
17717 (pkgdata_MODULES): Added search.mod.
17718 (search_mod_SOURCES): New variable.
17719 (search_mod_CFLAGS): Likewise.
17720
17721 * commands/ls.c (grub_ls_list_disks): Renamed to ...
17722 (grub_ls_list_devices): ... this, and use grub_device_iterate.
17723 All callers changed.
17724
17725 * DISTLIST: Added commands/search.c.
17726
ef095434 177272005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
17728
17729 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
17730 conversion.
17731 (grub_getcharwidth): New function.
17732
17733 * kern/misc.c (grub_utf8_to_ucs4): New function.
17734
17735 * include/grub/term.h (struct grub_term): Added a new member
17736 "getcharwidth".
17737 (grub_getcharwidth): New prototype.
17738
17739 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
17740
17741 * term/i386/pc/console.c (map_char): New function. Segregated from
17742 grub_console_putchar.
17743 (grub_console_putchar): Use map_char.
17744 (grub_console_getcharwidth): New function.
17745 (grub_console_term): Specified grub_console_getcharwidth as
17746 getcharwidth.
17747
17748 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
17749 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
17750
17751 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
17752 GRUB_ERRNO.
17753 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
17754 on grub_strtoul completely.
17755 (write_char): Declare local variables in the beginning of the
17756 function.
17757 (grub_vesafb_getcharwidth): New function.
17758 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
17759 getcharwidth.
17760
1f0a95e4 177612005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
17762
17763 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
17764 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
17765 commands/i386/pc/vbetest.c.
17766
17767 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
17768 call grub_vbe_get_controller_info again, because the returned
17769 information is volatile.
17770 (grub_vbe_set_video_mode): Mostly rewritten.
17771 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
17772 grub_vbe_status_t correctly.
17773 (grub_vbe_get_video_mode_info): Likewise.
17774 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
17775 several if statements.
17776
17777 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
17778 * commands/i386/pc/vbeinfo.c: ... this.
17779
17780 * commands/i386/pc/vbe_test.c: Renamed to ...
17781 * commands/i386/pc/vbetest.c: ... this.
17782
17783 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
17784 ...
17785 (grub_cmd_vbeinfo): ... this. Save video modes before
17786 iterating. Skip a video mode, if it is not available, not enough
17787 information is given or it is monochrome. Show the memory
17788 model. Leave the interpretation of MODEVAR to grub_strtoul
17789 completely.
17790 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
17791 (GRUB_MOD_FINI): Likewise.
17792
17793 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
17794 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
17795 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
17796 duplicated grub_env_get. Leave the interpretation of MODEVAR to
17797 grub_strtoul completely.
17798 (real2pm): Removed.
17799 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
17800 (GRUB_MOD_FINI): Likewise.
17801
17802 * normal/misc.c: Include grub/mm.h.
17803
17804 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
17805 vbe_list_modes with vbetest.mod and vbeinfo.mod.
17806 (vbe_list_modes_mod_SOURCES): Removed.
17807 (vbe_list_modes_mod_CFLAGS): Likewise.
17808 (vbe_test_mod_SOURCES): Likewise.
17809 (vbe_test_mod_CFLAGS): Likewise.
17810 (vbeinfo_mod_SOURCES): New variable.
17811 (vbeinfo_mod_CFLAGS): Likewise.
17812 (vbetest_mod_SOURCES): Likewise.
17813 (vbetest_mod_CFLAGS): Likewise.
17814
992ffbbe 178152005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
17816
17817 * normal/misc.c: New file.
17818
17819 * DISTLIST: Added normal/misc.c.
f19dbdb7 17820
992ffbbe 17821 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
17822 DISK to HOOK. Call HOOK with DISK.
17823 * partmap/apple.c (apple_partition_map_iterate): Likewise.
17824 * partmap/pc.c (pc_partition_map_iterate): Likewise.
17825 * partmap/sun.c (sun_partition_map_iterate): Likewise.
17826
17827 * normal/menu_entry.c (struct screen): Added a new member
17828 "completion_shown".
17829 (completion_buffer): New global variable.
17830 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
17831 (store_completion): New function.
17832 (complete): Likewise.
17833 (clear_completions): Likewise.
17834 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
17835 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
17836 a tab, call complete.
17837
17838 * normal/completion.c (disk_dev): Removed.
17839 (print_simple_completion): Likewise.
17840 (print_partition_completion): Likewise.
17841 (print_func): New global variable.
17842 (add_completion): Do not take the arguments WHAT or PRINT any
17843 longer. Added a new argument TYPE. Instead of printing directly,
17844 call PRINT_FUNC if not NULL.
17845 All callers changed.
17846 (complete_device): Use a local variable DEV instead of
17847 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
17848 (grub_normal_do_completion): Take a new argument HOOK. Do not
17849 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
17850 empty string, return NULL instead.
17851 All callers changed.
17852
17853 * normal/cmdline.c (print_completion): New function.
17854
17855 * kern/partition.c (grub_partition_iterate): Add an argument DISK
17856 to HOOK.
17857 All callers changed.
17858
17859 * kern/disk.c (grub_print_partinfo): Removed.
17860
17861 * include/grub/partition.h (struct grub_partition_map): Add a new
17862 argument DISK into HOOK of ITERATE.
17863 (grub_partition_iterate): Add a new argument DISK to HOOK.
17864
17865 * include/grub/normal.h (enum grub_completion_type): New enum.
17866 (grub_completion_type_t): New type.
17867 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
17868 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
17869 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
17870 (GRUB_COMPLETION_TYPE_FILE): Likewise.
17871 (grub_normal_do_completion): Added a new argument HOOK.
17872 (grub_normal_print_device_info): New prototype.
17873
17874 * include/grub/disk.h (grub_print_partinfo): Removed.
17875
17876 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
17877 (normal_mod_SOURCES): Likewise.
17878 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
17879 (normal_mod_SOURCES): Likewise.
17880
17881 * commands/ls.c (grub_ls_list_disks): Use
17882 grub_normal_print_device_info instead of grub_print_partinfo. Free
17883 PNAME.
17884 (grub_ls_list_files): Use grub_normal_print_device_info instead of
17885 duplicating the code.
17886
0bd41162 178872005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
17888
17889 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
f19dbdb7 17890 follow GCS more precisely.
17891 * commands/i386/pc/vbe_test.c: Likewise.
17892 * include/grub/i386/pc/vbe.h: Likewise.
17893 * term/i386/pc/vesafb.c: Likewise.
17894 * video/i386/pc/vbe.c: Likewise.
0bd41162 17895
6323696a 178962005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
17897
17898 * DISTLIST: Added term/i386/pc/vesafb.c
17899 DISTLIST: Added video/i386/pc/vbe.c
17900 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
17901 DISTLIST: Added commands/i386/pc/vbe_test.c.
17902 * commands/i386/pc/vbe_list_modes.c: New file.
17903 * commands/i386/pc/vbe_test.c: Likewise.
17904 * term/i386/pc/vesafb.c: Likewise.
17905 * video/i386/pc/vbe.c: Likewise.
17906 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
17907 (grub_vbe_probe) Added prototype.
17908 (grub_vbe_set_video_mode) Likewise.
17909 (grub_vbe_get_video_mode) Likewise.
17910 (grub_vbe_get_video_mode_info) Likewise.
17911 (grub_vbe_set_pixel_rgb) Likewise.
17912 (grub_vbe_set_pixel_index) Likewise.
17913 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
17914 (pkgdata_MODULES): Added vesafb.mod.
17915 (pkgdata_MODULES): Added vbe_list_modes.mod.
17916 (pkgdata_MODULES): Added vbe_test.mod.
17917 (vbe_mod_SOURCES): Added.
17918 (vbe_mod_CFLAGS): Likewise.
17919 (vesafb_mod_SOURCES): Likewise.
17920 (vesafb_mod_CFLAGS): Likewise.
17921 (vbe_list_modes_mod_SOURCES): Likewise.
17922 (vbe_list_modes_mod_CFLAGS): Likewise.
17923 (vbe_test_mod_SOURCES): Likewise.
17924 (vbe_test_mod_CFLAGS): Likewise.
17925
0a74e62f 179262005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
17927
0a74e62f 17928 * normal/command.c (grub_command_execute): If INTERACTIVE is
17929 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
17930 CMDLINE. Disable the pager if INTERACTIVE is true.
17931 All callers are changed.
17932
17933 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
17934 before reading a config file.
17935 * normal/main.c (read_config_file): Even if a command is not
17936 found, register it if it is within an entry.
17937
17938 * util/grub-emu.c: Include sys/types.h and unistd.h.
17939 (options): Added --hold.
17940 (struct arguments): Added a new member "hold".
17941 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
17942 missing.
17943 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
17944 cleared by a debugger, if it is not zero.
17945
17946 * include/grub/normal.h (grub_command_execute): Add an argument
17947 INTERACTIVE.
17948
e51f85ae 179492005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
17950
17951 * DISTLIST: Added include/grub/i386/pc/vbe.h.
17952
e9c6f39b 179532005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
17954
17955 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
17956 program with another one, because the old one didn't detect a bug
17957 in gcc-3.4. Always use regparm 2, because the new test is still
17958 not enough for gcc-4.0. Someone must investigate a simple test
17959 case which detects a bug in gcc-4.0.
17960
8de3495c 179612005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
17962
17963 * DISTLIST: Added normal/completion.c.
17964
17965 * normal/completion.c: New file.
f19dbdb7 17966
8de3495c 17967 * term/i386/pc/console.c (grub_console_getwh): New function.
17968 (grub_console_term): Assign grub_console_getwh to getwh.
17969
17970 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
17971 function is defined in normal/completion.c as
17972 grub_normal_do_completion.
17973 (grub_cmdline_get): Use grub_normal_do_completion instead of
17974 grub_tab_complete.
17975
17976 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
17977 returns non-zero, otherwise return 0.
17978 (grub_partition_iterate): First, probe the partition map. Then,
17979 call ITERATE only for this partition map.
17980
17981 * kern/misc.c (grub_strncmp): Rewritten.
17982
17983 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
17984 returns non-zero. Otherwise return 0.
17985
17986 * include/grub/partition.h (grub_partition_map_iterate): Return
17987 int instead of void.
17988
17989 * include/grub/normal.h (grub_normal_do_completion): New prototype.
17990
17991 * include/grub/misc.h (grub_strncmp): Change the type of N to
17992 grub_size_t.
17993
17994 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
17995 of void.
17996
17997 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
fe6b695a 17998 unsigned explicitly before comparing it with I.
8de3495c 17999
18000 * kern/main.c (grub_env_write_root): Add the attribute unused into
18001 VAR.
18002
18003 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
18004 normal/completion.c.
18005 (normal_mod_SOURCES): Likewise.
18006 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
18007 (normal_mod_SOURCES): Likewise.
18008
18009 * normal/command.c (grub_iterate_commands): If ITERATE returns
18010 non-zero, return one immediately.
18011
e85e144b 180122005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
18013
18014 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
18015 * kern/i386/pc/startup.S: Updated Global Descriptor table's
18016 descriptions.
18017 (grub_vbe_get_controller_info): New function.
18018 (grub_vbe_get_mode_info): Likewise.
18019 (grub_vbe_set_mode): Likewise.
18020 (grub_vbe_get_mode): Likewise.
18021 (grub_vbe_set_memory_window): Likewise.
18022 (grub_vbe_get_memory_window): Likewise.
18023 (grub_vbe_set_scanline_length): Likewise.
18024 (grub_vbe_get_scanline_length): Likewise.
18025 (grub_vbe_set_display_start): Likewise.
18026 (grub_vbe_get_display_start): Likewise.
18027 (grub_vbe_set_palette_data): Likewise.
18028 * include/grub/i386/pc/vbe.h: New file.
18029
c46153d2 180302005-08-08 Hollis Blanchard <hollis@penguinppc.org>
18031
18032 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
18033 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
18034 * DISTLIST: Likewise.
18035 * kern/ieee1275/of.c: Moved to ...
18036 * kern/ieee1275/ieee1275.c: ... here.
18037
0cb90c45 180382005-08-08 Hollis Blanchard <hollis@penguinppc.org>
18039
18040 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
18041 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
18042 Pass 0 as `end' parameter to grub_strtoul().
18043
a19fb360 180442005-08-08 Hollis Blanchard <hollis@penguinppc.org>
18045
18046 * include/grub/powerpc/ieee1275/console.h: Do not include
18047 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
18048 ifdef.
18049 (grub_console_cur_color): Remove i386-specific prototype.
18050 (grub_console_real_putchar): Likewise.
18051 (grub_console_checkkey): Likewise.
18052 (grub_console_getkey): Likewise.
18053 (grub_console_getxy): Likewise.
18054 (grub_console_gotoxy): Likewise.
18055 (grub_console_cls): Likewise.
18056 (grub_console_setcursor): Likewise.
18057 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
18058 Include <grub/machine/console.h>.
18059 * term/ieee1275/ofconsole.c: Likewise.
18060
4ac9bd04 180612005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
18062
18063 * Makefile.in (LIBLZO): New variable.
18064
18065 * configure.ac: Check for LZO version 2.
18066
18067 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
18068 lzo/lzo1x.h instead of lzo1x.h.
18069
18070 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
18071 of -llzo.
18072
18073 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
18074 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
18075
18076 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
18077 copying the data from PARTITION to P.
18078
f4917dfd 180792005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
18080
18081 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
18082 negative, unload the module.
18083
18084 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
18085 map is "pc_partition_map" but not "pc".
18086 (usage): Fix the description. The options are --boot-image and
18087 --core-image but not --boot-file or --core-file.
18088 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
18089 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
18090 DEFAULT_DIRECTORY.
18091
18092 * util/i386/pc/grub-install.in: Do not specify --boot-file or
18093 --core-file. Specify INSTALL_DEVICE as an argument.
18094
18095 * util/console.c: Include config.h.
18096 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
18097 [HAVE_NCURSES_H]: Include ncurses.h.
18098 [HAVE_CURSES_H]: Include curses.h.
18099 [!A_NORMAL] (A_NORMAL): Defined as zero.
18100 [!A_STANDOUT] (A_STANDOUT): Likewise.
18101
18102 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
18103 -lncurses.
18104 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
18105
18106 * configure.ac: Check for curses libraries and headers.
18107
18108 * Makefile.in (LIBCURSES): New variable.
18109
18110 * genmk.rb (Script::rule): Set the executable bits.
18111
18112 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
18113 name of the PC partition map is "pc_partition_map" but not "pc".
18114
0e143073 181152005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
18116
18117 * util/i386/pc/grub-install.in (grub_probefs): New variable.
18118 (modules): Likewise.
18119 (usage): Added descriptions for --modules and --grub-probefs.
18120 Handle --modules and --grub-probefs. Save the arguments in MODULES
18121 and GRUB_PROBEFS, respectively.
18122 Auto-detect a filesystem module against GRUBDIR. If the result is
18123 empty and modules are not specified explicitly, abort the
18124 installation. Add the result to MODULES.
18125
18126 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
18127 disk/powerpc/ieee1275/ofdisk.c,
18128 include/grub/powerpc/ieee1275/init.h and
18129 term/powerpc/ieee1275/ofconsole.c.
18130 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
18131 term/ieee1275/ofconsole.c.
18132
18133 * include/grub/powerpc/ieee1275/console.h: Resurrected.
18134
18135 * COPYING: Upgraded to the latest version. Only the address of the
18136 FSF office has changed.
f19dbdb7 18137
efd6e6d5 181382005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
18139
18140 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
18141 kern/ieee1275.c with kern/ieee1275/of.c.
18142
18143 * kern/ieee1275.c: Moved to ...
18144 * kern/ieee1275/of.c: ... here.
18145
8ceafda2 181462005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
18147
18148 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
fe6b695a 18149 readability.
8ceafda2 18150
18151 * config.guess: Updated to the latest version from gnulib.
18152 * config.sub: Likewise.
18153 * install.sh: Likewise.
18154 * mkinstalldirs: Likewise.
18155
18156 * include/grub/console.h: Removed. This file is arch-specific. Do
18157 not put this in include/grub.
18158
18159 * include/grub/i386/pc/console.h: Resurrected.
18160
18161 * util/console.c: Include grub/machine/console.h instead of
18162 grub/console.h.
18163 * util/grub-emu.c: Likewise.
18164
267f6cd9 181652005-08-04 Marco Gerards <metgerards@student.han.nl>
18166
18167 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
18168 hardcoded value.
f19dbdb7 18169
267f6cd9 18170 From Vincent Pelletier <subdino2004@yahoo.fr>
18171 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
18172 Redefined to use grub_getwh.
18173 (grub_term): New member named getwh.
18174 (grub_getwh): New prototype.
18175 * kern/term.c (grub_getwh): New function.
18176 * term/i386/pc/console.c (grub_console_getwh): New function.
18177 (grub_console_term): New member `getwh'.
18178 * term/i386/pc/vga.c (grub_vga_getwh): New function.
18179 (grub_vga_term): New member `getwh'.
0b5abe02 18180 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
267f6cd9 18181 grub_ssize_t.
18182 (grub_ofconsole_getw): New function.
18183 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
18184 (grub_ofconsole_term): New field named getwh and new initial
18185 value.
18186
3be7266d 181872005-08-03 Hollis Blanchard <hollis@penguinppc.org>
18188
18189 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
18190 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
18191 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
18192 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
18193 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
18194 of <grub/machine/ieee1275.h>.
18195 * commands/ieee1275/reboot.c: Likewise.
18196 * boot/powerpc/ieee1275/ieee1275.c: Move ...
18197 * kern/ieee1275.c: ... to here. All users updated. Change all
18198 parameter structs to use new type `grub_ieee1275_cell_t'.
18199 * term/powerpc/ieee1275/ofconsole.c: Move ...
18200 * term/ieee1275/ofconsole.c: ... to here. All users updated.
18201 * disk/powerpc/ieee1275/ofdisk.c: Move ...
18202 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
18203 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
18204 to return int.
18205 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
18206 Remove unused prototypes. All users updated.
18207 * include/grub/powerpc/ieee1275/console.h: Removed.
18208 * include/grub/powerpc/ieee1275/ieee1275.h: Define
18209 `grub_ieee1275_cell_t'.
18210 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
18211 Cast comparisons with -1 to the correct type.
18212 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
18213 type to match `grub_ieee1275_entry_fn'.
18214
8b5f3938 182152005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
18216
18217 * DISTLIST: Added util/i386/pc/grub-probefs.c.
18218
18219 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
18220 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
18221 partmap/sun.c.
18222 (grub_probefs_SOURCES): New variable.
18223
18224 * util/i386/pc/grub-probefs.c: New file.
18225
18226 * util/i386/pc/grub-setup.c (main): Call
18227 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
18228 grub_hfs_init and grub_jfs_init to initialize the system. Call
18229 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
18230 grub_pc_partition_map_fini to finish the system.
18231
ea409713 182322005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
18233
18234 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
18235 function.
18236 (grub_multiboot_load_elf32): Likewise.
18237 (grub_multiboot_is_elf64): Likewise.
18238 (grub_multiboot_load_elf64): Likewise.
18239 (grub_multiboot_load_elf): Likewise.
18240 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
18241 an ELF32 or ELF64 file.
18242 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
18243
18244 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
18245 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
18246 NULL before calling FS->LABEL.
18247 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
18248 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
18249 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
18250 before calling FS->LABEL.
18251
141a288b 182522005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
18253
18254 * util/i386/pc/grub-install.in (datadir): New variable.
18255 (libdir): Removed.
18256 (pkgdatadir): New variable.
18257 (pkglibdir): Removed.
18258
0d5f8a54 182592005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
18260
18261 * DISTLIST: Added util/i386/pc/grub-install.in.
18262
18263 * util/i386/pc/grub-install.in: New file.
18264
18265 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
18266 (grub_install_SOURCES): Likewise.
18267
18268 * genmk.rb: Added support for scripts.
18269 (Script): New class.
18270 (scripts): New variable.
18271
18272 * Makefile.in (install-local): Install sbin_SCRIPTS by
18273 INSTALL_SCRIPT.
18274 (uninstall): Remove sbin_SCRIPTS.
18275
18276 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
18277 device, try to get a GRUB device by
18278 grub_util_biosdisk_get_grub_dev.
18279 Free DEST_DEV.
18280
18281 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
18282 description for --device-map.
18283
5f968e1e 182842005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
18285
18286 Change the semantics of variable hooks. They now return strings
18287 instead of error values.
f19dbdb7 18288
5f968e1e 18289 * util/i386/pc/grub-setup.c: Include grub/env.h.
18290 (setup): Use grub_device_set_root instead of grub_env_set.
18291
18292 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
18293 grub_env_get instead of grub_device_set_root and
18294 grub_device_get_root, respectively.
18295
18296 * kern/main.c (grub_env_write_root): New function.
18297 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
18298 grub_env_set instead of grub_device_set_root.
18299
18300 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
18301 many variables.
18302 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
18303 rather than calling ENV->WRITE_HOOK afterwards.
18304 (grub_env_get): Return the result of ENV->READ_HOOK rather than
18305 passing a pointer of a pointer.
18306 (grub_register_variable_hook): Change the types of "read_hook" and
18307 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
18308 respectively.
18309 Allocate the default empty string on the heap, because this string
18310 may be freed later.
18311
18312 * kern/device.c: Include grub/env.h.
18313 (grub_device_set_root): Removed.
18314 (grub_device_get_root): Likewise.
18315 (grub_device_open): Use grub_env_get instead of
18316 grub_device_get_root.
18317
18318 * include/grub/env.h (grub_env_read_hook_t): New type.
18319 (grub_env_write_hook_t): Likewise.
18320 (grub_env_var): Change the types of "read_hook" and "write_hook"
18321 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
18322 (grub_register_variable_hook): Likewise.
18323
18324 * include/grub/device.h (grub_device_set_root): Removed.
18325 (grub_device_set_root): Likewise.
18326
18327 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
18328 make sure that DIRNAME terminates with '/', so that
18329 grub_fat_find_dir will fail if PATH is not a directory.
18330
18331 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
18332 from DIRNAME.
18333 Use the qualifier auto for print_files and print_files_long.
18334 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
18335 as a regular file.
18336 Put a newline only if there is no error.
18337 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
18338 used.
18339
896f0afd 183402005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
18341
18342 * kern/partition.c (grub_partition_probe): Initialize PART to
18343 NULL. Otherwise, when no partition map is registered, this returns
18344 a garbage.
18345
b28b81b2 183462005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
18347
18348 * partmap/apple.c (apple_partition_map_iterate): Check if POS
18349 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
18350 valid.
18351
5f3607e0 183522005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
18353
18354 * commands/ls.c (grub_ls_list_disks): Print the filesystem
18355 information on each device, if it does not have partitions. Print
18356 "Device" instead of "Disk", because this function is not specific
18357 to disk devices.
18358
18359 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
18360 static to ensure that it is put on the memory rather than a
18361 register.
18362
502c87e8 183632005-07-17 Yoshinori Okuji <okuji@enbug.org>
18364
18365 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
18366 (grub_cat_init): Likewise.
18367 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
18368 (options): Likewise.
18369 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
18370 (grub_configfile_init): Likewise.
18371 * font/manager.c (GRUB_MOD_INIT): Likewise.
18372 * commands/help.c (GRUB_MOD_INIT): Likewise.
18373 (grub_help_init): Likewise.
18374 * normal/command.c (grub_command_init): Likewise.
18375 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
18376 * disk/loopback.c (grub_loop_init): Likewise.
18377 (GRUB_MOD_INIT): Likewise.
18378 * commands/ls.c (grub_ls_init): Likewise.
18379 (GRUB_MOD_INIT): Likewise.
18380 (options): Likewise.
18381 * commands/boot.c (grub_boot_init): Likewise.
18382 (GRUB_MOD_INIT): Likewise.
18383 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
18384 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
18385 (GRUB_MOD_INIT): Likewise.
18386 * commands/cmp.c (grub_cmp_init): Likewise.
18387 (GRUB_MOD_INIT): Likewise.
18388
18389 * normal/arg.c: Use <> instead of "" to include header files.
18390 (SHORT_ARG_HELP): New macro.
18391 (SHORT_ARG_USAGE): Likewise.
18392 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
18393 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
18394 descriptions.
18395 (find_short): Check if C is 'h' or 'u' explicitly.
18396 (grub_arg_show_help): Use space characters instead of tabs. Treat
18397 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
18398 are shown with --help and --usage only if they are not used for
18399 the command itself.
18400 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
18401 'h' and 'u'.
18402
18403 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
18404 const into "longarg". Change the type of "shortarg" to int.
18405
f806d18e 184062005-07-17 Yoshinori Okuji <okuji@enbug.org>
18407
18408 * boot/i386/pc/boot.S (boot_drive_check): New label.
18409
18410 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
18411 macro.
18412
18413 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
18414 which do not pass a boot drive correctly. Copied from GRUB Legacy.
18415
e293232b 184162005-07-17 Yoshinori Okuji <okuji@enbug.org>
18417
18418 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
18419 When turning off Gate A20, skip the check and return immediately,
18420 because this is not fatal usually.
18421
ebedfd00 184222005-07-17 Yoshinori Okuji <okuji@enbug.org>
18423
18424 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
18425 be 0x7C00 instead of 0x8000.
18426
18427 * boot/i386/pc/pxeboot.S: Rewritten.
18428
18429 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
18430 EXT_C.
18431 (gate_a20_check_state): Read a byte from 0x108000. Invert the
18432 result.
18433
654fc59f 184342005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
18435
18436 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
18437 robustness. This routine now supports a BIOS call and System
18438 Control Port A to modify the gate A20.
18439
18440 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
18441 Increased to 0x440.
18442
09f9923f 184432005-07-12 Hollis Blanchard <hollis@penguinppc.org>
18444
18445 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
18446 device path and resulting ihandle.
18447 (grub_ofdisk_close): dprintf the ihandle being closed.
18448 (grub_ofdisk_read): dprintf function parameters.
18449 * kern/mm.c (grub_mm_init_region): Likewise.
18450 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
18451 (grub_linux_boot): dprintf the Linux entry point, initrd address and
18452 size, and boot arguments.
18453 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
18454 before loading into memory.
18455 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
18456 before loading into memory.
18457
7ef504d8 184582005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
18459
18460 * kern/mm.c: Added much documentation.
18461 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
18462 8, set to 5 instead of 8.
18463
e0f050c2 184642005-07-10 Yoshinori Okuji <okuji@enbug.org>
18465
18466 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
18467
18468 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
18469 (grub_mkdevicemap_SOURCES): New variable.
18470
18471 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
18472 lib/device.c of GRUB Legacy.
18473
7224189a 184742005-07-10 Yoshinori Okuji <okuji@enbug.org>
18475
18476 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
18477 instead of PATH is NULL.
18478
68c864eb 184792005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
18480
18481 * commands/cmp.c (BUFFER_SIZE): New macro.
18482 (grub_cmd_cmp): Close the right file at the right time. Compare
18483 only data just read. Don't report files of different size as
18484 identical. Dynamically allocate buffers. Move variable
18485 declarations at the beginning of function.
18486
e6f3e614 184872005-07-09 Yoshinori Okuji <okuji@enbug.org>
18488
18489 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
18490 reverse.
18491
f8f1559a 184922004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
18493
18494 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
18495 when backspace is pressed at beginning of line.
18496
39c9d41d 184972005-07-03 Yoshinori Okuji <okuji@enbug.org>
18498
18499 * DISTLIST: Added genfslist.sh.
18500
18501 * normal/main.c (fs_module_list): New variable.
18502 (autoload_fs_module): New function.
18503 (read_fs_list): Likewise.
18504 (grub_normal_execute): Call read_fs_list.
18505
18506 * kern/fs.c (grub_fs_autoload_hook): New variable.
18507 (grub_fs_probe): Added support for auto-loading.
18508
18509 * include/grub/normal.h (struct grub_fs_module_list): New struct.
18510 (grub_fs_module_list_t): New type.
18511
18512 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
18513 (grub_fs_autoload_hook): New prototype.
18514
18515 * genfslist.sh: New file.
f19dbdb7 18516
39c9d41d 18517 * genmk.rb: Added a rule to generate a filesystem list.
18518
121c1d83 185192005-06-30 Marco Gerards <metgerards@student.han.nl>
18520
18521 * configure.ac: Fix the test for cross-compiling.
18522
18523 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
18524 define GRUB_UTIL anymore.
18525
18526 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
18527 so this function works on other systems than just big endian.
18528 (load_modules): Likewise.
18529 (add_segments): Likewise.
18530
e75d76e1 185312005-06-23 Hollis Blanchard <hollis@penguinppc.org>
18532
18533 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
18534 contains `l' modifier, get a long from va_arg().
18535
50b5a0a7 185362005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
18537
18538 * kern/mm.c (grub_free): If the next free block which is being
18539 merged is the first free block, set the first block to the block
18540 being freed.
18541 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
18542
89371b20 185432005-05-08 Hollis Blanchard <hollis@penguinppc.org>
18544
18545 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
18546 `grub_ieee1275_chosen'.
18547
168d6e58 185482005-05-08 Hollis Blanchard <hollis@penguinppc.org>
18549
18550 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
18551 (grub_ieee1275_chosen): New variable.
18552 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
18553 `chosen'.
18554 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
18555 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
18556 Rename first argument to `phandle' for consistency.
18557 (grub_ieee1275_get_property_length): Likewise.
18558 (grub_ieee1275_next_property): Likewise. Change type of first argument
18559 to grub_ieee1275_phandle_t.
18560 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
18561 Move export next to declaration.
18562 (grub_ieee1275_chosen): New variable.
18563 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
18564 Correct cosmetic typo.
18565 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
18566 `grub_ieee1275_chosen'.
18567 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
18568 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
18569 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
18570 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
18571 `grub_ieee1275_chosen'.
18572
ca5baa3f 185732005-05-10 Hollis Blanchard <hollis@penguinppc.org>
18574
18575 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
18576 /chosen/bootargs.
18577 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
18578 /chosen/bootargs as "variable=value" pairs.
18579
708b345f 185802005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
18581
18582 * include/grub/misc.h (grub_dprintf): New macro.
18583 (grub_real_dprintf): New prototype.
18584 (grub_strword): Likewise.
18585 (grub_iswordseparator): Likewise.
18586 * kern/misc.c (grub_real_dprintf): New function.
18587 (grub_strword): Likewise.
18588 (grub_iswordseparator): Likewise.
18589
f4c5e67c 185902005-04-30 Hollis Blanchard <hollis@penguinppc.org>
18591
18592 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
18593 (roundup): Remove macro.
18594 (grub_ieee1275_flags): Make static.
18595 (grub_ieee1275_realmode): Remove.
18596 (grub_ieee1275_test_flag): New function.
18597 (grub_ieee1275_set_flag): Likewise.
18598 (find_options): Rename to `grub_ieee1275_find_options'; update
18599 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
18600 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
18601 (cmain): New prototype.
18602 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
18603 `grub_ieee1275_flags' directly.
18604 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
18605 machine/biosdisk.h.
18606 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
18607 Don't include grub/machine/init.h.
18608 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
18609 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
18610 Remove prototype.
18611 (grub_ieee1275_realmode): Likewise.
18612 (grub_ieee1275_flag): New enum.
18613 (grub_ieee1275_test_flag): New prototype.
18614 (grub_ieee1275_set_flag): New prototype.
18615 * include/grub/powerpc/ieee1275/init.h: Remove file.
18616 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
18617 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
18618 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
18619 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
18620 comment.
18621 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
18622 `grub_ieee1275_test_flag'.
18623 (grub_ieee1275_encode_devname): Likewise.
18624
ed16607e 186252005-04-21 Hollis Blanchard <hollis@penguinppc.org>
18626
18627 * include/grub/powerpc/ieee1275/ieee1275.h
18628 (grub_ieee1275_encode_devname): New prototype.
18629 (grub_ieee1275_get_filename): Likewise.
18630 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
18631 function.
18632 (grub_set_prefix): Likewise.
18633 (grub_machine_init): Call grub_set_prefix.
18634 * kern/powerpc/ieee1275/openfw.c: Fix typos.
18635 (grub_parse_type): New enum.
18636 (grub_ieee1275_get_devargs): New function.
18637 (grub_ieee1275_get_devname): Likewise.
18638 (grub_ieee1275_parse_args): Likewise.
18639 (grub_ieee1275_get_filename): Likewise.
18640 (grub_ieee1275_encode_devname): Likewise.
18641
be369920 186422005-03-30 Marco Gerards <metgerards@student.han.nl>
18643
18644 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
18645 `grub_loader_unset'.
18646
a5ce3a4a 186472005-03-26 Hollis Blanchard <hollis@penguinppc.org>
18648
18649 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
18650 instead of grub_ieee1275_interpret.
18651 (grub_halt_init): New function.
18652 (grub_halt_fini): Likewise.
18653 (GRUB_MOD_INIT): Correct message grammar.
18654 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
18655 instead of grub_ieee1275_interpret.
18656 (grub_reboot_init): New function.
18657 (grub_reboot_fini): Likewise.
18658 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
18659 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
18660 util/i386/pc/misc.c with commands/ieee1275/halt.c,
18661 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
18662 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
18663 function.
18664 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
18665 Add prototype.
18666 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
18667 prototype.
18668 (grub_halt): Likewise.
18669 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
18670 (cmain): Remove __attribute__((unused)).
18671 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
18672 (grub_heap_len): Likewise.
18673 (grub_machine_fini): New function.
18674 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
18675 (grub_halt): Likewise.
18676 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
18677 function.
18678 * util/powerpc/ieee1275/misc.c: New file.
18679
0058f771 186802005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
18681
18682 * DISTLIST: New file.
18683 * gendistlist.sh: Likewise.
f19dbdb7 18684
0058f771 18685 * Makefile.in (COMMON_DISTFILES): Removed.
18686 (BOOT_DISTFILES): Likewise.
18687 (CONF_DISTFILES): Likewise.
18688 (DISK_DISTFILES): Likewise.
18689 (FS_DISTFILES): Likewise.
18690 (INCLUDE_DISTFILES): Likewise.
18691 (KERN_DISTFILES): Likewise.
18692 (LOADER_DISTFILES): Likewise.
18693 (TERM_DISTFILES): Likewise.
18694 (UTIL_DISTFILES): Likewise.
18695 (DISTFILES): Likewise.
18696 (uninstall): Uninstall files in $(pkgdata_DATA).
18697 (DISTLIST): New target.
18698 (distdir): Use the contents of the file DISTLIST to get a list of
18699 distributed files.
18700
46b3b8a5 187012005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
18702
18703 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
18704 descriptor. This is ported from GRUB Legacy.
18705
18706 * gencmdlist.sh: Added an extra semicolon to make it work with
18707 old sed versions. Reported by Robert Bihlmeyer
18708 <robbe@orcus.priv.at>.
18709
5822ff87 187102005-03-08 Yoshinori Okuji <okuji@enbug.org>
18711
18712 Automatic loading of commands is supported.
f19dbdb7 18713
5822ff87 18714 * normal/main.c (read_command_list): New function.
18715 (grub_normal_execute): Call read_command_list.
18716
18717 * normal/command.c (grub_register_command): Return zero or CMD.
18718 Allocate CMD->NAME from the heap.
18719 Initialize CMD->MODULE_NAME to zero.
18720 Find the same name as well. If the same command is found and it is
18721 a dummy command, overwrite members. If it is not a dummy command,
18722 return zero.
18723 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
18724 (grub_command_find): If a dummy command is found, load a module
18725 and retry to find a command only once.
18726
18727 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
18728 make sure that each command is loaded.
18729
18730 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
18731 macro.
18732 (struct grub_command): Remove const from the member `name'.
18733 Add a new member `module_name'.
18734 (grub_register_command): Return grub_command_t.
18735
18736 * commands/help.c (grub_cmd_help): Call grub_command_find to make
18737 sure that each command is loaded.
18738
18739 * genmk.rb (PModule::rule): Specify a module name without the
18740 suffix ".mod" to gencmdlist.sh.
18741
7b1f4b57 187422005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
18743
18744 * gencmdlist.sh: New file.
f19dbdb7 18745
7b1f4b57 18746 * genmk.rb (PModule::rule): Generate a rule for a command list.
18747 Clean command.lst.
18748 Generate command.lst from $(COMMANDFILES).
18749
18750 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
18751 (DATA): Added $(pkgdata_DATA).
18752 (install-local): Install files in $(pkgdata_DATA).
18753
062aaf39 187542005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
18755
18756 * term/i386/pc/vga.c (debug_command): Removed.
18757 (GRUB_MOD_INIT): Do not register the command "debug".
18758
18759 From Hollis Blanchard:
18760 * commands/configfile.c: New file.
18761 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
18762 commands/configfile.c.
18763 (pkgdata_MODULES): Added configfile.mod.
18764 (configfile_mod_SOURCES): New variable.
18765 (configfile_mod_CFLAGS): Likewise.
18766 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
18767 commands/configfile.c.
18768 (pkgdata_MODULES): Added configfile.mod.
18769 (configfile_mod_SOURCES): New variable.
18770 (configfile_mod_CFLAGS): Likewise.
18771 * util/grub-emu.c (main): Call grub_configfile_init and
18772 grub_configfile_fini.
18773 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
18774 prototype.
18775 [GRUB_UTIL] (grub_configfile_fini): Likewise.
f19dbdb7 18776
cee01aa6 187772005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
18778
18779 * normal/arg.c (grub_arg_show_help): Do not show the bug report
18780 address.
18781
18782 * commands/help.c (grub_cmd_help): Do not print newlines after
18783 the last command in print_command_help.
18784
93f3a1d8 187852005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
18786
18787 * commands/default.h: New file.
18788 * commands/timeout.h: Likewise.
18789 * normal/context.c: Likewise.
f19dbdb7 18790
93f3a1d8 18791 * util/misc.c: Do not include sys/times.h.
18792 Include sys/time.h and grub/machine/time.h.
18793 (grub_get_rtc): Rewritten with gettimeofday.
18794
18795 * util/grub-emu.c (main): Call grub_default_init and
18796 grub_timeout_init before grub_normal_init, and call
18797 grub_timeout_fini and grub_default_fini after grub_main.
18798
18799 * util/console.c (grub_ncurses_checkkey): Return the read
18800 character or -1.
18801
18802 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
18803 timeouts.
18804
18805 * normal/main.c (read_config_file): Push MENU. If this fails,
18806 print an error and wait for a user input.
18807 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
18808 If a menu is empty or an error occurs, pop MENU.
18809 (grub_normal_execute): Pop and free MENU after grub_menu_run
18810 returns.
18811
18812 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
18813
18814 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
18815 include time.h.
18816 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
18817 without GRUB_UTIL.
18818 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
18819 time.h.
18820 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
18821 without GRUB_UTIL.
18822
18823 * include/grub/normal.h (struct grub_menu_list): New struct.
18824 (grub_menu_list_t): New type.
18825 (struct grub_context): New struct.
18826 (grub_context_t): New type.
18827 (grub_register_command): Got rid of EXPORT_FUNC.
18828 (grub_unregister_command): Likewise.
18829 (grub_context_get): New prototype.
18830 (grub_context_get_current_menu): Likewise.
18831 (grub_context_push_menu): Likewise.
18832 (grub_context_pop_menu): Likewise.
18833 [GRUB_UTIL] (grub_default_init): Likewise.
18834 [GRUB_UTIL] (grub_default_fini): Likewise.
18835 [GRUB_UTIL] (grub_timeout_init): Likewise.
18836 [GRUB_UTIL] (grub_timeout_fini): Likewise.
18837
18838 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
18839 commands/timeout.c and normal/context.c.
18840 (pkgdata_MODULES): Added default.mod and timeout.mod.
18841 (normal_mod_SOURCES): Added normal/context.c.
18842 (default_mod_SOURCES): New variable.
18843 (default_mod_CFLAGS): Likewise.
18844 (timeout_mod_SOURCES): Likewise.
18845 (timeout_mod_CFLAGS): Likewise.
18846 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
18847 conf/i386-pc.rmk.
18848 (pkgdata_MODULES): Added default.mod and timeout.mod.
18849 (normal_mod_SOURCES): Added normal/context.c.
18850 (default_mod_SOURCES): New variable.
18851 (default_mod_CFLAGS): Likewise.
18852 (timeout_mod_SOURCES): Likewise.
18853 (timeout_mod_CFLAGS): Likewise.
18854
18855 * Makefile.in (all-local): Added $(MKFILES).
18856
4ed2e1dd 188572005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
18858
18859 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
18860 (grub_emu_SOURCES): Likewise.
18861 (pkgdata_MODULES): Add `sun.mod'.
18862 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
18863 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
18864 `partmap/sun.c'.
18865 (pkgdata_MODULES): Add `sun.mod'.
18866 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
18867 * include/grub/partition.h (grub_sun_partition_map_init): New
18868 prototype.
18869 (grub_sun_partition_map_fini): Likewise.
18870 * partmap/sun.c: New file.
18871 * util/grub-emu.c (main): Initialize and de-initialize the sun
18872 partitionmap support.
18873
4d4e372e 188742005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
18875
18876 This implements an Emacs-like menu entry editor.
f19dbdb7 18877
4d4e372e 18878 * normal/menu_entry.c: New file.
f19dbdb7 18879
4d4e372e 18880 * util/console.c (grub_ncurses_putchar): Translate some Unicode
18881 characters to ASCII.
18882 (saved_char): New variable.
18883 (grub_ncurses_checkkey): Rewritten completely.
18884 (grub_ncurses_getkey): Likewise.
18885 (grub_ncurses_init): Call raw instead of cbreak.
18886
18887 * normal/menu.c (print_entry): Do not put a space.
18888 (init_page): Renamed to ...
18889 (grub_menu_init_page): ... this. All callers changed.
18890 (edit_menu_entry): Removed.
18891 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
18892
18893 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
18894
18895 * kern/misc.c (grub_vprintf): Call grub_refresh.
18896
18897 * normal/menu.c (DISP_LEFT): Renamed to ...
18898 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
18899 * normal/menu.c (DISP_UP): Renamed to ...
18900 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
18901 * normal/menu.c (DISP_RIGHT): Renamed to ...
18902 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
18903 * normal/menu.c (DISP_DOWN): Renamed to ...
18904 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
18905 * normal/menu.c (DISP_HLINE): Renamed to ...
18906 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
18907 * normal/menu.c (DISP_VLINE): Renamed to ...
18908 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
18909 * normal/menu.c (DISP_UL): Renamed to ...
18910 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
18911 * normal/menu.c (DISP_UR): Renamed to ...
18912 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
18913 * normal/menu.c (DISP_LL): Renamed to ...
18914 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
18915 * normal/menu.c (DISP_LR): Renamed to ...
18916 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
18917 * normal/menu.c (TERM_WIDTH): Renamed to ...
18918 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
18919 * normal/menu.c (TERM_HEIGHT): Renamed to ...
18920 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
18921 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
18922 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
18923 * normal/menu.c (TERM_MARGIN): Renamed to ...
18924 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
18925 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
18926 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
18927 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
18928 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
18929 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
18930 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
18931 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
18932 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
18933 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
18934 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
18935 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
18936 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
18937 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
18938 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
18939 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
18940 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
18941 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
18942 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
18943 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
18944 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
18945 All callers changed.
18946
18947 * include/grub/normal.h: New prototype.
18948
18949 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
18950 normal/menu_entry.c.
18951 (normal_mod_SOURCES): Likewise.
18952 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
18953 (normal_mod_SOURCES): Likewise.
18954
e6b92c8a 189552005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
18956
18957 * include/grub/normal.h (grub_halt_init): New prototype.
18958 (grub_halt_fini): Likewise.
18959 (grub_reboot_init): Likewise.
18960 (grub_reboot_fini): Likewise.
18961
18962 * util/grub-emu.c: Include signal.h.
18963 (main_env): New global variable.
18964 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
18965 catch C-c.
18966 (grub_machine_fini): New function.
18967 (main): Call grub_halt_init and grub_reboot_init before
18968 grub_main, and grub_reboot_fini and grub_halt_fini after it.
18969 Call setjmp with MAIN_ENV to go back afterwards.
18970 Call grub_machine_fini right before return.
18971
18972 * include/grub/util/misc.h: Include setjmp.h.
18973 (main_env): New prototype.
18974
18975 * include/grub/kernel.h (grub_machine_fini): New prototype.
18976 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
18977 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
18978
18979 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
18980 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
18981 * term/i386/pc/console.c (grub_console_fini): Likewise.
f19dbdb7 18982
e6b92c8a 18983 * util/i386/pc/misc.c: New file.
f19dbdb7 18984
e6b92c8a 18985 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
18986 util/i386/pc/misc.c, commands/i386/pc/halt.c and
18987 commands/i386/pc/reboot.c.
18988
c642636f 189892005-02-14 Guillem Jover <guillem@hadrons.org>
18990
18991 * include/grub/dl.h (grub_dl_check_header): New prototype.
18992 (grub_arch_dl_check_header): Change return type to grub_err_t,
18993 remove size parameter and export function. Update all callers.
18994 * kern/dl.c (grub_dl_check_header): New function.
18995 (grub_dl_load_core): Use `grub_dl_check_header' instead of
18996 `grub_arch_dl_check_header'. Check ELF type. Check if sections
18997 are inside the core.
18998 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
18999 independent ELF header checks.
19000 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
19001 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
19002 `grub_dl_check_header' instead of explicit checks. Check for the
19003 ELF type.
19004 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
19005 `grub_dl_check_header' instead of explicit checks. Remove arch
19006 specific ELF header checks.
19007
e6b92c8a 19008 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
19009 argument SIZE.
19010
5eabe94b 190112005-02-13 Hollis Blanchard <hollis@penguinppc.org>
19012
19013 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
19014 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
19015
1b14a681 190162005-02-12 Hollis Blanchard <hollis@penguinppc.org>
19017
19018 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
f19dbdb7 19019 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
1b14a681 19020 (part_map_iterate): Clear `grub_errno' and return 0 if
f19dbdb7 19021 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
1b14a681 19022 * partmap/amiga.c (amiga_partition_map_iterate): Return
19023 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
19024 * partmap/apple.c (apple_partition_map_iterate): Likewise.
19025
aca108aa 190262005-02-01 Guillem Jover <guillem@hadrons.org>
19027
19028 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
19029 help info.
19030
c9f9c556 190312005-01-31 Marco Gerards <metgerards@student.han.nl>
19032
19033 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
19034 Removed prototype.
19035 (grub_rescue_cmd_linux): New prototype.
19036 (grub_rescue_cmd_initrd): Likewise.
19037 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
19038 `bi_rec'.
19039 (grub_linux_release_mem): Release the memory for the initrd.
19040 (grub_load_linux): Renamed from this...
19041 (grub_rescue_cmd_linux): ...To this. Changed all callers.
19042 Changed `entry' not to be static. Loop over memory regions to
19043 find another one when the default fails.
19044 (grub_rescue_cmd_initrd): New function.
19045 (grub_linux_init): Remove function.
19046 (grub_linux_fini): Likewise.
19047 (GRUB_MOD_INIT): Register `initrd'.
19048 (GRUB_MOD_FINI): Unregister `initrd'.
19049 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
19050 Function removed.
19051 (grub_linux_normal_fini): Likewise.
19052 (GRUB_MOD_INIT): Register `initrd'.
19053 (GRUB_MOD_FINI): Unregister `initrd'.
19054
990cf3aa 190552005-01-31 Marco Gerards <metgerards@student.han.nl>
19056
19057 * commands/help.c: New file.
19058 * normal/arg.c (show_help): Renamed to...
19059 (grub_arg_show_help): ... this.
19060 * commands/i386/pc/halt.c: New file.
19061 * commands/i386/pc/reboot.c: Likewise.
19062 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
19063 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
19064 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
19065 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
19066 variables.
19067 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
19068 `commands/help.c'.
19069 (pkgdata_MODULES): Add `help.mod'.
19070 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
19071 * grub/i386/pc/init.h (grub_reboot): New prototype.
19072 (grub_halt): Likewise.
19073 * include/grub/normal.h (grub_arg_show_help): New prototype.
19074 (grub_help_init): Likewise.
19075 (grub_help_fini): Likewise.
19076 * util/grub-emu.c (main): Initialize and deinitialize the help
19077 command.
19078
19079 * normal/cmdline.c (grub_cmdline_get): Doc fix.
19080
19081 * normal/command.c (grub_command_init): Fixed the description of
19082 the `set' and `unset' commands.
19083
190842005-01-31 Marco Gerards <metgerards@student.han.nl>
0f79cdc1 19085
19086 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
19087 function.
19088 * commands/ieee1275/halt.c: New file.
19089 * commands/ieee1275/reboot.c: Likewise.
19090 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
19091 `__attribute__ ((unused))'. Some GCS related fixed.
19092 (grub_suspend_init) [GRUB_UTIL]: Function removed.
19093 (grub_suspend_fini): Likewise.
19094 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
19095 and `halt.mod'.
19096 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
19097 (halt_mod_CFLAGS): New variables.
19098 * include/grub/powerpc/ieee1275/ieee1275.h
19099 (grub_ieee1275_interpret): New prototype.
19100
1ab09cc7 191012005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
19102
19103 * include/grub/misc.h (memmove): New prototype.
19104 (memcpy): Likewise.
19105
8b8cbdb2 191062005-01-22 Hollis Blanchard <hollis@penguinppc.org>
19107
19108 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
19109 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
19110
e3741a27 191112005-01-22 Marco Gerards <metgerards@student.han.nl>
19112
19113 * kern/misc.c (grub_strndup): Function rewritten.
19114
776bd780 191152005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
19116
19117 * normal/menu.c (TERM_WIDTH): Macro redefined.
19118 (TERM_TOP_BORDER_Y): Likewise.
19119 (draw_border): Replaced while-loop by a for-loop. Make the number
19120 of lines consistent with the number of lines displayed in
19121 print_entries. Added a margin below the rectangle.
19122 (print_entry): Make the entry fit in the rectangle.
19123 (print_entries): Display the scroll arrows next to the right
19124 border.
19125
78026bce 191262005-01-21 Marco Gerards <metgerards@student.han.nl>
19127
19128 * fs/minix.c (grub_minix_find_file): Reserve more space for
19129 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
19130 `grub_strncpy' to copy `path' into it.
19131
67bbaf0f 191322005-01-21 Marco Gerards <metgerards@student.han.nl>
19133
19134 Add the loopback device, a device via which files can be accessed
19135 as devices.
f19dbdb7 19136
67bbaf0f 19137 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
19138 (pkgdata_MODULES): Add loopback.mod.
19139 (loopback_mod_SOURCES): New variable.
19140 (loopback_mod_CFLAGS): Likewise.
19141 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
19142 `disk/loopback.c'.
19143 (pkgdata_MODULES): Add loopback.mod.
19144 (loopback_mod_SOURCES): New variable.
19145 (loopback_mod_CFLAGS): Likewise.
19146 * disk/loopback.c: new file.
19147 * include/grub/normal.h (grub_loop_init): New prototype.
19148 (grub_loop_fini): New prototype.
19149 * util/grub-emu.c (main): Initialize and de-initialize loopback
19150 support.
19151 * include/grub/disk.h (grub_disk_dev_id): Add
19152 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
19153
6f1c18bd 191542005-01-20 Hollis Blanchard <hollis@penguinppc.org>
19155
19156 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
19157 function.
19158 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
19159 (suspend_mod_SOURCES): New variable.
19160 (suspend_mod_CFLAGS): Likewise.
19161 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
19162 New prototype.
19163 * commands/ieee1275/suspend.c: New file.
19164
b38551da 191652005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
19166
19167 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
f19dbdb7 19168 ((unused))' to `__attribute__ ((used))'.
b38551da 19169 (GRUB_MOD_FINI): Likewise.
19170 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
19171 * genmk.rb (PModule): Assign space to common symbols when linking
19172 modules.
19173
777aff39 191742005-01-20 Marco Gerards <metgerards@student.han.nl>
19175
19176 * include/grub/mm.h (grub_mm_init_region): Change the type of the
19177 `unsigned' arguments to `grub_size_t'.
19178 (grub_malloc): Likewise.
19179 (grub_realloc): Likewise.
19180 (grub_memalign): Likewise.
19181 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
19182 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
19183 * util/misc.c (grub_malloc): Likewise.
19184 (grub_realloc): Likewise.
19185 * kern/mm.c (get_header_from_pointer): Change the casts to
19186 `unsigned' into a cast to `grub_size_t'.
19187
19188 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
19189 point to `currnode' when `currnode' is changed.
19190
19191 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
19192 Schottelius <nico-linux@schottelius.org>.
19193
d0ff18e1 191942005-01-09 Hollis Blanchard <hollis@penguinppc.org>
19195
19196 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
19197 (note_path): Remove variable.
19198 (GRUB_IEEE1275_NOTE_NAME): New macro.
19199 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
19200 (grub_ieee1275_note_hdr): New structure.
19201 (grub_ieee1275_note_desc): Likewise.
19202 (grub_ieee1275_note): Likewise.
19203 (load_note): Remove `dir' argument. All callers updated. Remove
19204 `note_img' and `path'. Do not load a file from `note_path'.
19205 Initialize a struct grub_ieee1275_note and write that to `out'.
19206 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
19207
4ca7004c 192082005-01-05 Marco Gerards <metgerards@student.han.nl>
19209
19210 * util/misc.c (grub_util_read_image): Revert last change. It
19211 called `grub_util_read_at', which seeks from the beginning of the
19212 file.
19213
0b412211 192142005-01-04 Hollis Blanchard <hollis@penguinppc.org>
19215
19216 * TODO: Add note about endianness in grub-mkimage.
19217 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
19218 section.
19219 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
19220 (grub_mkimage_SOURCES): New target.
19221 * include/grub/kernel.h (grub_start_addr): Remove variable.
19222 (grub_end_addr): Likewise.
19223 (grub_total_module_size): Likewise.
19224 (grub_kernel_image_size): Likewise.
19225 (GRUB_MODULE_MAGIC): New constant.
19226 (grub_module_info): New structure.
19227 (grub_arch_modules_addr): New prototype.
19228 (grub_get_end_addr): Remove prototype.
19229 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
19230 * include/grub/powerpc/ieee1275/kernel.h: New file.
19231 * include/grub/util/misc.h (grub_util_get_fp_size): New
19232 prototype.
19233 (grub_util_read_at): Likewise.
19234 (grub_util_write_image_at): Likewise.
19235 * kern/main.c (grub_get_end_addr): Remove function.
19236 (grub_load_modules): Call grub_arch_modules_addr instead of using
19237 grub_end_addr. Look for a grub_module_info struct in memory. Use
19238 the grub_module_info fields instead of calling grub_get_end_addr
19239 as loop conditions. Move grub_add_unused_region code here.
19240 (grub_add_unused_region): Remove function.
19241 * kern/i386/pc/init.c: Include grub/cache.h.
19242 (grub_machine_init): Remove call to grub_get_end_addr. Remove
19243 one call to add_mem_region.
19244 (grub_arch_modules_addr): New function.
19245 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
19246 (grub_total_module_size): Likewise.
19247 Include grub/machine/kernel.h.
19248 (grub_arch_modules_addr): New function.
19249 * util/grub-emu.c (grub_end_addr): Remove variable.
19250 (grub_total_module_size): Likewise.
19251 (grub_arch_modules_addr): New function.
19252 * util/misc.c: Include unistd.h.
19253 (grub_util_get_fp_size): New function.
19254 (grub_util_read_at): Likewise.
19255 (grub_util_write_image_at): Likewise.
19256 (grub_util_read_image): Call grub_util_read_at.
19257 (grub_util_write_image): Call grub_util_write_image_at.
19258 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
19259 additional memory in kernel_img for a struct grub_module_info.
19260 Fill in that grub_module_info.
19261 * util/powerpc/ieee1275/grub-mkimage.c: New file.
19262
458786f8 192632005-01-03 Hollis Blanchard <hollis@penguinppc.org>
19264
19265 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
19266 New function.
19267 * include/grub/powerpc/ieee1275/ieee1275.h
19268 (grub_ieee1275_milliseconds): New prototype.
19269 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
19270 Change to 1000.
19271 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
19272 grub_ieee1275_milliseconds.
19273
ac507d1b 192742005-01-03 Hollis Blanchard <hollis@penguinppc.org>
19275
19276 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
19277 variable.
19278 (find_options): New function.
19279 (cmain): Call find_options.
19280 * include/grub/powerpc/ieee1275/ieee1275.h
19281 (grub_ieee1275_realmode): New extern variable.
19282 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
19283 grub_map if grub_ieee1275_realmode is false.
19284
6b8fd1c4 192852004-12-29 Marco Gerards <metgerards@student.han.nl>
19286
19287 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
19288 lines are inserted and make it work like readline. Reported by
19289 Vincent Pelletier <subdino2004@yahoo.fr>.
19290
8514a1e0 192912004-12-28 Marco Gerards <metgerards@student.han.nl>
19292
19293 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
19294
19295 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
19296 `kern/powerpc/cache.S'.
19297
924b6140 192982004-12-27 Marco Gerards <metgerards@student.han.nl>
19299
19300 * genmk.rb: Handle the `Program' class in the main loop. Written
19301 by Johan Rydberg <jrydberg@gnu.org>.
19302 (Program): New class.
19303 (programs): New variable.
19304 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
19305 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
19306 instead of "grub/kernel.h". Include <grub/machine/init.h>.
19307 (help_arch): Function removed.
19308 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
19309 `powerpc/libgcc.h' and `loader.h'.
19310 (pkgdata_PROGRAMS): New variable.
19311 (sbin_UTILITIES): Variable removed.
19312 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
19313 (grubof_SOURCES): Variable re-defined so it only includes the
19314 core functionality.
19315 (grubof_CFLAGS): Remove `-DGRUBOF'.
19316 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
19317 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
19318 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
19319 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
19320 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
19321 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
19322 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
19323 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
19324 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
19325 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
19326 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
19327 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
19328 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
19329 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
19330 (pc_mod_CFLAGS): New variables.
19331 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
19332 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
19333 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
19334 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
19335 Moved from here...
19336 * include/grub/i386/pc/init.h (grub_os_area_addr)
19337 (rub_os_area_size): ... to here.
19338 * include/grub/powerpc/ieee1275/ieee1275.h
19339 (grub_ieee1275_entry_fn): Export symbol.
19340 * include/grub/powerpc/ieee1275/init.h: New file.
19341 * include/grub/powerpc/libgcc.h: Likewise.
19342 * include/grub/cache.h: Likewise.
19343 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
19344 <hollis@penguinppc.org>.
19345 * kern/dl.c: Include <grub/cache.h>.
19346 (grub_dl_flush_cache): New function.
19347 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
19348 for this module.
19349 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
19350 (grub_console_init): Removed prototypes.
19351 (grub_machine_init): Don't initialize the modules anymore.
19352 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
19353 static.
19354 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
19355 Macro undef removed.
19356 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
19357 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
19358 relocation `R_PPC_REL32'. Return an error when the relocation is
19359 unknown.
19360 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
19361 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
19362 * util/misc.c (grub_arch_sync_caches): Likewise.
19363
e4b47e0c 193642004-12-19 Marco Gerards <metgerards@student.han.nl>
19365
19366 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
19367 `symlist.c', add `grubof_symlist.c'.
19368 (symlist.c): Variable removed.
19369 (grubof_HEADERS): Variable added.
19370 (grubof_symlist.c): New target.
19371 (kernel_syms.lst): Use `grubof_HEADERS' instead of
19372 `kernel_img_HEADERS'.
19373 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
19374 * kern/powerpc/dl.c: New file.
19375 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
19376 Function removed.
19377 (grub_arch_dl_relocate_symbols): Likewise.
19378 (grub_register_exported_symbols): Likewise.
19379
4ceb3636 193802004-12-13 Marco Gerards <metgerards@student.han.nl>
19381
19382 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
19383 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
19384 to fail instead. Reported by Vincent Pelletier
19385 <subdino2004@yahoo.fr>.
19386
19387 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
19388 it is not allocated. Reported by Vincent Pelletier
19389 <subdino2004@yahoo.fr>.
19390
19391 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
19392 output so the output looks better.
f19dbdb7 19393
3f1578fe 193942004-12-04 Marco Gerards <metgerards@student.han.nl>
19395
19396 Modulize the partition map support and add support for the amiga
19397 partition map.
f19dbdb7 19398
3f1578fe 19399 * commands/ls.c: Include <grub/partition.h> instead of
19400 <grub/machine/partition.h>.
19401 * kern/disk.c: Likewise.
19402 * kern/rescue.c: Likewise.
19403 * loader/i386/pc/chainloader.c: Likewise.
19404 * normal/cmdline.c: Likewise.
19405 * kern/powerpc/ieee1275/init.c: Likewise.
19406 (grub_machine_init): Call `grub_pc_partition_map_init',
19407 `grub_amiga_partition_map_init' and
19408 `grub_apple_partition_map_init'.
19409 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
19410 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
19411 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
19412 `partition.h' and `pc_partition.h'.
19413 (grub_setup_SOURCES): Remove
19414 `disk/i386/pc/partition.c'. Add `kern/partition.c',
19415 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
19416 (grub_emu_SOURCES): Likewise.
19417 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
19418 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
19419 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
19420 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
19421 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
19422 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
19423 (grubof_SOURCES): Likewise.
19424 * disk/i386/pc/partition.c: File removed.
19425 * disk/powerpc/ieee1275/partition.c: Likewise.
19426 * include/grub/powerpc/ieee1275/partition.h: Likewise.
19427 * include/grub/i386/pc/partition.h: Likewise.
19428 * kern/partition.c: New file.
19429 * partmap/amiga.c: Likewise.
19430 * partmap/apple.c: Likewise.
19431 * partmap/pc.c: Likewise.
19432 * include/grub/partition.h: Likewise..
19433 * include/grub/pc_partition.h: Likewise.
19434 * util/grub-emu.c: Include <grub/partition.h> instead of
19435 <grub/machine/partition.h>.
19436 (main): Call `grub_pc_partition_map_init',
19437 `grub_amiga_partition_map_init' and
19438 `grub_apple_partition_map_init' and deinitialize afterwards.
19439 * util/i386/pc/biosdisk.c: Include `#include
19440 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
19441 `<grub/machine/partition.h>'.
19442 * util/i386/pc/grub-setup.c: Likewise.
19443 * util/i386/pc/biosdisk.c: Likewise.
19444 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
19445 partition information in case of a PC partition.
19446 * util/i386/pc/grub-setup.c: Include `#include
19447 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
19448 `<grub/machine/partition.h>'.
19449 (setup): Only access the PC specific partition information in case
19450 of a PC partition.
19451
0ef4ced9 194522004-11-17 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 19453
0ef4ced9 19454 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
19455 (grub_longjmp): Likewise.
19456 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
19457 20.
19458 * normal/powerpc/setjmp.S: New file.
19459 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
19460 `normal/powerpc/setjmp.S'.
19461 (grubof_CFLAGS): Add `-DGRUBOF'.
19462 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
19463 [GRUB_UTIL && !GRUBOF].
f19dbdb7 19464
19950e29 194652004-11-16 Marco Gerards <metgerards@student.han.nl>
19466
19467 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
19468 property named `name'. Correctly handle the error returned by
19469 `grub_ieee1275_finddevice' if a device can not be opened.
19470
a2fea427 194712004-11-02 Hollis Blanchard <hollis@penguinppc.org>
19472
19473 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
19474 `actual' for negativity.
19475 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
19476 kern/fshelp.c.
19477
41ea0ea3 194782004-11-01 Marco Gerards <metgerards@student.han.nl>
19479
19480 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
19481 (PAGE_OFFSET): New macro.
19482 (CRTC_ADDR_PORT): Likewise.
19483 (CRTC_DATA_PORT): Likewise.
19484 (START_ADDR_HIGH_REGISTER): Likewise.
19485 (START_ADDR_LOW_REGISTER): Likewise.
19486 (GRAPHICS_ADDR_PORT): Likewise.
19487 (GRAPHICS_DATA_PORT): Likewise.
19488 (READ_MAP_REGISTER): Likewise.
19489 (INPUT_STATUS1_REGISTER): Likewise.
19490 (INPUT_STATUS1_VERTR_BIT): Likewise.
19491 (page): New variable.
19492 (wait_vretrace): New function.
19493 (set_read_map): Likewise.
19494 (set_start_address): Likewise.
19495 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
19496 the right page.
19497 (check_vga_mem): Take the page into account.
19498 (write_char): Likewise.
19499 (write_cursor): Likewise.
19500 (scroll_up): Likewise. Copy the page to the page that is not
19501 shown and switch between both pages.
19502 (grub_vga_putchar): Fix off by one error.
19503 (grub_vga_cls): Wait for the vertical retrace. Take the page into
19504 account.
19505
ad0bd20b 195062004-11-01 Marco Gerards <metgerards@student.han.nl>
19507
19508 Add support for iso9660 (including rockridge).
f19dbdb7 19509
ad0bd20b 19510 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
19511 (iso9660_mod_SOURCES): New variable.
19512 (iso9660_mod_CFLAGS): Likewise.
19513 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
19514 * include/grub/fs.h (grub_iso9660_init): New prototype.
19515 * util/grub-emu.c (main): Call `grub_iso9660_init'.
19516 * fs/iso9660.c: New file.
19517
19518 * include/grub/misc.h (grub_strncat): New prototype.
19519 * kern/misc.c (grub_strncat): New function.
f19dbdb7 19520
ad0bd20b 19521 * fs/hfs.c (grub_hfs_mount): Translate the error
19522 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
19523 * fs/jfs.c (grub_jfs_mount): Likewise.
19524 * fs/ufs.c (grub_ufs_mount): Likewise.
19525
a5477a59 195262004-10-28 Hollis Blanchard <hollis@penguinppc.org>
19527
19528 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
19529 which initialized BAT registers.
19530 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
19531 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
19532 Move from here...
19533 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
19534 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
19535 ... to here.
19536 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
19537 (grub_mapclaim): Likewise.
19538 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
19539 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
19540 hand.
19541
9304c1f8 195422004-10-19 Hollis Blanchard <hollis@penguinppc.org>
19543
19544 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
19545 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
19546 -ffreestanding and -msoft-float.
19547
86f4ae25 195482004-10-15 Hollis Blanchard <hollis@penguinppc.org>
19549
19550 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
19551 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
19552 set in grub_ieee1275_flags.
19553
38912228 195542004-10-14 Hollis Blanchard <hollis@penguinppc.org>
19555
19556 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
19557 prototype.
19558 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
19559 grub_console_init first.
19560 Change the memory range used for grub_ieee1275_claim and
19561 grub_mm_init_region.
19562 Print an error message if the claim fails.
19563 Include <grub/misc.h>.
19564
d1923dc8 195652004-10-13 Hollis Blanchard <hollis@penguinppc.org>
19566
19567 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
19568 Call grub_children_iterate for device nodes of type `scsi',
19569 `ide', or `ata'.
19570 (grub_ofdisk_open): Remove manual device alias resolution.
19571 Fix memory leak when device cannot be opened.
f19dbdb7 19572 * include/grub/powerpc/ieee1275/ieee1275.h
d1923dc8 19573 (grub_children_iterate): New prototype.
19574 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
19575 New function.
19576 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
19577 Return -1 if args.size was -1.
19578
4512e4f3 195792004-10-11 Hollis Blanchard <hollis@penguinppc.org>
19580
19581 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
19582 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
19583 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
19584 Open Firmware's memory for it; claim memory from _start to _end.
19585 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
19586 (_end): New extern.
19587 (_start): Zero BSS from __bss_start to _end.
19588 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
19589 New extern.
19590 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
19591
4d61feb0 195922004-10-11 Hollis Blanchard <hollis@penguinppc.org>
19593
ad0bd20b 19594 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
19595 -1 if args.base was -1.
4d61feb0 19596
026fa2f9 195972004-10-08 Hollis Blanchard <hollis@penguinppc.org>
19598
19599 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
19600 escape sequence instead of a literal ^L. Also call
19601 grub_ofconsole_gotoxy.
19602
9f2220ef 196032004-10-03 Hollis Blanchard <hollis@penguinppc.org>
19604
19605 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
19606 void * arguments to grub_addr_t. All callers updated. Also make
19607 the `result' argument optional.
19608 (grub_ieee1275_release): change void * arguments to grub_addr_t.
19609 All callers updated.
19610
8a572cd7 196112004-09-22 Hollis Blanchard <hollis@penguinppc.org>
19612
19613 * commands/ls.c (grub_ls_list_files): Use the string following the
19614 initial ')', if present, as the filesystem path.
19615 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
19616
19617 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
19618
18aa81f2 196192004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
19620
19621 Make the source code of the menu interface more readable.
f19dbdb7 19622
18aa81f2 19623 * normal/menu.c: Include grub/mm.h.
19624 (TERM_WIDTH): New macro.
19625 (TERM_HEIGHT): Likewise.
19626 (TERM_INFO_HEIGHT): Likewise.
19627 (TERM_MARGIN): Likewise.
19628 (TERM_SCROLL_WIDTH): Likewise.
19629 (TERM_TOP_BORDER_Y): Likewise.
19630 (TERM_LEFT_BORDER_X): Likewise.
19631 (TERM_BORDER_WIDTH): Likewise.
19632 (TERM_MESSAGE_HEIGHT): Likewise.
19633 (TERM_BORDER_HEIGHT): Likewise.
19634 (TERM_NUM_ENTRIES): Likewise.
19635 (TERM_FIRST_ENTRY_Y): Likewise.
19636 (TERM_ENTRY_WIDTH): Likewise.
19637 (TERM_CURSOR_X): Likewise.
19638 (draw_border): Use macros instead of magic numbers.
19639 (print_entry): Likewise.
19640 (print_entries): Likewise.
19641 (run_menu): Likewise. Also, handle the key 'e'.
19642 (run_menu_entry): Ignore empty command lines.
19643 (print_message): Added a new argument EDIT. If EDIT is true,
19644 print a different message.
19645 (init_page): Likewise.
19646 (edit_menu_entry): New function. Not implemented yet.
19647
b47efe30 196482004-09-17 Marco Gerards <metgerards@student.han.nl>
19649
19650 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
19651 can be loaded from normal mode.
f19dbdb7 19652
b47efe30 19653 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
19654 `multiboot.mod'.
19655 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
19656 (multiboot_mod_CFLAGS): New variables.
19657 * loader/i386/pc/linux_normal.c: New file.
f19dbdb7 19658 * loader/i386/pc/multiboot_normal.c: Likewise.
19659
b47efe30 19660 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
19661 attribute `unused'.
f19dbdb7 19662
b47efe30 19663 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
19664 `fdiro' to read the mode information from instead of `diro'.
19665
19666 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
19667 looking up a symlink.
19668
19669 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
19670 macro.
19671 * normal/command.c (grub_command_execute): Don't parse the
19672 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
19673 flags of the command.
19674
19675 * normal/menu.c (grub_menu_run): Fix typo.
19676
da75ac71 196772004-09-14 Hollis Blanchard <hollis@penguinppc.org>
19678
19679 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
19680
19681 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
19682 `y + 1' instead of `y - 1'.
19683
19684 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
f19dbdb7 19685
062b24c2 196862004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
19687
19688 From Hollis Blanchard <hollis@penguinppc.org>:
19689 * kern/misc.c (memmove): New alias for grub_memmove.
19690 (memcmp): New alias for grub_memcmp.
19691 (memset): New alias for grub_memset.
f19dbdb7 19692 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
062b24c2 19693 Change "int handle" to "grub_ieee1275_phandle_t handle".
f19dbdb7 19694 * include/grub/powerpc/ieee1275/ieee1275.h
062b24c2 19695 (grub_ieee1275_get_property): Likewise.
f19dbdb7 19696
8ddad845 196972004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
19698
19699 Added normal mode command `chainloader' as module chain.mod, which
19700 depends on normal.mod and _chain.mod.
f19dbdb7 19701
8ddad845 19702 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
19703 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
19704 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
19705 Deleted prototype.
19706 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
19707 but arguments parsing moved to ...
19708 (grub_chainloader_cmd): ... here. New function.
19709 * include/grub/i386/pc/chainloader.h: New file.
19710 * loader/i386/pc/chainloader_normal.c: Likewise.
19711
2c1f4ce3 197122004-09-11 Marco Gerards <metgerards@student.han.nl>
19713
19714 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
19715 (grub_mkimage_LDFLAGS): Likewise.
19716 (grub_emu_SOURCES): Likewise.
19717 (kernel_img_HEADERS): Added fshelp.h.
19718 * fs/ext2.c: Include <grub/fshelp.h>.
19719 (FILETYPE_REG): New macro.
19720 (FILETYPE_INO_REG): Likewise.
19721 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
19722 Changed all users.
19723 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
19724 all users.
19725 (grub_fshelp_node): New struct.
19726 (grub_ext2_data): Added member `diropen'. Changed member `inode'
19727 to a pointer.
19728 (grub_ext2_get_file_block): Removed function.
19729 (grub_ext2_read_block): New function.
19730 (grub_ext2_read_file): Replaced parameter `data' by `node'.
19731 This function was written.
19732 (grub_ext2_mount): Read the root inode. Create a diropen struct.
19733 (grub_ext2_find_file): Removed function.
19734 (grub_ext2_read_symlink): New function.
19735 (grub_ext2_iterate_dir): Likewise.
19736 (grub_ext2_open): Rewritten.
19737 (grub_ext2_dir): Rewritten.
19738 * include/grub/fshelp.h: New file.
19739 * fs/fshelp.c: Likewise.
19740
3c52136a 197412004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
19742
19743 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
19744 (print_message): Add a missing newline.
19745 (run_menu): Added timeout support.
19746 (run_menu_entry): New local function.
19747 (grub_menu_run): Added support for booting.
19748
19749 * kern/loader.c (grub_loader_is_loaded): New function.
19750
19751 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
19752 (grub_get_rtc): Exported.
19753
19754 * include/grub/i386/pc/time.h: Include grub/symbol.h.
19755 (grub_get_rtc): Exported.
19756
19757 * include/grub/normal.h (struct grub_command_list): Remove
19758 constant from the member `command'.
19759
19760 * include/grub/loader.h (grub_loader_is_loaded): Declared.
19761
19762 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
19763
19764 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
19765
aa033560 197662004-08-28 Marco Gerards <metgerards@student.han.nl>
19767
19768 Add support for the JFS filesystem.
19769
19770 * fs/jfs.c: New file.
19771 * include/grub/fs.h (grub_jfs_init): New prototype.
19772 (grub_jfs_fini): New prototype.
19773 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
19774 (grub_emu_SOURCES): Likewise.
19775 (pkgdata_MODULES): Add jfs.mod.
19776 (jfs_mod_SOURCES): New variable.
19777 (jfs_mod_CFLAGS): Likewise.
19778 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
19779 (grubof_SOURCES): Likewise.
19780 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
19781
19782 * fs/fat.c (grub_fat_find_dir): Convert the filename little
19783 endian to the host endian.
19784 (grub_fat_utf16_to_utf8): Move function from there...
19785 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
fe987087 19786 the endianness of the source string anymore.
aa033560 19787 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
19788
94bc45af 197892004-08-24 Marco Gerards <metgerards@student.han.nl>
19790
19791 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
19792 (grub_boot_fini) [GRUB_UTIL]: Likewise.
19793 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
19794 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
f19dbdb7 19795
94bc45af 19796 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
19797 (grub_hfs_iterate_dir): Make the function static. Add prototypes
19798 for `node_found' and `it_dir'.
19799 (grub_hfs_dir): Add prototype for `dir_hook'.
19800
19801 * fs/minix.c (grub_minix_get_file_block): Add prototype for
19802 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
19803 and `indir32' to silence a gcc warning.
19804
19805 * include/grub/fs.h (grub_hfs_init): New prototype.
19806 (grub_hfs_fini): Likewise.
f19dbdb7 19807
19808
97543f08 198092004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
19810
19811 Each disk device has its own id now. This is useful to make use
19812 of multiple disk devices.
f19dbdb7 19813
97543f08 19814 * include/grub/disk.h (grub_disk_dev_id): New enum.
19815 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
19816 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
19817
19818 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
19819 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
19820
19821 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
19822 GRUB_DISK_DEVICE_OFDISK_ID as an id.
19823
19824 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
19825 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
19826
19827 * include/grub/disk.h (struct grub_disk_dev): Added a new member
19828 "id" which is used by the cache manager.
19829
19830 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
19831 of just "GRUB".
19832
64372eb4 198332004-08-18 Marco Gerards <metgerards@student.han.nl>
19834
19835 * fs/hfs.c: New file.
19836 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
19837 (grub_emu_SOURCES): Likewise.
19838 (pkgdata_MODULES): Add hfs.mod.
19839 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
19840 (grubof_SOURCES): Likewise.
19841 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
19842
19843 * include/grub/misc.h (grub_strncasecmp): Add prototype.
19844 * kern/misc.c (grub_strncasecmp): Add function.
19845
cc61b58f 198462004-08-14 Marco Gerards <metgerards@student.han.nl>
19847
19848 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
19849 with parentheses.
19850
19851 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
19852 (grub_ext2_dir): In case the directory entry type is unknown, read
19853 it from the inode.
19854
0ef123f6 198552004-08-02 Peter Bruin <pjbruin@dds.nl>
19856
19857 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
19858 grub_load_linux instead of grub_rescue_cmd_linux as second
19859 argument of grub_rescue_register_command.
19860
19861 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
19862
a447c5df 198632004-07-27 Marco Gerards <metgerards@student.han.nl>
19864
19865 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
19866 function.
19867 * commands/boot.c: Remove the check for `GRUB_UTIL'.
19868 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
19869 `loader/powerpc/ieee1275/linux.c',
19870 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
19871 * include/grub/powerpc/ieee1275/ieee1275.h
19872 (grub_ieee1275_release): New prototype.
19873 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
19874 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
19875 normal, boot, linux and linux_normal.
19876 * loader/powerpc/ieee1275/linux.c: New file.
19877 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
19878
5a9e3546 198792004-07-12 Marco Gerards <metgerards@student.han.nl>
19880
19881 * normal/arg.c (grub_arg_parse): Correct error handling after
19882 reallocating the argumentlist (check if `argl' is not null instead
19883 of checking if `args' is not null).
19884 * kern/mm.c (grub_realloc): Return the same pointer when using the
19885 same region, instead of returning the header address.
19886
e15199cb 198872004-07-11 Marco Gerards <metgerards@student.han.nl>
19888
19889 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
19890 one block instead of two when looking for the initial partition.
19891 (grub_partition_probe): Initialize the local variable `p' with 0.
19892 Use base 10 for the grub_strtoul call.
19893 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
19894 need for one local variable.
19895 (grub_strtoul): Don't add the new value to `num', instead of that
19896 just assign it.
19897
020616c2 198982004-07-11 Marco Gerards <metgerards@student.han.nl>
19899
19900 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
19901 (pxeboot_img_SOURCES): New variable.
19902 (pxeboot_img_ASFLAGS): Likewise.
19903 (pxeboot_img_LDFLAGS): Likewise.
19904 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
19905 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
19906 <lode_leroy@hotmail.com>.
19907
6c51eb64 199082004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
19909
19910 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
19911 there was no input.
19912
cfb12aff 199132004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
19914
19915 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
19916 the history buffer logic.
19917
6eabba74 199182004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
19919
19920 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
19921 (FILETYPE_INO_SYMLINK): New macros.
19922 (grub_ext2_find_file): Check if the node is a directory using the
19923 inode stat information instead of using the filetype in the
19924 dirent. Exclude the first character of an absolute symlink.
19925 (grub_ext2_dir): Mask out the filetype part of the mode member of
19926 the inode.
19927
66e19ef8 199282004-05-24 Marco Gerards <metgerards@student.han.nl>
19929
19930 Add support for UFS version 1 and 2. Add support for the minix
19931 filesystem version 1 and 2, both the variants with 14 and 30 long
19932 filenames.
f19dbdb7 19933
66e19ef8 19934 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
19935 fs/minix.c.
19936 (grub_emu_SOURCES): Likewise.
19937 (pkgdata_MODULES): Add ufs.mod and minix.mod.
19938 (ufs_mod_SOURCES): New variable.
19939 (ufs_mod_CFLAGS): Likewise.
19940 (minix_mod_SOURCES): Likewise.
19941 (minix_mod_CFLAGS): Likewise.
19942 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
19943 fs/minix.c.
19944 (grubof_SOURCES): Likewise.
19945 * fs/ufs.c: New file.
19946 * fs/minix.c: New file.
19947 * include/grub/fs.h (grub_ufs_init): New prototype.
19948 (grub_ufs_fini): Likewise.
19949 (grub_minix_init): Likewise.
19950 (grub_minix_fini): Likewise.
19951 * util/grub-emu.c (main): Initialize and deinitialize UFS and
19952 minix fs.
19953
cc2e748a 199542004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
19955
19956 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
19957 commands/ls.c, commands/terminal.c, commands/boot.c,
19958 commands/cmp.c and commands/cat.c.
19959 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
19960
19961 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
19962 "env.h"
19963
4b13b216 199642004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
19965
19966 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
19967 and grub_, respectively. Because the conversion is trivial and
19968 mechanical, I omit the details here. Please refer to the CVS
19969 if you need more information.
19970
6a142551 199712004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
19972
19973 * include/pupa: Renamed to ...
19974 * include/grub: ... this.
19975 * util/i386/pc/pupa-mkimage.c: Renamed to ...
19976 * util/i386/pc/grub-mkimage.c: ... this.
19977 * util/i386/pc/pupa-setup.c: Renamed to ...
19978 * util/i386/pc/grub-setup.c: ... this.
19979 * util/pupa-emu.c: Renamed to ...
19980 * util/grub-emu.c: ... this.
19981
e56cdf21 199822004-03-29 Marco Gerards <metgerards@student.han.nl>
19983
19984 Add support for the newworld apple macintosh (PPC). This has been
19985 tested on the powerbook 2000 only. It only adds support for
19986 generic ieee1275 functions, console and disk support. This should
19987 be easy to port to other architectures with support for Open
19988 Firmware.
f19dbdb7 19989
e56cdf21 19990 * configure.ac: Accept the powerpc as host_cpu. In the case of
19991 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
19992 specific tests are only executed while building for the i386.
19993 Inverse test for crosscompile.
19994 * genmk.rb (Utility): Allow assembler files.
19995 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
19996 * conf/powerpc-ieee1275.rmk: New file.
19997 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
19998 * disk/powerpc/ieee1275/partition.c: Likewise.
19999 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
20000 * include/pupa/powerpc/ieee1275/console.h: Likewise.
20001 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
20002 * include/pupa/powerpc/ieee1275/time.h: Likewise.
20003 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
20004 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
20005 * include/pupa/powerpc/ieee1275/loader.h
20006 * include/pupa/powerpc/setjmp.h: Likewise.
20007 * include/pupa/powerpc/types.h: Likewise.
20008 * kern/powerpc/ieee1275/init.c: Likewise.
20009 * kern/powerpc/ieee1275/openfw.c: Likewise.
20010 * term/powerpc/ieee1275/ofconsole.c: Likewise.
20011
20012 These files were written by Johan Rydberg
20013 (jrydberg@night.trouble.net) and I only modified them slightly.
f19dbdb7 20014
e56cdf21 20015 * boot/powerpc/ieee1275/cmain.c: New file.
20016 * boot/powerpc/ieee1275/crt0.S: Likewise.
20017 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
20018 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
20019
8c8cc205 200202004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
20021
20022 * Makefile.in: Update copyright.
20023 * genmodsrc.sh: Likewise.
20024 * gensymlist.sh: Likewise.
20025 * term/i386/pc/vga.c: Indent correctly.
20026
20027 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
20028 bugreporting address.
20029 * util/i386/pc/pupa-setup.c (usage): Likewise,
20030 (main): Call pupa_ext2_init and pupa_ext2_fini.
20031
f19dbdb7 20032 * fs/fat.c (log2): Renamed to ...
8c8cc205 20033 (fat_log2): ... this.
20034 All callers changed.
20035 * kern/misc.c (memcpy): Alias to pupa_memmove.
20036 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
20037 lvalue cast.
20038 * util/console.c (pupa_ncurses_fini): Return 0.
20039
20040 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
20041 Move fail label here.
20042 [__GNU__]: Don't warn when using stat.
20043 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
20044 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
20045 long int. Use strtol instead of strtoul.
f19dbdb7 20046
db1771cf 200472004-03-14 Marco Gerards <metgerards@student.han.nl>
20048
20049 * commands/boot.c: New file.
20050 * commands/cat.c: Likewise.
20051 * commands/cmp.c: Likewise.
20052 * commands/ls.c: Likewise.
20053 * commands/terminal.c: Likewise.
20054 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
20055 (pupa_register_command): Changed interface to match the new
20056 argument parser.
20057 (pupa_command_execute): Changed (almost rewritten) so it uses
20058 pupa_split_command. Added support for setting variables using the
20059 syntax `foo=bar'.
20060 (rescue_command): Changed to work with the new argument parser.
20061 (terminal_command): Moved from here to commands/terminal.c.
20062 (set_command): New function.
20063 (unset_command): New function.
20064 (insmod_command): New function.
20065 (rmmod_command): New function.
20066 (lsmod_command): New function.
20067 (pupa_command_init): Don't initialize the command terminal
20068 anymore. Initialize the commands set, unset, insmod, rmmod and
20069 lsmod.
20070 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
20071 (kernel_img_HEADERS): Add arg.h and env.h.
20072 (pupa_mkimage_LDFLAGS): Add kern/env.c.
20073 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
20074 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
20075 normal/arg.c.
20076 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
20077 terminal.mod.
20078 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
20079 (boot_mod_SOURCES): New variable.
20080 (terminal_mod_SOURCES): Likewise.
20081 (ls_mod_SOURCES): Likewise.
20082 (cmp_mod_SOURCES): Likewise.
20083 (cat_mod_SOURCES): Likewise.
20084
20085 * normal/arg.c: New file.
20086 * kern/env.c: Likewise.
20087 * include/pupa/arg.h: Likewise.
20088 * include/pupa/env.h: Likewise.
20089 * font/manager.c (font_command): Changed to match argument parsing
20090 interface changes.
20091 (PUPA_MOD_INIT): Likewise.
20092 * hello/hello.c (pupa_cmd_hello): Likewise.
20093 (PUPA_MOD_INIT): Likewise.
20094 * include/pupa/disk.h: Include <pupa/device.h>.
20095 (pupa_print_partinfo): New prototype.
20096 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
20097 (pupa_dl_get_prefix): Likewise.
20098 * include/pupa/misc.h: Include <pupa/err.h>.
20099 (pupa_isgraph): New prototype.
20100 (pupa_isdigit): Likewise.
20101 (pupa_split_cmdline): Likewise.
20102 * include/pupa/normal.h: Include <pupa/arg.h>.
20103 (pupa_command): Changed the prototype of the member `func' to
20104 match the argument parsing interface. Added member `options'.
20105 (pupa_register_command): Updated to match function.
20106 (pupa_arg_parse): New prototype.
20107 (pupa_hello_init) [PUPA_UTIL]: New prototype.
20108 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
20109 (pupa_ls_init) [PUPA_UTIL]: Likewise.
20110 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
20111 (pupa_cat_init) [PUPA_UTIL]: Likewise.
20112 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
20113 (pupa_boot_init) [PUPA_UTIL]: Likewise.
20114 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
20115 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
20116 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
20117 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
20118 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
20119 * kern/disk.c: Include <pupa/file.h>.
20120 (pupa_print_partinfo): New function.
20121 * kern/dl.c: Include <pupa/env.h>.
20122 (pupa_dl_dir): Variable removed.
20123 (pupa_dl_load): Use the environment variable `prefix' instead of
20124 the variable pupa_dl_dir.
20125 (pupa_dl_set_prefix): Function removed.
20126 (pupa_dl_get_prefix): Likewise.
20127 * kern/i386/pc/init.c: Include <pupa/env.h>.
20128 (pupa_machine_init): Use the environment variable `prefix' instead of
20129 using pupa_dl_set_prefix to set the prefix.
20130 * kern/main.c: Include <pupa/env.h>.
20131 (pupa_set_root_dev): Use the environment variable `prefix' instead of
20132 using pupa_dl_get_prefix to get the prefix.
20133 * kern/misc.c: Include <pupa/env.h>.
20134 (pupa_isdigit): New function.
20135 (pupa_isgraph): Likewise.
20136 (pupa_ftoa): Likewise.
20137 (pupa_vsprintf): Added support for printing values of the type
20138 `double'. Make it possible to format variable output when using
20139 formatting like `%1.2%f'.
20140 (pupa_split_cmdline): New function.
20141 * kern/rescue.c: Include <pupa/env.h>.
20142 (next_word): Removed function.
20143 (pupa_rescue_cmd_prefix): Likewise.
20144 (pupa_rescue_cmd_set): New function.
20145 (pupa_rescue_cmd_unset): New function.
20146 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
20147 split the command line instead of splitting it here. Added
20148 support for setting variables using the syntax `foo=bar'. Don't
20149 initialize the prefix command anymore. Initialized the set and
20150 unset commands.
20151 * normal/cmdline.c: Include <pupa/env.h>.
20152 (pupa_tab_complete): Added prototypes for print_simple_completion,
20153 print_partition_completion, add_completion, iterate_commands,
20154 iterate_dev, iterate_part and iterate_dir. Moved code to print
20155 partition information from here to kern/disk.c.
fe6b695a 20156 (pupa_cmdline_run): Don't check if the function exists anymore.
db1771cf 20157 * normal/main.c: Include <pupa/env.h>.
20158 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
20159 instead of using pupa_dl_get_prefix to get the prefix.
20160 * term/i386/pc/vga.c: Include <pupa/arg.h>.
20161 (check_vga_mem): Cast pointers to `void *' to silence a gcc
20162 warning.
20163 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
20164 (pupa_vga_setcolor): Declare unused variables with `__attribute__
20165 ((unused))' to silence a gcc warning.
20166 (pupa_vga_setcolor): Likewise.
20167 (debug_command): Changed to match argument parsing
20168 interface changes.
20169 * util/pupa-emu.c: Include <pupa/env.h>.
20170 (options): Added 0's for unused fields to silence a gcc warning.
20171 (argp): Likewise.
20172 (main): Use the environment variable `prefix' instead of using
20173 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
20174 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
20175 and terminal.
20176
20177 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
20178 * util/misc.c: Include <malloc.h>.
20179 (pupa_malloc): Rewritten so errors are correctly reported.
20180 (pupa_realloc): Likewise.
20181 (pupa_memalign): Likewise.
20182 (pupa_mm_init_region): Declare unused variables with
20183 `__attribute__ ((unused))' to silence a gcc warning.
20184 * normal/i386/setjmp.S: Remove tab at the end of the file to
20185 silence a gcc warning.
20186 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
20187 variables with `__attribute__ ((unused))' to silence a gcc
20188 warning.
20189 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
20190 local variable i unsigned to silence a gcc warning.
20191
20192 * kern/term.c: Include <pupa/misc.h>.
20193 (pupa_more_lines): New variable.
20194 (pupa_more): Likewise.
20195 (pupa_putcode): When the pager is active pause at the end of every
20196 screen.
20197 (pupa_set_more): New function.
20198 * include/pupa/term.h (pupa_set_more): New prototype.
20199
20200
3b1139cb 202012004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
20202
20203 Now this project is GRUB 2 rather than PUPA. The location of
20204 the CVS repository was moved to GRUB's.
f19dbdb7 20205
3b1139cb 20206 * configure.ac: Use bug-grub as the reporting address.
20207 Use GRUB instead of PUPA.
20208 Change the version number to 1.90.
20209
8367695c 202102004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
20211
20212 * genkernsyms.sh: Updated copyright information.
20213 * genmk.rb: Likewise.
20214 * genmodsrc.sh: Likewise.
20215 * gensymlist.sh: Likewise.
20216 * boot/i386/pc/boot.S: Likewise.
20217 * boot/i386/pc/diskboot.S: Likewise.
20218 * disk/i386/pc/biosdisk.c: Likewise.
20219 * disk/i386/pc/partition.c: Likewise.
20220 * font/manager.c: Likewise.
20221 * fs/ext2.c: Likewise.
20222 * fs/fat.c: Likewise.
20223 * include/pupa/boot.h: Likewise.
20224 * include/pupa/device.h: Likewise.
20225 * include/pupa/disk.h: Likewise.
20226 * include/pupa/dl.h: Likewise.
20227 * include/pupa/elf.h: Likewise.
20228 * include/pupa/err.h: Likewise.
20229 * include/pupa/file.h: Likewise.
20230 * include/pupa/font.h: Likewise.
20231 * include/pupa/fs.h: Likewise.
20232 * include/pupa/kernel.h: Likewise.
20233 * include/pupa/loader.h: Likewise.
20234 * include/pupa/misc.h: Likewise.
20235 * include/pupa/mm.h: Likewise.
20236 * include/pupa/net.h: Likewise.
20237 * include/pupa/normal.h: Likewise.
20238 * include/pupa/rescue.h: Likewise.
20239 * include/pupa/setjmp.h: Likewise.
20240 * include/pupa/symbol.h: Likewise.
20241 * include/pupa/term.h: Likewise.
20242 * include/pupa/types.h: Likewise.
20243 * include/pupa/i386/setjmp.h: Likewise.
20244 * include/pupa/i386/types.h: Likewise.
20245 * include/pupa/i386/pc/biosdisk.h: Likewise.
20246 * include/pupa/i386/pc/boot.h: Likewise.
20247 * include/pupa/i386/pc/console.h: Likewise.
20248 * include/pupa/i386/pc/init.h: Likewise.
20249 * include/pupa/i386/pc/kernel.h: Likewise.
20250 * include/pupa/i386/pc/linux.h: Likewise.
20251 * include/pupa/i386/pc/loader.h: Likewise.
20252 * include/pupa/i386/pc/memory.h: Likewise.
20253 * include/pupa/i386/pc/multiboot.h: Likewise.
20254 * include/pupa/i386/pc/partition.h: Likewise.
20255 * include/pupa/i386/pc/time.h: Likewise.
20256 * include/pupa/i386/pc/vga.h: Likewise.
20257 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
20258 * include/pupa/util/getroot.h: Likewise.
20259 * include/pupa/util/misc.h: Likewise.
20260 * include/pupa/util/resolve.h: Likewise.
20261 * kern/device.c: Likewise.
20262 * kern/disk.c: Likewise.
20263 * kern/dl.c: Likewise.
20264 * kern/err.c: Likewise.
20265 * kern/file.c: Likewise.
20266 * kern/fs.c: Likewise.
20267 * kern/loader.c: Likewise.
20268 * kern/main.c: Likewise.
20269 * kern/misc.c: Likewise.
20270 * kern/mm.c: Likewise.
20271 * kern/rescue.c: Likewise.
20272 * kern/term.c: Likewise.
20273 * kern/i386/dl.c: Likewise.
20274 * kern/i386/pc/init.c: Likewise.
20275 * kern/i386/pc/lzo1x.S: Likewise.
20276 * kern/i386/pc/startup.S: Likewise.
20277 * loader/i386/pc/chainloader.c: Likewise.
20278 * loader/i386/pc/linux.c: Likewise.
20279 * loader/i386/pc/multiboot.c: Likewise.
20280 * normal/cmdline.c: Likewise.
20281 * normal/command.c: Likewise.
20282 * normal/main.c: Likewise.
20283 * normal/menu.c: Likewise.
20284 * normal/i386/setjmp.S: Likewise.
20285 * term/i386/pc/console.c: Likewise.
20286 * term/i386/pc/vga.c: Likewise.
20287 * util/console.c: Likewise.
20288 * util/genmoddep.c: Likewise.
20289 * util/misc.c: Likewise.
20290 * util/pupa-emu.c: Likewise.
20291 * util/resolve.c: Likewise.
20292 * util/unifont2pff.rb: Likewise.
20293 * util/i386/pc/biosdisk.c: Likewise.
20294 * util/i386/pc/getroot.c: Likewise.
20295 * util/i386/pc/pupa-mkimage.c: Likewise.
20296 * util/i386/pc/pupa-setup.c: Likewise.
20297
e6eced71 202982004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
20299
20300 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
20301 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
20302 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
20303 reading and reset it after reading.
20304 (pupa_ext2_close): Return PUPA_ERR_NONE.
20305
20306 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
20307 Correct value.
20308 (struct linux_kernel_header): Add kernel_version and
20309 initrd_addr_max.
20310 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
20311 pupa_file_read succeeds.
20312 (pupa_rescue_cmd_initrd): Implement.
20313
5aded270 203142003-12-03 Marco Gerards <metgerards@student.han.nl>
20315
20316 * fs/ext2.c (pupa_ext2_label): New function.
20317 (pupa_ext2_fs): Added label.
20318 * fs/fat.c (pupa_fat_label): New function.
20319 (pupa_fat_fs): Added label.
20320 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
20321
20322 * kern/misc.c (pupa_strndup): New function.
20323 * include/pupa/misc.h (pupa_strndup): New prototype.
20324
20325 * include/pupa/normal.h: Include <pupa/err.h>.
20326 (pupa_set_history): New prototype.
20327 (pupa_iterate_commands): New prototype.
20328 * normal/cmdline.c: Include <pupa/machine/partition.h>,
20329 <pupa/disk.h>, <pupa/file.h>.
20330 (hist_size): New variable.
20331 (hist_lines): Likewise.
20332 (hist_end): Likewise.
20333 (hist_used): Likewise.
20334 (pupa_set_history): New function.
20335 (pupa_history_get): Likewise.
20336 (pupa_history_add): Likewise.
20337 (pupa_history_replace): Likewise.
20338 (pupa_tab_complete): Likewise.
20339 (pupa_cmdline_run): Added tab completion and history buffer. Tab
20340 completion shows partitionnames while completing partitions, this
20341 feature was suggested by Jeff Bailey.
20342 * normal/command.c (pupa_iterate_commands): New function.
20343 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
20344 (pupa_normal_init): Initialize history buffer.
20345 (PUPA_MOD_INIT): Likewise.
20346 (pupa_normal_fini): Free the history buffer.
20347 (PUPA_MOD_FINI): Likewise.
20348
20349 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
20350 key.
20351
20352 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
20353 * configure.ac [i386]: Check for regparam bug.
20354 (NESTED_FUNC_ATTR) [! i386]: Defined.
20355
1f7315a3 203562003-11-17 Marco Gerards <metgerards@student.han.nl>
20357
20358 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
20359 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
20360 (pupa_emu_SOURCES): New variable.
20361 (pupa_emu_LDFLAGS): Likewise.
20362 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
20363 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
20364 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
20365 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
20366 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
20367 (pupa_jmp_buf): New typedef.
20368 (pupa_setjmp) [PUPA_UTIL]: New macro.
20369 (pupa_longjmp) [PUPA_UTIL]: Likewise.
20370 * include/pupa/term.h (struct pupa_term): New member `refresh'.
20371 (pupa_refresh): New prototype.
20372 * include/pupa/util/getroot.h: New file.
20373 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
20374 it.
20375 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
20376 (pupa_rescue_cmd_cat): Likewise.
20377 (pupa_rescue_cmd_ls): Likewise.
20378 (pupa_rescue_cmd_testload): Likewise.
20379 (pupa_rescue_cmd_lsmod): Likewise.
20380 * normal/cmdline.c (pupa_cmdline_get): Likewise.
20381 * normal/menu.c (run_menu): Likewise.
20382 * kern/term.c (pupa_cls): Likewise.
20383 (pupa_refresh): New function.
20384 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
20385 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
20386 * util/console.c: New file.
f19dbdb7 20387
1f7315a3 20388 * util/i386/pc/getroot.c: New file.
20389 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
20390 (pupa_putchar): New function.
20391 (pupa_refresh): Likewise.
20392 (xgetcwd): Function moved to ...
20393 (strip_extra_slashes): Likewise.
20394 (get_prefix): Likewise.
f19dbdb7 20395 * util/i386/pc/getroot.c: ... here.
1f7315a3 20396 (find_root_device): Function moved and renamed to...
20397 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
20398 Changed all callers.
20399 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
20400 and renamed to...
20401 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
20402 Changed all callers.
20403 * util/misc.c (pupa_memalign): New function.
20404 (pupa_mm_init_region): Likewise.
20405 (pupa_register_exported_symbols): Likewise.
20406 (pupa_putchar): Function removed.
20407 * util/pupa-emu.c: New file.
20408
9a5c1ade 204092003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
20410
20411 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
20412 (_multiboot_mod_SOURCES): New variable.
20413 (_multiboot_mod_CFLAGS): Likewise.
20414 * loader/i386/pc/multiboot.c: New file.
20415 * include/pupa/i386/pc/multiboot.h: Likewise.
20416 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
20417 (pupa_multiboot_real_boot): New function.
20418 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
20419 (pupa_multiboot_real_boot): New prototype.
20420 (pupa_rescue_cmd_multiboot): Likewise
20421 (pupa_rescue_cmd_module): Likewise.
20422
20423 * kern/loader.c (pupa_loader_set): Continue when
20424 pupa_loader_unload_func() fails.
20425 (pupa_loader_unset): New function.
20426 * include/pupa/loader.h (pupa_loader_unset): New prototype.
20427
20428 * kern/misc.c (pupa_stpcpy): New function.
20429 * include/pupa/misc.h (pupa_stpcpy): New prototype.
20430
8e72a9c0 204312003-11-12 Marco Gerards <metgerards@student.han.nl>
20432
20433 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
20434 for available extensions.
20435
20436 * include/pupa/i386/pc/time.h: New file.
20437 * kern/disk.c: Include <pupa/machine/time.h>.
20438 (PUPA_CACHE_TIMEOUT): New macro.
20439 (pupa_last_time): New variable.
20440 (pupa_disk_open): Flush the cache when there was a timeout.
20441 (pupa_disk_close): Reset the timer.
20442 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
20443 pupa_currticks.
20444 * util/misc.c: Include <sys/times.h>
20445 (pupa_get_rtc): New function.
20446
c4adbd32 204472003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
20448
20449 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
20450 as blocks.
20451 (pupa_ext2_get_file_block): Use blocks member.
20452
20453 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
20454 first block. Return -1 instead of pupa_errno on error.
20455
bfd30f06 204562003-10-27 Marco Gerards <metgerards@student.han.nl>
20457
20458 * README: In the pupa-mkimage example use _chain instead of chain
20459 and ext2 instead of fat.
20460 * TODO: Replace ext2fs with jfs as an example. Add an item for
20461 adding journal playback for ext2fs.
20462 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
20463 (pkgdata_MODULES): Added ext2.mod.
20464 (ext2_mod_SOURCES): New variable.
20465 (ext2_mod_CFLAGS): Likewise.
20466 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
20467 * include/pupa/misc.h (pupa_strncpy): New prototype.
20468 (pupa_strcat): Likewise.
20469 (pupa_strncmp): Likewise.
20470 * kern/misc.c (pupa_strcat): Enable function.
20471 (pupa_strncpy): New function.
20472 (pupa_strncmp): Likewise.
20473 * fs/ext2.c: New file.
f19dbdb7 20474
bfd30f06 20475 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
20476 when the read failed before retrying.
20477 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
20478 (_FILE_OFFSET_BITS): Likewise.
20479 * configure.ac: Added AC_SYS_LARGEFILE.
20480
98d15063 204812003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
20482
20483 * genmk.rb (PModule#rule): Make sure to get only symbol names
20484 from the output of nm.
20485 Reported by Robert Millan <zeratul2@wanadoo.es>.
20486
18d9c7cd 204872003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
20488
20489 I forgot to check in these changes for a long time. This adds
20490 incomplete support for VGA console, and this is still very
20491 buggy. Also, a lot of consideration is required for I18N,
20492 UNICODE, and VGA font issues. Therefore, assume that this is
20493 such that "better than nothing".
f19dbdb7 20494
18d9c7cd 20495 * font/manager.c: New file.
20496 * include/pupa/font.h: Likewise.
20497 * include/pupa/i386/pc/vga.h: Likewise.
20498 * term/i386/pc/vga.c: Likewise.
20499 * util/unifont2pff.rb: Likewise.
20500
20501 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
20502 (pkgdata_MODULES): Added vga.mod and font.mod.
20503 (vga_mod_SOURCES): New variables.
20504 (vga_mod_CFLAGS): Likewise.
20505 (font_mod_SOURCES): Likewise.
20506 (font_mod_CFLAGS): Likewise.
20507
20508 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
20509
20510 * include/pupa/term.h: Include pupa/err.h.
f19dbdb7 20511 (struct pupa_term): Added init and fini.
18d9c7cd 20512 Changed the argument of putchar to pupa_uint32_t.
20513
20514 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
20515 (pupa_console_real_putchar): New prototype.
20516 (pupa_console_putchar): Removed.
20517 (pupa_console_checkkey): Exported.
20518 (pupa_console_getkey): Likewise.
20519
20520 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
20521 characters.
20522
20523 * kern/term.c (pupa_term_set_current): Rewritten.
20524 (pupa_putchar): Likewise.
20525 (pupa_putcode): New function.
20526
20527 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
20528 (pupa_console_real_putchar): ... this.
20529 (pupa_vga_set_mode): New function.
20530 (pupa_vga_get_font): Likewise.
20531
20532 * normal/command.c: Include pupa/term.h.
20533 (terminal_command): New function.
20534 (pupa_command_init): Register the command "terminal".
20535
20536 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
20537 (DISP_UP): Likewise.
20538 (DISP_RIGHT): Likewise.
20539 (DISP_DOWN): Likewise.
20540 (DISP_HLINE): Likewise.
20541 (DISP_VLINE): Likewise.
20542 (DISP_UL): Likewise.
20543 (DISP_UR): Likewise.
20544 (DISP_LL): Likewise.
20545 (DISP_LR): Likewise.
20546
20547 * term/i386/pc/console.c (pupa_console_putchar): New function.
f19dbdb7 20548
977329f5 205492003-02-08 NIIBE Yutaka <gniibe@m17n.org>
20550
20551 * util/resolve.c (pupa_util_resolve_dependencies): BUG
20552 FIX. Reverse the path_list.
20553
20554 * include/pupa/normal.h: Export pupa_register_command and
20555 pupa_unregister_command.
20556
20557 * hello/hello.c (pupa_cmd_hello): New module.
20558 * conf/i386-pc.rmk: Added hello.mod.
20559
1f5ab428 205602003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
20561
20562 * kern/i386/pc/lzo1x.S: New file.
f19dbdb7 20563
1f5ab428 20564 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
20565 (compress_kernel): New variable.
20566 (generate_image): Heavily modified to support compressing a
20567 large part of the core image.
20568
20569 * util/misc.c (pupa_util_read_image): Fix a file descriptor
20570 leak.
20571 (pupa_util_load_image): New function.
20572
20573 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
20574 (pupa_compressed_size): New variable.
20575 (codestart): Enable Gate A20 here.
20576 Decompress the compressed part of the core image.
20577 Rearrange the code to put functions and variables which are
20578 required for initialization in the non-compressed part.
20579 Include lzo1x.S.
20580
20581 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
20582 here.
20583
20584 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
20585
f19dbdb7 20586 * include/pupa/i386/pc/kernel.h
1f5ab428 20587 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
20588 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
20589 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
20590 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
20591 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
20592
20593 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
20594
20595 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
20596 (Utility#rule): Likewise.
20597
20598 * configure.ac: Check if LZO is available.
20599
ce5bf700 206002003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
20601
20602 * include/pupa/normal.h: New file.
20603 * include/pupa/setjmp.h: Likewise.
20604 * include/pupa/i386/setjmp.h: Likewise.
20605 * normal/cmdline.c: Likewise.
20606 * normal/command.c: Likewise.
20607 * normal/main.c: Likewise.
20608 * normal/menu.c: Likewise.
20609 * normal/i386/setjmp.S: Likewise.
f19dbdb7 20610
ce5bf700 20611 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
20612 (pupa_rescue_cmd_initrd): Likewise.
20613
20614 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
20615 Likewise.
20616
20617 * kern/i386/pc/startup.S (translation_table): New variable.
20618 (translate_keycode): New function.
20619 (pupa_console_getkey): Call translate_keycode.
20620
20621 * kern/rescue.c (attempt_normal_mode): New function.
20622 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
20623 it failed, print a message.
20624
20625 * kern/mm.c (pupa_real_malloc): Print more information when a
20626 free magic is broken.
20627 (pupa_free): If the first free header is not free actually, set
20628 it to P.
20629
20630 * kern/main.c (pupa_load_normal_mode): Just load the module
20631 "normal".
20632 (pupa_main): Don't print the message
20633 "Entering into rescue mode..." here.
20634
20635 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
20636 Declared.
20637 (pupa_rescue_cmd_initrd): Likewise.
20638 (pupa_rescue_cmd_initrd): Likewise.
20639
20640 * include/pupa/symbol.h (FUNCTION): Specify the type.
20641 (VARIABLE): Likewise.
20642
20643 * include/pupa/err.h (pupa_err_t): Added
20644 PUPA_ERR_UNKNOWN_COMMAND.
20645
20646 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
20647 (pupa_dl_get_prefix): Likewise.
20648
20649 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
20650 Added _chain.mod and _linux.mod instead of chain.mod and
20651 linux.mod.
20652 (chain_mod_SOURCES): Renamed to ...
20653 (_chain_mod_SOURCES): ... this.
20654 (chain_mod_CFLAGS): Renamed to ...
20655 (_chain_mod_CFLAGS): ... this.
20656 (linux_mod_SOURCES): Renamed to ...
20657 (_linux_mod_SOURCES): ... this.
20658 (linux_mod_CFLAGS): Renamed to ...
20659 (_linux_mod_CFLAGS): ... this.
20660 (normal_mod_SOURCES): New variable.
20661 (normal_mod_CFLAGS): Likewise.
20662 (normal_mod_ASFLAGS): Likewise.
20663
206642003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
20665
20666 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
20667 possible.
20668
fe6b695a 20669 * kern/dl.c (pupa_dl_ref): Refer depending modules
ce5bf700 20670 recursively.
20671 (pupa_dl_unref): Unrefer depending modules recursively.
20672 Don't call pupa_dl_unload implicitly, because PUPA can crash if
20673 a module is unloaded before one depending on that module is
20674 unloaded.
20675 (pupa_dl_unload): Unload depending modules explicitly,
20676 if possible.
20677
c04da074 206782003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
20679
20680 * include/pupa/i386/pc/linux.h: New file.
20681 * loader/i386/pc/linux.c: Likewise.
f19dbdb7 20682
c04da074 20683 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
20684 Removed.
20685 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
20686 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
20687 of PUPA_CHAINLOADER_BOOT_SECTOR.
20688
20689 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
20690 (pupa_linux_prot_size): New variable.
20691 (pupa_linux_tmp_addr): Likewise.
20692 (pupa_linux_real_addr): Likewise.
20693 (pupa_linux_boot_zimage): New function.
20694 (pupa_linux_boot_bzimage): Likewise.
20695
20696 * kern/i386/pc/init.c (struct mem_region): New structure.
20697 (MAX_REGIONS): New macro.
20698 (mem_regions): New variable.
20699 (num_regions): Likewise.
20700 (pupa_os_area_addr): Likewise.
20701 (pupa_os_area_size): Likewise.
20702 (pupa_lower_mem): Likewise.
20703 (pupa_upper_mem): Likewise.
20704 (add_mem_region): New function.
20705 (compact_mem_regions): Likewise.
20706 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
20707 the size of the conventional memory and that of so-called upper
20708 memory (before the first memory hole).
20709 Instead of adding each found region to free memory, use
20710 add_mem_region and add them after removing overlaps.
20711 Also, add only 1/4 of the upper memory to free memory. The rest
20712 is used for loading OS images. Maybe this is ad hoc, but this
20713 makes it much easier to relocate OS images when booting.
20714
20715 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
20716 (pupa_enter_rescue_mode): Don't register initrd and module.
20717
20718 * kern/mm.c: Include pupa/dl.h.
20719
20720 * kern/main.c: Include pupa/file.h and pupa/device.h.
20721
20722 * kern/loader.c (pupa_loader_load_module_func): Removed.
20723 (pupa_loader_load_module): Likewise.
20724
20725 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
20726 ``.o''.
20727
20728 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
20729 (pupa_linux_tmp_addr): Likewise.
20730 (pupa_linux_real_addr): Likewise.
20731 (pupa_linux_boot_zimage): Likewise.
20732 (pupa_linux_boot_bzimage): Likewise.
20733
20734 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
20735 (pupa_upper_mem): Likewise.
20736 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
20737 module is too dangerous.
20738
20739 * include/pupa/loader.h (pupa_os_area_addr): Declared.
20740 (pupa_os_area_size): Likewise.
20741 (pupa_loader_set): Remove the first argument. Loader doesn't
20742 manage modules or initrd any longer.
20743 (pupa_loader_load_module): Removed.
20744
20745 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
20746 (linux_mod_SOURCES): New variable.
20747 (linux_mod_CFLAGS): Likewise.
20748
a13f9237 207492003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
20750
20751 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
20752 the length of a blocklist correctly.
20753
20754 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
20755 Use ioctl only if the OS file is a block device.
20756 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
20757 not very useful for normal files.
20758
20759 * kern/main.c (pupa_set_root_dev): New function.
20760 (pupa_load_normal_mode): Likewise.
20761 (pupa_main): Call those above.
20762
20763 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
20764 pupa_uint16_t.
20765
20766 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
20767
a5ffe966 207682003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
20769
20770 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
20771 (setup): Configure the installed partition information and the
20772 dl prefix.
20773
20774 * loader/i386/pc/chainloader.c (my_mod): New variable.
20775 (pupa_chainloader_unload): New function.
20776 (pupa_rescue_cmd_chainloader): Refer itself.
20777 (PUPA_MOD_INIT): Save its own module in MY_MOD.
20778
20779 * kern/i386/pc/startup.S (install_partition): Removed.
20780 (version_string): Likewise.
20781 (config_file): Likewise.
20782 (pupa_install_dos_part): New variable.
20783 (pupa_install_bsd_part): Likewise.
20784 (pupa_prefix): Likewise.
20785 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
20786
20787 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
20788 and pupa/misc.h.
20789 (make_install_device): New function.
20790 (pupa_machine_init): Set the dl prefix.
20791
20792 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
20793 (buf): Renamed to ...
20794 (linebuf): ... this.
20795 (pupa_rescue_cmd_prefix): New function.
20796 (pupa_rescue_cmd_insmod): Likewise.
20797 (pupa_rescue_cmd_rmmod): Likewise.
20798 (pupa_rescue_cmd_lsmod): Likewise.
20799 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
20800 rmmod and lsmod.
20801
20802 * kern/mm.c (pupa_memalign): If failed even after invalidating
20803 disk caches, unload unneeded modules and retry.
20804
20805 * kern/misc.c (pupa_memmove): New function.
20806 (pupa_memcpy): Removed.
20807 (pupa_strcpy): New function.
20808 (pupa_itoa): Made static.
20809
20810 * kern/dl.c (pupa_dl_iterate): New function.
20811 (pupa_dl_ref): Likewise.
20812 (pupa_dl_unref): Likewise.
20813 (pupa_dl_unload): Return if succeeded or not.
20814 (pupa_dl_unload_unneeded): New function.
20815 (pupa_dl_unload_all): Likewise.
20816 (pupa_dl_init): Renamed to ...
20817 (pupa_dl_set_prefix): ... this.
20818 (pupa_dl_get_prefix): New function.
20819
20820 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
20821 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
20822 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
20823 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
20824 (pupa_install_dos_part): Declared.
20825 (pupa_install_bsd_part): Likewise.
20826 (pupa_prefix): Likewise.
20827 (pupa_boot_drive): Likewise.
20828
20829 * include/pupa/types.h: Fix a typo.
20830
20831 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
20832 pupa_memmove.
20833 (pupa_memmove): Declared.
20834 (pupa_strcpy): Likewise.
20835
20836 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
20837 pupa_mod_init takes one argument, its own module.
20838 (pupa_dl_unload_unneeded): Declared.
20839 (pupa_dl_unload_all): Likewise.
20840 (pupa_dl_ref): Likewise.
20841 (pupa_dl_unref): Likewise.
20842 (pupa_dl_iterate): Likewise.
20843 (pupa_dl_init): Renamed to ...
20844 (pupa_dl_set_prefix): ... this.
20845 (pupa_dl_get_prefix): Declared.
20846
20847 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
f19dbdb7 20848 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
a5ffe966 20849 unloaded.
20850 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
20851 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
20852
20853 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
20854 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
20855
012d7999 208562003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
20857
20858 * util/i386/pc/pupa-setup.c (setup): Define the internal
20859 function find_first_partition_start at the top level, because GCC
20860 3.0.x cannot compile internal functions in deeper scopes
20861 correctly.
20862 (find_root_device): Use lstat instead of stat.
20863 Don't follow symbolic links.
20864 Fix the path-constructing code.
20865
20866 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
20867 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
20868 by a BLKGETSIZE ioctl first, because block devices don't fill
20869 the member st_mode of the structure stat on Linux.
20870 [__linux__] (linux_find_partition): Use a temporary buffer
20871 REAL_DEV for the working space. Copy it to DEV before returning.
20872 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
20873 buffer cache consistent.
20874 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
20875 strncmp. The previous value was merely wrong.
20876 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
20877
20878 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
20879 FAT size is 12. The previous value was merely wrong.
20880
20881 * kern/main.c (pupa_main): Don't split the starting message from
20882 newlines.
20883
20884 * kern/term.c (pupa_putchar): Put CR after LF instead of before
20885 LF, because BIOS goes crazy about character attributes in this
20886 case.
20887
1cc73a62 208882003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
20889
20890 * include/i386/pc/util/biosdisk.h: New file.
20891 * util/i386/pc/biosdisk.c: Likewise.
20892 * util/i386/pc/pupa-setup.c: Likewise.
f19dbdb7 20893
1cc73a62 20894 * Makefile.in (INCLUDE_DISTFILES): Added
20895 include/pupa/i386/pc/util/biosdisk.h.
20896 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
20897 directory util/i386/pc.
20898 (install-local): Added a rule for sbin_UTILITIES.
20899 (uninstall): Likewise.
20900
20901 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
20902
20903 * util/misc.c (xrealloc): New function.
20904 (pupa_malloc): Likewise.
20905 (pupa_free): Likewise.
20906 (pupa_realloc): Likewise.
20907 (pupa_stop): Likewise.
20908 (pupa_putchar): Likewise.
20909
20910 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
20911
20912 * include/pupa/util/misc.h (xrealloc): Declared.
20913
20914 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
20915 macro.
20916 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
20917 (PUPA_BOOT_MACHINE_BPB_END): ... this.
20918
20919 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
20920 [PUPA_UTIL] (pupa_fat_fini): Likewise.
20921
20922 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
20923 way should be implemented.
20924 [PUPA_UTIL] (pupa_fat_fini): Likewise.
20925
20926 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
20927 the size of NAME for safety.
20928 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
20929 0x88.
20930
20931 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
20932 (pupa_setup_SOURCES): Likewise.
20933
20934 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
20935
08b70fe8 209362002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
20937
20938 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
20939 bunch of pushl's from pusha, because this destroys the return
20940 value.
20941
62ddcc8f 209422002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
20943
20944 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
20945 This means that any missing prototypes could be fatal. Also, you
20946 must take care when writing assembly code. See the comments at
20947 the beginning of startup.S, for more details.
f19dbdb7 20948
62ddcc8f 20949 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
20950 compilation mechanism.
20951 (pupa_chainloader_real_boot): Likewise.
20952 (pupa_biosdisk_rw_int13_extensions): Likewise.
20953 (pupa_biosdisk_rw_standard): Likewise.
20954 (pupa_biosdisk_check_int13_extensions): Likewise.
20955 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
20956 (pupa_biosdisk_get_diskinfo_standard): Likewise.
20957 (pupa_get_memsize): Likewise.
20958 (pupa_get_mmap_entry): Likewise.
20959 (pupa_console_putchar): Likewise.
20960 (pupa_console_setcursor): Likewise.
20961 (pupa_getrtsecs): Use pushl instead of push.
20962
20963 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
20964 memory instead of the stack for a mmap entry, because some
20965 BIOSes may ignore the maximum size and overflow.
20966
20967 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
20968
20969 * genmk.rb (PModule#rule): Compile automatically generated
20970 sources with module-specific CFLAGS as well as other sources.
20971
9962ed99 209722002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
20973
20974 * configure.ac: Check ld.
20975 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
20976 respectively, before checking endianness and sizes.
20977
20978 * Makefile.in (LD): New variable.
f19dbdb7 20979
abdfc3c5 209802002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
20981
20982 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
20983
6a161fa9 209842002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
20985
20986 * Changelog: New file.
20987