2008-11-25 Felix Zielcke <fzielcke@z-51.de>
[grub2/phcoder.git] / ChangeLog
blob29dfbabaf91dd03de5f9a81ce969e5d595440bc8
1 2008-11-25  Felix Zielcke  <fzielcke@z-51.de>
3         * util/grub-fstest.c (grub_term_get_current_input): Change return type
4         to `grub_term_input_t'.
5         (grub_term_get_current_output): Change return type to
6         `grub_term_output_t'.
8 2008-11-22  Robert Millan  <rmh@aybabtu.com>
10         Fix breakage on coreboot due to declaration missmatch.
11         * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
12         (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
13         grub_vga_text_cls().
15         * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
16         comments.  Avoid copiing one more byte than necessary (just in case).
18         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
19         to 0x200000 (avoids trouble with some OFW implementations, and matches
20         with the one in Yaboot).
21         Reported by Manoel Abranches
23 2008-11-20  Robert Millan  <rmh@aybabtu.com>
25         * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
26         (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
28         * util/grub-mkconfig_lib.in (grub_warn): New function.
29         (convert_system_path_to_grub_path): Use grub_warn() when issuing
30         warnings, to obtain consistent formatting.
31         * util/grub.d/00_header.in: Likewise.
32         * util/update-grub_lib.in: Likewise.
34         * loader/i386/linux.c (allocate_pages): Fix a warning.
35         Move comment text to `#error' stanza.
37         Harmonize ieee1275's grub_available_iterate() with the generic
38         grub_machine_mmap_iterate() interface (fixes a recently-introduced
39         build problem on i386-ieee1275):
40         * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
41         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here.  Add third
42         parameter `type'.  Update all users of this function.
43         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
44         `kern/ieee1275/mmap.c'.
45         * kern/ieee1275/init.c
46         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
47         with ...
48         (grub_machine_mmap_iterate): ... this.
49         * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
50         return type to `grub_err_t'.  Update all implementations of this
51         function prototype.
52         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
53         Likewise.
55         Add `lsmmap' command (lists firmware-provided memory map):
56         * commands/lsmmap.c: New file.
57         * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
58         (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
59         variables.
60         * conf/powerpc-ieee1275.rmk: Likewise.
61         * conf/i386-coreboot.rmk: Likewise.
62         * conf/i386-ieee1275.rmk: Likewise.
64 2008-11-19  Robert Millan  <rmh@aybabtu.com>
66         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
67         * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
68         constraints to initrd allocation (based on code from
69         loader/i386/pc/linux.c).  Without them, initrd was allocated too high
70         for Linux to find it.
72 2008-11-14  Robert Millan  <rmh@aybabtu.com>
74         * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
75         order to cope with duplicate slashes.
77 2008-11-14  Robert Millan  <rmh@aybabtu.com>
79         * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
80         Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000).  We
81         don't want to mess with lower memory, because it is used in the Linux
82         loader.
84         * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
85         an appropiate place in lower memory, between 0x10000 and 0x90000,
86         like loader/i386/efi/linux.c does.  Linux often panics if real_mode_mem
87         is in our heap (probably as a result of it being corrupted during
88         decompression).  Add #error instance with comment to explain why this
89         loader isn't currently usable on PC/BIOS.
91 2008-11-14  Robert Millan  <rmh@aybabtu.com>
93         * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
94         (GRUB_SERIAL_PORT_NUM): Fix misscalculation.
96 2008-11-12  Robert Millan  <rmh@aybabtu.com>
98         Make loader/i386/linux.c buildable on i386-pc (although disabled).
100         * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
101         (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
102         from here ...
103         * include/grub/i386/pc/memory.h: ... to here.
105 2008-11-12  Robert Millan  <rmh@aybabtu.com>
107         Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
108         split).
110         * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
111         (grub_console_cur_color, grub_console_real_putchar)
112         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
113         (grub_console_setcolorstate, grub_console_setcolor)
114         (grub_console_getcolor): Move from here ...
115         * include/grub/i386/vga_common.h: ... to here (new file).
117         * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
118         `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
119         `<grub/i386/io.h>'.
120         * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
121         `<grub/i386/vga_common.h>'.
123 2008-11-12  Robert Millan  <rmh@aybabtu.com>
125         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
126         * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
127         (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
128         variables.
129         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
130         `term/i386/pc/console.c' with `term/i386/vga_common.c'.
132         * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
133         grub_console_init() with call to grub_vga_text_init().
134         (grub_machine_fini): Replace call to
135         grub_console_fini() with call to grub_vga_text_fini() and
136         grub_at_keyboard_fini().
138         * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
139         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
140         (grub_console_setcolorstate, grub_console_setcolor)
141         (grub_console_getcolor): New function prototypes.
143         * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
144         (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
145         (grub_vga_text_setcursor): Static-ize.
146         (grub_vga_text_term): New structure.
147         (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
149         * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
150         (grub_console_cur_color, grub_console_standard_color)
151         (grub_console_normal_color, grub_console_highlight_color)
152         (map_char, grub_console_putchar, grub_console_getcharwidth)
153         (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
154         (grub_console_getcolor): Move from here ...
155         * term/i386/vga_common.c: ... to here (same function names).
157 2008-11-12  Robert Millan  <rmh@aybabtu.com>
159         Use newly-added Multiboot support in coreboot.
161         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
162         `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
164         * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
165         alignment, set `MULTIBOOT_MEMORY_INFO' flag.
166         (codestart): Store the MBI in `startup_multiboot_info' when we're
167         being loaded using Multiboot.
169         * kern/i386/coreboot/init.c (grub_machine_init): Move
170         grub_at_keyboard_init() call to beginning of function (useful for
171         debugging).  Call grub_machine_mmap_init() before attempting to use
172         grub_machine_mmap_iterate().
173         (grub_lower_mem, grub_upper_mem): Move from here ...
174         * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
175         here (new file).
177         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
178         function prototype.
180 2008-11-12  Robert Millan  <rmh@aybabtu.com>
182         Fix a regression introduced by the at_keyboard.mod split.  Because
183         some terminals are default on some platforms and non-default on
184         others, the first terminal being registered determines which is
185         going to be default.
187         * kern/term.c (grub_term_register_input): If this is the first
188         terminal being registered, set it as the current one.
189         (grub_term_register_output): Likewise.
191         * term/efi/console.c (grub_console_init): Do not call
192         grub_term_set_current_output() or grub_term_set_current_input().
193         * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
194         * term/i386/pc/console.c (grub_console_init): Likewise.
195         (grub_console_fini): Do not call grub_term_set_current_input()
196         (but leave grub_term_set_current_output() to restore text mode).
198 2008-11-10  Robert Millan  <rmh@aybabtu.com>
200         * util/grub.d/00_header.in: Add backward compatibility check for
201         versions of terminal.mod that don't understand `terminal_input' or
202         `terminal_output'.
204 2008-11-09  Robert Millan  <rmh@aybabtu.com>
206         * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
207         `terminal_input' / `terminal_output', not `terminal'.
209 2008-11-08  Robert Millan  <rmh@aybabtu.com>
211         * Makefile.in (include_DATA): Fix srcdir=. assumption.
212         (DISTCLEANFILES): Add `build_env.mk'.
214 2008-11-08  Robert Millan  <rmh@aybabtu.com>
216         * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
217         `struct grub_term_output'.  Remove `.checkkey' and `.getkey'
218         members.  Update all users.
219         * util/console.c (grub_ncurses_term): Split in ...
220         (grub_ncurses_term_input): ... this, and ...
221         (grub_ncurses_term_output): ... this.  Update all users.
222         * term/ieee1275/ofconsole.c: Remove stale `#endif'.
224 2008-11-08  Robert Millan  <rmh@aybabtu.com>
226         * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
227         (PKGDATA): Add $(pkgdata_SRCDIR).
228         (pkglib_BUILDDIR): New variable.
229         (pkgdata_SRCDIR): New variable.
230         (build_env.mk): New target.
231         (include_DATA): New variable.
232         (install-local): Install $(include_DATA) files in $(includedir).
234 2008-11-07  Pavel Roskin  <proski@gnu.org>
236         * gendistlist.sh: Use C locale for sorting to ensure consistent
237         output on all systems.
239         * util/grub.d/00_header.in: Remove incorrect space before
240         "serial".
242 2008-11-07  Robert Millan  <rmh@aybabtu.com>
244         * include/multiboot2.h (struct multiboot_header): Add `flags' member as
245         per specification.
246         * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
247         * loader/multiboot_loader.c (find_multi_boot2_header): New function
248         (based on find_multi_boot1_header).
249         (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
250         using find_multi_boot2_header(), and abort if neither Multiboot or
251         Multiboot headers were found.
253 2008-11-07  Robert Millan  <rmh@aybabtu.com>
255         Modularize at_keyboard.mod:
257         * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
258         (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
259         (at_keyboard_mod_LDFLAGS): New variables.
261         Actual terminal split:
263         * include/grub/term.h (struct grub_term): Split in ...
264         (struct grub_term_input): ... this, and ...
265         (struct grub_term_output): ... this.  Update all users.
266         (grub_term_set_current): Split in ...
267         (grub_term_set_current_input): ... this, and ...
268         (grub_term_set_current_output): ... this.
269         (grub_term_get_current): Split in ...
270         (grub_term_get_current_input): ... this, and ...
271         (grub_term_get_current_output): ... this.
272         (grub_term_register): Split in ...
273         (grub_term_register_input): ... this, and ...
274         (grub_term_register_output): ... this.
275         (grub_term_unregister): Split in ...
276         (grub_term_unregister_input): ... this, and ...
277         (grub_term_unregister_output): ... this.
278         (grub_term_iterate): Split in ...
279         (grub_term_iterate_input): ... this, and ...
280         (grub_term_iterate_output): ... this.
282         * kern/term.c (grub_term_list): Split in ...
283         (grub_term_list_input): ... this, and ...
284         (grub_term_list_output): ... this.  Update all users.
285         (grub_cur_term): Split in ...
286         (grub_cur_term_input): ... this, and ...
287         (grub_cur_term_output): ... this.  Update all users.
288         (grub_term_set_current): Split in ...
289         (grub_term_set_current_input): ... this, and ...
290         (grub_term_set_current_output): ... this.
291         (grub_term_get_current): Split in ...
292         (grub_term_get_current_input): ... this, and ...
293         (grub_term_get_current_output): ... this.
294         (grub_term_register): Split in ...
295         (grub_term_register_input): ... this, and ...
296         (grub_term_register_output): ... this.
297         (grub_term_unregister): Split in ...
298         (grub_term_unregister_input): ... this, and ...
299         (grub_term_unregister_output): ... this.
300         (grub_term_iterate): Split in ...
301         (grub_term_iterate_input): ... this, and ...
302         (grub_term_iterate_output): ... this.
304         * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
305         a check for input and one for output (and only attempt to get keys
306         from user when input works).
308         * util/grub-probe.c (grub_term_get_current): Split in ...
309         (grub_term_get_current_input): ... this, and ...
310         (grub_term_get_current_output): ... this.
311         * util/grub-fstest.c: Likewise.
312         * util/i386/pc/grub-setup.c: Likewise.
313         * util/grub-editenv.c: Likewise.
315         Portability adjustments:
317         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
318         `term/i386/pc/at_keyboard.c'.
319         * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
320         grub_keyboard_controller_init() (now handled by terminal .init).
321         * kern/i386/coreboot/init.c (grub_machine_init): Add call to
322         grub_at_keyboard_init().
323         * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
324         (grub_console_checkkey, grub_console_getkey): Remove (now provided by
325         at_keyboard.mod via input terminal interface).
326         * include/grub/i386/coreboot/console.h: Convert into a stub for
327         `<grub/i386/pc/console.h>'.
329         Migrate full terminals to new API:
331         * term/efi/console.c (grub_console_term): Split into ...
332         (grub_console_term_input): ... this, and ...
333         (grub_console_term_output): ... this.  Update all users.
334         * term/ieee1275/ofconsole.c: Remove __i386__ hack.
335         (grub_ofconsole_init): Split into ...
336         (grub_ofconsole_init_input): ... this, and ...
337         (grub_ofconsole_init_output): ... this.
338         (grub_ofconsole_term): Split into ...
339         (grub_ofconsole_term_input): ... this, and ...
340         (grub_ofconsole_term_output): ... this.  Update all users.
341         * term/i386/pc/serial.c (grub_serial_term): Split into ...
342         (grub_serial_term_input): ... this, and ...
343         (grub_serial_term_output): ... this.  Update all users.
344         * term/i386/pc/console.c (grub_console_term): Split into ...
345         (grub_console_term_input): ... this, and ...
346         (grub_console_term_output): ... this.  Update all users.
347         (grub_console_term_input): Only enable it on PC/BIOS platform.
348         (grub_console_init): Remove grub_keyboard_controller_init() call.
350         Migrate input terminals to new API:
352         * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
353         `i386' and `i386/pc' to enable build on x86_64 (this driver is
354         i386-specific anyway).
355         (grub_console_checkkey): Rename to ...
356         (grub_at_keyboard_checkkey): ... this.  Static-ize.  Update all
357         users.
358         (grub_keyboard_controller_orig): New variable.
359         (grub_console_getkey): Rename to ...
360         (grub_at_keyboard_getkey): ... this.  Static-ize.  Update all
361         users.
362         (grub_keyboard_controller_init): Static-ize.  Save original
363         controller value so that it can be restored ...
364         (grub_keyboard_controller_fini): ... here (new function).
365         (grub_at_keyboard_term): New structure.
366         (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
367         functions.
369         Migrate output terminals to new API:
371         * term/i386/pc/vga.c (grub_vga_term): Change type to
372         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
373         members.  Update all users.
374         * term/gfxterm.c (grub_video_term): Change type to
375         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
376         members.  Update all users.
377         * include/grub/i386/pc/console.h (grub_console_checkkey)
378         (grub_console_getkey): Do not export (no longer needed by gfxterm,
379         etc).
381         Migrate `terminal' command and userland tools to new API:
383         * commands/terminal.c (grub_cmd_terminal): Split into ...
384         (grub_cmd_terminal_input): ... this, and ...
385         (grub_cmd_terminal_output): ... this.
386         (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
387         `terminal_input' and `terminal_output'.
388         * util/grub.d/00_header.in: Adjust `terminal' calls to new
389         `terminal_input' / `terminal_output' API.
390         * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
391         ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
392         provided ${GRUB_TERMINAL}, convert it).
394 2008-11-04  Robert Millan  <rmh@aybabtu.com>
396         * util/grub.d/10_freebsd.in: New file.  Generate grub configuration
397         for FreeBSD.
398         * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
400 2008-11-03  Bean  <bean123ch@gmail.com>
402         * kern/elf.c (grub_elf32_load): Revert to previous code.
403         (grub_elf64_load): Likewise.
405         * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
407 2008-11-01  Robert Millan  <rmh@aybabtu.com>
409         * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
410         (TARGET_CPPFLAGS): Likewise.
411         * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
413 2008-11-01  Carles Pina i Estany  <carles@pina.cat>
415         * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
417 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
419         * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
420         addition of objects until the code is not going to be able to fail.
422 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
424         * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
425         (add a missing NULL check, and correct them by moving the pointer
426         operations after the actual check).
428 2008-10-29  Robert Millan  <rmh@aybabtu.com>
430         * util/i386/pc/grub-install.in: Handle empty string as output from
431         make_system_path_relative_to_its_root().
433 2008-10-05  Hans Lambermont  <hans@lambermont.dyndns.org>
435         * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
436         circular metadata worst case scenario. If the metadata is circular
437         then copy the wrap in place.
438         * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
439         project lib/format_text/layout.h
440         Circular metadata bug found and patch debugged by Jan Derk Gerlings.
442 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
444         * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
446 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
448         * util/update-grub_lib.in: Mention filename in warning message.
450 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
452         * NEWS: Update for rename of update-grub to grub-mkconfig.
454 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
456         * util/update-grub_lib.in: Copy to ...
457         * util/grub-mkconfig_lib.in: ... this.  Update all users.
458         * util/update-grub_lib.in: Make it a stub to `grub-mkconfigig_lib.in'.
459         * util/update-grub.in: Rename to ...
460         * util/grub-mkconfig.in: ... this.  Update all users.  Remove `-y'
461         option. Add `--output' option to allow users to specify the generated
462         configuration file.  Default to stdout.
463         (update_grub_dir): Rename to ...
464         (grub_mkconfig_dir): ... this.
465         (grub_cfg): Default to an empty string.
466         * conf/common.rmk (update-grub): Rename to ...
467         (grub-mkconfig): ... this.
468         (update-grub_lib): Copy to ...
469         (grub-mkconfig_lib): ... this.
470         (update-grub_SCRIPTS): Copy to ...
471         (grub-mkconfig_SCRIPTS): ... this. Update all users.
472         (update-grub_DATA): Rename to ...
473         (grub-mkconfig_DATA): ... this.
475 2008-09-28  Robert Millan  <rmh@aybabtu.com>
477         * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
478         to `modified'.  Add the real `created' field.
479         (grub_iso9660_uuid): Use `modified' rather than `created' for
480         constructing the UUID.
482 2008-09-28  Felix Zielcke  <fzielcke@z-51.de>
484         fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
485         Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
487 2008-09-28  Bean  <bean123ch@gmail.com>
489         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
490         Thanks to Christian Franke for finding this bug.
492 2008-09-25  Robert Millan  <rmh@aybabtu.com>
494         * util/grub-mkdevicemap.c (make_device_map): Actually replace all
495         instances of grub_util_get_disk_name() (see previous commit).
497 2008-09-25  Robert Millan  <rmh@aybabtu.com>
499         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
500         `util/i386/get_disk_name.c'.
501         * conf/i386-efi.rmk: Likewise.
502         * conf/x86_64-efi.rmk: Likewise.
503         * conf/i386-coreboot.rmk: Likewise.
504         * conf/i386-ieee1275.rmk: Likewise.
505         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
506         `util/ieee1275/get_disk_name.c'.
507         * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
508         * util/ieee1275/get_disk_name.c: Remove file.
509         * util/i386/get_disk_name.c: Remove file.
510         * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
511         "hd%d" for device.map entries, rather than using
512         grub_util_get_disk_name().
514 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
516         * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
517         warning.
518         * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
520 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
522         * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
523         Changed to 0x5100.
524         (GRUB_TERM_PPAGE): Changed to 0x4900.
526 2008-09-24  Robert Millan  <rmh@aybabtu.com>
528         * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
529         macros (they were i386-pc specific).
530         * include/grub/sparc64/ieee1275/console.h: Likewise.
531         * include/grub/efi/console.h: Likewise.
533 2008-09-22  Bean  <bean123ch@gmail.com>
535         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
536         resident and in attribute list.
538         * include/grub/ntfs.h (BMP_LEN): Removed.
540 2008-09-22  Bean  <bean123ch@gmail.com>
542         * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
543         scsi->name and scsi->luns, as they will be set in grub_scsi_open.
545         * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
546         error occurs, as grub_disk_open will call grub_disk_close, which will
547         call p->close (scsi).
549 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
551         * configure.ac (AC_INIT): Quote `GRUB' string and version number.
552         (AC_PREREQ): Bumped to 2.59.
553         (AC_TRY_COMPILE): Replace obsolete macro with ...
554         (AC_COMPILE_IFELSE): ... this.
555         * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
556         (AC_LINK_IFELSE): ... this.
558 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
560         * autogen.sh: Add a call to `gendistlist.sh'.
562 2008-09-19  Christian Franke  <franke@computer.org>
564         * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
565         * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
566         * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
567         Export __enable_execute_stack() to modules.
568         * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
569         New function.
571 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
573         * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
574         Sort the list.
576 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
578         * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
579         #include <grub/util/hostdisk.h>.
581 2008-09-08  Robert Millan  <rmh@aybabtu.com>
583         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
584         segments when their filesz is zero (grub_file_read() interprets
585         zero-size as "read until EOF", which results in memory corruption).
586         Use `lowest_segment' rather than 0 for calculating the current
587         segment load address.
589 2008-09-08  Robert Millan  <rmh@aybabtu.com>
591         * util/hostdisk.c (open_device): Replace a grub_util_info() call
592         with grub_dprintf("hostdisk", ...), as it was so verbose that it
593         clobbered useful information.
595 2008-09-08  Robert Millan  <rmh@aybabtu.com>
597         * include/grub/util/biosdisk.h: Move to ...
598         * include/grub/util/hostdisk.h: ... here.  Update all users.
599         * util/biosdisk.c: Move to ...
600         * util/hostdisk.c: ... here.  Update all users.
602 2008-09-07  Robert Millan  <rmh@aybabtu.com>
604         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
605         variables.
606         (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
607         and length can be stored directly in the `mbi->mmap_addr' and
608         `mbi->mmap_length' struct fields.
610 2008-09-07  Robert Millan  <rmh@aybabtu.com>
612         * conf/i386.rmk: New file.  Provides declaration for building
613         `cpuid.mod'.
614         * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
615         (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
616         variables.
617         Include `conf/i386.mk'.
618         * conf/i386-efi.rmk: Likewise.
619         * conf/x86_64-efi.rmk: Likewise.
620         * conf/i386-coreboot.rmk: Likewise.
621         * conf/i386-ieee1275.rmk: Likewise.
623 2008-09-07  Vesa Jääskeläinen  <chaac@nic.fi>
625         Based on patch created by Colin D Bennett <colin@gibibit.com>.
626         Adds optimization support for BGR based modes.
628         * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
629         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
630         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
631         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
632         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
633         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
634         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
635         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
636         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
637         (grub_video_i386_vbeblit_index_index): Likewise.
638         (grub_video_i386_vbeblit_replace_directN): Added.
639         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
640         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
641         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
642         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
643         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
644         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
645         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
646         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
647         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
648         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
649         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
650         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
651         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
653         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
654         (grub_video_i386_vbefill_R8G8B8): Likewise.
655         (grub_video_i386_vbefill_index): Likewise.
656         (grub_video_i386_vbefill_direct32): Added.
657         (grub_video_i386_vbefill_direct24): Likewise.
658         (grub_video_i386_vbefill_direct16): Likewise.
659         (grub_video_i386_vbefill_direct8): Likewise.
661         * include/grub/video.h (grub_video_blit_format): Removed
662         GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
663         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
664         GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
665         GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
666         GRUB_VIDEO_BLIT_FORMAT_BGR_565.
668         * video/video.c (grub_video_get_blit_format): Updated to use new
669         blit formats.  Added handling for 16 bit color modes.
671         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
672         fillers.
673         (common_blitter): Updated to use new blitters.
675         * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
676         Removed.
677         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
678         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
679         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
680         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
681         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
682         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
683         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
684         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
685         (grub_video_i386_vbeblit_index_index): Likewise.
686         (grub_video_i386_vbeblit_replace_directN): Added.
687         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
688         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
689         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
690         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
691         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
692         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
693         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
694         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
695         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
696         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
697         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
698         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
699         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
701         * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
702         (grub_video_i386_vbefill_R8G8B8): Likewise.
703         (grub_video_i386_vbefill_index): Likewise.
704         (grub_video_i386_vbefill_direct32): Added.
705         (grub_video_i386_vbefill_direct24): Likewise.
706         (grub_video_i386_vbefill_direct16): Likewise.
707         (grub_video_i386_vbefill_direct8): Likewise.
709         * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
710         types.
712         * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
713         types.
715         * video/readers/png.c (grub_png_decode_image_header): Adapt to new
716         blitter types.
718         * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
719         types.
721 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
723         * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
724         RAID level 1.
726 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
728         * fs/iso9660.c (grub_iso9660_date): New structure.
729         (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
730         (grub_iso9660_uuid): New function.
732 2008-09-05  Bean  <bean123ch@gmail.com>
734         * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
736         * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
737         insensitive bit for names in Win32 and Win32 & DOS namespace.
739         * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
741         * include/grub/types.h (LONG_MAX): Likewise.
743 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
745         * util/getroot.c: Include <config.h>.
746         (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
747         add support for /dev/md/N devices and handle LVM double dash escaping.
749 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
751         * config.guess: Update to latest version from config git.
752         * config.sub: Likewise.
754 2008-09-03  Robert Millan  <rmh@aybabtu.com>
756         * disk/scsi.c (grub_scsi_open): Remove size limit when printing
757         `disk->total_sectors'.
759 2008-09-01  Colin D Bennett  <colin@gibibit.com>
761         * include/grub/normal.h: Fixed incorrect comment for
762         GRUB_COMMAND_FLAG_NO_ARG_PARSE.
764 2008-09-01  Colin D Bennett  <colin@gibibit.com>
766         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
767         values with defines.
769         * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
770         (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
771         (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
772         (GRUB_VBE_MODEATTR_COLOR): Likewise.
773         (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
774         (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
775         (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
776         (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
777         (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
778         (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
779         (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
780         (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
781         (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
782         (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
783         (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
784         (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
785         (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
786         (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
787         (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
789 2008-08-31  Robert Millan  <rmh@aybabtu.com>
791         * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
792         declaration.
793         (grub_multiboot): Fix a few warnings.
795 2008-08-31  Robert Millan  <rmh@aybabtu.com>
797         * loader/i386/pc/multiboot.c: Update comment not to say that
798         boot_device support is unimplemented.
800 2008-08-31  Robert Millan  <rmh@aybabtu.com>
802         * loader/i386/pc/multiboot.c: Update comment not to say that a.out
803         or memory map support are unimplemented.
805 2008-08-31  Colin D Bennett  <colin@gibibit.com>
807         * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
809 2008-08-31  Colin D Bennett  <colin@gibibit.com>
811         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
812         total video memory in 'vbeinfo' output; show color format details for
813         each video mode.
815 2008-08-30  Pavel Roskin  <proski@gnu.org>
817         * util/genmoddep.c: Remove for real this time.
818         * DISTLIST: Remove util/genmoddep.c.
820 2008-08-30  Robert Millan  <rmh@aybabtu.com>
822         * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
823         as required by Multiboot spec (it was already 4-byte aligned, but
824         only by chance).
826 2008-08-29  Pavel Roskin  <proski@gnu.org>
828         * kern/powerpc/ieee1275/crt0.S: Rename to ...
829         * kern/powerpc/ieee1275/startup.S: ... this.
830         * conf/powerpc-ieee1275.rmk: Adjust for the above.
831         * DISTLIST: Likewise.
833         * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
834         grub/cpu/kernel.h.  Add start label for consistency with other
835         platforms.  Add grub_prefix immediately after start.  Add jump
836         to the code after grub_prefix.
837         * include/grub/powerpc/kernel.h: Provide valid values for
838         GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
840 2008-08-29  Bean  <bean123ch@gmail.com>
842         * configure.ac: Change host_os to cygwin for mingw.
843         (asprintf): New check for function.
845         * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
846         #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
848         * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
849         declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
850         sync, sleep and grub_util_get_disk_size for mingw.
852         * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
853         to get size in mingw.
854         (open_device): Use flag O_BINARY if it's defined.
855         (find_root_device): Add dummy code for mingw.
857         * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
858         (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
859         (get_scsi_disk_name): Return 0 for mingw.
861         * util/hostfs.c: #include <grub/util/misc.h>.
862         (grub_hostfs_open): Use "rb" flag to open file, use
863         grub_util_get_disk_size to get disk size for mingw.
865         * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
866         (asprintf): New function if HAVE_ASPRINTF is not set.
867         (sync): New function for mingw.
868         (sleep): Likewise.
869         (grub_util_get_disk_size): Likewise.
871 2008-08-28  Pavel Roskin  <proski@gnu.org>
873         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
874         kern/time.c.
876 2008-08-28  Robert Millan  <rmh@aybabtu.com>
878         * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
880 2008-08-28  Robert Millan  <rmh@aybabtu.com>
882         Change find_grub_drive() syntax so it doesn't prevent it from
883         detecting NULL names as errors.
885         * util/biosdisk.c (find_grub_drive): Move free slot search code
886         from here ...
887         (find_free_slot): ... to here.
888         (read_device_map): Use find_free_slot() to search for free slots.
890 2008-08-27  Marco Gerards  <marco@gnu.org>
892         * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
893         (scsi_mod_SOURCES): New variable.
894         (scsi_mod_CFLAGS): Likewise
895         (scsi_mod_LDFLAGS): Likewise.
897         * disk/scsi.c: New file.
899         * include/grub/scsi.h: Likewise.
901         * include/grub/scsicmd.h: Likewise.
903         * disk/ata.c: Include <grub/scsi.h>.
904         (grub_atapi_packet): Do not use grub_ata_cmd, use registers
905         instead.
906         (grub_ata_iterate): Skip ATAPI devices.
907         (grub_ata_open): Only handle ATAPI devices.
908         (struct grub_atapi_read): Removed.
909         (grub_atapi_readsector): Likewise.
910         (grub_ata_read): No longer handle ATAPI devices.
911         (grub_ata_write): Likewise.
912         (grub_atapi_iterate): New function.
913         (grub_atapi_read): Likewise.
914         (grub_atapi_write): Likewise.
915         (grub_atapi_open): Likewise.
916         (grub_atapi_close): Likewise.
917         (grub_atapi_dev): New variable.
918         (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
919         (GRUB_MOD_FINI(ata)): Unregister ATAPI.
921         * include/grub/disk.h (enum grub_disk_dev_id): Add
922         `GRUB_DISK_DEVICE_SCSI_ID'.
924 2008-08-26  Robert Millan  <rmh@aybabtu.com>
926         * util/biosdisk.c (grub_util_biosdisk_open, open_device)
927         (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
928         descriptive.
930 2008-08-23  Bean  <bean123ch@gmail.com>
932         * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
933         (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
934         disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
935         (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
936         dm_nv.mod.
937         (raid5rec_mod_SOURCES): New macro.
938         (raid5rec_mod_CFLAGS): Likewise.
939         (raid5rec_mod_LDFLAGS): Likewise.
940         (raid6rec_mod_SOURCES): Likewise.
941         (raid6rec_mod_CFLAGS): Likewise.
942         (raid6rec_mod_LDFLAGS): Likewise.
943         (mdraid_mod_SOURCES): Likewise.
944         (mdraid_mod_CFLAGS): Likewise.
945         (mdraid_mod_LDFLAGS): Likewise.
946         (dm_nv_mod_SOURCES): Likewise.
947         (dm_nv_mod_CFLAGS): Likewise.
948         (dm_nv_mod_LDFLAGS): Likewise.
950         * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
951         (grub_emu_SOURCES):  Add disk/raid5_recover.c, disk/raid6_recover.c,
952         disk/mdraid_linux.c and disk/dmraid_nvidia.c.
954         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
955         disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
957         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
959         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
961         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
963         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
965         * disk/raid5_recover.c: New file.
967         * disk/raid6_recover.c: Likewise.
969         * disk/mdraid_linux.c: Likewise.
971         * disk/dmraid_nvidia.c: Likewise.
973         * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
974         ULONG_MAX.
976         * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
977         calculate the size of raid device.
978         (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
979         different layout of raid5.
980         (grub_raid_scan_device): Remove code specific to mdraid.
981         (grub_raid_list): New variable.
982         (free_array): New function.
983         (grub_raid_register): Likewise.
984         (grub_raid_unregister): Likewise.
985         (grub_raid_rescan): Likewise.
986         (GRUB_MOD_INIT): Don't iterate device here.
987         (GRUB_MOD_FINI): Use free_array to release resource.
989         * include/grub/raid.h: Remove macro and structure specific to mdraid.
990         (grub_raid5_recover_func_t): New function variable type.
991         (grub_raid6_recover_func_t): Likewise.
992         (grub_raid5_recover_func): New variable.
993         (grub_raid6_recover_func): Likewise.
994         (grub_raid_register): New function.
995         (grub_raid_unregister): Likewise.
996         (grub_raid_rescan): Likewise.
997         (grub_raid_block_xor): Likewise.
999         * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
1000         (CMD_CRC): New macro.
1001         (part): Removed.
1002         (read_file): Handle device as well as file.
1003         (cmd_crc): New function.
1004         (fstest): Handle multiple disks.
1005         (options): Remove part, raw and long, add root and diskcount.
1006         (usage): Add crc, remove -p, -r, -l, add -r and -c.
1007         (main): Find the first non option entry and ignore subsequent options,
1008         add handling for the new options, support multiple disks.
1010         * util/grub-probe.c (probe): Add mdraid to abstraction_name.
1012 2008-08-23  Bean  <bean123ch@gmail.com>
1014         * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
1016         * genfslist.sh: Ignore kernel.mod.
1018         * genpartmaplist.sh: Likewise.
1020 2008-08-23  Robert Millan  <rmh@aybabtu.com>
1022         * util/getroot.c (find_root_device): Skip anything that starts with
1023         a dot, not just directories.  This avoids things like /dev/.tmp.md0.
1025 2008-08-22  Felix Zielcke  <fzielcke@z-51.de>
1027         * util/update-grub.in (GRUB_GFXMODE): Export variable.
1028         * util/grub.d/00_header.in: Allow the administrator to change default
1029         gfxmode via ${GRUB_GFXMODE}.
1031 2008-08-21  Felix Zielcke  <fzielcke@z-51.de>
1033         * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
1035 2008-08-21  Robert Millan  <rmh@aybabtu.com>
1037         * loader/i386/linux.c: New file.  Implements generic 32-bit Linux
1038         loader.
1039         * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
1040         `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
1042 2008-08-20  Carles Pina i Estany  <carles@pina.cat>
1044         * menu/normal.c (run_menu): Replace hardcoded numbers with macros
1045         (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
1047 2008-08-19  Robert Millan  <rmh@aybabtu.com>
1049         * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
1050         (struct grub_virtual_screen): Remove `cursor_color'.
1051         (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
1052         initialization.
1053         (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
1055 2008-08-18  Robert Millan  <rmh@aybabtu.com>
1057         Unify (identical) linux_normal.c files.
1058         * loader/i386/efi/linux_normal.c: Move from here ...
1059         * loader/linux_normal.c: ... to here.  Update all users.
1060         * loader/i386/pc/linux_normal.c: Delete.  Update all users.
1061         * loader/i386/ieee1275/linux_normal.c: Likewise.
1063 2008-08-18  Robert Millan  <rmh@aybabtu.com>
1065         * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
1066         (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
1067         (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
1068         (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
1069         (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
1070         New macros.
1071         (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
1072         * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
1073         (GRUB_LINUX_CL_END_OFFSET): ... to here.
1074         * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
1075         (GRUB_LINUX_CL_OFFSET): ... this.  Update all users.
1076         (GRUB_EFI_CL_END_OFFSET): Rename to ...
1077         (GRUB_LINUX_CL_END_OFFSET): ... this.  Update all users.
1078         (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
1079         Initialize `params->video_cursor_x' and `params->video_cursor_y'
1080         portably using grub_getxy().
1081         Replace `-EFI' with `-bzImage' in boot message.
1083 2008-08-17  Robert Millan  <rmh@aybabtu.com>
1085         * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
1087 2008-08-17  Robert Millan  <rmh@aybabtu.com>
1089         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
1091         * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
1092         (GRUB_MACHINE_MEMORY_RESERVED): New macros.
1093         (grub_machine_mmap_iterate): New function declaration.
1094         * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
1095         structure.
1096         (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
1097         macros.
1099         * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
1100         type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
1101         Move e820 parsing from here ...
1102         * kern/i386/pc/mmap.c: New file.
1103         (grub_machine_mmap_iterate): ... to here.
1105         * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
1106         (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
1107         (GRUB_MACHINE_MEMORY_AVAILABLE): ... this.  Update all users.
1108         (grub_available_iterate): Redeclare to return `void', and redeclare
1109         its hook to use grub_uint64_t as addr and size parameters, and rename
1110         to ...
1111         (grub_machine_mmap_iterate): ... this.  Update all users.
1113         * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
1114         to make it more readable.  Rename to ...
1115         (grub_machine_mmap_iterate): ... this.
1117         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
1118         (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
1119         (grub_multiboot): Allocate an extra region after the payload, and fill
1120         it with a Multiboot memory map.  Adjust a.out loader to calculate size
1121         with the extra space.
1122         (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
1123         with the extra space.
1125 2008-08-17  Carles Pina i Estany  <carles@pina.cat>
1127         * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
1129 2008-08-17  Felix Zielcke  <fzielcke@z-51.de>
1131         * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
1132         mdate-sh to the list `find' searches for.
1133         * DISTLIST: Regenerated.
1135 2008-08-16  Felix Zielcke  <fzielcke@z-51.de>
1137         * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
1138         genkernsyms.sh.  Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
1139         genmoddep.awk, gensymlist.sh.in.
1140         (DISTDIRS): Add bus, docs, hook, lib.
1141         * DISTLIST: Regenerated.
1142         * NEWS: Add cygwin support and change the `os-prober' entry a bit.
1144 2008-08-16  Robert Millan  <rmh@aybabtu.com>
1146         * disk/raid.c (grub_raid_init): Handle/report errors set by
1147         grub_device_iterate().
1148         * disk/lvm.c (grub_lvm_init): Likewise.
1150 2008-08-15  Bean  <bean123ch@gmail.com>
1152         * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1153         and datehook.mod.
1154         (datetime_mod_SOURCES): New macro.
1155         (datetime_mod_CFLAGS): Likewise.
1156         (datetime_mod_LDFLAGS): Likewise.
1157         (date_mod_SOURCES): Likewise.
1158         (date_mod_CFLAGS): Likewise.
1159         (date_mod_LDFLAGS): Likewise.
1160         (datehook_mod_SOURCES): Likewise.
1161         (datehook_mod_CFLAGS): Likewise.
1162         (datehook_mod_LDFLAGS): Likewise.
1164         * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1165         and datehook.mod.
1166         (datetime_mod_SOURCES): New macro.
1167         (datetime_mod_CFLAGS): Likewise.
1168         (datetime_mod_LDFLAGS): Likewise.
1169         (date_mod_SOURCES): Likewise.
1170         (date_mod_CFLAGS): Likewise.
1171         (date_mod_LDFLAGS): Likewise.
1172         (datehook_mod_SOURCES): Likewise.
1173         (datehook_mod_CFLAGS): Likewise.
1174         (datehook_mod_LDFLAGS): Likewise.
1176         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1177         and datehook.mod.
1178         (datetime_mod_SOURCES): New macro.
1179         (datetime_mod_CFLAGS): Likewise.
1180         (datetime_mod_LDFLAGS): Likewise.
1181         (date_mod_SOURCES): Likewise.
1182         (date_mod_CFLAGS): Likewise.
1183         (date_mod_LDFLAGS): Likewise.
1184         (datehook_mod_SOURCES): Likewise.
1185         (datehook_mod_CFLAGS): Likewise.
1186         (datehook_mod_LDFLAGS): Likewise.
1188         * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1189         and datehook.mod.
1190         (datetime_mod_SOURCES): New macro.
1191         (datetime_mod_CFLAGS): Likewise.
1192         (datetime_mod_LDFLAGS): Likewise.
1193         (date_mod_SOURCES): Likewise.
1194         (date_mod_CFLAGS): Likewise.
1195         (date_mod_LDFLAGS): Likewise.
1196         (datehook_mod_SOURCES): Likewise.
1197         (datehook_mod_CFLAGS): Likewise.
1198         (datehook_mod_LDFLAGS): Likewise.
1200         * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1201         and datehook.mod.
1202         (datetime_mod_SOURCES): New macro.
1203         (datetime_mod_CFLAGS): Likewise.
1204         (datetime_mod_LDFLAGS): Likewise.
1205         (date_mod_SOURCES): Likewise.
1206         (date_mod_CFLAGS): Likewise.
1207         (date_mod_LDFLAGS): Likewise.
1208         (datehook_mod_SOURCES): Likewise.
1209         (datehook_mod_CFLAGS): Likewise.
1210         (datehook_mod_LDFLAGS): Likewise.
1212         * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
1214         * commands/date.c: New file.
1216         * hook/datehook.c: Likewise.
1218         * include/grub/lib/datetime.h: Likewise.
1220         * include/grub/i386/cmos.h: Likewise.
1222         * lib/datetime.c: Likewise.
1224         * lib/i386/datetime.c: Likewise.
1226         * lib/efi/datetime.c: Likewise.
1228 2008-08-14  Robert Millan  <rmh@aybabtu.com>
1230         * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
1231         (grub_mkelfimage_SOURCES): New variable.
1232         (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
1234         * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
1235         (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
1236         * conf/powerpc-ieee1275.rmk: Likewise.
1237         * conf/i386-ieee1275.rmk: Likewise.
1239         * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
1240         * kern/i386/coreboot/init.c: Likewise.
1242         * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
1243         with `<grub/cpu/kernel.h>'.
1244         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
1245         to ...
1246         (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
1247         * kern/i386/coreboot/startup.S: Likewise.
1249         * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
1250         (GRUB_MOD_GAP): Remove.
1251         * include/grub/powerpc/kernel.h: New file.
1252         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
1253         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
1254         * include/grub/i386/kernel.h: New file.
1255         * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
1256         (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
1257         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
1259         * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
1260         `grub-mkelfimage'.
1261         Use --directory when invoking grub_mkimage.
1263         * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
1264         (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
1265         GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
1266         and GRUB_KERNEL_CPU_PREFIX.
1268 2008-08-14  Felix Zielcke  <fzielcke@z-51.de>
1270         * include/grub/err.h (grub_err_printf): New function prototype.
1271         * util/misc.c (grub_err_printf): New function.
1272         * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
1273         grub_printf.
1274         * kern/err.c (grub_print_error): Use grub_err_printf.
1276 2008-08-13  Robert Millan  <rmh@aybabtu.com>
1278         * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
1280 2008-08-13  Robert Millan  <rmh@aybabtu.com>
1282         * docs/grub.cfg: Use the native device name for the example GNU/Hurd
1283         boot entry.
1285 2008-08-12  Robert Millan  <rmh@aybabtu.com>
1287         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
1288         of the relocation code from here ...
1289         (grub_multiboot): ... to here.
1290         (forward_relocator, backward_relocator): Move from here ...
1291         * kern/i386/loader.S (grub_multiboot_forward_relocator)
1292         (grub_multiboot_backward_relocator): ... to here.
1293         (grub_multiboot_real_boot): Use %edx for entry offset.  Put Multiboot
1294         magic in %eax.  Use %ebp for jumping (so %edx is not trashed).
1295         * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
1296         (grub_multiboot_forward_relocator_end)
1297         (grub_multiboot_backward_relocator)
1298         (grub_multiboot_backward_relocator_end): New variables.
1300 2008-08-12  Bean  <bean123ch@gmail.com>
1302         * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
1304 2008-08-11  Robert Millan  <rmh@aybabtu.com>
1306         * kern/i386/linuxbios/startup.S: Move from here ...
1307         * kern/i386/coreboot/startup.S: ... to here.
1309         * kern/i386/linuxbios/init.c: Move from here ...
1310         * kern/i386/coreboot/init.c: ... to here.
1312         * kern/i386/linuxbios/table.c: Move from here ...
1313         * kern/i386/coreboot/mmap.c: ... to here.
1315         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
1317 2008-08-11  Robert Millan  <rmh@aybabtu.com>
1319         * kern/device.c (grub_device_open): Do not handle grub_disk_open()
1320         errors.  Leave it to the upper layer to handle them.
1322 2008-08-09  Christian Franke  <franke@computer.org>
1324         * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
1325         * conf/common.rmk: Install `grub-pe2elf' only if requested.
1326         Install `grub.d/10_windows' only on Cygwin.
1327         * configure.ac: Add subst of `target_os'.
1328         Check `target_os' also before setting TARGET_OBJ2ELF.
1329         Add `--enable-grub-pe2elf'.
1331 2008-08-08  Robert Millan  <rmh@aybabtu.com>
1333         * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
1334         (grub_last_time): Change type to grub_uint64_t.
1335         (grub_disk_open): Migrate code from to using grub_get_time_ms().
1336         (grub_disk_close): Likewise.
1338         * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
1339         (run_menu): Migrate code from to using grub_get_time_ms().
1341         * util/misc.c (grub_get_time_ms): New function.
1343 2008-08-08  Marco Gerards  <marco@gnu.org>
1345         * disk/ata.c (grub_ata_regget): Change return type to
1346         `grub_uint8_t'.
1347         (grub_ata_regget2): Likewise.
1348         (grub_ata_wait_status): New function.
1349         (grub_ata_wait_busy): Removed function, updated all users to use
1350         `grub_ata_wait_status'.
1351         (grub_ata_wait_drq): Likewise.
1352         (grub_ata_cmd): New function.
1353         (grub_ata_pio_read): Change return type to `grub_uint8_t'.  Add
1354         error handling.
1355         (grub_ata_pio_write): Add error handling.
1356         (grub_atapi_identify): Likewise.
1357         (grub_atapi_packet): Use `grub_ata_cmd' and improve error
1358         handling.
1359         (grub_ata_identify): Use `grub_ata_cmd' and improve error
1360         handling.  Actually use the detected registers.  Reorder the
1361         detection logic such that it is easier to read.
1362         (grub_ata_pciinit): Do not assign the same ID to each controller.
1363         (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
1364         handling.
1365         (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
1367         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
1369 2008-08-08  Marco Gerards  <marco@gnu.org>
1371         * NEWS: Update.
1373 2008-08-07  Bean  <bean123ch@gmail.com>
1375         * include/grub/x86_64/pci.h: New file.
1377 2008-08-07  Christian Franke  <franke@computer.org>
1379         * kern/i386/pit.c (TIMER2_SPEAKER): New define.
1380         (TIMER2_GATE): Likewise.
1381         (grub_pit_wait): Add enable/disable of the timer2 gate
1382         bit of port 0x61.  This fixes a possible infinite loop.
1384 2008-08-07  Bean  <bean123ch@gmail.com>
1386         * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
1387         kern/i386/tsc.c and kern/i386/pit.c.
1389         * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
1390         x86_64 platform.
1392         * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
1393         <grub/i386/tsc.h>.
1395         * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
1397 2008-08-07  Bean  <bean123ch@gmail.com>
1399         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
1401         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
1403         * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
1404         multiple inclusion. Add #include <grub/types.h>.
1406 2008-08-06  Christian Franke  <franke@computer.org>
1408         * conf/common.rmk: Build and install `10_windows'.
1409         * util/grub.d/10_windows.in: New script.
1411 2008-08-06  Pavel Roskin  <proski@gnu.org>
1413         * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
1415 2008-08-06  Robert Millan  <rmh@aybabtu.com>
1417         * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
1418         * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
1420 2008-08-06  Bean  <bean123ch@gmail.com>
1422         * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
1423         (grub_pxefs_fs_int): Remove dummy definition.
1424         (grub_pxefs_open): Use data->block_size to store the current block
1425         size setting.
1426         (grub_pxefs_read): Use block size stored in data->block_size. As the
1427         value of grub_pxe_blksize can be changed after the file is opened.
1429 2008-08-06  Bean  <bean123ch@gmail.com>
1431         * fs/i386/pc/pxe.c (curr_file): new variable.
1432         (grub_pxefs_open): Simply the handling of pxe file system. Don't
1433         require the dummy internal file system anymore.
1434         (grub_pxefs_read): Removed.
1435         (grub_pxefs_close): Likewise.
1436         (grub_pxefs_fs_int): Likewise.
1437         (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
1438         connection when we switch file.
1439         (grub_pxefs_close_int): Renamed to grub_pxefs_close.
1441 2008-08-06  Robert Millan  <rmh@aybabtu.com>
1443         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
1444         `halt.mod'.
1445         (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
1446         (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
1448         * kern/i386/halt.c: New file.
1449         * kern/i386/reboot.c: Likewise.
1450         * include/grub/i386/reboot.h: Likewise.
1451         * include/grub/i386/halt.h: Likewise.
1453         * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
1454         Include `<grub/cpu/halt.h>'.
1455         * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
1456         [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
1458         * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
1459         (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
1460         (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
1461         (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
1462         (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
1463         (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
1464         from here ...
1465         * include/grub/i386/at_keyboard.h: ... to here.
1467 2008-08-05  Robert Millan  <rmh@aybabtu.com>
1469         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
1470         * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
1471         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
1472         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
1473         `kern/generic/millisleep.c'.
1475         * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
1476         instead of grub_get_rtc().
1477         (grub_tsc_init): Initialize `tsc_boot_time'.
1479         * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
1480         (grub_machine_init): Use grub_tsc_init() rather than
1481         installing an RTC-based handler via grub_install_get_time_ms().
1483         * kern/i386/pit.c: New file.
1484         * include/grub/i386/pit.h: Likewise.
1486 2008-08-05  Bean  <bean123ch@gmail.com>
1488         * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
1490         * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
1491         (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
1492         (pxe_mod_SOURCES): New macro.
1493         (pxe_mod_CFLAGS): Likewise.
1494         (pxe_mod_LDFLAGS): Likewise.
1495         (pxecmd_mod_SOURCES): Likewise.
1496         (pxecmd_mod_CFLAGS): Likewise.
1497         (pxecmd_mod_LDFLAGS): Likewise.
1499         * kern/i386/pc/startup.S (grub_pxe_scan): New function.
1500         (grub_pxe_call): Likewise.
1502         * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
1504         * commands/i386/pc/pxecmd.c: New file.
1506         * fs/i386/pc/pxe.c: Likewise.
1508         * include/grub/i386/pc/pxe.h: Likewise.
1510 2008-08-05  Bean  <bean123ch@gmail.com>
1512         * util/console.c (grub_console_cur_color): New variable.
1513         (grub_console_standard_color): Likewise.
1514         (grub_console_normal_color): Likewise.
1515         (grub_console_highlight_color): Likewise.
1516         (color_map): Likewise.
1517         (use_color): Likewise.
1518         (NUM_COLORS): New macro.
1519         (grub_ncurses_setcolorstate): Handle color properly.
1520         (grub_ncurses_setcolor): Don't change color here, just remember the
1521         settings, color will be set in grub_ncurses_setcolorstate.
1522         (grub_ncurses_getcolor): New function.
1523         (grub_ncurses_init): Initialize color pairs.
1524         (grub_ncurses_term): New member grub_ncurses_getcolor.
1526 2008-08-05  Colin D Bennett  <colin@gibibit.com>
1528         High resolution timer support.  Implemented for x86 CPUs using TSC.
1529         Extracted generic grub_millisleep() so it's linked in only as needed.
1530         This requires a Pentium compatible CPU; if the RDTSC instruction is
1531         not supported, then it falls back on the generic grub_get_time_ms()
1532         implementation that uses the machine's RTC.
1534         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
1535         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
1536         `kern/generic/millisleep.c'.
1538         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
1539         `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
1541         * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
1542         `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
1544         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
1546         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
1547         `kern/generic/millisleep.c'.
1549         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
1551         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
1553         * kern/generic/rtc_get_time_ms.c: New file.
1555         * kern/generic/millisleep.c: New file.
1557         * kern/misc.c: Don't include
1558         <kern/time.h> anymore.
1559         (grub_millisleep_generic): Removed.
1561         * commands/sleep.c (grub_interruptible_millisleep): Uses
1562         grub_get_time_ms() instead of grub_get_rtc().
1564         * include/grub/i386/tsc.h (grub_get_tsc): New file.  New inline
1565         function.
1566         (grub_cpu_is_cpuid_supported): New inline function.
1567         (grub_cpu_is_tsc_supported): New inline function.
1568         (grub_tsc_init): New function prototype.
1569         (grub_tsc_get_time_ms): New function prototype.
1571         * kern/i386/tsc.c (grub_get_time_ms): New file.
1573         * include/grub/time.h: Include <grub/types.h.
1574         (grub_millisleep_generic): Removed.
1575         (grub_get_time_ms): New prototype.
1576         (grub_install_get_time_ms): New prototype.
1577         (grub_rtc_get_time_ms): New prototype.
1579         * kern/time.c (grub_get_time_ms): New function.
1580         (grub_install_get_time_ms): New function.
1582         * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>.  Don't include
1583         <grub/time.h> anymore.
1584         (grub_millisleep): Removed.
1585         (grub_machine_init): Call grub_tsc_init.
1587         * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
1588         get_time_ms() implementation.
1590         * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
1591         (ieee1275_get_time_ms): New function.
1592         (grub_machine_init): Install get_time_ms() implementation.
1594         * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
1595         (grub_machine_init): Call grub_tsc_init().
1596         (grub_millisleep): Removed.
1598         * kern/ieee1275/init.c (grub_millisleep): Removed.
1599         (grub_machine_init): Install ieee1275_get_time_ms()
1600         implementation.
1601         (ieee1275_get_time_ms): New function.
1602         (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
1603         real work.
1605 2008-08-05  Marco Gerards  <marco@gnu.org>
1607         * disk/ata.c: Include <grub/pci.h>.
1608         (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
1609         (grub_ata_initialize): Rewritten.
1610         (grub_ata_device_initialize): New function.
1612 2008-08-04  Pavel Roskin  <proski@gnu.org>
1614         * kern/main.c: Include grub/mm.h.
1616 2008-08-04  Robert Millan  <rmh@aybabtu.com>
1618         * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
1619         (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
1620         corruption problem).
1622 2008-08-04  Robert Millan  <rmh@aybabtu.com>
1624         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
1625         warnings introduced in my last commit.
1627 2008-08-03  Robert Millan  <rmh@aybabtu.com>
1629         Make PCI available on all i386 architectures.
1631         * include/grub/i386/pc/pci.h: Move from here ...
1632         * include/grub/i386/pci.h: ... to here.
1634         * include/grub/i386/pc/pci.h: Remove.
1635         * include/grub/i386/efi/pci.h: Remove.
1636         * include/grub/x86_64/efi/pci.h: Remove.
1638         * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
1639         `<grub/cpu/pci.h>'.
1641         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
1642         (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
1643         (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
1645         * conf/i386-ieee1275.rmk: Likewise.
1647 2008-08-03  Robert Millan  <rmh@aybabtu.com>
1649         * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
1650         (grub_console_setcursor): Make it possible to set cursor off.
1652 2008-08-03  Robert Millan  <rmh@aybabtu.com>
1654         * util/grub.d/00_header.in: Be platform-agnostic.  Probe for existence
1655         of modules instead of assuming which platform provides what.
1656         * util/update-grub.in: Likewise.
1658 2008-08-03  Robert Millan  <rmh@aybabtu.com>
1660         * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
1661         instead of `grub_install_dos_part' to determine whether a drive needs
1662         to be prepended to prefix (`grub_install_dos_part' is not reliable,
1663         because it can be overridden when loading GRUB via Multiboot).
1665 2008-08-02  Robert Millan  <rmh@aybabtu.com>
1667         * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
1669 2008-08-02  Robert Millan  <rmh@aybabtu.com>
1671         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
1672         of informational grub_dprintf() calls.
1674 2008-08-02  Robert Millan  <rmh@aybabtu.com>
1676         * disk/memdisk.c (memdisk_size): Don't initialize.
1677         (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
1679         * include/grub/i386/pc/kernel.h
1680         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
1681         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
1682         (grub_memdisk_image_size, grub_arch_memdisk_addr)
1683         (grub_arch_memdisk_size): Remove.
1685         * include/grub/kernel.h (struct grub_module_header): Remove `offset'
1686         field (was only used to transfer a constant).  Add `type' field to
1687         support multiple module types.
1688         (grub_module_iterate): New function.
1690         * kern/device.c (grub_device_open): Do not hide error messages
1691         when grub_disk_open() fails.  Use grub_print_error() instead.
1693         * kern/i386/pc/init.c (grub_arch_modules_addr)
1694         (grub_arch_memdisk_size): Remove functions.
1695         (grub_arch_modules_addr): Return the module address in high memory
1696         (now that it isn't copied anymore).
1698         * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
1699         (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
1700         decompression routine (grub_total_module_size already includes that
1701         now).  Don't copy modules back to low memory.
1703         * kern/main.c: Include `<grub/mm.h>'.
1704         (grub_load_modules): Split out (and use) ...
1705         (grub_module_iterate): ... this function, which iterates through
1706         module objects and runs a hook.
1707         Comment out grub_mm_init_region() call, as it would cause non-ELF
1708         modules to be overwritten.
1710         * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
1711         the memdisk image in its own region, make it part of the module list.
1712         * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
1713         (main): Parse --memdisk|-m option, and pass user-provided path as
1714         parameter to generate_image().
1715         (add_segments): Pass `memdisk_path' down to load_modules().
1716         (load_modules): Embed memdisk image in module section when requested.
1717         * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
1718         `header.type' instead of `header.offset'.
1720         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
1721         (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
1722         (memdisk_mod_LDFLAGS): New variables.
1723         * conf/i386-coreboot.rmk: Likewise.
1724         * conf/i386-ieee1275.rmk: Likewise.
1726 2008-08-02  Robert Millan  <rmh@aybabtu.com>
1728         * loader/i386/pc/multiboot.c (playground, forward_relocator)
1729         (backward_relocator): New variables.  Used to allocate and relocate
1730         the payload, respectively.
1731         (grub_multiboot_load_elf32): Load into heap instead of requested
1732         address, install the appropriate relocator code in each bound of
1733         the payload, and set the entry point such that
1734         grub_multiboot_real_boot() will jump to one of them.
1736         * kern/i386/loader.S (grub_multiboot_payload_size)
1737         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
1738         (grub_multiboot_payload_entry_offset): New variables.
1739         (grub_multiboot_real_boot): Set cpu context to what the relocator
1740         expects, and jump to the relocator instead of the payload.
1742         * include/grub/i386/loader.h (grub_multiboot_payload_size)
1743         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
1744         (grub_multiboot_payload_entry_offset): Export.
1746 2008-08-01  Bean  <bean123ch@gmail.com>
1748         * normal/menu_entry.c (editor_getline): Don't return the original
1749         string as result, as it will be released by lexer once it has done
1750         using it.
1752 2008-08-01  Robert Millan  <rmh@aybabtu.com>
1754         * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
1755         within menuentries, not before them.
1756         util/grub.d/10_hurd.in: Likewise.
1758 2008-08-01  Bean  <bean123ch@gmail.com>
1760         * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
1761         (bufio_mod_SOURCES): New macro.
1762         (bufio_mod_CFLAGS): Likewise.
1763         (bufio_mod_LDFLAGS): Likewise.
1765         * include/grub/bufio.h: New file.
1767         * io/bufio.c: Likewise.
1769         * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
1770         (grub_video_reader_png): Use grub_buffile_open to open file.
1772         * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
1773         (grub_video_reader_jpeg): Use grub_buffile_open to open file.
1775         * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
1776         (grub_video_reader_tga): Use grub_buffile_open to open file.
1778         * font/manager.c: Include <grub/bufio.h>.
1779         (add_font): Use grub_buffile_open to open file.
1781 2008-07-31  Robert Millan  <rmh@aybabtu.com>
1783         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
1784         ELF segments, use a macro for arbitrarily accessing any of them instead
1785         of preparing a pointer that allows access to one at a time.
1786         (grub_multiboot_load_elf64): Likewise.
1788 2008-07-31  Bean  <bean123ch@gmail.com>
1790         * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
1791         GRUB_KERNEL_MACHINE_DATA_END.
1793 2008-07-30  Robert Millan  <rmh@aybabtu.com>
1795         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
1796         Increase from 0x50 to 0x60.
1797         * util/i386/pc/grub-install.in: Detect cross-disk installs, and
1798         use UUIDs to identify the root drive for them.  If that's not
1799         possible, abort.
1800         * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
1801         check, for cross-disk installs.
1803 2008-07-30  Robert Millan  <rmh@aybabtu.com>
1805         * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
1806         is non-empty, use it to set the `prefix' environment variable instead
1807         of the usual approach.
1808         * kern/i386/linuxbios/init.c (make_install_device): Remove function.
1809         (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
1810         environment variable instead of dummy make_install_device().
1812         * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
1813         (start): Insert a data section, with `grub_prefix' variable.
1814         * kern/i386/linuxbios/startup.S: Likewise.
1816         * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
1817         New variable reference.
1818         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
1819         New macro.  Defines offset of `grub_prefix' within startup.S (relative
1820         to `start').
1821         (GRUB_KERNEL_MACHINE_DATA_END): New macro.  Defines the end of data
1822         section within startup.S (relative to `start').
1823         * include/grub/i386/coreboot/kernel.h: Likewise.
1825         * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
1826         Overwrite grub_prefix with its contents, at the beginning of the
1827         first segment.
1828         (main): Understand -p|--prefix.
1830 2008-07-30  Robert Millan  <rmh@aybabtu.com>
1832         * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
1834 2008-07-30  Robert Millan  <rmh@aybabtu.com>
1836         * term/i386/pc/vga_text.c (grub_console_cls): Use
1837         grub_console_gotoxy() to go back to beginning of the screen.
1838         Found by Patrick Georgi <patrick.georgi@coresystems.de>
1840 2008-07-29  Christian Franke  <franke@computer.org>
1842         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
1843         Add conversion of emulated mount points on Cygwin.
1845 2008-07-29  Christian Franke  <franke@computer.org>
1847         * util/update-grub.in: Add a check for admin
1848         group on Cygwin.
1849         Remove old `grub.cfg.new' before creation.
1850         Add `-f' to `mv' to handle the different filesystem
1851         semantics of Windows.
1853 2008-07-29  Bean  <bean123ch@gmail.com>
1855         * normal/main.c (get_line): Fix buffer overflow bug.
1857 2008-07-28  Robert Millan  <rmh@aybabtu.com>
1859         * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
1860         (struct grub_apple_header): New struct.  Describes the layout of
1861         the partmap header.
1862         (apple_partition_map_iterate): Check the header magic as well as the
1863         partition magic (which was already being checked).
1865 2008-07-28  Pavel Roskin  <proski@gnu.org>
1867         * genmk.rb: Add a warning to the beginning of the output that
1868         it's a generated file and should not be edited.
1870 2008-07-28  Robert Millan  <rmh@aybabtu.com>
1872         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
1873         with the same number are found, just use issue a warning with
1874         grub_dprintf(), as this error has been reported to be non-fatal.
1876 2008-07-27  Robert Millan  <rmh@aybabtu.com>
1878         * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
1879         information.
1881 2008-07-27  Bean  <bean123ch@gmail.com>
1883         * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
1884         (grub_fat_find_dir): Ignore case when comparing filename.
1886 2008-07-27  Bean  <bean123ch@gmail.com>
1888         * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
1889         smallino, as it's more descriptive, and i8count can be confused with
1890         the other field count.
1891         (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
1892         inode type.
1894 2008-07-27  Bean  <bean123ch@gmail.com>
1896         * commands/crc.c: New file.
1898         * lib/crc.c: Likewise.
1900         * include/grub/lib/crc.h: Likewise.
1902         * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
1904         * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
1905         (hexdump): Move this function to ...
1907         * lib/hexdump.c: ... here.
1909         * include/grub/hexdump.h: Renamed to ...
1911         * include/grub/lib/hexdump.h: ... this.
1913         * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
1915         * util/grub-editenv.c: Likewise.
1917         * include/envblk.h: Renamed to ...
1919         * include/lib/envblk.h: ... this.
1921         * util/envblk.c: Renamed to ...
1923         * lib/envblk.c: ... this.
1925         * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
1926         lib/hexdump.c.
1927         (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
1928         (pkglib_MODULES): Add crc.mod.
1929         (hexdump_mod_SOURCES): Add lib/hexdump.c.
1930         (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
1931         (crc_mod_SOURCES): New macro.
1932         (crc_mod_CFLAGS): Likewise.
1933         (crc_mod_LDFLAGS): Likewise.
1935         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
1937         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1939         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
1941         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1943         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1945 2008-07-27  Felix Zielcke  <fzielcke@z-51.de>
1947         * commands/help.c: Include <grub/term.h>.
1948         (TERM_WIDTH): Removed.  Updated all users.
1950 2008-07-27  Pavel Roskin  <proski@gnu.org>
1952         * util/getroot.c (find_root_device): Rephrase a comment to avoid
1953         spurious warnings about a comment within a comment.
1955 2008-07-25  Robert Millan  <rmh@aybabtu.com>
1957         * util/getroot.c (find_root_device): Skip devices that match
1958         /dev/dm-[0-9].  This lets the real device be found for any type of
1959         abstraction (LVM, EVMS, RAID..).
1960         (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
1961         and /dev/evms (for EVMS) before traversing /dev.  If a /dev/dm-[0-9]
1962         device is found first, find_root_device() will now skip it.
1964 2008-07-24  Pavel Roskin  <proski@gnu.org>
1966         * include/grub/types.h: Use __builtin_bswap32() and
1967         __builtin_bswap64() with gcc 4.3 and newer.
1969 2008-07-24  Christian Franke  <franke@computer.org>
1971         * util/i386/pc/grub-install.in: If `--debug' is specified,
1972         pass `--verbose' to grub-setup.
1973         Abort script if make_system_path_relative_to_its_root() fails.
1975 2008-07-24  Bean  <bean123ch@gmail.com>
1977         * configure.ac: Fixed a bug caused by the previous cygwin patch,
1978         variable `target_platform' should be `platform'.
1980 2008-07-24  Bean  <bean123ch@gmail.com>
1982         * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
1983         (grub_png_init_fixed_block): New function.
1984         (grub_png_decode_image_data): Handle fixed huffman code compression.
1986 2008-07-24  Bean  <bean123ch@gmail.com>
1988         * common.rmk (bin_UTILITIES): Add grub-pe2elf.
1989         (grub_pe2elf_SOURCES): New macro.
1990         (CLEANFILES): Add grub-pe2elf.
1992         * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
1993         (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
1994         (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
1995         (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
1996         (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
1997         (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
1998         (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
1999         (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
2000         (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
2001         (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
2002         (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
2003         (GRUB_PE32_SYM_CLASS_FILE): Likewise.
2004         (GRUB_PE32_DT_FUNCTION): Likewise.
2005         (GRUB_PE32_REL_I386_DIR32): Likewise.
2006         (GRUB_PE32_REL_I386_REL32): Likewise.
2007         (grub_pe32_symbol): New structure.
2008         (grub_pe32_reloc): Likewise.
2010         * util/grub-pe2elf.c: New file.
2012         * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
2013         start symbol in non pc platform.
2015         * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
2017         The following patches are from Christian Franke.
2019         * include/grub/dl.h: Remove .previous, gas supports this only
2020         for ELF format.
2022         * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
2023         Remove .type, gas supports this only for ELF format.
2025         * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
2026         nullbytes in symbol table. This fixes an infinite loop if table is
2027         zero filled.
2029         * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
2030         TARGET_IMG_LDFLAGS and EXEEXT.
2032         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
2033         TARGET_IMG_LDFLAGS_AC.
2034         (grub_CHECK_STACK_ARG_PROBE): New function.
2036         * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
2038         * conf/i386-pc-cygwin-ld-img.sc: New linker script.
2040         * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
2041         to set TARGET_IMG_LD* accordingly.
2042         Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
2043         Add call to grub_CHECK_STACK_ARG_PROBE.
2044         Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
2046         * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
2048         * genmk.rb: Add EXEEXT to CLEANFILES.
2050 2008-07-23  Robert Millan  <rmh@aybabtu.com>
2052         * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
2053         define the codes for arrows and lines used for the menu).
2054         (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
2055         as well.
2057         * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
2058         fonts, because the latter are too slow.
2060 2008-07-21  Bean  <bean123ch@gmail.com>
2062         * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
2063         a20. Run keyboard test last, as it will cause macbook to halt.
2065 2008-07-18  Pavel Roskin  <proski@gnu.org>
2067         * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P.  We cannot
2068         load foreign architecture modules correctly anyway.  Keep
2069         support for loading host architecture modules, whether we
2070         compile them or not.
2072 2008-07-17  Pavel Roskin  <proski@gnu.org>
2074         * configure.ac: Use -m32 or -m64 regardless of whether we had to
2075         change target_cpu.  The compiler default can mismatch target_cpu
2076         in any case.
2078         * disk/efi/efidisk.c: Fix format warnings on x86_64.
2079         * kern/efi/efi.c: Likewise.
2081         * aclocal.m4 (grub_PROG_TARGET_CC): New macro.  Check if the
2082         target compiler is functional.
2083         * configure.ac: Call grub_PROG_TARGET_CC once all target flags
2084         are set up.
2086         * configure.ac: Default to efi platform for x86_64-apple.  Allow
2087         powerpc64 CPU, default to ieee1275 platform for it.  Split CPU
2088         adjustments from the rest, only do them if target is not
2089         explicitly given.  Merge other adjustments with the final sanity
2090         check.  Remove an extraneous check for supported CPU.  Be
2091         specific which CPU and which platform is not supported.
2093         * configure.ac: Default to pc platform for x86_64.
2095 2008-07-17  Robert Millan  <rmh@aybabtu.com>
2097         Partial LinuxBIOS -> Coreboot rename.
2099         * conf/i386-linuxbios.rmk: Renamed to ...
2100         * conf/i386-coreboot.rmk: ... this.
2101         * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
2102         * configure.ac: Accept "coreboot" as input platform (but maintain
2103         compatibility with "linuxbios").
2104         * include/grub/i386/linuxbios: Renamed to ...
2105         * include/grub/i386/coreboot: ... this.
2107 2008-07-17  Bean  <bean123ch@gmail.com>
2109         * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
2110         (appleldr_mod_SOURCE): New variable.
2111         (appleldr_mod_CFLAGS): Likewise.
2112         (appleldr_mod_LDFLAGS): Likewise.
2113         (pci_mod_SOURCES): Likewise.
2114         (pci_mod_CFLAGS): Likewise.
2115         (pci_mod_LDFLAGS): Likewise.
2116         (lspci_mod_SOURCES): Likewise.
2117         (lspci_mod_CFLAGS): Likewise.
2118         (lspci_mod_LDFLAGS): Likewise.
2120         * conf/x86_64-efi.rmk: New file.
2122         * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
2123         macro.
2124         (grub_efidisk_write): Likewise.
2126         * include/efi/api.h (efi_call_0): New macro.
2127         (efi_call_1): Likewise.
2128         (efi_call_2): Likewise.
2129         (efi_call_3): Likewise.
2130         (efi_call_4): Likewise.
2131         (efi_call_5): Likewise.
2132         (efi_call_6): Likewise.
2134         * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
2135         grub_rescue_cmd_chainloader.
2137         * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
2138         (grub_pe32_optional_header): Change some fields based on i386 or
2139         x86_64 platform.
2140         (GRUB_PE32_PE32_MAGIC): Likewise.
2142         * include/grub/efi/uga_draw.h: New file.
2144         * include/grub/elf.h (STN_ABS): New constant.
2145         (R_X86_64_NONE): Relocation constant for x86_64.
2146         (R_X86_64_64): Likewise.
2147         (R_X86_64_PC32): Likewise.
2148         (R_X86_64_GOT32): Likewise.
2149         (R_X86_64_PLT32): Likewise.
2150         (R_X86_64_COPY): Likewise.
2151         (R_X86_64_GLOB_DAT): Likewise.
2152         (R_X86_64_JUMP_SLOT): Likewise.
2153         (R_X86_64_RELATIVE): Likewise.
2154         (R_X86_64_GOTPCREL): Likewise.
2155         (R_X86_64_32): Likewise.
2156         (R_X86_64_32S): Likewise.
2157         (R_X86_64_16): Likewise.
2158         (R_X86_64_PC16): Likewise.
2159         (R_X86_64_8): Likewise.
2160         (R_X86_64_PC8): Likewise.
2162         * include/grub/i386/efi/pci.h: New file.
2164         * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
2165         Change it value based on platform.
2166         (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
2167         (GRUB_E820_RAM): Likewise.
2168         (GRUB_E820_RESERVED): Likewise.
2169         (GRUB_E820_ACPI): Likewise.
2170         (GRUB_E820_NVS): Likewise.
2171         (GRUB_E820_EXEC_CODE): Likewise.
2172         (GRUB_E820_MAX_ENTRY): Likewise.
2173         (grub_e820_mmap): New structure.
2174         (linux_kernel_header): Change the efi field according to different
2175         kernel version, also field from linux_kernel_header.
2177         * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
2179         * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
2180         (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
2181         (GRUB_PCI_ADDR_SPACE_IO): Likewise.
2182         (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
2183         (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
2184         (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
2185         (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
2186         (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
2187         (GRUB_PCI_ADDR_MEM_MASK): Likewise.
2188         (GRUB_PCI_ADDR_IO_MASK): Likewise.
2190         * include/grub/x86_64/efi/kernel.h: New file.
2192         * include/grub/x86_64/efi/loader.h: Likewise.
2194         * include/grub/x86_64/efi/machine.h: Likewise.
2196         * include/grub/x86_64/efi/pci.h: Likewise.
2198         * include/grub/x86_64/efi/time.h: Likewise.
2200         * include/grub/x86_64/linux.h: Likewise.
2202         * include/grub/x86_64/setjmp.h: Likewise.
2204         * include/grub/x86_64/time.h: Likewise.
2206         * include/grub/x86_64/types.h: Likewise.
2208         * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
2209          GRUB_TARGET_SIZEOF_VOID_P.
2211         * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
2212         (grub_efi_locate_handle): Likewise.
2213         (grub_efi_open_protocol): Likewise.
2214         (grub_efi_set_text_mode): Likewise.
2215         (grub_efi_stall): Likewise.
2216         (grub_exit): Likewise.
2217         (grub_reboot): Likewise.
2218         (grub_halt): Likewise.
2219         (grub_efi_exit_boot_services): Likewise.
2220         (grub_get_rtc): Likewise.
2222         * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
2223         (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
2224         (grub_efi_allocate_pages): Wrap efi calls.
2225         (grub_efi_free_pages): Wrap efi calls.
2226         (grub_efi_get_memory_map): Wrap efi calls.
2228         * kern/x86_64/dl.c: New file.
2230         * kern/x86_64/efi/callwrap.S: Likewise.
2232         * kern/x86_64/efi/startup.S: Likewise.
2234         * loader/efi/appleloader.c: Likewise.
2236         * loader/efi/chainloader.c (cmdline): New variable.
2237         (grub_chainloader_unload): Wrap efi calls.
2238         (grub_chainloader_boot): Likewise.
2239         (grub_rescue_cmd_chainloader): Wrap efi calls, handle
2240         command line.
2242         * loader/efi/chainloader_normal.c (chainloader_command):
2243         Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
2244         command line.
2246         * loader/i386/efi/linux.c (allocate_pages): Change allocation
2247         method.
2248         (grub_e820_add_region): New function.
2249         (grub_linux_boot): Construct e820 map from efi map, handle x86_64
2250         booting.
2251         (grub_find_video_card): New function.
2252         (grub_linux_setup_video): New function.
2253         (grub_rescue_cmd_linux): Probe for video information.
2255         * normal/x86_64/setjmp.S: New file.
2257         * term/efi/console.c (map_char): New function.
2258         (grub_console_putchar): Map unicode char.
2259         (grub_console_checkkey): Wrap efi calls.
2260         (grub_console_getkey): Likewise.
2261         (grub_console_getwh): Likewise.
2262         (grub_console_gotoxy): Likewise.
2263         (grub_console_cls): Likewise.
2264         (grub_console_setcolorstate): Likewise.
2265         (grub_console_setcursor): Likewise.
2267         * util/i386/efi/grub-mkimage.c: Add support for x86_64.
2269 2008-07-16  Pavel Roskin  <proski@gnu.org>
2271         * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
2272         format strings.
2274         * util/i386/efi/grub-mkimage.c (get_target_address): Return a
2275         pointer, not an integer.  This fixes a warning and prevents
2276         precision loss on 64-bit systems.
2277         (relocate_addresses): Remove unneeded cast.
2279 2008-07-15  Pavel Roskin  <proski@gnu.org>
2281         * kern/i386/ieee1275/init.c: Include grub/cache.h.
2283         * term/ieee1275/ofconsole.c: Disable code unused on i386.
2285         * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
2286         Fix comparison between signed and unsigned.
2288         * include/grub/i386/ieee1275/console.h: Declare
2289         grub_console_init() and grub_console_fini().
2291         * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
2292         It's empty and unused.
2294         * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
2295         beginning to avoid warnings with some compilers.
2297         * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
2298         [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
2300 2008-07-14  Pavel Roskin  <proski@gnu.org>
2302         * kern/env.c (grub_register_variable_hook): Don't copy empty
2303         string, it leaks memory.  Pass "" to grub_env_set(), it should
2304         handle constant strings.
2306         * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
2307         * commands/cmp.c (grub_cmd_cmp): Likewise.
2308         * kern/dl.c (grub_dl_flush_cache): Likewise.
2309         (grub_dl_load_core): Likewise.
2310         * kern/elf.c (grub_elf32_load_phdrs): Likewise.
2311         (grub_elf64_load_phdrs): Likewise.
2313 2008-07-13  Pavel Roskin  <proski@gnu.org>
2315         * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
2316         between signed and unsigned.
2317         (LzmaEnc_Finish): Fix warning about an unused parameter.
2319 2008-07-13  Bean  <bean123ch@gmail.com>
2321         * Makefile.in (enable_lzo): New rule.
2323         * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
2325         * configure.ac (ENABLE_LZO): New option --enable-lzo.
2327         * boot/i386/pc/lnxboot.S: #include <config.h>.
2329         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
2330         its value according to the compression algorithm used, lzo or lzma.
2332         * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
2333         compression algorithm according to configure macro.
2335         * kern/i386/pc/startup.S (codestart): Likewise.
2337         * kern/i386/pc/lzma_decode.S: New file.
2339         * include/grub/lib/LzFind.h: Likewise.
2341         * include/grub/lib/LzHash.h: Likewise.
2343         * include/grub/lib/LzmaDec.h: Likewise.
2345         * include/grub/lib/LzmaEnc.h: Likewise.
2347         * include/grub/lib/LzmaTypes.h: Likewise.
2349         * lib/LzFind.c: Likewise.
2351         * lib/LzmaDec.c: Likewise.
2353         * lib/LzmaEnc.c: Likewise.
2355 2008-07-13  Bean  <bean123ch@gmail.com>
2357         * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
2358         (grub_ext4_extent_header): New structure.
2359         (grub_ext4_extent): Likewise.
2360         (grub_ext4_extent_idx): Likewise.
2361         (grub_ext4_find_leaf): New function.
2362         (grub_ext2_read_block): Handle extents.
2364 2008-07-12  Robert Millan  <rmh@aybabtu.com>
2366         * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
2368 2008-07-11  Robert Millan  <rmh@aybabtu.com>
2370         * util/grub.d/40_custom.in: New file. Example on how to add custom
2371         entries to /etc/grub.d.
2372         * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
2373         40_custom (implicitly, by merging all the grub.d rules).
2375 2008-07-11  Pavel Roskin  <proski@gnu.org>
2377         * commands/read.c (grub_getline): Fix invalid memory access.
2378         Don't add newline to the variable value.
2380         * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
2381         [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
2382         (serial_hw_get_port): Check validity of the port number.
2383         (grub_cmd_serial): Check return value of serial_hw_get_port().
2385 2008-07-07  Pavel Roskin  <proski@gnu.org>
2387         * boot/i386/pc/diskboot.S (notification_string): Replace
2388         "Loading kernel" with just "loading".  This is shorter, less
2389         confusing and saves a few bytes for possible future changes.
2391 2008-07-05  Pavel Roskin  <proski@gnu.org>
2393         * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
2394         size for ATAPI devices, they are undefined.  Output sector
2395         number in decimal form.
2397         * disk/ata.c: Use named constants for status bits.
2399 2008-07-04  Pavel Roskin  <proski@gnu.org>
2401         * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
2402         grub_addr_t before casting it to the void pointer to fix a
2403         warning.  Non-addressable regions are discarded earlier.
2404         (grub_arch_modules_addr): Cast _end to grub_addr_t.
2405         * kern/i386/linuxbios/table.c: Include grub/misc.h.
2406         (check_signature): Don't shadow table_header.
2407         (grub_linuxbios_table_iterate): Cast numeric constants to
2408         grub_linuxbios_table_header_t.
2409         * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
2410         grub_stop().
2412         * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
2413         prevent warnings.
2415         * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
2416         pointer, which can cause warnings.  Support 64-bit addresses.
2418         * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
2419         of sizeof(long).  This fixes PowerPC image generation on x86_64.
2421 2008-07-04  Robert Millan  <rmh@aybabtu.com>
2423         This fixes a performance issue when pc & gpt partmap iterators
2424         didn't abort iteration even after our hook found what it was
2425         looking for (often causing expensive probes of non-existent drives).
2427         Some callers relied on previous buggy behaviour, since they would
2428         rise an error when their own hooks caused early abortion of its
2429         iteration.
2431         * kern/device.c (grub_device_open): Improve error message.
2432         * disk/lvm.c (grub_lvm_open): Likewise.
2433         * disk/raid.c (grub_raid_open): Likewise.
2435         * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
2436         when hook requests it, independently of grub_errno.
2437         (pc_partition_map_probe): Do not fail when find_func() caused
2438         early abortion of pc_partition_map_iterate().
2440         * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
2441         when hook requests it, independently of grub_errno.
2442         (gpt_partition_map_probe): Do not fail when find_func() caused
2443         early abortion of gpt_partition_map_iterate().
2445         * kern/partition.c (grub_partition_iterate): Abort parent iteration
2446         when hook requests it, independently of grub_errno.  Do not fail when
2447         part_map_iterate_hook() caused early abortion of p->iterate().
2449         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
2450         when grub_partition_iterate() returned with non-zero.
2452 2008-07-03  Pavel Roskin  <proski@gnu.org>
2454         * disk/ata.c (grub_ata_pio_write): Check status before writing,
2455         like we do in grub_ata_pio_read().
2456         (grub_ata_readwrite): Always write individual sectors.  Fix the
2457         sector count for the remainder.
2458         (grub_ata_write): Enable writing to ATA devices.  Correctly
2459         report error for ATAPI devices.
2461 2008-07-02  Pavel Roskin  <proski@gnu.org>
2463         * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
2464         warning.
2466         * disk/ata.c (grub_ata_readwrite): Don't increment sector number
2467         for every read sector, we already increment it for the whole
2468         batch.  This fixes reading more than 256 sectors at once.
2470         * util/grub-editenv.c (cmd_info): Cast argument to long
2471         explicitly.  ptrdiff_t reduces to int on i386.
2473         * util/grub-editenv.c (main): Be specific which parameter is
2474         missing.
2476         * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
2477         (memdisk): Make memdisk_orig_addr a pointer.
2479         * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
2480         for file offsets, use grub_off_t instead.  Fix printf format
2481         warnings.
2483         * fs/reiserfs.c: Remove #warning, TODO list items don't belong
2484         there.  Real unexpected warnings should not drown in the noise
2485         about known problems.
2487         * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
2488         grub_disk_addr_t for memory addresses.
2490         * loader/aout.c (grub_aout_load): Cast load_addr to pointer
2491         explicitly to fix a warning.
2493         * util/grub-editenv.c (cmd_info): Fix warning in printf format.
2495         * Makefile.in (MODULE_LDFLAGS): New variable.
2496         * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro.  Check if
2497         the linker accepts --build-id=none.
2498         * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE.  Substitute
2499         MODULE_LDFLAGS.
2500         * genmk.rb: Use MODULE_LDFLAGS when linking modules.
2502         * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
2503         those in Linux XFS code.  Provide a way to access 64-bit parent
2504         inode.
2505         (grub_xfs_iterate_dir): Use the new names.  Avoid reading past
2506         the end of struct grub_xfs_dir_header.
2508 2008-07-02  Bean  <bean123ch@gmail.com>
2510         * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
2511         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
2512         and GRUB_IEEE1275_FLAG_NO_ANSI.
2514         * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
2515         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
2516         and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
2518         * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
2519         immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
2521         * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
2522         GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
2524         * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
2525         esc sequence on non ANSI terminal.
2526         (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
2528         * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
2529         beginning of file.
2531 2008-07-02  Bean  <bean123ch@gmail.com>
2533         * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
2534         (grub_editenv_SOURCES): New variable.
2535         (pkglib_MODULES): Add loadenv.mod.
2536         (loadenv_mod_SOURCES): New variable.
2537         (loadenv_mod_CFLAGS): Likewise.
2538         (loadenv_mod_LDFLAGS): Likewise.
2540         * include/grub/envblk.h: New file.
2542         * util/envblk.c: New file.
2544         * util/grub-editenv.c: New file.
2546         * commands/loadenv.c: New file.
2548 2008-07-01  Pavel Roskin  <proski@gnu.org>
2550         * include/multiboot2.h (struct multiboot_tag_module): Use char,
2551         not unsigned char.  This fixes warnings and is consistent with
2552         other tags.
2554         * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
2556         * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
2558         * term/tparm.c (analyze): Always set *popcount.
2560         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
2561         cast to fix a warning.
2563         * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
2564         cast to suppress a warning.
2566         * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
2567         grub_fshelp_read_file() expects.
2569         * fs/fat.c: Fix UUID calculation on big-endian systems.  We
2570         write uuid as a 32-bit value in CPU byte order, so declare and
2571         use it as such.
2573         * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
2574         long if the format specifier expects it.
2575         * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
2576         * partmap/pc.c (pc_partition_map_iterate): Likewise.
2577         * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
2578         long to fix a warning.
2579         * fs/reiserfs.c (grub_reiserfs_read): Change casts in
2580         grub_dprintf() arguments to fix warnings.
2582 2008-06-30  Pavel Roskin  <proski@gnu.org>
2584         * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
2585         install_bsd_part immediately before core.img is embedded or
2586         modified on disk.  This fixes core.img verification if core.img
2587         cannot be embedded.
2589         * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
2590         core_path to calculate the blocklist.
2591         Patch from Javier Martín <lordhabbit@gmail.com>
2593 2008-06-29  Robert Millan  <rmh@aybabtu.com>
2595         * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro.  Maps filesystem
2596         block to disk block.
2597         (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
2598         Patch from Niels Böhm <bitbucket@arcor.de>
2600 2008-06-29  Robert Millan  <rmh@aybabtu.com>
2602         * util/update-grub_lib.in (font_path): Search for fonts in
2603         /boot/grub first, which is more likely to be readable (we aren't
2604         deciding where fonts live, just looking for them).
2606 2008-06-26  Pavel Roskin  <proski@gnu.org>
2608         * util/biosdisk.c (read_device_map): Don't leave dead map
2609         entries for devices failing stat() check.
2611         * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
2612         core_path_dev for the core.img path on the target device.
2614 2008-06-26  Robert Millan  <rmh@aybabtu.com>
2616         * disk/fs_uuid.c: New file.
2617         * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
2618         (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
2619         (fs_uuid_mod_LDFLAGS): New variables.
2620         * include/grub/disk.h (grub_disk_dev_id): Add
2621         `GRUB_DISK_DEVICE_UUID_ID'.
2622         * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
2623         implement iterate().
2625 2008-06-26  Robert Millan  <rmh@aybabtu.com>
2627         * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
2628         "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
2629         Linux image includes no initrd.
2631 2008-06-21  Javier Martín  <lordhabbit@gmail.com>
2633         * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
2634         call to resolve the core image location that effectively appended the
2635         name twice.
2637 2008-06-21  Robert Millan  <rmh@aybabtu.com>
2639         * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
2640         call from here ...
2642         * util/grub.d/10_hurd.in: ... to here ...
2643         * util/grub.d/10_linux.in: ... and here.
2645 2008-06-19  Robert Millan  <rmh@aybabtu.com>
2647         * kern/main.c (grub_main): Export `prefix' variable immediately
2648         after it has been set by grub_machine_set_prefix().
2650 2008-06-19  Robert Millan  <rmh@aybabtu.com>
2652         * commands/search.c (search_label, search_fs_uuid, search_file): Print
2653         search result when not saving to variable, not the other way around.
2654         When saving to variable, abort iteration as soon as a match is found.
2656 2008-06-19  Robert Millan  <rmh@aybabtu.com>
2658         * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
2659         check for partition that provides /boot/grub.  Its logic is flawed,
2660         as it prevents prepare_grub_to_access_device() from being called
2661         multiple times.
2663 2008-06-19  Robert Millan  <rmh@aybabtu.com>
2665         * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
2666         "insmod" command directly when abstraction modules are needed,
2667         instead of relying on GRUB_PRELOAD_MODULES (which had no effect
2668         since it had already been processed).
2670 2008-06-19  Pavel Roskin  <proski@gnu.org>
2672         * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
2673         changed.  This is needed in case GRUB_LIBDIR changes.
2674         * conf/i386-ieee1275.rmk: Likewise.
2675         * conf/i386-linuxbios.rmk: Likewise.
2676         * conf/i386-pc.rmk: Likewise.
2677         * conf/powerpc-ieee1275.rmk: Likewise.
2679 2008-06-18  Pavel Roskin  <proski@gnu.org>
2681         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
2682         kernel_elf_symlist.c to symlist.c for consistency with other
2683         architectures.  Update all users.
2684         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
2686 2008-06-18  Robert Millan  <rmh@aybabtu.com>
2688         * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
2689         it in prefix.
2691         * util/i386/pc/grub-setup.c (main): Don't handle prefix at all.  Set
2692         `must_embed' to 1 when root_dev is a RAID device.  When dest_dev is
2693         a RAID device, run setup() for all members independently on whether
2694         LVM abstraction is being used.
2695         (setup): Don't handle prefix at all; let grub-mkimage take care of it.
2696         If grub-mkimage has set `*install_dos_part == -2', don't override this
2697         value.
2698         Perform *install_dos_part adjustments independently on whether
2699         we're embedding or not.
2700         Clarify error message when image is too big for embedding.
2701         Remove duplicate *install_dos_part stanza.
2703 2008-06-17  Robert Millan  <rmh@aybabtu.com>
2705         * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
2706         (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
2707         variables.
2708         (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
2709         values in grub_ofconsole_normal_color and
2710         grub_ofconsole_highlight_color (they're not directly related to
2711         background and foreground).
2712         (grub_ofconsole_setcolorstate): Extract background and foreground
2713         from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
2715 2008-06-17  Robert Millan  <rmh@aybabtu.com>
2717         * util/update-grub_lib.in (prepare_grub_to_access_device): Use
2718         /boot/grub for the check in last commit, not /boot (they could be
2719         different partitions).
2721 2008-06-16  Robert Millan  <rmh@aybabtu.com>
2723         * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
2724         asked to setup access for the same partition that provides /boot,
2725         don't bother using UUIDs since our root already has the value we
2726         want.
2728 2008-06-16  Robert Millan  <rmh@aybabtu.com>
2730         * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
2731         I2O devices.
2732         Patch from Sven Mueller <sven@debian.org>.
2734 2008-06-16  Robert Millan  <rmh@aybabtu.com>
2736         * util/update-grub.in: Check for $EUID instead of $UID.
2737         Reported by Vincent Zweije.
2739 2008-06-16  Bean  <bean123ch@gmail.com>
2741         * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
2742         (grub_ext2_read_block): Likewise.
2743         (grub_ext2_read_inode): Likewise.
2744         (grub_ext2_mount): Likewise.
2745         (grub_ext2_close): Likewise.
2746         (grub_ext3_get_journal): Removed.
2748         * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
2749         (grub_reiserfs_read_symlink): Likewise.
2750         (grub_reiserfs_mount): Likewise.
2751         (grub_reiserfs_open): Likewise.
2752         (grub_reiserfs_read): Likewise.
2753         (grub_reiserfs_close): Likewise.
2754         (grub_reiserfs_get_journal): Removed.
2756         * fs/fshelp.c (grub_fshelp_read): Removed.
2757         (grub_fshelp_map_block): Likewise.
2759         * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
2760         (grub_fshelp_journal): Likewise.
2761         (grub_fshelp_read): Likewise.
2762         (grub_fshelp_map_block): Likewise.
2764 2008-06-16  Pavel Roskin  <proski@gnu.org>
2766         * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
2767         floating point anymore.
2768         * include/grub/powerpc/libgcc.h: Leave only necessary exports.
2770 2008-06-15  Pavel Roskin  <proski@gnu.org>
2772         * commands/ls.c (grub_ls_list_files): Use integer calculations
2773         for human readable format, avoid floating point use.
2774         * kern/misc.c (grub_ftoa): Remove.
2775         (grub_vsprintf): Remove floating point support.
2777 2008-06-15  Robert Millan  <rmh@aybabtu.com>
2779         * util/grub.d/10_linux.in: Use the underlying device for loop-AES
2780         devices.
2781         Reported by Max Vozeler.
2783 2008-06-15  Robert Millan  <rmh@aybabtu.com>
2785         * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
2786         in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
2787         skipped later.
2788         (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
2789         the beginning of the prefix.
2791         * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
2792         It is assumed that if we have a memdisk, grub-mkimage has set
2793         grub_prefix to include the "(memdisk)" drive in it.
2795 2008-06-15  Robert Millan  <rmh@aybabtu.com>
2797         * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
2798         Initialize keyboard controller after registering the terminal, so that
2799         grub_printf() can be called from grub_keyboard_controller_init().
2801 2008-06-15  Robert Millan  <rmh@aybabtu.com>
2803         * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
2804         extent-btree which is written as big endian on disk.
2805         Reported by Alain Greppin  <al@chilibi.org>.
2807 2008-06-14  Robert Millan  <rmh@aybabtu.com>
2809         * util/i386/efi/grub-install.in (modules): Remove `_chain'.
2810         * util/i386/pc/grub-install.in (modules): Likewise.
2812 2008-06-13  Pavel Roskin  <proski@gnu.org>
2814         * commands/ls.c (grub_ls_list_files): Fix format warnings.
2816 2008-06-13  Bean  <bean123ch@gmail.com>
2818         * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
2820         * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
2822         * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
2823         to indicate sparse block.
2825 2008-06-12  Pavel Roskin  <proski@gnu.org>
2827         * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
2828         number, grub_fshelp_read() does it for us.
2830         * fs/fshelp.c (grub_fshelp_read): New function.  Implement
2831         linear disk read with journal translation.
2832         * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
2833         * include/grub/fshelp.h: Declare grub_fshelp_read().
2835 2008-06-09  Pavel Roskin  <proski@gnu.org>
2837         * fs/minix.c (grub_minix_mount): Handle error reading
2838         superblock.
2840 2008-06-08  Robert Millan  <rmh@aybabtu.com>
2842         * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
2843         don't append the RAID prefix afterwards.
2844         Reported by Clint Adams.
2846 2008-06-08  Robert Millan  <rmh@aybabtu.com>
2848         Based on description from Pavel:
2849         * kern/disk.c (grub_disk_check_range): Rename to ...
2850         (grub_disk_adjust_range): ... this.  Add a comment explaining the
2851         tasks performed by this function.
2853 2008-06-08  Robert Millan  <rmh@aybabtu.com>
2855         * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
2856         `num_serial' (for consistency with other variables).
2857         (struct grub_ntfs_data): Add `uuid' member.
2858         * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
2859         (grub_ntfs_uuid): New function.
2860         (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
2862 2008-06-07  Pavel Roskin  <proski@gnu.org>
2864         * util/biosdisk.c (open_device): Revert last change to the
2865         function, it broke installation.  The sector needs to be
2866         different dependent on which device is opened.
2868 2008-06-06  Robert Millan  <rmh@aybabtu.com>
2870         Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
2871         rest of GRUB, and breakage doesn't happen if its value were modified.
2873         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
2874         Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
2875         a constant (same value).
2876         * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
2877         `GRUB_KERNEL_MACHINE_DATA_END' (same value).
2879 2008-06-06  Robert Millan  <rmh@aybabtu.com>
2881         * util/biosdisk.c (open_device): Do not modify sector offset when
2882         accessing a partition.  kern/disk.c already handles this for us.
2884 2008-06-06  Robert Millan  <rmh@aybabtu.com>
2886         * util/grub-emu.c (grub_machine_init): Move code in this function from
2887         here ...
2888         (main): ... to here (before grub_util_biosdisk_init() call, to prevent
2889         segfault in case grub_printf() is called).
2891         * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
2892         grub_probe.  Update all users not to explicitly add it again.
2893         (grub_device): New variable; contains corresponding device for grubdir.
2894         (fs_module, partmap_module, devabstraction_module): Pass
2895         `--device ${grub_device}' to grub_probe to avoid traversing /dev
2896         every time.
2898 2008-06-05  Robert Millan  <rmh@aybabtu.com>
2900         * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
2901         is found, print it (same layout as with labels).
2903 2008-06-04  Robert Millan  <rmh@aybabtu.com>
2905         * util/biosdisk.c (get_drive): Rename to ...
2906         (find_grub_drive): ... this.  Update all users.
2908         (get_os_disk): Rename to ...
2909         (convert_system_partition_to_system_disk): ... this.  Update all users.
2911         (find_drive): Rename to ...
2912         (find_system_device): ... this.  Update all users.
2914 2008-06-04  Robert Millan  <rmh@aybabtu.com>
2916         * util/biosdisk.c (get_os_disk): Handle IDA devices.
2917         * util/grub-mkdevicemap.c (get_mmc_disk_name)
2918         (make_device_map): Likewise.
2920 2008-06-01  Robert Millan  <rmh@aybabtu.com>
2922         *  util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
2923         before dereferencing it.
2925         * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
2926         union with fat12/fat16-specific ones.  Add some new fields, including
2927         `num_serial' for both versions.
2928         (struct grub_fat_data): Add `uuid' member.
2929         (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
2930         names.  Initialize `data->uuid' using `num_serial'.
2931         (grub_fat_uuid): New function.
2932         (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
2934         * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
2935         (grub_reiserfs_uuid): New function.
2936         (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
2937         member.
2939         * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
2940         (grub_xfs_uuid): New function.
2941         (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
2943 2008-06-01  Robert Millan  <rmh@aybabtu.com>
2945         * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
2946         code that is backward compatible with pre-uuid search command.
2948 2008-05-31  Robert Millan  <rmh@aybabtu.com>
2950         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
2951         floppies after everything else, to ensure floppy drive isn't accessed
2952         unnecessarily (patch from Bean).
2954 2008-05-31  Robert Millan  <rmh@aybabtu.com>
2956         * commands/search.c (search_label, search_fs_uuid, search_file): Do
2957         not print device names when we were asked to set a variable.
2959 2008-05-31  Robert Millan  <rmh@aybabtu.com>
2961         * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
2962         using "cursor-on" and "cursor-off" commands (understood at least by
2963         the Open Firmware flavour on OLPC).
2965 2008-05-31  Michael Gorven  <michael@gorven.za.net>
2967         * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
2968         on and off sequences.
2970 2008-05-31  Robert Millan  <rmh@aybabtu.com>
2972         * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
2973         * util/update-grub.in: Likewise.
2975 2008-05-30  Pavel Roskin  <proski@gnu.org>
2977         * util/biosdisk.c (linux_find_partition): Simplify logic and
2978         make the code more universal.  Keep special processing for
2979         devfs, but use a simple rule for all other devices.  If the
2980         device ends with a number, append 'p' and the partition number.
2981         Otherwise, append only the partition number.
2983 2008-05-30  Robert Millan  <rmh@aybabtu.com>
2985         * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
2986         * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
2987         GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
2988         the `root' parameter to Linux.
2990 2008-05-30  Robert Millan  <rmh@aybabtu.com>
2992         * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
2993         * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
2994         --fs_uuid with --fs-uuid.
2995         * util/update-grub.in: Allow filesystem UUID probes to fail (since not
2996         all filesystems support them).
2998 2008-05-30  Robert Millan  <rmh@aybabtu.com>
3000         * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
3001         grub_printf() flags, since we're printing in units of 2 bytes.
3003 2008-05-30  Robert Millan  <rmh@aybabtu.com>
3005         * util/grub.d/00_header.in: Remove obsolete comment referencing
3006         convert_system_path_to_grub_path().
3007         * util/update-grub.in: Likewise.
3008         * util/update-grub_lib.in (is_path_readable_by_grub): New function.
3009         (convert_system_path_to_grub_path): Add a warning message explaining
3010         that this function is deprecated.  Rely on is_path_readable_by_grub()
3011         for the readability checks.
3012         (font_path): Use is_path_readable_by_grub() for the readability
3013         check rather than convert_system_path_to_grub_path().
3015 2008-05-30  Robert Millan  <rmh@aybabtu.com>
3017         * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
3018         * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
3019         converting it first.
3020         * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
3021         grub.cfg for access to font file, and afterwards call it again to set
3022         the root device.
3024 2008-05-30  Robert Millan  <rmh@aybabtu.com>
3026         * commands/search.c (options): Add --fs_uuid option.
3027         (search_fs_uuid): New function.
3028         (grub_cmd_search): Fix --set argument passing.
3029         Use search_fs_uuid() when requested via --fs_uuid.
3030         (grub_search_init): Update help message.
3031         * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
3032         and redeclare it as an array of 16-bit words.
3033         (grub_ext2_uuid): New function.
3034         (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
3035         * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
3036         * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
3037         (GRUB_DEVICE_BOOT_UUID): New variables.
3038         (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
3039         * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
3040         whenever possible.
3041         * util/grub.d/10_hurd.in: Avoid explicit use of root drive.  Instead,
3042         just assume `root' variable has the right value.
3043         * util/grub.d/10_linux.in: Likewise.
3044         * util/grub-probe.c (probe): Probe for filesystem UUID when requested
3045         via PRINT_FS_UUID.
3046         (main): Recognise `-t fs_uuid' argument.
3048 2008-05-30  Robert Millan  <rmh@aybabtu.com>
3050         * util/biosdisk.c (map): Redefine structure to hold information
3051         about GRUB drive name.
3052         (get_drive): Reimplement without assuming (and verifying) BIOS-like
3053         drive names.
3054         (call_hook): Remove.
3055         (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
3056         member.  Assume drive has partitions.
3057         (grub_util_biosdisk_open): Access device names via `.device' struct
3058         member.
3059         (open_device): Likewise.
3060         (find_drive): Likewise.
3061         (read_device_map): Adjust map[] usage to match the new struct
3062         definition.  Don't check for duplicates (still possible, but not cheap
3063         anymore).
3064         (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
3065         (make_device_name): Remove assumption of BIOS-like drive names.
3067 2008-05-30  Pavel Roskin  <proski@gnu.org>
3069         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
3070         compiling execute.c doesn't need grub_script.tab.h anymore.
3071         (normal/command.c_DEPENDENCIES): Likewise.
3072         (normal/function.c_DEPENDENCIES): Likewise.
3073         * conf/i386-ieee1275.rmk: Likewise.
3074         * conf/i386-linuxbios.rmk: Likewise.
3075         * conf/i386-pc.rmk: Likewise.
3076         * conf/powerpc-ieee1275.rmk: Likewise.
3077         * conf/sparc64-ieee1275.rmk: Likewise.
3079 2008-05-29  Pavel Roskin  <proski@gnu.org>
3081         * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
3082         when scanning metadata for volume group name.
3084         * include/grub/script.h: Don't include grub_script.tab.h.  It's
3085         a generated file, which may only be included from the files with
3086         DEPENDENCIES rules in the makefile.  Don't use typedef YYSTYPE,
3087         use union YYSTYPE, as the later allows forward declaration.
3088         * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
3090 2008-05-29  Robert Millan  <rmh@aybabtu.com>
3092         * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
3093         (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
3094         [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
3095         (grub_console_checkkey): Add grub_dprintf() call to report unknown
3096         scan codes.
3098 2008-05-29  Robert Millan  <rmh@aybabtu.com>
3100         * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
3101         control key combinations.
3103 2008-05-29  Robert Millan  <rmh@aybabtu.com>
3105         * util/powerpc/ieee1275/grub-install.in: Move from here ...
3106         * util/ieee1275/grub-install.in: ... to here.
3107         * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
3108         * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
3109         (grub_install_SOURCES): Likewise.
3111 2008-05-29  Robert Millan  <rmh@aybabtu.com>
3113         * fs/affs.c: Update copyright year.
3114         * fs/ext2.c: Likewise.
3115         * fs/fshelp.c: Likewise.
3116         * fs/hfsplus.c: Likewise.
3117         * fs/ntfs.c: Likewise.
3118         * fs/xfs.c: Likewise.
3119         * include/grub/fshelp.h: Likewise.
3120         * util/grub-mkdevicemap.c: Likewise.
3122 2008-05-28  Robert Millan  <rmh@aybabtu.com>
3124         * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
3125         might need to be fatfs to support some firmware implementations
3126         (e.g. OFW or EFI).
3128 2008-05-28  Robert Millan  <rmh@aybabtu.com>
3130         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
3131         devices.
3132         * util/grub-mkdevicemap.c (get_mmc_disk_name)
3133         (make_device_map): Likewise.
3135 2008-05-20  Bean  <bean123ch@gmail.com>
3137         * fs/fshelp.c (grub_fshelp_map_block): New function.
3138         (grub_fshelp_find_file): Use 64-bit type for pos and block address.
3139         Use `>>' and `&' operator to avoid 64-bit divide and modulo.
3141         * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
3142         (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
3143         (grub_fshelp_journal): New structure.
3144         (grub_fshelp_map_block): New function prototype.
3145         (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
3146         (grub_fshelp_map_block): Likewise.
3148         * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
3149         (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
3150         (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
3151         (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
3152         (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
3153         (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
3154         (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
3155         (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
3156         (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
3157         (EXT3_JOURNAL_FLAG_DELETED): Likewise.
3158         (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
3159         (grub_ext2_sblock): New members for journal support.
3160         (grub_ext3_journal_header): New structure.
3161         (grub_ext3_journal_revoke_header): Likewise.
3162         (grub_ext3_journal_block_tag): Likewise.
3163         (grub_ext3_journal_sblock): Likewise.
3164         (grub_fshelp_node): New members logfile and journal.
3165         (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
3166         grub_fshelp_map_block to get real block number.
3167         (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
3168         number.
3169         (grub_ext2_read_inode): Likewise.
3170         (grub_ext3_get_journal): New function.
3171         (grub_read_inode): Initialize journal using grub_ext3_get_journal.
3172         (grub_ext2_close): Release memory used by journal.
3174         * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
3175         (REISERFS_MAGIC_DESC_BLOCK): New macro.
3176         (grub_reiserfs_transaction_header): Renamed to
3177         grub_reiserfs_description_block, replace field data with real_blocks.
3178         (grub_reiserfs_commit_block): New structure.
3179         (grub_reiserfs_data): New member journal.
3180         (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
3181         number.
3182         (grub_reiserfs_read_symlink): Likewise.
3183         (grub_reiserfs_iterate_dir): Likewise.
3184         (grub_reiserfs_open): Likewise.
3185         (grub_reiserfs_read): Likewise.
3186         (grub_reiserfs_get_journal): New function.
3187         (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
3188         three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
3189         using grub_reiserfs_get_journal.
3190         (grub_reiserfs_close): Release memory used by journal.
3192         * fs/affs.c (grub_affs_read_block): Change block type to
3193         grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
3195         * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
3197         * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
3199         * fs/ntfs.c (grub_ntfs_read_block): Likewise.
3201         * fs/udf.c (grub_udf_read_block): Change block type to
3202         grub_disk_addr_t. Use type cast to avoid warning.
3204         * fs/xfs.c (grub_xfs_read_block): Likewise.
3206 2008-05-16  Christian Franke  <franke@computer.org>
3208         * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
3209         to ensure that break with ESC will always work.
3210         * commands/sleep.c (grub_interruptible_millisleep): Likewise.
3211         Remove ESC from keyboard queue.
3213 2008-05-16  Christian Franke  <franke@computer.org>
3215         * util/biosdisk.c: [__CYGWIN__] Add includes.
3216         (grub_util_biosdisk_open): Use Linux code also for Cygwin.
3217         (get_os_disk): Move variable declarations to OS specific
3218         parts to avoid warning.
3219         [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
3220         [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
3221         (grub_util_biosdisk_get_grub_dev): Use Linux code also for
3222         Cygwin.
3223         * util/getroot.c: [__CYGWIN__] Add includes.
3224         (strip_extra_slashes): Fix "/" case.
3225         [__CYGWIN__] (get_win32_path): New function.
3226         [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
3227         [__CYGWIN__] (find_root_device): Disable.
3228         [__CYGWIN__] (get_bootsec_serial): New function.
3229         [__CYGWIN__] (find_cygwin_root_device): Likewise.
3230         [__linux__] (grub_guess_root_device): Add early returns to simplify
3231         structure.
3232         [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
3233         [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
3234         check for Linux only.
3236 2008-05-15  Bean  <bean123ch@gmail.com>
3238         * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
3239         keyboard hang problem in apple's intel mac.
3241 2008-05-09  Robert Millan  <rmh@aybabtu.com>
3243         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
3244         devices.
3245         * util/grub-mkdevicemap.c (get_virtio_disk_name)
3246         (make_device_map): Likewise.
3247         Reported by Aurelien Jarno <aurel32@debian.org>
3249 2008-05-07  Ian Campbell  <ijc@hellion.org.uk>
3251         * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
3252         * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
3253         (make_device_map): Output entries for xvd type disks.
3255 2008-05-07  Robert Millan  <rmh@aybabtu.com>
3257         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
3258         devices.
3259         * util/grub-mkdevicemap.c (get_cciss_disk_name)
3260         (make_device_map): Likewise.
3261         Reported by Roland Dreier <rdreier@cisco.com>
3263 2008-05-07  Robert Millan  <rmh@aybabtu.com>
3265         * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
3266         grub_strstr() call.  Correct a few mistakes in failure path handling.
3268 2008-05-06  Robert Millan  <rmh@aybabtu.com>
3270         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
3271         Do not print a trailing slash (therefore, the root directory is an
3272         empty string).
3273         (convert_system_path_to_grub_path): Do not remove trailing slash
3274         from make_system_path_relative_to_its_root() output.
3276         * util/i386/pc/grub-install.in: Add trailing slash to output from
3277         make_system_path_relative_to_its_root().
3279 2008-05-06  Robert Millan  <rmh@aybabtu.com>
3281         * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'.  This
3282         ensures that output lines aren't intermangled with those sent to
3283         stderr (via grub_util_info()).
3284         * util/grub-probe.c (grub_refresh): Likewise.
3285         * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
3287 2008-05-05  Christian Franke  <franke@computer.org>
3289         * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
3290         Add Cygwin device names.
3291         (get_ide_disk_name) [__CYGWIN__]: Likewise.
3292         (get_scsi_disk_name) [__CYGWIN__]: Likewise.
3293         (check_device): Return error instead of success on empty name.
3294         (make_device_map): Move label inside linux specific code to
3295         prevent compiler warning.
3297 2008-04-30  Robert Millan  <rmh@aybabtu.com>
3299         Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
3300         * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
3301         first boot option.
3302         * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
3304 2008-04-29  Robert Millan  <rmh@aybabtu.com>
3306         * docs/grub.cfg: New file (example GRUB configuration).
3308 2008-04-26  Robert Millan  <rmh@aybabtu.com>
3310         * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST).  Add
3311         `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
3312         and `disk/ieee1275/nand.c'.
3314 2008-04-25  Bean  <bean123ch@gmail.com>
3316         * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
3317         i386-linuxbios.
3319         * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
3320         change the buffer size to 4096 for cdrom device.
3322         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
3323         and nand.mod.
3324         (_linux_mod_SOURCES): New variable.
3325         (_linux_mod_CFLAGS): Likewise.
3326         (_linux_mod_LDFLAGS): Likewise.
3327         (linux_mod_SOURCES): Likewise.
3328         (linux_mod_CFLAGS): Likewise.
3329         (linux_mod_LDFLAGS): Likewise.
3330         (nand_mod_SOURCES): Likewise.
3331         (nand_mod_CFLAGS): Likewise.
3332         (nand_mod_LDFLAGS): Likewise.
3334         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
3335         GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
3336         type property. (nand device in olpc don't have this property)
3338         * include/grub/disk.h (grub_disk_dev_id): New macro
3339         GRUB_DISK_DEVICE_NAND_ID.
3341         * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
3342         function prototype.
3343         (grub_rescue_cmd_initrd): Likewise.
3345         * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
3346         (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
3347         ofw_cif_handler and ofw_idt, adjust padding number.
3349         * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
3350         GRUB_MACHINE_IEEE1275 is defined.
3352         * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
3353         Use NESTED_FUNC_ATTR attribute on the hook parameter.
3355         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
3356         on nested function heap_init.
3357         (grub_upper_mem): New variable for i386-ieee1275.
3358         (grub_get_extended_memory): New function for i386-ieee1275.
3359         (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
3361         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
3362         NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
3363         property.
3365         * loader/i386/ieee1275/linux.c: New file.
3367         * loader/i386/ieee1275/linux_normal.c: New file.
3369         * disk/ieee1275/nand.c: New file.
3371 2008-04-18  Thomas Schwinge  <tschwinge@gnu.org>
3373         * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
3374         value.
3375         * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
3377 2008-04-18  Robert Millan  <rmh@aybabtu.com>
3379         Restructures early code path on ieee1275 to unify grub_main() as
3380         the first C function that is executed in every platform.
3382         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
3383         * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
3384         cmain().
3385         * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
3386         * kern/ieee1275/cmain.c (cmain): Rename to ...
3387         * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
3388         * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
3389         at the beginning.
3391 2008-04-18  Robert Millan  <rmh@aybabtu.com>
3393         * util/update-grub.in: Fix syntax error when setting
3394         `GRUB_PRELOAD_MODULES'.
3395         Reported by Stephane Chazelas <stephane@artesyncp.com>
3397 2008-04-17  Lubomir Kundrak  <lkundrak@redhat.com>
3399         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
3400         section into account, newer toolchains generate unique build ids
3401         * configure.ac: remove the test for --build-id=none acceptance,
3402         we want build ids to be preserved
3403         * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
3404         far from other sections don't cause the raw binary images grow
3405         size
3407 2008-04-15  Robert Millan  <rmh@aybabtu.com>
3409         * disk/lvm.c: Update copyright year.
3410         * kern/misc.c: Likewise.
3412 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
3414         * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
3415         there is no memory left for physical volume name.
3417 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
3419         * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
3420         volume name mapping to support bigger than 9 character names properly.
3422 2008-04-13  Robert Millan  <rmh@aybabtu.com>
3424         * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
3425         as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
3427 2008-04-13  Christian Franke  <franke@computer.org>
3429         * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
3430         to create a floppy emulation boot CD when non emulation mode
3431         does not work.
3432         Enable Joliet CD filesystem extension.
3434 2008-04-13  Robert Millan  <rmh@aybabtu.com>
3436         * kern/misc.c (grub_strncat): Fix off-by-one error.
3437         Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
3439         * kern/env.c (grub_env_context_close): Clear current context, not
3440         previous one.
3441         Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
3443         * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
3445 2008-04-13  Robert Millan  <rmh@aybabtu.com>
3447         Improve robustness when handling LVM.
3449         * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
3450         (and leave `*p' unmodified).
3451         (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
3452         through it.
3453         (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
3454         iterating through it.
3455         (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
3456         through it.
3457         (grub_lvm_scan_device): Check the return value (and fail gracefully
3458         when due) on each grub_lvm_getvalue() or grub_strstr() call.
3459         Don't assume `vg->pvs != NULL' when iterating through it.
3461 2008-04-13  Robert Millan  <rmh@aybabtu.com>
3463         * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
3464         * genmk.rb (partmap): New variable.
3465         (CLEANFILES, PARTMAPFILES): Add #{partmap}.
3466         (#{partmap}): New target rule.
3467         * genpartmaplist.sh: New file.
3468         * Makefile.in (pkglib_DATA): Add partmap.lst.
3469         (partmap.lst): New target rule.
3470         * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
3471         modules (including all partition maps), instead of preloading them.
3473 2007-04-13  Fabian Greffrath  <fabian.greffrath@web.de>
3475         * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
3476         `linux-boot-prober' (if installed) to detect other operating
3477         systems which are installed on the computer and add them to
3478         the boot menu.
3479         * conf/common.rmk: Build and install 30_os-prober.
3481 2008-04-12  Robert Millan  <rmh@aybabtu.com>
3483         * kern/powerpc/ieee1275/init.c: Move from here ...
3484         * kern/ieee1275/init.c: ... to here.  Update all users.
3486         * kern/powerpc/ieee1275/cmain.c: Move from here ...
3487         * kern/ieee1275/cmain.c: ... to here.  Update all users.
3489         * kern/powerpc/ieee1275/openfw.c: Move from here ...
3490         * kern/ieee1275/openfw.c: ... to here.  Update all users.
3492         * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
3493         * loader/ieee1275/multiboot2.c: ... to here.  Update all users.
3495 2008-04-10  Pavel Roskin  <proski@gnu.org>
3497         * configure.ac: Always use "_cv_" in cache variables for
3498         compatibility with Autoconf 2.62.
3500 2008-04-07  Robert Millan  <rmh@aybabtu.com>
3502         Revert grub/machine/init.h addition by Pavel (since it breaks on
3503         i386-ieee1275 and others):
3504         * util/i386/pc/misc.c: Remove grub/machine/init.h.
3505         * util/powerpc/ieee1275/misc.c: Likewise.
3507 2008-04-07  Robert Millan  <rmh@aybabtu.com>
3509         * util/grub-probe.c (probe): Improve error message.
3511 2008-04-07  Robert Millan  <rmh@aybabtu.com>
3513         * util/biosdisk.c (read_device_map): Skip devices that don't exist
3514         (this prevents the presence of a bogus entry from ruining the whole
3515         thing).
3517 2008-04-06  Pavel Roskin  <proski@gnu.org>
3519         * util/biosdisk.c: Include grub/util/biosdisk.h.
3520         * util/grub-fstest.c (execute_command): Make static.
3521         * util/grub-mkdevicemap.c (check_device): Likewise.
3522         * util/i386/pc/misc.c: Include grub/machine/init.h.
3523         * util/powerpc/ieee1275/misc.c: Likewise.
3524         * util/lvm.c: Include grub/util/lvm.h.
3525         * util/misc.c: Include grub/kernel.h, grub/misc.h and
3526         grub/cache.h.
3527         * util/raid.c: Include grub/util/raid.h.
3528         (grub_util_getdiskname): Make static.
3530         * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
3531         grub_hostfs_fini(), as they are called from grub_init_all() and
3532         grub_fini_all() respectively.  This fixes an infinite loop in
3533         grub-fstest due to double registration of hostfs.
3534         Reported by Christian Franke <Christian.Franke@t-online.de>
3536 2008-04-05  Pavel Roskin  <proski@gnu.org>
3538         * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
3539         all 8 functions.  Otherwise, probe function 0 only.
3541 2008-04-04  Pavel Roskin  <proski@gnu.org>
3543         * commands/lspci.c (grub_lspci_iter): Print the bus number
3544         correctly.
3546         * commands/lspci.c (grub_pci_classes): Fix typos.
3547         (grub_lspci_iter): Don't print func twice.  Print vendor ID
3548         before device ID, as it's normally done.
3550         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
3551         Fix signedness warnings.
3552         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
3553         Likewise.
3554         * util/ieee1275/get_disk_name.c: Include config.h so that
3555         _GNU_SOURCE is defined and getline() is declared.  Mark an
3556         unused argument as such.  Fix a signedness warning.
3558 2008-04-02  Pavel Roskin  <proski@gnu.org>
3560         * genkernsyms.sh.in: Use more robust assignments for CC and
3561         srcdir.  Quote srcdir.
3562         * gensymlist.sh.in: Likewise.  Assert at the compile time that
3563         the symbol table is not empty.
3565         * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
3566         * fs/cpio.c (grub_cpio_read): Likewise.
3568 2008-04-01  Pavel Roskin  <proski@gnu.org>
3570         * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
3571         * disk/host.c (grub_host_open): Likewise.
3572         * disk/loopback.c (grub_loopback_open): Likewise.
3573         * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
3574         disk->id as in disk/host.c, not a multi-character constant.
3576         * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek().  The
3577         later is obsolete, potentially dangerous and sets a bad example.
3578         * util/i386/efi/grub-mkimage.c (make_header): Likewise.
3579         * util/misc.c (grub_util_get_image_size): Likewise.
3581         * disk/loopback.c (options): Improve help for "--partitions".
3583         * normal/arg.c (grub_arg_show_help): Fix spacing of the long
3584         options to align them with the short options, e.g. "echo -e".
3586 2008-03-31  Bean  <bean123ch@gmail.com>
3588         * video/reader/png.c (grub_png_data): New member is_16bit and
3589         image_data.
3590         (grub_png_decode_image_header): Detect 16 bit png image.
3591         (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
3592         (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
3593         (grub_video_reader_png): Release memory occupied by image_data.
3595         * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
3596         4096 bytes.
3597         (grub_nfs_mount): Skip the test for sector per cluster.
3599         * include/grub/ntfs.h (MAX_SPC): Removed.
3601 2008-03-31  Bean  <bean123ch@gmail.com>
3603         * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
3604         (grub_probe_SOURCES): Add fs/afs.c.
3605         (grub_fstest_SOURCES): Likewise.
3606         (afs_mod_SOURCES): New variable.
3607         (afs_mod_CFLAGS): Likewise.
3608         (afs_mod_LDFLAGS): Likewise.
3610         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
3611         (grub_emu_SOURCES): Likewise.
3613         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3615         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3617         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3619         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3621         * fs/afs.c: New file.
3623 2008-03-30  Pavel Roskin  <proski@gnu.org>
3625         * disk/host.c: Include grub/misc.h to fix a warning.
3626         * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
3627         warnings about implicit declarations.
3629         * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
3630         variable.
3631         * include/grub/i386/loader.h: Change declaration of
3632         grub_linux_boot() to match what grub_loader_set() expects.
3633         * util/getroot.c (grub_guess_root_device): Return const char* to
3634         fix a warning.
3635         * util/grub-probe.c (probe): Fix a warning about uninitialized
3636         abstraction_name variable.
3637         * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
3638         second argument as unused to fix a warning.
3640         * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
3641         missing grub_error() call.
3643         * util/update-grub_lib.in: Define datarootdir, since Autoconf
3644         2.60 and newer uses it to define datadir.
3646         * commands/sleep.c: Fix warning about implicit declaration.
3647         * disk/memdisk.c: Likewise.
3648         * loader/aout.c: Likewise.
3649         * loader/i386/bsd_normal.c: Likewise.
3650         * util/grub-probe.c: Likewise.
3652         * commands/i386/cpuid.c (has_longmode): Make static.
3653         * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
3654         * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
3656         * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
3657         GDT.  This is more robust, as %ds can change.
3658         (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
3659         calling real_to_prot().
3660         (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
3662 2008-03-28  Pavel Roskin  <proski@gnu.org>
3664         * kern/i386/pc/startup.S: Assert that uncompressed functions
3665         don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
3666         * kern/i386/pc/lzo1x.S: Remove all .align directives in the
3667         code, as they push parts of the code (error handlers) beyond
3668         GRUB_KERNEL_MACHINE_RAW_SIZE.  Speed is not as important in this
3669         code as correctness and size.
3671 2008-03-28  Pavel Roskin  <proski@gnu.org>
3673         * kern/i386/pc/startup.S
3674         (grub_biosdisk_get_diskinfo_int13_extensions): When converting
3675         data block address to the real mode, keep offset minimal.  This
3676         works around a bug in AWARD BIOS on old Athlon systems, which
3677         makes CD detection hang.
3679 2008-03-26  Pavel Roskin  <proski@gnu.org>
3681         * normal/color.c (grub_parse_color_name_pair): Make `name' a
3682         const.
3683         * include/grub/normal.h: Add grub_parse_color_name_pair()
3684         declaration.
3686 2008-03-24  Bean  <bean123ch@gmail.com>
3688         * disk/i386/pc/biosdisk.c (cd_start): Removed.
3689         (cd_count): Removed.
3690         (cd_drive): New variable.
3691         (grub_biosdisk_get_drive): Don't check for (cdN) device.
3692         (grub_biosdisk_call_hook): Likewise.
3693         (grub_biosdisk_iterate): Change cdrom detection method.
3694         (grub_biosdisk_open): Replace cd_start with cd_drive.
3695         (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
3696         detect cdrom device.
3698         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
3699         Removed.
3700         (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
3701         (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
3702         (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
3703         (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
3704         (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
3705         (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
3706         (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
3707         (grub_biosdisk_cdrp): New structure.
3708         (grub_biosdisk_get_cdinfo_int13_extensions): New function.
3710         * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
3712         * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
3713         device.
3715         * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
3716         New function.
3718 2008-03-20  Robert Millan  <rmh@aybabtu.com>
3720         Remove 2 TiB limit in ata.mod.
3721         * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
3722         (grub_ata_dumpinfo): Print sector count with 0x%llx.
3723         (grub_ata_identify): Interpret `&info16[100]' as a pointer to
3724         grub_uint64_t instead of grub_uint32_t.
3726 2008-03-05  Bean  <bean123ch@gmail.com>
3728         * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
3729         (grub_multiboot): Set boot device.
3731         * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
3733 2008-03-02  Bean  <bean123ch@gmail.com>
3735         * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
3736         symlink_buffer.
3738 2008-03-01  Yoshinori K. Okuji  <okuji@enbug.org>
3740         * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
3741         texinfo.tex.
3743         * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
3744         modified.
3746         * docs/fdl.texi: New file.
3748         * docs/mdate-sh: New file. Copied from gnulib.
3749         * docs/texinfo.tex: Likewise.
3751         * config.guess: Updated from gnulib.
3752         * install-sh: Likewise.
3754 2008-02-28  Robert Millan  <rmh@aybabtu.com>
3756         * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
3757         (aout_mod_SOURCES): New variable.
3758         (aout_mod_CFLAGS): Likewise.
3759         (aout_mod_LDFLAGS): Likewise.
3761         * conf/i386-ieee1275.rmk: Likewise.
3763 2008-02-28  Robert Millan  <rmh@aybabtu.com>
3765         * util/update-grub.in: Reorganise terminal validity check.  Accept
3766         `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
3767         Based on suggestion by Franklin PIAT.
3769 2008-02-28  Fabian Greffrath  <greffrath@leat.rub.de>
3771         * include/grub/util/getroot.h (grub_util_check_block_device): Export new
3772         function.
3773         * util/getroot.c (grub_util_check_block_device): New function that
3774         returns the given argument if it is a block device and returns NULL else.
3775         * util/grub-probe.c (argument_is_device): New variable.
3776         (probe): Promote device_name from a variable to an argument. Receive
3777         device_name from grub_util_check_block_device() if path is NULL and from
3778         grub_guess_root_device() else. Do not free() device_name anymore.
3779         (options): Introduce new parameter '-d, --device'.
3780         (main): Add description of the new parameter to the help screen.
3781         Rename path variable to argument. Set argument_is_device if the '-d'
3782         option is given. Pass argument to probe() depending on
3783         argument_is_device.
3785 2008-02-24  Bean  <bean123ch@gmail.com>
3787         * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
3788         (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
3789         (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
3790         (GRUB_ISO9660_VOLDESC_PART): Likewise.
3791         (GRUB_ISO9660_VOLDESC_END): Likewise.
3792         (grub_iso9660_primary_voldesc): New member escape.
3793         (grub_iso9660_data): New member joliet.
3794         (grub_iso9660_convert_string): New function.
3795         (grub_iso9660_mount): Detect joliet extension.
3796         (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
3797         (grub_iso9660_iso9660_label): Likewise.
3799         * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
3800         (grub_setup_SOURCES): Add fs/udf.c.
3801         (grub_fstest_SOURCES): Likewise.
3802         (udf_mod_SOURCES): New variable.
3803         (udf_mod_CFLAGS): Likewise.
3804         (udf_mod_LDFLAGS): Likewise.
3806         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
3807         (grub_emu_SOURCES): Likewise.
3809         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3811         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3813         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3815         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3817         * fs/udf.c: New file.
3819 2008-02-24  Robert Millan  <rmh@aybabtu.com>
3821         * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
3822         (normal/lexer.c_DEPENDENCIES): New variables.
3823         * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
3824         (normal/lexer.c_DEPENDENCIES): Likewise.
3825         * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
3826         (normal/lexer.c_DEPENDENCIES): Likewise.
3827         * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
3828         (normal/lexer.c_DEPENDENCIES): Likewise.
3829         * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
3830         (normal/lexer.c_DEPENDENCIES): Likewise.
3831         * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
3832         (normal/lexer.c_DEPENDENCIES): Likewise.
3834 2008-02-23  Robert Millan  <rmh@aybabtu.com>
3836         * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
3837         since they were intended to be in hex.  This didn't break previously
3838         because of a bug in gpt_partition_map_iterate() (see below).
3840         (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
3841         when checking the validity of GPT header.
3842         Remove `partno', since it always provides the same information as `i'.
3844 2008-02-21  Yoshinori K. Okuji  <okuji@enbug.org>
3846         * include/grub/efi/time.h: Fix a wrong comment.
3848 2008-02-19  Pavel Roskin  <proski@gnu.org>
3850         * kern/rescue.c (grub_enter_rescue_mode): Improve initial
3851         message.
3853 2008-02-19  Bean  <bean123ch@gmail.com>
3855         * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
3856         (aout_mod_SOURCES): New variable.
3857         (aout_mod_CFLAGS): Likewise.
3858         (aout_mod_LDFLAGS): Likewise.
3859         (_bsd_mod_SOURCES): New variable.
3860         (_bsd_mod_CFLAGS): Likewise.
3861         (_bsd_mod_LDFLAGS): Likewise.
3862         (bsd_mod_SOURCES): New variable.
3863         (bsd_mod_CFLAGS): Likewise.
3864         (bsd_mod_LDFLAGS): Likewise.
3866         * include/grub/aout.h: New file.
3868         * include/grub/i386/loader.h (grub_unix_real_boot): New function.
3870         * include/grub/i386/bsd.h: New file.
3872         * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
3873         to make it public.
3875         * kern/elf.c (grub_elf32_load): Get the physical address after the hook
3876         function is called, so that it's possible to change it inside the hook.
3877         (grub_elf64_load): Likewise.
3878         (grub_elf_file): Don't close the file if elf header is not found.
3879         (grub_elf_close): Close the file if grub_elf_file fails (The new
3880         grub_elf_file won't close it).
3881         (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
3882         (grub_elf64_size): Likewise.
3884         * kern/i386/loader.S (grub_unix_real_boot): New function.
3886         * loader/aout.c: New file.
3888         * loader/i386/bsd.c: New file.
3890         * loader/i386/bsd_normal.c: New file.
3892         * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
3894         * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
3895         can test other formats.
3897 2008-02-19  Robert Millan  <rmh@aybabtu.com>
3899         * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
3900         (grub_gpt_partition_type_empty): Redefine with macro from
3901         `<grub/gpt_partition.h>'.
3902         (gpt_partition_map_iterate): Adjust partition type comparison.
3904         Export `entry' as partmap-specific `part.data' struct.
3905         (grub_gpt_header, grub_gpt_partentry): Move from here ...
3907         * include/grub/gpt_partition.h (grub_gpt_header)
3908         (grub_gpt_partentry): ... to here (new file).
3910         * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
3912         (grub_gpt_partition_type_bios_boot): New const variable, defined
3913         with macro from `<grub/gpt_partition.h>'.
3915         (setup): Replace `first_start' with `embed_region', which keeps
3916         track of the embed region (and is partmap-agnostic).
3918         Replace find_first_partition_start() with find_usable_region(),
3919         which finds a usable region for embedding using partmap-specific
3920         knowledge (supports PC/MSDOS and GPT).
3922         Fix all assumptions that the embed region start at sector 1, using
3923         `embed_region.start' from now on.  Similarly, use `embed_region.end'
3924         rather than `first_start' to calculate available size.
3926         In grub_util_info() message, replace "into after the MBR" with an
3927         indication of the specific sector our embed region starts at.
3929 2008-02-19  Robert Millan  <rmh@aybabtu.com>
3931         * DISTLIST: Replace `commands/ieee1275/halt.c' and
3932         `commands/ieee1275/reboot.c' with `commands/halt.c' and
3933         `commands/reboot.c'.
3934         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
3935         (halt_mod_SOURCES): Likewise.
3936         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
3937         (halt_mod_SOURCES): Likewise.
3939 2008-02-17  Christian Franke  <franke@computer.org>
3941         * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
3943 2008-02-17  Robert Millan  <rmh@aybabtu.com>
3945         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
3946         set `first_start' to 0 for non-PC/MSDOS partition maps.
3948 2008-02-16  Robert Millan  <rmh@aybabtu.com>
3950         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
3951         do not assume partition map is PC/MSDOS before performing checks that
3952         are specific to that layout.
3954 2008-02-13  Robert Millan  <rmh@aybabtu.com>
3956         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
3957         `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
3958         * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
3960 2008-02-13  Yoshinori K. Okuji  <okuji@enbug.org>
3962         * configure.ac: Only a cosmetic change on the handling of
3963         -fno-stack-protector.
3965 2008-02-12  Alexandre Boeglin  <alex@boeglin.org>
3967         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
3968         commands/i386/pc/halt.c and reboot.c by commands/halt.c and
3969         reboot.c.
3970         (grub_install_SOURCES): Add halt.mod and reboot.mod.
3971         (halt_mod_SOURCES): New variable.
3972         (halt_mod_CFLAGS): Likewise.
3973         (halt_mod_LDFLAGS): Likewise.
3974         (reboot_mod_SOURCES): Likewise.
3975         (reboot_mod_CFLAGS): Likewise.
3976         (reboot_mod_LDFLAGS): Likewise.
3978         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
3979         commands/ieee1275/halt.c and reboot.c by commands/halt.c and
3980         reboot.c.
3981         (halt_mod_SOURCES): Likewise.
3982         (reboot_mod_SOURCES): Likewise.
3984         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
3985         commands/i386/pc/reboot.c by commands/reboot.c.
3986         (reboot_mod_SOURCES): Likewise.
3988         * commands/i386/pc/reboot.c: merge this file ...
3990         * commands/ieee1275/reboot.c: ... and this file ...
3992         * commands/reboot.c: ... to this file.
3993         Add some precompiler directive to include the correct header for
3994         each machine.
3996         * commands/ieee1275/halt.c: move this file ...
3998         * commands/halt.c: ... to here.
3999         Add some precompiler directive to include the correct header for
4000         each machine.
4002         * include/grub/efi/efi.h (grub_reboot): New function declaration.
4003         (grub_halt): Likewise.
4005         * kern/efi/efi.c (grub_reboot): New function.
4006         (grub_halt): Likewise.
4008 2008-02-12  Robert Millan  <rmh@aybabtu.com>
4010         * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
4011         /dev (like it is done for /dev/mapper).  This doesn't provide support
4012         for EVMS, but at least it is now easy to identify the problem when it
4013         arises.
4015 2008-02-11  Robert Millan  <rmh@aybabtu.com>
4017         * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
4018         (grub_util_biosdisk_get_grub_dev): Check open() exit status by
4019         comparing it with -1, not 0.
4021 2008-02-10  Robert Millan  <rmh@aybabtu.com>
4023         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
4024         `disk/lvm.c'.
4025         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4026         * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
4028         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
4029         `disk/lvm.c' to the end of the list.
4030         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4031         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
4033 2008-02-10  Robert Millan  <rmh@aybabtu.com>
4035         * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'.  Call
4036         grub_print_error() instead.  This will let user know why we're entering
4037         rescue mode.
4038         Based on suggestions from Sam Morris.
4040 2008-02-10  Alexandre Boeglin  <alex@boeglin.org>
4042         * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
4043         on remaining N args, instead of "--" arg N times.
4045 2008-02-09  Vesa Jaaskelainen  <chaac@nic.fi>
4047         * font/manager.c (unknown_glyph): Added variable for unknown glyph.
4048         (fill_with_default_glyph): Changed to use unknown_glyph for fill
4049         pattern for unknown glyphs.
4051 2008-02-09  Robert Millan  <rmh@aybabtu.com>
4053         * configure.ac: Probe for `help2man'.
4054         * Makefile.in (builddir): New variable.
4055         (HELP2MAN): Likewise.  Set to `true' when @HELP2MAN@ doesn't provide it,
4056         or otherwise add a few flags/options to it.
4057         (install-local): For every executable utility or script that is
4058         installed, invoke $(HELP2MAN) to install a manpage based on --help
4059         output.
4061         * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
4062         that it doesn't prevent --help from working in build tree.
4064         * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
4065         with `bug-grub@gnu.org'.
4066         * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
4067         * util/update-grub.in (usage): New function.
4068         Implement proper argument check, with support for --help and --version
4069         (as well as existing -y).
4071 2008-02-09  Christian Franke  <franke@computer.org>
4073         * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
4074         avoid overwriting previous output.
4075         * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
4077 2008-02-09  Robert Millan  <rmh@aybabtu.com>
4079         * normal/menu.c (run_menu): If timeout is set to zero, don't bother
4080         drawing the menu.
4082 2008-02-09  Robert Millan  <rmh@aybabtu.com>
4084         * commands/sleep.c: New file.
4085         * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
4086         (sleep_mod_SOURCES): New variable.
4087         (sleep_mod_CFLAGS): Likewise.
4088         (sleep_mod_LDFLAGS): Likewise.
4090 2008-02-09  Robert Millan  <rmh@aybabtu.com>
4092         * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
4093         situations in which we can deduce the RAID size and the superblock
4094         doesn't match it.
4096 2008-02-09  Robert Millan  <rmh@aybabtu.com>
4098         * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function.  Construct
4099         and return a grub_diskmemberlist_t composed of LVM physical volumes.
4100         [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
4102         * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function.  Construct
4103         and return a grub_diskmemberlist_t composed of physical array members.
4104         [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
4106         * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
4107         prototype.
4108         [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
4109         [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
4110         [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
4112         * util/grub-probe.c (probe): Move partmap probing code from here ...
4113         (probe_partmap): ... to here.
4114         (probe): Use probe_partmap() once for the disk we're probing, and
4115         additionally, when such disk contains a memberlist() struct member,
4116         once for each disk that is contained in the structure returned by
4117         memberlist().
4119 2008-02-09  Robert Millan  <rmh@aybabtu.com>
4121         * util/grub-probe.c (main): When `verbosity > 1', set `debug'
4122         environment variable to 'all' in order to obtain debug output from
4123         non-util/ code.
4124         * util/i386/pc/grub-setup.c (main): Likewise.
4126 2008-02-08  Robert Millan  <rmh@aybabtu.com>
4128         * disk/raid.c (grub_raid_scan_device): Check for
4129         `array->device[sb.this_disk.number]' rather than for
4130         `array->device[sb.this_disk.number]->name', since the latter is not
4131         guaranteed to be accessible.
4133 2008-02-08  Robert Millan  <rmh@aybabtu.com>
4135         * disk/raid.c: Update copyright.
4136         * fs/cpio.c: Likewise.
4137         * include/grub/raid.h: Likewise.
4138         * loader/i386/pc/multiboot.c: Likewise.
4139         * util/hostfs.c: Likewise.
4141 2008-02-08  Robert Millan  <rmh@aybabtu.com>
4143         * include/grub/raid.h (struct grub_raid_array): Change type of `device'
4144         to a grub_disk_t array.
4145         * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
4146         `device[x]'.
4147         (grub_raid_scan_device): Replace `device[x].name' accesses with
4148         `device[x]->name'.  Simplify initialization of `array->device[x]'.
4150 2008-02-08  Robert Millan  <rmh@aybabtu.com>
4152         * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
4153         grub_dprintf() calls.
4154         * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
4155         error message.
4157 2008-02-07  Christian Franke  <franke@computer.org>
4159         * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
4160         instead of fseek and ftell to support large files.
4161         (grub_hostfs_read): Likewise.
4163 2008-02-07  Robert Millan  <rmh@aybabtu.com>
4165         Patch from Jeroen Dekkers.
4166         * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
4167         failure, since successfully reading all array members might not be
4168         required.
4170 2008-02-06  Robert Millan  <rmh@aybabtu.com>
4172         * util/grub-probe.c (probe): Simplify partmap probing (with the
4173         assumption that the first word up to the underscore equals to
4174         the module name).
4176 2008-02-06  Christian Franke  <franke@computer.org>
4178         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
4179         (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
4180         last block of a cpio or tar stream.
4181         Check for "TRAILER!!!" instead of any empty data
4182         block to detect last block of a cpio stream.
4183         (grub_cpio_dir): Fix constness of variable np.
4184         (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
4185         cpio or tar trailer is detected.  This fixes a crash
4186         on open of a non existing file.
4188 2008-02-05  Bean  <bean123ch@gmail.com>
4190         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
4191         address of entry.
4192         (grub_multiboot_load_elf64): Likewise.
4193         (grub_multiboot): Initialize mbi structure.
4195         * util/grub-fstest.c: Don't include unused header file script.h.
4197         * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
4198         of file.
4199         (grub_fstest_SOURCES): Likewise.
4201 2008-02-05  Robert Millan  <rmh@aybabtu.com>
4203         * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
4204         (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
4205         (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
4206         (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
4208         * kern/i386/pc/startup.S: Include `<grub/term.h>'.
4209         (translation_table): Replace hardcoded values with macros
4210         provided by `<grub/term.h>'.
4212         * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
4213         (keyboard_map): Correct/add a few values, with macros provided
4214         by `<grub/term.h>'.
4215         (keyboard_map_shift): Zero values that don't differ from their
4216         `keyboard_map' equivalents.
4217         (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
4218         Discard the second scan code that is always sent by Caps lock.
4219         Only use `keyboard_map_shift' when it provides a non-zero value,
4220         otherwise fallback to `keyboard_map'.
4222 2008-02-04  Bean  <bean123ch@gmail.com>
4224         * Makefile.in (enable_grub_fstest): New variable.
4226         * conf/common.rmk (grub_fstest_init.lst): New rule.
4227         (grub_fstest_init.h): Likewise.
4228         (grub_fstest_init.c): Likewise.
4229         (util/grub-fstest.c_DEPENDENCIES): New variable.
4230         (grub_fstest_SOURCES): Likewise.
4232         * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
4234         * util/grub-fstest.c: New file.
4236 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
4238         Make grub-setup handle a separate root device.
4240         * util/i386/pc/grub-setup.c (setup): Always open the root device,
4241         so that the root device can be compared with the destination
4242         device.
4243         When embedding the core image, if the root and destination devices
4244         are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
4245         0xFF.
4246         When not embedding, set ROOT_DRIVE to 0xFF.
4248 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
4250         Add support for having a grub directory in a different drive. This
4251         is still only the data handling part.
4253         * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
4254         (codestart): Save %dh in GRUB_ROOT_DRIVE.
4255         (grub_root_drive): New variable.
4257         * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
4258         instead of GRUB_BOOT_DRIVE to construct a device name. Set
4259         GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
4260         as it was.
4262         * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
4264         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
4265         macro.
4266         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
4268         * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
4269         is bogus, because PXE booting does not specify any drive
4270         correctly.
4272         * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
4273         am not sure if this is really correct.
4275         * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
4276         is always identical to the boot drive when booting from a CD.
4278         * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
4279         longer.
4280         (root_drive): New variable.
4281         (real_start): Unconditionally set %dh to ROOT_DRIVE.
4282         (setup_sectors): Push %dx right after popping it, because %dh will
4283         be modified later.
4284         (copy_buffer): Restore %dx.
4286 2008-02-03  Robert Millan  <rmh@aybabtu.com>
4288         * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
4289         use `cdboot.img' for cdrom images.
4291 2008-02-03  Robert Millan  <rmh@aybabtu.com>
4293         * util/grub.d/00_header.in: Issue scripting commands for GRUB to
4294         only setup gfxterm when `font' command has succeeded.
4296 2008-02-03  Robert Millan  <rmh@aybabtu.com>
4298         * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
4299         (grub_rescue_cmd_multiboot_loader)
4300         (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
4302 2008-02-03  Pavel Roskin  <proski@gnu.org>
4304         * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
4305         %edx and %esi from stack only after grub_gate_a20() is called.
4306         grub_gate_a20() clobbers %edx.
4308 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
4310         * configure.ac (AC_INIT): Bumped to 1.96.
4312         * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
4313         commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
4314         include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
4315         video/readers/png.c.
4317 2008-02-03  Bean  <bean123ch@gmail.com>
4319         * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
4320         (cdboot_img_SOURCES): New variable.
4321         (cdboot_img_ASFLAGS): New variable.
4322         (cdboot_img_LDFLAGS): New variable.
4324         * boot/i386/pc/cdboot.S: New file.
4326         * disk/i386/pc/biosdisk.c (cd_start): New variable.
4327         (cd_count): Likewise.
4328         (grub_biosdisk_get_drive): Add support for cd device.
4329         (grub_biosdisk_call_hook): Likewise.
4330         (grub_biosdisk_iterate): Likewise.
4331         (grub_biosdisk_open): Likewise.
4332         (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
4333         (grub_biosdisk_rw): Support reading from cd device.
4334         (GRUB_MOD_INIT): Iterate cd devices.
4336         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
4337         (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
4338         (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
4340         * kern/i386/pc/init.c (make_install_device): Check for cd device.
4342 2008-02-02  Robert Millan  <rmh@aybabtu.com>
4344         * commands/read.c: New file.
4345         * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
4346         (read_mod_SOURCES): New variable.
4347         (read_mod_CFLAGS): Likewise.
4348         (read_mod_LDFLAGS): Likewise.
4350 2008-02-02  Robert Millan  <rmh@aybabtu.com>
4352         * normal/main.c (grub_normal_execute): Check for `menu->size' when
4353         determining whether menu has to be displayed.
4355 2008-02-02  Marco Gerards  <marco@gnu.org>
4357         * bus/pci.c: New file.
4359         * include/grub/pci.h: Likewise.
4361         * include/grub/i386/pc/pci.h: Likewise.
4363         * commands/lspci.c: Likewise.
4365         * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
4366         `lspci.mod'.
4367         (pci_mod_SOURCES): New variable.
4368         (pci_mod_CFLAGS): Likewise.
4369         (pci_mod_LDFLAGS): Likewise.
4370         (lspci_mod_SOURCES): Likewise.
4371         (lspci_mod_CFLAGS): Likewise.
4372         (lspci_mod_LDFLAGS): Likewise.
4374 2008-02-02  Bean  <bean123ch@gmail.com>
4376         * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
4377         (grub_ufs_get_file_block): Fix indirect block calculation problem.
4379         * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
4380         (grub_xfs_btree_node): New structure.
4381         (grub_xfs_btree_root): New structure.
4382         (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
4383         (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
4384         (GRUB_XFS_EXTENT_BLOCK): Likewise.
4385         (GRUB_XFS_EXTENT_SIZE): Likewise.
4386         (grub_xfs_read_block): Support btree format type.
4387         (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
4388         Use directory block as basic unit.
4390         * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
4392         * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
4393         __attribute__ ((__regparm__ (1))).
4395 2008-02-01  Robert Millan  <rmh@aybabtu.com>
4397         Correct a mistake in previous commit.
4399         * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
4400         top.
4401         (normal/command.c_DEPENDENCIES): New variable.
4403 2008-02-01  Robert Millan  <rmh@aybabtu.com>
4405         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
4406         top.
4407         (normal/command.c_DEPENDENCIES): New variable.
4408         (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
4409         * conf/i386-ieee1275.rmk: Likewise.
4410         * conf/i386-linuxbios.rmk: Likewise.
4411         * conf/i386-pc.rmk: Likewise.
4412         * conf/sparc64-ieee1275.rmk: Likewise.
4413         * conf/powerpc-ieee1275.rmk: Likewise.
4414         (grub_emu_SOURCES): Add `fs/fshelp.c'.
4416         * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
4418 2008-02-01  Robert Millan  <rmh@aybabtu.com>
4420         * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
4421         call at beginning of function.
4423 2008-01-31  Pavel Roskin  <proski@gnu.org>
4425         * util/powerpc/ieee1275/grub-mkrescue.in: New file.
4426         * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
4427         (grub_mkrescue_SOURCES): Likewise.
4428         * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
4430 2008-01-30  Robert Millan  <rmh@aybabtu.com>
4432         * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
4433         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
4434         * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
4435         (grub_probe_SOURCES): ... to here.
4437         * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
4438         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
4439         * conf/i386-ieee1275.rmk: Likewise.
4440         * conf/i386-linuxbios.rmk: Likewise.
4441         * conf/powerpc-ieee1275.rmk: Likewise.
4443 2008-01-30  Tristan Gingold  <gingold@free.fr>
4445         * kern/rescue.c: Silently accept empty lines.
4447 2008-01-29  Bean  <bean123ch@gmail.com>
4449         * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
4450         (real_code_2): Code cleanup and change comment style.
4451         (move_memory): Avoid using 32-bit address mode.
4453 2008-01-29  Bean  <bean123ch@gmail.com>
4455         * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
4456         (png_mod_SOURCES): New variable.
4457         (png_mod_CFLAGS): Likewise.
4458         (png_mod_LDFLAGS): Likewise.
4460         * video/readers/png.c: New file.
4462 2008-01-28  Robert Millan  <rmh@aybabtu.com>
4464         * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
4465         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
4466         `ifndef GRUB_MOD_GAP' hack.
4467         * util/elf/grub-mkimage.c (add_segments): Likewise.
4469 2008-01-27  Robert Millan  <rmh@aybabtu.com>
4471         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
4472         `GRUB_MOD_GAP' for platforms in which it's not defined.
4473         * util/elf/grub-mkimage.c (add_segments): Likewise.
4475 2008-01-27  Robert Millan  <rmh@aybabtu.com>
4477         Get grub-emu to build again (including parallel builds).
4479         * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
4480         Split into ...
4481         (util/grub-emu.c_DEPENDENCIES): ... this, ...
4482         (normal/execute.c_DEPENDENCIES): ... this, ...
4483         (grub-emu_DEPENDENCIES): ... and this.
4485         * conf/i386-efi.rmk: Likewise.
4486         * conf/i386-linuxbios.rmk: Likewise.
4487         * conf/i386-ieee1275.rmk: Likewise.
4488         * conf/powerpc-ieee1275.rmk: Likewise.
4489         (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
4491 2008-01-27  Robert Millan  <rmh@aybabtu.com>
4493         * NEWS: Add a few items.
4495 2008-01-27  Robert Millan  <rmh@aybabtu.com>
4497         Fix parallel builds with grub-emu.  Based on earlier commit for
4498         grub-probe and grub-setup.
4500         * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4501         (util/grub-emu.c_DEPENDENCIES): ... this.
4502         * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4503         (util/grub-emu.c_DEPENDENCIES): ... this.
4504         * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4505         (util/grub-emu.c_DEPENDENCIES): ... this.
4506         * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4507         (util/grub-emu.c_DEPENDENCIES): ... this.
4508         * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4509         (util/grub-emu.c_DEPENDENCIES): ... this.
4511 2008-01-27  Pavel Roskin  <proski@gnu.org>
4513         * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
4514         to create a gap between _end and the modules added to the image
4515         with grub-mkrescue.  That fixes "CLAIM failed" on PowerMAC.
4516         * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
4517         * util/elf/grub-mkimage.c (add_segments): Likewise.
4519 2008-01-26  Pavel Roskin  <proski@gnu.org>
4521         * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
4522         just return an error.
4524 2008-01-26  Bean  <bean123ch@gmail.com>
4526         * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
4527         (grub_reiserfs_get_item): Save offset of the next item.
4528         (grub_reiserfs_iterate_dir): Use next_offset to find next item.
4530 2008-01-25  Robert Millan  <rmh@aybabtu.com>
4532         * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
4533         make all filesystem sources appear together (possibly fixing omissions
4534         while at it).
4535         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4536         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4537         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4538         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4540         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.  Additionally,
4541         add `kern/file.c'.
4542         * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
4543         * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
4544         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
4545         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
4547         * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
4548         (probe): Add a sanity check to make sure of our ability to read
4549         requested files when probing for filesystem type.
4551         * genmk.rb: Update copyright year (2007).
4553         * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
4554         (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
4555         (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
4556         (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
4557         (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
4558         : Remove function prototypes.
4560 2008-01-25  Robert Millan  <rmh@aybabtu.com>
4562         Revert my previous commits (based on wrong assumption of how grub_errno
4563         works).
4565         * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
4566         * kern/file.c (grub_file_open): Likewise.
4568 2008-01-24  Pavel Roskin  <proski@gnu.org>
4570         * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
4571         that hang if GRUB tries to setup colors.
4572         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
4573         colors for firmwares that don't support it.
4574         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
4575         Recognize Open Hack'Ware, set flags to work around its
4576         limitations.
4578 2008-01-24  Robert Millan  <rmh@aybabtu.com>
4580         * kern/file.c (grub_file_open): Do not account previous failures of
4581         unrelated functions when grub_errno is checked for.
4582         Reported by Oleg Strikov.
4584 2008-01-24  Bean  <bean123ch@gmail.com>
4586         * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
4587         (grub_ufs_sblock): New member volume name.
4588         (grub_ufs_find_file): Fix string copy bug.
4589         (grub_ufs_label): Implement this function properly.
4591         * fs/hfs.c (grub_hfs_cnid_type): New enum.
4592         (grub_hfs_iterate_records): Use the correct file number for extents
4593         and catalog file. Fix problem in next index calculation.
4594         (grub_hfs_find_node): Replace recursive function call with loop.
4595         (grub_hfs_iterate_dir): Replace recursive function call with loop.
4597 2008-01-23  Robert Millan  <rmh@aybabtu.com>
4599         * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
4600         `<grub/symbol.h>' and `<grub/multiboot.h>'.
4601         (grub_multiboot2_real_boot): New function prototype.
4603         * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
4604         [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
4606         * kern/i386/ieee1275/init.c (grub_os_area_addr)
4607         (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
4609 2008-01-23  Robert Millan  <rmh@aybabtu.com>
4611         * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
4612         #ifdef'ed out grub_printf().
4614 2008-01-23  Robert Millan  <rmh@aybabtu.com>
4616         * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
4617         grub_dprintf calls, since they make "debug=all" mode unusable.
4618         (grub_console_checkkey): Likewise.
4620 2008-01-23  Robert Millan  <rmh@aybabtu.com>
4622         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
4623         `term/i386/pc/at_keyboard.c'.
4624         (pkglib_MODULES): Add `serial.mod'.
4625         (serial_mod_SOURCES): New variable.
4626         (serial_mod_CFLAGS): Likewise.
4627         (serial_mod_LDFLAGS): Likewise.
4629         * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'.  Remove
4630         `<grub/powerpc/ieee1275/console.h>'.
4631         (grub_keyboard_controller_init): New function prototype.
4632         (grub_console_checkkey): Likewise.
4633         (grub_console_getkey): Likewise.
4635         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
4636         keyboard on i386.
4638         * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
4639         grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
4641 2008-01-23  Robert Millan  <rmh@aybabtu.com>
4643         * kern/i386/pc/init.c (make_install_device): When memdisk image is
4644         present, "(memdisk)/boot/grub" becomes the default prefix.
4646         * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
4647         a memdisk tarball with all the modules.  Add --overlay=DIR option that
4648         allows users to overlay additional files into the image.
4650 2008-01-23  Robert Millan  <rmh@aybabtu.com>
4652         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
4653         and `machine/memory.h'.
4654         (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
4655         (_multiboot_mod_SOURCES): New variable.
4656         (_multiboot_mod_CFLAGS): Likewise.
4657         (_multiboot_mod_LDFLAGS): Likewise.
4658         (multiboot_mod_SOURCES): Likewise.
4659         (multiboot_mod_CFLAGS): Likewise.
4660         (multiboot_mod_LDFLAGS): Likewise.
4662         * include/grub/i386/ieee1275/loader.h: New file.
4664         * include/grub/i386/ieee1275/machine.h: Likewise.
4666         * include/grub/i386/ieee1275/memory.h: Likewise.
4668         * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
4669         variable declaration.
4670         (grub_os_area_size): Likewise.
4672         * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
4673         (grub_lower_mem, grub_upper_mem): New variables.
4674         (grub_stop_floppy): New function (just to make
4675         grub_multiboot2_real_boot() happy).
4677         * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
4678         `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
4679         (grub_stop): New function.
4680         Include `"../realmode.S"' and `"../loader.S"'.
4682         * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
4683         Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
4685         * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
4686         rely on grub_multiboot2_real_boot() for final boot.
4688 2008-01-22  Robert Millan  <rmh@aybabtu.com>
4690         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
4691         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
4692         device that doesn't look like an SD card.
4693         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
4694         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
4695         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
4696         OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
4697         found.
4699 2008-01-22  Robert Millan  <rmh@aybabtu.com>
4701         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
4702         avoid claiming over our own code.
4704 2008-01-22  Bean  <bean123ch@gmail.com>
4706         * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
4707         (jpeg_mod_SOURCES): New variable.
4708         (jpeg_mod_CFLAGS): Likewise.
4709         (jpeg_mod_LDFLAGS): Likewise.
4711         * video/readers/jpeg.c : New file.
4713 2008-01-22  Bean  <bean123ch@gmail.com>
4715         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
4716         there are no more items.
4718 2008-01-21  Robert Millan  <rmh@aybabtu.com>
4720         * kern/mm.c (grub_mm_init_region): Improve debug message.
4722 2008-01-21  Robert Millan  <rmh@aybabtu.com>
4724         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
4725         (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
4726         address.
4727         (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
4728         a C macro.
4729         * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
4730         Indicates start of upper memory.
4731         * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
4732         (generate_image): Abort when image size is big enough to corrupt
4733         upper memory.
4735         * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
4736         (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
4737         * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
4738         instead of hardcoding 0xA0000.
4739         * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
4740         (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
4741         instead of hardcoding 0xA0000.
4743 2008-01-21  Robert Millan  <rmh@aybabtu.com>
4745         * disk/memdisk.c (memdisk_size): New variable.
4746         (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
4747         `memdisk_size'.
4748         (grub_memdisk_init): Initialize `memdisk_size'.  Reallocate memdisk
4749         image to dynamic memory.
4750         (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
4751         `memdisk_size'.  Free memdisk block.
4753 2008-01-21  Robert Millan  <rmh@aybabtu.com>
4755         Fix detection of very small filesystems (like tar).
4757         * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
4758         contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
4759         GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
4760         a problem with this disk).
4762 2008-01-21  Robert Millan  <rmh@aybabtu.com>
4764         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
4765         on grub_biosdisk_rw_standard() error.
4767 2008-01-21  Robert Millan  <rmh@aybabtu.com>
4769         * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
4770         recent changes.
4771         * kern/elf.c: Likewise.
4772         * kern/ieee1275/ieee1275.c: Likewise.
4773         * kern/powerpc/ieee1275/openfw.c: Likewise.
4774         * term/ieee1275/ofconsole.c: Likewise.
4776 2008-01-21  Robert Millan  <rmh@aybabtu.com>
4778         * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
4780         * include/grub/kernel.h (grub_arch_memdisk_addr)
4781         (grub_arch_memdisk_size): Moved from here ...
4783         * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
4784         (grub_arch_memdisk_size): ... to here.
4786 2008-01-21  Robert Millan  <rmh@aybabtu.com>
4788         Mostly based on bugfix from Bean.
4790         * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
4791         attribute with hook() parameter.
4792         (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
4793         declaration.
4794         (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
4795         attribute with hook() parameter.
4796         (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
4797         declaration.
4799 2008-01-21  Robert Millan  <rmh@aybabtu.com>
4801         * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
4802         (pkglib_MODULES): Add `memdisk.mod'.
4803         (memdisk_mod_SOURCES): New variable.
4804         (memdisk_mod_CFLAGS): Likewise.
4805         (memdisk_mod_LDFLAGS): Likewise.
4807         * disk/memdisk.c: New file.
4809         * include/grub/disk.h (grub_disk_dev_id): Add
4810         `GRUB_DISK_DEVICE_MEMDISK_ID'.
4812         * include/grub/i386/pc/kernel.h
4813         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
4814         (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
4815         (grub_kernel_image_size): New variable declaration.
4816         (grub_total_module_size): Likewise.
4817         (grub_memdisk_image_size): Likewise.
4819         * include/grub/i386/pc/memory.h
4820         (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
4822         * include/grub/kernel.h: Include `<grub/symbol.h>'.
4823         (grub_arch_memdisk_addr): New variable declaration.
4824         (grub_arch_memdisk_size): Likewise.
4826         * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
4827         (grub_arch_memdisk_size): Likewise.
4829         * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
4830         (codestart): Replace hardcoded `0x100000' with
4831         `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
4833         * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
4834         (generate_image): Add `memdisk_path' parameter.  When `memdisk_path' is
4835         not NULL, append the contents of the file it refers to, at the end of
4836         the compressed kernel image.  Initialize `grub_memdisk_image_size'
4837         variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
4838         (options): Add "memdisk"|'m' option.
4839         (main): Parse --memdisk|-m option, and pass user-provided path as
4840         parameter to generate_image().
4842 2008-01-20  Robert Millan  <rmh@aybabtu.com>
4844         * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
4845         grub_dprintf() calls from here ...
4846         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
4848 2008-01-20  Robert Millan  <rmh@aybabtu.com>
4850         Fix detection of "real mode" when /options/real-mode? doesn't exist.
4852         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
4853         declaration.
4854         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
4855         (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
4856         `GRUB_IEEE1275_FLAG_REAL_MODE'.
4857         (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
4858         property).
4859         * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
4860         `grub_ieee1275_mmu' rather than obtaining a handler on every call.
4862 2008-01-19  Robert Millan  <rmh@aybabtu.com>
4864         Get rid of confusing function (superseded by
4865         `grub_ieee1275_get_integer_property')
4866         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
4867         prototype.
4868         * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
4869         function.
4870         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
4871         grub_ieee1275_decode_int_4(), by obtaining integer properties directly
4872         in native endianness from grub_ieee1275_get_integer_property().
4874 2008-01-19  Robert Millan  <rmh@aybabtu.com>
4876         * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
4877         command after "shut-down", since implementations differ on which
4878         the command for halt is.
4880 2008-01-19  Robert Millan  <rmh@aybabtu.com>
4882         * include/grub/i386/linuxbios/console.h: Add header protection.
4883         (grub_keyboard_controller_init): New function prototype.
4884         * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
4885         (KEYBOARD_COMMAND_READ): Likewise.
4886         (KEYBOARD_COMMAND_WRITE): Likewise.
4887         (KEYBOARD_SCANCODE_SET1): Likewise.
4888         (grub_keyboard_controller_write): New function.
4889         (grub_keyboard_controller_read): Likewise.
4890         (grub_keyboard_controller_init): Likewise.
4892         * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
4893         (grub_console_init): On coreboot/LinuxBIOS, call
4894         grub_keyboard_controller_init().
4896 2008-01-19  Robert Millan  <rmh@aybabtu.com>
4898         PowerPC changes provided by Pavel Roskin.
4900         * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
4901         * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
4902         don't rely on cmain() doing it.
4903         * kern/i386/ieee1275/startup.S (_start): Store %eax in
4904         grub_ieee1275_entry_fn, don't rely on cmain() doing it.
4906 2008-01-16  Robert Millan  <rmh@aybabtu.com>
4908         * include/grub/i386/linuxbios/memory.h
4909         (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
4910         * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
4911         receive `table_header' as argument.  Instead, probe for it in the
4912         known memory ranges where it can be present.
4913         (grub_available_iterate): Do not pass a fixed `table_header' address
4914         to grub_linuxbios_table_iterate().
4916 2008-01-15  Robert Millan  <rmh@aybabtu.com>
4918         * configure.ac: Add `i386-ieee1275' to the list of supported targets.
4919         * conf/i386-ieee1275.rmk: New file.
4920         * include/grub/i386/ieee1275/console.h: Likewise.
4921         * include/grub/i386/ieee1275/ieee1275.h: Likewise.
4922         * include/grub/i386/ieee1275/kernel.h: Likewise.
4923         * include/grub/i386/ieee1275/time.h: Likewise.
4924         * kern/i386/ieee1275/init.c: Likewise.
4925         * kern/i386/ieee1275/startup.S: Likewise.
4927 2008-01-15  Robert Millan  <rmh@aybabtu.com>
4929         * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
4930         when pointers are 32-bit (but still do set it to one when they are
4931         64-bit).
4933 2008-01-15  Robert Millan  <rmh@aybabtu.com>
4935         * include/grub/ieee1275/ieee1275.h
4936         (grub_ieee1275_get_integer_property): New function prototype.
4938         * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
4939         (grub_ieee1275_get_integer_property): New function.  Wraps around
4940         grub_ieee1275_get_property() to handle endianness.
4942         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
4943         grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
4944         where appropriate.
4945         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
4946         (grub_map): Likewise.
4947         * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
4949 2008-01-15  Bean  <bean123ch@gmail.com>
4951         * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
4952         (grub_script_execute_cmdline): Reset grub_errno.
4954         * normal/main.c (read_config_file): Reset grub_errno.
4956         * normal/parse.y (script_init): New.
4957         (script): Move function and menuentry here.
4958         (delimiter): New.
4959         (command): Add delimiter at the end of command.
4960         (commands): Adjust to match the new command.
4961         (commandblock): Remove grub_script_lexer_record_start.
4962         (menuentry): Add grub_script_lexer_record_start, use the new commands.
4963         (if): Use the new commands.
4965         * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
4967 2008-01-15  Robert Millan  <rmh@aybabtu.com>
4969         * normal/menu.c (run_menu): Move timeout message from here ...
4970         (print_timeout): ... to here.
4971         (run_menu): Use print_timeout() once during initial draw to print
4972         the whole message, and again in every clock tick to update only
4973         the number of seconds.
4975 2008-01-15  Robert Millan  <rmh@aybabtu.com>
4977         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
4978         actual size of `available' from grub_ieee1275_get_property(), and
4979         restrict parsing to that bound.
4981 2008-01-15  Christian Franke  <franke@computer.org>
4983         * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
4984         (argp_program_version): Remove variable.
4985         (argp_program_bug_address): Likewise.
4986         (options): Convert from struct argp_option to struct option.
4987         (struct arguments): Remove.
4988         (parse_opt): Remove.
4989         (usage): New function.
4990         (main): Replace struct args members by simple variables.
4991         Replace argp_parse() by getopt_long().
4992         Add switch to evaluate options.
4993         Add missing "(...)" around root_dev in prefix string.
4995 2008-01-14  Robert Millan  <rmh@aybabtu.com>
4997         * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
4998         for grub_ieee1275_exit(), in order to improve portability.
5000 2008-01-14  Robert Millan  <rmh@aybabtu.com>
5002         * util/grub.d/10_linux.in (prefix): Define.
5003         (exec_prefix): Likewise.  Both definitions are later used by `libdir'.
5005 2008-01-13  Pavel Roskin  <proski@gnu.org>
5007         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
5008         grub_errno if no errors have been detected.
5010 2008-01-12  Robert Millan  <rmh@aybabtu.com>
5012         * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
5013         (grub_util_get_dev_abstraction): New function prototype.
5015         * util/getroot.c: Include `<grub/util/getroot.h>'
5016         (grub_util_get_grub_dev): Move detection of abstraction type to ...
5017         (grub_util_get_dev_abstraction): ... here (new function).
5019         * util/grub-probe.c: Convert PRINT_* to an enum.  Add
5020         `PRINT_ABSTRACTION'.
5021         (probe): Probe for abstraction type when requested.
5022         (main): Understand `--target=abstraction'.
5024         * util/i386/efi/grub-install.in: Add abstraction module to core
5025         image when it is found to be necessary.
5026         * util/i386/pc/grub-install.in: Likewise.
5027         * util/powerpc/ieee1275/grub-install.in: Likewise.
5029         * util/update-grub_lib.in (font_path): Return system path without
5030         converting to GRUB path.
5031         * util/update-grub.in: Convert system path returned by font_path()
5032         to a GRUB path.  Use `grub-probe -t abstraction' to determine what
5033         abstraction module is needed for loading fonts (if any).  Export
5034         that as `GRUB_PRELOAD_MODULES'.
5035         * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
5036         insmod commands).
5038 2008-01-12  Yoshinori K. Okuji  <okuji@enbug.org>
5040         Remove some unused code from reiserfs.
5042         * fs/reiserfs.c (struct grub_reiserfs_key)
5043         [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
5044         (struct grub_reiserfs_node_body): Removed.
5045         (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
5046         Likewise.
5047         (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
5048         Likewise.
5049         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
5050         Likewise.
5051         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
5052         Likewise.
5053         (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
5054         Likewise.
5055         (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
5056         Likewise.
5057         (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
5058         (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
5059         (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
5061 2008-01-10  Robert Millan  <rmh@aybabtu.com>
5063         * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
5064         Determines if a file is garbage left by packaging systems, etc.
5065         * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
5066         for processing /etc/grub.d scripts.
5067         * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
5068         * util/grub.d/10_linux.in: Likewise.  Use grub_file_is_not_garbage()
5069         as a condition for processing Linux images.
5071 2008-01-10  Pavel Roskin  <proski@gnu.org>
5073         * include/grub/powerpc/libgcc.h (__ucmpdi2): New export.  Needed
5074         to compile reiserfs.c on PowerPC.
5076 2008-01-10  Robert Millan  <rmh@aybabtu.com>
5078         * kern/device.c (grub_device_iterate): Do not abort device iteration
5079         when one of the devices cannot be opened.
5080         * kern/disk.c (grub_disk_open): Do not account previous failures of
5081         unrelated functions when grub_errno is checked for.
5083 2008-01-08  Robert Millan  <rmh@aybabtu.com>
5085         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
5086         `! grub_linux_is_bzimage', change order of address comparison to make
5087         it more intuitive, and improve "too big zImage" error message.
5089 2008-01-08  Robert Millan  <rmh@aybabtu.com>
5091         * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
5092         `$(update-grub_DATA)'.
5093         (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
5094         targets.
5096 2008-01-07  Robert Millan  <rmh@aybabtu.com>
5098         * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
5099         which instruction is modified by grub-setup during installation
5100         (since it wasn't obvious by only looking at this file).
5102 2008-01-07  Robert Millan  <rmh@aybabtu.com>
5104         * TODO: Rewrite.  Just refer to the wiki and the BTS instead of
5105         listing actual TODO items.
5107 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
5109         * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
5110         correctly.
5111         (grub_reiserfs_get_key_offset): Likewise.
5112         (grub_reiserfs_set_key_offset): Likewise.
5113         (grub_reiserfs_set_key_type): Likewise.
5114         (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
5116         (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
5117         better to remove the bitfield version completely.
5119 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
5121         * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
5122         allocated from the heap, due to the fshelp implementation.
5123         (grub_reiserfs_dir): Free NODE, due to the same reason.
5125 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
5127         Mostly from Vincent Pelletier:
5129         * fs/reiserfs.c: New file.
5131         * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
5132         (reiserfs_mod_SOURCES): New variable.
5133         (reiserfs_mod_CFLAGS): Likewise.
5134         (reiserfs_mod_LDFLAGS): Likewise.
5136         * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
5137         disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
5138         include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
5139         normal/color.c.
5141 2008-01-06  Robert Millan  <rmh@aybabtu.com>
5143         * normal/color.c: Remove `<grub/env.h>'.
5145 2008-01-05  Jeroen Dekkers  <jeroen@dekkers.cx>
5147         * include/grub/normal.h: Include <grub/env.h>.
5149 2008-01-05  Robert Millan  <rmh@aybabtu.com>
5151         * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
5152         usage example with `(hd0,1)'.
5153         Reported by Samuel Thibault.
5155 2008-01-05  Robert Millan  <rmh@aybabtu.com>
5157         * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
5158         (grub_linux_boot_zimage): Rename to ...
5159         (grub_linux_boot): ... this.
5160         (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
5161         (grub_linux_boot_zimage): Conditionalize zImage copy.
5163         * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
5164         (grub_linux_boot_bzimage): Remove prototype.
5165         (grub_linux_boot_zimage): Rename to ...
5166         (grub_linux_boot): ... this.
5168         * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
5169         (grub_linux_boot): Remove function.
5171 2008-01-05  Robert Millan  <rmh@aybabtu.com>
5173         * include/grub/normal.h (grub_env_write_color_normal): New prototype.
5174         (grub_env_write_color_highlight): Likewise.
5175         (grub_wait_after_message): Likewise.
5177         * normal/color.c: New file.
5179         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
5180         (normal_mod_DEPENDENCIES): Likewise.
5182         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
5183         (normal_mod_DEPENDENCIES): Likewise.
5185         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
5186         (normal_mod_DEPENDENCIES): Likewise.
5188         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
5189         (normal_mod_DEPENDENCIES): Likewise.
5191         * normal/menu_entry.c (run): Rely on grub_wait_after_message()
5192         for waiting after a message is printed.
5193         * normal/main.c (read_config_file): Likewise.
5194         (grub_normal_init): Register grub_env_write_color_normal() and
5195         grub_env_write_color_highlight() hooks.  Mark `color_normal' and
5196         `color_highlight' variables as global.
5198         * normal/menu.c (grub_wait_after_message): New function.
5199         (grub_color_menu_normal): New variable.  Replaces ...
5200         (GRUB_COLOR_MENU_NORMAL): ... this macro.
5201         (grub_color_menu_highlight): New variable.  Replaces ...
5202         (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
5203         (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
5204         `GRUB_TERM_COLOR_STANDARD'.
5205         (print_message): Use `grub_setcolorstate' to reload colors.  Rename
5206         `normal_code' and `highlight_code' to `old_color_normal' and
5207         `old_color_highlight', respectively.
5208         (grub_menu_init_page): Update colors when drawing the menu, based on
5209         `menu_color_normal' and `menu_color_highlight' variables.
5210         (grub_menu_run): Rely on grub_wait_after_message() for waiting after
5211         a message is printed.
5213 2008-01-05  Robert Millan  <rmh@aybabtu.com>
5215         * kern/env.c (grub_env_context_open): Propagate hooks for global
5216         variables to new context.
5218         * kern/main.c (grub_set_root_dev): Export `root' variable.
5220 2008-01-05  Robert Millan  <rmh@aybabtu.com>
5222         * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
5223         discs unconditionally, since udev and others have options to provide
5224         them.
5226 2008-01-05  Robert Millan  <rmh@aybabtu.com>
5228         * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
5230 2008-01-04  Christian Franke  <franke@computer.org>
5232         * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
5233         of eisa_mmap.
5235 2008-01-03  Pavel Roskin  <proski@gnu.org>
5237         * kern/i386/linuxbios/init.c: Put "void" to all function
5238         declarations with no arguments.
5239         * kern/powerpc/ieee1275/init.c: Likewise.
5240         * term/i386/pc/at_keyboard.c: Likewise.
5241         * term/i386/pc/vga_text.c: Likewise.
5242         * util/grub-mkdevicemap.c: Likewise.
5244 2008-01-02  Robert Millan  <rmh@aybabtu.com>
5246         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
5247         message when loaded image is out of bounds.
5248         (grub_multiboot_load_elf64): Likewise.
5250 2008-01-02  Pavel Roskin  <proski@gnu.org>
5252         * util/grub.d/10_linux.in: Try version without ".old" when
5253         looking for initrd.  It's better to use initrd from the newer
5254         kernel of the same version than no initrd at all.
5256 2008-01-01  Robert Millan  <rmh@aybabtu.com>
5258         * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
5260 2008-01-01  Vesa Jaaskelainen  <chaac@nic.fi>
5262         * include/grub/video.h: Added grub_video_unmap_color and
5263         grub_video_get_active_render_target.
5264         (grub_video_adapter): Added unmap_color and get_active_render_target.
5266         * video/video.c: Added grub_video_unmap_color and
5267         grub_video_get_active_render_target.
5268         (grub_video_get_info): Changed method to accept NULL pointer as an
5269         argument to allow detection of active video adapter.
5271         * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
5272         grub_video_vbe_unmap_color_int.
5273         Added grub_video_vbe_unmap_color and
5274         grub_video_vbe_get_active_render_target.
5275         (grub_video_vbe_adapter): Added unmap_color and
5276         get_active_render_target.
5278         * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
5279         with grub_video_vbe_unmap_color_int.
5281         * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
5282         (DEFAULT_NORMAL_COLOR): Likewise.
5283         (DEFAULT_HIGHLIGHT_COLOR) Likewise.
5284         (DEFAULT_FG_COLOR): Removed.
5285         (DEFAULT_BG_COLOR): Likewise.
5286         (DEFAULT_CURSOR_COLOR): Changed value.
5287         (grub_virtual_screen): Added standard_color_setting,
5288         normal_color_setting, highlight_color_setting and term_color.
5289         (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
5290         (bitmap_width): Added.
5291         (bitmap_height): Likewise.
5292         (bitmap): Likewise.
5293         (set_term_color): Likewise.
5294         (grub_virtual_screen_setup): Changed to use new terminal coloring
5295         settings.
5296         (grub_gfxterm_init): Added init for bitmap.
5297         (grub_gfxterm_fini): Added destroy for bitmap.
5298         (redraw_screen_rect): Updated to use background bitmap and new
5299         terminal coloring.
5300         (scroll_up): Added optimization for case when there is no bitmap.
5301         (grub_gfxterm_cls): Fixed to use correct background color.
5302         (grub_virtual_screen_setcolorstate): Changed to use new terminal
5303         coloring.
5304         (grub_virtual_screen_setcolor): Likewise.
5305         (grub_virtual_screen_getcolor): Added.
5306         (grub_gfxterm_background_image_cmd): Likewise.
5307         (grub_video_term): Added setcolor and getcolor.
5308         (MOD_INIT): Added registration of background_image command.
5309         (MOD_TERM): Added unregistration for background_image command.
5311 2007-12-30  Pavel Roskin  <proski@gnu.org>
5313         * loader/multiboot_loader.c: Fix multiboot command
5314         unregistration.  Fix all typos in the word "multiboot".
5316 2007-12-29  Pavel Roskin  <proski@gnu.org>
5318         * util/grub.d/10_linux.in: Refactor search for initrd.  Add
5319         support for initrd names used in Fedora.
5321 2007-12-26  Bean  <bean123ch@gmail.com>
5323         * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
5324         (cpio_mod_SOURCES): New variable.
5325         (cpio_mod_CFLAGS): Likewise.
5326         (cpio_mod_LDFLAGS): Likewise.
5328         * fs/cpio.c: New file.
5330         * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
5332         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5334         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5336         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5338 2007-12-25  Robert Millan  <rmh@aybabtu.com>
5340         * include/grub/term.h (struct grub_term): Add `getcolor' function.
5341         (grub_getcolor): New function.
5343         * kern/term.c (grub_getcolor): New function.
5344         * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
5345         (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
5346         (print_entry): Set normal and highlight colors to
5347         `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
5348         respectively, before printing and restore them to old
5349         values afterwards.
5350         (grub_menu_init_page): Likewise.  Fill an additional colored space
5351         that would otherwise be left blank.
5353         * term/efi/console.c (grub_console_getcolor): New function.
5354         (struct grub_console_term.getcolor): New variable.
5355         * term/i386/pc/console.c (grub_console_getcolor): New function.
5356         (struct grub_console_term.getcolor): New variable.
5357         * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
5358         (struct grub_console_term.getcolor): New variable.
5360         * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
5361         (struct grub_console_term.setcolor): Remove variable.
5362         * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
5363         (struct grub_console_term.setcolor): Remove variable.
5364         * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
5365         (struct grub_console_term.setcolor): Remove variable.
5366         * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
5367         (struct grub_console_term.setcolor): Remove variable.
5369 2007-12-25  Robert Millan  <rmh@aybabtu.com>
5371         * configure.ac: Search for possible unifont.hex locations, and
5372         define UNIFONT_HEX if found.
5374         * Makefile.in (UNIFONT_HEX): Define variable.
5375         (DATA): Rename to ...
5376         (PKGLIB): ... this.  Update all users.
5377         (PKGDATA): New variable.
5378         (pkgdata_IMAGES): Rename to ...
5379         (pkglib_IMAGES): ... this. Update all users.
5380         (pkgdata_MODULES): Rename to ...
5381         (pkglib_MODULES): ... this. Update all users.
5382         (pkgdata_PROGRAMS): Rename to ...
5383         (pkglib_PROGRAMS): ... this. Update all users.
5384         (pkgdata_DATA): Rename to ...
5385         (pkglib_DATA): ... this. Update all users.
5386         (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
5387         (unicode.pff, ascii.pff): New rules.
5388         (all-local): Add `$(PKGDATA)' dependency.
5389         (install-local): Process `$(PKGDATA)'.
5391         * util/update-grub_lib.in (font_path): Search for *.pff files in
5392         a few more locations, including `${pkgdata}'.
5394 2007-12-23  Robert Millan  <rmh@aybabtu.com>
5396         Patch from Bean  <bean123ch@gmail.com>:
5397         * disk/loopback.c (grub_loopback_read): Add missing bit shift to
5398         `size'.
5400 2007-12-21  Bean  <bean123ch@gmail.com>
5402         * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
5403         (ntfscomp_mod_SOURCES): New variable.
5404         (ntfscomp_mod_CFLAGS): Likewise.
5405         (ntfscomp_mod_LDFLAGS): Likewise.
5407         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
5408         (grub_probe_SOURCES): Likewise.
5409         (grub_emu_SOURCES): Likewise.
5411         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
5412         (grub_emu_SOURCES): Likewise.
5414         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
5415         (grub_emu_SOURCES): Likewise.
5417         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
5418         (grub_emu_SOURCES): Likewise.
5420         * fs/ntfs.c (grub_ntfscomp_func): New variable.
5421         (read_run_list): Renamed to grub_ntfs_read_run_list.
5422         (decomp_nextvcn): Moved to ntfscomp.c.
5423         (decomp_getch): Likewise.
5424         (decomp_get16): Likewise.
5425         (decomp_block): Likewise.
5426         (read_block): Likewise.
5427         (read_data): Partially moved to ntfscomp.c.
5428         (fixup): Change unsigned to grub_uint16_t.
5429         (read_mft): Change unsigned long to grub_uint32_t.
5430         (read_attr): Likewise.
5431         (read_data): Likewise.
5432         (read_run_data): Likewise.
5433         (read_run_list): Likewise.
5434         (read_mft): Likewise.
5436         * fs/ntfscomp.c: New file.
5438         * include/grub/ntfs.h: New file.
5440 2007-12-16  Robert Millan  <rmh@aybabtu.com>
5442         * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
5443         IDE disk check, since Linux is known to support 20 IDE disks.
5444         Reported by Colin Watson.
5446 2007-12-15  Bean  <bean123ch@gmail.com>
5448         * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
5449         (lnxboot_img_SOURCES): New variable.
5450         (lnxboot_img_ASFLAGS): Likewise.
5451         (lnxboot_img_LDFLAGS): Likewise.
5453         * boot/i386/pc/lnxboot.S: New file.
5455 2007-11-24  Pavel Roskin  <proski@gnu.org>
5457         * configure.ac: Test if '--build-id=none' is supported by the
5458         linker.  If yes, add it to TARGET_LDFLAGS.  Build ID causes
5459         objcopy to generate incorrect binary files (binutils
5460         2.17.50.0.18-1 as shipped by Fedora 8).
5461         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
5462         linking, so that build ID doesn't break the test.
5464 2007-11-24  Pavel Roskin  <proski@gnu.org>
5466         * include/grub/i386/time.h: use "void" in the argument list
5467         of grub_cpu_idle().
5468         * include/grub/powerpc/time.h: Likewise.
5469         * include/grub/sparc64/time.h: Likewise.
5471 2007-11-18  Christian Franke  <franke@computer.org>
5473         * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
5474         now return control chars instead of GRUB_CONSOLE_KEY_* constants.
5475         This fixes the problem that function keys did not work in grub-emu.
5477 2007-11-18  Christian Franke  <franke@computer.org>
5479         * disk/host.c (grub_host_open): Remove attribute unused from
5480         name parameter. Add check for "host". This fixes the problem
5481         that grub-emu does not find partitions.
5483 2007-11-18  Christian Franke  <franke@computer.org>
5485         * util/hostfs.c (is_dir): New function.
5486         (grub_hostfs_dir):  Handle missing dirent.d_type case.
5487         (grub_hostfs_read): Add missing fseek().
5488         (grub_hostfs_label): Clear label pointer.  This fixes a crash
5489         of grub-emu on "ls (host)".
5491 2007-11-18  Christian Franke  <franke@computer.org>
5493         * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
5494         Add attribute packed, gcc 3.4.4 on Cygwin aligns this
5495         to 64 bit boundary by default.
5497 2007-11-18  Bean  <bean123ch@gmail.com>
5499         * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
5500         (hexdump_mod_SOURCES): New variable.
5501         (hexdump_mod_CFLAGS): Likewise.
5502         (hexdump_mod_LDFLAGS): Likewise.
5504         * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5506         * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5508         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5510         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5512         * include/grub/hexdump.h: New file.
5514         * commands/hexdump.c: New file.
5516 2007-11-10  Robert Millan  <rmh@aybabtu.com>
5518         * commands/i386/pc/play.c (beep_off): Switch order of arguments
5519         in grub_outb() calls.
5520         (beep_on): Likewise.
5522 2007-11-10  Christian Franke  <franke@computer.org>
5524         * normal/menu.c (run_menu): Check for empty menu to avoid crash.
5525         (grub_menu_run): Likewise.
5527 2007-11-10  Robert Millan  <rmh@aybabtu.com>
5529         * include/grub/i386/efi/machine.h: New file.
5530         * include/grub/i386/linuxbios/machine.h: Likewise.
5531         * include/grub/i386/pc/machine.h: Likewise.
5532         * include/grub/powerpc/ieee1275/machine.h: Likewise.
5533         * include/grub/sparc64/ieee1275/machine.h: Likewise.
5535         * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
5536         (serial_hw_io_addr): New variable.
5537         (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
5538         instead of `(unsigned short *) 0x400'.
5540 2007-11-10  Bean  <bean123ch@gmail.com>
5542         * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
5544 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
5546         * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
5547         (vga_mod_SOURCES): Added.
5548         (vga_mod_CFLAGS): Likewise.
5549         (vga_mod_LDFLAGS): Likewise.
5551         * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
5552         grub_outb() calls.
5553         (set_map_mask): Likewise.
5554         (set_read_map): Likewise.
5555         (set_read_address): Likewise.
5556         (vga_font): Removed variable.
5557         (get_vga_glyph): Removed function.
5558         (invalidate_char): Likewise.
5559         (write_char): Changed to use grub_font_get_glyph() for font
5560         information.
5561         (grub_vga_putchar): Likewise.
5562         (grub_vga_getcharwidth): Likewise.
5564 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
5566         * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
5567         flags.
5568         (pxeboot_img_LDFLAGS): Likewise.
5569         (diskboot_img_LDFLAGS): Likewise.
5570         (kernel_img_LDFLAGS): Likewise.
5572 2007-11-06  Robert Millan  <rmh@aybabtu.com>
5574         * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
5575         in grub_outb() calls.
5576         (serial_hw_init): Likewise.
5578 2007-11-05  Robert Millan  <rmh@aybabtu.com>
5580         * util/update-grub.in: Allow files in ${update_grub_dir} to contain
5581         spaces.  Skip non-regular files.
5583 2007-11-05  Robert Millan  <rmh@aybabtu.com>
5585         * kern/disk.c (grub_disk_firmware_fini)
5586         (grub_disk_firmware_is_tainted): New variables.
5588         * include/grub/disk.h (grub_disk_firmware_fini)
5589         (grub_disk_firmware_is_tainted): Likewise.
5591         * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
5592         (grub_disk_biosdisk_fini): ... to here.
5593         (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
5594         (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
5595         is set.  Register grub_disk_biosdisk_fini() in
5596         `grub_disk_firmware_fini'.
5598         * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
5599         (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
5600         Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
5601         to finish existing firmware disk interface.
5603         * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
5604         (ata_mod_SOURCES): New variable.
5605         (ata_mod_CFLAGS): Likewise.
5606         (ata_mod_LDFLAGS): Likewise.
5608 2007-11-05  Robert Millan  <rmh@aybabtu.com>
5610         * disk/ata.c: Remove `<grub/machine/time.h>'.  Include `<grub/time.h>'.
5611         (grub_ata_wait): Reimplement using grub_millisleep().
5613         * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
5614         * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
5616 2007-11-03  Marco Gerards  <marco@gnu.org>
5618         * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
5619         (CRTC_ADDR_PORT): New macro.
5620         (CRTC_DATA_PORT): Likewise.
5621         (CRTC_CURSOR): Likewise.
5622         (CRTC_CURSOR_ADDR_HIGH): Likewise.
5623         (CRTC_CURSOR_ADDR_LOW): Likewise.
5624         (update_cursor): New function.
5625         (grub_console_real_putchar): Call `update_cursor'.
5626         (grub_console_gotoxy): Likewise.
5627         (grub_console_cls): Set the default color when clearing the
5628         screen.
5629         (grub_console_setcursor): Implemented.
5631 2007-11-03  Marco Gerards  <marco@gnu.org>
5633         * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
5634         become activate.
5635         (grub_ata_pio_write): Likewise.
5637         (grub_atapi_identify): Wait after issuing an ATA command.
5638         (grub_atapi_packet): Likewise.
5639         (grub_ata_identify): Likewise.
5640         (grub_ata_readwrite): Likewise.
5642 2007-11-03  Marco Gerards  <marco@gnu.org>
5644         * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
5645         (grub_ata_pio_write): Likewise.
5646         (grub_ata_readwrite): Use `grub_error', instead of
5647         returning `grub_errno'.
5649 2007-11-03  Marco Gerards  <marco@gnu.org>
5651         * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
5652         grub_ata_pio_write once for every single sector, instead of for
5653         multiple sectors.
5655 2007-10-31  Robert Millan  <rmh@aybabtu.com>
5657         * configure.ac: Add `i386-linuxbios' to the list of supported targets.
5659         * conf/i386-linuxbios.rmk: New file.
5661         * kern/i386/pc/hardware.c: Likewise.
5662         * term/i386/pc/at_keyboard.c: Likewise.
5663         * term/i386/pc/vga_text.c: Likewise.
5665         * include/grub/i386/linuxbios/boot.h: Likewise.
5666         * include/grub/i386/linuxbios/console.h: Likewise.
5667         * include/grub/i386/linuxbios/init.h: Likewise.
5668         * include/grub/i386/linuxbios/kernel.h: Likewise.
5669         * include/grub/i386/linuxbios/loader.h: Likewise.
5670         * include/grub/i386/linuxbios/memory.h: Likewise.
5671         * include/grub/i386/linuxbios/serial.h: Likewise.
5672         * include/grub/i386/linuxbios/time.h: Likewise.
5674         * kern/i386/linuxbios/init.c: Likewise.
5675         * kern/i386/linuxbios/startup.S: Likewise.
5676         * kern/i386/linuxbios/table.c: Likewise.
5678 2007-10-31  Marco Gerards  <marco@gnu.org>
5680         * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
5681         (ata_mod_SOURCES): New variable.
5682         (ata_mod_CFLAGS): Likewise.
5683         (ata_mod_LDFLAGS): Likewise.
5685         * disk/ata.c: New file.
5687         * include/grub/disk.h (grub_disk_dev_id): Add
5688         `GRUB_DISK_DEV_ATA_ID'.
5690 2007-10-31  Robert Millan  <rmh@aybabtu.com>
5692         * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
5693         * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
5695         * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
5696         * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
5698         * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
5699         `<grub/types.h>'.
5701         * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
5703 2007-10-27  Robert Millan  <rmh@aybabtu.com>
5705         * include/grub/types.h (ULONG_MAX): Define macro.
5707 2007-10-22  Robert Millan  <rmh@aybabtu.com>
5709         * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'.  Include
5710         `"../realmode.S"'.
5711         Remove `"kern/i386/loader.S"'.  Include `"../loader.S"'.
5713 2007-10-22  Robert Millan  <rmh@aybabtu.com>
5715         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
5716         (pkgdata_MODULES): Add `biosdisk.mod'.
5717         (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
5718         variables.
5720         * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
5721         (grub_biosdisk_init): Replace with ...
5722         (GRUB_MOD_INIT(biosdisk)): ... this.
5723         (grub_biosdisk_fini): Replace with ...
5724         (GRUB_MOD_FINI(biosdisk)): ... this.
5726         * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
5727         (grub_machine_init): Remove call to grub_biosdisk_init().
5728         (grub_machine_fini): Remove call to grub_machine_fini().
5730         * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
5732 2007-10-22  Robert Millan  <rmh@aybabtu.com>
5734         * include/grub/time.h: New file.
5735         * include/grub/i386/time.h: Likewise.
5736         * include/grub/powerpc/time.h: Likewise.
5737         * include/grub/sparc64/time.h: Likewise.
5739         * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
5740         instances to ...
5741         (KERNEL_MACHINE_TIME_HEADER): ... this.
5742         * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
5743         instances to ...
5744         (KERNEL_MACHINE_TIME_HEADER): ... this.
5745         * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
5746         instances to ...
5747         (KERNEL_MACHINE_TIME_HEADER): ... this.
5749         * kern/i386/efi/init.c: Include `<grub/time.h>'.
5750         (grub_millisleep): New function.
5751         * kern/i386/pc/init.c: Include `<grub/time.h>'.
5752         (grub_millisleep): New function.
5753         * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
5754         Remove `grub/machine/time.h' include.
5755         (grub_millisleep): New function.
5756         * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
5757         Remove `grub/machine/time.h' include.
5758         (grub_millisleep): New function.
5760         * include/grub/misc.h (grub_div_roundup): New function.
5762         * kern/misc.c: Include `<grub/time.h>'.
5763         (grub_millisleep_generic): New function.
5765         * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
5766         Add `time.h'.
5767         * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
5768         Add `time.h'.
5769         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
5770         `machine/time.h'.  Add `time.h'.
5771         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
5773 2007-10-21  Robert Millan  <rmh@aybabtu.com>
5775         * include/grub/misc.h (grub_max): New function.
5777 2007-10-21  Robert Millan  <rmh@aybabtu.com>
5779         * util/misc.c (grub_util_info): Call fflush() before returning.
5781 2007-10-20  Robert Millan  <rmh@aybabtu.com>
5783         * genmk.rb (Image): Copy `extra_flags' from here ...
5784         (PModule): ... to here.  Use it in `#{obj}: #{src}' rule.
5786         * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
5787         to `argc' and `args' arguments.
5789 2007-10-17  Robert Millan  <rmh@aybabtu.com>
5791         * kern/i386/loader.S: New file.
5793         * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
5794         * kern/i386/loader.S (grub_linux_prot_size)... to here.
5795         * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
5796         * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
5797         * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
5798         * kern/i386/loader.S (grub_linux_real_addr)... to here.
5799         * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
5800         * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
5801         * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
5802         * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
5803         * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
5804         * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
5805         * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
5806         * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
5808         * kern/i386/realmode.S: New file.
5810         * kern/i386/pc/startup.S (protstack): Moved from here ...
5811         * kern/i386/realmode.S (protstack)... to here.
5812         * kern/i386/pc/startup.S (gdt): Moved from here ...
5813         * kern/i386/realmode.S (gdt)... to here.
5814         * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
5815         * kern/i386/realmode.S (prot_to_real)... to here.
5817         * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
5818         `kern/i386/realmode.S'.
5820 2007-10-17  Robert Millan  <rmh@aybabtu.com>
5822         * include/grub/i386/loader.h: New file.
5824         * include/grub/i386/pc/loader.h (grub_linux_prot_size)
5825         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
5826         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
5827         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
5828         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
5829         * include/grub/i386/loader.h (grub_linux_prot_size)
5830         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
5831         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
5832         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
5833         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
5835         * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
5837 2007-10-15  Robert Millan  <rmh@aybabtu.com>
5839         * normal/misc.c (grub_normal_print_device_info): Do not probe for
5840         filesystem when dev->disk is unset.
5841         Do probe for filesystem even when dev->disk->has_partitions is set.
5842         In case a filesystem is found, always report it.
5843         In case it isn't, if dev->disk->has_partitions is set, report that
5844         a partition table was found instead of reporting that no filesystem
5845         could be identified.
5847 2007-10-12  Robert Millan  <rmh@aybabtu.com>
5849         * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
5850         to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
5852         * include/grub/types.h (grub_host_to_target16): New macro.
5853         (grub_host_to_target32): Likewise.
5854         (grub_host_to_target64): Likewise.
5855         (grub_target_to_host16): Likewise.
5856         (grub_target_to_host32): Likewise.
5857         (grub_target_to_host64): Likewise.
5859         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
5860         Renamed from to ...
5861         (GRUB_MOD_ALIGN): ...this.  Update all users.
5863         * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
5864         grub_host_to_target32.
5865         Replace grub_be_to_cpu32 with grub_target_to_host32.
5866         (load_modules): Likewise.
5867         (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
5868         Replace grub_be_to_cpu32 with grub_target_to_host32.
5869         Replace grub_cpu_to_be16 with grub_host_to_target16.
5870         Replace grub_cpu_to_be32 grub_host_to_target32.
5872 2007-10-12  Robert Millan  <rmh@aybabtu.com>
5874         * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
5875         * util/elf/grub-mkimage.c: ... here.
5877         * DISTLIST: Add `util/elf/grub-mkimage.c'.  Remove
5878         `util/powerpc/ieee1275/grub-mkimage.c'.
5880 2007-10-07  Robert Millan  <rmh@aybabtu.com>
5882         * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
5883         and make it easier to figure out.
5884         Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
5885         (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
5886         Do not avoid claiming a region above HEAP_MAX_ADDR if that would
5887         leave us with less than HEAP_MIN_SIZE total heap.
5888         Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
5890 2007-10-03  Robert Millan  <rmh@aybabtu.com>
5892         * include/grub/i386/io.h: New file.
5893         * commands/i386/pc/play.c (inb): Removed.
5894         (outb): Removed.
5895         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
5896         with grub_outb().
5897         * term/i386/pc/serial.c  (inb): Removed.
5898         (outb): Removed.
5899         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
5900         with grub_outb().
5901         * term/i386/pc/vga.c  (inb): Removed.
5902         (outb): Removed.
5903         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
5904         with grub_outb().
5906 2007-10-02  Robert Millan  <rmh@aybabtu.com>
5908         * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
5909         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5910         Reported by Marcin Kurek.
5912 2007-09-07  Robert Millan  <rmh@aybabtu.com>
5914         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
5915         SmartFirmware version updates (as released by Sven Luther), and avoid
5916         setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
5917         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
5918         known broken.
5920 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
5922         From Hitoshi Ozeki:
5923         * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
5924         when merging two regions.
5926 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
5928         * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
5929         * normal/completion.c (grub_normal_do_completion): Likewise.
5930         Reported by Hitoshi Ozeki.
5932 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
5934         Do not use devices at boot in chainloading.
5936         * loader/i386/pc/chainloader.c (boot_drive): New variable.
5937         (boot_part_addr): Likewise.
5938         (grub_chainloader_boot): Simply call grub_chainloader_real_boot
5939         with BOOT_DRIVE and BOOT_PART_ADDR.
5940         (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
5941         Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
5943 2007-08-29  Robert Millan  <rmh@aybabtu.com>
5945         Patch from Simon Peter <dn.tlp@gmx.net>:
5946         * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
5947         * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
5948         util/grub-probe.c_DEPENDENCIES.  Replace grub-setup_DEPENDENCIES with
5949         util/i386/pc/grub-setup.c_DEPENDENCIES.
5950         * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
5951         util/grub-probe.c_DEPENDENCIES.
5952         * conf/powerpc-ieee1275.rmk: Likewise.
5954 2007-08-28  Robert Millan  <rmh@aybabtu.com>
5956         * util/i386/get_disk_name.c: New.  Implement grub_util_get_disk_name()
5957         to tell grub-mkdevicemap how to name devices.
5958         * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
5959         feature).
5961         * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
5962         util/i386/get_disk_name.c.
5963         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
5964         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
5965         util/ieee1275/get_disk_name.c.
5967         * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
5969         * DISTLIST: Add util/i386/get_disk_name.c and
5970         util/ieee1275/get_disk_name.c.
5972         * util/grub-mkdevicemap.c: Replace device naming logic with
5973         grub_util_get_disk_name() calls.
5975 2007-08-20  Robert Millan  <rmh@aybabtu.com>
5977         * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
5978         (so that it works for both plural and singular quantities).
5980 2007-08-05  Robert Millan  <rmh@aybabtu.com>
5982         * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
5983         so that [xz] isn't taken into account when determining order.
5985 2007-08-02  Marco Gerards  <marco@gnu.org>
5987         * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
5988         `include/multiboot2.h', `include/grub/elfload.h',
5989         `include/multiboot.h', `include/grub/multiboot.h',
5990         `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
5991         `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
5992         `kern/elf.c', `loader/multiboot_loader.c',
5993         `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
5994         `loader/i386/pc/multiboot2.c',
5995         `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
5996         `util/i386/pc/grub-mkrescue.in'.  Remove
5997         `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
5998         `include/grub/i386/pc/util/biosdisk.h' and
5999         `include/grub/powerpc/ieee1275/multiboot.h'.
6001 2007-08-02  Bean  <bean123ch@gmail.com>
6003         * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
6004         (ntfs_mod_SOURCES): New variable.
6005         (ntfs_mod_CFLAGS): Likewise.
6006         (ntfs_mod_LDFLAGS): Likewise.
6008         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
6009         (grub_probe_SOURCES): Likewise.
6010         (grub_emu_SOURCES): Likewise.
6012         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
6013         (grub_emu_SOURCES): Likewise.
6015         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
6016         (grub_emu_SOURCES): Likewise.
6018         * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
6020         * fs/ntfs.c: New file.
6022 2007-08-02  Bean  <bean123ch@gmail.com>
6024         * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
6026         * file.h (grub_file): Likewise.
6028         * fshelp.h (grub_fshelp_read_file): Likewise.
6030         * util/i386/pc/grub-setup.c (setup): Likewise.
6031         (save_first_sector): Likewise.
6032         (save_blocklists): Likewise.
6034         * fs/affs.c (grub_affs_read_file): Likewise.
6036         * fs/ext2.c (grub_ext2_read_file): Likewise.
6038         * fs/fat.c (grub_fat_read_data): Likewise.
6040         * fs/fshelp.c (grub_fshelp_read_file): Likewise.
6042         * fs/hfs.c (grub_hfs_read_file): Likewise.
6044         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
6046         * fs/jfs.c (grub_jfs_read_file): Likewise.
6048         * fs/minix.c (grub_minix_read_file): Likewise.
6050         * fs/sfs.c (grub_sfs_read_file): Likewise.
6052         * fs/ufs.c (grub_ufs_read_file): Likewise.
6054         * fs/xfs.c (grub_xfs_read_file): Likewise.
6056         * command/blocklist.c (read_blocklist): Likewise.
6057         (print_blocklist): Likewise.
6059 2007-08-02  Marco Gerards  <marco@gnu.org>
6061         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
6062         `util/hostfs.c'.
6064         * disk/host.c: New file.
6066         * util/hostfs.c: Likewise.
6068         * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
6069         return `GRUB_ERR_BAD_FS'.
6070         * fs/sfs.c (grub_sfs_mount): Likewise.
6071         * fs/xfs.c (grub_xfs_mount): Likewise.
6073         * include/grub/disk.h (enum grub_disk_dev_id): Add
6074         `GRUB_DISK_DEVICE_HOST_ID'.
6076         * util/grub-emu.c (main): Initialize and de-initialize hostfs.
6078 2007-07-24  Jerone Young  <jerone@gmail.com>
6080         * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
6081         modules for compilation.
6082         * conf/powerpc-ieee1275.rmk: Likewise.
6084         * include/multiboot.h: Move multiboot definitions to one file. Rename
6085         many definitions to not get grub specific.
6086         * include/multiboot2.h: Create header with multiboot 2 definitions.
6087         * include/grub/multiboot.h: Header for grub specific function
6088         prototypes and definitions.
6089         * include/grub/multiboot2.h: Likewise.
6090         * include/grub/multiboot_loader.h: Likewise.
6091         * include/grub/i386/pc/multiboot.h: Removed.
6092         * include/grub/powerpc/ieee1275/multiboot.h: Removed.
6094         * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
6095         and 2 to allow for one multiboot and module commands.
6096         * loader/multiboot2.c: Add multiboot2 functionality.
6097         * loader/i386/pc/multiboot.c: Modify for new multiboot header location
6098         and definition names.
6099         * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
6100         2 functions.
6101         * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
6102         ieee1275 specific multiboot2 code.
6104         * kern/i386/pc/startup.S: Change headers and definition names for
6105         multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
6107 2007-07-22  Robert Millan  <rmh@aybabtu.com>
6109         * geninitheader.sh: Process file specified in first parameter rather
6110         than hardcoding grub_modules_init.lst.
6111         * geninit.sh: Likewise.  Also, construct header name dynamically rather
6112         than hardcoding grub_modules_init.h.
6114         * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
6115         grub-emu to grub_emu_init.[ch].  Add rules to build analogous
6116         grub_probe_init.[ch] and grub_setup_init.[ch].
6118         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
6119         grub_modules_init.h with grub_emu_init.h.
6120         (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
6121         grub_probe_init.[ch] files.
6122         * conf/i386-efi.rmk: Likewise.
6123         * conf/i386-pc.rmk: Likewise.
6124         (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
6125         grub_setup_init.[ch] files.
6127         * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
6128         * util/grub-probe.c: Include grub_probe_init.h.  Use grub_init_all()
6129         to initialize modules rather than a list of hardcoded functions.
6130         * util/i386/pc/grub-setup.c: Include grub_setup_init.h.  Use
6131         grub_init_all() to initialize modules rather than a list of hardcoded
6132         functions.
6134 2007-07-22  Robert Millan  <rmh@aybabtu.com>
6136         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
6137         GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
6139 2007-07-22  Robert Millan  <rmh@aybabtu.com>
6141         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
6142         GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
6143         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
6144         flag when running on SmartFirmware.
6145         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
6146         "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
6147         was set.
6149         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
6150         Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
6151         rather than decreasing it.
6153         * util/i386/pc/grub-setup.c (setup): When embedding is required, but
6154         there's not enough space to do it, fail in the same way as when it
6155         can't be done because there are no partitions.
6157         * util/powerpc/ieee1275/grub-install.in: Improve error message shown
6158         when nvsetenv failed.
6160 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
6162         * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
6163         because this rule is automatically generated.
6164         (grub-mkrescue): Removed for the same reason as above.
6166 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
6168         Migrate to GNU General Public License Version 3.
6170         * COPYING: Replaced with the plain text version of GPLv3.
6172         * config.guess: Updated from gnulib.
6173         * config.sub: Likewise.
6175         * geninit.sh: Output a GPLv3 copyright notice.
6176         * geninitheader.sh: Likewise.
6177         * genmodsrc.sh: Likewise.
6178         * gensymlist.sh.in: Likewise.
6180         * boot/i386/pc/boot.S: Upgraded to GPLv3.
6181         * boot/i386/pc/diskboot.S: Likewise.
6182         * boot/i386/pc/pxeboot.S: Likewise.
6183         * commands/blocklist.c: Likewise.
6184         * commands/boot.c: Likewise.
6185         * commands/cat.c: Likewise.
6186         * commands/cmp.c: Likewise.
6187         * commands/configfile.c: Likewise.
6188         * commands/echo.c: Likewise.
6189         * commands/help.c: Likewise.
6190         * commands/ls.c: Likewise.
6191         * commands/search.c: Likewise.
6192         * commands/terminal.c: Likewise.
6193         * commands/test.c: Likewise.
6194         * commands/videotest.c: Likewise.
6195         * commands/i386/cpuid.c: Likewise.
6196         * commands/i386/pc/halt.c: Likewise.
6197         * commands/i386/pc/play.c: Likewise.
6198         * commands/i386/pc/reboot.c: Likewise.
6199         * commands/i386/pc/vbeinfo.c: Likewise.
6200         * commands/i386/pc/vbetest.c: Likewise.
6201         * commands/ieee1275/halt.c: Likewise.
6202         * commands/ieee1275/reboot.c: Likewise.
6203         * commands/ieee1275/suspend.c: Likewise.
6204         * disk/loopback.c: Likewise.
6205         * disk/lvm.c: Likewise.
6206         * disk/raid.c: Likewise.
6207         * disk/efi/efidisk.c: Likewise.
6208         * disk/i386/pc/biosdisk.c: Likewise.
6209         * disk/ieee1275/ofdisk.c: Likewise.
6210         * font/manager.c: Likewise.
6211         * fs/affs.c: Likewise.
6212         * fs/ext2.c: Likewise.
6213         * fs/fat.c: Likewise.
6214         * fs/fshelp.c: Likewise.
6215         * fs/hfs.c: Likewise.
6216         * fs/hfsplus.c: Likewise.
6217         * fs/iso9660.c: Likewise.
6218         * fs/jfs.c: Likewise.
6219         * fs/minix.c: Likewise.
6220         * fs/sfs.c: Likewise.
6221         * fs/ufs.c: Likewise.
6222         * fs/xfs.c: Likewise.
6223         * hello/hello.c: Likewise.
6224         * include/grub/acorn_filecore.h: Likewise.
6225         * include/grub/arg.h: Likewise.
6226         * include/grub/bitmap.h: Likewise.
6227         * include/grub/boot.h: Likewise.
6228         * include/grub/cache.h: Likewise.
6229         * include/grub/device.h: Likewise.
6230         * include/grub/disk.h: Likewise.
6231         * include/grub/dl.h: Likewise.
6232         * include/grub/elfload.h: Likewise.
6233         * include/grub/env.h: Likewise.
6234         * include/grub/err.h: Likewise.
6235         * include/grub/file.h: Likewise.
6236         * include/grub/font.h: Likewise.
6237         * include/grub/fs.h: Likewise.
6238         * include/grub/fshelp.h: Likewise.
6239         * include/grub/gzio.h: Likewise.
6240         * include/grub/hfs.h: Likewise.
6241         * include/grub/kernel.h: Likewise.
6242         * include/grub/loader.h: Likewise.
6243         * include/grub/lvm.h: Likewise.
6244         * include/grub/misc.h: Likewise.
6245         * include/grub/mm.h: Likewise.
6246         * include/grub/net.h: Likewise.
6247         * include/grub/normal.h: Likewise.
6248         * include/grub/parser.h: Likewise.
6249         * include/grub/partition.h: Likewise.
6250         * include/grub/pc_partition.h: Likewise.
6251         * include/grub/raid.h: Likewise.
6252         * include/grub/rescue.h: Likewise.
6253         * include/grub/script.h: Likewise.
6254         * include/grub/setjmp.h: Likewise.
6255         * include/grub/symbol.h: Likewise.
6256         * include/grub/term.h: Likewise.
6257         * include/grub/terminfo.h: Likewise.
6258         * include/grub/tparm.h: Likewise.
6259         * include/grub/types.h: Likewise.
6260         * include/grub/video.h: Likewise.
6261         * include/grub/efi/api.h: Likewise.
6262         * include/grub/efi/chainloader.h: Likewise.
6263         * include/grub/efi/console.h: Likewise.
6264         * include/grub/efi/console_control.h: Likewise.
6265         * include/grub/efi/disk.h: Likewise.
6266         * include/grub/efi/efi.h: Likewise.
6267         * include/grub/efi/pe32.h: Likewise.
6268         * include/grub/efi/time.h: Likewise.
6269         * include/grub/i386/linux.h: Likewise.
6270         * include/grub/i386/setjmp.h: Likewise.
6271         * include/grub/i386/types.h: Likewise.
6272         * include/grub/i386/efi/kernel.h: Likewise.
6273         * include/grub/i386/efi/loader.h: Likewise.
6274         * include/grub/i386/efi/time.h: Likewise.
6275         * include/grub/i386/pc/biosdisk.h: Likewise.
6276         * include/grub/i386/pc/boot.h: Likewise.
6277         * include/grub/i386/pc/chainloader.h: Likewise.
6278         * include/grub/i386/pc/console.h: Likewise.
6279         * include/grub/i386/pc/init.h: Likewise.
6280         * include/grub/i386/pc/kernel.h: Likewise.
6281         * include/grub/i386/pc/loader.h: Likewise.
6282         * include/grub/i386/pc/memory.h: Likewise.
6283         * include/grub/i386/pc/multiboot.h: Likewise.
6284         * include/grub/i386/pc/serial.h: Likewise.
6285         * include/grub/i386/pc/time.h: Likewise.
6286         * include/grub/i386/pc/vbe.h: Likewise.
6287         * include/grub/i386/pc/vbeblit.h: Likewise.
6288         * include/grub/i386/pc/vbefill.h: Likewise.
6289         * include/grub/i386/pc/vbeutil.h: Likewise.
6290         * include/grub/i386/pc/vga.h: Likewise.
6291         * include/grub/ieee1275/ieee1275.h: Likewise.
6292         * include/grub/ieee1275/ofdisk.h: Likewise.
6293         * include/grub/powerpc/libgcc.h: Likewise.
6294         * include/grub/powerpc/setjmp.h: Likewise.
6295         * include/grub/powerpc/types.h: Likewise.
6296         * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
6297         * include/grub/powerpc/ieee1275/console.h: Likewise.
6298         * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
6299         * include/grub/powerpc/ieee1275/kernel.h: Likewise.
6300         * include/grub/powerpc/ieee1275/loader.h: Likewise.
6301         * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
6302         * include/grub/powerpc/ieee1275/time.h: Likewise.
6303         * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
6304         * include/grub/sparc64/libgcc.h: Likewise.
6305         * include/grub/sparc64/setjmp.h: Likewise.
6306         * include/grub/sparc64/types.h: Likewise.
6307         * include/grub/sparc64/ieee1275/console.h: Likewise.
6308         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
6309         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
6310         * include/grub/sparc64/ieee1275/time.h: Likewise.
6311         * include/grub/util/biosdisk.h: Likewise.
6312         * include/grub/util/getroot.h: Likewise.
6313         * include/grub/util/lvm.h: Likewise.
6314         * include/grub/util/misc.h: Likewise.
6315         * include/grub/util/raid.h: Likewise.
6316         * include/grub/util/resolve.h: Likewise.
6317         * io/gzio.c: Likewise.
6318         * kern/device.c: Likewise.
6319         * kern/disk.c: Likewise.
6320         * kern/dl.c: Likewise.
6321         * kern/elf.c: Likewise.
6322         * kern/env.c: Likewise.
6323         * kern/err.c: Likewise.
6324         * kern/file.c: Likewise.
6325         * kern/fs.c: Likewise.
6326         * kern/loader.c: Likewise.
6327         * kern/main.c: Likewise.
6328         * kern/misc.c: Likewise.
6329         * kern/mm.c: Likewise.
6330         * kern/parser.c: Likewise.
6331         * kern/partition.c: Likewise.
6332         * kern/rescue.c: Likewise.
6333         * kern/term.c: Likewise.
6334         * kern/efi/efi.c: Likewise.
6335         * kern/efi/init.c: Likewise.
6336         * kern/efi/mm.c: Likewise.
6337         * kern/i386/dl.c: Likewise.
6338         * kern/i386/efi/init.c: Likewise.
6339         * kern/i386/efi/startup.S: Likewise.
6340         * kern/i386/pc/init.c: Likewise.
6341         * kern/i386/pc/lzo1x.S: Likewise.
6342         * kern/i386/pc/startup.S: Likewise.
6343         * kern/ieee1275/ieee1275.c: Likewise.
6344         * kern/powerpc/cache.S: Likewise.
6345         * kern/powerpc/dl.c: Likewise.
6346         * kern/powerpc/ieee1275/cmain.c: Likewise.
6347         * kern/powerpc/ieee1275/crt0.S: Likewise.
6348         * kern/powerpc/ieee1275/init.c: Likewise.
6349         * kern/powerpc/ieee1275/openfw.c: Likewise.
6350         * kern/sparc64/cache.S: Likewise.
6351         * kern/sparc64/dl.c: Likewise.
6352         * kern/sparc64/ieee1275/init.c: Likewise.
6353         * kern/sparc64/ieee1275/openfw.c: Likewise.
6354         * loader/efi/chainloader.c: Likewise.
6355         * loader/efi/chainloader_normal.c: Likewise.
6356         * loader/i386/efi/linux.c: Likewise.
6357         * loader/i386/efi/linux_normal.c: Likewise.
6358         * loader/i386/pc/chainloader.c: Likewise.
6359         * loader/i386/pc/chainloader_normal.c: Likewise.
6360         * loader/i386/pc/linux.c: Likewise.
6361         * loader/i386/pc/linux_normal.c: Likewise.
6362         * loader/i386/pc/multiboot.c: Likewise.
6363         * loader/i386/pc/multiboot_normal.c: Likewise.
6364         * loader/powerpc/ieee1275/linux.c: Likewise.
6365         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
6366         * normal/arg.c: Likewise.
6367         * normal/cmdline.c: Likewise.
6368         * normal/command.c: Likewise.
6369         * normal/completion.c: Likewise.
6370         * normal/execute.c: Likewise.
6371         * normal/function.c: Likewise.
6372         * normal/lexer.c: Likewise.
6373         * normal/main.c: Likewise.
6374         * normal/menu.c: Likewise.
6375         * normal/menu_entry.c: Likewise.
6376         * normal/misc.c: Likewise.
6377         * normal/parser.y: Likewise.
6378         * normal/script.c: Likewise.
6379         * normal/i386/setjmp.S: Likewise.
6380         * normal/powerpc/setjmp.S: Likewise.
6381         * normal/sparc64/setjmp.S: Likewise.
6382         * partmap/acorn.c: Likewise.
6383         * partmap/amiga.c: Likewise.
6384         * partmap/apple.c: Likewise.
6385         * partmap/gpt.c: Likewise.
6386         * partmap/pc.c: Likewise.
6387         * partmap/sun.c: Likewise.
6388         * term/gfxterm.c: Likewise.
6389         * term/terminfo.c: Likewise.
6390         * term/efi/console.c: Likewise.
6391         * term/i386/pc/console.c: Likewise.
6392         * term/i386/pc/serial.c: Likewise.
6393         * term/i386/pc/vesafb.c: Likewise.
6394         * term/i386/pc/vga.c: Likewise.
6395         * term/ieee1275/ofconsole.c: Likewise.
6396         * util/biosdisk.c: Likewise.
6397         * util/console.c: Likewise.
6398         * util/genmoddep.c: Likewise.
6399         * util/getroot.c: Likewise.
6400         * util/grub-emu.c: Likewise.
6401         * util/grub-mkdevicemap.c: Likewise.
6402         * util/grub-probe.c: Likewise.
6403         * util/lvm.c: Likewise.
6404         * util/misc.c: Likewise.
6405         * util/raid.c: Likewise.
6406         * util/resolve.c: Likewise.
6407         * util/update-grub.in: Likewise.
6408         * util/update-grub_lib.in: Likewise.
6409         * util/grub.d/00_header.in: Likewise.
6410         * util/grub.d/10_hurd.in: Likewise.
6411         * util/grub.d/10_linux.in: Likewise.
6412         * util/i386/efi/grub-install.in: Likewise.
6413         * util/i386/efi/grub-mkimage.c: Likewise.
6414         * util/i386/pc/grub-install.in: Likewise.
6415         * util/i386/pc/grub-mkimage.c: Likewise.
6416         * util/i386/pc/grub-mkrescue.in: Likewise.
6417         * util/i386/pc/grub-setup.c: Likewise.
6418         * util/i386/pc/misc.c: Likewise.
6419         * util/powerpc/ieee1275/grub-install.in: Likewise.
6420         * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
6421         * util/powerpc/ieee1275/misc.c: Likewise.
6422         * video/bitmap.c: Likewise.
6423         * video/video.c: Likewise.
6424         * video/i386/pc/vbe.c: Likewise.
6425         * video/i386/pc/vbeblit.c: Likewise.
6426         * video/i386/pc/vbefill.c: Likewise.
6427         * video/i386/pc/vbeutil.c: Likewise.
6428         * video/readers/tga.c: Likewise.
6430 2007-07-02  Robert Millan  <rmh@aybabtu.com>
6432         * conf/i386-efi.rmk: Replace obsolete reference to
6433         util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
6434         with util/getroot.c.
6435         * conf/powerpc-ieee1275.rmk: Likewise.
6436         * conf/sparc64-ieee1275.rmk: Likewise.
6438         * util/grub-emu.c (main): Fix unchecked pointer handling.
6440 2007-07-02  Robert Millan  <rmh@aybabtu.com>
6442         * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
6443         invocation to fail, in order to support partition-less media.
6445         * util/i386/pc/grub-install.in: Likewise.
6447         * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
6448         which fs or partmap modules are needed (akin to its sister scripts).
6450         Also use grub-probe to get rid of unportable /proc/mounts check.
6452         Print the same informational message that the other scripts do, before
6453         exiting.
6455 2007-06-23  Robert Millan  <rmh@aybabtu.com>
6457         * util/update-grub_lib.in (font_path): New function.  Determine whether
6458         a font file can be found and, if so, echo the GRUB path to it.
6460         * util/update-grub.in: Handle multiple terminals depending on user
6461         input, platform availability and font file presence.  Propagate
6462         variables of our findings to /etc/grub.d/ children.
6464         * util/grub.d/00_header.in: Handle multiple terminals, based on
6465         environment setup by update-grub.
6467 2007-06-23  Robert Millan  <rmh@aybabtu.com>
6469         * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
6471 2007-06-21  Robert Millan  <rmh@aybabtu.com>
6473         * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
6474         indicate end of data section in kernel image.
6475         * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
6476         GRUB_KERNEL_MACHINE_DATA_END.
6478         * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
6479         space for it.
6480         * kern/i386/efi/startup.S: Likewise.
6482         * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
6483         during image generation.  Implement --prefix option to override this
6484         patch.
6485         * util/i386/efi/grub-mkimage.c: Likewise.
6487         * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
6488         code to make path relative to its root into a separate function.
6490         * util/i386/pc/grub-install.in: Use newly provided
6491         make_system_path_relative_to_its_root() to convert ${grubdir}, then
6492         pass the result to grub-install --prefix.
6494 2007-06-13  Robert Millan  <rmh@aybabtu.com>
6496         * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
6497         DEFAULT_DEVICE_MAP.
6498         * util/grub-emu.c: Use above definitions from misc.h instead of
6499         defining them.
6500         * util/grub-mkdevicemap.c: Likewise.
6501         * util/i386/pc/grub-setup.c: Likewise.
6502         * util/grub-probe.c: Likewise.
6503         (probe): Abort with grub_util_error() when either
6504         grub_guess_root_device or grub_util_get_grub_dev fails.
6506 2007-06-12  Robert Millan  <rmh@aybabtu.com>
6508         * normal/command.c (grub_command_execute): Use NULL rather than 0 for
6509         "pager" assignment.
6510         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
6511         "pcdata".
6512         * util/grub-probe.c (probe): Likewise for "drive_name".
6514 2007-06-11  Robert Millan  <rmh@aybabtu.com>
6516         * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
6517         not just the cdrom one.
6519 2007-06-11  Robert Millan  <rmh@aybabtu.com>
6521         * util/i386/pc/grub-mkrescue.in: Add "set -e".
6522         Add --pkglibdir=DIR option to override pkglibdir.
6523         Mention --image-type=TYPE in help output.
6524         Fix --grub-mkimage (it was a no-op).
6525         Abort gracefully when no parameter is given.
6527 2007-06-11  Robert Millan  <rmh@aybabtu.com>
6529         * util/i386/pc/grub-mkrescue.in: New file.
6530         * conf/i386-pc.rmk: Add its build declarations.  Put it in bin_SCRIPTS.
6531         * Makefile.in: Handle bin_SCRIPTS.
6533 2007-06-10  Vesa Jaaskelainen  <chaac@nic.fi>
6535         * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
6536         list of video modes.
6538 2007-06-06  Robert Millan  <rmh@aybabtu.com>
6540         * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
6541         file doesn't exist, or if it is in a filesystem grub can't read.
6543         * util/update-grub.in: Set fallback for GRUB_FS check to "unknown".  Do
6544         not abort if GRUB_DRIVE could not be defined.  Rearrange generated
6545         header comment to fit in 80 columns when the variables are resolved.
6547         * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
6548         could be identified by update-grub.  Remove redundant check for
6549         unifont.pff existence (since convert_system_path_to_grub_path now
6550         handles that).
6552 2007-06-04  Robert Millan  <rmh@aybabtu.com>
6554         * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
6556         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
6558         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
6560 2007-06-04  Robert Millan  <rmh@aybabtu.com>
6562         * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
6564         * include/grub/partition.h: Declare grub_apple_partition_map_init and
6565         grub_apple_partition_map_fini.
6567         * util/biosdisk.c
6568         (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
6569         to access >2 TiB disks).
6571         Print disk->total_sectors with %llu instead of %lu, since this
6572         variable is always 64-bit (prevents wrong disk size from being displayed
6573         on either >2 TiB disk or big-endian CPU).
6575         (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
6576         into a generic case that supports all (sane) partition maps.
6578         Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
6579         breaks big-endian.
6581         * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
6582         and grub_apple_partition_map_fini() after that.
6584 2007-06-01  Robert Millan  <rmh@aybabtu.com>
6586         * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
6588         * util/grub.d/00_header.in: Only enable gfxterm when
6589         convert_system_path_to_grub_path() succeeds.
6591 2007-05-20  Robert Millan  <rmh@aybabtu.com>
6593         * util/update-grub_lib.in: New file.
6594         * DISTLIST: Add update-grub_lib.in.
6595         * conf/common.rmk: Generate update-grub_lib and install it in
6596         $(lib_DATA).
6597         * Makefile.in: Add install routine for $(lib_DATA).
6599         * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
6600         function provided by update-grub_lib to support arbitrary paths of
6601         unifont.pff.
6602         * util/update-grub.in: Use convert_system_path_to_grub_path() to
6603         initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
6605 2007-05-19  Robert Millan  <rmh@aybabtu.com>
6607         * commands/i386/cpuid.c: New module.
6608         * DISTLIST: Add it.
6609         * conf/i386-efi.rmk: Enable cpuid.mod.
6610         * conf/i386-pc.rmk: Likewise.
6612 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
6614         * kern/disk.c (grub_disk_read): Check return value of
6615         grub_realloc().
6617 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
6619         * util/getroot.c (grub_util_get_grub_dev): Support partitionable
6620         arrays.
6621         * disk/raid.c (grub_raid_open): Likewise.
6623 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
6625         * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
6626         stack instead of on the heap.
6628         * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
6629         before doing a read on it.
6631         * configure.ac: Only use -fno-stack-protector for the target
6632         environment.
6634 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
6636         * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
6637         __attribute_ ((unused)) to mode_type argument.
6639         * util/getroot.c (grub_guess_root_device): Fix #endif.
6641         * kern/misc.c (memcmp): Fix prototype.
6643         * include/grub/partition.h [GRUB_UTIL]
6644         (grub_gpt_partition_map_init): Add prototype.
6645         (grub_gpt_partition_map_fini): Likewise.
6647         * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
6648         at the right place.
6650         * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
6651         (grub_fat_read_data): Likewise.
6652         (grub_fat_find_dir): Likewise.
6654         * font/manager.c (find_glyph): Make table a const.
6655         (grub_font_get_glyph): Remove bitmap from if statement.
6657 2007-05-16  Jeroen Dekkers  <jeroen@dekkers.cx>
6659         * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
6660         code, first search for device in /dev/mapper, then in /dev.
6661         (grub_util_get_grub_dev): New function.
6662         * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
6663         prototype.
6664         * util/grub-probe.c (probe): Remove check for RAID, call
6665         grub_util_get_grub_dev() instead of
6666         grub_util_biosdisk_get_grub_dev().
6667         * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
6668         grub_util_biosdisk_get_grub_dev().
6669         * util/i386/pc/grub-setup.c (main): Likewise.
6671 2007-05-16  Robert Millan  <rmh@aybabtu.com>
6673         * DISTLIST: Update for the latest changes.
6674         * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
6675         util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
6676         * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
6677         grub/util/biosdisk.h.
6678         * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
6679         grub/util/biosdisk.h.
6681 2007-05-16  Robert Millan  <rmh@aybabtu.com>
6683         * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
6685 2007-05-16  Robert Millan  <rmh@aybabtu.com>
6687         * util/i386/efi/grub-install.in: New.
6688         * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
6689         newly added grub-install.
6690         * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
6691         include.
6692         * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
6693         grub/util/biosdisk.h.
6694         * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
6695         grub/util/biosdisk.h.
6697 2007-05-16  Robert Millan  <rmh@aybabtu.com>
6699         * include/grub/i386/pc/util/biosdisk.h: Moved to ...
6700         * include/grub/util/biosdisk.h: ... here.
6701         * util/i386/pc/biosdisk.c: Moved to ...
6702         * util/biosdisk.c: ... here.
6703         * util/i386/pc/getroot.c: Moved to ...
6704         * util/getroot.c: ... here.
6705         * util/i386/pc/grub-mkdevicemap.c: Moved to ...
6706         * util/grub-mkdevicemap.c: ... here.
6707         * util/i386/pc/grub-probe.c: Moved to ...
6708         * util/grub-probe.c: ... here.
6710 2007-05-15  Robert Millan  <rmh@aybabtu.com>
6712         * util/update-grub.in: Remove duplicated line in grub.cfg header
6713         message.
6715 2007-05-13  Robert Millan  <rmh@aybabtu.com>
6717         * util/update-grub.in: Fix a few assumptions about the devices holding
6718         /, /boot and /boot/grub being the same.
6719         * util/grub.d/00_header.in: Likewise.
6720         * util/grub.d/10_hurd.in: Likewise.
6721         * util/grub.d/10_linux.in: Likewise.
6723         * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
6724         patterns.  Use that to define the `.old' suffix as older than `'.
6726         * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
6728         * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
6729         the grub.cfg header message.
6731 2007-05-11  Robert Millan  <rmh@aybabtu.com>
6733         * util/update-grub.in: Create device.map if it doesn't already exist,
6734         before attempting to run grub-probe.
6735         Check for grub-probe and grub-mkdevicemap with the same code
6736         grub-install is using.
6737         Remove test mode.
6739 2007-05-09  Jeroen Dekkers  <jeroen@dekkers.cx>
6741         * Makefile.in: Add the datarootdir autoconf variable.
6743 2007-05-09  Robert Millan  <rmh@aybabtu.com>
6745         * util/i386/pc/grub-probe.c (probe): When detecting partition map,
6746         fail gracefully if dev->disk->partition == NULL.
6748 2007-05-07  Robert Millan  <rmh@aybabtu.com>
6750         * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
6751         determine partition map module.
6752         * util/i386/pc/grub-install.in: Use this feature to decide which
6753         partition module to load, instead of hardcoding pc and gpt.
6755 2007-05-07  Robert Millan  <rmh@aybabtu.com>
6757         * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
6758         source directory differs from build directory.
6760 2007-05-05  Robert Millan  <rmh@aybabtu.com>
6762         * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
6763         initialisation.
6765 2007-05-05  Robert Millan  <rmh@aybabtu.com>
6767         * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
6769 2007-05-05  Robert Millan  <rmh@aybabtu.com>
6771         * util/grub.d/10_linux.in: Allow the administrator to insert Linux
6772         command-line arguments via ${GRUB_CMDLINE_LINUX}.
6774 2007-05-05  Robert Millan  <rmh@aybabtu.com>
6776         * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
6777         (grub_probe_SOURCES): Likewise.
6778         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
6779         GPT and initialize dos_part and bsd_part accordingly.
6780         * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
6781         install_bsd_part.
6782         (main): Activate gpt module for use during partition identification,
6783         and deactivate it afterwards.
6784         * util/i386/pc/grub-install.in: Add gpt module to core.img.
6785         * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
6786         partition identification, and deactivate it afterwards.
6788 2007-05-05  Robert Millan  <rmh@aybabtu.com>
6790         * term/i386/pc/console.c (grub_console_fini): Call
6791         grub_term_set_current() before grub_term_unregister().
6793 2007-05-04  Robert Millan  <rmh@aybabtu.com>
6795         * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
6796         util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
6797         * Makefile.in: Build update-grub_SCRIPTS.  Install update-grub_SCRIPTS
6798         and update-grub_DATA.
6799         * conf/common.rmk: Build and install update-grub components.
6800         * conf/common.mk: Regenerate.
6801         * util/update-grub.in: New.  Core of update-grub.
6802         * util/grub.d/00_header.in: New.  Generates grub.cfg header.
6803         * util/grub.d/10_hurd.in: New.  Generates boot entries for the Hurd.
6804         * util/grub.d/10_linux.in: New.  Generates boot entries for Linux.
6805         * util/grub.d/README: New.  Document grub.d directory layout.
6807 2007-05-01  Robert Millan  <rmh@aybabtu.com>
6809         * util/grub-emu.c: Move initialization functions
6810         grub_util_biosdisk_init() and grub_init_all() before
6811         grub_util_biosdisk_get_grub_dev(), which relies on them.
6813 2007-04-19  Robert Millan  <rmh@aybabtu.com>
6815         * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
6816         it is used later.
6818 2007-04-18  Jerone Young  <jerone@gmail.com>
6820         * kernel/elf.c: Add missing parenthesis for conditional statement
6821         stanza.
6823 2007-04-10  Jerone Young  <jerone@gmail.com>
6825         * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
6826         continue on and look for device node with real device name.
6828 2007-04-10  Jerone Young  <jerone@gmail.com>
6830         * configure.ac: Add argument for autoconf to use transformation
6831         ability.
6832         * Makefile.in: Add autoconf package transformation code.
6833         * util/i386/pc/grub-install.in: Likewise.
6834         * util/powerpc/ieee1275/grub-install.in: Likewise.
6836 2007-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
6838         * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
6839         (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
6840         (EXT2_REVISION): Likewise.
6841         (EXT2_INODE_SIZE): Likewise.
6842         (struct grub_ext2_block_group): Added a missing member
6843         "used_dirs".
6844         (grub_ext2_read_inode): Divide by the inode size in a superblock
6845         instead of 128 to obtain INODES_PER_BLOCK.
6846         Use the macro EXT2_INODE_SIZE instead of directly using
6847         SBLOCK->INODE_SIZE.
6849 2007-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
6851         * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
6852         superblock instead of the structure size to compute an
6853         offset. This fixes the problem that GRUB could not read a
6854         filesystem when inode size is different from 128-byte.
6856 2007-03-05  Marco Gerards  <marco@gnu.org>
6858         * normal/main.c (read_config_file): When "menu" is not set, create
6859         an initial context.
6861 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
6863         * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
6864         (HEAP_LIMIT): New macro.
6865         (grub_claim_heap): Claim memory up to `heaplimit'.
6867 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
6869         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
6870         * kern/powerpc/ieee1275/init.c (_end): Add declaration.
6871         (_start): Likewise.
6872         (grub_arch_modules_addr): Return address after `_end'.
6873         * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
6874         (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
6875         (add_segments): Calculate `_end' from phdr size and location.
6876         (ALIGN_UP): Moved to ...
6877         * include/grub/misc.h: here.
6878         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
6879         New macro.
6880         (GRUB_IEEE1275_MODULE_BASE): Removed.
6882 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
6884         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
6885         loop boundary.
6887 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
6889         * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
6890         All users updated.
6891         (grub_elf64_load_hook_t): Likewise.
6892         * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
6893         debug output.
6895 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
6897         * kern/mm.c: Update copyright.
6898         (grub_mm_debug): Correct syntax error.
6899         (grub_mm_dump_free): New function.
6900         (grub_debug_free): Call `grub_free'.
6901         * include/grub/mm.h: Update copyright.
6902         (grub_mm_dump_free): Add declaration.
6904 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
6906         * include/grub/ieee1275/ieee1275.h: Update copyright.
6907         * kern/powerpc/ieee1275/init.c: Likewise.
6908         * kern/powerpc/ieee1275/openfw.c: Likewise.
6910         * loader/powerpc/ieee1275/linux.c: Likewise.
6911         * include/grub/elfload.h: Likewise.
6912         * kern/elf.c: Likewise.
6913         (grub_elf32_load): Pass `base' and `size' parameters.  Update all
6914         callers.
6915         (grub_elf64_load): Likewise.
6916         (grub_elf32_load_segment): Move to a nested function.
6917         (grub_elf64_load_segment): Likewise.
6919 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
6921         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
6922         prototype.
6923         * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
6924         (grub_heap_len): Likewise.
6925         (HEAP_SIZE): New macro.
6926         (grub_claim_heap): New function.
6927         (grub_machine_init): Don't claim heap directly.  Call
6928         `grub_claim_heap'.
6929         * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
6930         (grub_available_iterate): New function.
6932 2007-02-03  Thomas Schwinge  <tschwinge@gnu.org>
6934         * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
6935         * configure.ac: Use it for testing the HOST and TARGET compilers.
6937 2006-12-13  Thomas Schwinge  <tschwinge@gnu.org>
6939         * Makefile.in (enable_grub_emu): New variable.
6940         * configure.ac (--enable-grub-emu): New option.
6941         Do the checks for (n)curses only if `--enable-grub-emu' is requested.
6942         * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
6943         * conf/i386-pc.rmk: Likewise.
6944         * conf/powerpc-ieee1275.rmk: Likewise.
6945         * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
6947 2006-12-12  Marco Gerards  <marco@gnu.org>
6949         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
6951         * kern/env.c (grub_env_unset): Don't free the member `value' when
6952         the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
6953         pointer.
6955         * normal/main.c (current_menu): Removed.
6956         (free_menu): Unset the `menu' environment variable.
6957         (grub_normal_menu_addentry): Make use of the environment variable
6958         `menu', instead of using the global `current_menu'.  Allocate
6959         memory for the sourcecode of this entry.
6960         (read_config_file): New argument `nested', changed all callers.
6961         Only in the case of a new context, initialize a new menu.  Set the
6962         `menu' environment variable.
6963         (grub_normal_execute): Don't set and unset the environment
6964         variable `menu' here anymore.  Only free the menu when leaving the
6965         context.
6967         * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
6968         leak.
6970 2006-12-11  Marco Gerards  <marco@gnu.org>
6972         * normal/menu_entry.c (run): Fix off by one bug so the last line
6973         is executed.  Move the loader check to outside the loop.
6975 2006-12-08  Hollis Blanchard  <hollis@penguinppc.org>
6977         * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
6979 2006-11-25  Yoshinori K. Okuji  <okuji@enbug.org>
6981         * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
6982         the number of sectors.  Reported by Andrey Shuvikov
6983         <mr_hyro@yahoo.com>.
6985 2006-11-11  Jeroen Dekkers  <jeroen@dekkers.cx>
6987         * kern/disk.c (grub_disk_read): When there is a read error, always
6988         try to read only the necessary data.
6990         * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
6991         disk/raid.c.
6992         * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
6993         prototype.
6994         [GRUB_UTIL] (grub_raid_fini): Likewise.
6995         [GRUB_UTIL] (grub_lvm_init): Likewise.
6996         [GRUB_UTIL] (grub_lvm_fini): Likewise.
6997         * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
6998         RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
6999         (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
7000         and grub_raid_fini().
7002 2006-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
7004         * include/grub/types.h (__unused): Rename to UNUSED.
7005         * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
7006         (grub_elf64_size): Likewise.
7008 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
7010         * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
7011         grub_error_push and grub_error_pop in the error-handling path.
7012         (grub_elf32_load_segment): Only call grub_file_read with non-zero
7013         length.
7015 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
7017         * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
7018         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
7019         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7020         (kernel_elf_SOURCES): Likewise.
7021         * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
7022         * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
7023         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
7024         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
7025         * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
7026         (elf_mod_SOURCES): New variable.
7027         (elf_mod_CFLAGS): Likewise.
7028         (elf_mod_LDFLAGS): Likewise.
7029         * include/grub/types.h (__unused): New macro.
7030         * include/grub/elfload.h: New file.
7031         * kern/elf.c: Likewise.
7032         * loader/powerpc/ieee1275/linux.c: Include elfload.h.
7033         (ELF32_LOADMASK): New macro.
7034         (ELF64_LOADMASK): Likewise.
7035         (vmlinux): Removed.
7036         (grub_linux_load32): New function.
7037         (grub_linux_load64): Likewise.
7038         (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
7039         Use grub_elf_t instead of grub_file_t.
7041 2006-11-02  Hollis Blanchard  <hollis@penguinppc.org>
7043         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
7044         `catch_result' to struct set_color_args.
7046 2006-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
7048         * normal/menu.c: Include grub/script.h.
7049         * normal/menu_entry.c: Likewise.
7050         * include/grub/normal.h: Do not include grub/script.h.
7052 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
7054         * kern/disk.c (grub_disk_read): Correct debug printf formatting.
7056 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
7058         * kern/disk.c (grub_disk_open): Print debug messages when opening a
7059         disk.
7060         (grub_disk_close): Print debug messages when closing a disk.
7061         (grub_disk_read): Print debug messages when disk read fails.
7062         * kern/fs.c (grub_fs_probe): Print debug messages when detecting
7063         filesystem type.
7064         * kern/partition.c: Include misc.h.
7065         (grub_partition_iterate): Print debug messages when detecting
7066         partition type.
7068 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
7070         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
7071         is negative.
7072         * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
7074 2006-10-26  Hollis Blanchard  <hollis@penguinppc.org>
7076         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
7077         Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
7079 2006-10-25  Jeroen Dekkers  <jeroen@dekkers.cx>
7081         * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
7082         instead of sizeof(lv). Patch by Michael Guntsche.
7084 2006-10-18  Jeroen Dekkers  <jeroen@dekkers.cx>
7086         * disk/lvm.c: Rename VGS to VG_LIST.
7087         (grub_lvm_iterate): Change VGS->LV to VG-LV.
7088         (grub_lvm_open): Likewise.
7089         Thanks to Michael Guntsche for finding this bug.
7091 2006-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
7093         * configure.ac (AC_INIT): Bumped to 1.95.
7095 2006-10-14  Robert Millan  <rmh@aybabtu.com>
7097         * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
7098         with "/dev/.static/dev/md".
7100 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
7102         * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
7103         DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
7104         DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
7105         DRIVE_NAME are always freed.
7107         * util/i386/pc/biosdisk.c (make_device_name): Add one into
7108         DOS_PART, as a DOS partition is counted from one instead of zero
7109         now. Reported by Robert Millan.
7111 2006-10-14  Robert Millan  <rmh@aybabtu.com>
7113         * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
7114         grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
7115         * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
7116         string returned by grub_guess_root_device.
7117         * util/i386/pc/grub-setup.c: Likewise.
7118         * util/i386/pc/grub-probefs.c: Likewise.
7120         * util/i386/pc/grub-probefs.c: Rename to ...
7121         * util/i386/pc/grub-probe.c: ... this.
7122         * DISTLIST: Remove grub-probefs, add grub-probe.
7123         * conf/i386-efi.rmk: Likewise.
7124         * conf/i386-pc.rmk: Likewise.
7125         * util/i386/pc/grub-install.in: Likewise.
7127         * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
7128         choose which information we want to print.
7130 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
7132         * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
7133         include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
7134         include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
7135         include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
7136         video/readers/tga.c and video/i386/pc/vbeutil.c.
7138 2006-10-14  Jeroen Dekkers  <jeroen@dekkers.cx>
7140         Added support for RAID and LVM.
7142         * disk/lvm.c: New file.
7143         * disk/raid.c: Likewise.
7144         * include/grub/lvm.h: Likewise.
7145         * include/grub/raid.h: Likewise.
7146         * include/grub/util/lvm.h: Likewise.
7147         * include/grub/util/raid.h: Likewise.
7148         * util/lvm.c: Likewise.
7149         * util/raid.c: Likewise.
7151         * include/grub/disk.h (grub_disk_dev_id): Add
7152         GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
7153         (grub_disk_get_size): New prototype.
7154         * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
7155         returns a partition.
7156         (grub_disk_get_size): New function.
7158         * kern/i386/pc/init.c (make_install_device): Copy the prefix
7159         verbatim if grub_install_dos_part is -2.
7161         * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
7162         and LVM devices.
7164         * util/i386/pc/grub-setup.c (setup): New argument
7165         MUST_EMBED. Force embedding of GRUB when the argument is
7166         true. Close FILE before returning.
7167         (main): Add support for RAID and LVM.
7169         * conf/common.rmk: Add RAID and LVM modules.
7170         * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
7171         util/lvm.c.
7172         (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
7174         * kern/misc.c (grub_strstr): New function.
7175         * include/grub/misc.h (grub_strstr): New prototype.
7177 2006-10-10  Tristan Gingold  <tristan.gingold@bull.net>
7179         * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
7181 2006-10-05  Tristan Gingold  <tristan.gingold@bull.net>
7183         * kern/misc.c (grub_strtoull): Guess the base only if not
7184         specified.
7186 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
7188         * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
7189         PowerMac support.
7191 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
7193         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
7195         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
7196         Remove `flags' argument.  All callers changed.
7197         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
7198         (IEEE1275_IHANDLE_INVALID): New variable.
7199         (IEEE1275_CELL_INVALID): New variable.
7200         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
7201         grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
7202         grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
7203         grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
7204         grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
7205         codes from Open Firmware.  All callers updated.
7206         (grub_ieee1275_next_property): Directly return Open Firmware return
7207         code.
7208         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
7209         Standardize error checking from `grub_ieee1275_get_property'.
7210         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
7211         `devalias' to `aliases'.  Correct comments.  Consolidate error paths.
7213 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
7215         * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
7216         `instance_to_package_args' to `instance_to_path_args'.
7218         * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
7219         `grub_ieee1275_chosen'.
7221         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
7222         `grub_ieee1275_interpret'.
7224 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
7226         * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
7228 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
7230         * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
7231         (__cmpdi): Likewise.
7233         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
7234         `flags' to `grub_ieee1275_next_property'.  Change `pathlen' to type
7235         `grub_ssize_t'.
7237         * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
7239         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
7240         to type `grub_ssize_t'.
7241         (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
7243 2006-09-22  Marco Gerards  <marco@gnu.org>
7245         * normal/script.c (grub_script_create_cmdmenu): Skip leading
7246         newlines.
7248 2006-09-22  Marco Gerards  <marco@gnu.org>
7250         * commands/echo.c: New file.
7252         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
7254         * conf/common.rmk (echo_mod_SOURCES): New variable.
7255         (echo_mod_CFLAGS): Likewise.
7256         (echo_mod_LDFLAGS): Likewise.
7258 2006-09-22  Marco Gerards  <marco@gnu.org>
7260         * normal/main.c (get_line): Malloc memory instead of using
7261         preallocated memory.  Removed the arguments `cmdline' and
7262         `max_len'.  Updated all callers.
7264 2006-09-22  Marco Gerards  <marco@gnu.org>
7266         * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
7267         (normal_mod_DEPENDENCIES): Likewise.
7269         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
7270         (normal_mod_DEPENDENCIES): Likewise.
7272         * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
7274 2006-09-22  Johan Rydberg  <jrydberg@gnu.org>
7276         * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
7277         programs.
7278         * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
7279         (normal_mod_DEPENDENCIES): Likewise.
7280         * conf/i386-pc.mk: Regenerate.
7281         * conf/i386-efi.mk: Likewise
7282         * conf/common.mk: Likewise.
7283         * conf/powerpc-ieee1275.mk: Likewise.
7284         * conf/sparc64-ieee1275.mk: Likewise.
7286 2006-09-22  Robert Millan  <rmh@aybabtu.com>
7288         Sync with i386 version.
7289         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
7290         * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
7292 2006-09-21  Robert Millan  <rmh@aybabtu.com>
7294         Import from GRUB Legacy (lib/device.c):
7295         * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
7296         (init_device_map) [__linux__]: Add support for I2O devices.
7298 2006-09-14  Marco Gerards  <marco@gnu.org>
7300         * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
7301         `-melf_i386'.
7303 2006-09-14  Robert Millan  <rmh@aybabtu.com>
7305         * util/i386/pc/grub-install.in: Skip menu.lst when removing
7306         /boot/grub/*.lst.
7308         * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
7310         * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
7311         before adding it to device.map.
7313 2006-08-15  Johan Rydberg  <jrydberg@gnu.org>
7315         * genmk.rb: Let GCC generate dependencies the first time it
7316         compiles a file; using the -MD option.
7317         * conf/common.mk: Regenerate.
7318         * conf/i386-pc.mk: Likewise.
7319         * conf/i386-efi.mk: Likewise.
7320         * conf/powerpc-ieee1275.mk: Likewise.
7321         * conf/sparc64-ieee1275.mk: Likewise.
7323 2006-08-04  Yoshinori K. Okuji  <okuji@enbug.org>
7325         Move the prototypes of grub_setjmp and grub_longjmp to
7326         cpu/setjmp.h, so that each architecture may specify different
7327         attributes.
7329         * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
7330         (grub_longjmp): Likewise.
7331         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
7332         (grub_longjmp): Likewise.
7333         * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
7334         (grub_longjmp): Likewise.
7336         * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
7337         [!GRUB_UTIL] (grub_longjmp): Removed.
7339 2006-08-01  Pelletier Vincent  <subdino2004@yahoo.fr>
7341         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
7342         "color!" method does not return any value.
7344 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
7346         * include/grub/bitmap.h: New file.
7348         * include/grub/i386/pc/vbeutil.h: Likewise.
7350         * video/bitmap.c: Likewise.
7352         * video/readers/tga.c: Likewise.
7354         * video/i386/pc/vbeutil.c: Likewise.
7356         * commands/videotest.c: Code cleanup and updated to reflect to new
7357         video API.
7359         * term/gfxterm.c: Likewise.
7361         * video/video.c: Likewise.
7363         * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
7364         (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
7365         (bitmap_mod_SOURCES): New entry.
7366         (bitmap_mod_CFLAGS): Likewise.
7367         (bitmap_mod_LDFLAGS): Likewise.
7368         (tga_mod_SOURCES): Likewise.
7369         (tga_mod_CFLAGS): Likewise.
7370         (tga_mod_LDFLAGS): Likewise.
7372         * include/grub/video.h (grub_video_blit_operators): New enum type.
7373         (grub_video_render_target): Changed as forward declaration and moved
7374         actual definition to be video driver specific.
7375         (grub_video_adapter.blit_bitmap): Added blitting operator.
7376         (grub_video_adapter.blit_render_target): Likewise.
7377         (grub_video_blit_bitmap): Likewise.
7378         (grub_video_blit_render_target): Likewise.
7380         * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
7381         driver specific render target definition.
7382         (grub_video_vbe_map_rgba): Added driver internal helper.
7383         (grub_video_vbe_unmap_color): Updated to use
7384         grub_video_i386_vbeblit_info.
7385         (grub_video_vbe_get_video_ptr): Likewise.
7387         * include/grub/i386/pc/vbeblit.h
7388         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
7389         grub_video_i386_vbeblit_info.
7390         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
7391         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
7392         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
7393         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
7394         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
7395         (grub_video_i386_vbeblit_index_index): Likewise.
7396         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
7397         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
7398         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
7399         (grub_video_i386_vbeblit_blend): Added generic blitter for blend
7400         operator.
7401         (grub_video_i386_vbeblit_replace): Added generic blitter for replace
7402         operator.
7404         * video/i386/pc/vbeblit.c: Updated to reflect changes on
7405         include/grub/i386/pc/vbeblit.h.
7407         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
7408         Updated to use grub_video_i386_vbeblit_info.
7409         (grub_video_i386_vbefill_R8G8B8): Likewise.
7410         (grub_video_i386_vbefill_index): Likewise.
7411         (grub_video_i386_vbefill): Added generic filler.
7413         * video/i386/pc/vbefill.c: Updated to reflect changes on
7414         include/grub/i386/pc/vbefill.h.
7416         * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
7417         grub_video_i386_vbeblit_info.
7418         (grub_video_vbe_unmap_color): Likewise.
7419         (grub_video_vbe_blit_glyph): Likewise.
7420         (grub_video_vbe_scroll): Likewise.
7421         (grub_video_vbe_draw_pixel): Removed function.
7422         (grub_video_vbe_get_pixel): Likewise.
7423         (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
7424         updated code to use it.
7425         (common_blitter): Added common blitter for render target and bitmap.
7426         (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
7427         (grub_video_vbe_blit_render_target): Likewise.
7429 2006-07-30  Johan Rydberg  <jrydberg@gnu.org>
7431         * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
7432         is in text mode if there is no console control protocol instance
7433         available.
7435 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
7437         * include/grub/video.h: Code cleanup.
7439         * include/grub/i386/pc/vbe.h: Likewise.
7441         * video/i386/pc/vbe.c: Likewise.
7443         * video/i386/pc/vbeblit.c: Likewise.
7445         * video/i386/pc/vbefill.c: Likewise.
7447         * video/video.c: Likewise.  Also added more comments.
7449 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
7451         * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
7452         (struct grub_biosdisk_dap): Likewise.
7454         * include/grub/i386/pc/biosdisk.h: ... to here.  Also corrected
7455         linkage settings for all functions.
7457 2006-07-12  Marco Gerards  <marco@gnu.org>
7459         * configure.ac (--enable-mm-debug): Fix typo.
7461         * genkernsyms.sh.in: Use proper quoting for `CC'.
7463 2006-07-02  Jeroen Dekkers  <jeroen@dekkers.cx>
7465         * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
7466         (normal_mod_ASFLAGS): Remove "-m32".
7468 2006-06-14  Yoshinori K. Okuji  <okuji@enbug.org>
7470         * util/misc.c: Include config.h.
7471         [!HAVE_MEMALIGN]: Do not include malloc.h.
7472         (grub_memalign): Use posix_memalign, if present. Then, use
7473         memalign, if present. Otherwise, emit an error.
7475         * util/grub-emu.c: Do not include malloc.h.
7477         * include/grub/util/misc.h: Include unistd.h. This is required for
7478         FreeBSD, because off_t is defined in unistd.h. Reported by Harley
7479         D. Eades III <hde@foobar-qux.org>.
7481         * configure.ac (AC_GNU_SOURCE): Added.
7482         (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
7483         type.
7485 2006-06-09  Yoshinori K. Okuji  <okuji@enbug.org>
7487         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
7488         ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
7490 2006-06-07  Jeroen Dekkers  <jeroen@dekkers.cx>
7492         * include/grub/types.h (grub_host_addr_t): Rename to
7493         grub_target_addr_t.
7494         (grub_host_off_t): Rename to grub_target_off_t.
7495         (grub_host_size_t): Rename to grub_target_size_t.
7496         (grub_host_ssize_t): Rename to grub_target_ssize_t.
7497         Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
7499         * include/grub/kernel.h (struct grub_module_header): Change type
7500         of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
7501         (grub_module_info): Likewise.
7503 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
7505         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
7506         of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
7507         Velazquez <jesus.velazquez@gmail.com>.
7509 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
7511         Count partitions from 1 instead of 0 in the string representation
7512         of partitions. Still use 0-based internally.
7514         * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
7515         (sun_partition_map_iterate): Use grub_partition_t instead of
7516         struct grub_partition *. Cast DESC->START_CYLINDER to
7517         grub_uint64_t after converting the endian.
7518         (sun_partition_map_probe): Subtract 1 for PARTNUM.
7519         (sun_partition_map_get_name): Add 1 to P->INDEX.
7521         * partmap/pc.c (grub_partition_parse): Subtract 1 for
7522         PCDATA->DOS_PART.
7523         (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
7525         * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
7526         zero instead of one.
7527         (gpt_partition_map_probe): Subtract 1 for PARTNUM.
7528         (gpt_partition_map_get_name): Add 1 into P->INDEX.
7530         * partmap/apple.c (apple_partition_map_iterate): Change the type
7531         of POS to unsigned.
7532         (apple_partition_map_probe): Subtract 1 for PARTNUM.
7533         (apple_partition_map_get_name): Add 1 into P->INDEX.
7535         * partmap/amiga.c (amiga_partition_map_iterate): Change the type
7536         of POS to unsigned.
7537         (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
7538         calculate the offset of a partition.
7539         (amiga_partition_map_probe): Subtract 1 for PARTNUM.
7540         (amiga_partition_map_get_name): Add 1 into P->INDEX.
7542         * partmap/acorn.c (acorn_partition_map_find): Change the type of
7543         SECTOR to grub_disk_addr_t.
7544         (acorn_partition_map_iterate): Likewise.
7545         (acorn_partition_map_probe): Subtract 1 for PARTNUM.
7546         Change the type of SECTOR to grub_disk_addr_t. Declare P on the
7547         top.
7548         (acorn_partition_map_get_name): Add 1 into P->INDEX.
7550         * kern/i386/pc/init.c (make_install_device): Add 1 into
7551         GRUB_INSTALL_DOS_PART.
7553         * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
7554         conditional.
7556 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
7558         Clean up the code to support 64-bit addressing in disks and
7559         files. This change is not enough for filesystems yet.
7561         * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
7562         type of "start" to grub_uint64_t.
7563         (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
7564         grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
7565         save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
7566         convert addresses.
7568         * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
7569         to grub_disk_addr_t.
7571         * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
7572         string.
7574         * partmap/pc.c (pc_partition_map_iterate): Likewise.
7576         * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
7577         to char *.
7579         * normal/script.c (grub_script_parse): Remove unused MEMFREE.
7581         * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
7583         * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
7585         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
7586         to grub_off_t, to detect an error from grub_file_seek.
7587         (grub_multiboot_load_elf32): Likewise.
7589         * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
7590         maximum unsigned long value when an overflow is detected.
7591         (grub_strtoull): New function.
7592         (grub_divmod64): Likewise.
7593         (grub_lltoa): use grub_divmod64.
7595         * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
7596         grub_disk_addr_t.
7597         (grub_fs_blocklist_open): Increase P if P is not NULL to advance
7598         the pointer to next character. Use grub_strtoull instead of
7599         grub_strtoul.
7600         (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
7601         SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
7602         respectively.
7604         * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
7605         return value is signed.
7606         (grub_file_seek): Change the type of OLD to grub_off_t. Do not
7607         test if OFFSET is less than zero, as OFFSET is unsigned now.
7609         * kern/disk.c (struct grub_disk_cache): Change the type of
7610         "sector" to grub_disk_addr_t.
7611         (grub_disk_cache_get_index): Change the type of SECTOR to
7612         grub_disk_addr_t. Calculate the hash with SECTOR casted to
7613         unsigned after shifting.
7614         (grub_disk_cache_invalidate): Change the type of SECTOR to
7615         grub_disk_addr_t.
7616         (grub_disk_cache_unlock): Likewise.
7617         (grub_disk_cache_store): Likewise.
7618         (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
7619         START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
7620         grub_disk_addr_t and grub_uint64_t, respectively.
7621         (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
7622         body, as the value of OFFSET is tweaked by
7623         grub_disk_check_range. Change the types of START_SECTOR, LEN and
7624         POS to grub_disk_addr_t, grub_size_t and grub_size_t,
7625         respectively.
7626         (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
7627         body, as the value of OFFSET is tweaked by
7628         grub_disk_check_range. Change the types of LEN and N to
7629         grub_size_t.
7631         * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
7632         and "saved_offset" to grub_off_t.
7633         (test_header): Cast BUF to char *.
7634         (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
7635         to char *.
7636         (grub_gzio_read): Change the types of OFFSET and SIZE to
7637         grub_off_t and grub_size_t, respectively.
7639         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
7640         Removed.
7641         (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
7642         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
7643         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
7644         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
7645         (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
7647         * include/grub/types.h (grub_off_t): Unconditionally set to
7648         grub_uint64_t.
7649         (grub_disk_addr_t): Changed to grub_uint64_t.
7651         * include/grub/partition.h (struct grub_partition): Change the
7652         types of "start", "len" and "offset" to grub_disk_addr_t,
7653         grub_uint64_t and grub_disk_addr_t, respectively.
7654         (grub_partition_get_start): Return grub_disk_addr_t.
7655         (grub_partition_get_len): Return grub_uint64_t.
7657         * include/grub/misc.h (grub_strtoull): New prototype.
7658         (grub_divmod64): Likewise.
7660         * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
7661         of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
7662         grub_off_t, respectively.
7663         All callers and references changed.
7665         * include/grub/fs.h (struct grub_fs): Change the type of LEN to
7666         grub_size_t in "read".
7667         All callers and references changed.
7669         * include/grub/file.h (struct grub_file): Change the types of
7670         "offset" and "size" to grub_off_t and grub_off_t,
7671         respectively. Change the type of SECTOR to grub_disk_addr_t in
7672         "read_hook".
7673         (grub_file_read): Change the type of LEN to grub_size_t.
7674         (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
7675         grub_off_t.
7676         (grub_file_size): Return grub_off_t.
7677         (grub_file_tell): Likewise.
7678         All callers and references changed.
7680         * include/grub/disk.h (struct grub_disk_dev): Change the types of
7681         SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
7682         "write".
7683         (struct grub_disk): Change the type of "total_sectors" to
7684         grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
7685         "read_hook".
7686         (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
7687         grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
7688         (grub_disk_write): Likewise.
7689         All callers and references changed.
7691         * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
7692         char * for grub_strncmp to silence gcc.
7693         (grub_iso9660_mount): Likewise.
7694         (grub_iso9660_mount): Likewise.
7695         (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
7696         return statement.
7697         (grub_iso9660_iterate_dir): Likewise.
7698         (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
7700         * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
7701         LEN to grub_disk_addr_t and grub_size_t, respectively.
7703         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
7705         * fs/jfs.c (grub_jfs_read_file): Likewise.
7707         * fs/minix.c (grub_jfs_read_file): Likewise.
7709         * fs/sfs.c (grub_jfs_read_file): Likewise.
7711         * fs/ufs.c (grub_jfs_read_file): Likewise.
7713         * fs/xfs.c (grub_jfs_read_file): Likewise.
7715         * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
7716         and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
7717         respectively.
7719         * fs/ext2.c (grub_ext2_read_block): When an error happens, set
7720         BLKNR to -1 instead of returning GRUB_ERRNO.
7721         (grub_ext2_read_file): Change the types of SECTOR and
7722         LEN to grub_disk_addr_t and grub_size_t, respectively.
7724         * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
7725         LEN to grub_disk_addr_t and grub_size_t, respectively.
7727         * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
7728         grub_file_read.
7730         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
7731         string. Do not cast SECTOR explicitly.
7733         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
7734         TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
7735         (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
7736         grub_disk_addr_t and grub_size_t, respectively. If the sector is
7737         over 2TB and LBA mode is not supported, raise an error.
7738         (get_safe_sectors): New function.
7739         (grub_biosdisk_read): Use get_safe_sectors.
7740         (grub_biosdisk_write): Likewise.
7742         * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
7743         (grub_efidisk_write): Likewise.
7745         * disk/loopback.c (delete_loopback): Cosmetic changes.
7746         (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
7747         correctly.
7748         (grub_loopback_open): Likewise.
7749         (grub_loopback_read): Likewise. Also, change the type of POS to
7750         grub_off_t, and fix the usage of grub_memset.
7752         * commands/i386/pc/play.c: Include grub/machine/time.h.
7754         * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
7755         print FILE->SIZE.
7757         * commands/configfile.c: Include grub/env.h.
7759         * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
7760         GRUB_ERRNO directly instead. Change the type of POS to
7761         grub_off_t. Follow the coding standard.
7763         * commands/blocklist.c: Include grub/partition.h.
7764         (grub_cmd_blocklist): Return an error if the underlying device is
7765         not a disk. Take the starting sector of a partition into account,
7766         if a partition is used.
7768         * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
7769         a length field.
7770         (lba_mode): Support 64-bit addresses.
7771         (chs_mode): Likewise.
7772         (copy_buffer): Adapted to the new offsets of a length field and a
7773         segment field.
7774         (blocklist_default_start): Allocate 64-bit space.
7776         * boot/i386/pc/boot.S (force_lba): Removed.
7777         (boot_drive): Moved to under KERNEL_SECTOR.
7778         (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
7779         space.
7780         (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
7781         is useless.
7782         (lba_mode): Refactored to support a 64-bit address. More size
7783         optimization.
7784         (setup_sectors): Likewise.
7786 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
7788         * DISTLIST: Added include/grub/i386/linux.h. Removed
7789         include/grub/i386/pc/linux.h
7791         * configure.ac (AC_INIT): Bumped to 1.94.
7793         * config.guess: Updated from gnulib.
7794         * config.sub: Likewise.
7795         * install-sh: Likewise.
7796         * mkinstalldirs: Likewise.
7798 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
7800         * conf/common.rmk (grub_modules_init.lst): Depended on
7801         grub_emu_SOURCES, excluding grub_emu_init.c, instead of
7802         MODSRCFILES.
7804         * genmk.rb (PModule::rule): Reverted the previous change.
7806 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
7808         * conf/common.rmk (grub_modules_init.lst): Depends on
7809         $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
7810         that the target does not exist before producing.
7811         (grub_modules_init.h): Remove the target before generating.
7812         (grub_emu_init.c): Likewise.
7814         * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
7816 2006-05-31  Jeroen Dekkers  <jeroen@dekkers.cx>
7818         * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
7819         for the target-specific tests. Make sure that we also have the
7820         up-to-date target variables for those tests.
7822 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
7824         * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
7825         (PModule::rule): Likewise.
7827 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
7829         * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
7830         TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
7831         target-specific flags should be prefixed.
7832         (PModule::rule): Likewise.
7834 2006-05-30  Yoshinori K. Okuji  <okuji@enbug.org>
7836         * configure.ac (CMP): Check if cmp is available explicitly.
7838 2006-05-29  Yoshinori K. Okuji  <okuji@enbug.org>
7840         * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
7841         (target_cpu): New variable.
7842         (pkglibdir): Use target_cpu instead of host_cpu.
7844         * util/i386/pc/grub-install.in (host_cpu): Removed.
7845         (target_cpu): New variable.
7846         (pkglibdir): Use target_cpu instead of host_cpu.
7848         * util/genmoddep.c: Removed.
7850         * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
7851         instead of GRUB_HOST_SIZEOF_VOID_P.
7852         * kern/dl.c: Likewise.
7854         * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
7855         ...
7856         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
7857         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
7858         (GRUB_TARGET_SIZEOF_LONG): ... this.
7859         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
7860         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
7861         * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
7862         to ...
7863         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
7864         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
7865         (GRUB_TARGET_SIZEOF_LONG): ... this.
7866         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
7867         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
7868         * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
7869         to ...
7870         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
7871         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
7872         (GRUB_TARGET_SIZEOF_LONG): ... this.
7873         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
7874         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
7876         * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
7877         GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
7878         [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
7879         instead of GRUB_HOST_SIZEOF_LONG.
7880         [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
7881         GRUB_HOST_WORDS_BIGENDIAN to define or undefine
7882         GRUB_CPU_WORDS_BIGENDIAN.
7883         Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
7884         define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
7885         grub_host_ssize_t.
7887         * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
7888         (genmoddep_SOURCES): Likewise.
7889         * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
7890         (genmoddep_SOURCES): Likewise.
7891         * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
7892         (genmoddep_SOURCES): Likewise.
7893         * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
7894         Likewise.
7895         (genmoddep_SOURCES): Likewise.
7897         * genmoddep.awk: New file.
7899         * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
7900         TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
7901         CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
7902         (PModule::rule): Likewise.
7903         (Program::rule): Likewise.
7904         (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
7905         BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
7906         respectively.
7908         * configure.ac: Rewritten intensively to use host and target
7909         instead of build and host, respectively.
7911         * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
7912         (host_cpu): Removed.
7913         (target_cpu): New variable.
7914         (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
7915         (BUILD_CC): Removed.
7916         (BUILD_CFLAGS): Likewise.
7917         (BUILD_CPPFLAGS): Likewise.
7918         (TARGET_CC): New variable.
7919         (TARGET_CFLAGS): Likewise.
7920         (TARGET_CPPFLAGS): Likewise.
7921         (TARGET_LDFLAGS): Likewise.
7922         (AWK): Likewise.
7923         (include): Use target_cpu instead of host_cpu.
7924         (moddep.lst:): Use genmoddep.awk instead of genmoddep.
7926         * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
7928 2006-05-29  Vesa Jaaskelainen  <chaac@nic.fi>
7930         * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
7931         'exec_to_evaluate'.  Renamed field 'true' to 'exec_on_true'.  Renamed
7932         field 'false' to 'exec_on_false'.
7933         (grub_script_create_cmdif): Renamed argument names to reflect above
7934         changes.
7936         * normal/execute.c (grub_script_execute_cmdif): Likewise.
7938         * normal/script.c (grub_script_create_cmdif): Likewise.
7940 2006-05-28  Yoshinori K. Okuji  <okuji@enbug.org>
7942         * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
7943         top.
7944         (grub_hfsplus_btree_recptr): Likewise.
7945         (grub_hfsplus_find_block): Do not take RETRY any longer. Use
7946         FILEBLOCK both to pass a block number and store next block
7947         number.
7948         (grub_hfsplus_read_block): Rewritten heavily to support an extent
7949         overflow file correctly. Specify errors appropriately, because
7950         fshelp expects that GRUB_ERRNO is set when fails. Reuse
7951         grub_hfsplus_btree_recptr to get the pointer to a found key.
7952         (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
7953         is found.
7955         * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
7956         linux.mod.
7957         (_linux_mod_SOURCES): New variable.
7958         (_linux_mod_CFLAGS): Likewise.
7959         (_linux_mod_LDFLAGS): Likewise.
7960         (linux_mod_SOURCES): Likewise.
7961         (linux_mod_CFLAGS): Likewise.
7962         (linux_mod_LDFLAGS): Likewise.
7964         * DISTLIST: Added loader/i386/efi/linux.c,
7965         loader/i386/efi/linux_normal.c and
7966         include/grub/i386/efi/loader.h.
7968         * loader/i386/efi/linux.c: New file.
7969         * loader/i386/efi/linux_normal.c: Likewise.
7970         * include/grub/i386/efi/loader.h: Likewise.
7972 2006-05-27  Yoshinori K. Okuji  <okuji@enbug.org>
7974         * commands/blocklist.c: New file.
7976         * DISTLIST: Added commands/blocklist.c.
7978         * term/efi/console.c (grub_console_highlight_color): Use a lighter
7979         color for the background, and a darker color for the foreground.
7980         (grub_console_checkkey): Return READ_KEY.
7981         (grub_console_cls): Set the background to
7982         GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
7984         * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
7986         * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
7987         the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
7989         * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
7990         prototype.
7992         * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
7993         BG. The spec is wrong again.
7995         * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
7996         prototype.
7997         [GRUB_UTIL] (grub_blocklist_fini): Likewise.
7999         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
8000         commands/blocklist.c.
8001         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8003         * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
8004         (blocklist_mod_SOURCES): New variable.
8005         (blocklist_mod_CFLAGS): Likewise.
8006         (blocklist_mod_LDFLAGS): Likewise.
8008 2006-05-20  Yoshinori K. Okuji  <okuji@enbug.org>
8010         * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
8011         duplication.
8012         (lba_mode): Use %eax more intensively to reduce the code size.
8014 2006-05-20  Marco Gerards  <marco@gnu.org>
8016         * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
8018         * normal/parser.y (commandblock): Defined as <cmd>.  A subroutine
8019         for `menuentry'.
8020         (script): Accept leading newlines.
8021         (newlines): New rule to describe 0 or more newlines.
8022         (commands): Accept `command' with trailing newline.  Fixed the
8023         order in which arguments were passed to `grub_script_add_cmd'.
8024         Accept commands separated by newlines.
8025         (function): Changed to accept newlines.
8026         (menuentry) Rewritten.
8028         * normal/script.c (grub_script_create_cmdmenu): Add new entries in
8029         front of the list, instead of to the end.
8031 2006-05-19  Yoshinori K. Okuji  <okuji@enbug.org>
8033         * util/i386/pc/grub-install.in (bindir): New variable.
8034         (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
8035         Shaver <lbgwjl@gmail.com>.
8037 2006-05-14  Yoshinori K. Okuji  <okuji@enbug.org>
8039         * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
8040         grub/machine/linux.h
8041         * loader/i386/pc/linux.c: Likewise.
8043         * include/grub/i386/pc/linux.h: Moved to ...
8044         * include/grub/i386/linux.h: ... here.
8046         * include/grub/i386/linux.h (struct linux_kernel_params): New
8047         struct.
8049 2006-05-09  Vesa Jaaskelainen  <chaac@nic.fi>
8051         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
8052         checking.
8053         (grub_video_vbe_blit_glyph): Likewise.
8054         (grub_video_vbe_blit_bitmap): Likewise.
8055         (grub_video_vbe_blit_render_target): Likewise.
8057 2006-05-09  Yoshinori K. Okuji  <okuji@enbug.org>
8059         * configure.ac (--with-platform): Properly quote the square
8060         brackets.
8062 2006-05-08  Marco Gerards  <marco@gnu.org>
8064         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
8065         this...
8066         (kernel_elf_HEADERS): ...to this.  Updated all users.
8067         (grubof_symlist.c): Renamed from this...
8068         (kernel_elf_symlist.c): ...to this.  Updated all users.
8069         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
8070         (grubof_SOURCES): Renamed from this...
8071         (kernel_elf_SOURCES): ...to this.
8072         (grubof_HEADERS): Renamed from this...
8073         (kernel_elf_HEADERS): ...to this.
8074         (grubof_CFLAGS): Renamed from this...
8075         (kernel_elf_CFLAGS): ...to this.
8076         (grubof_ASFLAGS): Renamed from this...
8077         (kernel_elf_ASFLAGS): ...to this.
8078         (grubof_LDFLAGS): Renamed from this...
8079         (kernel_elf_LDFLAGS): ...to this.
8081         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
8082         this...
8083         (kernel_elf_HEADERS): ...to this.  Updated all users.
8084         (grubof_symlist.c): Renamed from this...
8085         (kernel_elf_symlist.c): ...to this.  Updated all users.
8086         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
8087         (grubof_SOURCES): Renamed from this...
8088         (kernel_elf_SOURCES): ...to this.
8089         (grubof_HEADERS): Renamed from this...
8090         (kernel_elf_HEADERS): ...to this.
8091         (grubof_CFLAGS): Renamed from this...
8092         (kernel_elf_CFLAGS): ...to this.
8093         (grubof_ASFLAGS): Renamed from this...
8094         (kernel_elf_ASFLAGS): ...to this.
8095         (grubof_LDFLAGS): Renamed from this...
8096         (kernel_elf_LDFLAGS): ...to this.
8098         * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
8099         `kernel.elf' instead of `grubof'.
8101 2006-05-08  Yoshinori K. Okuji  <okuji@enbug.org>
8103         Add --with-platform to configure. Use pkglibdir instead of
8104         pkgdatadir. This is reported by Roger Leigh.
8106         * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
8107         (host_vendor): Likewise.
8108         (host_os): Likewise.
8109         (pkgdatadir): Likewise.
8110         (platform): New variable.
8111         (pkglibdir): Likewise.
8112         Use PKGLIBDIR instead of PKGDATADIR.
8114         * util/i386/pc/grub-install.in (datadir): Removed.
8115         (host_vendor): Likewise.
8116         (host_os): Likewise.
8117         (pkgdatadir): Likewise.
8118         (platform): New variable.
8119         (pkglibdir): Likewise.
8120         Use PKGLIBDIR instead of PKGDATADIR.
8122         * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
8123         instead of GRUB_DATADIR.
8124         (main): Likewise.
8125         * util/i386/pc/grub-mkimage.c (usage): Likewise.
8126         (main): Likewise.
8127         * util/i386/efi/grub-mkimage.c (usage): Likewise.
8128         (main): Likewise.
8130         * configure.ac (--with-platform): New option.
8131         Use PLATFORM instead of HOST_VENDOR to specify a platform.
8133         * Makefile.in: Include a makefile based on PLATFORM instead of
8134         HOST_VENDOR.
8135         (pkgdatadir): Not appended by the machine type.
8136         (pkglibdir): Appended by the machine type.
8137         (host_vendor): Removed.
8138         (platform): New variable.
8139         (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
8140         (install-local): Use PKGLIBDIR instead of PKGDATADIR.
8141         (uninstall): Likewise.
8143 2006-05-07  Yoshinori K. Okuji  <okuji@enbug.org>
8145         Use the environment context in the menu. Remove the commands
8146         "default" and "timeout", and use variables instead.
8148         * normal/menu.c: Include grub/env.h.
8149         (print_entry): Cast TITLE to silence gcc.
8150         (get_timeout): New function.
8151         (set_timeout): Likewise.
8152         (get_entry_number): Likewise.
8153         (run_menu): Use a default entry, a fallback entry and a timeout
8154         in the environment variables "default", "fallback" and
8155         "timeout". Also, tweak the default entry if it is not within the
8156         current menu entries.
8157         (grub_menu_run): Use a fallback entry in the environment variable
8158         "fallback".
8160         * normal/main.c (read_config_file): Do not initialize
8161         NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
8162         NEWMENU->TIMEOUT.
8163         (grub_normal_execute): Use a data slot to store the menu.
8165         * include/grub/normal.h (struct grub_menu): Removed default_entry,
8166         fallback_entry and timeout.
8167         (struct grub_menu_list): Removed.
8168         (grub_menu_list_t): Likewise.
8169         (struct grub_context): Likewise.
8170         (grub_context_t): Likewise.
8171         (grub_context_get): Likewise.
8172         (grub_context_get_current_menu): Likewise.
8173         (grub_context_push_menu): Likewise.
8174         (grub_context_pop_menu): Likewise.
8175         (grub_default_init): Likewise.
8176         (grub_default_fini): Likewise.
8177         (grub_timeout_init): Likewise.
8178         (grub_timeout_fini): Likewise.
8180         * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
8181         and timeout.mod.
8182         (normal_mod_SOURCES): Removed normal/context.c.
8184         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
8185         commands/default.c, commands/timeout.c and normal/context.c.
8186         (normal_mod_SOURCES): Removed normal/context.c.
8188         * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
8189         commands/timeout.c and normal/context.c.
8190         (normal_mod_SOURCES): Removed normal/context.c.
8192         * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
8193         commands/default.c, commands/timeout.c and normal/context.c.
8194         (normal_mod_SOURCES): Removed normal/context.c.
8196         * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
8197         timeout.mod.
8198         (default_mod_SOURCES): Removed.
8199         (default_mod_CFLAGS): Likewise.
8200         (default_mod_LDFLAGS): Likewise.
8201         (timeout_mod_SOURCES): Removed.
8202         (timeout_mod_CFLAGS): Likewise.
8203         (timeout_mod_LDFLAGS): Likewise.
8205         * DISTLIST: Removed commands/default.c, commands/timeout.c and
8206         normal/context.c.
8208         * commands/default.c: Removed.
8209         * commands/timeout.c: Likewise.
8210         * normal/context.c: Likewise.
8212 2006-05-07  Vesa Jaaskelainen  <chaac@nic.fi>
8214         * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
8216 2006-05-02  Yoshinori K. Okuji  <okuji@enbug.org>
8218         * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
8219         "next" to "prev" for readability.
8220         (struct grub_env_sorted_var): New struct.
8221         (grub_env_context): Renamed to ...
8222         (initial_context): ... this.
8223         (grub_env_var_context): Renamed to ...
8224         (current_context): ... this.
8225         (grub_env_find): Look only at CURRENT_CONTEXT.
8226         (grub_env_context_open): Rewritten to copy exported variables from
8227         previous context.
8228         (grub_env_context_close): Rewritten according to the new
8229         scheme. Also, add an assertion to prevent the initial context from
8230         removed.
8231         (grub_env_insert): Removed the code for the sorted list.
8232         (grub_env_remove): Likewise.
8233         (grub_env_export): Simply mark the variable with
8234         GRUB_ENV_VAR_GLOBAL.
8235         (grub_env_set): A cosmetic change for naming consistency.
8236         (grub_env_get): Likewise.
8237         (grub_env_unset): Likewise.
8238         (grub_env_iterate): Rewritten to sort variables within this
8239         function.
8240         (grub_register_variable_hook): Fixed for naming consistency. Call
8241         grub_env_find again, only if NAME is not found at the first time.
8242         (mangle_data_slot_name): New function.
8243         (grub_env_set_data_slot): Likewise.
8244         (grub_env_get_data_slot): Likewise.
8245         (grub_env_unset_data_slot): Likewise.
8247         * include/grub/env.h (grub_env_var_type): New enum.
8248         (GRUB_ENV_VAR_LOCAL): New constant.
8249         (GRUB_ENV_VAR_GLOBAL): Likewise.
8250         (GRUB_ENV_VAR_DATA): Likewise.
8251         (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
8252         "type".
8253         (grub_env_set): Replace VAR with NAME for consistency.
8254         (grub_register_variable_hook): Likewise.
8255         (grub_env_export): Specify the name of the argument.
8256         (grub_env_set_data_slot): New prototype.
8257         (grub_env_get_data_slot): Likewise.
8258         (grub_env_unset_data_slot): Likewise.
8260 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
8262         Extend the loader so that GRUB can accept a loader which comes
8263         back to GRUB when a loaded image exits. Also, this change adds
8264         support for a chainloader on EFI.
8266         * term/efi/console.c: Include grub/misc.h.
8267         (grub_console_checkkey): Display a scan code on the top for
8268         debugging. This will be removed once the EFI port gets stable.
8269         Correct the scan code mapping.
8271         * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
8272         allocate memory from larger regions, in order to reduce the number
8273         of allocated regions. Otherwise, the MacOSX loader panics.
8274         (filter_memory_map): Avoid less than 1MB for compatibility with
8275         other loaders.
8276         (add_memory_regions): Allocate from the tail of a region, if
8277         possible, to avoid allocating a region near to 1MB, for the MacOSX
8278         loader.
8280         * kern/efi/init.c (grub_efi_set_prefix): Specify
8281         GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
8283         * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
8284         argument IMAGE_HANDLE and specify it to get a loaded image.
8285         (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
8286         grub_efi_get_loaded_image.
8287         (grub_efi_get_filename): Divide the length by the size of
8288         grub_efi_char16_t.
8289         (grub_efi_get_device_path): New function.
8290         (grub_efi_print_device_path): Print End Device Path nodes. Divide
8291         the length by the size of grub_efi_char16_t for a file path device
8292         path node.
8294         * kern/loader.c (grub_loader_noreturn): New variable.
8295         (grub_loader_set): Accept a new argument NORETURN. Set
8296         GRUB_LOADER_NORETURN to NORETURN.
8297         All callers changed.
8298         (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
8299         grub_machine_fini.
8301         * include/grub/efi/efi.h (grub_efi_get_device_path): New
8302         prototype.
8303         (grub_efi_get_loaded_image): Take an argument to specify an image
8304         handle.
8306         * include/grub/loader.h (grub_loader_set): Added one more argument
8307         NORETURN.
8309         * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
8310         instead of grub_efi_open_protocol.
8311         (grub_efidisk_get_device_name): Likewise.
8312         (grub_efidisk_close): Print a newline.
8313         (grub_efidisk_get_device_handle): Fixed to use
8314         GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
8315         GRUB_EFI_DEVICE_PATH_TYPE.
8317         * disk/efi/efidisk.c (device_path_guid): Moved to ...
8318         * kern/efi/efi.c (device_path_guid): ... here.
8320         * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
8321         chain.mod.
8322         (kernel_mod_HEADERS): Added efi/disk.h.
8323         (_chain_mod_SOURCES): New variable.
8324         (_chain_mod_CFLAGS): Likewise.
8325         (_chain_mod_LDFLAGS): Likewise.
8326         (chain_mod_SOURCES): Likewise.
8327         (chain_mod_CFLAGS): Likewise.
8328         (chain_mod_LDFLAGS): Likewise.
8330         * DISTLIST: Added include/grub/efi/chainloader.h,
8331         loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
8333         * include/grub/efi/chainloader.h: New file.
8334         * loader/efi/chainloader.c: Likewise.
8335         * loader/efi/chainloader_normal.c: Likewise.
8337 2006-04-30  Marco Gerards  <marco@gnu.org>
8339         * commands/configfile.c (grub_cmd_source): New function.
8340         (GRUB_MOD_INIT): Register the commands `source' and `.'.
8341         (GRUB_MOD_FINI): De-register the commands `source' and `.'.
8343 2006-04-30  Marco Gerards  <marco@gnu.org>
8345         * normal/execute.c (grub_script_execute_cmd): Change the return
8346         type to `grub_err_t'.  Correctly return the error.
8347         (grub_script_execute_cmdline): In case a command line is not a
8348         command or a function, try to interpret it as an assignment.
8350 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
8352         * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
8353         (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
8354         skip a node whose name is obviously invalid as UTF-16,
8355         i.e. contains a NUL character. Stop the iteration when the last
8356         directory entry is found. Instead of using the return value of
8357         grub_hfsplus_btree_iterate_node, store the value in RET and use
8358         it, because the iterator can be stopped by the last directory
8359         entry.
8361 2006-04-30  Marco Gerards  <marco@gnu.org>
8363         * include/grub/env.h (grub_env_export): New prototype.  Reported
8364         by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
8366 2006-04-30  Marco Gerards  <marco@gnu.org>
8368         * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
8369         size of the extents in a catalog file record.
8371 2006-04-29  Marco Gerards  <marco@gnu.org>
8373         * commands/configfile.c (grub_cmd_configfile): Execute the
8374         configfile within its own context.
8376         * include/grub/env.h (grub_env_context_open): New prototype.
8377         (grub_env_context_close): Likewise.
8379         * kern/env.c (grub_env): Removed.
8380         (grub_env_sorted): Likewise.
8381         (grub_env_context): New variable.
8382         (grub_env_var_context): Likewise.
8383         (grub_env_find): Search both the active context and the global
8384         context.
8385         (grub_env_context_open): New function.
8386         (grub_env_context_close): Likewise.
8387         (grub_env_insert): Likewise.
8388         (grub_env_remove): Likewise.
8389         (grub_env_export): Likewise.
8390         (grub_env_set): Changed to use helper functions to avoid code
8391         duplication.
8392         (grub_env_iterate): Rewritten so both the current context and the
8393         global context are being used.
8395         * normal/command.c (export_command): New function.
8396         (grub_command_init): Register the `export' function.
8398 2006-04-26  Yoshinori K. Okuji  <okuji@enbug.org>
8400         * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
8401         explicitly to suppress gcc's warnings.
8402         * fs/fat.c (grub_fat_find_dir): Likewise.
8403         (grub_fat_label): Likewise.
8404         * fs/xfs.c (grub_xfs_read_inode): Likewise.
8405         (grub_xfs_mount): Likewise.
8406         (grub_xfs_label): Likewise.
8407         * fs/affs.c (grub_affs_mount): Likewise.
8408         (grub_affs_label): Likewise.
8409         (grub_affs_iterate_dir): Likewise.
8410         * fs/sfs.c (grub_sfs_mount): Likewise.
8411         (grub_sfs_iterate_dir): Likewise.
8412         * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
8413         * fs/hfs.c (grub_hfs_mount): Likewise.
8414         (grub_hfs_cmp_catkeys): Likewise.
8415         (grub_hfs_find_dir): Likewise.
8416         (grub_hfs_dir): Likewise.
8417         (grub_hfs_label): Likewise.
8418         * fs/jfs.c (grub_jfs_mount): Likewise.
8419         (grub_jfs_opendir): Likewise.
8420         (grub_jfs_getent): Likewise.
8421         (grub_jfs_lookup_symlink): Likewise.
8422         (grub_jfs_label): Likewise.
8423         * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
8424         (grub_hfsplus_iterate_dir): Likewise.
8425         (grub_hfsplus_btree_iterate_node): Made static.
8427         * util/grub-emu.c (prefix): New variable.
8428         (grub_machine_set_prefix): New function.
8429         (main): Do not set the environment variable "prefix" here. Only
8430         set PREFIX, which is used later by grub_machine_set_prefix.
8432         * include/grub/video.h: Do not include grub/symbol.h.
8433         (grub_video_register): Not exported. This symbol is not defined in
8434         the kernel.
8435         (grub_video_unregister): Likewise.
8436         (grub_video_iterate): Likewise.
8437         (grub_video_setup): Likewise.
8438         (grub_video_restore): Likewise.
8439         (grub_video_get_info): Likewise.
8440         (grub_video_get_blit_format): Likewise.
8441         (grub_video_set_palette): Likewise.
8442         (grub_video_get_palette): Likewise.
8443         (grub_video_set_viewport): Likewise.
8444         (grub_video_get_viewport): Likewise.
8445         (grub_video_map_color): Likewise.
8446         (grub_video_map_rgb): Likewise.
8447         (grub_video_map_rgba): Likewise.
8448         (grub_video_fill_rect): Likewise.
8449         (grub_video_blit_glyph): Likewise.
8450         (grub_video_blit_bitmap): Likewise.
8451         (grub_video_blit_render_target): Likewise.
8452         (grub_video_scroll): Likewise.
8453         (grub_video_swap_buffers): Likewise.
8454         (grub_video_create_render_target): Likewise.
8455         (grub_video_delete_render_target): Likewise.
8456         (grub_video_set_active_render_target): Likewise.
8458         * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
8459         Undefined.
8460         [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
8462         * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
8463         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
8464         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
8465         instead of $(srcdir)/genkernsyms.sh.
8467         * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
8468         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
8469         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
8470         instead of $(srcdir)/genkernsyms.sh.
8472         * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
8473         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
8474         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
8475         instead of $(srcdir)/genkernsyms.sh.
8477         * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
8478         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
8479         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
8480         instead of $(srcdir)/genkernsyms.sh.
8482         * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
8483         genkernsyms.sh.
8485         * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
8486         genkernsyms.sh.
8487         (gensymlist.sh): New target.
8488         (genkernsyms.sh): Likewise.
8490         * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
8491         genkernsyms.sh.in and gensymlist.sh.in.
8493         * genkernsyms.sh: Removed.
8494         * gensymlist.sh: Likewise.
8496         * genkernsyms.sh.in: New file.
8497         * gensymlist.sh.in: Likewise.
8499 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
8501         * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
8502         clobber "prefix", since we may have already set it manually.
8504 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
8506         * kern/misc.c (abort): New alias for grub_abort.
8508 2006-04-25  Yoshinori K. Okuji  <okuji@enbug.org>
8510         A new machine-specific function "grub_machine_set_prefix" is
8511         defined. This is called after loading modules, so that a prefix
8512         initialization can use modules. Also, this change adds an
8513         intensive debugging feature for the memory manager via the
8514         configure option "--enable-mm-debug".
8516         * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
8517         PART.LEN.
8519         * kern/sparc64/ieee1275/init.c (abort): Removed.
8520         (grub_stop): Likewise.
8521         (grub_exit): New function.
8522         (grub_set_prefix): Renamed to ...
8523         (grub_machine_set_prefix): ... this.
8524         (grub_machine_init): Do not call grub_set_prefix.
8526         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
8527         (grub_machine_set_prefix): ... this.
8528         (grub_machine_init): Do not call grub_set_prefix.
8530         * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
8531         (grub_machine_init): Do not set the prefix here.
8533         * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
8535         * kern/efi/init.c: Include grub/mm.h.
8536         (grub_efi_set_prefix): New function.
8538         * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
8539         (grub_efi_get_filename): New function.
8540         (grub_print_device_path): Renamed to ...
8541         (grub_efi_print_device_path): ... this.
8543         * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
8544         [MM_DEBUG] (grub_realloc): Likewise.
8545         [MM_DEBUG] (grub_free): Likewise.
8546         [MM_DEBUG] (grub_memalign): Likewise.
8547         [MM_DEBUG] (grub_mm_debug): New variable.
8548         [MM_DEBUG] (grub_debug_malloc): New function.
8549         [MM_DEBUG] (grub_debug_free): New function.
8550         [MM_DEBUG] (grub_debug_realloc): New function.
8551         [MM_DEBUG] (grub_debug_memalign): New function.
8553         * kern/misc.c (grub_abort): Print a newline to distinguish
8554         the message.
8556         * kern/main.c (grub_main): Call grub_machine_set_prefix and
8557         grub_set_root_dev after loading modules. This is necessary when
8558         setting a prefix depends on modules.
8560         * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
8561         (grub_efi_print_device_path): ... this.
8562         (grub_efi_get_filename): New prototype.
8563         (grub_efi_set_prefix): Likewise.
8565         * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
8566         and grub/disk.h.
8567         (grub_efidisk_get_device_handle): New prototype.
8568         (grub_efidisk_get_device_name): Likewise.
8570         * include/grub/mm.h: Include config.h.
8571         (MM_DEBUG): Removed.
8572         [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
8573         [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
8574         [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
8575         [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
8576         [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
8577         [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
8578         [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
8579         [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
8580         [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
8582         * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
8584         * disk/efi/efidisk.c: Include grub/partition.h.
8585         (iterate_child_devices): New function.
8586         (add_device): First, compare only last device path nodes, so that
8587         devices are sorted by the types.
8588         (grub_efidisk_get_device_handle): New function.
8589         (grub_efidisk_get_device_name): Likewise.
8591         * configure.ac (--enable-mm-debug): New option to enable the
8592         memory manager debugging feature. This makes the binary much
8593         bigger, so is disabled by default.
8595 2006-04-23  Yoshinori K. Okuji  <okuji@enbug.org>
8597         Use grub_abort instead of grub_stop, and grub_exit must be
8598         define in each architecture now. Also, this change adds support
8599         for EFI disks.
8601         * util/i386/pc/grub-probefs.c: Include grub/term.h.
8602         (grub_getkey): New function.
8603         (grub_term_get_current): Likewise.
8605         * util/i386/pc/grub-setup.c: Include grub/term.h.
8606         (grub_getkey): New function.
8607         (grub_term_get_current): Likewise.
8609         * util/misc.c (grub_stop): Renamed to ...
8610         (grub_exit): ... this.
8612         * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
8613         (grub_exit): ... this.
8614         (grub_machine_init): Use grub_abort instead of abort.
8615         (grub_stop): Removed.
8617         * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
8618         abort.
8620         * kern/i386/pc/startup.S (grub_exit): New function.
8621         (cold_reboot): New label.
8623         * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
8624         (grub_efi_init): Call grub_efidisk_init.
8625         (grub_efi_fini): Call grub_efidisk_fini.
8627         * kern/efi/efi.c: Include grub/mm.h.
8628         (grub_efi_console_control_guid): Renamed to ...
8629         (console_control_guid): ... this.
8630         (grub_efi_loaded_image_guid): Renamed to ...
8631         (loaded_image_guid): ... this.
8632         (grub_efi_locate_handle): New function.
8633         (grub_efi_open_protocol): Likewise.
8634         (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
8635         GRUB_EFI_CONSOLE_CONTROL_GUID.
8636         (grub_efi_exit): Removed.
8637         (grub_stop): Likewise.
8638         (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
8639         (grub_exit): New function.
8640         (grub_print_device_path): Likewise.
8642         * kern/rescue.c (grub_rescue_cmd_exit): New function.
8643         (grub_enter_rescue_mode): Register "exit".
8645         * kern/misc.c (grub_real_dprintf): A cosmetic change.
8646         (grub_abort): New function.
8648         * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
8650         * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
8652         * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
8654         * include/grub/efi/efi.h (grub_efi_exit): Removed.
8655         (grub_print_device_path): New prototype.
8656         (grub_efi_locate_handle): Likewise.
8657         (grub_efi_open_protocol): Likewise.
8659         * include/grub/efi/disk.h (grub_efidisk_fini): New file.
8660         * disk/efi/efidisk.c: Likewise.
8662         * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
8664         * include/grub/efi/console_control.h
8665         (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
8667         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
8668         last 8 bytes as an array.
8669         (GRUB_EFI_DISK_IO_GUID): New macro.
8670         (GRUB_EFI_BLOCK_IO_GUID): Likewise.
8671         (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
8672         (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
8673         grub_uint8_t.
8674         (struct grub_efi_guid): Use an array to specify the last 8 bytes.
8675         (struct grub_efi_device_path): Rename the member "sub_type" to
8676         "subtype".
8677         (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
8678         (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
8679         (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
8680         (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
8681         (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
8682         (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
8683         (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
8684         (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
8685         (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
8686         (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
8687         (struct grub_efi_pci_device_path): New structure.
8688         (grub_efi_pci_device_path_t): New type.
8689         (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
8690         (struct grub_efi_pccard_device_path): New structure.
8691         (grub_efi_pccard_device_path_t): New type.
8692         (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
8693         (struct grub_efi_memory_mapped_device_path): New structure.
8694         (grub_efi_memory_mapped_device_path_t): New type.
8695         (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
8696         (struct grub_efi_vendor_device_path): New structure.
8697         (grub_efi_vendor_device_path_t): New type.
8698         (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
8699         (struct grub_efi_controller_device_path): New structure.
8700         (grub_efi_controller_device_path_t): New type.
8701         (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
8702         (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
8703         (struct grub_efi_acpi_device_path): New structure.
8704         (grub_efi_acpi_device_path_t): New type.
8705         (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
8706         (struct grub_efi_expanded_acpi_device_path): New structure.
8707         (grub_efi_expanded_acpi_device_path_t): New type.
8708         (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
8709         (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
8710         (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
8711         (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
8712         (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
8713         (struct grub_efi_atapi_device_path): New structure.
8714         (grub_efi_atapi_device_path_t): New type.
8715         (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
8716         (struct grub_efi_fibre_channel_device_path): New structure.
8717         (grub_efi_fibre_channel_device_path_t): New type.
8718         (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
8719         (struct grub_efi_1394_device_path): New structure.
8720         (grub_efi_1394_device_path_t): New type.
8721         (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
8722         (struct grub_efi_usb_device_path): New structure.
8723         (grub_efi_usb_device_path_t): New type.
8724         (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
8725         (struct grub_efi_usb_class_device_path): New structure.
8726         (grub_efi_usb_class_device_path_t): New type.
8727         (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
8728         (struct grub_efi_i2o_device_path): New structure.
8729         (grub_efi_i2o_device_path_t): New type.
8730         (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
8731         (struct grub_efi_mac_address_device_path): New structure.
8732         (grub_efi_mac_address_device_path_t): New type.
8733         (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
8734         (struct grub_efi_ipv4_device_path): New structure.
8735         (grub_efi_ipv4_device_path_t): New type.
8736         (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
8737         (struct grub_efi_ipv6_device_path): New structure.
8738         (grub_efi_ipv6_device_path_t): New type.
8739         (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
8740         (struct grub_efi_infiniband_device_path): New structure.
8741         (grub_efi_infiniband_device_path_t): New type.
8742         (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
8743         (struct grub_efi_uart_device_path): New structure.
8744         (grub_efi_uart_device_path_t): New type.
8745         (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
8746         (struct grub_efi_vendor_messaging_device_path): New structure.
8747         (grub_efi_vendor_messaging_device_path_t): New type.
8748         (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
8749         (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
8750         (struct grub_efi_hard_drive_device_path): New structure.
8751         (grub_efi_hard_drive_device_path_t): New type.
8752         (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
8753         (struct grub_efi_cdrom_device_path): New structure.
8754         (grub_efi_cdrom_device_path_t): New type.
8755         (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
8756         (struct grub_efi_vendor_media_device_path): New structure.
8757         (grub_efi_vendor_media_device_path_t): New type.
8758         (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
8759         (struct grub_efi_file_path_device_path): New structure.
8760         (grub_efi_file_path_device_path_t): New type.
8761         (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
8762         (struct grub_efi_protocol_device_path): New structure.
8763         (grub_efi_protocol_device_path_t): New type.
8764         (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
8765         (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
8766         (struct grub_efi_bios_device_path): New structure.
8767         (grub_efi_bios_device_path_t): New type.
8768         (struct grub_efi_disk_io): New structure.
8769         (grub_efi_disk_io_t): New type.
8770         (struct grub_efi_block_io_media): New structure.
8771         (grub_efi_block_io_media_t): New type.
8772         (struct grub_efi_block_io): New structure.
8773         (grub_efi_block_io_t): New type.
8775         * include/grub/misc.h (grub_stop): Removed.
8776         (grub_exit): New prototype.
8777         (grub_abort): Likewise.
8779         * include/grub/disk.h (enum grub_disk_dev_id): Added
8780         GRUB_DISK_DEVICE_EFIDISK_ID.
8782         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
8783         disk/efi/efidisk.c.
8784         (kernel_syms.lst): Remove the target if an error occurs.
8786 2006-04-22  Yoshinori K. Okuji  <okuji@enbug.org>
8788         * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
8789         as it was simply too buggy.
8791 2006-04-21  Yoshinori K. Okuji  <okuji@enbug.org>
8793         * kern/misc.c (grub_lltoa): New function.
8794         (grub_vsprintf): Added support for the long long suffix,
8795         i.e. "ll".
8797 2006-04-20  Hollis Blanchard  <hollis@penguinppc.org>
8799         * Makefile.in (LDFLAGS): Add variable.
8800         (LD): Remove variable.
8801         * configure.ac: Add -m32 to LDFLAGS.
8802         * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
8803         * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
8804         (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
8805         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
8806         suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
8807         variables.
8808         * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
8809         * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
8810         * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
8812 2006-04-20  Vesa Jaaskelainen  <chaac@nic.fi>
8814         * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
8815         length for unknown glyph.
8817 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
8819         Add support for pre-loaded modules into the EFI port.
8821         * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
8822         completely. Accept one more argument DIR. The caller has changed.
8824         * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
8826         * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
8827         (grub_efi_loaded_image_guid): New variable.
8828         (grub_efi_get_loaded_image): New function.
8829         (grub_arch_modules_addr): Likewise.
8831         * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
8832         prototype.
8834         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
8835         (struct grub_efi_loaded_image): New structure.
8836         (grub_efi_loaded_image_t): New type.
8838 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
8840         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
8841         size with GRUB_OS_AREA_SIZE as grub_size_t instead of
8842         grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
8844 2006-04-19  Roger Leigh  <rleigh@whinlatter.ukfsn.org>
8846         * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
8848 2006-04-19  Yoshinori K. Okuji  <okuji@enbug.org>
8850         * DISTLIST: Added include/grub/efi/console.h,
8851         include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
8852         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
8854         * include/grub/efi/console.h: New file.
8855         * include/grub/efi/time.h: Likewise.
8856         * include/grub/i386/efi/kernel.h: Likewise.
8857         * kern/efi/init.c: Likewise.
8858         * kern/efi/mm.c: Likewise.
8859         * term/efi/console.c: Likewise.
8861         * kern/i386/efi/init.c: Do not include grub/machine/time.h.
8862         (grub_stop): Removed.
8863         (grub_get_rtc): Likewise.
8864         (grub_machine_init): Simply call grub_efi_init.
8865         (grub_machine_fini): Call grub_efi_fini.
8867         * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
8868         (grub_efi_output_string): Removed.
8869         (grub_efi_stall): New function.
8870         (grub_stop): Likewise.
8871         (grub_get_rtc): Likewise.
8873         * include/grub/efi/efi.h (grub_efi_output_string): Removed.
8874         (grub_efi_stall): New prototype.
8875         (grub_efi_allocate_pages): Likewise.
8876         (grub_efi_free_pages): Likewise.
8877         (grub_efi_get_memory_map): Likewise.
8878         (grub_efi_mm_init): Likewise.
8879         (grub_efi_mm_fini): Likewise.
8880         (grub_efi_init): Likewise.
8881         (grub_efi_fini): Likewise.
8883         * include/grub/i386/efi/time.h: Do not include
8884         grub/symbol.h. Include grub/efi/time.h.
8885         (GRUB_TICKS_PER_SECOND): Removed.
8886         (grub_get_rtc): Likewise.
8888         * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
8889         Added padding. The EFI spec is buggy.
8890         (GRUB_EFI_BLACK): New macro.
8891         (GRUB_EFI_BLUE): Likewise.
8892         (GRUB_EFI_GREEN): Likewise.
8893         (GRUB_EFI_CYAN): Likewise.
8894         (GRUB_EFI_RED): Likewise.
8895         (GRUB_EFI_MAGENTA): Likewise.
8896         (GRUB_EFI_BROWN): Likewise.
8897         (GRUB_EFI_LIGHTGRAY): Likewise.
8898         (GRUB_EFI_BRIGHT): Likewise.
8899         (GRUB_EFI_DARKGRAY): Likewise.
8900         (GRUB_EFI_LIGHTBLUE): Likewise.
8901         (GRUB_EFI_LIGHTGREEN): Likewise.
8902         (GRUB_EFI_LIGHTCYAN): Likewise.
8903         (GRUB_EFI_LIGHTRED): Likewise.
8904         (GRUB_EFI_LIGHTMAGENTA): Likewise.
8905         (GRUB_EFI_YELLOW): Likewise.
8906         (GRUB_EFI_WHITE): Likewise.
8907         (GRUB_EFI_BACKGROUND_BLACK): Likewise.
8908         (GRUB_EFI_BACKGROUND_BLUE): Likewise.
8909         (GRUB_EFI_BACKGROUND_GREEN): Likewise.
8910         (GRUB_EFI_BACKGROUND_CYAN): Likewise.
8911         (GRUB_EFI_BACKGROUND_RED): Likewise.
8912         (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
8913         (GRUB_EFI_BACKGROUND_BROWN): Likewise.
8914         (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
8915         (GRUB_EFI_TEXT_ATTR): Likewise.
8917         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
8918         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
8919         (kernel_mod_HEADERS): Added efi/time.h.
8921 2006-04-18  Yoshinori K. Okuji  <okuji@enbug.org>
8923         * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
8924         include/grub/efi/api.h, include/grub/efi/console_control.h,
8925         include/grub/efi/efi.h, include/grub/efi/pe32.h,
8926         include/grub/i386/efi/time.h, kern/efi/efi.c,
8927         kern/i386/efi/init.c, kern/i386/efi/startup.S,
8928         and util/i386/efi/grub-mkimage.c.
8930         * Makefile.in (RMKFILES): Added i386-efi.rmk.
8932         * genmk.rb (PModule#rule): Do not export symbols if
8933         #{prefix}_EXPORTS is set to "no".
8935         * conf/i386-efi.mk: New file.
8936         * conf/i386-efi.rmk: Likewise.
8937         * include/grub/efi/api.h: Likewise.
8938         * include/grub/efi/console_control.h: Likewise.
8939         * include/grub/efi/efi.h: Likewise.
8940         * include/grub/efi/pe32.h: Likewise.
8941         * include/grub/i386/efi/time.h: Likewise.
8942         * kern/efi/efi.c: Likewise.
8943         * kern/i386/efi/init.c: Likewise.
8944         * kern/i386/efi/startup.S: Likewise.
8945         * util/i386/efi/grub-mkimage.c: Likewise.
8947 2006-04-17  Marco Gerards  <marco@gnu.org>
8949         * include/grub/script.h: Include <grub/parser.h> and
8950         "grub_script.tab.h".
8951         (struct grub_lexer_param): New struct.
8952         (struct grub_parser_param): Likewise.
8953         (grub_script_create_arglist): Pass the state in an argument.
8954         (grub_script_add_arglist): Likewise.
8955         (grub_script_create_cmdline): Likewise.
8956         (grub_script_create_cmdblock): Likewise.
8957         (grub_script_create_cmdif): Likewise.
8958         (grub_script_create_cmdmenu): Likewise.
8959         (grub_script_add_cmd): Likewise.
8960         (grub_script_arg_add): Likewise.
8961         (grub_script_lexer_ref): Likewise.
8962         (grub_script_lexer_deref): Likewise.
8963         (grub_script_lexer_record_start): Likewise.
8964         (grub_script_lexer_record_stop): Likewise.
8965         (grub_script_mem_record): Likewise.
8966         (grub_script_mem_record_stop): Likewise.
8967         (grub_script_malloc): Likewise.
8968         (grub_script_yylex): Likewise.
8969         (grub_script_yyparse): Likewise.
8970         (grub_script_yyerror): Likewise.
8971         (grub_script_yylex): Likewise.
8972         (grub_script_lexer_init): Return the state.
8974         * normal/lexer.c (grub_script_lexer_state): Removed variable.
8975         (grub_script_lexer_done): Likewise.
8976         (grub_script_lexer_getline): Likewise.
8977         (grub_script_lexer_refs): Likewise.
8978         (script): Likewise.
8979         (newscript): Likewise.
8980         (record): Likewise.
8981         (recording): Likewise.
8982         (recordpos): Likewise.
8983         (recordlen): Likewise.
8984         (grub_script_lexer_init): Return the state instead of setting
8985         global variables.
8986         (grub_script_lexer_ref): Use the newly added argument for state
8987         instead of globals.
8988         (grub_script_lexer_deref): Likewise.
8989         (grub_script_lexer_record_start): Likewise.
8990         (grub_script_lexer_record_stop): Likewise.
8991         (recordchar): Likewise.
8992         (nextchar): Likewise.
8993         (grub_script_yylex2): Likewise.
8994         (grub_script_yylex): Likewise.
8995         (grub_script_yyerror): Likewise.
8997         * normal/parser.y (func_mem): Removed variable.
8998         (menu_entry): Likewise.
8999         (err): Likewise.
9000         (%lex-param): New parser option.
9001         (%parse-param): Likewise.
9002         (script): Always return the AST.
9003         (argument): Pass the state around.
9004         (arguments): Likewise.
9005         (grubcmd): Likewise.
9006         (commands): Likewise.
9007         (function): Likewise.
9008         (menuentry): Likewise.
9009         (if_statement): Likewise.
9010         (if): Likewise.
9012         * normal/script.c (grub_script_memused): Removed variable.
9013         (grub_script_parsed): Likewise.
9014         (grub_script_malloc): Added a state argument.  Use that instead of
9015         global variables.
9016         (grub_script_mem_record): Likewise.
9017         (grub_script_mem_record_stop): Likewise.
9018         (grub_script_arg_add): Likewise.
9019         (grub_script_add_arglist): Likewise.
9020         (grub_script_create_cmdline): Likewise.
9021         (grub_script_create_cmdif): Likewise.
9022         (grub_script_create_cmdmenu): Likewise.
9023         (grub_script_add_cmd): Likewise.
9024         (grub_script_parse): Setup the state before calling the parser.
9026 2006-04-16  Marco Gerards  <marco@gnu.org>
9028         * normal/command.c (grub_command_init): Remove the title command.
9030         * normal/lexer.c (grub_script_yylex): Renamed from this...
9031         (grub_script_yylex2): ... to this.
9032         (grub_script_yylex): New function.  Temporary
9033         introduced to filter some tokens.
9034         (grub_script_yyerror): Print a newline.
9036         * normal/main.c (read_config_file): Output information about the
9037         lines that contain errors.  Wait for a key after all lines have
9038         been processed.  Don't return an empty menu.
9040         * normal/parser.y (func_mem): Don't initialize.
9041         (menu_entry): Likewise.
9042         (err): New variable.
9043         (script): Don't return anything when an error was encountered.
9044         (ws, returns): Removed rules.
9045         (argument): Disabled concatenated variable support.
9046         (arguments): Remove explicit separators.
9047         (grubcmd): Likewise.
9048         (function): Likewise.
9049         (menuentry): Likewise.
9050         (if): Likewise.
9051         (commands): Likewise.  Add error handling.
9053         * normal/script.c (grub_script_create_cmdline): If
9054         `grub_script_parsed' is 0, assume the parser encountered an error.
9056 2006-04-02  Yoshinori K. Okuji  <okuji@enbug.org>
9058         * configure.ac: Add support for EFI. Fix the typo
9059         BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
9061 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
9063         * util/unifont2pff.rb: Removed unnecessary byte ordering.  Now
9064         foreign multibyte characters should be shown correctly.
9066 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
9068         * normal/main.c (grub_normal_menu_addentry): Fixed menu size
9069         calculation.
9070         (read_config_file): Made it to close file before returning.
9072 2006-03-31  Vesa Jaaskelainen  <chaac@nic.fi>
9074         * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
9075         include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
9076         video/i386/pc/vbefill.c.
9078         * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
9079         video/i386/pc/vbefill.c.
9081         * include/grub/video.h (grub_video_blit_format): New enum.
9082         (grub_video_mode_info): Added new member blit_format.
9083         (grub_video_get_blit_format): New function prototype.
9085         * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
9086         function prototype.
9087         (grub_video_vbe_map_rgb): Likewise.
9088         (grub_video_vbe_unmap_color): Likewise.
9090         * include/grub/i386/pc/vbeblit.h: New file.
9092         * include/grub/i386/pc/vbefill.h: New file.
9094         * video/video.c (grub_video_get_blit_format): New function.
9095         (grub_video_vbe_get_video_ptr): Re-declared as non-static.
9096         (grub_video_vbe_map_rgb): Likewise.
9097         (grub_video_vbe_unmap_color): Likewise.
9099         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
9100         optimized fills.
9101         (grub_video_vbe_blit_render_target): Changed to use more optimized
9102         blits.
9103         (grub_video_vbe_setup): Added detection for optimized settings.
9104         (grub_video_vbe_create_render_target): Likewise.
9106         * video/i386/pc/vbeblit.c: New file.
9108         * video/i386/pc/vbefill.c: New file.
9110 2006-03-30  Vesa Jaaskelainen  <chaac@nic.fi>
9112         * font/manager.c (grub_font_get_glyph): Removed font fixup from
9113         here...
9115         * util/unifont2pff.rb: ... and moved it to here.  Improved argument
9116         parsing to support both hex and dec ranges.  If filename was missing
9117         show usage information.
9119 2006-03-14  Vesa Jaaskelainen  <chaac@nic.fi>
9121         * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
9122         video/video.c, commands/videotest.c.  Removed term/i386/pc/vesafb.c.
9124         * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
9125         gfxterm.mod, videotest.mod.  Removed vga.mod, vesafb.mod.
9126         (video_mod_SOURCES): Added.
9127         (video_mod_CFLAGS): Likewise.
9128         (video_mod_LDFLAGS): Likewise.
9129         (gfxterm_mod_SOURCES): Likewise.
9130         (gfxterm_mod_CFLAGS): Likewise.
9131         (gfxterm_mod_LDFLAGS): Likewise.
9132         (videotest_mod_SOURCES): Likewise.
9133         (videotest_mod_CFLAGS): Likewise.
9134         (videotest_mod_LDFLAGS): Likewise.
9135         (vesafb_mod_SOURCES): Removed.
9136         (vesafb_mod_CFLAGS): Likewise.
9137         (vesafb_mod_LDFLAGS): Likewise.
9138         (vga_mod_SOURCES): Likewise.
9139         (vga_mod_CFLAGS): Likewise.
9140         (vga_mod_LDFLAGS): Likewise.
9142         * commands/videotest.c: New file.
9144         * font/manager.c (fill_with_default_glyph): Modified to use
9145         grub_font_glyph.
9146         (grub_font_get_glyph): Likewise.
9147         (fontmanager): Renamed from this...
9148         (font_manager): ... to this.
9150         * include/grub/font.h (grub_font_glyph): Added new structure.
9151         (grub_font_get_glyph): Modified to use grub_font_glyph.
9153         * include/grub/misc.h (grub_abs): Added as inline function.
9155         * include/grub/video.h: New file.
9157         * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
9158         (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
9159         (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
9160         (grub_vbe_get_controller_info): Renamed from this...
9161         (grub_vbe_bios_get_controller_info): ... to this.
9162         (grub_vbe_get_mode_info): Renamed from this...
9163         (grub_vbe_bios_get_mode_info): ... to this.
9164         (grub_vbe_set_mode): Renamed from this...
9165         (grub_vbe_bios_set_mode): ... to this.
9166         (grub_vbe_get_mode): Renamed from this...
9167         (grub_vbe_bios_get_mode): ... to this.
9168         (grub_vbe_set_memory_window): Renamed from this...
9169         (grub_vbe_bios_set_memory_window): ... to this.
9170         (grub_vbe_get_memory_window): Renamed from this...
9171         (grub_vbe_bios_get_memory_window): ... to this.
9172         (grub_vbe_set_scanline_length): Renamed from this...
9173         (grub_vbe_set_scanline_length): ... to this.
9174         (grub_vbe_get_scanline_length): Renamed from this...
9175         (grub_vbe_bios_get_scanline_length): ... to this.
9176         (grub_vbe_set_display_start): Renamed from this...
9177         (grub_vbe_bios_set_display_start): ... to this.
9178         (grub_vbe_get_display_start): Renamed from this...
9179         (grub_vbe_bios_get_display_start): ... to this.
9180         (grub_vbe_set_palette_data): Renamed from this...
9181         (grub_vbe_bios_set_palette_data): ... to this.
9182         (grub_vbe_set_pixel_rgb): Removed.
9183         (grub_vbe_set_pixel_index): Likewise.
9185         * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
9186         from this...
9187         (grub_vbe_bios_get_controller_info): ... to this.
9188         (grub_vbe_get_mode_info): Renamed from this...
9189         (grub_vbe_bios_get_mode_info): ... to this.
9190         (grub_vbe_set_mode): Renamed from this...
9191         (grub_vbe_bios_set_mode): ... to this.
9192         (grub_vbe_get_mode): Renamed from this...
9193         (grub_vbe_bios_get_mode): ... to this.
9194         (grub_vbe_set_memory_window): Renamed from this...
9195         (grub_vbe_bios_set_memory_window): ... to this.
9196         (grub_vbe_get_memory_window): Renamed from this...
9197         (grub_vbe_bios_get_memory_window): ... to this.
9198         (grub_vbe_set_scanline_length): Renamed from this...
9199         (grub_vbe_set_scanline_length): ... to this.
9200         (grub_vbe_get_scanline_length): Renamed from this...
9201         (grub_vbe_bios_get_scanline_length): ... to this.
9202         (grub_vbe_set_display_start): Renamed from this...
9203         (grub_vbe_bios_set_display_start): ... to this.
9204         (grub_vbe_get_display_start): Renamed from this...
9205         (grub_vbe_bios_get_display_start): ... to this.
9206         (grub_vbe_set_palette_data): Renamed from this...
9207         (grub_vbe_bios_set_palette_data): ... to this.
9208         (grub_vbe_bios_get_controller_info): Fixed problem with registers
9209         getting corrupted after calling it.  Added more pushes and pops.
9210         (grub_vbe_bios_set_mode): Likewise.
9211         (grub_vbe_bios_get_mode): Likewise.
9212         (grub_vbe_bios_get_memory_window): Likewise.
9213         (grub_vbe_bios_set_scanline_length): Likewise.
9214         (grub_vbe_bios_get_scanline_length): Likewise.
9215         (grub_vbe_bios_get_display_start): Likewise.
9216         (grub_vbe_bios_set_palette_data): Likewise.
9218         * normal/cmdline.c (cl_set_pos): Refresh the screen.
9219         (cl_insert): Likewise.
9220         (cl_delete): Likewise.
9222         * term/gfxterm.c: New file.
9224         * term/i386/pc/vesafb.c: Removed file.
9226         * video/video.c: New file.
9228         * video/i386/pc/vbe.c (real2pm): Added new function.
9229         (grub_video_vbe_draw_pixel): Likewise.
9230         (grub_video_vbe_get_video_ptr): Likewise.
9231         (grub_video_vbe_get_pixel): Likewise
9232         (grub_video_vbe_init): Likewise.
9233         (grub_video_vbe_fini): Likewise.
9234         (grub_video_vbe_setup): Likewise.
9235         (grub_video_vbe_get_info): Likewise.
9236         (grub_video_vbe_set_palette): Likewise.
9237         (grub_video_vbe_get_palette): Likewise.
9238         (grub_video_vbe_set_viewport): Likewise.
9239         (grub_video_vbe_get_viewport): Likewise.
9240         (grub_video_vbe_map_color): Likewise.
9241         (grub_video_vbe_map_rgb): Likewise.
9242         (grub_video_vbe_map_rgba): Likewise.
9243         (grub_video_vbe_unmap_color): Likewise.
9244         (grub_video_vbe_fill_rect): Likewise.
9245         (grub_video_vbe_blit_glyph): Likewise.
9246         (grub_video_vbe_blit_bitmap): Likewise.
9247         (grub_video_vbe_blit_render_target): Likewise.
9248         (grub_video_vbe_scroll): Likewise.
9249         (grub_video_vbe_swap_buffers): Likewise.
9250         (grub_video_vbe_create_render_target): Likewise.
9251         (grub_video_vbe_delete_render_target): Likewise.
9252         (grub_video_vbe_set_active_render_target): Likewise.
9253         (grub_vbe_set_pixel_rgb): Remove function.
9254         (grub_vbe_set_pixel_index): Likewise.
9255         (index_color_mode): Remove static variable.
9256         (active_mode): Likewise.
9257         (framebuffer): Likewise.
9258         (bytes_per_scan_line): Likewise.
9259         (grub_video_vbe_adapter): Added new static variable.
9260         (framebuffer): Likewise.
9261         (render_target): Likewise.
9262         (initial_mode): Likewise.
9263         (mode_in_use): Likewise.
9264         (mode_list): Likewise.
9266 2006-03-10  Marco Gerards  <marco@gnu.org>
9268         * configure.ac (AC_INIT): Bumped to 1.93.
9270         * DISTLIST: Added `include/grub/hfs.h'.
9272 2006-02-01  Yoshinori K. Okuji  <okuji@enbug.org>
9274         * boot/i386/pc/boot.S (general_error): Before looping, try INT
9275         18H, which might help the BIOS falling back to next boot media.
9277 2006-01-25  Yoshinori K. Okuji  <okuji@enbug.org>
9279         * util/i386/pc/grub-install.in: Escape a backslash. Reported by
9280         Poe Chen <poe.poechen@gmail.com>.
9282 2006-01-17  Marco Gerards  <marco@gnu.org>
9284         * include/grub/normal.h: Include <grub/script.h>.
9285         (grub_command_list): Removed struct.
9286         (grub_command_list_t): Removed type.
9287         (grub_menu_entry): Remove members `num' and `command_list'.  Add
9288         members `commands' and `sourcecode'.
9289         * include/grub/script.h: Add inclusion guards.
9290         (grub_script_cmd_menuentry): New struct.
9291         (grub_script_execute_menuentry): New prototype.
9292         (grub_script_lexer_record_start): Likewise.
9293         (grub_script_lexer_record_stop): Likewise.
9294         * normal/execute.c (grub_script_execute_menuentry): New function.
9295         * normal/lexer.c (record, recording, recordpos, recordlen): New
9296         variables.
9297         (grub_script_lexer_record_start): New function.
9298         (grub_script_lexer_record_stop): Likewise.
9299         (recordchar): Likewise.
9300         (nextchar): Likewise.
9301         (grub_script_yylex): Use `nextchar' to fetch new characters.  Use
9302         2048 as the buffer size.  Add the tokens `menuentry' and `@'.
9303         * normal/main.c: Include <grub/parser.h> and <grub/script.h>
9304         (current_menu): New variable.
9305         (free_menu): Mainly rewritten.
9306         (grub_normal_menu_addentry): New function.
9307         (read_config_file): Rewritten.
9308         * normal/menu.c (run_menu_entry): Mainly rewritten.
9309         * normal/menu_entry.c (make_screen): Rewritten the code to insert
9310         the menu entry.
9311         (run): Mainly rewritten.
9312         * normal/parser.y (menu_entry): New variable.
9313         (GRUB_PARSER_TOKEN_MENUENTRY): New token.
9314         (menuentry): New rule.
9315         (command): Add `menuentry'.
9316         (if_statement): Allow additional returns before `fi'.
9317         * normal/script.c (grub_script_create_cmdmenu): New function.
9319 2006-01-03  Marco Gerards  <marco@gnu.org>
9321         * INSTALL: GNU Bison is required.
9322         * configure.ac: Rewritten the test to detect Bison.
9323         * Makefile.in (YACC): New variable.  Reported by Xun Sun
9324         <xun.sun.cn@gmail.com>.
9326 2006-01-03  Marco Gerards  <marco@gnu.org>
9328         * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
9329         the HFS+ filesystem to filesystem blocks.
9330         (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
9331         GCC warning is silenced.
9333 2006-01-03  Marco Gerards  <marco@gnu.org>
9335         * partmap/apple.c (apple_partition_map_iterate): Convert the data
9336         read from disk from big endian to host byte order.
9338 2006-01-03  Hollis Blanchard  <hollis@penguinppc.org>
9340         * fs/hfs.c: Include <grub/hfs.h>.  Added reference to the official
9341         documentation.
9342         (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
9343         (grub_hfs_mount): Grammar fix in error. Make sure this is not an
9344         embedded HFS+ filesystem.
9345         (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
9346         (grub_hfs_sblock): Move from here...
9347         * include/grub/hfs.h: To here...  New file.
9348         * fs/hfsplus.c: Include <grub/hfs.h>.  Added reference to the official
9349         documentation.
9350         (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
9351         New macros.
9352         (grub_hfsplus_volheader): Change type of member `magic' to
9353         `grub_uint16_t'.
9354         (grub_hfsplus_data): Add new member `embedded_offset'.
9355         (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
9356         returned block.
9357         (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
9358         Calculate the offset.
9360 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
9362         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
9363         Removed.
9364         (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
9366 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
9368         * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
9369         ENV->NAME is NULL after allocating ENV->VALUE.
9371 2005-12-25  Marco Gerards  <marco@gnu.org>
9373         * kern/env.c (grub_env_set): Rewritten the error handling code.
9375 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
9377         * geninit.sh: Made more robust, and more portable.
9379 2005-12-25  Marco Gerards  <marco@gnu.org>
9381         Add support for Apple HFS+ filesystems.
9383         * fs/hfsplus.c: New file.
9385         * DISTLIST: Added `fs/hfsplus.c'.
9387         * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
9388         (hfsplus_mod_SOURCES): New variable.
9389         (hfsplus_mod_CFLAGS): Likewise.
9390         (hfsplus_mod_LDFLAGS): Likewise.
9391         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
9392         (grub_setup_SOURCES): Likewise.
9393         (grub_mkdevicemap_SOURCES): Likewise.
9394         (grub_emu_SOURCES): Likewise.
9395         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9397         * fs/fshelp.c (grub_fshelp_log2blksize): New function.
9399         * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
9401 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
9403         * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
9404         commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
9405         include/grub/parser.h, include/grub/script.h, kern/parser.c,
9406         kern/sparc64/cache.S, normal/execute.c, normal/function.c,
9407         normal/lexer.c, normal/parser.y, normal/script.c, and
9408         partmap/gpt.c.
9409         Removed kern/sparc64/cache.c.
9411         * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
9412         grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
9413         grub_emu_init.c.
9415         * configure.ac (AC_INIT): Bumped to 1.92.
9417 2005-12-24  Vesa Jaaskelainen  <chaac@nic.fi>
9419         * kern/err.c (grub_error_push): Added new function to support error
9420         stacks.
9421         (grub_error_pop): Likewise.
9422         (grub_error_stack_items): New local variable to support error stacks.
9423         (grub_error_stack_pos): Likewise.
9424         (grub_error_stack_assert): Likewise.
9425         (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
9426         stack depth.
9427         (grub_print_error): Added support to print errors from error stack.
9429         * include/grub/err.h (grub_error_push): Added function prototype.
9430         (grub_error_pop): Likewise.
9432 2005-12-09  Hollis Blanchard  <hollis@penguinppc.org>
9434         * configure.ac: Accept `powerpc64' as host_cpu.
9435         (amd64): Rename to `biarch32'.
9437         * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
9438         non-cacheline-aligned addresses.
9440         * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
9441         (grub_dl_flush_cache): Likewise.  Only call `grub_arch_sync_caches'
9442         if `size' is non-zero.
9444 2005-12-03  Marco Gerards  <mgerards@xs4all.nl>
9446         * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
9447         and `cd' to make sure the filename is not prefixed with a
9448         directory name.
9449         (pkgdata_MODULES): Add `gpt.mod'.
9450         (gpt_mod_SOURCES): New variable.
9451         (gpt_mod_CFLAGS): Likewise.
9452         (gpt_mod_LDFLAGS): Likewise.
9454         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
9456         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
9457         New macro.
9459         * partmap/gpt.c: New file.
9461         * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
9462         GPT partition map is detected.
9464 2005-12-03  Vincent Pelletier  <subdino2004@yahoo.fr>
9466         * commands/i386/pc/play.c: New file.
9467         * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
9468         (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
9469         macros.
9471 2005-11-27  Marco Gerards  <mgerards@xs4all.nl>
9473         * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
9474         ((unused))' to silence gcc warning.
9476 2005-11-26  Hollis Blanchard  <hollis@penguinppc.org>
9478         * configure.ac: Correct `AC_PROG_YACC' test.
9480 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
9482         * util/powerpc/ieee1275/grub-install.in: Run the mount point
9483         check before installing files.
9485 2005-11-22  Mike Small  <smallm@panix.com>
9487         * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
9488         number regex so multidigit numbers are recognized correctly.
9490 2005-11-22  Mike Small  <smallm@panix.com>
9492         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
9493         debugging message before attempting to claim memory.
9494         (grub_rescue_cmd_initrd): Add a claim debugging message and try
9495         multiple addresses in case of failure.
9497 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
9499         * term/tparm.c (get_space): Remove empty `if' statement.
9501         * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
9503         * kern/parser.c (check_varstate): Rename `state' to 's'.
9505 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
9507         * partmap/acorn.c: Change `unsigned' to `unsigned int'.  Move all
9508         variable definitions to the beginning of each function.  Sort stack
9509         variables by size.
9510         (find): Rename to `acorn_partition_map_find'.  Cast `grub_disk_read'
9511         `buf' argument to `char *'.
9513 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
9515         * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
9516         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
9517         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
9518         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
9519         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
9520         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
9521         configfile.mod, search.mod, gzio.mod and test.mod.
9522         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
9523         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
9524         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
9525         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
9526         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
9527         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
9528         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
9529         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
9530         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
9531         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
9532         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
9533         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
9534         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
9535         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
9536         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
9537         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
9538         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
9539         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
9540         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
9541         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
9542         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
9543         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
9544         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
9546         * conf/common.mk (grub_modules_init.lst): Use `find' instead of
9547         `grep --include'.
9548         (pkgdata_MODULES): Add test.mod.
9550 2005-11-18  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
9552         * genmk.rb: Fixed list rules moved to Makefile.in.  Recognise
9553         appending to variables with "+=".
9554         (PModule): Use full pathname to generate *.lst filenames.
9556         * Makefile.in: Fixed list rules moved from genmk.rb.
9557         (.DELETE_ON_ERROR): New special target.
9558         (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
9560         * conf/i386-pc.rmk: Include conf/common.mk.
9561         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
9562         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
9563         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
9564         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
9565         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
9566         configfile.mod, search.mod, gzio.mod and test.mod.
9567         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
9568         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
9569         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
9570         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
9571         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
9572         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
9573         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
9574         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
9575         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
9576         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
9577         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
9578         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
9579         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
9580         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
9581         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
9582         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
9583         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
9584         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
9585         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
9586         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
9587         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
9588         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
9589         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
9590         here...
9591         * conf/common.rmk: ... to here.  New file.
9593         * conf/common.mk: New file.
9595 2005-11-18  Yoshinori K. Okuji  <okuji@enbug.org>
9597         * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
9598         (grub_script.tab.c): ... here.
9600         * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
9601         (grub_script.tab.c): ... here.
9603         * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
9604         (grub_script.tab.c): ... here.
9606         * normal/command.c (grub_command_find): Fixed a memory leak of
9607         MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
9609 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
9611         * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
9612         "@" which marks the start of a comment on ARM.
9613         (VARIABLE): Likewise.
9615 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
9617         Add support for Linux/ADFS partition tables.
9619         * partmap/acorn.c: New file.
9621         * include/grub/acorn_filecore.h: Likewise.
9623         * DISTLIST: Added `partmap/acorn.c' and
9624         `include/grub/acorn_filecore.h'.
9626         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
9627         `partmap/acorn.c'.
9628         (pkgdata_MODULES): Add `acorn.mod'.
9629         (acorn_mod_SOURCES): New variable.
9630         (acorn_mod_CFLAGS): Likewise.
9632         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
9633         `partmap/acorn.c'.
9634         (pkgdata_MODULES): Add `acorn.mod'.
9635         (acorn_mod_SOURCES): New variable.
9636         (acorn_mod_CFLAGS): Likewise.
9638         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
9639         (pkgdata_MODULES): Add `acorn.mod'.
9640         (acorn_mod_SOURCES): New variable.
9641         (acorn_mod_CFLAGS): Likewise.
9642         (acorn_mod_LDFLAGS): Likewise.
9644         * include/types.h (grub_disk_addr_t): New typedef.
9646 2005-11-13  Marco Gerards  <mgerards@xs4all.nl>
9648         * geninit.sh: New file.
9650         * geninitheader.sh: Likewise.
9652         * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
9653         * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
9654         * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
9655         * commands/configfile.c (grub_configfile_init)
9656         (grub_configfile_fini): Likewise.
9657         * commands/default.c (grub_default_init, grub_default_fini):
9658         Likewise.
9659         * commands/help.c (grub_help_init, grub_help_fini): Likewise.
9660         * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
9661         * commands/search.c (grub_search_init, grub_search_fini): Likewise.
9662         * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
9663         Likewise.
9664         * commands/test.c (grub_test_init, grub_test_fini): Likewise.
9665         * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
9666         Likewise.
9667         * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
9668         * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
9669         Likewise.
9670         * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
9671         Likewise.
9672         * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
9673         Likewise.
9674         * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
9675         * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
9676         * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
9677         * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
9678         * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
9679         * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
9680         * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
9681         * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
9682         * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
9683         * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
9684         * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
9685         * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
9686         * partmap/amiga.c (grub_amiga_partition_map_init)
9687         (grub_amiga_partition_map_fini): Likewise.
9688         * partmap/apple.c (grub_apple_partition_map_init)
9689         (grub_apple_partition_map_fini): Likewise.
9690         * partmap/pc.c (grub_pc_partition_map_init)
9691         (grub_pc_partition_map_fini): Likewise.
9692         * partmap/sun.c (grub_sun_partition_map_init,
9693         grub_sun_partition_map_fini): Likewise.
9694         * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
9695         Likewise.
9697         * util/grub-emu.c: Include <grub_modules_init.h>.
9698         (main): Don't initialize and de-initialize any modules directly,
9699         use `grub_init_all' and `grub_fini_all' instead.
9701         * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
9702         `grub_vesafb_mod_init'.
9703         (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'.  Updated
9704         all users.
9705         * term/i386/pc/vga.c (grub_vga_init): Renamed to
9706         `grub_vga_mod_init'.  Updated all users.
9707         (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
9709         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
9710         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
9711         rules.
9713         * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
9714         Generate a function to initialize the module in utilities.
9715         Updated all callers.
9716         (GRUB_MOD_FINI): Add argument `name'.  Generate a function to
9717         initialize the module in utilities.  Updated all callers.
9719 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
9721         * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
9722         escape sequence and a literal ^L to clear the screen.
9724         * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
9725         when returning from Open Firmware.
9727 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
9729         * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
9730         (grub_ofconsole_height): Likewise.
9731         (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
9732         manually insert a '\n'.
9733         (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
9734         `grub_ofconsole_height'.  Return early if these are already set.
9736 2005-11-07  Vincent Pelletier  <subdino2004@yahoo.fr>
9738         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
9739         `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
9740         `normal/execute.c', `normal/lexer.c', `io/gzio.c',
9741         `kern/parser.c', `grub_script.tab.c', `normal/function.c'
9742         and `normal/script.c'.
9743         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
9744         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9745         (test_mod_SOURCES): New variable.
9746         (test_mod_CFLAGS): Likewise.
9747         (test_mod_LDFLAGS): Likewise.
9748         (pkgdata_MODULES): Add `test.mod'.
9749         (grub_script.tab.c): New rule.
9750         (grub_script.tab.h): Likewise.
9752 2005-11-07  Marco Gerards  <mgerards@xs4all.nl>
9754         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
9755         `commands/test.c', `normal/execute.c', `normal/lexer.c',
9756         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9757         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
9758         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9759         (test_mod_SOURCES): New variable.
9760         (test_mod_CFLAGS): Likewise.
9761         (pkgdata_MODULES): Add `test.mod'.
9762         (grub_script.tab.c): New rule.
9763         (grub_script.tab.h): Likewise.
9765 2005-11-06  Marco Gerards  <mgerards@xs4all.nl>
9767         Add initial scripting support.
9769         * commands/test.c: New file.
9770         * include/grub/script.h: Likewise.
9771         * normal/execute.c: Likewise.
9772         * normal/function.c: Likewise.
9773         * normal/lexer.c: Likewise.
9774         * normal/parser.y: Likewise.
9775         * normal/script.c: Likewise.
9777         * configure.ac: Add `AC_PROG_YACC' test.
9779         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
9780         `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
9781         `normal/function.c' and `normal/script.c'.
9782         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
9783         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9784         (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
9785         variables.
9786         (pkgdata_MODULES): Add `test.mod'.
9787         (grub_script.tab.c): New rule.
9788         (grub_script.tab.h): Likewise.
9790         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
9792         * include/grub/normal.h (grub_test_init): New prototype.
9793         (grub_test_fini): Likewise.
9795         * normal/command.c: Include <grub/script.h>.
9796         (grub_command_execute): Rewritten.
9798         * util/grub-emu.c (main): Call `grub_test_init' and
9799         `grub_test_fini'.
9801 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
9803         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
9804         to 0.
9805         * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
9806         there are no pending characters.
9808 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
9810         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
9811         `grub_strndup' to drop device arguments. Replace unnecessary
9812         `grub_strndup' with `grub_strdup'.
9814 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
9816         * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
9817         `debug' environment variable has been set.
9819 2005-11-02  Hollis Blanchard  <hollis@penguinppc.org>
9821         * Makefile.in (install-local): Use $(DATA).
9822         (uninstall): Likewise.
9823         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
9824         (sbin_UTILITIES): ... to here.
9825         (sbin_SCRIPTS): New variable.
9826         (grub_install_SOURCES): New variable.
9827         * util/powerpc/ieee1275/grub-install.in: New file.
9828         * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
9829         variable.
9830         (add_segments): Call `grub_util_get_path'.
9832 2005-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
9834         From Timothy Baldwin:
9835         * commands/ls.c (grub_ls_list_files): Close FILE with
9836         grub_file_close.
9837         * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
9839 2005-10-24  Marco Gerards  <mgerards@xs4all.nl>
9841         * include/grub/parser.h: New file.
9843         * kern/parser.c: Likewise.
9845         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
9846         (grub_setup_SOURCES): Likewise.
9847         (grub_probefs_SOURCES): Likewise.
9848         (grub_emu_SOURCES): Likewise.
9849         (kernel_img_HEADERS): Add `parser.h'.
9851         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
9852         (grub_emu_SOURCES): Add `kern/parser.c'.
9853         (grubof_SOURCES): Likewise.
9855         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
9856         (grubof_SOURCES): Add `kern/parser.c'.
9858         * include/grub/misc.h (grub_split_cmdline): Removed prototype.
9860         * kern/misc.c (grub_split_cmdline): Removed function.
9862         * kern/rescue.c: Include <grub/parser.h>.
9863         (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
9864         of `grub_split_cmdline'.
9866         * normal/command.c: Include <grub/parser.h>.
9867         (grub_command_execute):  Use `grub_parser_split_cmdline' instead
9868         of `grub_split_cmdline'.
9870         * normal/completion.c: Include <grub/parser.h>.
9871         (cmdline_state): New variable.
9872         (iterate_dir): End the filename with a quote depending on the
9873         command line state.
9874         (get_state): new function.
9875         (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
9876         split the arguments and determine the current argument.  When the
9877         argument string is not quoted, escape all spaces.
9879 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
9881         * normal/sparc64/setjmp.S: New file.
9883 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
9885         * include/grub/sparc64/libgcc.h: New file.
9886         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
9887         (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
9888         normal/sparc64/setjmp.c.
9890 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
9892         * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
9893         * kern/sparc64/cache.S: New file.
9894         * kern/sparc64/cache.c: Removed.
9895         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
9896         (COMMON_CFLAGS): Add -mno-app-regs.  Remove -mcpu=v9 and
9897         -mtune=ultrasparc.
9898         (COMMON_LDFLAGS): Add -melf64_sparc.
9899         (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
9900         (grubof_SOURCES): Use cache.S instead of cache.c.
9901         (grubof_LDFLAGS): Add -mno-app-regs.  Replace "-Xlinker
9902         --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
9903         (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
9904         commented though.
9905         (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
9906         (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
9907         (linux_mod_CFLAGS): Commented out.
9908         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
9909         out because module isn't built.
9910         (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
9911         (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
9912         (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
9913         (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
9914         (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
9915         (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
9916         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
9917         (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
9918         (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
9919         (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
9920         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
9921         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
9922         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
9923         (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
9925 2005-10-20  Yoshinori K. Okuji  <okuji@enbug.org>
9927         * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
9928         grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
9929         longer, because HFS should not be used on PC.
9931 2005-10-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
9933         * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
9934         consistently within the loop.
9936 2005-10-15  Marco Gerards  <mgerards@xs4all.nl>
9938         * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
9939         directory can not be read.
9941 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
9943         * configure.ac (AC_INIT): Increase the version number to 1.91.
9945         * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
9946         include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
9947         term/i386/pc/serial.c.
9949 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
9951         * kern/file.c (grub_file_seek): Seeking to an offset equal to a
9952         file size must be permitted.
9954         * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
9955         between %ah and %al.
9957 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
9959         * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
9960         grub_uint64_t.
9961         Call the hook with a NUL-terminated filename.
9962         (grub_xfs_mount): Use grub_be_to_cpu32 instead of
9963         grub_cpu_to_be32.
9965         * kern/term.c (cursor_state): New variable.
9966         (grub_term_set_current): Reset the cursor state on a new
9967         terminal.
9968         (grub_setcursor): Rewritten to use CURSOR_STATE.
9969         (grub_getcursor): New function.
9971         * include/grub/term.h (grub_getcursor): New prototype.
9973         * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
9974         integers on ARM. Reported by Timothy Baldwin
9975         <T.E.Baldwin99@members.leeds.ac.uk>.
9977 2005-10-11  Marco Gerards  <mgerards@xs4all.nl>
9979         * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
9980         allocated.
9981         (grub_sfs_dir): Likewise.
9983 2005-10-09  Marco Gerards  <mgerards@xs4all.nl>
9985         Add support for the SFS filesystem.
9987         * fs/sfs.c: New file.
9989         * DISTLIST: Added `fs/sfs.c'.
9991         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
9992         (grub_probefs_SOURCES): Likewise.
9993         (grub_emu_SOURCES): Likewise.
9994         (pkgdata_MODULES): Add `sfs.mod'.
9995         (sfs_mod_SOURCES): New variable.
9996         (sfs_mod_CFLAGS): Likewise.
9997         (sfs_mod_LDFLAGS): Likewise.
9999         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
10000         (pkgdata_MODULES): Add `sfs.mod'.
10001         (sfs_mod_SOURCES): New variable.
10002         (sfs_mod_CFLAGS): Likewise.
10004         * util/grub-emu.c (main): Call `grub_sfs_init' and
10005         `grub_sfs_fini'.
10007         * include/grub/fs.h (grub_sfs_init): New prototype.
10008         (grub_sfs_fini): Likewise.
10010 2005-10-07  Marco Gerards  <mgerards@xs4all.nl>
10012         Add support for the AFFS filesystem.
10014         * fs/affs.c: New file.
10016         * DISTLIST: Added `fs/affs.c'.
10018         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
10019         (grub_probefs_SOURCES): Likewise.
10020         (grub_emu_SOURCES): Likewise.
10021         (pkgdata_MODULES): Add `affs.mod'.
10022         (affs_mod_SOURCES): New variable.
10023         (affs_mod_CFLAGS): Likewise.
10024         (affs_mod_LDFLAGS): Likewise.
10026         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
10027         (pkgdata_MODULES): Add `affs.mod'.
10028         (affs_mod_SOURCES): New variable.
10029         (affs_mod_CFLAGS): Likewise.
10031         * util/grub-emu.c (main): Call `grub_affs_init' and
10032         `grub_affs_fini'.
10034         * include/grub/fs.h (grub_affs_init): New prototype.
10035         (grub_affs_fini): Likewise.
10037 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
10039         * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
10041 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
10043         * configure.ac: Accept `x86_64' as host_cpu.  In that case add
10044         `-m32' to CFLAGS.
10046         * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
10047         linking.
10049         * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
10050         (COMMON_LDFLAGS): New variable.
10051         (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
10052         (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
10053         (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
10054         (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
10055         (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
10056         (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
10057         (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
10058         (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
10059         (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
10060         (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
10061         (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
10062         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
10063         (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
10064         (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
10065         (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
10066         variables.
10067         (normal_mod_ASFLAGS): Add `-m32'.
10069         * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
10070         (grub_host_size_t, grub_host_ssize_t): New types.
10071         (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
10072         dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
10073         `GRUB_HOST_SIZEOF_VOID_P'.
10075         * include/grub/kernel.h (struct grub_module_header): Type of
10076         member offset changed to `grub_host_off_t'.  Type of member size
10077         changed to `grub_host_size_t'.
10078         (struct grub_module_info): Type of member offset changed to
10079         `grub_host_off_t'.  Type of member size changed to
10080         `grub_host_size_t'.
10082 2005-09-29  Yoshinori K. Okuji  <okuji@enbug.org>
10084         Make GRUB's kernel compliant to Multiboot Specification.
10086         * kern/i386/pc/startup.S (multiboot_header): New label.
10087         (multiboot_entry): Likewise.
10088         (multiboot_trampoline): Likewise.
10090         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
10091         Increased to 0x4A0.
10093         * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
10094         put parentheses after a question mark.
10095         [!GRUB_UTIL] (my_mod): New variable.
10097         * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
10099 2005-09-28  Marco Gerards  <mgerards@xs4all.nl>
10101         Adds support for the XFS filesystem.  Btrees are not supported
10102         yet.
10104         * fs/xfs.c: New file.
10106         * DISTLIST: Added `fs/xfs.c'.
10108         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
10109         (grub_probefs_SOURCES): Likewise.
10110         (grub_emu_SOURCES): Likewise.
10111         (pkgdata_MODULES): Add `xfs.mod'.
10112         (xfs_mod_SOURCES): New variable.
10113         (xfs_mod_CFLAGS): Likewise.
10115         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
10116         (pkgdata_MODULES): Add `xfs.mod'.
10117         (xfs_mod_SOURCES): New variable.
10118         (xfs_mod_CFLAGS): Likewise.
10120         * util/grub-emu.c (main): Call `grub_xfs_init' and
10121         `grub_xfs_fini'.
10123         * include/grub/fs.h (grub_xfs_init): New prototype.
10124         (grub_xfs_fini): Likewise.
10127 2005-09-18  Vesa Jaaskelainen  <chaac@nic.fi>
10129         * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
10130         color modes, allow greater than 16 colors to be configured as
10131         a default palette.
10133 2005-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
10135         * normal/completion.c (complete_arguments): Add the qualifier
10136         const into OPTIONS.
10138         From Omniflux <omniflux+lists@omniflux.com>:
10139         * include/grub/terminfo.h: New file.
10140         * include/grub/tparm.h: Likewise.
10141         * include/grub/i386/pc/serial.h: Likewise.
10142         * term/terminfo.c: Likewise.
10143         * term/tparm.c: Likewise.
10144         * term/i386/pc/serial.c: Likewise.
10145         * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
10146         serial.mod.
10147         (terminfo_mod_SOURCES): New variable.
10148         (terminfo_mod_CFLAGS): Likewise.
10149         (serial_mod_SOURCES): Likewise.
10150         (serial_mod_CFLAGS): Likewise.
10152 2005-08-31  Yoshinori K. Okuji  <okuji@enbug.org>
10154         * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
10155         boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
10156         and kern/powerpc/ieee1275/cmain.c, respectively.
10158         * boot/powerpc/ieee1275/crt0.S: Moved to ...
10159         * kern/powerpc/ieee1275/crt0.S: ... here.
10161         * boot/powerpc/ieee1275/cmain.c: Moved to ...
10162         * kern/powerpc/ieee1275/cmain.c: ... here.
10164         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
10165         kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
10166         instead of boot/powerpc/ieee1275/crt0.S and
10167         boot/powerpc/ieee1275/cmain.c, respectively.
10169         * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
10170         sectors. It was not used anyway.
10172 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
10174         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
10175         `unused parameter' warning.
10177 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
10179         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
10180         function.
10181         (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
10182         getcharwidth.
10184 2005-08-28  Marco Gerards  <metgerards@student.han.nl>
10186         * include/grub/normal.h (enum grub_completion_type): Added
10187         `GRUB_COMPLETION_TYPE_ARGUMENT'.
10189         * normal/cmdline.c (print_completion): Handle
10190         the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
10191         * normal/menu_entry.c (store_completion): Likewise.
10193         * normal/completion.c (complete_arguments): New function.
10194         (grub_normal_do_completion): Call `complete_arguments' when the
10195         current words start with a dash.
10197 2005-08-27  Marco Gerards  <metgerards@student.han.nl>
10199         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
10200         `gzio.mod' instead of `io.mod').
10202 2005-08-22  Yoshinori K. Okuji  <okuji@enbug.org>
10204         * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
10205         (DISTDIRS): Added io and video.
10206         Rewrite the search routine to make an output consistently.
10208         * DISTLIST: Added conf/sparc64-ieee1275.mk,
10209         conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
10210         include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
10211         io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
10212         kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
10213         util/powerpc/ieee1275/misc.c.
10215         * include/grub/gzio.h: New file.
10216         * io/gzio.c: Likewise.
10218         * kern/file.c (grub_file_close): Call grub_device_close only if
10219         FILE->DEVICE is not NULL.
10221         * include/grub/mm.h [!NULL] (NULL): New macro.
10223         * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
10225         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
10226         (pkgdata_MODULES): Added gzio.mod.
10227         (gzio_mod_SOURCES): New variable.
10228         (gzio_mod_CFLAGS): Likewise.
10230         * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
10231         (pkgdata_MODULES): Added gzio.mod.
10232         (gzio_mod_SOURCES): New variable.
10233         (gzio_mod_CFLAGS): Likewise.
10235         * commands/cat.c: Include grub/gzio.h.
10236         (grub_cmd_cat): Use grub_gzfile_open instead of
10237         grub_file_open.
10239         * commands/cmp.c: Include grub/gzio.h.
10240         (grub_cmd_cmp): Use grub_gzfile_open instead of
10241         grub_file_open.
10243         * loader/i386/pc/multiboot.c: Include grub/gzio.h.
10244         (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
10245         grub_file_open.
10246         (grub_rescue_cmd_module): Likewise.
10248 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
10250         * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
10251         kern/sparc64/ieee1275/init.c because it contains _start.
10252         * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
10254 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
10256         * configure.ac: Add support for sparc64 host with ieee1275
10257         firmware.
10258         * configure: Generated from configure.ac.
10259         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
10260         instead of int.
10261         (grub_ofdisk_read): Likewise.
10262         (grub_ofdisk_open): Use %p to print pointer values, and cast the
10263         pointers as (void *) to remove a warning.
10264         (grub_ofdisk_close): Likewise.
10265         (grub_ofdisk_read): Likewise.
10266         * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
10267         returns, so make it return void to remove a warning.
10268         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
10269         Corresponding prototype change.
10270         * kern/mm.c (grub_mm_init_region): Use %p to print pointer
10271         values, and cast the pointers as (void *) to remove a warning.
10272         (grub_mm_dump): Likewise.
10273         * conf/sparc64-ieee1275.mk: New file.
10274         * conf/sparc64-ieee1275.rmk: Likewise.
10275         * include/grub/sparc64/setjmp.h: Likewise.
10276         * include/grub/sparc64/types.h: Likewise.
10277         * include/grub/sparc64/ieee1275/console.h: Likewise.
10278         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
10279         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
10280         * include/grub/sparc64/ieee1275/time.h: Likewise.
10281         * kern/sparc64/cache.c: Likewise.
10282         * kern/sparc64/dl.c: Likewise.
10283         * kern/sparc64/ieee1275/init.c: Likewise.
10284         * kern/sparc64/ieee1275/openfw.c: Likewise.
10286 2005-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
10288         * util/console.c (grub_ncurses_putchar): If C is greater than
10289         0x7f, set C to a question mark.
10290         (grub_ncurses_getcharwidth): New function.
10291         (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
10292         getcharwidth.
10294         * normal/menu.c (print_entry): Made aware of Unicode. First,
10295         convert TITLE to UCS-4, and predict the cursor position by
10296         grub_getcharwidth.
10298         * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
10299         const to SRC.
10300         * kern/misc.c (grub_utf16_to_utf8): Likewise.
10302 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
10304         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
10305         the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
10306         grub_strcat.
10308         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
10309         file by the option BOOT_IMAGE. Use grub_stpcpy instead of
10310         grub_strcpy and grub_strlen. Take it into account that a space
10311         character is inserted as a delimiter.
10313 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
10315         * partmap/pc.c (pc_partition_map_iterate): Include the value of an
10316         invalid magic in the error.
10318         * commands/search.c: New file.
10320         * util/grub-emu.c (main): Call grub_search_init and
10321         grub_search_fini.
10323         * kern/rescue.c (grub_rescue_print_disks): Removed.
10324         (grub_rescue_print_devices): New function.
10325         (grub_rescue_cmd_ls): Use grub_device_iterate with
10326         grub_rescue_print_devices instead of grub_disk_dev_iterate with
10327         grub_rescue_print_disks.
10329         * kern/partition.c (grub_partition_iterate): Return the result of
10330         PARTMAP->ITERATE instead of GRUB_ERRNO.
10332         * kern/device.c: Include grub/partition.h.
10333         (grub_device_iterate): New function.
10335         * include/grub/partition.h (grub_partition_iterate): Return int
10336         instead of grub_err_t.
10338         * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
10339         prototype.
10340         [GRUB_UTIL] (grub_search_fini): Likewise.
10342         * include/grub/device.h (grub_device_iterate): New prototype.
10344         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
10345         commands/search.c.
10346         (pkgdata_MODULES): Added search.mod.
10347         (search_mod_SOURCES): New variable.
10348         (search_mod_CFLAGS): Likewise.
10350         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
10351         (pkgdata_MODULES): Added search.mod.
10352         (search_mod_SOURCES): New variable.
10353         (search_mod_CFLAGS): Likewise.
10355         * commands/ls.c (grub_ls_list_disks): Renamed to ...
10356         (grub_ls_list_devices): ... this, and use grub_device_iterate.
10357         All callers changed.
10359         * DISTLIST: Added commands/search.c.
10361 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
10363         * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
10364         conversion.
10365         (grub_getcharwidth): New function.
10367         * kern/misc.c (grub_utf8_to_ucs4): New function.
10369         * include/grub/term.h (struct grub_term): Added a new member
10370         "getcharwidth".
10371         (grub_getcharwidth): New prototype.
10373         * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
10375         * term/i386/pc/console.c (map_char): New function. Segregated from
10376         grub_console_putchar.
10377         (grub_console_putchar): Use map_char.
10378         (grub_console_getcharwidth): New function.
10379         (grub_console_term): Specified grub_console_getcharwidth as
10380         getcharwidth.
10382         * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
10383         (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
10385         * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
10386         GRUB_ERRNO.
10387         (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
10388         on grub_strtoul completely.
10389         (write_char): Declare local variables in the beginning of the
10390         function.
10391         (grub_vesafb_getcharwidth): New function.
10392         (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
10393         getcharwidth.
10395 2005-08-19  Yoshinori K. Okuji  <okuji@enbug.org>
10397         * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
10398         commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
10399         commands/i386/pc/vbetest.c.
10401         * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
10402         call grub_vbe_get_controller_info again, because the returned
10403         information is volatile.
10404         (grub_vbe_set_video_mode): Mostly rewritten.
10405         (grub_vbe_get_video_mode): Use grub_vbe_probe and use
10406         grub_vbe_status_t correctly.
10407         (grub_vbe_get_video_mode_info): Likewise.
10408         (grub_vbe_set_pixel_rgb): Use a switch statement rather than
10409         several if statements.
10411         * commands/i386/pc/vbe_list_modes.c: Renamed to ...
10412         * commands/i386/pc/vbeinfo.c: ... this.
10414         * commands/i386/pc/vbe_test.c: Renamed to ...
10415         * commands/i386/pc/vbetest.c: ... this.
10417         * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
10418         ...
10419         (grub_cmd_vbeinfo): ... this. Save video modes before
10420         iterating. Skip a video mode, if it is not available, not enough
10421         information is given or it is monochrome. Show the memory
10422         model. Leave the interpretation of MODEVAR to grub_strtoul
10423         completely.
10424         (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
10425         (GRUB_MOD_FINI): Likewise.
10427         * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
10428         (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
10429         grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
10430         duplicated grub_env_get. Leave the interpretation of MODEVAR to
10431         grub_strtoul completely.
10432         (real2pm): Removed.
10433         (GRUB_MOD_INIT): Rename vbe_test to vbetest.
10434         (GRUB_MOD_FINI): Likewise.
10436         * normal/misc.c: Include grub/mm.h.
10438         * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
10439         vbe_list_modes with vbetest.mod and vbeinfo.mod.
10440         (vbe_list_modes_mod_SOURCES): Removed.
10441         (vbe_list_modes_mod_CFLAGS): Likewise.
10442         (vbe_test_mod_SOURCES): Likewise.
10443         (vbe_test_mod_CFLAGS): Likewise.
10444         (vbeinfo_mod_SOURCES): New variable.
10445         (vbeinfo_mod_CFLAGS): Likewise.
10446         (vbetest_mod_SOURCES): Likewise.
10447         (vbetest_mod_CFLAGS): Likewise.
10449 2005-08-18  Yoshinori K. Okuji  <okuji@enbug.org>
10451         * normal/misc.c: New file.
10453         * DISTLIST: Added normal/misc.c.
10455         * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
10456         DISK to HOOK. Call HOOK with DISK.
10457         * partmap/apple.c (apple_partition_map_iterate): Likewise.
10458         * partmap/pc.c (pc_partition_map_iterate): Likewise.
10459         * partmap/sun.c (sun_partition_map_iterate): Likewise.
10461         * normal/menu_entry.c (struct screen): Added a new member
10462         "completion_shown".
10463         (completion_buffer): New global variable.
10464         (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
10465         (store_completion): New function.
10466         (complete): Likewise.
10467         (clear_completions): Likewise.
10468         (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
10469         call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
10470         a tab, call complete.
10472         * normal/completion.c (disk_dev): Removed.
10473         (print_simple_completion): Likewise.
10474         (print_partition_completion): Likewise.
10475         (print_func): New global variable.
10476         (add_completion): Do not take the arguments WHAT or PRINT any
10477         longer. Added a new argument TYPE. Instead of printing directly,
10478         call PRINT_FUNC if not NULL.
10479         All callers changed.
10480         (complete_device): Use a local variable DEV instead of
10481         DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
10482         (grub_normal_do_completion): Take a new argument HOOK. Do not
10483         initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
10484         empty string, return NULL instead.
10485         All callers changed.
10487         * normal/cmdline.c (print_completion): New function.
10489         * kern/partition.c (grub_partition_iterate): Add an argument DISK
10490         to HOOK.
10491         All callers changed.
10493         * kern/disk.c (grub_print_partinfo): Removed.
10495         * include/grub/partition.h (struct grub_partition_map): Add a new
10496         argument DISK into HOOK of ITERATE.
10497         (grub_partition_iterate): Add a new argument DISK to HOOK.
10499         * include/grub/normal.h (enum grub_completion_type): New enum.
10500         (grub_completion_type_t): New type.
10501         (GRUB_COMPLETION_TYPE_COMMAND): New constant.
10502         (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
10503         (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
10504         (GRUB_COMPLETION_TYPE_FILE): Likewise.
10505         (grub_normal_do_completion): Added a new argument HOOK.
10506         (grub_normal_print_device_info): New prototype.
10508         * include/grub/disk.h (grub_print_partinfo): Removed.
10510         * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
10511         (normal_mod_SOURCES): Likewise.
10512         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10513         (normal_mod_SOURCES): Likewise.
10515         * commands/ls.c (grub_ls_list_disks): Use
10516         grub_normal_print_device_info instead of grub_print_partinfo. Free
10517         PNAME.
10518         (grub_ls_list_files): Use grub_normal_print_device_info instead of
10519         duplicating the code.
10521 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
10523         * commands/i386/pc/vbe_list_modes.c: Update source formatting to
10524         follow GCS more precisely.
10525         * commands/i386/pc/vbe_test.c: Likewise.
10526         * include/grub/i386/pc/vbe.h: Likewise.
10527         * term/i386/pc/vesafb.c: Likewise.
10528         * video/i386/pc/vbe.c: Likewise.
10530 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
10532         * DISTLIST: Added term/i386/pc/vesafb.c
10533         DISTLIST: Added video/i386/pc/vbe.c
10534         DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
10535         DISTLIST: Added commands/i386/pc/vbe_test.c.
10536         * commands/i386/pc/vbe_list_modes.c: New file.
10537         * commands/i386/pc/vbe_test.c: Likewise.
10538         * term/i386/pc/vesafb.c: Likewise.
10539         * video/i386/pc/vbe.c: Likewise.
10540         * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
10541         (grub_vbe_probe) Added prototype.
10542         (grub_vbe_set_video_mode) Likewise.
10543         (grub_vbe_get_video_mode) Likewise.
10544         (grub_vbe_get_video_mode_info) Likewise.
10545         (grub_vbe_set_pixel_rgb) Likewise.
10546         (grub_vbe_set_pixel_index) Likewise.
10547         * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
10548         (pkgdata_MODULES): Added vesafb.mod.
10549         (pkgdata_MODULES): Added vbe_list_modes.mod.
10550         (pkgdata_MODULES): Added vbe_test.mod.
10551         (vbe_mod_SOURCES): Added.
10552         (vbe_mod_CFLAGS): Likewise.
10553         (vesafb_mod_SOURCES): Likewise.
10554         (vesafb_mod_CFLAGS): Likewise.
10555         (vbe_list_modes_mod_SOURCES): Likewise.
10556         (vbe_list_modes_mod_CFLAGS): Likewise.
10557         (vbe_test_mod_SOURCES): Likewise.
10558         (vbe_test_mod_CFLAGS): Likewise.
10560 2005-08-14  Yoshinori K. Okuji  <okuji@enbug.org>
10562         * normal/command.c (grub_command_execute): If INTERACTIVE is
10563         false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
10564         CMDLINE. Disable the pager if INTERACTIVE is true.
10565         All callers are changed.
10567         * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
10568         before reading a config file.
10569         * normal/main.c (read_config_file): Even if a command is not
10570         found, register it if it is within an entry.
10572         * util/grub-emu.c: Include sys/types.h and unistd.h.
10573         (options): Added --hold.
10574         (struct arguments): Added a new member "hold".
10575         (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
10576         missing.
10577         (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
10578         cleared by a debugger, if it is not zero.
10580         * include/grub/normal.h (grub_command_execute): Add an argument
10581         INTERACTIVE.
10583 2005-08-14  Vesa Jaaskelainen  <chaac@nic.fi>
10585         * DISTLIST: Added include/grub/i386/pc/vbe.h.
10587 2005-08-13  Yoshinori K. Okuji  <okuji@enbug.org>
10589         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
10590         program with another one, because the old one didn't detect a bug
10591         in gcc-3.4. Always use regparm 2, because the new test is still
10592         not enough for gcc-4.0. Someone must investigate a simple test
10593         case which detects a bug in gcc-4.0.
10595 2005-08-12  Yoshinori K. Okuji  <okuji@enbug.org>
10597         * DISTLIST: Added normal/completion.c.
10599         * normal/completion.c: New file.
10601         * term/i386/pc/console.c (grub_console_getwh): New function.
10602         (grub_console_term): Assign grub_console_getwh to getwh.
10604         * normal/cmdline.c (grub_tab_complete): Removed. Now the same
10605         function is defined in normal/completion.c as
10606         grub_normal_do_completion.
10607         (grub_cmdline_get): Use grub_normal_do_completion instead of
10608         grub_tab_complete.
10610         * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
10611         returns non-zero, otherwise return 0.
10612         (grub_partition_iterate): First, probe the partition map. Then,
10613         call ITERATE only for this partition map.
10615         * kern/misc.c (grub_strncmp): Rewritten.
10617         * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
10618         returns non-zero. Otherwise return 0.
10620         * include/grub/partition.h (grub_partition_map_iterate): Return
10621         int instead of void.
10623         * include/grub/normal.h (grub_normal_do_completion): New prototype.
10625         * include/grub/misc.h (grub_strncmp): Change the type of N to
10626         grub_size_t.
10628         * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
10629         of void.
10631         * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
10632         unsigned explicitly before comparing it with I.
10634         * kern/main.c (grub_env_write_root): Add the attribute unused into
10635         VAR.
10637         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
10638         normal/completion.c.
10639         (normal_mod_SOURCES): Likewise.
10640         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
10641         (normal_mod_SOURCES): Likewise.
10643         * normal/command.c (grub_iterate_commands): If ITERATE returns
10644         non-zero, return one immediately.
10646 2005-08-09  Vesa Jaaskelainen  <chaac@nic.fi>
10648         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
10649         * kern/i386/pc/startup.S: Updated Global Descriptor table's
10650         descriptions.
10651         (grub_vbe_get_controller_info): New function.
10652         (grub_vbe_get_mode_info): Likewise.
10653         (grub_vbe_set_mode): Likewise.
10654         (grub_vbe_get_mode): Likewise.
10655         (grub_vbe_set_memory_window): Likewise.
10656         (grub_vbe_get_memory_window): Likewise.
10657         (grub_vbe_set_scanline_length): Likewise.
10658         (grub_vbe_get_scanline_length): Likewise.
10659         (grub_vbe_set_display_start): Likewise.
10660         (grub_vbe_get_display_start): Likewise.
10661         (grub_vbe_set_palette_data): Likewise.
10662         * include/grub/i386/pc/vbe.h: New file.
10664 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
10666         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
10667         kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
10668         * DISTLIST: Likewise.
10669         * kern/ieee1275/of.c: Moved to ...
10670         * kern/ieee1275/ieee1275.c: ... here.
10672 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
10674         * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
10675         (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
10676         Pass 0 as `end' parameter to grub_strtoul().
10678 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
10680         * include/grub/powerpc/ieee1275/console.h: Do not include
10681         <grub/types.h>.  Do not include <grub/symbol.h>.  Remove ASM_FILE
10682         ifdef.
10683         (grub_console_cur_color): Remove i386-specific prototype.
10684         (grub_console_real_putchar): Likewise.
10685         (grub_console_checkkey): Likewise.
10686         (grub_console_getkey): Likewise.
10687         (grub_console_getxy): Likewise.
10688         (grub_console_gotoxy): Likewise.
10689         (grub_console_cls): Likewise.
10690         (grub_console_setcursor): Likewise.
10691         * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
10692         Include <grub/machine/console.h>.
10693         * term/ieee1275/ofconsole.c: Likewise.
10695 2005-08-08  Yoshinori K. Okuji  <okuji@enbug.org>
10697         * Makefile.in (LIBLZO): New variable.
10699         * configure.ac: Check for LZO version 2.
10701         * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
10702         lzo/lzo1x.h instead of lzo1x.h.
10704         * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
10705         of -llzo.
10707         * util/i386/pc/grub-setup.c (main): Do not free PREFIX
10708         twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
10710         * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
10711         copying the data from PARTITION to P.
10713 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
10715         * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
10716         negative, unload the module.
10718         * util/i386/pc/grub-setup.c (setup): The name of the PC partition
10719         map is "pc_partition_map" but not "pc".
10720         (usage): Fix the description. The options are --boot-image and
10721         --core-image but not --boot-file or --core-file.
10722         (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
10723         based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
10724         DEFAULT_DIRECTORY.
10726         * util/i386/pc/grub-install.in: Do not specify --boot-file or
10727         --core-file. Specify INSTALL_DEVICE as an argument.
10729         * util/console.c: Include config.h.
10730         [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
10731         [HAVE_NCURSES_H]: Include ncurses.h.
10732         [HAVE_CURSES_H]: Include curses.h.
10733         [!A_NORMAL] (A_NORMAL): Defined as zero.
10734         [!A_STANDOUT] (A_STANDOUT): Likewise.
10736         * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
10737         -lncurses.
10738         * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
10740         * configure.ac: Check for curses libraries and headers.
10742         * Makefile.in (LIBCURSES): New variable.
10744         * genmk.rb (Script::rule): Set the executable bits.
10746         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
10747         name of the PC partition map is "pc_partition_map" but not "pc".
10749 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
10751         * util/i386/pc/grub-install.in (grub_probefs): New variable.
10752         (modules): Likewise.
10753         (usage): Added descriptions for --modules and --grub-probefs.
10754         Handle --modules and --grub-probefs. Save the arguments in MODULES
10755         and GRUB_PROBEFS, respectively.
10756         Auto-detect a filesystem module against GRUBDIR. If the result is
10757         empty and modules are not specified explicitly, abort the
10758         installation. Add the result to MODULES.
10760         * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
10761         disk/powerpc/ieee1275/ofdisk.c,
10762         include/grub/powerpc/ieee1275/init.h and
10763         term/powerpc/ieee1275/ofconsole.c.
10764         Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
10765         term/ieee1275/ofconsole.c.
10767         * include/grub/powerpc/ieee1275/console.h: Resurrected.
10769         * COPYING: Upgraded to the latest version. Only the address of the
10770         FSF office has changed.
10772 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
10774         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
10775         kern/ieee1275.c with kern/ieee1275/of.c.
10777         * kern/ieee1275.c: Moved to ...
10778         * kern/ieee1275/of.c: ... here.
10780 2005-08-06  Yoshinori K. Okuji  <okuji@enbug.org>
10782         * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
10783         readability.
10785         * config.guess: Updated to the latest version from gnulib.
10786         * config.sub: Likewise.
10787         * install.sh: Likewise.
10788         * mkinstalldirs: Likewise.
10790         * include/grub/console.h: Removed. This file is arch-specific. Do
10791         not put this in include/grub.
10793         * include/grub/i386/pc/console.h: Resurrected.
10795         * util/console.c: Include grub/machine/console.h instead of
10796         grub/console.h.
10797         * util/grub-emu.c: Likewise.
10799 2005-08-04  Marco Gerards  <metgerards@student.han.nl>
10801         * kern/term.c (grub_putcode): Use `grub_getwh' instead of
10802         hardcoded value.
10804         From Vincent Pelletier  <subdino2004@yahoo.fr>
10805         * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
10806         Redefined to use grub_getwh.
10807         (grub_term): New member named getwh.
10808         (grub_getwh): New prototype.
10809         * kern/term.c (grub_getwh): New function.
10810         * term/i386/pc/console.c (grub_console_getwh): New function.
10811         (grub_console_term): New member `getwh'.
10812         * term/i386/pc/vga.c (grub_vga_getwh): New function.
10813         (grub_vga_term): New member `getwh'.
10814         * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
10815         grub_ssize_t.
10816         (grub_ofconsole_getw): New function.
10817         (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
10818         (grub_ofconsole_term): New field named getwh and new initial
10819         value.
10821 2005-08-03  Hollis Blanchard  <hollis@penguinppc.org>
10823         * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
10824         * include/grub/ieee1275/ieee1275.h: ... to here.  All users updated.
10825         Move `abort', `grub_reboot', and `grub_halt' prototypes ...
10826         * include/grub/powerpc/ieee1275/kernel.h: ... to here.
10827         * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
10828         of <grub/machine/ieee1275.h>.
10829         * commands/ieee1275/reboot.c: Likewise.
10830         * boot/powerpc/ieee1275/ieee1275.c: Move ...
10831         * kern/ieee1275.c: ... to here.  All users updated.  Change all
10832         parameter structs to use new type `grub_ieee1275_cell_t'.
10833         * term/powerpc/ieee1275/ofconsole.c: Move ...
10834         * term/ieee1275/ofconsole.c: ... to here.  All users updated.
10835         * disk/powerpc/ieee1275/ofdisk.c: Move ...
10836         * disk/ieee1275/ofdisk.c: ... to here.  All users updated.
10837         * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
10838         to return int.
10839         * include/grub/i386/pc/console.h: Move to include/grub/console.h.
10840         Remove unused prototypes.  All users updated.
10841         * include/grub/powerpc/ieee1275/console.h: Removed.
10842         * include/grub/powerpc/ieee1275/ieee1275.h: Define
10843         `grub_ieee1275_cell_t'.
10844         * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
10845         Cast comparisons with -1 to the correct type.
10846         * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
10847         type to match `grub_ieee1275_entry_fn'.
10849 2005-08-01  Yoshinori K. Okuji  <okuji@enbug.org>
10851         * DISTLIST: Added util/i386/pc/grub-probefs.c.
10853         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
10854         (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
10855         partmap/sun.c.
10856         (grub_probefs_SOURCES): New variable.
10858         * util/i386/pc/grub-probefs.c: New file.
10860         * util/i386/pc/grub-setup.c (main): Call
10861         grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
10862         grub_hfs_init and grub_jfs_init to initialize the system. Call
10863         grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
10864         grub_pc_partition_map_fini to finish the system.
10866 2005-07-31  Yoshinori K. Okuji  <okuji@enbug.org>
10868         * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
10869         function.
10870         (grub_multiboot_load_elf32): Likewise.
10871         (grub_multiboot_is_elf64): Likewise.
10872         (grub_multiboot_load_elf64): Likewise.
10873         (grub_multiboot_load_elf): Likewise.
10874         (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
10875         an ELF32 or ELF64 file.
10876         This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
10878         From Serbinenko Vladimir <serbinenko.vova@list.ru>:
10879         * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
10880         NULL before calling FS->LABEL.
10881         * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
10882         * commands/ls.c (grub_ls_list_files): Show labels, if possible.
10883         (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
10884         before calling FS->LABEL.
10886 2005-07-26  Yoshinori K. Okuji  <okuji@enbug.org>
10888         * util/i386/pc/grub-install.in (datadir): New variable.
10889         (libdir): Removed.
10890         (pkgdatadir): New variable.
10891         (pkglibdir): Removed.
10893 2005-07-24  Yoshinori K. Okuji  <okuji@enbug.org>
10895         * DISTLIST: Added util/i386/pc/grub-install.in.
10897         * util/i386/pc/grub-install.in: New file.
10899         * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
10900         (grub_install_SOURCES): Likewise.
10902         * genmk.rb: Added support for scripts.
10903         (Script): New class.
10904         (scripts): New variable.
10906         * Makefile.in (install-local): Install sbin_SCRIPTS by
10907         INSTALL_SCRIPT.
10908         (uninstall): Remove sbin_SCRIPTS.
10910         * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
10911         device, try to get a GRUB device by
10912         grub_util_biosdisk_get_grub_dev.
10913         Free DEST_DEV.
10915         * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
10916         description for --device-map.
10918 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
10920         Change the semantics of variable hooks. They now return strings
10921         instead of error values.
10923         * util/i386/pc/grub-setup.c: Include grub/env.h.
10924         (setup): Use grub_device_set_root instead of grub_env_set.
10926         * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
10927         grub_env_get instead of grub_device_set_root and
10928         grub_device_get_root, respectively.
10930         * kern/main.c (grub_env_write_root): New function.
10931         (grub_set_root_dev): Register grub_env_write_hook for "root". Use
10932         grub_env_set instead of grub_device_set_root.
10934         * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
10935         many variables.
10936         (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
10937         rather than calling ENV->WRITE_HOOK afterwards.
10938         (grub_env_get): Return the result of ENV->READ_HOOK rather than
10939         passing a pointer of a pointer.
10940         (grub_register_variable_hook): Change the types of "read_hook" and
10941         "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
10942         respectively.
10943         Allocate the default empty string on the heap, because this string
10944         may be freed later.
10946         * kern/device.c: Include grub/env.h.
10947         (grub_device_set_root): Removed.
10948         (grub_device_get_root): Likewise.
10949         (grub_device_open): Use grub_env_get instead of
10950         grub_device_get_root.
10952         * include/grub/env.h (grub_env_read_hook_t): New type.
10953         (grub_env_write_hook_t): Likewise.
10954         (grub_env_var): Change the types of "read_hook" and "write_hook"
10955         to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
10956         (grub_register_variable_hook): Likewise.
10958         * include/grub/device.h (grub_device_set_root): Removed.
10959         (grub_device_set_root): Likewise.
10961         * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
10962         make sure that DIRNAME terminates with '/', so that
10963         grub_fat_find_dir will fail if PATH is not a directory.
10965         * commands/ls.c (grub_ls_list_files): Remove the qualifier const
10966         from DIRNAME.
10967         Use the qualifier auto for print_files and print_files_long.
10968         If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
10969         as a regular file.
10970         Put a newline only if there is no error.
10971         (grub_cmd_ls): Remove grub_ls_print_files, because this is not
10972         used.
10974 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
10976         * kern/partition.c (grub_partition_probe): Initialize PART to
10977         NULL. Otherwise, when no partition map is registered, this returns
10978         a garbage.
10980 2005-07-19  Yoshinori K. Okuji  <okuji@enbug.org>
10982         * partmap/apple.c (apple_partition_map_iterate): Check if POS
10983         equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
10984         valid.
10986 2005-07-18  Yoshinori K. Okuji  <okuji@enbug.org>
10988         * commands/ls.c (grub_ls_list_disks): Print the filesystem
10989         information on each device, if it does not have partitions. Print
10990         "Device" instead of "Disk", because this function is not specific
10991         to disk devices.
10993         * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
10994         static to ensure that it is put on the memory rather than a
10995         register.
10997 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
10999         * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
11000         (grub_cat_init): Likewise.
11001         * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
11002         (options): Likewise.
11003         * commands/configfile.c (GRUB_MOD_INIT): Likewise.
11004         (grub_configfile_init): Likewise.
11005         * font/manager.c (GRUB_MOD_INIT): Likewise.
11006         * commands/help.c (GRUB_MOD_INIT): Likewise.
11007         (grub_help_init): Likewise.
11008         * normal/command.c (grub_command_init): Likewise.
11009         * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
11010         * disk/loopback.c (grub_loop_init): Likewise.
11011         (GRUB_MOD_INIT): Likewise.
11012         * commands/ls.c (grub_ls_init): Likewise.
11013         (GRUB_MOD_INIT): Likewise.
11014         (options): Likewise.
11015         * commands/boot.c (grub_boot_init): Likewise.
11016         (GRUB_MOD_INIT): Likewise.
11017         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
11018         * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
11019         (GRUB_MOD_INIT): Likewise.
11020         * commands/cmp.c (grub_cmp_init): Likewise.
11021         (GRUB_MOD_INIT): Likewise.
11023         * normal/arg.c: Use <> instead of "" to include header files.
11024         (SHORT_ARG_HELP): New macro.
11025         (SHORT_ARG_USAGE): Likewise.
11026         (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
11027         of 'h' and 'u' for help and usage, respectively. Use more GNU-like
11028         descriptions.
11029         (find_short): Check if C is 'h' or 'u' explicitly.
11030         (grub_arg_show_help): Use space characters instead of tabs. Treat
11031         SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
11032         are shown with --help and --usage only if they are not used for
11033         the command itself.
11034         (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
11035         'h' and 'u'.
11037         * include/grub/arg.h (struct grub_arg_option): Add the qualifier
11038         const into "longarg". Change the type of "shortarg" to int.
11040 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
11042         * boot/i386/pc/boot.S (boot_drive_check): New label.
11044         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
11045         macro.
11047         * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
11048         which do not pass a boot drive correctly. Copied from GRUB Legacy.
11050 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
11052         * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
11053         When turning off Gate A20, skip the check and return immediately,
11054         because this is not fatal usually.
11056 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
11058         * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
11059         be 0x7C00 instead of 0x8000.
11061         * boot/i386/pc/pxeboot.S: Rewritten.
11063         * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
11064         EXT_C.
11065         (gate_a20_check_state): Read a byte from 0x108000. Invert the
11066         result.
11068 2005-07-16  Yoshinori K. Okuji  <okuji@enbug.org>
11070         * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
11071         robustness. This routine now supports a BIOS call and System
11072         Control Port A to modify the gate A20.
11074         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
11075         Increased to 0x440.
11077 2005-07-12  Hollis Blanchard  <hollis@penguinppc.org>
11079         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
11080         device path and resulting ihandle.
11081         (grub_ofdisk_close): dprintf the ihandle being closed.
11082         (grub_ofdisk_read): dprintf function parameters.
11083         * kern/mm.c (grub_mm_init_region): Likewise.
11084         * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
11085         (grub_linux_boot): dprintf the Linux entry point, initrd address and
11086         size, and boot arguments.
11087         (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
11088         before loading into memory.
11089         (grub_rescue_cmd_initrd): dprintf the initrd's address and size
11090         before loading into memory.
11092 2005-07-12  Yoshinori K. Okuji  <okuji@enbug.org>
11094         * kern/mm.c: Added much documentation.
11095         (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
11096         8, set to 5 instead of 8.
11098 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
11100         * DISTLIST: Added util/i386/pc/grub-mkimage.c.
11102         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
11103         (grub_mkdevicemap_SOURCES): New variable.
11105         * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
11106         lib/device.c of GRUB Legacy.
11108 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
11110         * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
11111         instead of PATH is NULL.
11113 2005-07-09  Vincent Pelletier  <subdino2004@yahoo.fr>
11115         * commands/cmp.c (BUFFER_SIZE): New macro.
11116         (grub_cmd_cmp): Close the right file at the right time.  Compare
11117         only data just read.  Don't report files of different  size as
11118         identical.  Dynamically allocate buffers.  Move variable
11119         declarations at the beginning of function.
11121 2005-07-09  Yoshinori Okuji  <okuji@enbug.org>
11123         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
11124         reverse.
11126 2004-07-04  Vincent Pelletier  <subdino2004@yahoo.fr>
11128         * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
11129         when backspace is pressed at beginning of line.
11131 2005-07-03  Yoshinori Okuji  <okuji@enbug.org>
11133         * DISTLIST: Added genfslist.sh.
11135         * normal/main.c (fs_module_list): New variable.
11136         (autoload_fs_module): New function.
11137         (read_fs_list): Likewise.
11138         (grub_normal_execute): Call read_fs_list.
11140         * kern/fs.c (grub_fs_autoload_hook): New variable.
11141         (grub_fs_probe): Added support for auto-loading.
11143         * include/grub/normal.h (struct grub_fs_module_list): New struct.
11144         (grub_fs_module_list_t): New type.
11146         * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
11147         (grub_fs_autoload_hook): New prototype.
11149         * genfslist.sh: New file.
11151         * genmk.rb: Added a rule to generate a filesystem list.
11153 2005-06-30  Marco Gerards  <metgerards@student.han.nl>
11155         * configure.ac: Fix the test for cross-compiling.
11157         * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'.  Don't
11158         define GRUB_UTIL anymore.
11160         * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
11161         so this function works on other systems than just big endian.
11162         (load_modules): Likewise.
11163         (add_segments): Likewise.
11165 2005-06-23  Hollis Blanchard  <hollis@penguinppc.org>
11167         * kern/misc.c (grub_vsprintf): Add `longfmt'.  If format string
11168         contains `l' modifier, get a long from va_arg().
11170 2005-06-23  Yoshinori K. Okuji  <okuji@enbug.org>
11172         * kern/mm.c (grub_free): If the next free block which is being
11173         merged is the first free block, set the first block to the block
11174         being freed.
11175         Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
11177 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
11179         * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
11180         `grub_ieee1275_chosen'.
11182 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
11184         * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
11185         (grub_ieee1275_chosen): New variable.
11186         (cmain): Initialize and use `grub_ieee1275_chosen' instead of
11187         `chosen'.
11188         * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
11189         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
11190         Rename first argument to `phandle' for consistency.
11191         (grub_ieee1275_get_property_length): Likewise.
11192         (grub_ieee1275_next_property): Likewise.  Change type of first argument
11193         to grub_ieee1275_phandle_t.
11194         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
11195         Move export next to declaration.
11196         (grub_ieee1275_chosen): New variable.
11197         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
11198         Correct cosmetic typo.
11199         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
11200         `grub_ieee1275_chosen'.
11201         * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
11202         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
11203         (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
11204         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
11205         `grub_ieee1275_chosen'.
11207 2005-05-10  Hollis Blanchard  <hollis@penguinppc.org>
11209         * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
11210         /chosen/bootargs.
11211         * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
11212         /chosen/bootargs as "variable=value" pairs.
11214 2005-05-08  Vincent Pelletier  <subdino2004@yahoo.fr>
11216         * include/grub/misc.h (grub_dprintf): New macro.
11217         (grub_real_dprintf): New prototype.
11218         (grub_strword): Likewise.
11219         (grub_iswordseparator): Likewise.
11220         * kern/misc.c (grub_real_dprintf): New function.
11221         (grub_strword): Likewise.
11222         (grub_iswordseparator): Likewise.
11224 2005-04-30  Hollis Blanchard  <hollis@penguinppc.org>
11226         * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
11227         (roundup): Remove macro.
11228         (grub_ieee1275_flags): Make static.
11229         (grub_ieee1275_realmode): Remove.
11230         (grub_ieee1275_test_flag): New function.
11231         (grub_ieee1275_set_flag): Likewise.
11232         (find_options): Rename to `grub_ieee1275_find_options'; update
11233         callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
11234         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
11235         (cmain): New prototype.
11236         (cmain): Use `grub_ieee1275_set_flag' instead of accessing
11237         `grub_ieee1275_flags' directly.
11238         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
11239         machine/biosdisk.h.
11240         * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
11241         Don't include grub/machine/init.h.
11242         (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
11243         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
11244         Remove prototype.
11245         (grub_ieee1275_realmode): Likewise.
11246         (grub_ieee1275_flag): New enum.
11247         (grub_ieee1275_test_flag): New prototype.
11248         (grub_ieee1275_set_flag): New prototype.
11249         * include/grub/powerpc/ieee1275/init.h: Remove file.
11250         * include/grub/powerpc/ieee1275/ofdisk.h: New file.
11251         * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
11252         Include grub/machine/console.h.  Include grub/machine/ofdisk.h.
11253         (grub_machine_fini): Don't call `grub_ieee1275_release'.  Remove
11254         comment.
11255         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
11256         `grub_ieee1275_test_flag'.
11257         (grub_ieee1275_encode_devname): Likewise.
11259 2005-04-21  Hollis Blanchard  <hollis@penguinppc.org>
11261         * include/grub/powerpc/ieee1275/ieee1275.h
11262         (grub_ieee1275_encode_devname): New prototype.
11263         (grub_ieee1275_get_filename): Likewise.
11264         * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
11265         function.
11266         (grub_set_prefix): Likewise.
11267         (grub_machine_init): Call grub_set_prefix.
11268         * kern/powerpc/ieee1275/openfw.c: Fix typos.
11269         (grub_parse_type): New enum.
11270         (grub_ieee1275_get_devargs): New function.
11271         (grub_ieee1275_get_devname): Likewise.
11272         (grub_ieee1275_parse_args): Likewise.
11273         (grub_ieee1275_get_filename): Likewise.
11274         (grub_ieee1275_encode_devname): Likewise.
11276 2005-03-30  Marco Gerards  <metgerards@student.han.nl>
11278         * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
11279         `grub_loader_unset'.
11281 2005-03-26  Hollis Blanchard  <hollis@penguinppc.org>
11283         * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
11284         instead of grub_ieee1275_interpret.
11285         (grub_halt_init): New function.
11286         (grub_halt_fini): Likewise.
11287         (GRUB_MOD_INIT): Correct message grammar.
11288         * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
11289         instead of grub_ieee1275_interpret.
11290         (grub_reboot_init): New function.
11291         (grub_reboot_fini): Likewise.
11292         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
11293         commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
11294         util/i386/pc/misc.c with commands/ieee1275/halt.c,
11295         commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
11296         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
11297         function.
11298         * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
11299         Add prototype.
11300         * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
11301         prototype.
11302         (grub_halt): Likewise.
11303         * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
11304         (cmain): Remove __attribute__((unused)).
11305         * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
11306         (grub_heap_len): Likewise.
11307         (grub_machine_fini): New function.
11308         * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
11309         (grub_halt): Likewise.
11310         * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
11311         function.
11312         * util/powerpc/ieee1275/misc.c: New file.
11314 2005-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
11316         * DISTLIST: New file.
11317         * gendistlist.sh: Likewise.
11319         * Makefile.in (COMMON_DISTFILES): Removed.
11320         (BOOT_DISTFILES): Likewise.
11321         (CONF_DISTFILES): Likewise.
11322         (DISK_DISTFILES): Likewise.
11323         (FS_DISTFILES): Likewise.
11324         (INCLUDE_DISTFILES): Likewise.
11325         (KERN_DISTFILES): Likewise.
11326         (LOADER_DISTFILES): Likewise.
11327         (TERM_DISTFILES): Likewise.
11328         (UTIL_DISTFILES): Likewise.
11329         (DISTFILES): Likewise.
11330         (uninstall): Uninstall files in $(pkgdata_DATA).
11331         (DISTLIST): New target.
11332         (distdir): Use the contents of the file DISTLIST to get a list of
11333         distributed files.
11335 2005-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
11337         * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
11338         descriptor. This is ported from GRUB Legacy.
11340         * gencmdlist.sh: Added an extra semicolon to make it work with
11341         old sed versions. Reported by Robert Bihlmeyer
11342         <robbe@orcus.priv.at>.
11344 2005-03-08  Yoshinori Okuji  <okuji@enbug.org>
11346         Automatic loading of commands is supported.
11348         * normal/main.c (read_command_list): New function.
11349         (grub_normal_execute): Call read_command_list.
11351         * normal/command.c (grub_register_command): Return zero or CMD.
11352         Allocate CMD->NAME from the heap.
11353         Initialize CMD->MODULE_NAME to zero.
11354         Find the same name as well. If the same command is found and it is
11355         a dummy command, overwrite members. If it is not a dummy command,
11356         return zero.
11357         (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
11358         (grub_command_find): If a dummy command is found, load a module
11359         and retry to find a command only once.
11361         * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
11362         make sure that each command is loaded.
11364         * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
11365         macro.
11366         (struct grub_command): Remove const from the member `name'.
11367         Add a new member `module_name'.
11368         (grub_register_command): Return grub_command_t.
11370         * commands/help.c (grub_cmd_help): Call grub_command_find to make
11371         sure that each command is loaded.
11373         * genmk.rb (PModule::rule): Specify a module name without the
11374         suffix ".mod" to gencmdlist.sh.
11376 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
11378         * gencmdlist.sh: New file.
11380         * genmk.rb (PModule::rule): Generate a rule for a command list.
11381         Clean command.lst.
11382         Generate command.lst from $(COMMANDFILES).
11384         * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
11385         (DATA): Added $(pkgdata_DATA).
11386         (install-local): Install files in $(pkgdata_DATA).
11388 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
11390         * term/i386/pc/vga.c (debug_command): Removed.
11391         (GRUB_MOD_INIT): Do not register the command "debug".
11393         From Hollis Blanchard:
11394         * commands/configfile.c: New file.
11395         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11396         commands/configfile.c.
11397         (pkgdata_MODULES): Added configfile.mod.
11398         (configfile_mod_SOURCES): New variable.
11399         (configfile_mod_CFLAGS): Likewise.
11400         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
11401         commands/configfile.c.
11402         (pkgdata_MODULES): Added configfile.mod.
11403         (configfile_mod_SOURCES): New variable.
11404         (configfile_mod_CFLAGS): Likewise.
11405         * util/grub-emu.c (main): Call grub_configfile_init and
11406         grub_configfile_fini.
11407         * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
11408         prototype.
11409         [GRUB_UTIL] (grub_configfile_fini): Likewise.
11411 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
11413         * normal/arg.c (grub_arg_show_help): Do not show the bug report
11414         address.
11416         * commands/help.c (grub_cmd_help): Do not print newlines after
11417         the last command in print_command_help.
11419 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
11421         * commands/default.h: New file.
11422         * commands/timeout.h: Likewise.
11423         * normal/context.c: Likewise.
11425         * util/misc.c: Do not include sys/times.h.
11426         Include sys/time.h and grub/machine/time.h.
11427         (grub_get_rtc): Rewritten with gettimeofday.
11429         * util/grub-emu.c (main): Call grub_default_init and
11430         grub_timeout_init before grub_normal_init, and call
11431         grub_timeout_fini and grub_default_fini after grub_main.
11433         * util/console.c (grub_ncurses_checkkey): Return the read
11434         character or -1.
11436         * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
11437         timeouts.
11439         * normal/main.c (read_config_file): Push MENU. If this fails,
11440         print an error and wait for a user input.
11441         Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
11442         If a menu is empty or an error occurs, pop MENU.
11443         (grub_normal_execute): Pop and free MENU after grub_menu_run
11444         returns.
11446         * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
11448         * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
11449         include time.h.
11450         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
11451         without GRUB_UTIL.
11452         * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
11453         time.h.
11454         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
11455         without GRUB_UTIL.
11457         * include/grub/normal.h (struct grub_menu_list): New struct.
11458         (grub_menu_list_t): New type.
11459         (struct grub_context): New struct.
11460         (grub_context_t): New type.
11461         (grub_register_command): Got rid of EXPORT_FUNC.
11462         (grub_unregister_command): Likewise.
11463         (grub_context_get): New prototype.
11464         (grub_context_get_current_menu): Likewise.
11465         (grub_context_push_menu): Likewise.
11466         (grub_context_pop_menu): Likewise.
11467         [GRUB_UTIL] (grub_default_init): Likewise.
11468         [GRUB_UTIL] (grub_default_fini): Likewise.
11469         [GRUB_UTIL] (grub_timeout_init): Likewise.
11470         [GRUB_UTIL] (grub_timeout_fini): Likewise.
11472         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
11473         commands/timeout.c and normal/context.c.
11474         (pkgdata_MODULES): Added default.mod and timeout.mod.
11475         (normal_mod_SOURCES): Added normal/context.c.
11476         (default_mod_SOURCES): New variable.
11477         (default_mod_CFLAGS): Likewise.
11478         (timeout_mod_SOURCES): Likewise.
11479         (timeout_mod_CFLAGS): Likewise.
11480         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
11481         conf/i386-pc.rmk.
11482         (pkgdata_MODULES): Added default.mod and timeout.mod.
11483         (normal_mod_SOURCES): Added normal/context.c.
11484         (default_mod_SOURCES): New variable.
11485         (default_mod_CFLAGS): Likewise.
11486         (timeout_mod_SOURCES): Likewise.
11487         (timeout_mod_CFLAGS): Likewise.
11489         * Makefile.in (all-local): Added $(MKFILES).
11491 2005-02-21  Vincent Pelletier  <subdino2004@yahoo.fr>
11493         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
11494         (grub_emu_SOURCES): Likewise.
11495         (pkgdata_MODULES): Add `sun.mod'.
11496         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
11497         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11498         `partmap/sun.c'.
11499         (pkgdata_MODULES): Add `sun.mod'.
11500         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
11501         * include/grub/partition.h (grub_sun_partition_map_init): New
11502         prototype.
11503         (grub_sun_partition_map_fini): Likewise.
11504         * partmap/sun.c: New file.
11505         * util/grub-emu.c (main): Initialize and de-initialize the sun
11506         partitionmap support.
11508 2005-02-19  Yoshinori K. Okuji  <okuji@enbug.org>
11510         This implements an Emacs-like menu entry editor.
11512         * normal/menu_entry.c: New file.
11514         * util/console.c (grub_ncurses_putchar): Translate some Unicode
11515         characters to ASCII.
11516         (saved_char): New variable.
11517         (grub_ncurses_checkkey): Rewritten completely.
11518         (grub_ncurses_getkey): Likewise.
11519         (grub_ncurses_init): Call raw instead of cbreak.
11521         * normal/menu.c (print_entry): Do not put a space.
11522         (init_page): Renamed to ...
11523         (grub_menu_init_page): ... this. All callers changed.
11524         (edit_menu_entry): Removed.
11525         (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
11527         * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
11529         * kern/misc.c (grub_vprintf): Call grub_refresh.
11531         * normal/menu.c (DISP_LEFT): Renamed to ...
11532         * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
11533         * normal/menu.c (DISP_UP): Renamed to ...
11534         * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
11535         * normal/menu.c (DISP_RIGHT): Renamed to ...
11536         * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
11537         * normal/menu.c (DISP_DOWN): Renamed to ...
11538         * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
11539         * normal/menu.c (DISP_HLINE): Renamed to ...
11540         * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
11541         * normal/menu.c (DISP_VLINE): Renamed to ...
11542         * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
11543         * normal/menu.c (DISP_UL): Renamed to ...
11544         * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
11545         * normal/menu.c (DISP_UR): Renamed to ...
11546         * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
11547         * normal/menu.c (DISP_LL): Renamed to ...
11548         * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
11549         * normal/menu.c (DISP_LR): Renamed to ...
11550         * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
11551         * normal/menu.c (TERM_WIDTH): Renamed to ...
11552         * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
11553         * normal/menu.c (TERM_HEIGHT): Renamed to ...
11554         * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
11555         * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
11556         * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
11557         * normal/menu.c (TERM_MARGIN): Renamed to ...
11558         * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
11559         * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
11560         * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
11561         * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
11562         * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
11563         * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
11564         * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
11565         * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
11566         * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
11567         * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
11568         * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
11569         * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
11570         * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
11571         * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
11572         * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
11573         * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
11574         * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
11575         * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
11576         * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
11577         * normal/menu.c (TERM_CURSOR_X): Renamed to ...
11578         * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
11579         All callers changed.
11581         * include/grub/normal.h: New prototype.
11583         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11584         normal/menu_entry.c.
11585         (normal_mod_SOURCES): Likewise.
11586         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11587         (normal_mod_SOURCES): Likewise.
11589 2005-02-15  Yoshinori K. Okuji  <okuji@enbug.org>
11591         * include/grub/normal.h (grub_halt_init): New prototype.
11592         (grub_halt_fini): Likewise.
11593         (grub_reboot_init): Likewise.
11594         (grub_reboot_fini): Likewise.
11596         * util/grub-emu.c: Include signal.h.
11597         (main_env): New global variable.
11598         (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
11599         catch C-c.
11600         (grub_machine_fini): New function.
11601         (main): Call grub_halt_init and grub_reboot_init before
11602         grub_main, and grub_reboot_fini and grub_halt_fini after it.
11603         Call setjmp with MAIN_ENV to go back afterwards.
11604         Call grub_machine_fini right before return.
11606         * include/grub/util/misc.h: Include setjmp.h.
11607         (main_env): New prototype.
11609         * include/grub/kernel.h (grub_machine_fini): New prototype.
11610         * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
11611         * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
11613         * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
11614         * kern/i386/pc/init.c (grub_machine_fini): Likewise.
11615         * term/i386/pc/console.c (grub_console_fini): Likewise.
11617         * util/i386/pc/misc.c: New file.
11619         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11620         util/i386/pc/misc.c, commands/i386/pc/halt.c and
11621         commands/i386/pc/reboot.c.
11623 2005-02-14  Guillem Jover  <guillem@hadrons.org>
11625         * include/grub/dl.h (grub_dl_check_header): New prototype.
11626         (grub_arch_dl_check_header): Change return type to grub_err_t,
11627         remove size parameter and export function.  Update all callers.
11628         * kern/dl.c (grub_dl_check_header): New function.
11629         (grub_dl_load_core): Use `grub_dl_check_header' instead of
11630         `grub_arch_dl_check_header'.  Check ELF type.  Check if sections
11631         are inside the core.
11632         * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
11633         independent ELF header checks.
11634         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
11635         * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
11636         `grub_dl_check_header' instead of explicit checks.  Check for the
11637         ELF type.
11638         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
11639         `grub_dl_check_header' instead of explicit checks.  Remove arch
11640         specific ELF header checks.
11642         * util/grub-emu.c (grub_arch_dl_check_header): Remove the
11643         argument SIZE.
11645 2005-02-13  Hollis Blanchard  <hollis@penguinppc.org>
11647         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
11648         * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
11650 2005-02-12  Hollis Blanchard  <hollis@penguinppc.org>
11652         * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
11653         return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
11654         (part_map_iterate): Clear `grub_errno' and return 0 if
11655         `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
11656         * partmap/amiga.c (amiga_partition_map_iterate): Return
11657         GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
11658         * partmap/apple.c (apple_partition_map_iterate): Likewise.
11660 2005-02-01  Guillem Jover  <guillem@hadrons.org>
11662         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
11663         help info.
11665 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
11667         * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
11668         Removed prototype.
11669         (grub_rescue_cmd_linux): New prototype.
11670         (grub_rescue_cmd_initrd): Likewise.
11671         * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
11672         `bi_rec'.
11673         (grub_linux_release_mem): Release the memory for the initrd.
11674         (grub_load_linux): Renamed from this...
11675         (grub_rescue_cmd_linux): ...To this.  Changed all callers.
11676         Changed `entry' not to be static.  Loop over memory regions to
11677         find another one when the default fails.
11678         (grub_rescue_cmd_initrd): New function.
11679         (grub_linux_init): Remove function.
11680         (grub_linux_fini): Likewise.
11681         (GRUB_MOD_INIT): Register `initrd'.
11682         (GRUB_MOD_FINI): Unregister `initrd'.
11683         * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
11684         Function removed.
11685         (grub_linux_normal_fini): Likewise.
11686         (GRUB_MOD_INIT): Register `initrd'.
11687         (GRUB_MOD_FINI): Unregister `initrd'.
11689 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
11691         * commands/help.c: New file.
11692         * normal/arg.c (show_help): Renamed to...
11693         (grub_arg_show_help): ... this.
11694         * commands/i386/pc/halt.c: New file.
11695         * commands/i386/pc/reboot.c: Likewise.
11696         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
11697         (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
11698         (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
11699         (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
11700         variables.
11701         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11702         `commands/help.c'.
11703         (pkgdata_MODULES): Add `help.mod'.
11704         (help_mod_SOURCES, help_mod_CFLAGS): New variables.
11705         * grub/i386/pc/init.h (grub_reboot): New prototype.
11706         (grub_halt): Likewise.
11707         * include/grub/normal.h (grub_arg_show_help): New prototype.
11708         (grub_help_init): Likewise.
11709         (grub_help_fini): Likewise.
11710         * util/grub-emu.c (main): Initialize and deinitialize the help
11711         command.
11713         * normal/cmdline.c (grub_cmdline_get): Doc fix.
11715         * normal/command.c (grub_command_init): Fixed the description of
11716         the `set' and `unset' commands.
11718 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
11720         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
11721         function.
11722         * commands/ieee1275/halt.c: New file.
11723         * commands/ieee1275/reboot.c: Likewise.
11724         * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
11725         `__attribute__ ((unused))'.  Some GCS related fixed.
11726         (grub_suspend_init) [GRUB_UTIL]: Function removed.
11727         (grub_suspend_fini): Likewise.
11728         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
11729         and `halt.mod'.
11730         (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
11731         (halt_mod_CFLAGS): New variables.
11732         * include/grub/powerpc/ieee1275/ieee1275.h
11733         (grub_ieee1275_interpret): New prototype.
11735 2005-01-29  Yoshinori K. Okuji  <okuji@enbug.org>
11737         * include/grub/misc.h (memmove): New prototype.
11738         (memcpy): Likewise.
11740 2005-01-22  Hollis Blanchard  <hollis@penguinppc.org>
11742         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
11743         `devpath' to 0.  Use `name' instead of `devpath' with `grub_strndup'.
11745 2005-01-22  Marco Gerards  <metgerards@student.han.nl>
11747         * kern/misc.c (grub_strndup): Function rewritten.
11749 2005-01-22  Vincent Pelletier  <subdino2004@yahoo.fr>
11751         * normal/menu.c (TERM_WIDTH): Macro redefined.
11752         (TERM_TOP_BORDER_Y): Likewise.
11753         (draw_border): Replaced while-loop by a for-loop.  Make the number
11754         of lines consistent with the number of lines displayed in
11755         print_entries.  Added a margin below the rectangle.
11756         (print_entry): Make the entry fit in the rectangle.
11757         (print_entries): Display the scroll arrows next to the right
11758         border.
11760 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
11762         * fs/minix.c (grub_minix_find_file): Reserve more space for
11763         `fpath' so the \0 can be stored.  Use `grub_strcpy' instead of
11764         `grub_strncpy' to copy `path' into it.
11766 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
11768         Add the loopback device, a device via which files can be accessed
11769         as devices.
11771         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
11772         (pkgdata_MODULES): Add loopback.mod.
11773         (loopback_mod_SOURCES): New variable.
11774         (loopback_mod_CFLAGS): Likewise.
11775         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11776         `disk/loopback.c'.
11777         (pkgdata_MODULES): Add loopback.mod.
11778         (loopback_mod_SOURCES): New variable.
11779         (loopback_mod_CFLAGS): Likewise.
11780         * disk/loopback.c: new file.
11781         * include/grub/normal.h (grub_loop_init): New prototype.
11782         (grub_loop_fini): New prototype.
11783         * util/grub-emu.c (main): Initialize and de-initialize loopback
11784         support.
11785         * include/grub/disk.h (grub_disk_dev_id): Add
11786         `GRUB_DISK_DEVICE_LOOPBACK_ID'.
11788 2005-01-20  Hollis Blanchard  <hollis@penguinppc.org>
11790         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
11791         function.
11792         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
11793         (suspend_mod_SOURCES): New variable.
11794         (suspend_mod_CFLAGS): Likewise.
11795         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
11796         New prototype.
11797         * commands/ieee1275/suspend.c: New file.
11799 2005-01-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
11801         * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
11802         ((unused))' to `__attribute__ ((used))'.
11803         (GRUB_MOD_FINI): Likewise.
11804         * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
11805         * genmk.rb (PModule): Assign space to common symbols when linking
11806         modules.
11808 2005-01-20  Marco Gerards  <metgerards@student.han.nl>
11810         * include/grub/mm.h (grub_mm_init_region): Change the type of the
11811         `unsigned' arguments to `grub_size_t'.
11812         (grub_malloc): Likewise.
11813         (grub_realloc): Likewise.
11814         (grub_memalign): Likewise.
11815         * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
11816         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
11817         * util/misc.c (grub_malloc): Likewise.
11818         (grub_realloc): Likewise.
11819         * kern/mm.c (get_header_from_pointer): Change the casts to
11820         `unsigned' into a cast to `grub_size_t'.
11822         * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
11823         point to `currnode' when `currnode' is changed.
11825         * util/grub-emu.c (main): Initialize `progname'.  Reported by Nico
11826         Schottelius <nico-linux@schottelius.org>.
11828 2005-01-09  Hollis Blanchard  <hollis@penguinppc.org>
11830         * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
11831         (note_path): Remove variable.
11832         (GRUB_IEEE1275_NOTE_NAME): New macro.
11833         (GRUB_IEEE1275_NOTE_TYPE): Likewise.
11834         (grub_ieee1275_note_hdr): New structure.
11835         (grub_ieee1275_note_desc): Likewise.
11836         (grub_ieee1275_note): Likewise.
11837         (load_note): Remove `dir' argument.  All callers updated.  Remove
11838         `note_img' and `path'.  Do not load a file from `note_path'.
11839         Initialize a struct grub_ieee1275_note and write that to `out'.
11840         Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
11842 2005-01-05  Marco Gerards  <metgerards@student.han.nl>
11844         * util/misc.c (grub_util_read_image): Revert last change.  It
11845         called `grub_util_read_at', which seeks from the beginning of the
11846         file.
11848 2005-01-04  Hollis Blanchard  <hollis@penguinppc.org>
11850         * TODO: Add note about endianness in grub-mkimage.
11851         * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
11852         section.
11853         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
11854         (grub_mkimage_SOURCES): New target.
11855         * include/grub/kernel.h (grub_start_addr): Remove variable.
11856         (grub_end_addr): Likewise.
11857         (grub_total_module_size): Likewise.
11858         (grub_kernel_image_size): Likewise.
11859         (GRUB_MODULE_MAGIC): New constant.
11860         (grub_module_info): New structure.
11861         (grub_arch_modules_addr): New prototype.
11862         (grub_get_end_addr): Remove prototype.
11863         * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
11864         * include/grub/powerpc/ieee1275/kernel.h: New file.
11865         * include/grub/util/misc.h (grub_util_get_fp_size): New
11866         prototype.
11867         (grub_util_read_at): Likewise.
11868         (grub_util_write_image_at): Likewise.
11869         * kern/main.c (grub_get_end_addr): Remove function.
11870         (grub_load_modules): Call grub_arch_modules_addr instead of using
11871         grub_end_addr.  Look for a grub_module_info struct in memory.  Use
11872         the grub_module_info fields instead of calling grub_get_end_addr
11873         as loop conditions.  Move grub_add_unused_region code here.
11874         (grub_add_unused_region): Remove function.
11875         * kern/i386/pc/init.c: Include grub/cache.h.
11876         (grub_machine_init): Remove call to grub_get_end_addr.  Remove
11877         one call to add_mem_region.
11878         (grub_arch_modules_addr): New function.
11879         * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
11880         (grub_total_module_size): Likewise.
11881         Include grub/machine/kernel.h.
11882         (grub_arch_modules_addr): New function.
11883         * util/grub-emu.c (grub_end_addr): Remove variable.
11884         (grub_total_module_size): Likewise.
11885         (grub_arch_modules_addr): New function.
11886         * util/misc.c: Include unistd.h.
11887         (grub_util_get_fp_size): New function.
11888         (grub_util_read_at): Likewise.
11889         (grub_util_write_image_at): Likewise.
11890         (grub_util_read_image): Call grub_util_read_at.
11891         (grub_util_write_image): Call grub_util_write_image_at.
11892         * util/i386/pc/grub-mkimage.c (generate_image): Allocate
11893         additional memory in kernel_img for a struct grub_module_info.
11894         Fill in that grub_module_info.
11895         * util/powerpc/ieee1275/grub-mkimage.c: New file.
11897 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
11899         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
11900         New function.
11901         * include/grub/powerpc/ieee1275/ieee1275.h
11902         (grub_ieee1275_milliseconds): New prototype.
11903         * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
11904         Change to 1000.
11905         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
11906         grub_ieee1275_milliseconds.
11908 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
11910         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
11911         variable.
11912         (find_options): New function.
11913         (cmain): Call find_options.
11914         * include/grub/powerpc/ieee1275/ieee1275.h
11915         (grub_ieee1275_realmode): New extern variable.
11916         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
11917         grub_map if grub_ieee1275_realmode is false.
11919 2004-12-29  Marco Gerards  <metgerards@student.han.nl>
11921         * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
11922         lines are inserted and make it work like readline.  Reported by
11923         Vincent Pelletier <subdino2004@yahoo.fr>.
11925 2004-12-28  Marco Gerards  <metgerards@student.han.nl>
11927         * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
11929         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
11930         `kern/powerpc/cache.S'.
11932 2004-12-27  Marco Gerards  <metgerards@student.han.nl>
11934         * genmk.rb: Handle the `Program' class in the main loop.  Written
11935         by Johan Rydberg <jrydberg@gnu.org>.
11936         (Program): New class.
11937         (programs): New variable.
11938         * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
11939         instead of "grub/machine/ieee1275.h".  Include <grub/kernel.h>
11940         instead of "grub/kernel.h".  Include <grub/machine/init.h>.
11941         (help_arch): Function removed.
11942         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
11943         `powerpc/libgcc.h' and `loader.h'.
11944         (pkgdata_PROGRAMS): New variable.
11945         (sbin_UTILITIES): Variable removed.
11946         (grub_emu_SOURCES): Added kern/powerpc/cache.S.
11947         (grubof_SOURCES): Variable re-defined so it only includes the
11948         core functionality.
11949         (grubof_CFLAGS): Remove `-DGRUBOF'.
11950         (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
11951         (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
11952         (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
11953         (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
11954         (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
11955         (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
11956         (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
11957         (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
11958         (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
11959         (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
11960         (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
11961         (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
11962         (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
11963         (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
11964         (pc_mod_CFLAGS): New variables.
11965         * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
11966         (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
11967         * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
11968         * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
11969         Moved from here...
11970         * include/grub/i386/pc/init.h (grub_os_area_addr)
11971         (rub_os_area_size): ... to here.
11972         * include/grub/powerpc/ieee1275/ieee1275.h
11973         (grub_ieee1275_entry_fn): Export symbol.
11974         * include/grub/powerpc/ieee1275/init.h: New file.
11975         * include/grub/powerpc/libgcc.h: Likewise.
11976         * include/grub/cache.h: Likewise.
11977         * kern/powerpc/cache.S: Likewise.  Written by Hollis Blanchard
11978         <hollis@penguinppc.org>.
11979         * kern/dl.c: Include <grub/cache.h>.
11980         (grub_dl_flush_cache): New function.
11981         (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
11982         for this module.
11983         * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
11984         (grub_console_init): Removed prototypes.
11985         (grub_machine_init): Don't initialize the modules anymore.
11986         * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
11987         static.
11988         * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
11989         Macro undef removed.
11990         (GRUB_HOST_WORDS_BIGENDIAN): New macro.
11991         * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
11992         relocation `R_PPC_REL32'.  Return an error when the relocation is
11993         unknown.
11994         * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
11995         * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
11996         * util/misc.c (grub_arch_sync_caches): Likewise.
11998 2004-12-19  Marco Gerards  <metgerards@student.han.nl>
12000         * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
12001         `symlist.c', add `grubof_symlist.c'.
12002         (symlist.c): Variable removed.
12003         (grubof_HEADERS): Variable added.
12004         (grubof_symlist.c): New target.
12005         (kernel_syms.lst): Use `grubof_HEADERS' instead of
12006         `kernel_img_HEADERS'.
12007         (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
12008         * kern/powerpc/dl.c: New file.
12009         * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
12010         Function removed.
12011         (grub_arch_dl_relocate_symbols): Likewise.
12012         (grub_register_exported_symbols): Likewise.
12014 2004-12-13  Marco Gerards  <metgerards@student.han.nl>
12016         * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
12017         (grub_ext2_dir): Likewise.  Don't return in case of an error, jump
12018         to fail instead.  Reported by Vincent Pelletier
12019         <subdino2004@yahoo.fr>.
12021         * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
12022         it is not allocated.  Reported by Vincent Pelletier
12023         <subdino2004@yahoo.fr>.
12025         * normal/cmdline.c (grub_tab_complete): Add a blank line to the
12026         output so the output looks better.
12028 2004-12-04  Marco Gerards  <metgerards@student.han.nl>
12030         Modulize the partition map support and add support for the amiga
12031         partition map.
12033         * commands/ls.c: Include <grub/partition.h> instead of
12034         <grub/machine/partition.h>.
12035         * kern/disk.c: Likewise.
12036         * kern/rescue.c: Likewise.
12037         * loader/i386/pc/chainloader.c: Likewise.
12038         * normal/cmdline.c: Likewise.
12039         * kern/powerpc/ieee1275/init.c: Likewise.
12040         (grub_machine_init): Call `grub_pc_partition_map_init',
12041         `grub_amiga_partition_map_init' and
12042         `grub_apple_partition_map_init'.
12043         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
12044         `disk/i386/pc/partition.c'.  Add `kern/partition.c'.
12045         (kernel_img_HEADERS): Remove `machine/partition.h'.  Add
12046         `partition.h' and `pc_partition.h'.
12047         (grub_setup_SOURCES): Remove
12048         `disk/i386/pc/partition.c'.  Add `kern/partition.c',
12049         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
12050         (grub_emu_SOURCES): Likewise.
12051         (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
12052         (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
12053         (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
12054         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
12055         `disk/powerpc/ieee1275/partition.c'.  Add `kern/partition.c',
12056         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
12057         (grubof_SOURCES): Likewise.
12058         * disk/i386/pc/partition.c: File removed.
12059         * disk/powerpc/ieee1275/partition.c: Likewise.
12060         * include/grub/powerpc/ieee1275/partition.h: Likewise.
12061         * include/grub/i386/pc/partition.h: Likewise.
12062         * kern/partition.c: New file.
12063         * partmap/amiga.c: Likewise.
12064         * partmap/apple.c: Likewise.
12065         * partmap/pc.c: Likewise.
12066         * include/grub/partition.h: Likewise..
12067         * include/grub/pc_partition.h: Likewise.
12068         * util/grub-emu.c: Include <grub/partition.h> instead of
12069         <grub/machine/partition.h>.
12070         (main): Call `grub_pc_partition_map_init',
12071         `grub_amiga_partition_map_init' and
12072         `grub_apple_partition_map_init' and deinitialize afterwards.
12073         * util/i386/pc/biosdisk.c: Include `#include
12074         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
12075         `<grub/machine/partition.h>'.
12076         * util/i386/pc/grub-setup.c: Likewise.
12077         * util/i386/pc/biosdisk.c: Likewise.
12078         (grub_util_biosdisk_get_grub_dev): Only access the PC specific
12079         partition information in case of a PC partition.
12080         * util/i386/pc/grub-setup.c: Include `#include
12081         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
12082         `<grub/machine/partition.h>'.
12083         (setup): Only access the PC specific partition information in case
12084         of a PC partition.
12086 2004-11-17  Hollis Blanchard  <hollis@penguinppc.org>
12088         * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
12089         (grub_longjmp): Likewise.
12090         * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
12091         20.
12092         * normal/powerpc/setjmp.S: New file.
12093         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
12094         `normal/powerpc/setjmp.S'.
12095         (grubof_CFLAGS): Add `-DGRUBOF'.
12096         * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
12097         [GRUB_UTIL && !GRUBOF].
12099 2004-11-16  Marco Gerards  <metgerards@student.han.nl>
12101         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
12102         property named `name'.  Correctly handle the error returned by
12103         `grub_ieee1275_finddevice' if a device can not be opened.
12105 2004-11-02  Hollis Blanchard  <hollis@penguinppc.org>
12107         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
12108         `actual' for negativity.
12109         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
12110         kern/fshelp.c.
12112 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
12114         * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
12115         (PAGE_OFFSET): New macro.
12116         (CRTC_ADDR_PORT): Likewise.
12117         (CRTC_DATA_PORT): Likewise.
12118         (START_ADDR_HIGH_REGISTER): Likewise.
12119         (START_ADDR_LOW_REGISTER): Likewise.
12120         (GRAPHICS_ADDR_PORT): Likewise.
12121         (GRAPHICS_DATA_PORT): Likewise.
12122         (READ_MAP_REGISTER): Likewise.
12123         (INPUT_STATUS1_REGISTER): Likewise.
12124         (INPUT_STATUS1_VERTR_BIT): Likewise.
12125         (page): New variable.
12126         (wait_vretrace): New function.
12127         (set_read_map): Likewise.
12128         (set_start_address): Likewise.
12129         (grub_vga_init): Use mode 0x10 instead of mode 0x12.  Switch to
12130         the right page.
12131         (check_vga_mem): Take the page into account.
12132         (write_char): Likewise.
12133         (write_cursor): Likewise.
12134         (scroll_up): Likewise.  Copy the page to the page that is not
12135         shown and switch between both pages.
12136         (grub_vga_putchar): Fix off by one error.
12137         (grub_vga_cls): Wait for the vertical retrace.  Take the page into
12138         account.
12140 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
12142         Add support for iso9660 (including rockridge).
12144         * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
12145         (iso9660_mod_SOURCES): New variable.
12146         (iso9660_mod_CFLAGS): Likewise.
12147         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
12148         * include/grub/fs.h (grub_iso9660_init): New prototype.
12149         * util/grub-emu.c (main): Call `grub_iso9660_init'.
12150         * fs/iso9660.c: New file.
12152         * include/grub/misc.h (grub_strncat): New prototype.
12153         * kern/misc.c (grub_strncat): New function.
12155         * fs/hfs.c (grub_hfs_mount): Translate the error
12156         `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
12157         * fs/jfs.c (grub_jfs_mount): Likewise.
12158         * fs/ufs.c (grub_ufs_mount): Likewise.
12160 2004-10-28  Hollis Blanchard  <hollis@penguinppc.org>
12162         * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
12163         which initialized BAT registers.
12164         * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
12165         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
12166         Move from here...
12167         * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
12168         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
12169         ... to here.
12170         * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
12171         (grub_mapclaim): Likewise.
12172         * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
12173         grub_mapclaim instead of grub_ieee1275_claim.  Assign linux_addr by
12174         hand.
12176 2004-10-19  Hollis Blanchard  <hollis@penguinppc.org>
12178         * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
12179         (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
12180         -ffreestanding and -msoft-float.
12182 2004-10-15  Hollis Blanchard  <hollis@penguinppc.org>
12184         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
12185         append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
12186         set in grub_ieee1275_flags.
12188 2004-10-14  Hollis Blanchard  <hollis@penguinppc.org>
12190         * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
12191         prototype.
12192         * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
12193         grub_console_init first.
12194         Change the memory range used for grub_ieee1275_claim and
12195         grub_mm_init_region.
12196         Print an error message if the claim fails.
12197         Include <grub/misc.h>.
12199 2004-10-13  Hollis Blanchard  <hollis@penguinppc.org>
12201         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
12202         Call grub_children_iterate for device nodes of type `scsi',
12203         `ide', or `ata'.
12204         (grub_ofdisk_open): Remove manual device alias resolution.
12205         Fix memory leak when device cannot be opened.
12206         * include/grub/powerpc/ieee1275/ieee1275.h
12207         (grub_children_iterate): New prototype.
12208         * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
12209         New function.
12210         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
12211         Return -1 if args.size was -1.
12213 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
12215         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
12216         (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
12217         World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
12218         Open Firmware's memory for it; claim memory from _start to _end.
12219         * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
12220         (_end): New extern.
12221         (_start): Zero BSS from __bss_start to _end.
12222         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
12223         New extern.
12224         (GRUB_IEEE1275_NO_PARTITION_0): New #define.
12226 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
12228         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
12229         -1 if args.base was -1.
12231 2004-10-08  Hollis Blanchard  <hollis@penguinppc.org>
12233         * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
12234         escape sequence instead of a literal ^L. Also call
12235         grub_ofconsole_gotoxy.
12237 2004-10-03  Hollis Blanchard  <hollis@penguinppc.org>
12239         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
12240         void *  arguments to grub_addr_t.  All callers updated.  Also make
12241         the `result' argument optional.
12242         (grub_ieee1275_release): change void * arguments to grub_addr_t.
12243         All callers updated.
12245 2004-09-22  Hollis Blanchard  <hollis@penguinppc.org>
12247         * commands/ls.c (grub_ls_list_files): Use the string following the
12248         initial ')', if present, as the filesystem path.
12249         * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
12251         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
12253 2004-09-18  Yoshinori K. Okuji  <okuji@enbug.org>
12255         Make the source code of the menu interface more readable.
12257         * normal/menu.c: Include grub/mm.h.
12258         (TERM_WIDTH): New macro.
12259         (TERM_HEIGHT): Likewise.
12260         (TERM_INFO_HEIGHT): Likewise.
12261         (TERM_MARGIN): Likewise.
12262         (TERM_SCROLL_WIDTH): Likewise.
12263         (TERM_TOP_BORDER_Y): Likewise.
12264         (TERM_LEFT_BORDER_X): Likewise.
12265         (TERM_BORDER_WIDTH): Likewise.
12266         (TERM_MESSAGE_HEIGHT): Likewise.
12267         (TERM_BORDER_HEIGHT): Likewise.
12268         (TERM_NUM_ENTRIES): Likewise.
12269         (TERM_FIRST_ENTRY_Y): Likewise.
12270         (TERM_ENTRY_WIDTH): Likewise.
12271         (TERM_CURSOR_X): Likewise.
12272         (draw_border): Use macros instead of magic numbers.
12273         (print_entry): Likewise.
12274         (print_entries): Likewise.
12275         (run_menu): Likewise. Also, handle the key 'e'.
12276         (run_menu_entry): Ignore empty command lines.
12277         (print_message): Added a new argument EDIT. If EDIT is true,
12278         print a different message.
12279         (init_page): Likewise.
12280         (edit_menu_entry): New function. Not implemented yet.
12282 2004-09-17  Marco Gerards  <metgerards@student.han.nl>
12284         Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
12285         can be loaded from normal mode.
12287         * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
12288         `multiboot.mod'.
12289         (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
12290         (multiboot_mod_CFLAGS): New variables.
12291         * loader/i386/pc/linux_normal.c: New file.
12292         * loader/i386/pc/multiboot_normal.c: Likewise.
12294         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
12295         attribute `unused'.
12297         * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type.  Use
12298         `fdiro' to read the mode information from instead of `diro'.
12300         * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
12301         looking up a symlink.
12303         * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
12304         macro.
12305         * normal/command.c (grub_command_execute): Don't parse the
12306         arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
12307         flags of the command.
12309         * normal/menu.c (grub_menu_run): Fix typo.
12311 2004-09-14  Hollis Blanchard  <hollis@penguinppc.org>
12313         * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
12315         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
12316         `y + 1' instead of `y - 1'.
12318         * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
12320 2004-09-14  Yoshinori K. Okuji  <okuji@enbug.org>
12322         From Hollis Blanchard <hollis@penguinppc.org>:
12323         * kern/misc.c (memmove): New alias for grub_memmove.
12324         (memcmp): New alias for grub_memcmp.
12325         (memset): New alias for grub_memset.
12326         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
12327         Change "int handle" to "grub_ieee1275_phandle_t handle".
12328         * include/grub/powerpc/ieee1275/ieee1275.h
12329         (grub_ieee1275_get_property): Likewise.
12331 2004-09-12  Tomas Ebenlendr  <ebik@ucw.cz>
12333         Added normal mode command `chainloader' as module chain.mod, which
12334         depends on normal.mod and _chain.mod.
12336         * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
12337         (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
12338         * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
12339         Deleted prototype.
12340         * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
12341         but arguments parsing moved to ...
12342         (grub_chainloader_cmd): ... here.  New function.
12343         * include/grub/i386/pc/chainloader.h: New file.
12344         * loader/i386/pc/chainloader_normal.c: Likewise.
12346 2004-09-11  Marco Gerards  <metgerards@student.han.nl>
12348         * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
12349         (grub_mkimage_LDFLAGS): Likewise.
12350         (grub_emu_SOURCES): Likewise.
12351         (kernel_img_HEADERS): Added fshelp.h.
12352         * fs/ext2.c: Include <grub/fshelp.h>.
12353         (FILETYPE_REG): New macro.
12354         (FILETYPE_INO_REG): Likewise.
12355         (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
12356         Changed all users.
12357         (ext2_block_group): Renamed to `grub_ext2_block_group'.  Changed
12358         all users.
12359         (grub_fshelp_node): New struct.
12360         (grub_ext2_data): Added member `diropen'.  Changed member `inode'
12361         to a pointer.
12362         (grub_ext2_get_file_block): Removed function.
12363         (grub_ext2_read_block): New function.
12364         (grub_ext2_read_file): Replaced parameter `data' by `node'.
12365         This function was written.
12366         (grub_ext2_mount): Read the root inode.  Create a diropen struct.
12367         (grub_ext2_find_file): Removed function.
12368         (grub_ext2_read_symlink): New function.
12369         (grub_ext2_iterate_dir): Likewise.
12370         (grub_ext2_open): Rewritten.
12371         (grub_ext2_dir): Rewritten.
12372         * include/grub/fshelp.h: New file.
12373         * fs/fshelp.c: Likewise.
12375 2004-09-10  Yoshinori K. Okuji  <okuji@enbug.org>
12377         * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
12378         (print_message): Add a missing newline.
12379         (run_menu): Added timeout support.
12380         (run_menu_entry): New local function.
12381         (grub_menu_run): Added support for booting.
12383         * kern/loader.c (grub_loader_is_loaded): New function.
12385         * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
12386         (grub_get_rtc): Exported.
12388         * include/grub/i386/pc/time.h: Include grub/symbol.h.
12389         (grub_get_rtc): Exported.
12391         * include/grub/normal.h (struct grub_command_list): Remove
12392         constant from the member `command'.
12394         * include/grub/loader.h (grub_loader_is_loaded): Declared.
12396         * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
12398         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
12400 2004-08-28  Marco Gerards  <metgerards@student.han.nl>
12402         Add support for the JFS filesystem.
12404         * fs/jfs.c: New file.
12405         * include/grub/fs.h (grub_jfs_init): New prototype.
12406         (grub_jfs_fini): New prototype.
12407         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
12408         (grub_emu_SOURCES): Likewise.
12409         (pkgdata_MODULES): Add jfs.mod.
12410         (jfs_mod_SOURCES): New variable.
12411         (jfs_mod_CFLAGS): Likewise.
12412         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
12413         (grubof_SOURCES): Likewise.
12414         * util/grub-emu.c (main): Initialize and deinitialize JFS support.
12416         * fs/fat.c (grub_fat_find_dir): Convert the filename little
12417         endian to the host endian.
12418         (grub_fat_utf16_to_utf8): Move function from there...
12419         * kern/misc.c (grub_utf16_to_utf8): ...to here.  Do not convert
12420         the endianness of the source string anymore.
12421         * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
12423 2004-08-24  Marco Gerards  <metgerards@student.han.nl>
12425         * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
12426         (grub_boot_fini) [GRUB_UTIL]: Likewise.
12427         (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
12428         (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
12430         * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
12431         (grub_hfs_iterate_dir): Make the function static.  Add prototypes
12432         for `node_found' and `it_dir'.
12433         (grub_hfs_dir): Add prototype for `dir_hook'.
12435         * fs/minix.c (grub_minix_get_file_block): Add prototype for
12436         `grub_get_indir'.  Rename `indir' in two blocks to `indir16'
12437         and `indir32' to silence a gcc warning.
12439         * include/grub/fs.h (grub_hfs_init): New prototype.
12440         (grub_hfs_fini): Likewise.
12443 2004-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
12445         Each disk device has its own id now. This is useful to make use
12446         of multiple disk devices.
12448         * include/grub/disk.h (grub_disk_dev_id): New enum.
12449         (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
12450         (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
12452         * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
12453         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
12455         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
12456         GRUB_DISK_DEVICE_OFDISK_ID as an id.
12458         * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
12459         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
12461         * include/grub/disk.h (struct grub_disk_dev): Added a new member
12462         "id" which is used by the cache manager.
12464         * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
12465         of just "GRUB".
12467 2004-08-18  Marco Gerards  <metgerards@student.han.nl>
12469         * fs/hfs.c: New file.
12470         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
12471         (grub_emu_SOURCES): Likewise.
12472         (pkgdata_MODULES): Add hfs.mod.
12473         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
12474         (grubof_SOURCES): Likewise.
12475         * util/grub-emu.c (main): Initialize and deinitialize HFS support.
12477         * include/grub/misc.h (grub_strncasecmp): Add prototype.
12478         * kern/misc.c (grub_strncasecmp): Add function.
12480 2004-08-14  Marco Gerards  <metgerards@student.han.nl>
12482         * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
12483         with parentheses.
12485         * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
12486         (grub_ext2_dir): In case the directory entry type is unknown, read
12487         it from the inode.
12489 2004-08-02  Peter Bruin  <pjbruin@dds.nl>
12491         * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
12492         grub_load_linux instead of grub_rescue_cmd_linux as second
12493         argument of grub_rescue_register_command.
12495         * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
12497 2004-07-27  Marco Gerards  <metgerards@student.han.nl>
12499         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
12500         function.
12501         * commands/boot.c: Remove the check for `GRUB_UTIL'.
12502         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
12503         `loader/powerpc/ieee1275/linux.c',
12504         `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
12505         * include/grub/powerpc/ieee1275/ieee1275.h
12506         (grub_ieee1275_release): New prototype.
12507         * include/grub/powerpc/ieee1275/loader.h: Rewritten.
12508         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
12509         normal, boot, linux and linux_normal.
12510         * loader/powerpc/ieee1275/linux.c: New file.
12511         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
12513 2004-07-12  Marco Gerards  <metgerards@student.han.nl>
12515         * normal/arg.c (grub_arg_parse): Correct error handling after
12516         reallocating the argumentlist (check if `argl' is not null instead
12517         of checking if `args' is not null).
12518         * kern/mm.c (grub_realloc): Return the same pointer when using the
12519         same region, instead of returning the header address.
12521 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
12523         * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
12524         one block instead of two when looking for the initial partition.
12525         (grub_partition_probe): Initialize the local variable `p' with 0.
12526         Use base 10 for the grub_strtoul call.
12527         * kern/misc.c (grub_strncpy): Fix off by one bug.  Eliminated the
12528         need for one local variable.
12529         (grub_strtoul): Don't add the new value to `num', instead of that
12530         just assign it.
12532 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
12534         * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
12535         (pxeboot_img_SOURCES): New variable.
12536         (pxeboot_img_ASFLAGS): Likewise.
12537         (pxeboot_img_LDFLAGS): Likewise.
12538         * boot/i386/pc/pxeboot.S: New file.  Based on pxeloader.S from
12539         GRUB Legacy and boot.S.  Adopted for GRUB 2 by lode leroy
12540         <lode_leroy@hotmail.com>.
12542 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
12544         * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
12545         there was no input.
12547 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
12549         * normal/cmdline.c (grub_set_history): Fix off by one bug.  Fixed
12550         the history buffer logic.
12552 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
12554         * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
12555         (FILETYPE_INO_SYMLINK): New macros.
12556         (grub_ext2_find_file): Check if the node is a directory using the
12557         inode stat information instead of using the filetype in the
12558         dirent.  Exclude the first character of an absolute symlink.
12559         (grub_ext2_dir): Mask out the filetype part of the mode member of
12560         the inode.
12562 2004-05-24  Marco Gerards  <metgerards@student.han.nl>
12564         Add support for UFS version 1 and 2.  Add support for the minix
12565         filesystem version 1 and 2, both the variants with 14 and 30 long
12566         filenames.
12568         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
12569         fs/minix.c.
12570         (grub_emu_SOURCES): Likewise.
12571         (pkgdata_MODULES): Add ufs.mod and minix.mod.
12572         (ufs_mod_SOURCES): New variable.
12573         (ufs_mod_CFLAGS): Likewise.
12574         (minix_mod_SOURCES): Likewise.
12575         (minix_mod_CFLAGS): Likewise.
12576         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
12577         fs/minix.c.
12578         (grubof_SOURCES): Likewise.
12579         * fs/ufs.c: New file.
12580         * fs/minix.c: New file.
12581         * include/grub/fs.h (grub_ufs_init): New prototype.
12582         (grub_ufs_fini): Likewise.
12583         (grub_minix_init): Likewise.
12584         (grub_minix_fini): Likewise.
12585         * util/grub-emu.c (main): Initialize and deinitialize UFS and
12586         minix fs.
12588 2004-04-30  Jeroen Dekkers  <jeroen@dekkers.cx>
12590         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
12591         commands/ls.c, commands/terminal.c, commands/boot.c,
12592         commands/cmp.c and commands/cat.c.
12593         (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
12595         * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
12596         "env.h"
12598 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
12600         All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
12601         and grub_, respectively. Because the conversion is trivial and
12602         mechanical, I omit the details here. Please refer to the CVS
12603         if you need more information.
12605 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
12607         * include/pupa: Renamed to ...
12608         * include/grub: ... this.
12609         * util/i386/pc/pupa-mkimage.c: Renamed to ...
12610         * util/i386/pc/grub-mkimage.c: ... this.
12611         * util/i386/pc/pupa-setup.c: Renamed to ...
12612         * util/i386/pc/grub-setup.c: ... this.
12613         * util/pupa-emu.c: Renamed to ...
12614         * util/grub-emu.c: ... this.
12616 2004-03-29  Marco Gerards  <metgerards@student.han.nl>
12618         Add support for the newworld apple macintosh (PPC).  This has been
12619         tested on the powerbook 2000 only.  It only adds support for
12620         generic ieee1275 functions, console and disk support.  This should
12621         be easy to port to other architectures with support for Open
12622         Firmware.
12624         * configure.ac: Accept the powerpc as host_cpu.  In the case of
12625         the powerpc cpu set the host_vendor to ieee1275.  Make sure the i386
12626         specific tests are only executed while building for the i386.
12627         Inverse test for crosscompile.
12628         * genmk.rb (Utility): Allow assembler files.
12629         * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
12630         * conf/powerpc-ieee1275.rmk: New file.
12631         * disk/powerpc/ieee1275/ofdisk.c: Likewise.
12632         * disk/powerpc/ieee1275/partition.c: Likewise.
12633         * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
12634         * include/pupa/powerpc/ieee1275/console.h: Likewise.
12635         * include/pupa/powerpc/ieee1275/partition.h: Likewise.
12636         * include/pupa/powerpc/ieee1275/time.h: Likewise.
12637         * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
12638         * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
12639         * include/pupa/powerpc/ieee1275/loader.h
12640         * include/pupa/powerpc/setjmp.h: Likewise.
12641         * include/pupa/powerpc/types.h: Likewise.
12642         * kern/powerpc/ieee1275/init.c: Likewise.
12643         * kern/powerpc/ieee1275/openfw.c: Likewise.
12644         * term/powerpc/ieee1275/ofconsole.c: Likewise.
12646         These files were written by Johan Rydberg
12647         (jrydberg@night.trouble.net) and I only modified them slightly.
12649         * boot/powerpc/ieee1275/cmain.c: New file.
12650         * boot/powerpc/ieee1275/crt0.S: Likewise.
12651         * boot/powerpc/ieee1275/ieee1275.c: Likewise.
12652         * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
12654 2004-03-14  Jeroen Dekkers  <jeroen@dekkers.cx>
12656         * Makefile.in: Update copyright.
12657         * genmodsrc.sh: Likewise.
12658         * gensymlist.sh: Likewise.
12659         * term/i386/pc/vga.c: Indent correctly.
12661         * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
12662         bugreporting address.
12663         * util/i386/pc/pupa-setup.c (usage): Likewise,
12664         (main): Call pupa_ext2_init and pupa_ext2_fini.
12666         * fs/fat.c (log2): Renamed to ...
12667         (fat_log2): ... this.
12668         All callers changed.
12669         * kern/misc.c (memcpy): Alias to pupa_memmove.
12670         * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
12671         lvalue cast.
12672         * util/console.c (pupa_ncurses_fini): Return 0.
12674         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
12675         Move fail label here.
12676         [__GNU__]: Don't warn when using stat.
12677         (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
12678         (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
12679         long int. Use strtol instead of strtoul.
12681 2004-03-14  Marco Gerards  <metgerards@student.han.nl>
12683         * commands/boot.c: New file.
12684         * commands/cat.c: Likewise.
12685         * commands/cmp.c: Likewise.
12686         * commands/ls.c: Likewise.
12687         * commands/terminal.c: Likewise.
12688         * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
12689         (pupa_register_command): Changed interface to match the new
12690         argument parser.
12691         (pupa_command_execute): Changed (almost rewritten) so it uses
12692         pupa_split_command.  Added support for setting variables using the
12693         syntax `foo=bar'.
12694         (rescue_command): Changed to work with the new argument parser.
12695         (terminal_command): Moved from here to commands/terminal.c.
12696         (set_command): New function.
12697         (unset_command): New function.
12698         (insmod_command): New function.
12699         (rmmod_command): New function.
12700         (lsmod_command): New function.
12701         (pupa_command_init): Don't initialize the command terminal
12702         anymore.  Initialize the commands set, unset, insmod, rmmod and
12703         lsmod.
12704         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
12705         (kernel_img_HEADERS): Add arg.h and env.h.
12706         (pupa_mkimage_LDFLAGS): Add kern/env.c.
12707         (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
12708         commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
12709         normal/arg.c.
12710         (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
12711         terminal.mod.
12712         (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
12713         (boot_mod_SOURCES): New variable.
12714         (terminal_mod_SOURCES): Likewise.
12715         (ls_mod_SOURCES): Likewise.
12716         (cmp_mod_SOURCES): Likewise.
12717         (cat_mod_SOURCES): Likewise.
12719         * normal/arg.c: New file.
12720         * kern/env.c: Likewise.
12721         * include/pupa/arg.h: Likewise.
12722         * include/pupa/env.h: Likewise.
12723         * font/manager.c (font_command): Changed to match argument parsing
12724         interface changes.
12725         (PUPA_MOD_INIT): Likewise.
12726         * hello/hello.c (pupa_cmd_hello): Likewise.
12727         (PUPA_MOD_INIT): Likewise.
12728         * include/pupa/disk.h: Include <pupa/device.h>.
12729         (pupa_print_partinfo): New prototype.
12730         * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
12731         (pupa_dl_get_prefix): Likewise.
12732         * include/pupa/misc.h: Include <pupa/err.h>.
12733         (pupa_isgraph): New prototype.
12734         (pupa_isdigit): Likewise.
12735         (pupa_split_cmdline): Likewise.
12736         * include/pupa/normal.h: Include <pupa/arg.h>.
12737         (pupa_command): Changed the prototype of the member `func' to
12738         match the argument parsing interface.  Added member `options'.
12739         (pupa_register_command): Updated to match function.
12740         (pupa_arg_parse): New prototype.
12741         (pupa_hello_init) [PUPA_UTIL]: New prototype.
12742         (pupa_hello_fini) [PUPA_UTIL]: Likewise.
12743         (pupa_ls_init) [PUPA_UTIL]: Likewise.
12744         (pupa_ls_fini) [PUPA_UTIL]: Likewise.
12745         (pupa_cat_init) [PUPA_UTIL]: Likewise.
12746         (pupa_cat_fini) [PUPA_UTIL]: Likewise.
12747         (pupa_boot_init) [PUPA_UTIL]: Likewise.
12748         (pupa_boot_fini) [PUPA_UTIL]: Likewise.
12749         (pupa_cmp_init) [PUPA_UTIL]: Likewise.
12750         (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
12751         (pupa_terminal_init) [PUPA_UTIL]: Likewise.
12752         (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
12753         * kern/disk.c: Include <pupa/file.h>.
12754         (pupa_print_partinfo): New function.
12755         * kern/dl.c: Include <pupa/env.h>.
12756         (pupa_dl_dir): Variable removed.
12757         (pupa_dl_load): Use the environment variable `prefix' instead of
12758         the variable pupa_dl_dir.
12759         (pupa_dl_set_prefix): Function removed.
12760         (pupa_dl_get_prefix): Likewise.
12761         * kern/i386/pc/init.c: Include <pupa/env.h>.
12762         (pupa_machine_init): Use the environment variable `prefix' instead of
12763         using pupa_dl_set_prefix to set the prefix.
12764         * kern/main.c: Include <pupa/env.h>.
12765         (pupa_set_root_dev): Use the environment variable `prefix' instead of
12766         using pupa_dl_get_prefix to get the prefix.
12767         * kern/misc.c: Include <pupa/env.h>.
12768         (pupa_isdigit): New function.
12769         (pupa_isgraph): Likewise.
12770         (pupa_ftoa): Likewise.
12771         (pupa_vsprintf): Added support for printing values of the type
12772         `double'.  Make it possible to format variable output when using
12773         formatting like `%1.2%f'.
12774         (pupa_split_cmdline): New function.
12775         * kern/rescue.c: Include <pupa/env.h>.
12776         (next_word): Removed function.
12777         (pupa_rescue_cmd_prefix): Likewise.
12778         (pupa_rescue_cmd_set): New function.
12779         (pupa_rescue_cmd_unset): New function.
12780         (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
12781         split the command line instead of splitting it here.  Added
12782         support for setting variables using the syntax `foo=bar'.  Don't
12783         initialize the prefix command anymore.  Initialized the set and
12784         unset commands.
12785         * normal/cmdline.c: Include <pupa/env.h>.
12786         (pupa_tab_complete): Added prototypes for print_simple_completion,
12787         print_partition_completion, add_completion, iterate_commands,
12788         iterate_dev, iterate_part and iterate_dir. Moved code to print
12789         partition information from here to kern/disk.c.
12790         (pupa_cmdline_run): Don't check if the function exists anymore.
12791         * normal/main.c: Include <pupa/env.h>.
12792         (pupa_rescue_cmd_normal): Use the environment variable `prefix'
12793         instead of using pupa_dl_get_prefix to get the prefix.
12794         * term/i386/pc/vga.c: Include <pupa/arg.h>.
12795         (check_vga_mem): Cast pointers to `void *' to silence a gcc
12796         warning.
12797         (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
12798         (pupa_vga_setcolor): Declare unused variables with `__attribute__
12799         ((unused))' to silence a gcc warning.
12800         (pupa_vga_setcolor): Likewise.
12801         (debug_command): Changed to match argument parsing
12802         interface changes.
12803         * util/pupa-emu.c: Include <pupa/env.h>.
12804         (options): Added 0's for unused fields to silence a gcc warning.
12805         (argp): Likewise.
12806         (main): Use the environment variable `prefix' instead of using
12807         pupa_dl_set_prefix to set the prefix.  Initialize the commands ls,
12808         boot, cmp, cat and terminal.  Finish the commands boot, cmp, cat
12809         and terminal.
12811         * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
12812         * util/misc.c: Include <malloc.h>.
12813         (pupa_malloc): Rewritten so errors are correctly reported.
12814         (pupa_realloc): Likewise.
12815         (pupa_memalign): Likewise.
12816         (pupa_mm_init_region): Declare unused variables with
12817         `__attribute__ ((unused))' to silence a gcc warning.
12818         * normal/i386/setjmp.S: Remove tab at the end of the file to
12819         silence a gcc warning.
12820         * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
12821         variables with `__attribute__ ((unused))' to silence a gcc
12822         warning.
12823         * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
12824         local variable i unsigned to silence a gcc warning.
12826         * kern/term.c: Include <pupa/misc.h>.
12827         (pupa_more_lines): New variable.
12828         (pupa_more): Likewise.
12829         (pupa_putcode): When the pager is active pause at the end of every
12830         screen.
12831         (pupa_set_more): New function.
12832         * include/pupa/term.h (pupa_set_more): New prototype.
12835 2004-03-07  Yoshinori K. Okuji  <okuji@enbug.org>
12837         Now this project is GRUB 2 rather than PUPA. The location of
12838         the CVS repository was moved to GRUB's.
12840         * configure.ac: Use bug-grub as the reporting address.
12841         Use GRUB instead of PUPA.
12842         Change the version number to 1.90.
12844 2004-02-24  Yoshinori K. Okuji  <okuji@enbug.org>
12846         * genkernsyms.sh: Updated copyright information.
12847         * genmk.rb: Likewise.
12848         * genmodsrc.sh: Likewise.
12849         * gensymlist.sh: Likewise.
12850         * boot/i386/pc/boot.S: Likewise.
12851         * boot/i386/pc/diskboot.S: Likewise.
12852         * disk/i386/pc/biosdisk.c: Likewise.
12853         * disk/i386/pc/partition.c: Likewise.
12854         * font/manager.c: Likewise.
12855         * fs/ext2.c: Likewise.
12856         * fs/fat.c: Likewise.
12857         * include/pupa/boot.h: Likewise.
12858         * include/pupa/device.h: Likewise.
12859         * include/pupa/disk.h: Likewise.
12860         * include/pupa/dl.h: Likewise.
12861         * include/pupa/elf.h: Likewise.
12862         * include/pupa/err.h: Likewise.
12863         * include/pupa/file.h: Likewise.
12864         * include/pupa/font.h: Likewise.
12865         * include/pupa/fs.h: Likewise.
12866         * include/pupa/kernel.h: Likewise.
12867         * include/pupa/loader.h: Likewise.
12868         * include/pupa/misc.h: Likewise.
12869         * include/pupa/mm.h: Likewise.
12870         * include/pupa/net.h: Likewise.
12871         * include/pupa/normal.h: Likewise.
12872         * include/pupa/rescue.h: Likewise.
12873         * include/pupa/setjmp.h: Likewise.
12874         * include/pupa/symbol.h: Likewise.
12875         * include/pupa/term.h: Likewise.
12876         * include/pupa/types.h: Likewise.
12877         * include/pupa/i386/setjmp.h: Likewise.
12878         * include/pupa/i386/types.h: Likewise.
12879         * include/pupa/i386/pc/biosdisk.h: Likewise.
12880         * include/pupa/i386/pc/boot.h: Likewise.
12881         * include/pupa/i386/pc/console.h: Likewise.
12882         * include/pupa/i386/pc/init.h: Likewise.
12883         * include/pupa/i386/pc/kernel.h: Likewise.
12884         * include/pupa/i386/pc/linux.h: Likewise.
12885         * include/pupa/i386/pc/loader.h: Likewise.
12886         * include/pupa/i386/pc/memory.h: Likewise.
12887         * include/pupa/i386/pc/multiboot.h: Likewise.
12888         * include/pupa/i386/pc/partition.h: Likewise.
12889         * include/pupa/i386/pc/time.h: Likewise.
12890         * include/pupa/i386/pc/vga.h: Likewise.
12891         * include/pupa/i386/pc/util/biosdisk.h: Likewise.
12892         * include/pupa/util/getroot.h: Likewise.
12893         * include/pupa/util/misc.h: Likewise.
12894         * include/pupa/util/resolve.h: Likewise.
12895         * kern/device.c: Likewise.
12896         * kern/disk.c: Likewise.
12897         * kern/dl.c: Likewise.
12898         * kern/err.c: Likewise.
12899         * kern/file.c: Likewise.
12900         * kern/fs.c: Likewise.
12901         * kern/loader.c: Likewise.
12902         * kern/main.c: Likewise.
12903         * kern/misc.c: Likewise.
12904         * kern/mm.c: Likewise.
12905         * kern/rescue.c: Likewise.
12906         * kern/term.c: Likewise.
12907         * kern/i386/dl.c: Likewise.
12908         * kern/i386/pc/init.c: Likewise.
12909         * kern/i386/pc/lzo1x.S: Likewise.
12910         * kern/i386/pc/startup.S: Likewise.
12911         * loader/i386/pc/chainloader.c: Likewise.
12912         * loader/i386/pc/linux.c: Likewise.
12913         * loader/i386/pc/multiboot.c: Likewise.
12914         * normal/cmdline.c: Likewise.
12915         * normal/command.c: Likewise.
12916         * normal/main.c: Likewise.
12917         * normal/menu.c: Likewise.
12918         * normal/i386/setjmp.S: Likewise.
12919         * term/i386/pc/console.c: Likewise.
12920         * term/i386/pc/vga.c: Likewise.
12921         * util/console.c: Likewise.
12922         * util/genmoddep.c: Likewise.
12923         * util/misc.c: Likewise.
12924         * util/pupa-emu.c: Likewise.
12925         * util/resolve.c: Likewise.
12926         * util/unifont2pff.rb: Likewise.
12927         * util/i386/pc/biosdisk.c: Likewise.
12928         * util/i386/pc/getroot.c: Likewise.
12929         * util/i386/pc/pupa-mkimage.c: Likewise.
12930         * util/i386/pc/pupa-setup.c: Likewise.
12932 2004-02-15  Jeroen Dekkers  <jeroen@dekkers.cx>
12934         * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
12935         when it is EXT2_BLOCK_SIZE (data).  New argument READ_HOOK, all
12936         callers changed.  Set DATA->DISK->READ_HOOK to READ_HOOK before
12937         reading and reset it after reading.
12938         (pupa_ext2_close): Return PUPA_ERR_NONE.
12940         * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
12941         Correct value.
12942         (struct linux_kernel_header): Add kernel_version and
12943         initrd_addr_max.
12944         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
12945         pupa_file_read succeeds.
12946         (pupa_rescue_cmd_initrd): Implement.
12948 2003-12-03  Marco Gerards  <metgerards@student.han.nl>
12950         * fs/ext2.c (pupa_ext2_label): New function.
12951         (pupa_ext2_fs): Added label.
12952         * fs/fat.c (pupa_fat_label): New function.
12953         (pupa_fat_fs): Added label.
12954         * include/pupa/fs.h (struct pupa_fs): Added prototype label.
12956         * kern/misc.c (pupa_strndup): New function.
12957         * include/pupa/misc.h (pupa_strndup): New prototype.
12959         * include/pupa/normal.h: Include <pupa/err.h>.
12960         (pupa_set_history): New prototype.
12961         (pupa_iterate_commands): New prototype.
12962         * normal/cmdline.c: Include <pupa/machine/partition.h>,
12963         <pupa/disk.h>, <pupa/file.h>.
12964         (hist_size): New variable.
12965         (hist_lines): Likewise.
12966         (hist_end): Likewise.
12967         (hist_used): Likewise.
12968         (pupa_set_history): New function.
12969         (pupa_history_get): Likewise.
12970         (pupa_history_add): Likewise.
12971         (pupa_history_replace): Likewise.
12972         (pupa_tab_complete): Likewise.
12973         (pupa_cmdline_run): Added tab completion and history buffer.  Tab
12974         completion shows partitionnames while completing partitions, this
12975         feature was suggested by Jeff Bailey.
12976         * normal/command.c (pupa_iterate_commands): New function.
12977         * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
12978         (pupa_normal_init): Initialize history buffer.
12979         (PUPA_MOD_INIT): Likewise.
12980         (pupa_normal_fini): Free the history buffer.
12981         (PUPA_MOD_FINI): Likewise.
12983         * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
12984         key.
12986         * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
12987         * configure.ac [i386]: Check for regparam bug.
12988         (NESTED_FUNC_ATTR) [! i386]: Defined.
12990 2003-11-17  Marco Gerards  <metgerards@student.han.nl>
12992         * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
12993         (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
12994         (pupa_emu_SOURCES): New variable.
12995         (pupa_emu_LDFLAGS): Likewise.
12996         * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
12997         (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
12998         * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
12999         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
13000         * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
13001         (pupa_jmp_buf): New typedef.
13002         (pupa_setjmp) [PUPA_UTIL]: New macro.
13003         (pupa_longjmp) [PUPA_UTIL]: Likewise.
13004         * include/pupa/term.h (struct pupa_term): New member `refresh'.
13005         (pupa_refresh): New prototype.
13006         * include/pupa/util/getroot.h: New file.
13007         * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
13008         it.
13009         * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
13010         (pupa_rescue_cmd_cat): Likewise.
13011         (pupa_rescue_cmd_ls): Likewise.
13012         (pupa_rescue_cmd_testload): Likewise.
13013         (pupa_rescue_cmd_lsmod): Likewise.
13014         * normal/cmdline.c (pupa_cmdline_get): Likewise.
13015         * normal/menu.c (run_menu): Likewise.
13016         * kern/term.c (pupa_cls): Likewise.
13017         (pupa_refresh): New function.
13018         * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
13019         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
13020         * util/console.c: New file.
13022         * util/i386/pc/getroot.c: New file.
13023         * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
13024         (pupa_putchar): New function.
13025         (pupa_refresh): Likewise.
13026         (xgetcwd): Function moved to ...
13027         (strip_extra_slashes): Likewise.
13028         (get_prefix): Likewise.
13029         * util/i386/pc/getroot.c: ... here.
13030         (find_root_device): Function moved and renamed to...
13031         * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
13032         Changed all callers.
13033         * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
13034         and renamed to...
13035         * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
13036         Changed all callers.
13037         * util/misc.c (pupa_memalign): New function.
13038         (pupa_mm_init_region): Likewise.
13039         (pupa_register_exported_symbols): Likewise.
13040         (pupa_putchar): Function removed.
13041         * util/pupa-emu.c: New file.
13043 2003-11-16  Jeroen Dekkers  <jeroen@dekkers.cx>
13045         * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
13046         (_multiboot_mod_SOURCES): New variable.
13047         (_multiboot_mod_CFLAGS): Likewise.
13048         * loader/i386/pc/multiboot.c: New file.
13049         * include/pupa/i386/pc/multiboot.h: Likewise.
13050         * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
13051         (pupa_multiboot_real_boot): New function.
13052         * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
13053         (pupa_multiboot_real_boot): New prototype.
13054         (pupa_rescue_cmd_multiboot): Likewise
13055         (pupa_rescue_cmd_module): Likewise.
13057         * kern/loader.c (pupa_loader_set): Continue when
13058         pupa_loader_unload_func() fails.
13059         (pupa_loader_unset): New function.
13060         * include/pupa/loader.h (pupa_loader_unset): New prototype.
13062         * kern/misc.c (pupa_stpcpy): New function.
13063         * include/pupa/misc.h (pupa_stpcpy): New prototype.
13065 2003-11-12  Marco Gerards  <metgerards@student.han.nl>
13067         * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
13068         for available extensions.
13070         * include/pupa/i386/pc/time.h: New file.
13071         * kern/disk.c: Include <pupa/machine/time.h>.
13072         (PUPA_CACHE_TIMEOUT): New macro.
13073         (pupa_last_time): New variable.
13074         (pupa_disk_open): Flush the cache when there was a timeout.
13075         (pupa_disk_close): Reset the timer.
13076         * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
13077         pupa_currticks.
13078         * util/misc.c: Include <sys/times.h>
13079         (pupa_get_rtc): New function.
13081 2003-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
13083         * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
13084         as blocks.
13085         (pupa_ext2_get_file_block): Use blocks member.
13087         * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
13088         first block. Return -1 instead of pupa_errno on error.
13090 2003-10-27  Marco Gerards  <metgerards@student.han.nl>
13092         * README: In the pupa-mkimage example use _chain instead of chain
13093         and ext2 instead of fat.
13094         * TODO: Replace ext2fs with jfs as an example.  Add an item for
13095         adding journal playback for ext2fs.
13096         * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
13097         (pkgdata_MODULES): Added ext2.mod.
13098         (ext2_mod_SOURCES): New variable.
13099         (ext2_mod_CFLAGS): Likewise.
13100         * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
13101         * include/pupa/misc.h (pupa_strncpy): New prototype.
13102         (pupa_strcat): Likewise.
13103         (pupa_strncmp): Likewise.
13104         * kern/misc.c (pupa_strcat): Enable function.
13105         (pupa_strncpy): New function.
13106         (pupa_strncmp): Likewise.
13107         * fs/ext2.c: New file.
13109         * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
13110         when the read failed before retrying.
13111         * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
13112         (_FILE_OFFSET_BITS): Likewise.
13113         * configure.ac: Added AC_SYS_LARGEFILE.
13115 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
13117         * genmk.rb (PModule#rule): Make sure to get only symbol names
13118         from the output of nm.
13119         Reported by Robert Millan <zeratul2@wanadoo.es>.
13121 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
13123         I forgot to check in these changes for a long time. This adds
13124         incomplete support for VGA console, and this is still very
13125         buggy. Also, a lot of consideration is required for I18N,
13126         UNICODE, and VGA font issues. Therefore, assume that this is
13127         such that "better than nothing".
13129         * font/manager.c: New file.
13130         * include/pupa/font.h: Likewise.
13131         * include/pupa/i386/pc/vga.h: Likewise.
13132         * term/i386/pc/vga.c: Likewise.
13133         * util/unifont2pff.rb: Likewise.
13135         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
13136         (pkgdata_MODULES): Added vga.mod and font.mod.
13137         (vga_mod_SOURCES): New variables.
13138         (vga_mod_CFLAGS): Likewise.
13139         (font_mod_SOURCES): Likewise.
13140         (font_mod_CFLAGS): Likewise.
13142         * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
13144         * include/pupa/term.h: Include pupa/err.h.
13145         (struct pupa_term): Added init and fini.
13146         Changed the argument of putchar to pupa_uint32_t.
13148         * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
13149         (pupa_console_real_putchar): New prototype.
13150         (pupa_console_putchar): Removed.
13151         (pupa_console_checkkey): Exported.
13152         (pupa_console_getkey): Likewise.
13154         * kern/misc.c (pupa_vsprintf): Add support for UNICODE
13155         characters.
13157         * kern/term.c (pupa_term_set_current): Rewritten.
13158         (pupa_putchar): Likewise.
13159         (pupa_putcode): New function.
13161         * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
13162         (pupa_console_real_putchar): ... this.
13163         (pupa_vga_set_mode): New function.
13164         (pupa_vga_get_font): Likewise.
13166         * normal/command.c: Include pupa/term.h.
13167         (terminal_command): New function.
13168         (pupa_command_init): Register the command "terminal".
13170         * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
13171         (DISP_UP): Likewise.
13172         (DISP_RIGHT): Likewise.
13173         (DISP_DOWN): Likewise.
13174         (DISP_HLINE): Likewise.
13175         (DISP_VLINE): Likewise.
13176         (DISP_UL): Likewise.
13177         (DISP_UR): Likewise.
13178         (DISP_LL): Likewise.
13179         (DISP_LR): Likewise.
13181         * term/i386/pc/console.c (pupa_console_putchar): New function.
13183 2003-02-08  NIIBE Yutaka  <gniibe@m17n.org>
13185         * util/resolve.c (pupa_util_resolve_dependencies): BUG
13186         FIX. Reverse the path_list.
13188         * include/pupa/normal.h: Export pupa_register_command and
13189         pupa_unregister_command.
13191         * hello/hello.c (pupa_cmd_hello): New module.
13192         * conf/i386-pc.rmk: Added hello.mod.
13194 2003-01-31  Yoshinori K. Okuji  <okuji@enbug.org>
13196         * kern/i386/pc/lzo1x.S: New file.
13198         * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
13199         (compress_kernel): New variable.
13200         (generate_image): Heavily modified to support compressing a
13201         large part of the core image.
13203         * util/misc.c (pupa_util_read_image): Fix a file descriptor
13204         leak.
13205         (pupa_util_load_image): New function.
13207         * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
13208         (pupa_compressed_size): New variable.
13209         (codestart): Enable Gate A20 here.
13210         Decompress the compressed part of the core image.
13211         Rearrange the code to put functions and variables which are
13212         required for initialization in the non-compressed part.
13213         Include lzo1x.S.
13215         * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
13216         here.
13218         * include/pupa/util/misc.h (pupa_util_write_image): Declared.
13220         * include/pupa/i386/pc/kernel.h
13221         (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
13222         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
13223         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
13224         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
13225         (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
13227         * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
13229         * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
13230         (Utility#rule): Likewise.
13232         * configure.ac: Check if LZO is available.
13234 2003-01-20  Yoshinori K. Okuji  <okuji@enbug.org>
13236         * include/pupa/normal.h: New file.
13237         * include/pupa/setjmp.h: Likewise.
13238         * include/pupa/i386/setjmp.h: Likewise.
13239         * normal/cmdline.c: Likewise.
13240         * normal/command.c: Likewise.
13241         * normal/main.c: Likewise.
13242         * normal/menu.c: Likewise.
13243         * normal/i386/setjmp.S: Likewise.
13245         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
13246         (pupa_rescue_cmd_initrd): Likewise.
13248         * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
13249         Likewise.
13251         * kern/i386/pc/startup.S (translation_table): New variable.
13252         (translate_keycode): New function.
13253         (pupa_console_getkey): Call translate_keycode.
13255         * kern/rescue.c (attempt_normal_mode): New function.
13256         (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
13257         it failed, print a message.
13259         * kern/mm.c (pupa_real_malloc): Print more information when a
13260         free magic is broken.
13261         (pupa_free): If the first free header is not free actually, set
13262         it to P.
13264         * kern/main.c (pupa_load_normal_mode): Just load the module
13265         "normal".
13266         (pupa_main): Don't print the message
13267         "Entering into rescue mode..." here.
13269         * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
13270         Declared.
13271         (pupa_rescue_cmd_initrd): Likewise.
13272         (pupa_rescue_cmd_initrd): Likewise.
13274         * include/pupa/symbol.h (FUNCTION): Specify the type.
13275         (VARIABLE): Likewise.
13277         * include/pupa/err.h (pupa_err_t): Added
13278         PUPA_ERR_UNKNOWN_COMMAND.
13280         * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
13281         (pupa_dl_get_prefix): Likewise.
13283         * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
13284         Added _chain.mod and _linux.mod instead of chain.mod and
13285         linux.mod.
13286         (chain_mod_SOURCES): Renamed to ...
13287         (_chain_mod_SOURCES): ... this.
13288         (chain_mod_CFLAGS): Renamed to ...
13289         (_chain_mod_CFLAGS): ... this.
13290         (linux_mod_SOURCES): Renamed to ...
13291         (_linux_mod_SOURCES): ... this.
13292         (linux_mod_CFLAGS): Renamed to ...
13293         (_linux_mod_CFLAGS): ... this.
13294         (normal_mod_SOURCES): New variable.
13295         (normal_mod_CFLAGS): Likewise.
13296         (normal_mod_ASFLAGS): Likewise.
13298 2003-01-18  Yoshinori K. Okuji  <okuji@enbug.org>
13300         * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
13301         possible.
13303         * kern/dl.c (pupa_dl_ref): Refer depending modules
13304         recursively.
13305         (pupa_dl_unref): Unrefer depending modules recursively.
13306         Don't call pupa_dl_unload implicitly, because PUPA can crash if
13307         a module is unloaded before one depending on that module is
13308         unloaded.
13309         (pupa_dl_unload): Unload depending modules explicitly,
13310         if possible.
13312 2003-01-17  Yoshinori K. Okuji  <okuji@enbug.org>
13314         * include/pupa/i386/pc/linux.h: New file.
13315         * loader/i386/pc/linux.c: Likewise.
13317         * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
13318         Removed.
13319         (pupa_chainloader_unload): Return PUPA_ERR_NONE.
13320         (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
13321         of PUPA_CHAINLOADER_BOOT_SECTOR.
13323         * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
13324         (pupa_linux_prot_size): New variable.
13325         (pupa_linux_tmp_addr): Likewise.
13326         (pupa_linux_real_addr): Likewise.
13327         (pupa_linux_boot_zimage): New function.
13328         (pupa_linux_boot_bzimage): Likewise.
13330         * kern/i386/pc/init.c (struct mem_region): New structure.
13331         (MAX_REGIONS): New macro.
13332         (mem_regions): New variable.
13333         (num_regions): Likewise.
13334         (pupa_os_area_addr): Likewise.
13335         (pupa_os_area_size): Likewise.
13336         (pupa_lower_mem): Likewise.
13337         (pupa_upper_mem): Likewise.
13338         (add_mem_region): New function.
13339         (compact_mem_regions): Likewise.
13340         (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
13341         the size of the conventional memory and that of so-called upper
13342         memory (before the first memory hole).
13343         Instead of adding each found region to free memory, use
13344         add_mem_region and add them after removing overlaps.
13345         Also, add only 1/4 of the upper memory to free memory. The rest
13346         is used for loading OS images. Maybe this is ad hoc, but this
13347         makes it much easier to relocate OS images when booting.
13349         * kern/rescue.c (pupa_rescue_cmd_module): Removed.
13350         (pupa_enter_rescue_mode): Don't register initrd and module.
13352         * kern/mm.c: Include pupa/dl.h.
13354         * kern/main.c: Include pupa/file.h and pupa/device.h.
13356         * kern/loader.c (pupa_loader_load_module_func): Removed.
13357         (pupa_loader_load_module): Likewise.
13359         * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
13360         ``.o''.
13362         * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
13363         (pupa_linux_tmp_addr): Likewise.
13364         (pupa_linux_real_addr): Likewise.
13365         (pupa_linux_boot_zimage): Likewise.
13366         (pupa_linux_boot_bzimage): Likewise.
13368         * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
13369         (pupa_upper_mem): Likewise.
13370         (pupa_gate_a20): Don't export, because turning off Gate A20 in a
13371         module is too dangerous.
13373         * include/pupa/loader.h (pupa_os_area_addr): Declared.
13374         (pupa_os_area_size): Likewise.
13375         (pupa_loader_set): Remove the first argument. Loader doesn't
13376         manage modules or initrd any longer.
13377         (pupa_loader_load_module): Removed.
13379         * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
13380         (linux_mod_SOURCES): New variable.
13381         (linux_mod_CFLAGS): Likewise.
13383 2003-01-07  Yoshinori K. Okuji  <okuji@enbug.org>
13385         * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
13386         the length of a blocklist correctly.
13388         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
13389         Use ioctl only if the OS file is a block device.
13390         (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
13391         not very useful for normal files.
13393         * kern/main.c (pupa_set_root_dev): New function.
13394         (pupa_load_normal_mode): Likewise.
13395         (pupa_main): Call those above.
13397         * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
13398         pupa_uint16_t.
13400         * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
13402 2003-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
13404         * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
13405         (setup): Configure the installed partition information and the
13406         dl prefix.
13408         * loader/i386/pc/chainloader.c (my_mod): New variable.
13409         (pupa_chainloader_unload): New function.
13410         (pupa_rescue_cmd_chainloader): Refer itself.
13411         (PUPA_MOD_INIT): Save its own module in MY_MOD.
13413         * kern/i386/pc/startup.S (install_partition): Removed.
13414         (version_string): Likewise.
13415         (config_file): Likewise.
13416         (pupa_install_dos_part): New variable.
13417         (pupa_install_bsd_part): Likewise.
13418         (pupa_prefix): Likewise.
13419         (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
13421         * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
13422         and pupa/misc.h.
13423         (make_install_device): New function.
13424         (pupa_machine_init): Set the dl prefix.
13426         * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
13427         (buf): Renamed to ...
13428         (linebuf): ... this.
13429         (pupa_rescue_cmd_prefix): New function.
13430         (pupa_rescue_cmd_insmod): Likewise.
13431         (pupa_rescue_cmd_rmmod): Likewise.
13432         (pupa_rescue_cmd_lsmod): Likewise.
13433         (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
13434         rmmod and lsmod.
13436         * kern/mm.c (pupa_memalign): If failed even after invalidating
13437         disk caches, unload unneeded modules and retry.
13439         * kern/misc.c (pupa_memmove): New function.
13440         (pupa_memcpy): Removed.
13441         (pupa_strcpy): New function.
13442         (pupa_itoa): Made static.
13444         * kern/dl.c (pupa_dl_iterate): New function.
13445         (pupa_dl_ref): Likewise.
13446         (pupa_dl_unref): Likewise.
13447         (pupa_dl_unload): Return if succeeded or not.
13448         (pupa_dl_unload_unneeded): New function.
13449         (pupa_dl_unload_all): Likewise.
13450         (pupa_dl_init): Renamed to ...
13451         (pupa_dl_set_prefix): ... this.
13452         (pupa_dl_get_prefix): New function.
13454         * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
13455         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
13456         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
13457         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
13458         (pupa_install_dos_part): Declared.
13459         (pupa_install_bsd_part): Likewise.
13460         (pupa_prefix): Likewise.
13461         (pupa_boot_drive): Likewise.
13463         * include/pupa/types.h: Fix a typo.
13465         * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
13466         pupa_memmove.
13467         (pupa_memmove): Declared.
13468         (pupa_strcpy): Likewise.
13470         * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
13471         pupa_mod_init takes one argument, its own module.
13472         (pupa_dl_unload_unneeded): Declared.
13473         (pupa_dl_unload_all): Likewise.
13474         (pupa_dl_ref): Likewise.
13475         (pupa_dl_unref): Likewise.
13476         (pupa_dl_iterate): Likewise.
13477         (pupa_dl_init): Renamed to ...
13478         (pupa_dl_set_prefix): ... this.
13479         (pupa_dl_get_prefix): Declared.
13481         * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
13482         (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
13483         unloaded.
13484         (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
13485         (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
13487         * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
13488         -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
13490 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
13492         * util/i386/pc/pupa-setup.c (setup): Define the internal
13493         function find_first_partition_start at the top level, because GCC
13494         3.0.x cannot compile internal functions in deeper scopes
13495         correctly.
13496         (find_root_device): Use lstat instead of stat.
13497         Don't follow symbolic links.
13498         Fix the path-constructing code.
13500         * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
13501         (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
13502         by a BLKGETSIZE ioctl first, because block devices don't fill
13503         the member st_mode of the structure stat on Linux.
13504         [__linux__] (linux_find_partition): Use a temporary buffer
13505         REAL_DEV for the working space. Copy it to DEV before returning.
13506         (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
13507         buffer cache consistent.
13508         (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
13509         strncmp. The previous value was merely wrong.
13510         (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
13512         * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
13513         FAT size is 12. The previous value was merely wrong.
13515         * kern/main.c (pupa_main): Don't split the starting message from
13516         newlines.
13518         * kern/term.c (pupa_putchar): Put CR after LF instead of before
13519         LF, because BIOS goes crazy about character attributes in this
13520         case.
13522 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
13524         * include/i386/pc/util/biosdisk.h: New file.
13525         * util/i386/pc/biosdisk.c: Likewise.
13526         * util/i386/pc/pupa-setup.c: Likewise.
13528         * Makefile.in (INCLUDE_DISTFILES): Added
13529         include/pupa/i386/pc/util/biosdisk.h.
13530         (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
13531         directory util/i386/pc.
13532         (install-local): Added a rule for sbin_UTILITIES.
13533         (uninstall): Likewise.
13535         * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
13537         * util/misc.c (xrealloc): New function.
13538         (pupa_malloc): Likewise.
13539         (pupa_free): Likewise.
13540         (pupa_realloc): Likewise.
13541         (pupa_stop): Likewise.
13542         (pupa_putchar): Likewise.
13544         * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
13546         * include/pupa/util/misc.h (xrealloc): Declared.
13548         * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
13549         macro.
13550         (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
13551         (PUPA_BOOT_MACHINE_BPB_END): ... this.
13553         * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
13554         [PUPA_UTIL] (pupa_fat_fini): Likewise.
13556         * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
13557         way should be implemented.
13558         [PUPA_UTIL] (pupa_fat_fini): Likewise.
13560         * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
13561         the size of NAME for safety.
13562         (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
13563         0x88.
13565         * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
13566         (pupa_setup_SOURCES): Likewise.
13568         * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
13570 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
13572         * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
13573         bunch of pushl's from pusha, because this destroys the return
13574         value.
13576 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
13578         Use -mrtd and -mregparm=3 to reduce the generated code sizes.
13579         This means that any missing prototypes could be fatal. Also, you
13580         must take care when writing assembly code. See the comments at
13581         the beginning of startup.S, for more details.
13583         * kern/i386/pc/startup.S (pupa_halt): Modified for the new
13584         compilation mechanism.
13585         (pupa_chainloader_real_boot): Likewise.
13586         (pupa_biosdisk_rw_int13_extensions): Likewise.
13587         (pupa_biosdisk_rw_standard): Likewise.
13588         (pupa_biosdisk_check_int13_extensions): Likewise.
13589         (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
13590         (pupa_biosdisk_get_diskinfo_standard): Likewise.
13591         (pupa_get_memsize): Likewise.
13592         (pupa_get_mmap_entry): Likewise.
13593         (pupa_console_putchar): Likewise.
13594         (pupa_console_setcursor): Likewise.
13595         (pupa_getrtsecs): Use pushl instead of push.
13597         * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
13598         memory instead of the stack for a mmap entry, because some
13599         BIOSes may ignore the maximum size and overflow.
13601         * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
13603         * genmk.rb (PModule#rule): Compile automatically generated
13604         sources with module-specific CFLAGS as well as other sources.
13606 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
13608         * configure.ac: Check ld.
13609         Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
13610         respectively, before checking endianness and sizes.
13612         * Makefile.in (LD): New variable.
13614 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
13616         * Makefile.in (BUILD_CC): CC -> BUILD_CC.
13618 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
13620         * Changelog: New file.