2008-11-08 Robert Millan <rmh@aybabtu.com>
[grub2/phcoder.git] / ChangeLog
blob8302276fccc915774d0f9715a8db1c7282ea7ac4
1 2008-11-08  Robert Millan  <rmh@aybabtu.com>
3         * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
4         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
5         members.  Update all users.
6         * util/console.c (grub_ncurses_term): Split in ...
7         (grub_ncurses_term_input): ... this, and ...
8         (grub_ncurses_term_output): ... this.  Update all users.
10 2008-11-08  Robert Millan  <rmh@aybabtu.com>
12         * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
13         (PKGDATA): Add $(pkgdata_SRCDIR).
14         (pkglib_BUILDDIR): New variable.
15         (pkgdata_SRCDIR): New variable.
16         (build_env.mk): New target.
17         (include_DATA): New variable.
18         (install-local): Install $(include_DATA) files in $(includedir).
20 2008-11-07  Pavel Roskin  <proski@gnu.org>
22         * gendistlist.sh: Use C locale for sorting to ensure consistent
23         output on all systems.
25         * util/grub.d/00_header.in: Remove incorrect space before
26         "serial".
28 2008-11-07  Robert Millan  <rmh@aybabtu.com>
30         * include/multiboot2.h (struct multiboot_header): Add `flags' member as
31         per specification.
32         * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
33         * loader/multiboot_loader.c (find_multi_boot2_header): New function
34         (based on find_multi_boot1_header).
35         (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
36         using find_multi_boot2_header(), and abort if neither Multiboot or
37         Multiboot headers were found.
39 2008-11-07  Robert Millan  <rmh@aybabtu.com>
41         Modularize at_keyboard.mod:
43         * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
44         (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
45         (at_keyboard_mod_LDFLAGS): New variables.
47         Actual terminal split:
49         * include/grub/term.h (struct grub_term): Split in ...
50         (struct grub_term_input): ... this, and ...
51         (struct grub_term_output): ... this.  Update all users.
52         (grub_term_set_current): Split in ...
53         (grub_term_set_current_input): ... this, and ...
54         (grub_term_set_current_output): ... this.
55         (grub_term_get_current): Split in ...
56         (grub_term_get_current_input): ... this, and ...
57         (grub_term_get_current_output): ... this.
58         (grub_term_register): Split in ...
59         (grub_term_register_input): ... this, and ...
60         (grub_term_register_output): ... this.
61         (grub_term_unregister): Split in ...
62         (grub_term_unregister_input): ... this, and ...
63         (grub_term_unregister_output): ... this.
64         (grub_term_iterate): Split in ...
65         (grub_term_iterate_input): ... this, and ...
66         (grub_term_iterate_output): ... this.
68         * kern/term.c (grub_term_list): Split in ...
69         (grub_term_list_input): ... this, and ...
70         (grub_term_list_output): ... this.  Update all users.
71         (grub_cur_term): Split in ...
72         (grub_cur_term_input): ... this, and ...
73         (grub_cur_term_output): ... this.  Update all users.
74         (grub_term_set_current): Split in ...
75         (grub_term_set_current_input): ... this, and ...
76         (grub_term_set_current_output): ... this.
77         (grub_term_get_current): Split in ...
78         (grub_term_get_current_input): ... this, and ...
79         (grub_term_get_current_output): ... this.
80         (grub_term_register): Split in ...
81         (grub_term_register_input): ... this, and ...
82         (grub_term_register_output): ... this.
83         (grub_term_unregister): Split in ...
84         (grub_term_unregister_input): ... this, and ...
85         (grub_term_unregister_output): ... this.
86         (grub_term_iterate): Split in ...
87         (grub_term_iterate_input): ... this, and ...
88         (grub_term_iterate_output): ... this.
90         * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
91         a check for input and one for output (and only attempt to get keys
92         from user when input works).
94         * util/grub-probe.c (grub_term_get_current): Split in ...
95         (grub_term_get_current_input): ... this, and ...
96         (grub_term_get_current_output): ... this.
97         * util/grub-fstest.c: Likewise.
98         * util/i386/pc/grub-setup.c: Likewise.
99         * util/grub-editenv.c: Likewise.
101         Portability adjustments:
103         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
104         `term/i386/pc/at_keyboard.c'.
105         * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
106         grub_keyboard_controller_init() (now handled by terminal .init).
107         * kern/i386/coreboot/init.c (grub_machine_init): Add call to
108         grub_at_keyboard_init().
109         * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
110         (grub_console_checkkey, grub_console_getkey): Remove (now provided by
111         at_keyboard.mod via input terminal interface).
112         * include/grub/i386/coreboot/console.h: Convert into a stub for
113         `<grub/i386/pc/console.h>'.
115         Migrate full terminals to new API:
117         * term/efi/console.c (grub_console_term): Split into ...
118         (grub_console_term_input): ... this, and ...
119         (grub_console_term_output): ... this.  Update all users.
120         * term/ieee1275/ofconsole.c: Remove __i386__ hack.
121         (grub_ofconsole_init): Split into ...
122         (grub_ofconsole_init_input): ... this, and ...
123         (grub_ofconsole_init_output): ... this.
124         (grub_ofconsole_term): Split into ...
125         (grub_ofconsole_term_input): ... this, and ...
126         (grub_ofconsole_term_output): ... this.  Update all users.
127         * term/i386/pc/serial.c (grub_serial_term): Split into ...
128         (grub_serial_term_input): ... this, and ...
129         (grub_serial_term_output): ... this.  Update all users.
130         * term/i386/pc/console.c (grub_console_term): Split into ...
131         (grub_console_term_input): ... this, and ...
132         (grub_console_term_output): ... this.  Update all users.
133         (grub_console_term_input): Only enable it on PC/BIOS platform.
134         (grub_console_init): Remove grub_keyboard_controller_init() call.
136         Migrate input terminals to new API:
138         * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
139         `i386' and `i386/pc' to enable build on x86_64 (this driver is
140         i386-specific anyway).
141         (grub_console_checkkey): Rename to ...
142         (grub_at_keyboard_checkkey): ... this.  Static-ize.  Update all
143         users.
144         (grub_keyboard_controller_orig): New variable.
145         (grub_console_getkey): Rename to ...
146         (grub_at_keyboard_getkey): ... this.  Static-ize.  Update all
147         users.
148         (grub_keyboard_controller_init): Static-ize.  Save original
149         controller value so that it can be restored ...
150         (grub_keyboard_controller_fini): ... here (new function).
151         (grub_at_keyboard_term): New structure.
152         (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
153         functions.
155         Migrate output terminals to new API:
157         * term/i386/pc/vga.c (grub_vga_term): Change type to
158         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
159         members.  Update all users.
160         * term/gfxterm.c (grub_video_term): Change type to
161         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
162         members.  Update all users.
163         * include/grub/i386/pc/console.h (grub_console_checkkey)
164         (grub_console_getkey): Do not export (no longer needed by gfxterm,
165         etc).
167         Migrate `terminal' command and userland tools to new API:
169         * commands/terminal.c (grub_cmd_terminal): Split into ...
170         (grub_cmd_terminal_input): ... this, and ...
171         (grub_cmd_terminal_output): ... this.
172         (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
173         `terminal_input' and `terminal_output'.
174         * util/grub.d/00_header.in: Adjust `terminal' calls to new
175         `terminal_input' / `terminal_output' API.
176         * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
177         ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
178         provided ${GRUB_TERMINAL}, convert it).
180 2008-11-04  Robert Millan  <rmh@aybabtu.com>
182         * util/grub.d/10_freebsd.in: New file.  Generate grub configuration
183         for FreeBSD.
184         * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
186 2008-11-03  Bean  <bean123ch@gmail.com>
188         * kern/elf.c (grub_elf32_load): Revert to previous code.
189         (grub_elf64_load): Likewise.
191         * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
193 2008-11-01  Robert Millan  <rmh@aybabtu.com>
195         * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
196         (TARGET_CPPFLAGS): Likewise.
197         * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
199 2008-11-01  Carles Pina i Estany  <carles@pina.cat>
201         * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
203 2008-10-29  Guillem Jover <guillem.jover@nokia.com>
205         * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
206         addition of objects until the code is not going to be able to fail.
208 2008-10-29  Guillem Jover <guillem.jover@nokia.com>
210         * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
211         (add a missing NULL check, and correct them by moving the pointer
212         operations after the actual check).
214 2008-10-29  Robert Millan  <rmh@aybabtu.com>
216         * util/i386/pc/grub-install.in: Handle empty string as output from
217         make_system_path_relative_to_its_root().
219 2008-10-05  Hans Lambermont  <hans@lambermont.dyndns.org>
221         * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
222         circular metadata worst case scenario. If the metadata is circular
223         then copy the wrap in place.
224         * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
225         project lib/format_text/layout.h
226         Circular metadata bug found and patch debugged by Jan Derk Gerlings.
228 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
230         * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
232 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
234         * util/update-grub_lib.in: Mention filename in warning message.
236 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
238         * NEWS: Update for rename of update-grub to grub-mkconfig.
240 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
242         * util/update-grub_lib.in: Copy to ...
243         * util/grub-mkconfig_lib.in: ... this.  Update all users.
244         * util/update-grub_lib.in: Make it a stub to `grub-mkconfigig_lib.in'.
245         * util/update-grub.in: Rename to ...
246         * util/grub-mkconfig.in: ... this.  Update all users.  Remove `-y'
247         option. Add `--output' option to allow users to specify the generated
248         configuration file.  Default to stdout.
249         (update_grub_dir): Rename to ...
250         (grub_mkconfig_dir): ... this.
251         (grub_cfg): Default to an empty string.
252         * conf/common.rmk (update-grub): Rename to ...
253         (grub-mkconfig): ... this.
254         (update-grub_lib): Copy to ...
255         (grub-mkconfig_lib): ... this.
256         (update-grub_SCRIPTS): Copy to ...
257         (grub-mkconfig_SCRIPTS): ... this. Update all users.
258         (update-grub_DATA): Rename to ...
259         (grub-mkconfig_DATA): ... this.
261 2008-09-28  Robert Millan  <rmh@aybabtu.com>
263         * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
264         to `modified'.  Add the real `created' field.
265         (grub_iso9660_uuid): Use `modified' rather than `created' for
266         constructing the UUID.
268 2008-09-28  Felix Zielcke  <fzielcke@z-51.de>
270         fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
271         Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
273 2008-09-28  Bean  <bean123ch@gmail.com>
275         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
276         Thanks to Christian Franke for finding this bug.
278 2008-09-25  Robert Millan  <rmh@aybabtu.com>
280         * util/grub-mkdevicemap.c (make_device_map): Actually replace all
281         instances of grub_util_get_disk_name() (see previous commit).
283 2008-09-25  Robert Millan  <rmh@aybabtu.com>
285         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
286         `util/i386/get_disk_name.c'.
287         * conf/i386-efi.rmk: Likewise.
288         * conf/x86_64-efi.rmk: Likewise.
289         * conf/i386-coreboot.rmk: Likewise.
290         * conf/i386-ieee1275.rmk: Likewise.
291         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
292         `util/ieee1275/get_disk_name.c'.
293         * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
294         * util/ieee1275/get_disk_name.c: Remove file.
295         * util/i386/get_disk_name.c: Remove file.
296         * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
297         "hd%d" for device.map entries, rather than using
298         grub_util_get_disk_name().
300 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
302         * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
303         warning.
304         * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
306 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
308         * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
309         Changed to 0x5100.
310         (GRUB_TERM_PPAGE): Changed to 0x4900.
312 2008-09-24  Robert Millan  <rmh@aybabtu.com>
314         * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
315         macros (they were i386-pc specific).
316         * include/grub/sparc64/ieee1275/console.h: Likewise.
317         * include/grub/efi/console.h: Likewise.
319 2008-09-22  Bean  <bean123ch@gmail.com>
321         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
322         resident and in attribute list.
324         * include/grub/ntfs.h (BMP_LEN): Removed.
326 2008-09-22  Bean  <bean123ch@gmail.com>
328         * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
329         scsi->name and scsi->luns, as they will be set in grub_scsi_open.
331         * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
332         error occurs, as grub_disk_open will call grub_disk_close, which will
333         call p->close (scsi).
335 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
337         * configure.ac (AC_INIT): Quote `GRUB' string and version number.
338         (AC_PREREQ): Bumped to 2.59.
339         (AC_TRY_COMPILE): Replace obsolete macro with ...
340         (AC_COMPILE_IFELSE): ... this.
341         * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
342         (AC_LINK_IFELSE): ... this.
344 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
346         * autogen.sh: Add a call to `gendistlist.sh'.
348 2008-09-19  Christian Franke  <franke@computer.org>
350         * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
351         * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
352         * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
353         Export __enable_execute_stack() to modules.
354         * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
355         New function.
357 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
359         * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
360         Sort the list.
362 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
364         * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
365         #include <grub/util/hostdisk.h>.
367 2008-09-08  Robert Millan  <rmh@aybabtu.com>
369         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
370         segments when their filesz is zero (grub_file_read() interprets
371         zero-size as "read until EOF", which results in memory corruption).
372         Use `lowest_segment' rather than 0 for calculating the current
373         segment load address.
375 2008-09-08  Robert Millan  <rmh@aybabtu.com>
377         * util/hostdisk.c (open_device): Replace a grub_util_info() call
378         with grub_dprintf("hostdisk", ...), as it was so verbose that it
379         clobbered useful information.
381 2008-09-08  Robert Millan  <rmh@aybabtu.com>
383         * include/grub/util/biosdisk.h: Move to ...
384         * include/grub/util/hostdisk.h: ... here.  Update all users.
385         * util/biosdisk.c: Move to ...
386         * util/hostdisk.c: ... here.  Update all users.
388 2008-09-07  Robert Millan  <rmh@aybabtu.com>
390         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
391         variables.
392         (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
393         and length can be stored directly in the `mbi->mmap_addr' and
394         `mbi->mmap_length' struct fields.
396 2008-09-07  Robert Millan  <rmh@aybabtu.com>
398         * conf/i386.rmk: New file.  Provides declaration for building
399         `cpuid.mod'.
400         * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
401         (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
402         variables.
403         Include `conf/i386.mk'.
404         * conf/i386-efi.rmk: Likewise.
405         * conf/x86_64-efi.rmk: Likewise.
406         * conf/i386-coreboot.rmk: Likewise.
407         * conf/i386-ieee1275.rmk: Likewise.
409 2008-09-07  Vesa Jääskeläinen  <chaac@nic.fi>
411         Based on patch created by Colin D Bennett <colin@gibibit.com>.
412         Adds optimization support for BGR based modes.
414         * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
415         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
416         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
417         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
418         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
419         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
420         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
421         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
422         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
423         (grub_video_i386_vbeblit_index_index): Likewise.
424         (grub_video_i386_vbeblit_replace_directN): Added.
425         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
426         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
427         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
428         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
429         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
430         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
431         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
432         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
433         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
434         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
435         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
436         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
437         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
439         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
440         (grub_video_i386_vbefill_R8G8B8): Likewise.
441         (grub_video_i386_vbefill_index): Likewise.
442         (grub_video_i386_vbefill_direct32): Added.
443         (grub_video_i386_vbefill_direct24): Likewise.
444         (grub_video_i386_vbefill_direct16): Likewise.
445         (grub_video_i386_vbefill_direct8): Likewise.
447         * include/grub/video.h (grub_video_blit_format): Removed
448         GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
449         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
450         GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
451         GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
452         GRUB_VIDEO_BLIT_FORMAT_BGR_565.
454         * video/video.c (grub_video_get_blit_format): Updated to use new
455         blit formats.  Added handling for 16 bit color modes.
457         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
458         fillers.
459         (common_blitter): Updated to use new blitters.
461         * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
462         Removed.
463         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
464         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
465         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
466         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
467         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
468         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
469         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
470         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
471         (grub_video_i386_vbeblit_index_index): Likewise.
472         (grub_video_i386_vbeblit_replace_directN): Added.
473         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
474         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
475         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
476         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
477         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
478         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
479         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
480         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
481         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
482         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
483         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
484         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
485         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
487         * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
488         (grub_video_i386_vbefill_R8G8B8): Likewise.
489         (grub_video_i386_vbefill_index): Likewise.
490         (grub_video_i386_vbefill_direct32): Added.
491         (grub_video_i386_vbefill_direct24): Likewise.
492         (grub_video_i386_vbefill_direct16): Likewise.
493         (grub_video_i386_vbefill_direct8): Likewise.
495         * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
496         types.
498         * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
499         types.
501         * video/readers/png.c (grub_png_decode_image_header): Adapt to new
502         blitter types.
504         * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
505         types.
507 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
509         * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
510         RAID level 1.
512 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
514         * fs/iso9660.c (grub_iso9660_date): New structure.
515         (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
516         (grub_iso9660_uuid): New function.
518 2008-09-05  Bean  <bean123ch@gmail.com>
520         * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
522         * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
523         insensitive bit for names in Win32 and Win32 & DOS namespace.
525         * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
527         * include/grub/types.h (LONG_MAX): Likewise.
529 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
531         * util/getroot.c: Include <config.h>.
532         (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
533         add support for /dev/md/N devices and handle LVM double dash escaping.
535 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
537         * config.guess: Update to latest version from config git.
538         * config.sub: Likewise.
540 2008-09-03  Robert Millan  <rmh@aybabtu.com>
542         * disk/scsi.c (grub_scsi_open): Remove size limit when printing
543         `disk->total_sectors'.
545 2008-09-01  Colin D Bennett  <colin@gibibit.com>
547         * include/grub/normal.h: Fixed incorrect comment for
548         GRUB_COMMAND_FLAG_NO_ARG_PARSE.
550 2008-09-01  Colin D Bennett  <colin@gibibit.com>
552         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
553         values with defines.
555         * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
556         (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
557         (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
558         (GRUB_VBE_MODEATTR_COLOR): Likewise.
559         (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
560         (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
561         (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
562         (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
563         (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
564         (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
565         (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
566         (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
567         (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
568         (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
569         (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
570         (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
571         (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
572         (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
573         (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
575 2008-08-31  Robert Millan  <rmh@aybabtu.com>
577         * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
578         declaration.
579         (grub_multiboot): Fix a few warnings.
581 2008-08-31  Robert Millan  <rmh@aybabtu.com>
583         * loader/i386/pc/multiboot.c: Update comment not to say that
584         boot_device support is unimplemented.
586 2008-08-31  Robert Millan  <rmh@aybabtu.com>
588         * loader/i386/pc/multiboot.c: Update comment not to say that a.out
589         or memory map support are unimplemented.
591 2008-08-31  Colin D Bennett  <colin@gibibit.com>
593         * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
595 2008-08-31  Colin D Bennett  <colin@gibibit.com>
597         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
598         total video memory in 'vbeinfo' output; show color format details for
599         each video mode.
601 2008-08-30  Pavel Roskin  <proski@gnu.org>
603         * util/genmoddep.c: Remove for real this time.
604         * DISTLIST: Remove util/genmoddep.c.
606 2008-08-30  Robert Millan  <rmh@aybabtu.com>
608         * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
609         as required by Multiboot spec (it was already 4-byte aligned, but
610         only by chance).
612 2008-08-29  Pavel Roskin  <proski@gnu.org>
614         * kern/powerpc/ieee1275/crt0.S: Rename to ...
615         * kern/powerpc/ieee1275/startup.S: ... this.
616         * conf/powerpc-ieee1275.rmk: Adjust for the above.
617         * DISTLIST: Likewise.
619         * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
620         grub/cpu/kernel.h.  Add start label for consistency with other
621         platforms.  Add grub_prefix immediately after start.  Add jump
622         to the code after grub_prefix.
623         * include/grub/powerpc/kernel.h: Provide valid values for
624         GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
626 2008-08-29  Bean  <bean123ch@gmail.com>
628         * configure.ac: Change host_os to cygwin for mingw.
629         (asprintf): New check for function.
631         * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
632         #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
634         * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
635         declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
636         sync, sleep and grub_util_get_disk_size for mingw.
638         * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
639         to get size in mingw.
640         (open_device): Use flag O_BINARY if it's defined.
641         (find_root_device): Add dummy code for mingw.
643         * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
644         (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
645         (get_scsi_disk_name): Return 0 for mingw.
647         * util/hostfs.c: #include <grub/util/misc.h>.
648         (grub_hostfs_open): Use "rb" flag to open file, use
649         grub_util_get_disk_size to get disk size for mingw.
651         * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
652         (asprintf): New function if HAVE_ASPRINTF is not set.
653         (sync): New function for mingw.
654         (sleep): Likewise.
655         (grub_util_get_disk_size): Likewise.
657 2008-08-28  Pavel Roskin  <proski@gnu.org>
659         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
660         kern/time.c.
662 2008-08-28  Robert Millan  <rmh@aybabtu.com>
664         * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
666 2008-08-28  Robert Millan  <rmh@aybabtu.com>
668         Change find_grub_drive() syntax so it doesn't prevent it from
669         detecting NULL names as errors.
671         * util/biosdisk.c (find_grub_drive): Move free slot search code
672         from here ...
673         (find_free_slot): ... to here.
674         (read_device_map): Use find_free_slot() to search for free slots.
676 2008-08-27  Marco Gerards  <marco@gnu.org>
678         * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
679         (scsi_mod_SOURCES): New variable.
680         (scsi_mod_CFLAGS): Likewise
681         (scsi_mod_LDFLAGS): Likewise.
683         * disk/scsi.c: New file.
685         * include/grub/scsi.h: Likewise.
687         * include/grub/scsicmd.h: Likewise.
689         * disk/ata.c: Include <grub/scsi.h>.
690         (grub_atapi_packet): Do not use grub_ata_cmd, use registers
691         instead.
692         (grub_ata_iterate): Skip ATAPI devices.
693         (grub_ata_open): Only handle ATAPI devices.
694         (struct grub_atapi_read): Removed.
695         (grub_atapi_readsector): Likewise.
696         (grub_ata_read): No longer handle ATAPI devices.
697         (grub_ata_write): Likewise.
698         (grub_atapi_iterate): New function.
699         (grub_atapi_read): Likewise.
700         (grub_atapi_write): Likewise.
701         (grub_atapi_open): Likewise.
702         (grub_atapi_close): Likewise.
703         (grub_atapi_dev): New variable.
704         (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
705         (GRUB_MOD_FINI(ata)): Unregister ATAPI.
707         * include/grub/disk.h (enum grub_disk_dev_id): Add
708         `GRUB_DISK_DEVICE_SCSI_ID'.
710 2008-08-26  Robert Millan  <rmh@aybabtu.com>
712         * util/biosdisk.c (grub_util_biosdisk_open, open_device)
713         (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
714         descriptive.
716 2008-08-23  Bean  <bean123ch@gmail.com>
718         * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
719         (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
720         disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
721         (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
722         dm_nv.mod.
723         (raid5rec_mod_SOURCES): New macro.
724         (raid5rec_mod_CFLAGS): Likewise.
725         (raid5rec_mod_LDFLAGS): Likewise.
726         (raid6rec_mod_SOURCES): Likewise.
727         (raid6rec_mod_CFLAGS): Likewise.
728         (raid6rec_mod_LDFLAGS): Likewise.
729         (mdraid_mod_SOURCES): Likewise.
730         (mdraid_mod_CFLAGS): Likewise.
731         (mdraid_mod_LDFLAGS): Likewise.
732         (dm_nv_mod_SOURCES): Likewise.
733         (dm_nv_mod_CFLAGS): Likewise.
734         (dm_nv_mod_LDFLAGS): Likewise.
736         * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
737         (grub_emu_SOURCES):  Add disk/raid5_recover.c, disk/raid6_recover.c,
738         disk/mdraid_linux.c and disk/dmraid_nvidia.c.
740         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
741         disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
743         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
745         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
747         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
749         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
751         * disk/raid5_recover.c: New file.
753         * disk/raid6_recover.c: Likewise.
755         * disk/mdraid_linux.c: Likewise.
757         * disk/dmraid_nvidia.c: Likewise.
759         * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
760         ULONG_MAX.
762         * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
763         calculate the size of raid device.
764         (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
765         different layout of raid5.
766         (grub_raid_scan_device): Remove code specific to mdraid.
767         (grub_raid_list): New variable.
768         (free_array): New function.
769         (grub_raid_register): Likewise.
770         (grub_raid_unregister): Likewise.
771         (grub_raid_rescan): Likewise.
772         (GRUB_MOD_INIT): Don't iterate device here.
773         (GRUB_MOD_FINI): Use free_array to release resource.
775         * include/grub/raid.h: Remove macro and structure specific to mdraid.
776         (grub_raid5_recover_func_t): New function variable type.
777         (grub_raid6_recover_func_t): Likewise.
778         (grub_raid5_recover_func): New variable.
779         (grub_raid6_recover_func): Likewise.
780         (grub_raid_register): New function.
781         (grub_raid_unregister): Likewise.
782         (grub_raid_rescan): Likewise.
783         (grub_raid_block_xor): Likewise.
785         * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
786         (CMD_CRC): New macro.
787         (part): Removed.
788         (read_file): Handle device as well as file.
789         (cmd_crc): New function.
790         (fstest): Handle multiple disks.
791         (options): Remove part, raw and long, add root and diskcount.
792         (usage): Add crc, remove -p, -r, -l, add -r and -c.
793         (main): Find the first non option entry and ignore subsequence options,
794         add handling for the new options, support multiple disks.
796         * util/grub-probe.c (probe): Add mdraid to abstraction_name.
798 2008-08-23  Bean  <bean123ch@gmail.com>
800         * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
802         * genfslist.sh: Ignore kernel.mod.
804         * genpartmaplist.sh: Likewise.
806 2008-08-23  Robert Millan  <rmh@aybabtu.com>
808         * util/getroot.c (find_root_device): Skip anything that starts with
809         a dot, not just directories.  This avoids things like /dev/.tmp.md0.
811 2008-08-22  Felix Zielcke  <fzielcke@z-51.de>
813         * util/update-grub.in (GRUB_GFXMODE): Export variable.
814         * util/grub.d/00_header.in: Allow the administrator to change default
815         gfxmode via ${GRUB_GFXMODE}.
817 2008-08-21  Felix Zielcke  <fzielcke@z-51.de>
819         * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
821 2008-08-21  Robert Millan  <rmh@aybabtu.com>
823         * loader/i386/linux.c: New file.  Implements generic 32-bit Linux
824         loader.
825         * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
826         `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
828 2008-08-20  Carles Pina i Estany  <carles@pina.cat>
830         * menu/normal.c (run_menu): Replace hardcoded numbers with macros
831         (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
833 2008-08-19  Robert Millan  <rmh@aybabtu.com>
835         * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
836         (struct grub_virtual_screen): Remove `cursor_color'.
837         (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
838         initialization.
839         (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
841 2008-08-18  Robert Millan  <rmh@aybabtu.com>
843         Unify (identical) linux_normal.c files.
844         * loader/i386/efi/linux_normal.c: Move from here ...
845         * loader/linux_normal.c: ... to here.  Update all users.
846         * loader/i386/pc/linux_normal.c: Delete.  Update all users.
847         * loader/i386/ieee1275/linux_normal.c: Likewise.
849 2008-08-18  Robert Millan  <rmh@aybabtu.com>
851         * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
852         (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
853         (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
854         (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
855         (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
856         New macros.
857         (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
858         * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
859         (GRUB_LINUX_CL_END_OFFSET): ... to here.
860         * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
861         (GRUB_LINUX_CL_OFFSET): ... this.  Update all users.
862         (GRUB_EFI_CL_END_OFFSET): Rename to ...
863         (GRUB_LINUX_CL_END_OFFSET): ... this.  Update all users.
864         (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
865         Initialize `params->video_cursor_x' and `params->video_cursor_y'
866         portably using grub_getxy().
867         Replace `-EFI' with `-bzImage' in boot message.
869 2008-08-17  Robert Millan  <rmh@aybabtu.com>
871         * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
873 2008-08-17  Robert Millan  <rmh@aybabtu.com>
875         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
877         * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
878         (GRUB_MACHINE_MEMORY_RESERVED): New macros.
879         (grub_machine_mmap_iterate): New function declaration.
880         * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
881         structure.
882         (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
883         macros.
885         * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
886         type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
887         Move e820 parsing from here ...
888         * kern/i386/pc/mmap.c: New file.
889         (grub_machine_mmap_iterate): ... to here.
891         * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
892         (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
893         (GRUB_MACHINE_MEMORY_AVAILABLE): ... this.  Update all users.
894         (grub_available_iterate): Redeclare to return `void', and redeclare
895         its hook to use grub_uint64_t as addr and size parameters, and rename
896         to ...
897         (grub_machine_mmap_iterate): ... this.  Update all users.
899         * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
900         to make it more readable.  Rename to ...
901         (grub_machine_mmap_iterate): ... this.
903         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
904         (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
905         (grub_multiboot): Allocate an extra region after the payload, and fill
906         it with a Multiboot memory map.  Adjust a.out loader to calculate size
907         with the extra space.
908         (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
909         with the extra space.
911 2008-08-17  Carles Pina i Estany  <carles@pina.cat>
913         * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
915 2008-08-17  Felix Zielcke  <fzielcke@z-51.de>
917         * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
918         mdate-sh to the list `find' searches for.
919         * DISTLIST: Regenerated.
921 2008-08-16  Felix Zielcke  <fzielcke@z-51.de>
923         * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
924         genkernsyms.sh.  Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
925         genmoddep.awk, gensymlist.sh.in.
926         (DISTDIRS): Add bus, docs, hook, lib.
927         * DISTLIST: Regenerated.
928         * NEWS: Add cygwin support and change the `os-prober' entry a bit.
930 2008-08-16  Robert Millan  <rmh@aybabtu.com>
932         * disk/raid.c (grub_raid_init): Handle/report errors set by
933         grub_device_iterate().
934         * disk/lvm.c (grub_lvm_init): Likewise.
936 2008-08-15  Bean  <bean123ch@gmail.com>
938         * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
939         and datehook.mod.
940         (datetime_mod_SOURCES): New macro.
941         (datetime_mod_CFLAGS): Likewise.
942         (datetime_mod_LDFLAGS): Likewise.
943         (date_mod_SOURCES): Likewise.
944         (date_mod_CFLAGS): Likewise.
945         (date_mod_LDFLAGS): Likewise.
946         (datehook_mod_SOURCES): Likewise.
947         (datehook_mod_CFLAGS): Likewise.
948         (datehook_mod_LDFLAGS): Likewise.
950         * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
951         and datehook.mod.
952         (datetime_mod_SOURCES): New macro.
953         (datetime_mod_CFLAGS): Likewise.
954         (datetime_mod_LDFLAGS): Likewise.
955         (date_mod_SOURCES): Likewise.
956         (date_mod_CFLAGS): Likewise.
957         (date_mod_LDFLAGS): Likewise.
958         (datehook_mod_SOURCES): Likewise.
959         (datehook_mod_CFLAGS): Likewise.
960         (datehook_mod_LDFLAGS): Likewise.
962         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
963         and datehook.mod.
964         (datetime_mod_SOURCES): New macro.
965         (datetime_mod_CFLAGS): Likewise.
966         (datetime_mod_LDFLAGS): Likewise.
967         (date_mod_SOURCES): Likewise.
968         (date_mod_CFLAGS): Likewise.
969         (date_mod_LDFLAGS): Likewise.
970         (datehook_mod_SOURCES): Likewise.
971         (datehook_mod_CFLAGS): Likewise.
972         (datehook_mod_LDFLAGS): Likewise.
974         * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
975         and datehook.mod.
976         (datetime_mod_SOURCES): New macro.
977         (datetime_mod_CFLAGS): Likewise.
978         (datetime_mod_LDFLAGS): Likewise.
979         (date_mod_SOURCES): Likewise.
980         (date_mod_CFLAGS): Likewise.
981         (date_mod_LDFLAGS): Likewise.
982         (datehook_mod_SOURCES): Likewise.
983         (datehook_mod_CFLAGS): Likewise.
984         (datehook_mod_LDFLAGS): Likewise.
986         * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
987         and datehook.mod.
988         (datetime_mod_SOURCES): New macro.
989         (datetime_mod_CFLAGS): Likewise.
990         (datetime_mod_LDFLAGS): Likewise.
991         (date_mod_SOURCES): Likewise.
992         (date_mod_CFLAGS): Likewise.
993         (date_mod_LDFLAGS): Likewise.
994         (datehook_mod_SOURCES): Likewise.
995         (datehook_mod_CFLAGS): Likewise.
996         (datehook_mod_LDFLAGS): Likewise.
998         * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
1000         * commands/date.c: New file.
1002         * hook/datehook.c: Likewise.
1004         * include/grub/lib/datetime.h: Likewise.
1006         * include/grub/i386/cmos.h: Likewise.
1008         * lib/datetime.c: Likewise.
1010         * lib/i386/datetime.c: Likewise.
1012         * lib/efi/datetime.c: Likewise.
1014 2008-08-14  Robert Millan  <rmh@aybabtu.com>
1016         * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
1017         (grub_mkelfimage_SOURCES): New variable.
1018         (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
1020         * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
1021         (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
1022         * conf/powerpc-ieee1275.rmk: Likewise.
1023         * conf/i386-ieee1275.rmk: Likewise.
1025         * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
1026         * kern/i386/coreboot/init.c: Likewise.
1028         * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
1029         with `<grub/cpu/kernel.h>'.
1030         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
1031         to ...
1032         (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
1033         * kern/i386/coreboot/startup.S: Likewise.
1035         * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
1036         (GRUB_MOD_GAP): Remove.
1037         * include/grub/powerpc/kernel.h: New file.
1038         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
1039         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
1040         * include/grub/i386/kernel.h: New file.
1041         * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
1042         (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
1043         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
1045         * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
1046         `grub-mkelfimage'.
1047         Use --directory when invoking grub_mkimage.
1049         * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
1050         (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
1051         GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
1052         and GRUB_KERNEL_CPU_PREFIX.
1054 2008-08-14  Felix Zielcke  <fzielcke@z-51.de>
1056         * include/grub/err.h (grub_err_printf): New function prototype.
1057         * util/misc.c (grub_err_printf): New function.
1058         * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
1059         grub_printf.
1060         * kern/err.c (grub_print_error): Use grub_err_printf.
1062 2008-08-13  Robert Millan  <rmh@aybabtu.com>
1064         * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
1066 2008-08-13  Robert Millan  <rmh@aybabtu.com>
1068         * docs/grub.cfg: Use the native device name for the example GNU/Hurd
1069         boot entry.
1071 2008-08-12  Robert Millan  <rmh@aybabtu.com>
1073         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
1074         of the relocation code from here ...
1075         (grub_multiboot): ... to here.
1076         (forward_relocator, backward_relocator): Move from here ...
1077         * kern/i386/loader.S (grub_multiboot_forward_relocator)
1078         (grub_multiboot_backward_relocator): ... to here.
1079         (grub_multiboot_real_boot): Use %edx for entry offset.  Put Multiboot
1080         magic in %eax.  Use %ebp for jumping (so %edx is not trashed).
1081         * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
1082         (grub_multiboot_forward_relocator_end)
1083         (grub_multiboot_backward_relocator)
1084         (grub_multiboot_backward_relocator_end): New variables.
1086 2008-08-12  Bean  <bean123ch@gmail.com>
1088         * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
1090 2008-08-11  Robert Millan  <rmh@aybabtu.com>
1092         * kern/i386/linuxbios/startup.S: Move from here ...
1093         * kern/i386/coreboot/startup.S: ... to here.
1095         * kern/i386/linuxbios/init.c: Move from here ...
1096         * kern/i386/coreboot/init.c: ... to here.
1098         * kern/i386/linuxbios/table.c: Move from here ...
1099         * kern/i386/coreboot/mmap.c: ... to here.
1101         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
1103 2008-08-11  Robert Millan  <rmh@aybabtu.com>
1105         * kern/device.c (grub_device_open): Do not handle grub_disk_open()
1106         errors.  Leave it to the upper layer to handle them.
1108 2008-08-09  Christian Franke  <franke@computer.org>
1110         * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
1111         * conf/common.rmk: Install `grub-pe2elf' only if requested.
1112         Install `grub.d/10_windows' only on Cygwin.
1113         * configure.ac: Add subst of `target_os'.
1114         Check `target_os' also before setting TARGET_OBJ2ELF.
1115         Add `--enable-grub-pe2elf'.
1117 2008-08-08  Robert Millan  <rmh@aybabtu.com>
1119         * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
1120         (grub_last_time): Change type to grub_uint64_t.
1121         (grub_disk_open): Migrate code from to using grub_get_time_ms().
1122         (grub_disk_close): Likewise.
1124         * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
1125         (run_menu): Migrate code from to using grub_get_time_ms().
1127         * util/misc.c (grub_get_time_ms): New function.
1129 2008-08-08  Marco Gerards  <marco@gnu.org>
1131         * disk/ata.c (grub_ata_regget): Change return type to
1132         `grub_uint8_t'.
1133         (grub_ata_regget2): Likewise.
1134         (grub_ata_wait_status): New function.
1135         (grub_ata_wait_busy): Removed function, updated all users to use
1136         `grub_ata_wait_status'.
1137         (grub_ata_wait_drq): Likewise.
1138         (grub_ata_cmd): New function.
1139         (grub_ata_pio_read): Change return type to `grub_uint8_t'.  Add
1140         error handling.
1141         (grub_ata_pio_write): Add error handling.
1142         (grub_atapi_identify): Likewise.
1143         (grub_atapi_packet): Use `grub_ata_cmd' and improve error
1144         handling.
1145         (grub_ata_identify): Use `grub_ata_cmd' and improve error
1146         handling.  Actually use the detected registers.  Reorder the
1147         detection logic such that it is easier to read.
1148         (grub_ata_pciinit): Do not assign the same ID to each controller.
1149         (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
1150         handling.
1151         (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
1153         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
1155 2008-08-08  Marco Gerards  <marco@gnu.org>
1157         * NEWS: Update.
1159 2008-08-07  Bean  <bean123ch@gmail.com>
1161         * include/grub/x86_64/pci.h: New file.
1163 2008-08-07  Christian Franke  <franke@computer.org>
1165         * kern/i386/pit.c (TIMER2_SPEAKER): New define.
1166         (TIMER2_GATE): Likewise.
1167         (grub_pit_wait): Add enable/disable of the timer2 gate
1168         bit of port 0x61.  This fixes a possible infinite loop.
1170 2008-08-07  Bean  <bean123ch@gmail.com>
1172         * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
1173         kern/i386/tsc.c and kern/i386/pit.c.
1175         * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
1176         x86_64 platform.
1178         * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
1179         <grub/i386/tsc.h>.
1181         * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
1183 2008-08-07  Bean  <bean123ch@gmail.com>
1185         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
1187         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
1189         * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
1190         multiple inclusion. Add #include <grub/types.h>.
1192 2008-08-06  Christian Franke  <franke@computer.org>
1194         * conf/common.rmk: Build and install `10_windows'.
1195         * util/grub.d/10_windows.in: New script.
1197 2008-08-06  Pavel Roskin  <proski@gnu.org>
1199         * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
1201 2008-08-06  Robert Millan  <rmh@aybabtu.com>
1203         * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
1204         * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
1206 2008-08-06  Bean  <bean123ch@gmail.com>
1208         * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
1209         (grub_pxefs_fs_int): Remove dummy definition.
1210         (grub_pxefs_open): Use data->block_size to store the current block
1211         size setting.
1212         (grub_pxefs_read): Use block size stored in data->block_size. As the
1213         value of grub_pxe_blksize can be changed after the file is opened.
1215 2008-08-06  Bean  <bean123ch@gmail.com>
1217         * fs/i386/pc/pxe.c (curr_file): new variable.
1218         (grub_pxefs_open): Simply the handling of pxe file system. Don't
1219         require the dummy internal file system anymore.
1220         (grub_pxefs_read): Removed.
1221         (grub_pxefs_close): Likewise.
1222         (grub_pxefs_fs_int): Likewise.
1223         (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
1224         connection when we switch file.
1225         (grub_pxefs_close_int): Renamed to grub_pxefs_close.
1227 2008-08-06  Robert Millan  <rmh@aybabtu.com>
1229         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
1230         `halt.mod'.
1231         (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
1232         (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
1234         * kern/i386/halt.c: New file.
1235         * kern/i386/reboot.c: Likewise.
1236         * include/grub/i386/reboot.h: Likewise.
1237         * include/grub/i386/halt.h: Likewise.
1239         * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
1240         Include `<grub/cpu/halt.h>'.
1241         * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
1242         [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
1244         * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
1245         (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
1246         (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
1247         (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
1248         (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
1249         (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
1250         from here ...
1251         * include/grub/i386/at_keyboard.h: ... to here.
1253 2008-08-05  Robert Millan  <rmh@aybabtu.com>
1255         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
1256         * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
1257         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
1258         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
1259         `kern/generic/millisleep.c'.
1261         * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
1262         instead of grub_get_rtc().
1263         (grub_tsc_init): Initialize `tsc_boot_time'.
1265         * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
1266         (grub_machine_init): Use grub_tsc_init() rather than
1267         installing an RTC-based handler via grub_install_get_time_ms().
1269         * kern/i386/pit.c: New file.
1270         * include/grub/i386/pit.h: Likewise.
1272 2008-08-05  Bean  <bean123ch@gmail.com>
1274         * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
1276         * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
1277         (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
1278         (pxe_mod_SOURCES): New macro.
1279         (pxe_mod_CFLAGS): Likewise.
1280         (pxe_mod_LDFLAGS): Likewise.
1281         (pxecmd_mod_SOURCES): Likewise.
1282         (pxecmd_mod_CFLAGS): Likewise.
1283         (pxecmd_mod_LDFLAGS): Likewise.
1285         * kern/i386/pc/startup.S (grub_pxe_scan): New function.
1286         (grub_pxe_call): Likewise.
1288         * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
1290         * commands/i386/pc/pxecmd.c: New file.
1292         * fs/i386/pc/pxe.c: Likewise.
1294         * include/grub/i386/pc/pxe.h: Likewise.
1296 2008-08-05  Bean  <bean123ch@gmail.com>
1298         * util/console.c (grub_console_cur_color): New variable.
1299         (grub_console_standard_color): Likewise.
1300         (grub_console_normal_color): Likewise.
1301         (grub_console_highlight_color): Likewise.
1302         (color_map): Likewise.
1303         (use_color): Likewise.
1304         (NUM_COLORS): New macro.
1305         (grub_ncurses_setcolorstate): Handle color properly.
1306         (grub_ncurses_setcolor): Don't change color here, just remember the
1307         settings, color will be set in grub_ncurses_setcolorstate.
1308         (grub_ncurses_getcolor): New function.
1309         (grub_ncurses_init): Initialize color pairs.
1310         (grub_ncurses_term): New member grub_ncurses_getcolor.
1312 2008-08-05  Colin D Bennett  <colin@gibibit.com>
1314         High resolution timer support.  Implemented for x86 CPUs using TSC.
1315         Extracted generic grub_millisleep() so it's linked in only as needed.
1316         This requires a Pentium compatible CPU; if the RDTSC instruction is
1317         not supported, then it falls back on the generic grub_get_time_ms()
1318         implementation that uses the machine's RTC.
1320         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
1321         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
1322         `kern/generic/millisleep.c'.
1324         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
1325         `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
1327         * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
1328         `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
1330         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
1332         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
1333         `kern/generic/millisleep.c'.
1335         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
1337         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
1339         * kern/generic/rtc_get_time_ms.c: New file.
1341         * kern/generic/millisleep.c: New file.
1343         * kern/misc.c: Don't include
1344         <kern/time.h> anymore.
1345         (grub_millisleep_generic): Removed.
1347         * commands/sleep.c (grub_interruptible_millisleep): Uses
1348         grub_get_time_ms() instead of grub_get_rtc().
1350         * include/grub/i386/tsc.h (grub_get_tsc): New file.  New inline
1351         function.
1352         (grub_cpu_is_cpuid_supported): New inline function.
1353         (grub_cpu_is_tsc_supported): New inline function.
1354         (grub_tsc_init): New function prototype.
1355         (grub_tsc_get_time_ms): New function prototype.
1357         * kern/i386/tsc.c (grub_get_time_ms): New file.
1359         * include/grub/time.h: Include <grub/types.h.
1360         (grub_millisleep_generic): Removed.
1361         (grub_get_time_ms): New prototype.
1362         (grub_install_get_time_ms): New prototype.
1363         (grub_rtc_get_time_ms): New prototype.
1365         * kern/time.c (grub_get_time_ms): New function.
1366         (grub_install_get_time_ms): New function.
1368         * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>.  Don't include
1369         <grub/time.h> anymore.
1370         (grub_millisleep): Removed.
1371         (grub_machine_init): Call grub_tsc_init.
1373         * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
1374         get_time_ms() implementation.
1376         * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
1377         (ieee1275_get_time_ms): New function.
1378         (grub_machine_init): Install get_time_ms() implementation.
1380         * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
1381         (grub_machine_init): Call grub_tsc_init().
1382         (grub_millisleep): Removed.
1384         * kern/ieee1275/init.c (grub_millisleep): Removed.
1385         (grub_machine_init): Install ieee1275_get_time_ms()
1386         implementation.
1387         (ieee1275_get_time_ms): New function.
1388         (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
1389         real work.
1391 2008-08-05  Marco Gerards  <marco@gnu.org>
1393         * disk/ata.c: Include <grub/pci.h>.
1394         (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
1395         (grub_ata_initialize): Rewritten.
1396         (grub_ata_device_initialize): New function.
1398 2008-08-04  Pavel Roskin  <proski@gnu.org>
1400         * kern/main.c: Include grub/mm.h.
1402 2008-08-04  Robert Millan  <rmh@aybabtu.com>
1404         * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
1405         (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
1406         corruption problem).
1408 2008-08-04  Robert Millan  <rmh@aybabtu.com>
1410         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
1411         warnings introduced in my last commit.
1413 2008-08-03  Robert Millan  <rmh@aybabtu.com>
1415         Make PCI available on all i386 architectures.
1417         * include/grub/i386/pc/pci.h: Move from here ...
1418         * include/grub/i386/pci.h: ... to here.
1420         * include/grub/i386/pc/pci.h: Remove.
1421         * include/grub/i386/efi/pci.h: Remove.
1422         * include/grub/x86_64/efi/pci.h: Remove.
1424         * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
1425         `<grub/cpu/pci.h>'.
1427         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
1428         (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
1429         (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
1431         * conf/i386-ieee1275.rmk: Likewise.
1433 2008-08-03  Robert Millan  <rmh@aybabtu.com>
1435         * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
1436         (grub_console_setcursor): Make it possible to set cursor off.
1438 2008-08-03  Robert Millan  <rmh@aybabtu.com>
1440         * util/grub.d/00_header.in: Be platform-agnostic.  Probe for existence
1441         of modules instead of assuming which platform provides what.
1442         * util/update-grub.in: Likewise.
1444 2008-08-03  Robert Millan  <rmh@aybabtu.com>
1446         * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
1447         instead of `grub_install_dos_part' to determine whether a drive needs
1448         to be prepended to prefix (`grub_install_dos_part' is not reliable,
1449         because it can be overridden when loading GRUB via Multiboot).
1451 2008-08-02  Robert Millan  <rmh@aybabtu.com>
1453         * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
1455 2008-08-02  Robert Millan  <rmh@aybabtu.com>
1457         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
1458         of informational grub_dprintf() calls.
1460 2008-08-02  Robert Millan  <rmh@aybabtu.com>
1462         * disk/memdisk.c (memdisk_size): Don't initialize.
1463         (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
1465         * include/grub/i386/pc/kernel.h
1466         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
1467         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
1468         (grub_memdisk_image_size, grub_arch_memdisk_addr)
1469         (grub_arch_memdisk_size): Remove.
1471         * include/grub/kernel.h (struct grub_module_header): Remove `offset'
1472         field (was only used to transfer a constant).  Add `type' field to
1473         support multiple module types.
1474         (grub_module_iterate): New function.
1476         * kern/device.c (grub_device_open): Do not hide error messages
1477         when grub_disk_open() fails.  Use grub_print_error() instead.
1479         * kern/i386/pc/init.c (grub_arch_modules_addr)
1480         (grub_arch_memdisk_size): Remove functions.
1481         (grub_arch_modules_addr): Return the module address in high memory
1482         (now that it isn't copied anymore).
1484         * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
1485         (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
1486         decompression routine (grub_total_module_size already includes that
1487         now).  Don't copy modules back to low memory.
1489         * kern/main.c: Include `<grub/mm.h>'.
1490         (grub_load_modules): Split out (and use) ...
1491         (grub_module_iterate): ... this function, which iterates through
1492         module objects and runs a hook.
1493         Comment out grub_mm_init_region() call, as it would cause non-ELF
1494         modules to be overwritten.
1496         * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
1497         the memdisk image in its own region, make it part of the module list.
1498         * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
1499         (main): Parse --memdisk|-m option, and pass user-provided path as
1500         parameter to generate_image().
1501         (add_segments): Pass `memdisk_path' down to load_modules().
1502         (load_modules): Embed memdisk image in module section when requested.
1503         * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
1504         `header.type' instead of `header.offset'.
1506         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
1507         (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
1508         (memdisk_mod_LDFLAGS): New variables.
1509         * conf/i386-coreboot.rmk: Likewise.
1510         * conf/i386-ieee1275.rmk: Likewise.
1512 2008-08-02  Robert Millan  <rmh@aybabtu.com>
1514         * loader/i386/pc/multiboot.c (playground, forward_relocator)
1515         (backward_relocator): New variables.  Used to allocate and relocate
1516         the payload, respectively.
1517         (grub_multiboot_load_elf32): Load into heap instead of requested
1518         address, install the appropriate relocator code in each bound of
1519         the payload, and set the entry point such that
1520         grub_multiboot_real_boot() will jump to one of them.
1522         * kern/i386/loader.S (grub_multiboot_payload_size)
1523         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
1524         (grub_multiboot_payload_entry_offset): New variables.
1525         (grub_multiboot_real_boot): Set cpu context to what the relocator
1526         expects, and jump to the relocator instead of the payload.
1528         * include/grub/i386/loader.h (grub_multiboot_payload_size)
1529         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
1530         (grub_multiboot_payload_entry_offset): Export.
1532 2008-08-01  Bean  <bean123ch@gmail.com>
1534         * normal/menu_entry.c (editor_getline): Don't return the original
1535         string as result, as it will be released by lexer once it has done
1536         using it.
1538 2008-08-01  Robert Millan  <rmh@aybabtu.com>
1540         * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
1541         within menuentries, not before them.
1542         util/grub.d/10_hurd.in: Likewise.
1544 2008-08-01  Bean  <bean123ch@gmail.com>
1546         * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
1547         (bufio_mod_SOURCES): New macro.
1548         (bufio_mod_CFLAGS): Likewise.
1549         (bufio_mod_LDFLAGS): Likewise.
1551         * include/grub/bufio.h: New file.
1553         * io/bufio.c: Likewise.
1555         * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
1556         (grub_video_reader_png): Use grub_buffile_open to open file.
1558         * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
1559         (grub_video_reader_jpeg): Use grub_buffile_open to open file.
1561         * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
1562         (grub_video_reader_tga): Use grub_buffile_open to open file.
1564         * font/manager.c: Include <grub/bufio.h>.
1565         (add_font): Use grub_buffile_open to open file.
1567 2008-07-31  Robert Millan  <rmh@aybabtu.com>
1569         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
1570         ELF segments, use a macro for arbitrarily accessing any of them instead
1571         of preparing a pointer that allows access to one at a time.
1572         (grub_multiboot_load_elf64): Likewise.
1574 2008-07-31  Bean  <bean123ch@gmail.com>
1576         * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
1577         GRUB_KERNEL_MACHINE_DATA_END.
1579 2008-07-30  Robert Millan  <rmh@aybabtu.com>
1581         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
1582         Increase from 0x50 to 0x60.
1583         * util/i386/pc/grub-install.in: Detect cross-disk installs, and
1584         use UUIDs to identify the root drive for them.  If that's not
1585         possible, abort.
1586         * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
1587         check, for cross-disk installs.
1589 2008-07-30  Robert Millan  <rmh@aybabtu.com>
1591         * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
1592         is non-empty, use it to set the `prefix' environment variable instead
1593         of the usual approach.
1594         * kern/i386/linuxbios/init.c (make_install_device): Remove function.
1595         (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
1596         environment variable instead of dummy make_install_device().
1598         * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
1599         (start): Insert a data section, with `grub_prefix' variable.
1600         * kern/i386/linuxbios/startup.S: Likewise.
1602         * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
1603         New variable reference.
1604         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
1605         New macro.  Defines offset of `grub_prefix' within startup.S (relative
1606         to `start').
1607         (GRUB_KERNEL_MACHINE_DATA_END): New macro.  Defines the end of data
1608         section within startup.S (relative to `start').
1609         * include/grub/i386/coreboot/kernel.h: Likewise.
1611         * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
1612         Overwrite grub_prefix with its contents, at the beginning of the
1613         first segment.
1614         (main): Understand -p|--prefix.
1616 2008-07-30  Robert Millan  <rmh@aybabtu.com>
1618         * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
1620 2008-07-30  Robert Millan  <rmh@aybabtu.com>
1622         * term/i386/pc/vga_text.c (grub_console_cls): Use
1623         grub_console_gotoxy() to go back to beginning of the screen.
1624         Found by Patrick Georgi <patrick.georgi@coresystems.de>
1626 2008-07-29  Christian Franke  <franke@computer.org>
1628         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
1629         Add conversion of emulated mount points on Cygwin.
1631 2008-07-29  Christian Franke  <franke@computer.org>
1633         * util/update-grub.in: Add a check for admin
1634         group on Cygwin.
1635         Remove old `grub.cfg.new' before creation.
1636         Add `-f' to `mv' to handle the different filesystem
1637         semantics of Windows.
1639 2008-07-29  Bean  <bean123ch@gmail.com>
1641         * normal/main.c (get_line): Fix buffer overflow bug.
1643 2008-07-28  Robert Millan  <rmh@aybabtu.com>
1645         * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
1646         (struct grub_apple_header): New struct.  Describes the layout of
1647         the partmap header.
1648         (apple_partition_map_iterate): Check the header magic as well as the
1649         partition magic (which was already being checked).
1651 2008-07-28  Pavel Roskin  <proski@gnu.org>
1653         * genmk.rb: Add a warning to the beginning of the output that
1654         it's a generated file and should not be edited.
1656 2008-07-28  Robert Millan  <rmh@aybabtu.com>
1658         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
1659         with the same number are found, just use issue a warning with
1660         grub_dprintf(), as this error has been reported to be non-fatal.
1662 2008-07-27  Robert Millan  <rmh@aybabtu.com>
1664         * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
1665         information.
1667 2008-07-27  Bean  <bean123ch@gmail.com>
1669         * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
1670         (grub_fat_find_dir): Ignore case when comparing filename.
1672 2008-07-27  Bean  <bean123ch@gmail.com>
1674         * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
1675         smallino, as it's more descriptive, and i8count can be confused with
1676         the other field count.
1677         (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
1678         inode type.
1680 2008-07-27  Bean  <bean123ch@gmail.com>
1682         * commands/crc.c: New file.
1684         * lib/crc.c: Likewise.
1686         * include/grub/lib/crc.h: Likewise.
1688         * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
1690         * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
1691         (hexdump): Move this function to ...
1693         * lib/hexdump.c: ... here.
1695         * include/grub/hexdump.h: Renamed to ...
1697         * include/grub/lib/hexdump.h: ... this.
1699         * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
1701         * util/grub-editenv.c: Likewise.
1703         * include/envblk.h: Renamed to ...
1705         * include/lib/envblk.h: ... this.
1707         * util/envblk.c: Renamed to ...
1709         * lib/envblk.c: ... this.
1711         * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
1712         lib/hexdump.c.
1713         (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
1714         (pkglib_MODULES): Add crc.mod.
1715         (hexdump_mod_SOURCES): Add lib/hexdump.c.
1716         (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
1717         (crc_mod_SOURCES): New macro.
1718         (crc_mod_CFLAGS): Likewise.
1719         (crc_mod_LDFLAGS): Likewise.
1721         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
1723         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1725         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
1727         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1729         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1731 2008-07-27  Felix Zielcke  <fzielcke@z-51.de>
1733         * commands/help.c: Include <grub/term.h>.
1734         (TERM_WIDTH): Removed.  Updated all users.
1736 2008-07-27  Pavel Roskin  <proski@gnu.org>
1738         * util/getroot.c (find_root_device): Rephrase a comment to avoid
1739         spurious warnings about a comment within a comment.
1741 2008-07-25  Robert Millan  <rmh@aybabtu.com>
1743         * util/getroot.c (find_root_device): Skip devices that match
1744         /dev/dm-[0-9].  This lets the real device be found for any type of
1745         abstraction (LVM, EVMS, RAID..).
1746         (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
1747         and /dev/evms (for EVMS) before traversing /dev.  If a /dev/dm-[0-9]
1748         device is found first, find_root_device() will now skip it.
1750 2008-07-24  Pavel Roskin  <proski@gnu.org>
1752         * include/grub/types.h: Use __builtin_bswap32() and
1753         __builtin_bswap64() with gcc 4.3 and newer.
1755 2008-07-24  Christian Franke  <franke@computer.org>
1757         * util/i386/pc/grub-install.in: If `--debug' is specified,
1758         pass `--verbose' to grub-setup.
1759         Abort script if make_system_path_relative_to_its_root() fails.
1761 2008-07-24  Bean  <bean123ch@gmail.com>
1763         * configure.ac: Fixed a bug caused by the previous cygwin patch,
1764         variable `target_platform' should be `platform'.
1766 2008-07-24  Bean  <bean123ch@gmail.com>
1768         * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
1769         (grub_png_init_fixed_block): New function.
1770         (grub_png_decode_image_data): Handle fixed huffman code compression.
1772 2008-07-24  Bean  <bean123ch@gmail.com>
1774         * common.rmk (bin_UTILITIES): Add grub-pe2elf.
1775         (grub_pe2elf_SOURCES): New macro.
1776         (CLEANFILES): Add grub-pe2elf.
1778         * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
1779         (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
1780         (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
1781         (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
1782         (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
1783         (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
1784         (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
1785         (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
1786         (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
1787         (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
1788         (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
1789         (GRUB_PE32_SYM_CLASS_FILE): Likewise.
1790         (GRUB_PE32_DT_FUNCTION): Likewise.
1791         (GRUB_PE32_REL_I386_DIR32): Likewise.
1792         (GRUB_PE32_REL_I386_REL32): Likewise.
1793         (grub_pe32_symbol): New structure.
1794         (grub_pe32_reloc): Likewise.
1796         * util/grub-pe2elf.c: New file.
1798         * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
1799         start symbol in non pc platform.
1801         * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
1803         The following patches are from Christian Franke.
1805         * include/grub/dl.h: Remove .previous, gas supports this only
1806         for ELF format.
1808         * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
1809         Remove .type, gas supports this only for ELF format.
1811         * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
1812         nullbytes in symbol table. This fixes an infinite loop if table is
1813         zero filled.
1815         * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
1816         TARGET_IMG_LDFLAGS and EXEEXT.
1818         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
1819         TARGET_IMG_LDFLAGS_AC.
1820         (grub_CHECK_STACK_ARG_PROBE): New function.
1822         * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
1824         * conf/i386-pc-cygwin-ld-img.sc: New linker script.
1826         * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
1827         to set TARGET_IMG_LD* accordingly.
1828         Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
1829         Add call to grub_CHECK_STACK_ARG_PROBE.
1830         Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
1832         * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
1834         * genmk.rb: Add EXEEXT to CLEANFILES.
1836 2008-07-23  Robert Millan  <rmh@aybabtu.com>
1838         * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
1839         define the codes for arrows and lines used for the menu).
1840         (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
1841         as well.
1843         * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
1844         fonts, because the latter are too slow.
1846 2008-07-21  Bean  <bean123ch@gmail.com>
1848         * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
1849         a20. Run keyboard test last, as it will cause macbook to halt.
1851 2008-07-18  Pavel Roskin  <proski@gnu.org>
1853         * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P.  We cannot
1854         load foreign architecture modules correctly anyway.  Keep
1855         support for loading host architecture modules, whether we
1856         compile them or not.
1858 2008-07-17  Pavel Roskin  <proski@gnu.org>
1860         * configure.ac: Use -m32 or -m64 regardless of whether we had to
1861         change target_cpu.  The compiler default can mismatch target_cpu
1862         in any case.
1864         * disk/efi/efidisk.c: Fix format warnings on x86_64.
1865         * kern/efi/efi.c: Likewise.
1867         * aclocal.m4 (grub_PROG_TARGET_CC): New macro.  Check if the
1868         target compiler is functional.
1869         * configure.ac: Call grub_PROG_TARGET_CC once all target flags
1870         are set up.
1872         * configure.ac: Default to efi platform for x86_64-apple.  Allow
1873         powerpc64 CPU, default to ieee1275 platform for it.  Split CPU
1874         adjustments from the rest, only do them if target is not
1875         explicitly given.  Merge other adjustments with the final sanity
1876         check.  Remove an extraneous check for supported CPU.  Be
1877         specific which CPU and which platform is not supported.
1879         * configure.ac: Default to pc platform for x86_64.
1881 2008-07-17  Robert Millan  <rmh@aybabtu.com>
1883         Partial LinuxBIOS -> Coreboot rename.
1885         * conf/i386-linuxbios.rmk: Renamed to ...
1886         * conf/i386-coreboot.rmk: ... this.
1887         * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
1888         * configure.ac: Accept "coreboot" as input platform (but maintain
1889         compatibility with "linuxbios").
1890         * include/grub/i386/linuxbios: Renamed to ...
1891         * include/grub/i386/coreboot: ... this.
1893 2008-07-17  Bean  <bean123ch@gmail.com>
1895         * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
1896         (appleldr_mod_SOURCE): New variable.
1897         (appleldr_mod_CFLAGS): Likewise.
1898         (appleldr_mod_LDFLAGS): Likewise.
1899         (pci_mod_SOURCES): Likewise.
1900         (pci_mod_CFLAGS): Likewise.
1901         (pci_mod_LDFLAGS): Likewise.
1902         (lspci_mod_SOURCES): Likewise.
1903         (lspci_mod_CFLAGS): Likewise.
1904         (lspci_mod_LDFLAGS): Likewise.
1906         * conf/x86_64-efi.rmk: New file.
1908         * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
1909         macro.
1910         (grub_efidisk_write): Likewise.
1912         * include/efi/api.h (efi_call_0): New macro.
1913         (efi_call_1): Likewise.
1914         (efi_call_2): Likewise.
1915         (efi_call_3): Likewise.
1916         (efi_call_4): Likewise.
1917         (efi_call_5): Likewise.
1918         (efi_call_6): Likewise.
1920         * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
1921         grub_rescue_cmd_chainloader.
1923         * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
1924         (grub_pe32_optional_header): Change some fields based on i386 or
1925         x86_64 platform.
1926         (GRUB_PE32_PE32_MAGIC): Likewise.
1928         * include/grub/efi/uga_draw.h: New file.
1930         * include/grub/elf.h (STN_ABS): New constant.
1931         (R_X86_64_NONE): Relocation constant for x86_64.
1932         (R_X86_64_64): Likewise.
1933         (R_X86_64_PC32): Likewise.
1934         (R_X86_64_GOT32): Likewise.
1935         (R_X86_64_PLT32): Likewise.
1936         (R_X86_64_COPY): Likewise.
1937         (R_X86_64_GLOB_DAT): Likewise.
1938         (R_X86_64_JUMP_SLOT): Likewise.
1939         (R_X86_64_RELATIVE): Likewise.
1940         (R_X86_64_GOTPCREL): Likewise.
1941         (R_X86_64_32): Likewise.
1942         (R_X86_64_32S): Likewise.
1943         (R_X86_64_16): Likewise.
1944         (R_X86_64_PC16): Likewise.
1945         (R_X86_64_8): Likewise.
1946         (R_X86_64_PC8): Likewise.
1948         * include/grub/i386/efi/pci.h: New file.
1950         * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
1951         Change it value based on platform.
1952         (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
1953         (GRUB_E820_RAM): Likewise.
1954         (GRUB_E820_RESERVED): Likewise.
1955         (GRUB_E820_ACPI): Likewise.
1956         (GRUB_E820_NVS): Likewise.
1957         (GRUB_E820_EXEC_CODE): Likewise.
1958         (GRUB_E820_MAX_ENTRY): Likewise.
1959         (grub_e820_mmap): New structure.
1960         (linux_kernel_header): Change the efi field according to different
1961         kernel version, also field from linux_kernel_header.
1963         * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
1965         * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
1966         (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
1967         (GRUB_PCI_ADDR_SPACE_IO): Likewise.
1968         (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
1969         (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
1970         (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
1971         (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
1972         (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
1973         (GRUB_PCI_ADDR_MEM_MASK): Likewise.
1974         (GRUB_PCI_ADDR_IO_MASK): Likewise.
1976         * include/grub/x86_64/efi/kernel.h: New file.
1978         * include/grub/x86_64/efi/loader.h: Likewise.
1980         * include/grub/x86_64/efi/machine.h: Likewise.
1982         * include/grub/x86_64/efi/pci.h: Likewise.
1984         * include/grub/x86_64/efi/time.h: Likewise.
1986         * include/grub/x86_64/linux.h: Likewise.
1988         * include/grub/x86_64/setjmp.h: Likewise.
1990         * include/grub/x86_64/time.h: Likewise.
1992         * include/grub/x86_64/types.h: Likewise.
1994         * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
1995          GRUB_TARGET_SIZEOF_VOID_P.
1997         * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
1998         (grub_efi_locate_handle): Likewise.
1999         (grub_efi_open_protocol): Likewise.
2000         (grub_efi_set_text_mode): Likewise.
2001         (grub_efi_stall): Likewise.
2002         (grub_exit): Likewise.
2003         (grub_reboot): Likewise.
2004         (grub_halt): Likewise.
2005         (grub_efi_exit_boot_services): Likewise.
2006         (grub_get_rtc): Likewise.
2008         * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
2009         (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
2010         (grub_efi_allocate_pages): Wrap efi calls.
2011         (grub_efi_free_pages): Wrap efi calls.
2012         (grub_efi_get_memory_map): Wrap efi calls.
2014         * kern/x86_64/dl.c: New file.
2016         * kern/x86_64/efi/callwrap.S: Likewise.
2018         * kern/x86_64/efi/startup.S: Likewise.
2020         * loader/efi/appleloader.c: Likewise.
2022         * loader/efi/chainloader.c (cmdline): New variable.
2023         (grub_chainloader_unload): Wrap efi calls.
2024         (grub_chainloader_boot): Likewise.
2025         (grub_rescue_cmd_chainloader): Wrap efi calls, handle
2026         command line.
2028         * loader/efi/chainloader_normal.c (chainloader_command):
2029         Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
2030         command line.
2032         * loader/i386/efi/linux.c (allocate_pages): Change allocation
2033         method.
2034         (grub_e820_add_region): New function.
2035         (grub_linux_boot): Construct e820 map from efi map, handle x86_64
2036         booting.
2037         (grub_find_video_card): New function.
2038         (grub_linux_setup_video): New function.
2039         (grub_rescue_cmd_linux): Probe for video information.
2041         * normal/x86_64/setjmp.S: New file.
2043         * term/efi/console.c (map_char): New function.
2044         (grub_console_putchar): Map unicode char.
2045         (grub_console_checkkey): Wrap efi calls.
2046         (grub_console_getkey): Likewise.
2047         (grub_console_getwh): Likewise.
2048         (grub_console_gotoxy): Likewise.
2049         (grub_console_cls): Likewise.
2050         (grub_console_setcolorstate): Likewise.
2051         (grub_console_setcursor): Likewise.
2053         * util/i386/efi/grub-mkimage.c: Add support for x86_64.
2055 2008-07-16  Pavel Roskin  <proski@gnu.org>
2057         * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
2058         format strings.
2060         * util/i386/efi/grub-mkimage.c (get_target_address): Return a
2061         pointer, not an integer.  This fixes a warning and prevents
2062         precision loss on 64-bit systems.
2063         (relocate_addresses): Remove unneeded cast.
2065 2008-07-15  Pavel Roskin  <proski@gnu.org>
2067         * kern/i386/ieee1275/init.c: Include grub/cache.h.
2069         * term/ieee1275/ofconsole.c: Disable code unused on i386.
2071         * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
2072         Fix comparison between signed and unsigned.
2074         * include/grub/i386/ieee1275/console.h: Declare
2075         grub_console_init() and grub_console_fini().
2077         * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
2078         It's empty and unused.
2080         * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
2081         beginning to avoid warnings with some compilers.
2083         * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
2084         [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
2086 2008-07-14  Pavel Roskin  <proski@gnu.org>
2088         * kern/env.c (grub_register_variable_hook): Don't copy empty
2089         string, it leaks memory.  Pass "" to grub_env_set(), it should
2090         handle constant strings.
2092         * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
2093         * commands/cmp.c (grub_cmd_cmp): Likewise.
2094         * kern/dl.c (grub_dl_flush_cache): Likewise.
2095         (grub_dl_load_core): Likewise.
2096         * kern/elf.c (grub_elf32_load_phdrs): Likewise.
2097         (grub_elf64_load_phdrs): Likewise.
2099 2008-07-13  Pavel Roskin  <proski@gnu.org>
2101         * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
2102         between signed and unsigned.
2103         (LzmaEnc_Finish): Fix warning about an unused parameter.
2105 2008-07-13  Bean  <bean123ch@gmail.com>
2107         * Makefile.in (enable_lzo): New rule.
2109         * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
2111         * configure.ac (ENABLE_LZO): New option --enable-lzo.
2113         * boot/i386/pc/lnxboot.S: #include <config.h>.
2115         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
2116         its value according to the compression algorithm used, lzo or lzma.
2118         * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
2119         compression algorithm according to configure macro.
2121         * kern/i386/pc/startup.S (codestart): Likewise.
2123         * kern/i386/pc/lzma_decode.S: New file.
2125         * include/grub/lib/LzFind.h: Likewise.
2127         * include/grub/lib/LzHash.h: Likewise.
2129         * include/grub/lib/LzmaDec.h: Likewise.
2131         * include/grub/lib/LzmaEnc.h: Likewise.
2133         * include/grub/lib/LzmaTypes.h: Likewise.
2135         * lib/LzFind.c: Likewise.
2137         * lib/LzmaDec.c: Likewise.
2139         * lib/LzmaEnc.c: Likewise.
2141 2008-07-13  Bean  <bean123ch@gmail.com>
2143         * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
2144         (grub_ext4_extent_header): New structure.
2145         (grub_ext4_extent): Likewise.
2146         (grub_ext4_extent_idx): Likewise.
2147         (grub_ext4_find_leaf): New function.
2148         (grub_ext2_read_block): Handle extents.
2150 2008-07-12  Robert Millan  <rmh@aybabtu.com>
2152         * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
2154 2008-07-11  Robert Millan  <rmh@aybabtu.com>
2156         * util/grub.d/40_custom.in: New file. Example on how to add custom
2157         entries to /etc/grub.d.
2158         * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
2159         40_custom (implicitly, by merging all the grub.d rules).
2161 2008-07-11  Pavel Roskin  <proski@gnu.org>
2163         * commands/read.c (grub_getline): Fix invalid memory access.
2164         Don't add newline to the variable value.
2166         * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
2167         [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
2168         (serial_hw_get_port): Check validity of the port number.
2169         (grub_cmd_serial): Check return value of serial_hw_get_port().
2171 2008-07-07  Pavel Roskin  <proski@gnu.org>
2173         * boot/i386/pc/diskboot.S (notification_string): Replace
2174         "Loading kernel" with just "loading".  This is shorter, less
2175         confusing and saves a few bytes for possible future changes.
2177 2008-07-05  Pavel Roskin  <proski@gnu.org>
2179         * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
2180         size for ATAPI devices, they are undefined.  Output sector
2181         number in decimal form.
2183         * disk/ata.c: Use named constants for status bits.
2185 2008-07-04  Pavel Roskin  <proski@gnu.org>
2187         * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
2188         grub_addr_t before casting it to the void pointer to fix a
2189         warning.  Non-addressable regions are discarded earlier.
2190         (grub_arch_modules_addr): Cast _end to grub_addr_t.
2191         * kern/i386/linuxbios/table.c: Include grub/misc.h.
2192         (check_signature): Don't shadow table_header.
2193         (grub_linuxbios_table_iterate): Cast numeric constants to
2194         grub_linuxbios_table_header_t.
2195         * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
2196         grub_stop().
2198         * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
2199         prevent warnings.
2201         * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
2202         pointer, which can cause warnings.  Support 64-bit addresses.
2204         * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
2205         of sizeof(long).  This fixes PowerPC image generation on x86_64.
2207 2008-07-04  Robert Millan  <rmh@aybabtu.com>
2209         This fixes a performance issue when pc & gpt partmap iterators
2210         didn't abort iteration even after our hook found what it was
2211         looking for (often causing expensive probes of non-existent drives).
2213         Some callers relied on previous buggy behaviour, since they would
2214         rise an error when their own hooks caused early abortion of its
2215         iteration.
2217         * kern/device.c (grub_device_open): Improve error message.
2218         * disk/lvm.c (grub_lvm_open): Likewise.
2219         * disk/raid.c (grub_raid_open): Likewise.
2221         * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
2222         when hook requests it, independently of grub_errno.
2223         (pc_partition_map_probe): Do not fail when find_func() caused
2224         early abortion of pc_partition_map_iterate().
2226         * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
2227         when hook requests it, independently of grub_errno.
2228         (gpt_partition_map_probe): Do not fail when find_func() caused
2229         early abortion of gpt_partition_map_iterate().
2231         * kern/partition.c (grub_partition_iterate): Abort parent iteration
2232         when hook requests it, independently of grub_errno.  Do not fail when
2233         part_map_iterate_hook() caused early abortion of p->iterate().
2235         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
2236         when grub_partition_iterate() returned with non-zero.
2238 2008-07-03  Pavel Roskin  <proski@gnu.org>
2240         * disk/ata.c (grub_ata_pio_write): Check status before writing,
2241         like we do in grub_ata_pio_read().
2242         (grub_ata_readwrite): Always write individual sectors.  Fix the
2243         sector count for the remainder.
2244         (grub_ata_write): Enable writing to ATA devices.  Correctly
2245         report error for ATAPI devices.
2247 2008-07-02  Pavel Roskin  <proski@gnu.org>
2249         * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
2250         warning.
2252         * disk/ata.c (grub_ata_readwrite): Don't increment sector number
2253         for every read sector, we already increment it for the whole
2254         batch.  This fixes reading more than 256 sectors at once.
2256         * util/grub-editenv.c (cmd_info): Cast argument to long
2257         explicitly.  ptrdiff_t reduces to int on i386.
2259         * util/grub-editenv.c (main): Be specific which parameter is
2260         missing.
2262         * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
2263         (memdisk): Make memdisk_orig_addr a pointer.
2265         * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
2266         for file offsets, use grub_off_t instead.  Fix printf format
2267         warnings.
2269         * fs/reiserfs.c: Remove #warning, TODO list items don't belong
2270         there.  Real unexpected warnings should not drown in the noise
2271         about known problems.
2273         * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
2274         grub_disk_addr_t for memory addresses.
2276         * loader/aout.c (grub_aout_load): Cast load_addr to pointer
2277         explicitly to fix a warning.
2279         * util/grub-editenv.c (cmd_info): Fix warning in printf format.
2281         * Makefile.in (MODULE_LDFLAGS): New variable.
2282         * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro.  Check if
2283         the linker accepts --build-id=none.
2284         * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE.  Substitute
2285         MODULE_LDFLAGS.
2286         * genmk.rb: Use MODULE_LDFLAGS when linking modules.
2288         * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
2289         those in Linux XFS code.  Provide a way to access 64-bit parent
2290         inode.
2291         (grub_xfs_iterate_dir): Use the new names.  Avoid reading past
2292         the end of struct grub_xfs_dir_header.
2294 2008-07-02  Bean  <bean123ch@gmail.com>
2296         * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
2297         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
2298         and GRUB_IEEE1275_FLAG_NO_ANSI.
2300         * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
2301         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
2302         and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
2304         * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
2305         immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
2307         * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
2308         GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
2310         * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
2311         esc sequence on non ANSI terminal.
2312         (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
2314         * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
2315         beginning of file.
2317 2008-07-02  Bean  <bean123ch@gmail.com>
2319         * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
2320         (grub_editenv_SOURCES): New variable.
2321         (pkglib_MODULES): Add loadenv.mod.
2322         (loadenv_mod_SOURCES): New variable.
2323         (loadenv_mod_CFLAGS): Likewise.
2324         (loadenv_mod_LDFLAGS): Likewise.
2326         * include/grub/envblk.h: New file.
2328         * util/envblk.c: New file.
2330         * util/grub-editenv.c: New file.
2332         * commands/loadenv.c: New file.
2334 2008-07-01  Pavel Roskin  <proski@gnu.org>
2336         * include/multiboot2.h (struct multiboot_tag_module): Use char,
2337         not unsigned char.  This fixes warnings and is consistent with
2338         other tags.
2340         * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
2342         * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
2344         * term/tparm.c (analyze): Always set *popcount.
2346         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
2347         cast to fix a warning.
2349         * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
2350         cast to suppress a warning.
2352         * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
2353         grub_fshelp_read_file() expects.
2355         * fs/fat.c: Fix UUID calculation on big-endian systems.  We
2356         write uuid as a 32-bit value in CPU byte order, so declare and
2357         use it as such.
2359         * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
2360         long if the format specifier expects it.
2361         * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
2362         * partmap/pc.c (pc_partition_map_iterate): Likewise.
2363         * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
2364         long to fix a warning.
2365         * fs/reiserfs.c (grub_reiserfs_read): Change casts in
2366         grub_dprintf() arguments to fix warnings.
2368 2008-06-30  Pavel Roskin  <proski@gnu.org>
2370         * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
2371         install_bsd_part immediately before core.img is embedded or
2372         modified on disk.  This fixes core.img verification if core.img
2373         cannot be embedded.
2375         * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
2376         core_path to calculate the blocklist.
2377         Patch from Javier Martín <lordhabbit@gmail.com>
2379 2008-06-29  Robert Millan  <rmh@aybabtu.com>
2381         * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro.  Maps filesystem
2382         block to disk block.
2383         (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
2384         Patch from Niels Böhm <bitbucket@arcor.de>
2386 2008-06-29  Robert Millan  <rmh@aybabtu.com>
2388         * util/update-grub_lib.in (font_path): Search for fonts in
2389         /boot/grub first, which is more likely to be readable (we aren't
2390         deciding where fonts live, just looking for them).
2392 2008-06-26  Pavel Roskin  <proski@gnu.org>
2394         * util/biosdisk.c (read_device_map): Don't leave dead map
2395         entries for devices failing stat() check.
2397         * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
2398         core_path_dev for the core.img path on the target device.
2400 2008-06-26  Robert Millan  <rmh@aybabtu.com>
2402         * disk/fs_uuid.c: New file.
2403         * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
2404         (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
2405         (fs_uuid_mod_LDFLAGS): New variables.
2406         * include/grub/disk.h (grub_disk_dev_id): Add
2407         `GRUB_DISK_DEVICE_UUID_ID'.
2408         * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
2409         implement iterate().
2411 2008-06-26  Robert Millan  <rmh@aybabtu.com>
2413         * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
2414         "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
2415         Linux image includes no initrd.
2417 2008-06-21  Javier Martín  <lordhabbit@gmail.com>
2419         * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
2420         call to resolve the core image location that effectively appended the
2421         name twice.
2423 2008-06-21  Robert Millan  <rmh@aybabtu.com>
2425         * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
2426         call from here ...
2428         * util/grub.d/10_hurd.in: ... to here ...
2429         * util/grub.d/10_linux.in: ... and here.
2431 2008-06-19  Robert Millan  <rmh@aybabtu.com>
2433         * kern/main.c (grub_main): Export `prefix' variable immediately
2434         after it has been set by grub_machine_set_prefix().
2436 2008-06-19  Robert Millan  <rmh@aybabtu.com>
2438         * commands/search.c (search_label, search_fs_uuid, search_file): Print
2439         search result when not saving to variable, not the other way around.
2440         When saving to variable, abort iteration as soon as a match is found.
2442 2008-06-19  Robert Millan  <rmh@aybabtu.com>
2444         * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
2445         check for partition that provides /boot/grub.  Its logic is flawed,
2446         as it prevents prepare_grub_to_access_device() from being called
2447         multiple times.
2449 2008-06-19  Robert Millan  <rmh@aybabtu.com>
2451         * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
2452         "insmod" command directly when abstraction modules are needed,
2453         instead of relying on GRUB_PRELOAD_MODULES (which had no effect
2454         since it had already been processed).
2456 2008-06-19  Pavel Roskin  <proski@gnu.org>
2458         * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
2459         changed.  This is needed in case GRUB_LIBDIR changes.
2460         * conf/i386-ieee1275.rmk: Likewise.
2461         * conf/i386-linuxbios.rmk: Likewise.
2462         * conf/i386-pc.rmk: Likewise.
2463         * conf/powerpc-ieee1275.rmk: Likewise.
2465 2008-06-18  Pavel Roskin  <proski@gnu.org>
2467         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
2468         kernel_elf_symlist.c to symlist.c for consistency with other
2469         architectures.  Update all users.
2470         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
2472 2008-06-18  Robert Millan  <rmh@aybabtu.com>
2474         * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
2475         it in prefix.
2477         * util/i386/pc/grub-setup.c (main): Don't handle prefix at all.  Set
2478         `must_embed' to 1 when root_dev is a RAID device.  When dest_dev is
2479         a RAID device, run setup() for all members independently on whether
2480         LVM abstraction is being used.
2481         (setup): Don't handle prefix at all; let grub-mkimage take care of it.
2482         If grub-mkimage has set `*install_dos_part == -2', don't override this
2483         value.
2484         Perform *install_dos_part adjustments independently on whether
2485         we're embedding or not.
2486         Clarify error message when image is too big for embedding.
2487         Remove duplicate *install_dos_part stanza.
2489 2008-06-17  Robert Millan  <rmh@aybabtu.com>
2491         * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
2492         (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
2493         variables.
2494         (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
2495         values in grub_ofconsole_normal_color and
2496         grub_ofconsole_highlight_color (they're not directly related to
2497         background and foreground).
2498         (grub_ofconsole_setcolorstate): Extract background and foreground
2499         from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
2501 2008-06-17  Robert Millan  <rmh@aybabtu.com>
2503         * util/update-grub_lib.in (prepare_grub_to_access_device): Use
2504         /boot/grub for the check in last commit, not /boot (they could be
2505         different partitions).
2507 2008-06-16  Robert Millan  <rmh@aybabtu.com>
2509         * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
2510         asked to setup access for the same partition that provides /boot,
2511         don't bother using UUIDs since our root already has the value we
2512         want.
2514 2008-06-16  Robert Millan  <rmh@aybabtu.com>
2516         * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
2517         I2O devices.
2518         Patch from Sven Mueller <sven@debian.org>.
2520 2008-06-16  Robert Millan  <rmh@aybabtu.com>
2522         * util/update-grub.in: Check for $EUID instead of $UID.
2523         Reported by Vincent Zweije.
2525 2008-06-16  Bean  <bean123ch@gmail.com>
2527         * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
2528         (grub_ext2_read_block): Likewise.
2529         (grub_ext2_read_inode): Likewise.
2530         (grub_ext2_mount): Likewise.
2531         (grub_ext2_close): Likewise.
2532         (grub_ext3_get_journal): Removed.
2534         * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
2535         (grub_reiserfs_read_symlink): Likewise.
2536         (grub_reiserfs_mount): Likewise.
2537         (grub_reiserfs_open): Likewise.
2538         (grub_reiserfs_read): Likewise.
2539         (grub_reiserfs_close): Likewise.
2540         (grub_reiserfs_get_journal): Removed.
2542         * fs/fshelp.c (grub_fshelp_read): Removed.
2543         (grub_fshelp_map_block): Likewise.
2545         * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
2546         (grub_fshelp_journal): Likewise.
2547         (grub_fshelp_read): Likewise.
2548         (grub_fshelp_map_block): Likewise.
2550 2008-06-16  Pavel Roskin  <proski@gnu.org>
2552         * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
2553         floating point anymore.
2554         * include/grub/powerpc/libgcc.h: Leave only necessary exports.
2556 2008-06-15  Pavel Roskin  <proski@gnu.org>
2558         * commands/ls.c (grub_ls_list_files): Use integer calculations
2559         for human readable format, avoid floating point use.
2560         * kern/misc.c (grub_ftoa): Remove.
2561         (grub_vsprintf): Remove floating point support.
2563 2008-06-15  Robert Millan  <rmh@aybabtu.com>
2565         * util/grub.d/10_linux.in: Use the underlying device for loop-AES
2566         devices.
2567         Reported by Max Vozeler.
2569 2008-06-15  Robert Millan  <rmh@aybabtu.com>
2571         * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
2572         in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
2573         skipped later.
2574         (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
2575         the beginning of the prefix.
2577         * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
2578         It is assumed that if we have a memdisk, grub-mkimage has set
2579         grub_prefix to include the "(memdisk)" drive in it.
2581 2008-06-15  Robert Millan  <rmh@aybabtu.com>
2583         * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
2584         Initialize keyboard controller after registering the terminal, so that
2585         grub_printf() can be called from grub_keyboard_controller_init().
2587 2008-06-15  Robert Millan  <rmh@aybabtu.com>
2589         * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
2590         extent-btree which is written as big endian on disk.
2591         Reported by Alain Greppin  <al@chilibi.org>.
2593 2008-06-14  Robert Millan  <rmh@aybabtu.com>
2595         * util/i386/efi/grub-install.in (modules): Remove `_chain'.
2596         * util/i386/pc/grub-install.in (modules): Likewise.
2598 2008-06-13  Pavel Roskin  <proski@gnu.org>
2600         * commands/ls.c (grub_ls_list_files): Fix format warnings.
2602 2008-06-13  Bean  <bean123ch@gmail.com>
2604         * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
2606         * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
2608         * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
2609         to indicate sparse block.
2611 2008-06-12  Pavel Roskin  <proski@gnu.org>
2613         * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
2614         number, grub_fshelp_read() does it for us.
2616         * fs/fshelp.c (grub_fshelp_read): New function.  Implement
2617         linear disk read with journal translation.
2618         * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
2619         * include/grub/fshelp.h: Declare grub_fshelp_read().
2621 2008-06-09  Pavel Roskin  <proski@gnu.org>
2623         * fs/minix.c (grub_minix_mount): Handle error reading
2624         superblock.
2626 2008-06-08  Robert Millan  <rmh@aybabtu.com>
2628         * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
2629         don't append the RAID prefix afterwards.
2630         Reported by Clint Adams.
2632 2008-06-08  Robert Millan  <rmh@aybabtu.com>
2634         Based on description from Pavel:
2635         * kern/disk.c (grub_disk_check_range): Rename to ...
2636         (grub_disk_adjust_range): ... this.  Add a comment explaining the
2637         tasks performed by this function.
2639 2008-06-08  Robert Millan  <rmh@aybabtu.com>
2641         * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
2642         `num_serial' (for consistency with other variables).
2643         (struct grub_ntfs_data): Add `uuid' member.
2644         * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
2645         (grub_ntfs_uuid): New function.
2646         (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
2648 2008-06-07  Pavel Roskin  <proski@gnu.org>
2650         * util/biosdisk.c (open_device): Revert last change to the
2651         function, it broke installation.  The sector needs to be
2652         different dependent on which device is opened.
2654 2008-06-06  Robert Millan  <rmh@aybabtu.com>
2656         Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
2657         rest of GRUB, and breakage doesn't happen if its value were modified.
2659         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
2660         Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
2661         a constant (same value).
2662         * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
2663         `GRUB_KERNEL_MACHINE_DATA_END' (same value).
2665 2008-06-06  Robert Millan  <rmh@aybabtu.com>
2667         * util/biosdisk.c (open_device): Do not modify sector offset when
2668         accessing a partition.  kern/disk.c already handles this for us.
2670 2008-06-06  Robert Millan  <rmh@aybabtu.com>
2672         * util/grub-emu.c (grub_machine_init): Move code in this function from
2673         here ...
2674         (main): ... to here (before grub_util_biosdisk_init() call, to prevent
2675         segfault in case grub_printf() is called).
2677         * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
2678         grub_probe.  Update all users not to explicitly add it again.
2679         (grub_device): New variable; contains corresponding device for grubdir.
2680         (fs_module, partmap_module, devabstraction_module): Pass
2681         `--device ${grub_device}' to grub_probe to avoid traversing /dev
2682         every time.
2684 2008-06-05  Robert Millan  <rmh@aybabtu.com>
2686         * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
2687         is found, print it (same layout as with labels).
2689 2008-06-04  Robert Millan  <rmh@aybabtu.com>
2691         * util/biosdisk.c (get_drive): Rename to ...
2692         (find_grub_drive): ... this.  Update all users.
2694         (get_os_disk): Rename to ...
2695         (convert_system_partition_to_system_disk): ... this.  Update all users.
2697         (find_drive): Rename to ...
2698         (find_system_device): ... this.  Update all users.
2700 2008-06-04  Robert Millan  <rmh@aybabtu.com>
2702         * util/biosdisk.c (get_os_disk): Handle IDA devices.
2703         * util/grub-mkdevicemap.c (get_mmc_disk_name)
2704         (make_device_map): Likewise.
2706 2008-06-01  Robert Millan  <rmh@aybabtu.com>
2708         *  util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
2709         before dereferencing it.
2711         * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
2712         union with fat12/fat16-specific ones.  Add some new fields, including
2713         `num_serial' for both versions.
2714         (struct grub_fat_data): Add `uuid' member.
2715         (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
2716         names.  Initialize `data->uuid' using `num_serial'.
2717         (grub_fat_uuid): New function.
2718         (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
2720         * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
2721         (grub_reiserfs_uuid): New function.
2722         (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
2723         member.
2725         * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
2726         (grub_xfs_uuid): New function.
2727         (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
2729 2008-06-01  Robert Millan  <rmh@aybabtu.com>
2731         * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
2732         code that is backward compatible with pre-uuid search command.
2734 2008-05-31  Robert Millan  <rmh@aybabtu.com>
2736         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
2737         floppies after everything else, to ensure floppy drive isn't accessed
2738         unnecessarily (patch from Bean).
2740 2008-05-31  Robert Millan  <rmh@aybabtu.com>
2742         * commands/search.c (search_label, search_fs_uuid, search_file): Do
2743         not print device names when we were asked to set a variable.
2745 2008-05-31  Robert Millan  <rmh@aybabtu.com>
2747         * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
2748         using "cursor-on" and "cursor-off" commands (understood at least by
2749         the Open Firmware flavour on OLPC).
2751 2008-05-31  Michael Gorven  <michael@gorven.za.net>
2753         * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
2754         on and off sequences.
2756 2008-05-31  Robert Millan  <rmh@aybabtu.com>
2758         * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
2759         * util/update-grub.in: Likewise.
2761 2008-05-30  Pavel Roskin  <proski@gnu.org>
2763         * util/biosdisk.c (linux_find_partition): Simplify logic and
2764         make the code more universal.  Keep special processing for
2765         devfs, but use a simple rule for all other devices.  If the
2766         device ends with a number, append 'p' and the partition number.
2767         Otherwise, append only the partition number.
2769 2008-05-30  Robert Millan  <rmh@aybabtu.com>
2771         * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
2772         * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
2773         GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
2774         the `root' parameter to Linux.
2776 2008-05-30  Robert Millan  <rmh@aybabtu.com>
2778         * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
2779         * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
2780         --fs_uuid with --fs-uuid.
2781         * util/update-grub.in: Allow filesystem UUID probes to fail (since not
2782         all filesystems support them).
2784 2008-05-30  Robert Millan  <rmh@aybabtu.com>
2786         * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
2787         grub_printf() flags, since we're printing in units of 2 bytes.
2789 2008-05-30  Robert Millan  <rmh@aybabtu.com>
2791         * util/grub.d/00_header.in: Remove obsolete comment referencing
2792         convert_system_path_to_grub_path().
2793         * util/update-grub.in: Likewise.
2794         * util/update-grub_lib.in (is_path_readable_by_grub): New function.
2795         (convert_system_path_to_grub_path): Add a warning message explaining
2796         that this function is deprecated.  Rely on is_path_readable_by_grub()
2797         for the readability checks.
2798         (font_path): Use is_path_readable_by_grub() for the readability
2799         check rather than convert_system_path_to_grub_path().
2801 2008-05-30  Robert Millan  <rmh@aybabtu.com>
2803         * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
2804         * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
2805         converting it first.
2806         * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
2807         grub.cfg for access to font file, and afterwards call it again to set
2808         the root device.
2810 2008-05-30  Robert Millan  <rmh@aybabtu.com>
2812         * commands/search.c (options): Add --fs_uuid option.
2813         (search_fs_uuid): New function.
2814         (grub_cmd_search): Fix --set argument passing.
2815         Use search_fs_uuid() when requested via --fs_uuid.
2816         (grub_search_init): Update help message.
2817         * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
2818         and redeclare it as an array of 16-bit words.
2819         (grub_ext2_uuid): New function.
2820         (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
2821         * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
2822         * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
2823         (GRUB_DEVICE_BOOT_UUID): New variables.
2824         (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
2825         * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
2826         whenever possible.
2827         * util/grub.d/10_hurd.in: Avoid explicit use of root drive.  Instead,
2828         just assume `root' variable has the right value.
2829         * util/grub.d/10_linux.in: Likewise.
2830         * util/grub-probe.c (probe): Probe for filesystem UUID when requested
2831         via PRINT_FS_UUID.
2832         (main): Recognise `-t fs_uuid' argument.
2834 2008-05-30  Robert Millan  <rmh@aybabtu.com>
2836         * util/biosdisk.c (map): Redefine structure to hold information
2837         about GRUB drive name.
2838         (get_drive): Reimplement without assuming (and verifying) BIOS-like
2839         drive names.
2840         (call_hook): Remove.
2841         (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
2842         member.  Assume drive has partitions.
2843         (grub_util_biosdisk_open): Access device names via `.device' struct
2844         member.
2845         (open_device): Likewise.
2846         (find_drive): Likewise.
2847         (read_device_map): Adjust map[] usage to match the new struct
2848         definition.  Don't check for duplicates (still possible, but not cheap
2849         anymore).
2850         (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
2851         (make_device_name): Remove assumption of BIOS-like drive names.
2853 2008-05-30  Pavel Roskin  <proski@gnu.org>
2855         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
2856         compiling execute.c doesn't need grub_script.tab.h anymore.
2857         (normal/command.c_DEPENDENCIES): Likewise.
2858         (normal/function.c_DEPENDENCIES): Likewise.
2859         * conf/i386-ieee1275.rmk: Likewise.
2860         * conf/i386-linuxbios.rmk: Likewise.
2861         * conf/i386-pc.rmk: Likewise.
2862         * conf/powerpc-ieee1275.rmk: Likewise.
2863         * conf/sparc64-ieee1275.rmk: Likewise.
2865 2008-05-29  Pavel Roskin  <proski@gnu.org>
2867         * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
2868         when scanning metadata for volume group name.
2870         * include/grub/script.h: Don't include grub_script.tab.h.  It's
2871         a generated file, which may only be included from the files with
2872         DEPENDENCIES rules in the makefile.  Don't use typedef YYSTYPE,
2873         use union YYSTYPE, as the later allows forward declaration.
2874         * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
2876 2008-05-29  Robert Millan  <rmh@aybabtu.com>
2878         * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
2879         (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
2880         [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
2881         (grub_console_checkkey): Add grub_dprintf() call to report unknown
2882         scan codes.
2884 2008-05-29  Robert Millan  <rmh@aybabtu.com>
2886         * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
2887         control key combinations.
2889 2008-05-29  Robert Millan  <rmh@aybabtu.com>
2891         * util/powerpc/ieee1275/grub-install.in: Move from here ...
2892         * util/ieee1275/grub-install.in: ... to here.
2893         * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
2894         * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
2895         (grub_install_SOURCES): Likewise.
2897 2008-05-29  Robert Millan  <rmh@aybabtu.com>
2899         * fs/affs.c: Update copyright year.
2900         * fs/ext2.c: Likewise.
2901         * fs/fshelp.c: Likewise.
2902         * fs/hfsplus.c: Likewise.
2903         * fs/ntfs.c: Likewise.
2904         * fs/xfs.c: Likewise.
2905         * include/grub/fshelp.h: Likewise.
2906         * util/grub-mkdevicemap.c: Likewise.
2908 2008-05-28  Robert Millan  <rmh@aybabtu.com>
2910         * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
2911         might need to be fatfs to support some firmware implementations
2912         (e.g. OFW or EFI).
2914 2008-05-28  Robert Millan  <rmh@aybabtu.com>
2916         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
2917         devices.
2918         * util/grub-mkdevicemap.c (get_mmc_disk_name)
2919         (make_device_map): Likewise.
2921 2008-05-20  Bean  <bean123ch@gmail.com>
2923         * fs/fshelp.c (grub_fshelp_map_block): New function.
2924         (grub_fshelp_find_file): Use 64-bit type for pos and block address.
2925         Use `>>' and `&' operator to avoid 64-bit divide and modulo.
2927         * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
2928         (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
2929         (grub_fshelp_journal): New structure.
2930         (grub_fshelp_map_block): New function prototype.
2931         (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
2932         (grub_fshelp_map_block): Likewise.
2934         * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
2935         (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
2936         (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
2937         (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
2938         (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
2939         (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
2940         (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
2941         (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
2942         (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
2943         (EXT3_JOURNAL_FLAG_DELETED): Likewise.
2944         (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
2945         (grub_ext2_sblock): New members for journal support.
2946         (grub_ext3_journal_header): New structure.
2947         (grub_ext3_journal_revoke_header): Likewise.
2948         (grub_ext3_journal_block_tag): Likewise.
2949         (grub_ext3_journal_sblock): Likewise.
2950         (grub_fshelp_node): New members logfile and journal.
2951         (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
2952         grub_fshelp_map_block to get real block number.
2953         (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
2954         number.
2955         (grub_ext2_read_inode): Likewise.
2956         (grub_ext3_get_journal): New function.
2957         (grub_read_inode): Initialize journal using grub_ext3_get_journal.
2958         (grub_ext2_close): Release memory used by journal.
2960         * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
2961         (REISERFS_MAGIC_DESC_BLOCK): New macro.
2962         (grub_reiserfs_transaction_header): Renamed to
2963         grub_reiserfs_description_block, replace field data with real_blocks.
2964         (grub_reiserfs_commit_block): New structure.
2965         (grub_reiserfs_data): New member journal.
2966         (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
2967         number.
2968         (grub_reiserfs_read_symlink): Likewise.
2969         (grub_reiserfs_iterate_dir): Likewise.
2970         (grub_reiserfs_open): Likewise.
2971         (grub_reiserfs_read): Likewise.
2972         (grub_reiserfs_get_journal): New function.
2973         (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
2974         three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
2975         using grub_reiserfs_get_journal.
2976         (grub_reiserfs_close): Release memory used by journal.
2978         * fs/affs.c (grub_affs_read_block): Change block type to
2979         grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
2981         * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
2983         * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
2985         * fs/ntfs.c (grub_ntfs_read_block): Likewise.
2987         * fs/udf.c (grub_udf_read_block): Change block type to
2988         grub_disk_addr_t. Use type cast to avoid warning.
2990         * fs/xfs.c (grub_xfs_read_block): Likewise.
2992 2008-05-16  Christian Franke  <franke@computer.org>
2994         * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
2995         to ensure that break with ESC will always work.
2996         * commands/sleep.c (grub_interruptible_millisleep): Likewise.
2997         Remove ESC from keyboard queue.
2999 2008-05-16  Christian Franke  <franke@computer.org>
3001         * util/biosdisk.c: [__CYGWIN__] Add includes.
3002         (grub_util_biosdisk_open): Use Linux code also for Cygwin.
3003         (get_os_disk): Move variable declarations to OS specific
3004         parts to avoid warning.
3005         [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
3006         [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
3007         (grub_util_biosdisk_get_grub_dev): Use Linux code also for
3008         Cygwin.
3009         * util/getroot.c: [__CYGWIN__] Add includes.
3010         (strip_extra_slashes): Fix "/" case.
3011         [__CYGWIN__] (get_win32_path): New function.
3012         [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
3013         [__CYGWIN__] (find_root_device): Disable.
3014         [__CYGWIN__] (get_bootsec_serial): New function.
3015         [__CYGWIN__] (find_cygwin_root_device): Likewise.
3016         [__linux__] (grub_guess_root_device): Add early returns to simplify
3017         structure.
3018         [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
3019         [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
3020         check for Linux only.
3022 2008-05-15  Bean  <bean123ch@gmail.com>
3024         * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
3025         keyboard hang problem in apple's intel mac.
3027 2008-05-09  Robert Millan  <rmh@aybabtu.com>
3029         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
3030         devices.
3031         * util/grub-mkdevicemap.c (get_virtio_disk_name)
3032         (make_device_map): Likewise.
3033         Reported by Aurelien Jarno <aurel32@debian.org>
3035 2008-05-07  Ian Campbell  <ijc@hellion.org.uk>
3037         * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
3038         * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
3039         (make_device_map): Output entries for xvd type disks.
3041 2008-05-07  Robert Millan  <rmh@aybabtu.com>
3043         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
3044         devices.
3045         * util/grub-mkdevicemap.c (get_cciss_disk_name)
3046         (make_device_map): Likewise.
3047         Reported by Roland Dreier <rdreier@cisco.com>
3049 2008-05-07  Robert Millan  <rmh@aybabtu.com>
3051         * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
3052         grub_strstr() call.  Correct a few mistakes in failure path handling.
3054 2008-05-06  Robert Millan  <rmh@aybabtu.com>
3056         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
3057         Do not print a trailing slash (therefore, the root directory is an
3058         empty string).
3059         (convert_system_path_to_grub_path): Do not remove trailing slash
3060         from make_system_path_relative_to_its_root() output.
3062         * util/i386/pc/grub-install.in: Add trailing slash to output from
3063         make_system_path_relative_to_its_root().
3065 2008-05-06  Robert Millan  <rmh@aybabtu.com>
3067         * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'.  This
3068         ensures that output lines aren't intermangled with those sent to
3069         stderr (via grub_util_info()).
3070         * util/grub-probe.c (grub_refresh): Likewise.
3071         * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
3073 2008-05-05  Christian Franke  <franke@computer.org>
3075         * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
3076         Add Cygwin device names.
3077         (get_ide_disk_name) [__CYGWIN__]: Likewise.
3078         (get_scsi_disk_name) [__CYGWIN__]: Likewise.
3079         (check_device): Return error instead of success on empty name.
3080         (make_device_map): Move label inside linux specific code to
3081         prevent compiler warning.
3083 2008-04-30  Robert Millan  <rmh@aybabtu.com>
3085         Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
3086         * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
3087         first boot option.
3088         * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
3090 2008-04-29  Robert Millan  <rmh@aybabtu.com>
3092         * docs/grub.cfg: New file (example GRUB configuration).
3094 2008-04-26  Robert Millan  <rmh@aybabtu.com>
3096         * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST).  Add
3097         `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
3098         and `disk/ieee1275/nand.c'.
3100 2008-04-25  Bean  <bean123ch@gmail.com>
3102         * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
3103         i386-linuxbios.
3105         * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
3106         change the buffer size to 4096 for cdrom device.
3108         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
3109         and nand.mod.
3110         (_linux_mod_SOURCES): New variable.
3111         (_linux_mod_CFLAGS): Likewise.
3112         (_linux_mod_LDFLAGS): Likewise.
3113         (linux_mod_SOURCES): Likewise.
3114         (linux_mod_CFLAGS): Likewise.
3115         (linux_mod_LDFLAGS): Likewise.
3116         (nand_mod_SOURCES): Likewise.
3117         (nand_mod_CFLAGS): Likewise.
3118         (nand_mod_LDFLAGS): Likewise.
3120         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
3121         GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
3122         type property. (nand device in olpc don't have this property)
3124         * include/grub/disk.h (grub_disk_dev_id): New macro
3125         GRUB_DISK_DEVICE_NAND_ID.
3127         * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
3128         function prototype.
3129         (grub_rescue_cmd_initrd): Likewise.
3131         * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
3132         (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
3133         ofw_cif_handler and ofw_idt, adjust padding number.
3135         * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
3136         GRUB_MACHINE_IEEE1275 is defined.
3138         * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
3139         Use NESTED_FUNC_ATTR attribute on the hook parameter.
3141         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
3142         on nested function heap_init.
3143         (grub_upper_mem): New variable for i386-ieee1275.
3144         (grub_get_extended_memory): New function for i386-ieee1275.
3145         (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
3147         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
3148         NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
3149         property.
3151         * loader/i386/ieee1275/linux.c: New file.
3153         * loader/i386/ieee1275/linux_normal.c: New file.
3155         * disk/ieee1275/nand.c: New file.
3157 2008-04-18  Thomas Schwinge  <tschwinge@gnu.org>
3159         * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
3160         value.
3161         * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
3163 2008-04-18  Robert Millan  <rmh@aybabtu.com>
3165         Restructures early code path on ieee1275 to unify grub_main() as
3166         the first C function that is executed in every platform.
3168         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
3169         * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
3170         cmain().
3171         * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
3172         * kern/ieee1275/cmain.c (cmain): Rename to ...
3173         * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
3174         * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
3175         at the beginning.
3177 2008-04-18  Robert Millan  <rmh@aybabtu.com>
3179         * util/update-grub.in: Fix syntax error when setting
3180         `GRUB_PRELOAD_MODULES'.
3181         Reported by Stephane Chazelas <stephane@artesyncp.com>
3183 2008-04-17  Lubomir Kundrak  <lkundrak@redhat.com>
3185         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
3186         section into account, newer toolchains generate unique build ids
3187         * configure.ac: remove the test for --build-id=none acceptance,
3188         we want build ids to be preserved
3189         * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
3190         far from other sections don't cause the raw binary images grow
3191         size
3193 2008-04-15  Robert Millan  <rmh@aybabtu.com>
3195         * disk/lvm.c: Update copyright year.
3196         * kern/misc.c: Likewise.
3198 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
3200         * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
3201         there is no memory left for physical volume name.
3203 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
3205         * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
3206         volume name mapping to support bigger than 9 character names properly.
3208 2008-04-13  Robert Millan  <rmh@aybabtu.com>
3210         * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
3211         as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
3213 2008-04-13  Christian Franke  <franke@computer.org>
3215         * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
3216         to create a floppy emulation boot CD when non emulation mode
3217         does not work.
3218         Enable Joliet CD filesystem extension.
3220 2008-04-13  Robert Millan  <rmh@aybabtu.com>
3222         * kern/misc.c (grub_strncat): Fix off-by-one error.
3223         Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
3225         * kern/env.c (grub_env_context_close): Clear current context, not
3226         previous one.
3227         Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
3229         * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
3231 2008-04-13  Robert Millan  <rmh@aybabtu.com>
3233         Improve robustness when handling LVM.
3235         * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
3236         (and leave `*p' unmodified).
3237         (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
3238         through it.
3239         (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
3240         iterating through it.
3241         (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
3242         through it.
3243         (grub_lvm_scan_device): Check the return value (and fail gracefully
3244         when due) on each grub_lvm_getvalue() or grub_strstr() call.
3245         Don't assume `vg->pvs != NULL' when iterating through it.
3247 2008-04-13  Robert Millan  <rmh@aybabtu.com>
3249         * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
3250         * genmk.rb (partmap): New variable.
3251         (CLEANFILES, PARTMAPFILES): Add #{partmap}.
3252         (#{partmap}): New target rule.
3253         * genpartmaplist.sh: New file.
3254         * Makefile.in (pkglib_DATA): Add partmap.lst.
3255         (partmap.lst): New target rule.
3256         * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
3257         modules (including all partition maps), instead of preloading them.
3259 2007-04-13  Fabian Greffrath  <fabian.greffrath@web.de>
3261         * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
3262         `linux-boot-prober' (if installed) to detect other operating
3263         systems which are installed on the computer and add them to
3264         the boot menu.
3265         * conf/common.rmk: Build and install 30_os-prober.
3267 2008-04-12  Robert Millan  <rmh@aybabtu.com>
3269         * kern/powerpc/ieee1275/init.c: Move from here ...
3270         * kern/ieee1275/init.c: ... to here.  Update all users.
3272         * kern/powerpc/ieee1275/cmain.c: Move from here ...
3273         * kern/ieee1275/cmain.c: ... to here.  Update all users.
3275         * kern/powerpc/ieee1275/openfw.c: Move from here ...
3276         * kern/ieee1275/openfw.c: ... to here.  Update all users.
3278         * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
3279         * loader/ieee1275/multiboot2.c: ... to here.  Update all users.
3281 2008-04-10  Pavel Roskin  <proski@gnu.org>
3283         * configure.ac: Always use "_cv_" in cache variables for
3284         compatibility with Autoconf 2.62.
3286 2008-04-07  Robert Millan  <rmh@aybabtu.com>
3288         Revert grub/machine/init.h addition by Pavel (since it breaks on
3289         i386-ieee1275 and others):
3290         * util/i386/pc/misc.c: Remove grub/machine/init.h.
3291         * util/powerpc/ieee1275/misc.c: Likewise.
3293 2008-04-07  Robert Millan  <rmh@aybabtu.com>
3295         * util/grub-probe.c (probe): Improve error message.
3297 2008-04-07  Robert Millan  <rmh@aybabtu.com>
3299         * util/biosdisk.c (read_device_map): Skip devices that don't exist
3300         (this prevents the presence of a bogus entry from ruining the whole
3301         thing).
3303 2008-04-06  Pavel Roskin  <proski@gnu.org>
3305         * util/biosdisk.c: Include grub/util/biosdisk.h.
3306         * util/grub-fstest.c (execute_command): Make static.
3307         * util/grub-mkdevicemap.c (check_device): Likewise.
3308         * util/i386/pc/misc.c: Include grub/machine/init.h.
3309         * util/powerpc/ieee1275/misc.c: Likewise.
3310         * util/lvm.c: Include grub/util/lvm.h.
3311         * util/misc.c: Include grub/kernel.h, grub/misc.h and
3312         grub/cache.h.
3313         * util/raid.c: Include grub/util/raid.h.
3314         (grub_util_getdiskname): Make static.
3316         * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
3317         grub_hostfs_fini(), as they are called from grub_init_all() and
3318         grub_fini_all() respectively.  This fixes an infinite loop in
3319         grub-fstest due to double registration of hostfs.
3320         Reported by Christian Franke <Christian.Franke@t-online.de>
3322 2008-04-05  Pavel Roskin  <proski@gnu.org>
3324         * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
3325         all 8 functions.  Otherwise, probe function 0 only.
3327 2008-04-04  Pavel Roskin  <proski@gnu.org>
3329         * commands/lspci.c (grub_lspci_iter): Print the bus number
3330         correctly.
3332         * commands/lspci.c (grub_pci_classes): Fix typos.
3333         (grub_lspci_iter): Don't print func twice.  Print vendor ID
3334         before device ID, as it's normally done.
3336         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
3337         Fix signedness warnings.
3338         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
3339         Likewise.
3340         * util/ieee1275/get_disk_name.c: Include config.h so that
3341         _GNU_SOURCE is defined and getline() is declared.  Mark an
3342         unused argument as such.  Fix a signedness warning.
3344 2008-04-02  Pavel Roskin  <proski@gnu.org>
3346         * genkernsyms.sh.in: Use more robust assignments for CC and
3347         srcdir.  Quote srcdir.
3348         * gensymlist.sh.in: Likewise.  Assert at the compile time that
3349         the symbol table is not empty.
3351         * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
3352         * fs/cpio.c (grub_cpio_read): Likewise.
3354 2008-04-01  Pavel Roskin  <proski@gnu.org>
3356         * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
3357         * disk/host.c (grub_host_open): Likewise.
3358         * disk/loopback.c (grub_loopback_open): Likewise.
3359         * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
3360         disk->id as in disk/host.c, not a multi-character constant.
3362         * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek().  The
3363         later is obsolete, potentially dangerous and sets a bad example.
3364         * util/i386/efi/grub-mkimage.c (make_header): Likewise.
3365         * util/misc.c (grub_util_get_image_size): Likewise.
3367         * disk/loopback.c (options): Improve help for "--partitions".
3369         * normal/arg.c (grub_arg_show_help): Fix spacing of the long
3370         options to align them with the short options, e.g. "echo -e".
3372 2008-03-31  Bean  <bean123ch@gmail.com>
3374         * video/reader/png.c (grub_png_data): New member is_16bit and
3375         image_data.
3376         (grub_png_decode_image_header): Detect 16 bit png image.
3377         (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
3378         (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
3379         (grub_video_reader_png): Release memory occupied by image_data.
3381         * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
3382         4096 bytes.
3383         (grub_nfs_mount): Skip the test for sector per cluster.
3385         * include/grub/ntfs.h (MAX_SPC): Removed.
3387 2008-03-31  Bean  <bean123ch@gmail.com>
3389         * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
3390         (grub_probe_SOURCES): Add fs/afs.c.
3391         (grub_fstest_SOURCES): Likewise.
3392         (afs_mod_SOURCES): New variable.
3393         (afs_mod_CFLAGS): Likewise.
3394         (afs_mod_LDFLAGS): Likewise.
3396         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
3397         (grub_emu_SOURCES): Likewise.
3399         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3401         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3403         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3405         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3407         * fs/afs.c: New file.
3409 2008-03-30  Pavel Roskin  <proski@gnu.org>
3411         * disk/host.c: Include grub/misc.h to fix a warning.
3412         * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
3413         warnings about implicit declarations.
3415         * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
3416         variable.
3417         * include/grub/i386/loader.h: Change declaration of
3418         grub_linux_boot() to match what grub_loader_set() expects.
3419         * util/getroot.c (grub_guess_root_device): Return const char* to
3420         fix a warning.
3421         * util/grub-probe.c (probe): Fix a warning about uninitialized
3422         abstraction_name variable.
3423         * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
3424         second argument as unused to fix a warning.
3426         * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
3427         missing grub_error() call.
3429         * util/update-grub_lib.in: Define datarootdir, since Autoconf
3430         2.60 and newer uses it to define datadir.
3432         * commands/sleep.c: Fix warning about implicit declaration.
3433         * disk/memdisk.c: Likewise.
3434         * loader/aout.c: Likewise.
3435         * loader/i386/bsd_normal.c: Likewise.
3436         * util/grub-probe.c: Likewise.
3438         * commands/i386/cpuid.c (has_longmode): Make static.
3439         * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
3440         * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
3442         * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
3443         GDT.  This is more robust, as %ds can change.
3444         (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
3445         calling real_to_prot().
3446         (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
3448 2008-03-28  Pavel Roskin  <proski@gnu.org>
3450         * kern/i386/pc/startup.S: Assert that uncompressed functions
3451         don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
3452         * kern/i386/pc/lzo1x.S: Remove all .align directives in the
3453         code, as they push parts of the code (error handlers) beyond
3454         GRUB_KERNEL_MACHINE_RAW_SIZE.  Speed is not as important in this
3455         code as correctness and size.
3457 2008-03-28  Pavel Roskin  <proski@gnu.org>
3459         * kern/i386/pc/startup.S
3460         (grub_biosdisk_get_diskinfo_int13_extensions): When converting
3461         data block address to the real mode, keep offset minimal.  This
3462         works around a bug in AWARD BIOS on old Athlon systems, which
3463         makes CD detection hang.
3465 2008-03-26  Pavel Roskin  <proski@gnu.org>
3467         * normal/color.c (grub_parse_color_name_pair): Make `name' a
3468         const.
3469         * include/grub/normal.h: Add grub_parse_color_name_pair()
3470         declaration.
3472 2008-03-24  Bean  <bean123ch@gmail.com>
3474         * disk/i386/pc/biosdisk.c (cd_start): Removed.
3475         (cd_count): Removed.
3476         (cd_drive): New variable.
3477         (grub_biosdisk_get_drive): Don't check for (cdN) device.
3478         (grub_biosdisk_call_hook): Likewise.
3479         (grub_biosdisk_iterate): Change cdrom detection method.
3480         (grub_biosdisk_open): Replace cd_start with cd_drive.
3481         (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
3482         detect cdrom device.
3484         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
3485         Removed.
3486         (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
3487         (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
3488         (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
3489         (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
3490         (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
3491         (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
3492         (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
3493         (grub_biosdisk_cdrp): New structure.
3494         (grub_biosdisk_get_cdinfo_int13_extensions): New function.
3496         * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
3498         * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
3499         device.
3501         * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
3502         New function.
3504 2008-03-20  Robert Millan  <rmh@aybabtu.com>
3506         Remove 2 TiB limit in ata.mod.
3507         * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
3508         (grub_ata_dumpinfo): Print sector count with 0x%llx.
3509         (grub_ata_identify): Interpret `&info16[100]' as a pointer to
3510         grub_uint64_t instead of grub_uint32_t.
3512 2008-03-05  Bean  <bean123ch@gmail.com>
3514         * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
3515         (grub_multiboot): Set boot device.
3517         * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
3519 2008-03-02  Bean  <bean123ch@gmail.com>
3521         * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
3522         symlink_buffer.
3524 2008-03-01  Yoshinori K. Okuji  <okuji@enbug.org>
3526         * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
3527         texinfo.tex.
3529         * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
3530         modified.
3532         * docs/fdl.texi: New file.
3534         * docs/mdate-sh: New file. Copied from gnulib.
3535         * docs/texinfo.tex: Likewise.
3537         * config.guess: Updated from gnulib.
3538         * install-sh: Likewise.
3540 2008-02-28  Robert Millan  <rmh@aybabtu.com>
3542         * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
3543         (aout_mod_SOURCES): New variable.
3544         (aout_mod_CFLAGS): Likewise.
3545         (aout_mod_LDFLAGS): Likewise.
3547         * conf/i386-ieee1275.rmk: Likewise.
3549 2008-02-28  Robert Millan  <rmh@aybabtu.com>
3551         * util/update-grub.in: Reorganise terminal validity check.  Accept
3552         `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
3553         Based on suggestion by Franklin PIAT.
3555 2008-02-28  Fabian Greffrath  <greffrath@leat.rub.de>
3557         * include/grub/util/getroot.h (grub_util_check_block_device): Export new
3558         function.
3559         * util/getroot.c (grub_util_check_block_device): New function that
3560         returns the given argument if it is a block device and returns NULL else.
3561         * util/grub-probe.c (argument_is_device): New variable.
3562         (probe): Promote device_name from a variable to an argument. Receive
3563         device_name from grub_util_check_block_device() if path is NULL and from
3564         grub_guess_root_device() else. Do not free() device_name anymore.
3565         (options): Introduce new parameter '-d, --device'.
3566         (main): Add description of the new parameter to the help screen.
3567         Rename path variable to argument. Set argument_is_device if the '-d'
3568         option is given. Pass argument to probe() depending on
3569         argument_is_device.
3571 2008-02-24  Bean  <bean123ch@gmail.com>
3573         * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
3574         (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
3575         (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
3576         (GRUB_ISO9660_VOLDESC_PART): Likewise.
3577         (GRUB_ISO9660_VOLDESC_END): Likewise.
3578         (grub_iso9660_primary_voldesc): New member escape.
3579         (grub_iso9660_data): New member joliet.
3580         (grub_iso9660_convert_string): New function.
3581         (grub_iso9660_mount): Detect joliet extension.
3582         (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
3583         (grub_iso9660_iso9660_label): Likewise.
3585         * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
3586         (grub_setup_SOURCES): Add fs/udf.c.
3587         (grub_fstest_SOURCES): Likewise.
3588         (udf_mod_SOURCES): New variable.
3589         (udf_mod_CFLAGS): Likewise.
3590         (udf_mod_LDFLAGS): Likewise.
3592         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
3593         (grub_emu_SOURCES): Likewise.
3595         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3597         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3599         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3601         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3603         * fs/udf.c: New file.
3605 2008-02-24  Robert Millan  <rmh@aybabtu.com>
3607         * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
3608         (normal/lexer.c_DEPENDENCIES): New variables.
3609         * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
3610         (normal/lexer.c_DEPENDENCIES): Likewise.
3611         * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
3612         (normal/lexer.c_DEPENDENCIES): Likewise.
3613         * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
3614         (normal/lexer.c_DEPENDENCIES): Likewise.
3615         * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
3616         (normal/lexer.c_DEPENDENCIES): Likewise.
3617         * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
3618         (normal/lexer.c_DEPENDENCIES): Likewise.
3620 2008-02-23  Robert Millan  <rmh@aybabtu.com>
3622         * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
3623         since they were intended to be in hex.  This didn't break previously
3624         because of a bug in gpt_partition_map_iterate() (see below).
3626         (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
3627         when checking the validity of GPT header.
3628         Remove `partno', since it always provides the same information as `i'.
3630 2008-02-21  Yoshinori K. Okuji  <okuji@enbug.org>
3632         * include/grub/efi/time.h: Fix a wrong comment.
3634 2008-02-19  Pavel Roskin  <proski@gnu.org>
3636         * kern/rescue.c (grub_enter_rescue_mode): Improve initial
3637         message.
3639 2008-02-19  Bean  <bean123ch@gmail.com>
3641         * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
3642         (aout_mod_SOURCES): New variable.
3643         (aout_mod_CFLAGS): Likewise.
3644         (aout_mod_LDFLAGS): Likewise.
3645         (_bsd_mod_SOURCES): New variable.
3646         (_bsd_mod_CFLAGS): Likewise.
3647         (_bsd_mod_LDFLAGS): Likewise.
3648         (bsd_mod_SOURCES): New variable.
3649         (bsd_mod_CFLAGS): Likewise.
3650         (bsd_mod_LDFLAGS): Likewise.
3652         * include/grub/aout.h: New file.
3654         * include/grub/i386/loader.h (grub_unix_real_boot): New function.
3656         * include/grub/i386/bsd.h: New file.
3658         * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
3659         to make it public.
3661         * kern/elf.c (grub_elf32_load): Get the physical address after the hook
3662         function is called, so that it's possible to change it inside the hook.
3663         (grub_elf64_load): Likewise.
3664         (grub_elf_file): Don't close the file if elf header is not found.
3665         (grub_elf_close): Close the file if grub_elf_file fails (The new
3666         grub_elf_file won't close it).
3667         (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
3668         (grub_elf64_size): Likewise.
3670         * kern/i386/loader.S (grub_unix_real_boot): New function.
3672         * loader/aout.c: New file.
3674         * loader/i386/bsd.c: New file.
3676         * loader/i386/bsd_normal.c: New file.
3678         * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
3680         * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
3681         can test other formats.
3683 2008-02-19  Robert Millan  <rmh@aybabtu.com>
3685         * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
3686         (grub_gpt_partition_type_empty): Redefine with macro from
3687         `<grub/gpt_partition.h>'.
3688         (gpt_partition_map_iterate): Adjust partition type comparison.
3690         Export `entry' as partmap-specific `part.data' struct.
3691         (grub_gpt_header, grub_gpt_partentry): Move from here ...
3693         * include/grub/gpt_partition.h (grub_gpt_header)
3694         (grub_gpt_partentry): ... to here (new file).
3696         * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
3698         (grub_gpt_partition_type_bios_boot): New const variable, defined
3699         with macro from `<grub/gpt_partition.h>'.
3701         (setup): Replace `first_start' with `embed_region', which keeps
3702         track of the embed region (and is partmap-agnostic).
3704         Replace find_first_partition_start() with find_usable_region(),
3705         which finds a usable region for embedding using partmap-specific
3706         knowledge (supports PC/MSDOS and GPT).
3708         Fix all assumptions that the embed region start at sector 1, using
3709         `embed_region.start' from now on.  Similarly, use `embed_region.end'
3710         rather than `first_start' to calculate available size.
3712         In grub_util_info() message, replace "into after the MBR" with an
3713         indication of the specific sector our embed region starts at.
3715 2008-02-19  Robert Millan  <rmh@aybabtu.com>
3717         * DISTLIST: Replace `commands/ieee1275/halt.c' and
3718         `commands/ieee1275/reboot.c' with `commands/halt.c' and
3719         `commands/reboot.c'.
3720         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
3721         (halt_mod_SOURCES): Likewise.
3722         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
3723         (halt_mod_SOURCES): Likewise.
3725 2008-02-17  Christian Franke  <franke@computer.org>
3727         * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
3729 2008-02-17  Robert Millan  <rmh@aybabtu.com>
3731         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
3732         set `first_start' to 0 for non-PC/MSDOS partition maps.
3734 2008-02-16  Robert Millan  <rmh@aybabtu.com>
3736         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
3737         do not assume partition map is PC/MSDOS before performing checks that
3738         are specific to that layout.
3740 2008-02-13  Robert Millan  <rmh@aybabtu.com>
3742         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
3743         `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
3744         * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
3746 2008-02-13  Yoshinori K. Okuji  <okuji@enbug.org>
3748         * configure.ac: Only a cosmetic change on the handling of
3749         -fno-stack-protector.
3751 2008-02-12  Alexandre Boeglin  <alex@boeglin.org>
3753         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
3754         commands/i386/pc/halt.c and reboot.c by commands/halt.c and
3755         reboot.c.
3756         (grub_install_SOURCES): Add halt.mod and reboot.mod.
3757         (halt_mod_SOURCES): New variable.
3758         (halt_mod_CFLAGS): Likewise.
3759         (halt_mod_LDFLAGS): Likewise.
3760         (reboot_mod_SOURCES): Likewise.
3761         (reboot_mod_CFLAGS): Likewise.
3762         (reboot_mod_LDFLAGS): Likewise.
3764         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
3765         commands/ieee1275/halt.c and reboot.c by commands/halt.c and
3766         reboot.c.
3767         (halt_mod_SOURCES): Likewise.
3768         (reboot_mod_SOURCES): Likewise.
3770         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
3771         commands/i386/pc/reboot.c by commands/reboot.c.
3772         (reboot_mod_SOURCES): Likewise.
3774         * commands/i386/pc/reboot.c: merge this file ...
3776         * commands/ieee1275/reboot.c: ... and this file ...
3778         * commands/reboot.c: ... to this file.
3779         Add some precompiler directive to include the correct header for
3780         each machine.
3782         * commands/ieee1275/halt.c: move this file ...
3784         * commands/halt.c: ... to here.
3785         Add some precompiler directive to include the correct header for
3786         each machine.
3788         * include/grub/efi/efi.h (grub_reboot): New function declaration.
3789         (grub_halt): Likewise.
3791         * kern/efi/efi.c (grub_reboot): New function.
3792         (grub_halt): Likewise.
3794 2008-02-12  Robert Millan  <rmh@aybabtu.com>
3796         * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
3797         /dev (like it is done for /dev/mapper).  This doesn't provide support
3798         for EVMS, but at least it is now easy to identify the problem when it
3799         arises.
3801 2008-02-11  Robert Millan  <rmh@aybabtu.com>
3803         * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
3804         (grub_util_biosdisk_get_grub_dev): Check open() exit status by
3805         comparing it with -1, not 0.
3807 2008-02-10  Robert Millan  <rmh@aybabtu.com>
3809         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
3810         `disk/lvm.c'.
3811         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3812         * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
3814         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
3815         `disk/lvm.c' to the end of the list.
3816         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3817         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3819 2008-02-10  Robert Millan  <rmh@aybabtu.com>
3821         * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'.  Call
3822         grub_print_error() instead.  This will let user know why we're entering
3823         rescue mode.
3824         Based on suggestions from Sam Morris.
3826 2008-02-10  Alexandre Boeglin  <alex@boeglin.org>
3828         * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
3829         on remaining N args, instead of "--" arg N times.
3831 2008-02-09  Vesa Jaaskelainen  <chaac@nic.fi>
3833         * font/manager.c (unknown_glyph): Added variable for unknown glyph.
3834         (fill_with_default_glyph): Changed to use unknown_glyph for fill
3835         pattern for unknown glyphs.
3837 2008-02-09  Robert Millan  <rmh@aybabtu.com>
3839         * configure.ac: Probe for `help2man'.
3840         * Makefile.in (builddir): New variable.
3841         (HELP2MAN): Likewise.  Set to `true' when @HELP2MAN@ doesn't provide it,
3842         or otherwise add a few flags/options to it.
3843         (install-local): For every executable utility or script that is
3844         installed, invoke $(HELP2MAN) to install a manpage based on --help
3845         output.
3847         * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
3848         that it doesn't prevent --help from working in build tree.
3850         * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
3851         with `bug-grub@gnu.org'.
3852         * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
3853         * util/update-grub.in (usage): New function.
3854         Implement proper argument check, with support for --help and --version
3855         (as well as existing -y).
3857 2008-02-09  Christian Franke  <franke@computer.org>
3859         * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
3860         avoid overwriting previous output.
3861         * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
3863 2008-02-09  Robert Millan  <rmh@aybabtu.com>
3865         * normal/menu.c (run_menu): If timeout is set to zero, don't bother
3866         drawing the menu.
3868 2008-02-09  Robert Millan  <rmh@aybabtu.com>
3870         * commands/sleep.c: New file.
3871         * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
3872         (sleep_mod_SOURCES): New variable.
3873         (sleep_mod_CFLAGS): Likewise.
3874         (sleep_mod_LDFLAGS): Likewise.
3876 2008-02-09  Robert Millan  <rmh@aybabtu.com>
3878         * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
3879         situations in which we can deduce the RAID size and the superblock
3880         doesn't match it.
3882 2008-02-09  Robert Millan  <rmh@aybabtu.com>
3884         * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function.  Construct
3885         and return a grub_diskmemberlist_t composed of LVM physical volumes.
3886         [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
3888         * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function.  Construct
3889         and return a grub_diskmemberlist_t composed of physical array members.
3890         [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
3892         * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
3893         prototype.
3894         [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
3895         [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
3896         [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
3898         * util/grub-probe.c (probe): Move partmap probing code from here ...
3899         (probe_partmap): ... to here.
3900         (probe): Use probe_partmap() once for the disk we're probing, and
3901         additionally, when such disk contains a memberlist() struct member,
3902         once for each disk that is contained in the structure returned by
3903         memberlist().
3905 2008-02-09  Robert Millan  <rmh@aybabtu.com>
3907         * util/grub-probe.c (main): When `verbosity > 1', set `debug'
3908         environment variable to 'all' in order to obtain debug output from
3909         non-util/ code.
3910         * util/i386/pc/grub-setup.c (main): Likewise.
3912 2008-02-08  Robert Millan  <rmh@aybabtu.com>
3914         * disk/raid.c (grub_raid_scan_device): Check for
3915         `array->device[sb.this_disk.number]' rather than for
3916         `array->device[sb.this_disk.number]->name', since the latter is not
3917         guaranteed to be accessible.
3919 2008-02-08  Robert Millan  <rmh@aybabtu.com>
3921         * disk/raid.c: Update copyright.
3922         * fs/cpio.c: Likewise.
3923         * include/grub/raid.h: Likewise.
3924         * loader/i386/pc/multiboot.c: Likewise.
3925         * util/hostfs.c: Likewise.
3927 2008-02-08  Robert Millan  <rmh@aybabtu.com>
3929         * include/grub/raid.h (struct grub_raid_array): Change type of `device'
3930         to a grub_disk_t array.
3931         * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
3932         `device[x]'.
3933         (grub_raid_scan_device): Replace `device[x].name' accesses with
3934         `device[x]->name'.  Simplify initialization of `array->device[x]'.
3936 2008-02-08  Robert Millan  <rmh@aybabtu.com>
3938         * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
3939         grub_dprintf() calls.
3940         * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
3941         error message.
3943 2008-02-07  Christian Franke  <franke@computer.org>
3945         * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
3946         instead of fseek and ftell to support large files.
3947         (grub_hostfs_read): Likewise.
3949 2008-02-07  Robert Millan  <rmh@aybabtu.com>
3951         Patch from Jeroen Dekkers.
3952         * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
3953         failure, since successfully reading all array members might not be
3954         required.
3956 2008-02-06  Robert Millan  <rmh@aybabtu.com>
3958         * util/grub-probe.c (probe): Simplify partmap probing (with the
3959         assumption that the first word up to the underscore equals to
3960         the module name).
3962 2008-02-06  Christian Franke  <franke@computer.org>
3964         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
3965         (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
3966         last block of a cpio or tar stream.
3967         Check for "TRAILER!!!" instead of any empty data
3968         block to detect last block of a cpio stream.
3969         (grub_cpio_dir): Fix constness of variable np.
3970         (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
3971         cpio or tar trailer is detected.  This fixes a crash
3972         on open of a non existing file.
3974 2008-02-05  Bean  <bean123ch@gmail.com>
3976         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
3977         address of entry.
3978         (grub_multiboot_load_elf64): Likewise.
3979         (grub_multiboot): Initialize mbi structure.
3981         * util/grub-fstest.c: Don't include unused header file script.h.
3983         * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
3984         of file.
3985         (grub_fstest_SOURCES): Likewise.
3987 2008-02-05  Robert Millan  <rmh@aybabtu.com>
3989         * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
3990         (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
3991         (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
3992         (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
3994         * kern/i386/pc/startup.S: Include `<grub/term.h>'.
3995         (translation_table): Replace hardcoded values with macros
3996         provided by `<grub/term.h>'.
3998         * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
3999         (keyboard_map): Correct/add a few values, with macros provided
4000         by `<grub/term.h>'.
4001         (keyboard_map_shift): Zero values that don't differ from their
4002         `keyboard_map' equivalents.
4003         (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
4004         Discard the second scan code that is always sent by Caps lock.
4005         Only use `keyboard_map_shift' when it provides a non-zero value,
4006         otherwise fallback to `keyboard_map'.
4008 2008-02-04  Bean  <bean123ch@gmail.com>
4010         * Makefile.in (enable_grub_fstest): New variable.
4012         * conf/common.rmk (grub_fstest_init.lst): New rule.
4013         (grub_fstest_init.h): Likewise.
4014         (grub_fstest_init.c): Likewise.
4015         (util/grub-fstest.c_DEPENDENCIES): New variable.
4016         (grub_fstest_SOURCES): Likewise.
4018         * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
4020         * util/grub-fstest.c: New file.
4022 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
4024         Make grub-setup handle a separate root device.
4026         * util/i386/pc/grub-setup.c (setup): Always open the root device,
4027         so that the root device can be compared with the destination
4028         device.
4029         When embedding the core image, if the root and destination devices
4030         are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
4031         0xFF.
4032         When not embedding, set ROOT_DRIVE to 0xFF.
4034 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
4036         Add support for having a grub directory in a different drive. This
4037         is still only the data handling part.
4039         * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
4040         (codestart): Save %dh in GRUB_ROOT_DRIVE.
4041         (grub_root_drive): New variable.
4043         * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
4044         instead of GRUB_BOOT_DRIVE to construct a device name. Set
4045         GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
4046         as it was.
4048         * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
4050         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
4051         macro.
4052         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
4054         * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
4055         is bogus, because PXE booting does not specify any drive
4056         correctly.
4058         * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
4059         am not sure if this is really correct.
4061         * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
4062         is always identical to the boot drive when booting from a CD.
4064         * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
4065         longer.
4066         (root_drive): New variable.
4067         (real_start): Unconditionally set %dh to ROOT_DRIVE.
4068         (setup_sectors): Push %dx right after popping it, because %dh will
4069         be modified later.
4070         (copy_buffer): Restore %dx.
4072 2008-02-03  Robert Millan  <rmh@aybabtu.com>
4074         * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
4075         use `cdboot.img' for cdrom images.
4077 2008-02-03  Robert Millan  <rmh@aybabtu.com>
4079         * util/grub.d/00_header.in: Issue scripting commands for GRUB to
4080         only setup gfxterm when `font' command has succeeded.
4082 2008-02-03  Robert Millan  <rmh@aybabtu.com>
4084         * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
4085         (grub_rescue_cmd_multiboot_loader)
4086         (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
4088 2008-02-03  Pavel Roskin  <proski@gnu.org>
4090         * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
4091         %edx and %esi from stack only after grub_gate_a20() is called.
4092         grub_gate_a20() clobbers %edx.
4094 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
4096         * configure.ac (AC_INIT): Bumped to 1.96.
4098         * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
4099         commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
4100         include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
4101         video/readers/png.c.
4103 2008-02-03  Bean  <bean123ch@gmail.com>
4105         * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
4106         (cdboot_img_SOURCES): New variable.
4107         (cdboot_img_ASFLAGS): New variable.
4108         (cdboot_img_LDFLAGS): New variable.
4110         * boot/i386/pc/cdboot.S: New file.
4112         * disk/i386/pc/biosdisk.c (cd_start): New variable.
4113         (cd_count): Likewise.
4114         (grub_biosdisk_get_drive): Add support for cd device.
4115         (grub_biosdisk_call_hook): Likewise.
4116         (grub_biosdisk_iterate): Likewise.
4117         (grub_biosdisk_open): Likewise.
4118         (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
4119         (grub_biosdisk_rw): Support reading from cd device.
4120         (GRUB_MOD_INIT): Iterate cd devices.
4122         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
4123         (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
4124         (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
4126         * kern/i386/pc/init.c (make_install_device): Check for cd device.
4128 2008-02-02  Robert Millan  <rmh@aybabtu.com>
4130         * commands/read.c: New file.
4131         * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
4132         (read_mod_SOURCES): New variable.
4133         (read_mod_CFLAGS): Likewise.
4134         (read_mod_LDFLAGS): Likewise.
4136 2008-02-02  Robert Millan  <rmh@aybabtu.com>
4138         * normal/main.c (grub_normal_execute): Check for `menu->size' when
4139         determining whether menu has to be displayed.
4141 2008-02-02  Marco Gerards  <marco@gnu.org>
4143         * bus/pci.c: New file.
4145         * include/grub/pci.h: Likewise.
4147         * include/grub/i386/pc/pci.h: Likewise.
4149         * commands/lspci.c: Likewise.
4151         * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
4152         `lspci.mod'.
4153         (pci_mod_SOURCES): New variable.
4154         (pci_mod_CFLAGS): Likewise.
4155         (pci_mod_LDFLAGS): Likewise.
4156         (lspci_mod_SOURCES): Likewise.
4157         (lspci_mod_CFLAGS): Likewise.
4158         (lspci_mod_LDFLAGS): Likewise.
4160 2008-02-02  Bean  <bean123ch@gmail.com>
4162         * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
4163         (grub_ufs_get_file_block): Fix indirect block calculation problem.
4165         * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
4166         (grub_xfs_btree_node): New structure.
4167         (grub_xfs_btree_root): New structure.
4168         (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
4169         (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
4170         (GRUB_XFS_EXTENT_BLOCK): Likewise.
4171         (GRUB_XFS_EXTENT_SIZE): Likewise.
4172         (grub_xfs_read_block): Support btree format type.
4173         (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
4174         Use directory block as basic unit.
4176         * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
4178         * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
4179         __attribute__ ((__regparm__ (1))).
4181 2008-02-01  Robert Millan  <rmh@aybabtu.com>
4183         Correct a mistake in previous commit.
4185         * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
4186         top.
4187         (normal/command.c_DEPENDENCIES): New variable.
4189 2008-02-01  Robert Millan  <rmh@aybabtu.com>
4191         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
4192         top.
4193         (normal/command.c_DEPENDENCIES): New variable.
4194         (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
4195         * conf/i386-ieee1275.rmk: Likewise.
4196         * conf/i386-linuxbios.rmk: Likewise.
4197         * conf/i386-pc.rmk: Likewise.
4198         * conf/sparc64-ieee1275.rmk: Likewise.
4199         * conf/powerpc-ieee1275.rmk: Likewise.
4200         (grub_emu_SOURCES): Add `fs/fshelp.c'.
4202         * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
4204 2008-02-01  Robert Millan  <rmh@aybabtu.com>
4206         * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
4207         call at beginning of function.
4209 2008-01-31  Pavel Roskin  <proski@gnu.org>
4211         * util/powerpc/ieee1275/grub-mkrescue.in: New file.
4212         * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
4213         (grub_mkrescue_SOURCES): Likewise.
4214         * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
4216 2008-01-30  Robert Millan  <rmh@aybabtu.com>
4218         * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
4219         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
4220         * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
4221         (grub_probe_SOURCES): ... to here.
4223         * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
4224         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
4225         * conf/i386-ieee1275.rmk: Likewise.
4226         * conf/i386-linuxbios.rmk: Likewise.
4227         * conf/powerpc-ieee1275.rmk: Likewise.
4229 2008-01-30  Tristan Gingold  <gingold@free.fr>
4231         * kern/rescue.c: Silently accept empty lines.
4233 2008-01-29  Bean  <bean123ch@gmail.com>
4235         * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
4236         (real_code_2): Code cleanup and change comment style.
4237         (move_memory): Avoid using 32-bit address mode.
4239 2008-01-29  Bean  <bean123ch@gmail.com>
4241         * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
4242         (png_mod_SOURCES): New variable.
4243         (png_mod_CFLAGS): Likewise.
4244         (png_mod_LDFLAGS): Likewise.
4246         * video/readers/png.c: New file.
4248 2008-01-28  Robert Millan  <rmh@aybabtu.com>
4250         * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
4251         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
4252         `ifndef GRUB_MOD_GAP' hack.
4253         * util/elf/grub-mkimage.c (add_segments): Likewise.
4255 2008-01-27  Robert Millan  <rmh@aybabtu.com>
4257         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
4258         `GRUB_MOD_GAP' for platforms in which it's not defined.
4259         * util/elf/grub-mkimage.c (add_segments): Likewise.
4261 2008-01-27  Robert Millan  <rmh@aybabtu.com>
4263         Get grub-emu to build again (including parallel builds).
4265         * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
4266         Split into ...
4267         (util/grub-emu.c_DEPENDENCIES): ... this, ...
4268         (normal/execute.c_DEPENDENCIES): ... this, ...
4269         (grub-emu_DEPENDENCIES): ... and this.
4271         * conf/i386-efi.rmk: Likewise.
4272         * conf/i386-linuxbios.rmk: Likewise.
4273         * conf/i386-ieee1275.rmk: Likewise.
4274         * conf/powerpc-ieee1275.rmk: Likewise.
4275         (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
4277 2008-01-27  Robert Millan  <rmh@aybabtu.com>
4279         * NEWS: Add a few items.
4281 2008-01-27  Robert Millan  <rmh@aybabtu.com>
4283         Fix parallel builds with grub-emu.  Based on earlier commit for
4284         grub-probe and grub-setup.
4286         * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4287         (util/grub-emu.c_DEPENDENCIES): ... this.
4288         * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4289         (util/grub-emu.c_DEPENDENCIES): ... this.
4290         * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4291         (util/grub-emu.c_DEPENDENCIES): ... this.
4292         * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4293         (util/grub-emu.c_DEPENDENCIES): ... this.
4294         * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4295         (util/grub-emu.c_DEPENDENCIES): ... this.
4297 2008-01-27  Pavel Roskin  <proski@gnu.org>
4299         * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
4300         to create a gap between _end and the modules added to the image
4301         with grub-mkrescue.  That fixes "CLAIM failed" on PowerMAC.
4302         * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
4303         * util/elf/grub-mkimage.c (add_segments): Likewise.
4305 2008-01-26  Pavel Roskin  <proski@gnu.org>
4307         * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
4308         just return an error.
4310 2008-01-26  Bean  <bean123ch@gmail.com>
4312         * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
4313         (grub_reiserfs_get_item): Save offset of the next item.
4314         (grub_reiserfs_iterate_dir): Use next_offset to find next item.
4316 2008-01-25  Robert Millan  <rmh@aybabtu.com>
4318         * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
4319         make all filesystem sources appear together (possibly fixing omissions
4320         while at it).
4321         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4322         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4323         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4324         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4326         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.  Additionally,
4327         add `kern/file.c'.
4328         * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
4329         * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
4330         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
4331         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
4333         * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
4334         (probe): Add a sanity check to make sure of our ability to read
4335         requested files when probing for filesystem type.
4337         * genmk.rb: Update copyright year (2007).
4339         * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
4340         (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
4341         (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
4342         (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
4343         (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
4344         : Remove function prototypes.
4346 2008-01-25  Robert Millan  <rmh@aybabtu.com>
4348         Revert my previous commits (based on wrong assumption of how grub_errno
4349         works).
4351         * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
4352         * kern/file.c (grub_file_open): Likewise.
4354 2008-01-24  Pavel Roskin  <proski@gnu.org>
4356         * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
4357         that hang if GRUB tries to setup colors.
4358         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
4359         colors for firmwares that don't support it.
4360         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
4361         Recognize Open Hack'Ware, set flags to work around its
4362         limitations.
4364 2008-01-24  Robert Millan  <rmh@aybabtu.com>
4366         * kern/file.c (grub_file_open): Do not account previous failures of
4367         unrelated functions when grub_errno is checked for.
4368         Reported by Oleg Strikov.
4370 2008-01-24  Bean  <bean123ch@gmail.com>
4372         * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
4373         (grub_ufs_sblock): New member volume name.
4374         (grub_ufs_find_file): Fix string copy bug.
4375         (grub_ufs_label): Implement this function properly.
4377         * fs/hfs.c (grub_hfs_cnid_type): New enum.
4378         (grub_hfs_iterate_records): Use the correct file number for extents
4379         and catalog file. Fix problem in next index calculation.
4380         (grub_hfs_find_node): Replace recursive function call with loop.
4381         (grub_hfs_iterate_dir): Replace recursive function call with loop.
4383 2008-01-23  Robert Millan  <rmh@aybabtu.com>
4385         * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
4386         `<grub/symbol.h>' and `<grub/multiboot.h>'.
4387         (grub_multiboot2_real_boot): New function prototype.
4389         * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
4390         [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
4392         * kern/i386/ieee1275/init.c (grub_os_area_addr)
4393         (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
4395 2008-01-23  Robert Millan  <rmh@aybabtu.com>
4397         * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
4398         #ifdef'ed out grub_printf().
4400 2008-01-23  Robert Millan  <rmh@aybabtu.com>
4402         * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
4403         grub_dprintf calls, since they make "debug=all" mode unusable.
4404         (grub_console_checkkey): Likewise.
4406 2008-01-23  Robert Millan  <rmh@aybabtu.com>
4408         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
4409         `term/i386/pc/at_keyboard.c'.
4410         (pkglib_MODULES): Add `serial.mod'.
4411         (serial_mod_SOURCES): New variable.
4412         (serial_mod_CFLAGS): Likewise.
4413         (serial_mod_LDFLAGS): Likewise.
4415         * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'.  Remove
4416         `<grub/powerpc/ieee1275/console.h>'.
4417         (grub_keyboard_controller_init): New function prototype.
4418         (grub_console_checkkey): Likewise.
4419         (grub_console_getkey): Likewise.
4421         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
4422         keyboard on i386.
4424         * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
4425         grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
4427 2008-01-23  Robert Millan  <rmh@aybabtu.com>
4429         * kern/i386/pc/init.c (make_install_device): When memdisk image is
4430         present, "(memdisk)/boot/grub" becomes the default prefix.
4432         * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
4433         a memdisk tarball with all the modules.  Add --overlay=DIR option that
4434         allows users to overlay additional files into the image.
4436 2008-01-23  Robert Millan  <rmh@aybabtu.com>
4438         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
4439         and `machine/memory.h'.
4440         (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
4441         (_multiboot_mod_SOURCES): New variable.
4442         (_multiboot_mod_CFLAGS): Likewise.
4443         (_multiboot_mod_LDFLAGS): Likewise.
4444         (multiboot_mod_SOURCES): Likewise.
4445         (multiboot_mod_CFLAGS): Likewise.
4446         (multiboot_mod_LDFLAGS): Likewise.
4448         * include/grub/i386/ieee1275/loader.h: New file.
4450         * include/grub/i386/ieee1275/machine.h: Likewise.
4452         * include/grub/i386/ieee1275/memory.h: Likewise.
4454         * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
4455         variable declaration.
4456         (grub_os_area_size): Likewise.
4458         * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
4459         (grub_lower_mem, grub_upper_mem): New variables.
4460         (grub_stop_floppy): New function (just to make
4461         grub_multiboot2_real_boot() happy).
4463         * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
4464         `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
4465         (grub_stop): New function.
4466         Include `"../realmode.S"' and `"../loader.S"'.
4468         * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
4469         Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
4471         * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
4472         rely on grub_multiboot2_real_boot() for final boot.
4474 2008-01-22  Robert Millan  <rmh@aybabtu.com>
4476         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
4477         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
4478         device that doesn't look like an SD card.
4479         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
4480         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
4481         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
4482         OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
4483         found.
4485 2008-01-22  Robert Millan  <rmh@aybabtu.com>
4487         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
4488         avoid claiming over our own code.
4490 2008-01-22  Bean  <bean123ch@gmail.com>
4492         * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
4493         (jpeg_mod_SOURCES): New variable.
4494         (jpeg_mod_CFLAGS): Likewise.
4495         (jpeg_mod_LDFLAGS): Likewise.
4497         * video/readers/jpeg.c : New file.
4499 2008-01-22  Bean  <bean123ch@gmail.com>
4501         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
4502         there are no more items.
4504 2008-01-21  Robert Millan  <rmh@aybabtu.com>
4506         * kern/mm.c (grub_mm_init_region): Improve debug message.
4508 2008-01-21  Robert Millan  <rmh@aybabtu.com>
4510         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
4511         (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
4512         address.
4513         (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
4514         a C macro.
4515         * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
4516         Indicates start of upper memory.
4517         * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
4518         (generate_image): Abort when image size is big enough to corrupt
4519         upper memory.
4521         * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
4522         (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
4523         * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
4524         instead of hardcoding 0xA0000.
4525         * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
4526         (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
4527         instead of hardcoding 0xA0000.
4529 2008-01-21  Robert Millan  <rmh@aybabtu.com>
4531         * disk/memdisk.c (memdisk_size): New variable.
4532         (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
4533         `memdisk_size'.
4534         (grub_memdisk_init): Initialize `memdisk_size'.  Reallocate memdisk
4535         image to dynamic memory.
4536         (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
4537         `memdisk_size'.  Free memdisk block.
4539 2008-01-21  Robert Millan  <rmh@aybabtu.com>
4541         Fix detection of very small filesystems (like tar).
4543         * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
4544         contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
4545         GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
4546         a problem with this disk).
4548 2008-01-21  Robert Millan  <rmh@aybabtu.com>
4550         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
4551         on grub_biosdisk_rw_standard() error.
4553 2008-01-21  Robert Millan  <rmh@aybabtu.com>
4555         * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
4556         recent changes.
4557         * kern/elf.c: Likewise.
4558         * kern/ieee1275/ieee1275.c: Likewise.
4559         * kern/powerpc/ieee1275/openfw.c: Likewise.
4560         * term/ieee1275/ofconsole.c: Likewise.
4562 2008-01-21  Robert Millan  <rmh@aybabtu.com>
4564         * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
4566         * include/grub/kernel.h (grub_arch_memdisk_addr)
4567         (grub_arch_memdisk_size): Moved from here ...
4569         * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
4570         (grub_arch_memdisk_size): ... to here.
4572 2008-01-21  Robert Millan  <rmh@aybabtu.com>
4574         Mostly based on bugfix from Bean.
4576         * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
4577         attribute with hook() parameter.
4578         (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
4579         declaration.
4580         (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
4581         attribute with hook() parameter.
4582         (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
4583         declaration.
4585 2008-01-21  Robert Millan  <rmh@aybabtu.com>
4587         * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
4588         (pkglib_MODULES): Add `memdisk.mod'.
4589         (memdisk_mod_SOURCES): New variable.
4590         (memdisk_mod_CFLAGS): Likewise.
4591         (memdisk_mod_LDFLAGS): Likewise.
4593         * disk/memdisk.c: New file.
4595         * include/grub/disk.h (grub_disk_dev_id): Add
4596         `GRUB_DISK_DEVICE_MEMDISK_ID'.
4598         * include/grub/i386/pc/kernel.h
4599         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
4600         (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
4601         (grub_kernel_image_size): New variable declaration.
4602         (grub_total_module_size): Likewise.
4603         (grub_memdisk_image_size): Likewise.
4605         * include/grub/i386/pc/memory.h
4606         (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
4608         * include/grub/kernel.h: Include `<grub/symbol.h>'.
4609         (grub_arch_memdisk_addr): New variable declaration.
4610         (grub_arch_memdisk_size): Likewise.
4612         * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
4613         (grub_arch_memdisk_size): Likewise.
4615         * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
4616         (codestart): Replace hardcoded `0x100000' with
4617         `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
4619         * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
4620         (generate_image): Add `memdisk_path' parameter.  When `memdisk_path' is
4621         not NULL, append the contents of the file it refers to, at the end of
4622         the compressed kernel image.  Initialize `grub_memdisk_image_size'
4623         variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
4624         (options): Add "memdisk"|'m' option.
4625         (main): Parse --memdisk|-m option, and pass user-provided path as
4626         parameter to generate_image().
4628 2008-01-20  Robert Millan  <rmh@aybabtu.com>
4630         * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
4631         grub_dprintf() calls from here ...
4632         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
4634 2008-01-20  Robert Millan  <rmh@aybabtu.com>
4636         Fix detection of "real mode" when /options/real-mode? doesn't exist.
4638         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
4639         declaration.
4640         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
4641         (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
4642         `GRUB_IEEE1275_FLAG_REAL_MODE'.
4643         (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
4644         property).
4645         * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
4646         `grub_ieee1275_mmu' rather than obtaining a handler on every call.
4648 2008-01-19  Robert Millan  <rmh@aybabtu.com>
4650         Get rid of confusing function (superseded by
4651         `grub_ieee1275_get_integer_property')
4652         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
4653         prototype.
4654         * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
4655         function.
4656         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
4657         grub_ieee1275_decode_int_4(), by obtaining integer properties directly
4658         in native endianness from grub_ieee1275_get_integer_property().
4660 2008-01-19  Robert Millan  <rmh@aybabtu.com>
4662         * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
4663         command after "shut-down", since implementations differ on which
4664         the command for halt is.
4666 2008-01-19  Robert Millan  <rmh@aybabtu.com>
4668         * include/grub/i386/linuxbios/console.h: Add header protection.
4669         (grub_keyboard_controller_init): New function prototype.
4670         * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
4671         (KEYBOARD_COMMAND_READ): Likewise.
4672         (KEYBOARD_COMMAND_WRITE): Likewise.
4673         (KEYBOARD_SCANCODE_SET1): Likewise.
4674         (grub_keyboard_controller_write): New function.
4675         (grub_keyboard_controller_read): Likewise.
4676         (grub_keyboard_controller_init): Likewise.
4678         * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
4679         (grub_console_init): On coreboot/LinuxBIOS, call
4680         grub_keyboard_controller_init().
4682 2008-01-19  Robert Millan  <rmh@aybabtu.com>
4684         PowerPC changes provided by Pavel Roskin.
4686         * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
4687         * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
4688         don't rely on cmain() doing it.
4689         * kern/i386/ieee1275/startup.S (_start): Store %eax in
4690         grub_ieee1275_entry_fn, don't rely on cmain() doing it.
4692 2008-01-16  Robert Millan  <rmh@aybabtu.com>
4694         * include/grub/i386/linuxbios/memory.h
4695         (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
4696         * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
4697         receive `table_header' as argument.  Instead, probe for it in the
4698         known memory ranges where it can be present.
4699         (grub_available_iterate): Do not pass a fixed `table_header' address
4700         to grub_linuxbios_table_iterate().
4702 2008-01-15  Robert Millan  <rmh@aybabtu.com>
4704         * configure.ac: Add `i386-ieee1275' to the list of supported targets.
4705         * conf/i386-ieee1275.rmk: New file.
4706         * include/grub/i386/ieee1275/console.h: Likewise.
4707         * include/grub/i386/ieee1275/ieee1275.h: Likewise.
4708         * include/grub/i386/ieee1275/kernel.h: Likewise.
4709         * include/grub/i386/ieee1275/time.h: Likewise.
4710         * kern/i386/ieee1275/init.c: Likewise.
4711         * kern/i386/ieee1275/startup.S: Likewise.
4713 2008-01-15  Robert Millan  <rmh@aybabtu.com>
4715         * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
4716         when pointers are 32-bit (but still do set it to one when they are
4717         64-bit).
4719 2008-01-15  Robert Millan  <rmh@aybabtu.com>
4721         * include/grub/ieee1275/ieee1275.h
4722         (grub_ieee1275_get_integer_property): New function prototype.
4724         * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
4725         (grub_ieee1275_get_integer_property): New function.  Wraps around
4726         grub_ieee1275_get_property() to handle endianness.
4728         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
4729         grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
4730         where appropriate.
4731         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
4732         (grub_map): Likewise.
4733         * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
4735 2008-01-15  Bean  <bean123ch@gmail.com>
4737         * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
4738         (grub_script_execute_cmdline): Reset grub_errno.
4740         * normal/main.c (read_config_file): Reset grub_errno.
4742         * normal/parse.y (script_init): New.
4743         (script): Move function and menuentry here.
4744         (delimiter): New.
4745         (command): Add delimiter at the end of command.
4746         (commands): Adjust to match the new command.
4747         (commandblock): Remove grub_script_lexer_record_start.
4748         (menuentry): Add grub_script_lexer_record_start, use the new commands.
4749         (if): Use the new commands.
4751         * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
4753 2008-01-15  Robert Millan  <rmh@aybabtu.com>
4755         * normal/menu.c (run_menu): Move timeout message from here ...
4756         (print_timeout): ... to here.
4757         (run_menu): Use print_timeout() once during initial draw to print
4758         the whole message, and again in every clock tick to update only
4759         the number of seconds.
4761 2008-01-15  Robert Millan  <rmh@aybabtu.com>
4763         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
4764         actual size of `available' from grub_ieee1275_get_property(), and
4765         restrict parsing to that bound.
4767 2008-01-15  Christian Franke  <franke@computer.org>
4769         * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
4770         (argp_program_version): Remove variable.
4771         (argp_program_bug_address): Likewise.
4772         (options): Convert from struct argp_option to struct option.
4773         (struct arguments): Remove.
4774         (parse_opt): Remove.
4775         (usage): New function.
4776         (main): Replace struct args members by simple variables.
4777         Replace argp_parse() by getopt_long().
4778         Add switch to evaluate options.
4779         Add missing "(...)" around root_dev in prefix string.
4781 2008-01-14  Robert Millan  <rmh@aybabtu.com>
4783         * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
4784         for grub_ieee1275_exit(), in order to improve portability.
4786 2008-01-14  Robert Millan  <rmh@aybabtu.com>
4788         * util/grub.d/10_linux.in (prefix): Define.
4789         (exec_prefix): Likewise.  Both definitions are later used by `libdir'.
4791 2008-01-13  Pavel Roskin  <proski@gnu.org>
4793         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
4794         grub_errno if no errors have been detected.
4796 2008-01-12  Robert Millan  <rmh@aybabtu.com>
4798         * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
4799         (grub_util_get_dev_abstraction): New function prototype.
4801         * util/getroot.c: Include `<grub/util/getroot.h>'
4802         (grub_util_get_grub_dev): Move detection of abstraction type to ...
4803         (grub_util_get_dev_abstraction): ... here (new function).
4805         * util/grub-probe.c: Convert PRINT_* to an enum.  Add
4806         `PRINT_ABSTRACTION'.
4807         (probe): Probe for abstraction type when requested.
4808         (main): Understand `--target=abstraction'.
4810         * util/i386/efi/grub-install.in: Add abstraction module to core
4811         image when it is found to be necessary.
4812         * util/i386/pc/grub-install.in: Likewise.
4813         * util/powerpc/ieee1275/grub-install.in: Likewise.
4815         * util/update-grub_lib.in (font_path): Return system path without
4816         converting to GRUB path.
4817         * util/update-grub.in: Convert system path returned by font_path()
4818         to a GRUB path.  Use `grub-probe -t abstraction' to determine what
4819         abstraction module is needed for loading fonts (if any).  Export
4820         that as `GRUB_PRELOAD_MODULES'.
4821         * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
4822         insmod commands).
4824 2008-01-12  Yoshinori K. Okuji  <okuji@enbug.org>
4826         Remove some unused code from reiserfs.
4828         * fs/reiserfs.c (struct grub_reiserfs_key)
4829         [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
4830         (struct grub_reiserfs_node_body): Removed.
4831         (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
4832         Likewise.
4833         (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
4834         Likewise.
4835         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
4836         Likewise.
4837         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
4838         Likewise.
4839         (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
4840         Likewise.
4841         (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
4842         Likewise.
4843         (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
4844         (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
4845         (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
4847 2008-01-10  Robert Millan  <rmh@aybabtu.com>
4849         * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
4850         Determines if a file is garbage left by packaging systems, etc.
4851         * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
4852         for processing /etc/grub.d scripts.
4853         * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
4854         * util/grub.d/10_linux.in: Likewise.  Use grub_file_is_not_garbage()
4855         as a condition for processing Linux images.
4857 2008-01-10  Pavel Roskin  <proski@gnu.org>
4859         * include/grub/powerpc/libgcc.h (__ucmpdi2): New export.  Needed
4860         to compile reiserfs.c on PowerPC.
4862 2008-01-10  Robert Millan  <rmh@aybabtu.com>
4864         * kern/device.c (grub_device_iterate): Do not abort device iteration
4865         when one of the devices cannot be opened.
4866         * kern/disk.c (grub_disk_open): Do not account previous failures of
4867         unrelated functions when grub_errno is checked for.
4869 2008-01-08  Robert Millan  <rmh@aybabtu.com>
4871         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
4872         `! grub_linux_is_bzimage', change order of address comparison to make
4873         it more intuitive, and improve "too big zImage" error message.
4875 2008-01-08  Robert Millan  <rmh@aybabtu.com>
4877         * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
4878         `$(update-grub_DATA)'.
4879         (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
4880         targets.
4882 2008-01-07  Robert Millan  <rmh@aybabtu.com>
4884         * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
4885         which instruction is modified by grub-setup during installation
4886         (since it wasn't obvious by only looking at this file).
4888 2008-01-07  Robert Millan  <rmh@aybabtu.com>
4890         * TODO: Rewrite.  Just refer to the wiki and the BTS instead of
4891         listing actual TODO items.
4893 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
4895         * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
4896         correctly.
4897         (grub_reiserfs_get_key_offset): Likewise.
4898         (grub_reiserfs_set_key_offset): Likewise.
4899         (grub_reiserfs_set_key_type): Likewise.
4900         (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
4902         (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
4903         better to remove the bitfield version completely.
4905 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
4907         * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
4908         allocated from the heap, due to the fshelp implementation.
4909         (grub_reiserfs_dir): Free NODE, due to the same reason.
4911 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
4913         Mostly from Vincent Pelletier:
4915         * fs/reiserfs.c: New file.
4917         * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
4918         (reiserfs_mod_SOURCES): New variable.
4919         (reiserfs_mod_CFLAGS): Likewise.
4920         (reiserfs_mod_LDFLAGS): Likewise.
4922         * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
4923         disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
4924         include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
4925         normal/color.c.
4927 2008-01-06  Robert Millan  <rmh@aybabtu.com>
4929         * normal/color.c: Remove `<grub/env.h>'.
4931 2008-01-05  Jeroen Dekkers  <jeroen@dekkers.cx>
4933         * include/grub/normal.h: Include <grub/env.h>.
4935 2008-01-05  Robert Millan  <rmh@aybabtu.com>
4937         * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
4938         usage example with `(hd0,1)'.
4939         Reported by Samuel Thibault.
4941 2008-01-05  Robert Millan  <rmh@aybabtu.com>
4943         * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
4944         (grub_linux_boot_zimage): Rename to ...
4945         (grub_linux_boot): ... this.
4946         (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
4947         (grub_linux_boot_zimage): Conditionalize zImage copy.
4949         * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
4950         (grub_linux_boot_bzimage): Remove prototype.
4951         (grub_linux_boot_zimage): Rename to ...
4952         (grub_linux_boot): ... this.
4954         * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
4955         (grub_linux_boot): Remove function.
4957 2008-01-05  Robert Millan  <rmh@aybabtu.com>
4959         * include/grub/normal.h (grub_env_write_color_normal): New prototype.
4960         (grub_env_write_color_highlight): Likewise.
4961         (grub_wait_after_message): Likewise.
4963         * normal/color.c: New file.
4965         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
4966         (normal_mod_DEPENDENCIES): Likewise.
4968         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
4969         (normal_mod_DEPENDENCIES): Likewise.
4971         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
4972         (normal_mod_DEPENDENCIES): Likewise.
4974         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
4975         (normal_mod_DEPENDENCIES): Likewise.
4977         * normal/menu_entry.c (run): Rely on grub_wait_after_message()
4978         for waiting after a message is printed.
4979         * normal/main.c (read_config_file): Likewise.
4980         (grub_normal_init): Register grub_env_write_color_normal() and
4981         grub_env_write_color_highlight() hooks.  Mark `color_normal' and
4982         `color_highlight' variables as global.
4984         * normal/menu.c (grub_wait_after_message): New function.
4985         (grub_color_menu_normal): New variable.  Replaces ...
4986         (GRUB_COLOR_MENU_NORMAL): ... this macro.
4987         (grub_color_menu_highlight): New variable.  Replaces ...
4988         (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
4989         (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
4990         `GRUB_TERM_COLOR_STANDARD'.
4991         (print_message): Use `grub_setcolorstate' to reload colors.  Rename
4992         `normal_code' and `highlight_code' to `old_color_normal' and
4993         `old_color_highlight', respectively.
4994         (grub_menu_init_page): Update colors when drawing the menu, based on
4995         `menu_color_normal' and `menu_color_highlight' variables.
4996         (grub_menu_run): Rely on grub_wait_after_message() for waiting after
4997         a message is printed.
4999 2008-01-05  Robert Millan  <rmh@aybabtu.com>
5001         * kern/env.c (grub_env_context_open): Propagate hooks for global
5002         variables to new context.
5004         * kern/main.c (grub_set_root_dev): Export `root' variable.
5006 2008-01-05  Robert Millan  <rmh@aybabtu.com>
5008         * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
5009         discs unconditionally, since udev and others have options to provide
5010         them.
5012 2008-01-05  Robert Millan  <rmh@aybabtu.com>
5014         * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
5016 2008-01-04  Christian Franke  <franke@computer.org>
5018         * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
5019         of eisa_mmap.
5021 2008-01-03  Pavel Roskin  <proski@gnu.org>
5023         * kern/i386/linuxbios/init.c: Put "void" to all function
5024         declarations with no arguments.
5025         * kern/powerpc/ieee1275/init.c: Likewise.
5026         * term/i386/pc/at_keyboard.c: Likewise.
5027         * term/i386/pc/vga_text.c: Likewise.
5028         * util/grub-mkdevicemap.c: Likewise.
5030 2008-01-02  Robert Millan  <rmh@aybabtu.com>
5032         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
5033         message when loaded image is out of bounds.
5034         (grub_multiboot_load_elf64): Likewise.
5036 2008-01-02  Pavel Roskin  <proski@gnu.org>
5038         * util/grub.d/10_linux.in: Try version without ".old" when
5039         looking for initrd.  It's better to use initrd from the newer
5040         kernel of the same version than no initrd at all.
5042 2008-01-01  Robert Millan  <rmh@aybabtu.com>
5044         * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
5046 2008-01-01  Vesa Jaaskelainen  <chaac@nic.fi>
5048         * include/grub/video.h: Added grub_video_unmap_color and
5049         grub_video_get_active_render_target.
5050         (grub_video_adapter): Added unmap_color and get_active_render_target.
5052         * video/video.c: Added grub_video_unmap_color and
5053         grub_video_get_active_render_target.
5054         (grub_video_get_info): Changed method to accept NULL pointer as an
5055         argument to allow detection of active video adapter.
5057         * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
5058         grub_video_vbe_unmap_color_int.
5059         Added grub_video_vbe_unmap_color and
5060         grub_video_vbe_get_active_render_target.
5061         (grub_video_vbe_adapter): Added unmap_color and
5062         get_active_render_target.
5064         * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
5065         with grub_video_vbe_unmap_color_int.
5067         * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
5068         (DEFAULT_NORMAL_COLOR): Likewise.
5069         (DEFAULT_HIGHLIGHT_COLOR) Likewise.
5070         (DEFAULT_FG_COLOR): Removed.
5071         (DEFAULT_BG_COLOR): Likewise.
5072         (DEFAULT_CURSOR_COLOR): Changed value.
5073         (grub_virtual_screen): Added standard_color_setting,
5074         normal_color_setting, highlight_color_setting and term_color.
5075         (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
5076         (bitmap_width): Added.
5077         (bitmap_height): Likewise.
5078         (bitmap): Likewise.
5079         (set_term_color): Likewise.
5080         (grub_virtual_screen_setup): Changed to use new terminal coloring
5081         settings.
5082         (grub_gfxterm_init): Added init for bitmap.
5083         (grub_gfxterm_fini): Added destroy for bitmap.
5084         (redraw_screen_rect): Updated to use background bitmap and new
5085         terminal coloring.
5086         (scroll_up): Added optimization for case when there is no bitmap.
5087         (grub_gfxterm_cls): Fixed to use correct background color.
5088         (grub_virtual_screen_setcolorstate): Changed to use new terminal
5089         coloring.
5090         (grub_virtual_screen_setcolor): Likewise.
5091         (grub_virtual_screen_getcolor): Added.
5092         (grub_gfxterm_background_image_cmd): Likewise.
5093         (grub_video_term): Added setcolor and getcolor.
5094         (MOD_INIT): Added registration of background_image command.
5095         (MOD_TERM): Added unregistration for background_image command.
5097 2007-12-30  Pavel Roskin  <proski@gnu.org>
5099         * loader/multiboot_loader.c: Fix multiboot command
5100         unregistration.  Fix all typos in the word "multiboot".
5102 2007-12-29  Pavel Roskin  <proski@gnu.org>
5104         * util/grub.d/10_linux.in: Refactor search for initrd.  Add
5105         support for initrd names used in Fedora.
5107 2007-12-26  Bean  <bean123ch@gmail.com>
5109         * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
5110         (cpio_mod_SOURCES): New variable.
5111         (cpio_mod_CFLAGS): Likewise.
5112         (cpio_mod_LDFLAGS): Likewise.
5114         * fs/cpio.c: New file.
5116         * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
5118         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5120         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5122         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5124 2007-12-25  Robert Millan  <rmh@aybabtu.com>
5126         * include/grub/term.h (struct grub_term): Add `getcolor' function.
5127         (grub_getcolor): New function.
5129         * kern/term.c (grub_getcolor): New function.
5130         * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
5131         (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
5132         (print_entry): Set normal and highlight colors to
5133         `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
5134         respectively, before printing and restore them to old
5135         values afterwards.
5136         (grub_menu_init_page): Likewise.  Fill an additional colored space
5137         that would otherwise be left blank.
5139         * term/efi/console.c (grub_console_getcolor): New function.
5140         (struct grub_console_term.getcolor): New variable.
5141         * term/i386/pc/console.c (grub_console_getcolor): New function.
5142         (struct grub_console_term.getcolor): New variable.
5143         * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
5144         (struct grub_console_term.getcolor): New variable.
5146         * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
5147         (struct grub_console_term.setcolor): Remove variable.
5148         * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
5149         (struct grub_console_term.setcolor): Remove variable.
5150         * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
5151         (struct grub_console_term.setcolor): Remove variable.
5152         * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
5153         (struct grub_console_term.setcolor): Remove variable.
5155 2007-12-25  Robert Millan  <rmh@aybabtu.com>
5157         * configure.ac: Search for possible unifont.hex locations, and
5158         define UNIFONT_HEX if found.
5160         * Makefile.in (UNIFONT_HEX): Define variable.
5161         (DATA): Rename to ...
5162         (PKGLIB): ... this.  Update all users.
5163         (PKGDATA): New variable.
5164         (pkgdata_IMAGES): Rename to ...
5165         (pkglib_IMAGES): ... this. Update all users.
5166         (pkgdata_MODULES): Rename to ...
5167         (pkglib_MODULES): ... this. Update all users.
5168         (pkgdata_PROGRAMS): Rename to ...
5169         (pkglib_PROGRAMS): ... this. Update all users.
5170         (pkgdata_DATA): Rename to ...
5171         (pkglib_DATA): ... this. Update all users.
5172         (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
5173         (unicode.pff, ascii.pff): New rules.
5174         (all-local): Add `$(PKGDATA)' dependency.
5175         (install-local): Process `$(PKGDATA)'.
5177         * util/update-grub_lib.in (font_path): Search for *.pff files in
5178         a few more locations, including `${pkgdata}'.
5180 2007-12-23  Robert Millan  <rmh@aybabtu.com>
5182         Patch from Bean  <bean123ch@gmail.com>:
5183         * disk/loopback.c (grub_loopback_read): Add missing bit shift to
5184         `size'.
5186 2007-12-21  Bean  <bean123ch@gmail.com>
5188         * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
5189         (ntfscomp_mod_SOURCES): New variable.
5190         (ntfscomp_mod_CFLAGS): Likewise.
5191         (ntfscomp_mod_LDFLAGS): Likewise.
5193         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
5194         (grub_probe_SOURCES): Likewise.
5195         (grub_emu_SOURCES): Likewise.
5197         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
5198         (grub_emu_SOURCES): Likewise.
5200         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
5201         (grub_emu_SOURCES): Likewise.
5203         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
5204         (grub_emu_SOURCES): Likewise.
5206         * fs/ntfs.c (grub_ntfscomp_func): New variable.
5207         (read_run_list): Renamed to grub_ntfs_read_run_list.
5208         (decomp_nextvcn): Moved to ntfscomp.c.
5209         (decomp_getch): Likewise.
5210         (decomp_get16): Likewise.
5211         (decomp_block): Likewise.
5212         (read_block): Likewise.
5213         (read_data): Partially moved to ntfscomp.c.
5214         (fixup): Change unsigned to grub_uint16_t.
5215         (read_mft): Change unsigned long to grub_uint32_t.
5216         (read_attr): Likewise.
5217         (read_data): Likewise.
5218         (read_run_data): Likewise.
5219         (read_run_list): Likewise.
5220         (read_mft): Likewise.
5222         * fs/ntfscomp.c: New file.
5224         * include/grub/ntfs.h: New file.
5226 2007-12-16  Robert Millan  <rmh@aybabtu.com>
5228         * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
5229         IDE disk check, since Linux is known to support 20 IDE disks.
5230         Reported by Colin Watson.
5232 2007-12-15  Bean  <bean123ch@gmail.com>
5234         * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
5235         (lnxboot_img_SOURCES): New variable.
5236         (lnxboot_img_ASFLAGS): Likewise.
5237         (lnxboot_img_LDFLAGS): Likewise.
5239         * boot/i386/pc/lnxboot.S: New file.
5241 2007-11-24  Pavel Roskin  <proski@gnu.org>
5243         * configure.ac: Test if '--build-id=none' is supported by the
5244         linker.  If yes, add it to TARGET_LDFLAGS.  Build ID causes
5245         objcopy to generate incorrect binary files (binutils
5246         2.17.50.0.18-1 as shipped by Fedora 8).
5247         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
5248         linking, so that build ID doesn't break the test.
5250 2007-11-24  Pavel Roskin  <proski@gnu.org>
5252         * include/grub/i386/time.h: use "void" in the argument list
5253         of grub_cpu_idle().
5254         * include/grub/powerpc/time.h: Likewise.
5255         * include/grub/sparc64/time.h: Likewise.
5257 2007-11-18  Christian Franke  <franke@computer.org>
5259         * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
5260         now return control chars instead of GRUB_CONSOLE_KEY_* constants.
5261         This fixes the problem that function keys did not work in grub-emu.
5263 2007-11-18  Christian Franke  <franke@computer.org>
5265         * disk/host.c (grub_host_open): Remove attribute unused from
5266         name parameter. Add check for "host". This fixes the problem
5267         that grub-emu does not find partitions.
5269 2007-11-18  Christian Franke  <franke@computer.org>
5271         * util/hostfs.c (is_dir): New function.
5272         (grub_hostfs_dir):  Handle missing dirent.d_type case.
5273         (grub_hostfs_read): Add missing fseek().
5274         (grub_hostfs_label): Clear label pointer.  This fixes a crash
5275         of grub-emu on "ls (host)".
5277 2007-11-18  Christian Franke  <franke@computer.org>
5279         * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
5280         Add attribute packed, gcc 3.4.4 on Cygwin aligns this
5281         to 64 bit boundary by default.
5283 2007-11-18  Bean  <bean123ch@gmail.com>
5285         * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
5286         (hexdump_mod_SOURCES): New variable.
5287         (hexdump_mod_CFLAGS): Likewise.
5288         (hexdump_mod_LDFLAGS): Likewise.
5290         * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5292         * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5294         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5296         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5298         * include/grub/hexdump.h: New file.
5300         * commands/hexdump.c: New file.
5302 2007-11-10  Robert Millan  <rmh@aybabtu.com>
5304         * commands/i386/pc/play.c (beep_off): Switch order of arguments
5305         in grub_outb() calls.
5306         (beep_on): Likewise.
5308 2007-11-10  Christian Franke  <franke@computer.org>
5310         * normal/menu.c (run_menu): Check for empty menu to avoid crash.
5311         (grub_menu_run): Likewise.
5313 2007-11-10  Robert Millan  <rmh@aybabtu.com>
5315         * include/grub/i386/efi/machine.h: New file.
5316         * include/grub/i386/linuxbios/machine.h: Likewise.
5317         * include/grub/i386/pc/machine.h: Likewise.
5318         * include/grub/powerpc/ieee1275/machine.h: Likewise.
5319         * include/grub/sparc64/ieee1275/machine.h: Likewise.
5321         * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
5322         (serial_hw_io_addr): New variable.
5323         (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
5324         instead of `(unsigned short *) 0x400'.
5326 2007-11-10  Bean  <bean123ch@gmail.com>
5328         * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
5330 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
5332         * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
5333         (vga_mod_SOURCES): Added.
5334         (vga_mod_CFLAGS): Likewise.
5335         (vga_mod_LDFLAGS): Likewise.
5337         * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
5338         grub_outb() calls.
5339         (set_map_mask): Likewise.
5340         (set_read_map): Likewise.
5341         (set_read_address): Likewise.
5342         (vga_font): Removed variable.
5343         (get_vga_glyph): Removed function.
5344         (invalidate_char): Likewise.
5345         (write_char): Changed to use grub_font_get_glyph() for font
5346         information.
5347         (grub_vga_putchar): Likewise.
5348         (grub_vga_getcharwidth): Likewise.
5350 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
5352         * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
5353         flags.
5354         (pxeboot_img_LDFLAGS): Likewise.
5355         (diskboot_img_LDFLAGS): Likewise.
5356         (kernel_img_LDFLAGS): Likewise.
5358 2007-11-06  Robert Millan  <rmh@aybabtu.com>
5360         * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
5361         in grub_outb() calls.
5362         (serial_hw_init): Likewise.
5364 2007-11-05  Robert Millan  <rmh@aybabtu.com>
5366         * util/update-grub.in: Allow files in ${update_grub_dir} to contain
5367         spaces.  Skip non-regular files.
5369 2007-11-05  Robert Millan  <rmh@aybabtu.com>
5371         * kern/disk.c (grub_disk_firmware_fini)
5372         (grub_disk_firmware_is_tainted): New variables.
5374         * include/grub/disk.h (grub_disk_firmware_fini)
5375         (grub_disk_firmware_is_tainted): Likewise.
5377         * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
5378         (grub_disk_biosdisk_fini): ... to here.
5379         (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
5380         (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
5381         is set.  Register grub_disk_biosdisk_fini() in
5382         `grub_disk_firmware_fini'.
5384         * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
5385         (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
5386         Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
5387         to finish existing firmware disk interface.
5389         * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
5390         (ata_mod_SOURCES): New variable.
5391         (ata_mod_CFLAGS): Likewise.
5392         (ata_mod_LDFLAGS): Likewise.
5394 2007-11-05  Robert Millan  <rmh@aybabtu.com>
5396         * disk/ata.c: Remove `<grub/machine/time.h>'.  Include `<grub/time.h>'.
5397         (grub_ata_wait): Reimplement using grub_millisleep().
5399         * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
5400         * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
5402 2007-11-03  Marco Gerards  <marco@gnu.org>
5404         * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
5405         (CRTC_ADDR_PORT): New macro.
5406         (CRTC_DATA_PORT): Likewise.
5407         (CRTC_CURSOR): Likewise.
5408         (CRTC_CURSOR_ADDR_HIGH): Likewise.
5409         (CRTC_CURSOR_ADDR_LOW): Likewise.
5410         (update_cursor): New function.
5411         (grub_console_real_putchar): Call `update_cursor'.
5412         (grub_console_gotoxy): Likewise.
5413         (grub_console_cls): Set the default color when clearing the
5414         screen.
5415         (grub_console_setcursor): Implemented.
5417 2007-11-03  Marco Gerards  <marco@gnu.org>
5419         * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
5420         become activate.
5421         (grub_ata_pio_write): Likewise.
5423         (grub_atapi_identify): Wait after issuing an ATA command.
5424         (grub_atapi_packet): Likewise.
5425         (grub_ata_identify): Likewise.
5426         (grub_ata_readwrite): Likewise.
5428 2007-11-03  Marco Gerards  <marco@gnu.org>
5430         * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
5431         (grub_ata_pio_write): Likewise.
5432         (grub_ata_readwrite): Use `grub_error', instead of
5433         returning `grub_errno'.
5435 2007-11-03  Marco Gerards  <marco@gnu.org>
5437         * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
5438         grub_ata_pio_write once for every single sector, instead of for
5439         multiple sectors.
5441 2007-10-31  Robert Millan  <rmh@aybabtu.com>
5443         * configure.ac: Add `i386-linuxbios' to the list of supported targets.
5445         * conf/i386-linuxbios.rmk: New file.
5447         * kern/i386/pc/hardware.c: Likewise.
5448         * term/i386/pc/at_keyboard.c: Likewise.
5449         * term/i386/pc/vga_text.c: Likewise.
5451         * include/grub/i386/linuxbios/boot.h: Likewise.
5452         * include/grub/i386/linuxbios/console.h: Likewise.
5453         * include/grub/i386/linuxbios/init.h: Likewise.
5454         * include/grub/i386/linuxbios/kernel.h: Likewise.
5455         * include/grub/i386/linuxbios/loader.h: Likewise.
5456         * include/grub/i386/linuxbios/memory.h: Likewise.
5457         * include/grub/i386/linuxbios/serial.h: Likewise.
5458         * include/grub/i386/linuxbios/time.h: Likewise.
5460         * kern/i386/linuxbios/init.c: Likewise.
5461         * kern/i386/linuxbios/startup.S: Likewise.
5462         * kern/i386/linuxbios/table.c: Likewise.
5464 2007-10-31  Marco Gerards  <marco@gnu.org>
5466         * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
5467         (ata_mod_SOURCES): New variable.
5468         (ata_mod_CFLAGS): Likewise.
5469         (ata_mod_LDFLAGS): Likewise.
5471         * disk/ata.c: New file.
5473         * include/grub/disk.h (grub_disk_dev_id): Add
5474         `GRUB_DISK_DEV_ATA_ID'.
5476 2007-10-31  Robert Millan  <rmh@aybabtu.com>
5478         * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
5479         * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
5481         * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
5482         * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
5484         * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
5485         `<grub/types.h>'.
5487         * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
5489 2007-10-27  Robert Millan  <rmh@aybabtu.com>
5491         * include/grub/types.h (ULONG_MAX): Define macro.
5493 2007-10-22  Robert Millan  <rmh@aybabtu.com>
5495         * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'.  Include
5496         `"../realmode.S"'.
5497         Remove `"kern/i386/loader.S"'.  Include `"../loader.S"'.
5499 2007-10-22  Robert Millan  <rmh@aybabtu.com>
5501         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
5502         (pkgdata_MODULES): Add `biosdisk.mod'.
5503         (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
5504         variables.
5506         * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
5507         (grub_biosdisk_init): Replace with ...
5508         (GRUB_MOD_INIT(biosdisk)): ... this.
5509         (grub_biosdisk_fini): Replace with ...
5510         (GRUB_MOD_FINI(biosdisk)): ... this.
5512         * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
5513         (grub_machine_init): Remove call to grub_biosdisk_init().
5514         (grub_machine_fini): Remove call to grub_machine_fini().
5516         * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
5518 2007-10-22  Robert Millan  <rmh@aybabtu.com>
5520         * include/grub/time.h: New file.
5521         * include/grub/i386/time.h: Likewise.
5522         * include/grub/powerpc/time.h: Likewise.
5523         * include/grub/sparc64/time.h: Likewise.
5525         * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
5526         instances to ...
5527         (KERNEL_MACHINE_TIME_HEADER): ... this.
5528         * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
5529         instances to ...
5530         (KERNEL_MACHINE_TIME_HEADER): ... this.
5531         * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
5532         instances to ...
5533         (KERNEL_MACHINE_TIME_HEADER): ... this.
5535         * kern/i386/efi/init.c: Include `<grub/time.h>'.
5536         (grub_millisleep): New function.
5537         * kern/i386/pc/init.c: Include `<grub/time.h>'.
5538         (grub_millisleep): New function.
5539         * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
5540         Remove `grub/machine/time.h' include.
5541         (grub_millisleep): New function.
5542         * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
5543         Remove `grub/machine/time.h' include.
5544         (grub_millisleep): New function.
5546         * include/grub/misc.h (grub_div_roundup): New function.
5548         * kern/misc.c: Include `<grub/time.h>'.
5549         (grub_millisleep_generic): New function.
5551         * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
5552         Add `time.h'.
5553         * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
5554         Add `time.h'.
5555         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
5556         `machine/time.h'.  Add `time.h'.
5557         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
5559 2007-10-21  Robert Millan  <rmh@aybabtu.com>
5561         * include/grub/misc.h (grub_max): New function.
5563 2007-10-21  Robert Millan  <rmh@aybabtu.com>
5565         * util/misc.c (grub_util_info): Call fflush() before returning.
5567 2007-10-20  Robert Millan  <rmh@aybabtu.com>
5569         * genmk.rb (Image): Copy `extra_flags' from here ...
5570         (PModule): ... to here.  Use it in `#{obj}: #{src}' rule.
5572         * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
5573         to `argc' and `args' arguments.
5575 2007-10-17  Robert Millan  <rmh@aybabtu.com>
5577         * kern/i386/loader.S: New file.
5579         * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
5580         * kern/i386/loader.S (grub_linux_prot_size)... to here.
5581         * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
5582         * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
5583         * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
5584         * kern/i386/loader.S (grub_linux_real_addr)... to here.
5585         * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
5586         * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
5587         * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
5588         * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
5589         * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
5590         * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
5591         * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
5592         * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
5594         * kern/i386/realmode.S: New file.
5596         * kern/i386/pc/startup.S (protstack): Moved from here ...
5597         * kern/i386/realmode.S (protstack)... to here.
5598         * kern/i386/pc/startup.S (gdt): Moved from here ...
5599         * kern/i386/realmode.S (gdt)... to here.
5600         * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
5601         * kern/i386/realmode.S (prot_to_real)... to here.
5603         * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
5604         `kern/i386/realmode.S'.
5606 2007-10-17  Robert Millan  <rmh@aybabtu.com>
5608         * include/grub/i386/loader.h: New file.
5610         * include/grub/i386/pc/loader.h (grub_linux_prot_size)
5611         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
5612         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
5613         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
5614         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
5615         * include/grub/i386/loader.h (grub_linux_prot_size)
5616         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
5617         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
5618         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
5619         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
5621         * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
5623 2007-10-15  Robert Millan  <rmh@aybabtu.com>
5625         * normal/misc.c (grub_normal_print_device_info): Do not probe for
5626         filesystem when dev->disk is unset.
5627         Do probe for filesystem even when dev->disk->has_partitions is set.
5628         In case a filesystem is found, always report it.
5629         In case it isn't, if dev->disk->has_partitions is set, report that
5630         a partition table was found instead of reporting that no filesystem
5631         could be identified.
5633 2007-10-12  Robert Millan  <rmh@aybabtu.com>
5635         * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
5636         to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
5638         * include/grub/types.h (grub_host_to_target16): New macro.
5639         (grub_host_to_target32): Likewise.
5640         (grub_host_to_target64): Likewise.
5641         (grub_target_to_host16): Likewise.
5642         (grub_target_to_host32): Likewise.
5643         (grub_target_to_host64): Likewise.
5645         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
5646         Renamed from to ...
5647         (GRUB_MOD_ALIGN): ...this.  Update all users.
5649         * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
5650         grub_host_to_target32.
5651         Replace grub_be_to_cpu32 with grub_target_to_host32.
5652         (load_modules): Likewise.
5653         (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
5654         Replace grub_be_to_cpu32 with grub_target_to_host32.
5655         Replace grub_cpu_to_be16 with grub_host_to_target16.
5656         Replace grub_cpu_to_be32 grub_host_to_target32.
5658 2007-10-12  Robert Millan  <rmh@aybabtu.com>
5660         * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
5661         * util/elf/grub-mkimage.c: ... here.
5663         * DISTLIST: Add `util/elf/grub-mkimage.c'.  Remove
5664         `util/powerpc/ieee1275/grub-mkimage.c'.
5666 2007-10-07  Robert Millan  <rmh@aybabtu.com>
5668         * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
5669         and make it easier to figure out.
5670         Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
5671         (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
5672         Do not avoid claiming a region above HEAP_MAX_ADDR if that would
5673         leave us with less than HEAP_MIN_SIZE total heap.
5674         Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
5676 2007-10-03  Robert Millan  <rmh@aybabtu.com>
5678         * include/grub/i386/io.h: New file.
5679         * commands/i386/pc/play.c (inb): Removed.
5680         (outb): Removed.
5681         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
5682         with grub_outb().
5683         * term/i386/pc/serial.c  (inb): Removed.
5684         (outb): Removed.
5685         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
5686         with grub_outb().
5687         * term/i386/pc/vga.c  (inb): Removed.
5688         (outb): Removed.
5689         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
5690         with grub_outb().
5692 2007-10-02  Robert Millan  <rmh@aybabtu.com>
5694         * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
5695         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5696         Reported by Marcin Kurek.
5698 2007-09-07  Robert Millan  <rmh@aybabtu.com>
5700         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
5701         SmartFirmware version updates (as released by Sven Luther), and avoid
5702         setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
5703         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
5704         known broken.
5706 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
5708         From Hitoshi Ozeki:
5709         * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
5710         when merging two regions.
5712 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
5714         * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
5715         * normal/completion.c (grub_normal_do_completion): Likewise.
5716         Reported by Hitoshi Ozeki.
5718 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
5720         Do not use devices at boot in chainloading.
5722         * loader/i386/pc/chainloader.c (boot_drive): New variable.
5723         (boot_part_addr): Likewise.
5724         (grub_chainloader_boot): Simply call grub_chainloader_real_boot
5725         with BOOT_DRIVE and BOOT_PART_ADDR.
5726         (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
5727         Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
5729 2007-08-29  Robert Millan  <rmh@aybabtu.com>
5731         Patch from Simon Peter <dn.tlp@gmx.net>:
5732         * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
5733         * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
5734         util/grub-probe.c_DEPENDENCIES.  Replace grub-setup_DEPENDENCIES with
5735         util/i386/pc/grub-setup.c_DEPENDENCIES.
5736         * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
5737         util/grub-probe.c_DEPENDENCIES.
5738         * conf/powerpc-ieee1275.rmk: Likewise.
5740 2007-08-28  Robert Millan  <rmh@aybabtu.com>
5742         * util/i386/get_disk_name.c: New.  Implement grub_util_get_disk_name()
5743         to tell grub-mkdevicemap how to name devices.
5744         * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
5745         feature).
5747         * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
5748         util/i386/get_disk_name.c.
5749         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
5750         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
5751         util/ieee1275/get_disk_name.c.
5753         * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
5755         * DISTLIST: Add util/i386/get_disk_name.c and
5756         util/ieee1275/get_disk_name.c.
5758         * util/grub-mkdevicemap.c: Replace device naming logic with
5759         grub_util_get_disk_name() calls.
5761 2007-08-20  Robert Millan  <rmh@aybabtu.com>
5763         * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
5764         (so that it works for both plural and singular quantities).
5766 2007-08-05  Robert Millan  <rmh@aybabtu.com>
5768         * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
5769         so that [xz] isn't taken into account when determining order.
5771 2007-08-02  Marco Gerards  <marco@gnu.org>
5773         * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
5774         `include/multiboot2.h', `include/grub/elfload.h',
5775         `include/multiboot.h', `include/grub/multiboot.h',
5776         `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
5777         `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
5778         `kern/elf.c', `loader/multiboot_loader.c',
5779         `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
5780         `loader/i386/pc/multiboot2.c',
5781         `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
5782         `util/i386/pc/grub-mkrescue.in'.  Remove
5783         `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
5784         `include/grub/i386/pc/util/biosdisk.h' and
5785         `include/grub/powerpc/ieee1275/multiboot.h'.
5787 2007-08-02  Bean  <bean123ch@gmail.com>
5789         * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
5790         (ntfs_mod_SOURCES): New variable.
5791         (ntfs_mod_CFLAGS): Likewise.
5792         (ntfs_mod_LDFLAGS): Likewise.
5794         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
5795         (grub_probe_SOURCES): Likewise.
5796         (grub_emu_SOURCES): Likewise.
5798         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
5799         (grub_emu_SOURCES): Likewise.
5801         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
5802         (grub_emu_SOURCES): Likewise.
5804         * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
5806         * fs/ntfs.c: New file.
5808 2007-08-02  Bean  <bean123ch@gmail.com>
5810         * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
5812         * file.h (grub_file): Likewise.
5814         * fshelp.h (grub_fshelp_read_file): Likewise.
5816         * util/i386/pc/grub-setup.c (setup): Likewise.
5817         (save_first_sector): Likewise.
5818         (save_blocklists): Likewise.
5820         * fs/affs.c (grub_affs_read_file): Likewise.
5822         * fs/ext2.c (grub_ext2_read_file): Likewise.
5824         * fs/fat.c (grub_fat_read_data): Likewise.
5826         * fs/fshelp.c (grub_fshelp_read_file): Likewise.
5828         * fs/hfs.c (grub_hfs_read_file): Likewise.
5830         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
5832         * fs/jfs.c (grub_jfs_read_file): Likewise.
5834         * fs/minix.c (grub_minix_read_file): Likewise.
5836         * fs/sfs.c (grub_sfs_read_file): Likewise.
5838         * fs/ufs.c (grub_ufs_read_file): Likewise.
5840         * fs/xfs.c (grub_xfs_read_file): Likewise.
5842         * command/blocklist.c (read_blocklist): Likewise.
5843         (print_blocklist): Likewise.
5845 2007-08-02  Marco Gerards  <marco@gnu.org>
5847         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
5848         `util/hostfs.c'.
5850         * disk/host.c: New file.
5852         * util/hostfs.c: Likewise.
5854         * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
5855         return `GRUB_ERR_BAD_FS'.
5856         * fs/sfs.c (grub_sfs_mount): Likewise.
5857         * fs/xfs.c (grub_xfs_mount): Likewise.
5859         * include/grub/disk.h (enum grub_disk_dev_id): Add
5860         `GRUB_DISK_DEVICE_HOST_ID'.
5862         * util/grub-emu.c (main): Initialize and de-initialize hostfs.
5864 2007-07-24  Jerone Young  <jerone@gmail.com>
5866         * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
5867         modules for compilation.
5868         * conf/powerpc-ieee1275.rmk: Likewise.
5870         * include/multiboot.h: Move multiboot definitions to one file. Rename
5871         many definitions to not get grub specific.
5872         * include/multiboot2.h: Create header with multiboot 2 definitions.
5873         * include/grub/multiboot.h: Header for grub specific function
5874         prototypes and definitions.
5875         * include/grub/multiboot2.h: Likewise.
5876         * include/grub/multiboot_loader.h: Likewise.
5877         * include/grub/i386/pc/multiboot.h: Removed.
5878         * include/grub/powerpc/ieee1275/multiboot.h: Removed.
5880         * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
5881         and 2 to allow for one multiboot and module commands.
5882         * loader/multiboot2.c: Add multiboot2 functionality.
5883         * loader/i386/pc/multiboot.c: Modify for new multiboot header location
5884         and definition names.
5885         * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
5886         2 functions.
5887         * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
5888         ieee1275 specific multiboot2 code.
5890         * kern/i386/pc/startup.S: Change headers and definition names for
5891         multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
5893 2007-07-22  Robert Millan  <rmh@aybabtu.com>
5895         * geninitheader.sh: Process file specified in first parameter rather
5896         than hardcoding grub_modules_init.lst.
5897         * geninit.sh: Likewise.  Also, construct header name dynamically rather
5898         than hardcoding grub_modules_init.h.
5900         * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
5901         grub-emu to grub_emu_init.[ch].  Add rules to build analogous
5902         grub_probe_init.[ch] and grub_setup_init.[ch].
5904         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
5905         grub_modules_init.h with grub_emu_init.h.
5906         (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
5907         grub_probe_init.[ch] files.
5908         * conf/i386-efi.rmk: Likewise.
5909         * conf/i386-pc.rmk: Likewise.
5910         (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
5911         grub_setup_init.[ch] files.
5913         * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
5914         * util/grub-probe.c: Include grub_probe_init.h.  Use grub_init_all()
5915         to initialize modules rather than a list of hardcoded functions.
5916         * util/i386/pc/grub-setup.c: Include grub_setup_init.h.  Use
5917         grub_init_all() to initialize modules rather than a list of hardcoded
5918         functions.
5920 2007-07-22  Robert Millan  <rmh@aybabtu.com>
5922         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
5923         GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
5925 2007-07-22  Robert Millan  <rmh@aybabtu.com>
5927         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
5928         GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
5929         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
5930         flag when running on SmartFirmware.
5931         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
5932         "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
5933         was set.
5935         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
5936         Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
5937         rather than decreasing it.
5939         * util/i386/pc/grub-setup.c (setup): When embedding is required, but
5940         there's not enough space to do it, fail in the same way as when it
5941         can't be done because there are no partitions.
5943         * util/powerpc/ieee1275/grub-install.in: Improve error message shown
5944         when nvsetenv failed.
5946 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
5948         * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
5949         because this rule is automatically generated.
5950         (grub-mkrescue): Removed for the same reason as above.
5952 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
5954         Migrate to GNU General Public License Version 3.
5956         * COPYING: Replaced with the plain text version of GPLv3.
5958         * config.guess: Updated from gnulib.
5959         * config.sub: Likewise.
5961         * geninit.sh: Output a GPLv3 copyright notice.
5962         * geninitheader.sh: Likewise.
5963         * genmodsrc.sh: Likewise.
5964         * gensymlist.sh.in: Likewise.
5966         * boot/i386/pc/boot.S: Upgraded to GPLv3.
5967         * boot/i386/pc/diskboot.S: Likewise.
5968         * boot/i386/pc/pxeboot.S: Likewise.
5969         * commands/blocklist.c: Likewise.
5970         * commands/boot.c: Likewise.
5971         * commands/cat.c: Likewise.
5972         * commands/cmp.c: Likewise.
5973         * commands/configfile.c: Likewise.
5974         * commands/echo.c: Likewise.
5975         * commands/help.c: Likewise.
5976         * commands/ls.c: Likewise.
5977         * commands/search.c: Likewise.
5978         * commands/terminal.c: Likewise.
5979         * commands/test.c: Likewise.
5980         * commands/videotest.c: Likewise.
5981         * commands/i386/cpuid.c: Likewise.
5982         * commands/i386/pc/halt.c: Likewise.
5983         * commands/i386/pc/play.c: Likewise.
5984         * commands/i386/pc/reboot.c: Likewise.
5985         * commands/i386/pc/vbeinfo.c: Likewise.
5986         * commands/i386/pc/vbetest.c: Likewise.
5987         * commands/ieee1275/halt.c: Likewise.
5988         * commands/ieee1275/reboot.c: Likewise.
5989         * commands/ieee1275/suspend.c: Likewise.
5990         * disk/loopback.c: Likewise.
5991         * disk/lvm.c: Likewise.
5992         * disk/raid.c: Likewise.
5993         * disk/efi/efidisk.c: Likewise.
5994         * disk/i386/pc/biosdisk.c: Likewise.
5995         * disk/ieee1275/ofdisk.c: Likewise.
5996         * font/manager.c: Likewise.
5997         * fs/affs.c: Likewise.
5998         * fs/ext2.c: Likewise.
5999         * fs/fat.c: Likewise.
6000         * fs/fshelp.c: Likewise.
6001         * fs/hfs.c: Likewise.
6002         * fs/hfsplus.c: Likewise.
6003         * fs/iso9660.c: Likewise.
6004         * fs/jfs.c: Likewise.
6005         * fs/minix.c: Likewise.
6006         * fs/sfs.c: Likewise.
6007         * fs/ufs.c: Likewise.
6008         * fs/xfs.c: Likewise.
6009         * hello/hello.c: Likewise.
6010         * include/grub/acorn_filecore.h: Likewise.
6011         * include/grub/arg.h: Likewise.
6012         * include/grub/bitmap.h: Likewise.
6013         * include/grub/boot.h: Likewise.
6014         * include/grub/cache.h: Likewise.
6015         * include/grub/device.h: Likewise.
6016         * include/grub/disk.h: Likewise.
6017         * include/grub/dl.h: Likewise.
6018         * include/grub/elfload.h: Likewise.
6019         * include/grub/env.h: Likewise.
6020         * include/grub/err.h: Likewise.
6021         * include/grub/file.h: Likewise.
6022         * include/grub/font.h: Likewise.
6023         * include/grub/fs.h: Likewise.
6024         * include/grub/fshelp.h: Likewise.
6025         * include/grub/gzio.h: Likewise.
6026         * include/grub/hfs.h: Likewise.
6027         * include/grub/kernel.h: Likewise.
6028         * include/grub/loader.h: Likewise.
6029         * include/grub/lvm.h: Likewise.
6030         * include/grub/misc.h: Likewise.
6031         * include/grub/mm.h: Likewise.
6032         * include/grub/net.h: Likewise.
6033         * include/grub/normal.h: Likewise.
6034         * include/grub/parser.h: Likewise.
6035         * include/grub/partition.h: Likewise.
6036         * include/grub/pc_partition.h: Likewise.
6037         * include/grub/raid.h: Likewise.
6038         * include/grub/rescue.h: Likewise.
6039         * include/grub/script.h: Likewise.
6040         * include/grub/setjmp.h: Likewise.
6041         * include/grub/symbol.h: Likewise.
6042         * include/grub/term.h: Likewise.
6043         * include/grub/terminfo.h: Likewise.
6044         * include/grub/tparm.h: Likewise.
6045         * include/grub/types.h: Likewise.
6046         * include/grub/video.h: Likewise.
6047         * include/grub/efi/api.h: Likewise.
6048         * include/grub/efi/chainloader.h: Likewise.
6049         * include/grub/efi/console.h: Likewise.
6050         * include/grub/efi/console_control.h: Likewise.
6051         * include/grub/efi/disk.h: Likewise.
6052         * include/grub/efi/efi.h: Likewise.
6053         * include/grub/efi/pe32.h: Likewise.
6054         * include/grub/efi/time.h: Likewise.
6055         * include/grub/i386/linux.h: Likewise.
6056         * include/grub/i386/setjmp.h: Likewise.
6057         * include/grub/i386/types.h: Likewise.
6058         * include/grub/i386/efi/kernel.h: Likewise.
6059         * include/grub/i386/efi/loader.h: Likewise.
6060         * include/grub/i386/efi/time.h: Likewise.
6061         * include/grub/i386/pc/biosdisk.h: Likewise.
6062         * include/grub/i386/pc/boot.h: Likewise.
6063         * include/grub/i386/pc/chainloader.h: Likewise.
6064         * include/grub/i386/pc/console.h: Likewise.
6065         * include/grub/i386/pc/init.h: Likewise.
6066         * include/grub/i386/pc/kernel.h: Likewise.
6067         * include/grub/i386/pc/loader.h: Likewise.
6068         * include/grub/i386/pc/memory.h: Likewise.
6069         * include/grub/i386/pc/multiboot.h: Likewise.
6070         * include/grub/i386/pc/serial.h: Likewise.
6071         * include/grub/i386/pc/time.h: Likewise.
6072         * include/grub/i386/pc/vbe.h: Likewise.
6073         * include/grub/i386/pc/vbeblit.h: Likewise.
6074         * include/grub/i386/pc/vbefill.h: Likewise.
6075         * include/grub/i386/pc/vbeutil.h: Likewise.
6076         * include/grub/i386/pc/vga.h: Likewise.
6077         * include/grub/ieee1275/ieee1275.h: Likewise.
6078         * include/grub/ieee1275/ofdisk.h: Likewise.
6079         * include/grub/powerpc/libgcc.h: Likewise.
6080         * include/grub/powerpc/setjmp.h: Likewise.
6081         * include/grub/powerpc/types.h: Likewise.
6082         * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
6083         * include/grub/powerpc/ieee1275/console.h: Likewise.
6084         * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
6085         * include/grub/powerpc/ieee1275/kernel.h: Likewise.
6086         * include/grub/powerpc/ieee1275/loader.h: Likewise.
6087         * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
6088         * include/grub/powerpc/ieee1275/time.h: Likewise.
6089         * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
6090         * include/grub/sparc64/libgcc.h: Likewise.
6091         * include/grub/sparc64/setjmp.h: Likewise.
6092         * include/grub/sparc64/types.h: Likewise.
6093         * include/grub/sparc64/ieee1275/console.h: Likewise.
6094         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
6095         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
6096         * include/grub/sparc64/ieee1275/time.h: Likewise.
6097         * include/grub/util/biosdisk.h: Likewise.
6098         * include/grub/util/getroot.h: Likewise.
6099         * include/grub/util/lvm.h: Likewise.
6100         * include/grub/util/misc.h: Likewise.
6101         * include/grub/util/raid.h: Likewise.
6102         * include/grub/util/resolve.h: Likewise.
6103         * io/gzio.c: Likewise.
6104         * kern/device.c: Likewise.
6105         * kern/disk.c: Likewise.
6106         * kern/dl.c: Likewise.
6107         * kern/elf.c: Likewise.
6108         * kern/env.c: Likewise.
6109         * kern/err.c: Likewise.
6110         * kern/file.c: Likewise.
6111         * kern/fs.c: Likewise.
6112         * kern/loader.c: Likewise.
6113         * kern/main.c: Likewise.
6114         * kern/misc.c: Likewise.
6115         * kern/mm.c: Likewise.
6116         * kern/parser.c: Likewise.
6117         * kern/partition.c: Likewise.
6118         * kern/rescue.c: Likewise.
6119         * kern/term.c: Likewise.
6120         * kern/efi/efi.c: Likewise.
6121         * kern/efi/init.c: Likewise.
6122         * kern/efi/mm.c: Likewise.
6123         * kern/i386/dl.c: Likewise.
6124         * kern/i386/efi/init.c: Likewise.
6125         * kern/i386/efi/startup.S: Likewise.
6126         * kern/i386/pc/init.c: Likewise.
6127         * kern/i386/pc/lzo1x.S: Likewise.
6128         * kern/i386/pc/startup.S: Likewise.
6129         * kern/ieee1275/ieee1275.c: Likewise.
6130         * kern/powerpc/cache.S: Likewise.
6131         * kern/powerpc/dl.c: Likewise.
6132         * kern/powerpc/ieee1275/cmain.c: Likewise.
6133         * kern/powerpc/ieee1275/crt0.S: Likewise.
6134         * kern/powerpc/ieee1275/init.c: Likewise.
6135         * kern/powerpc/ieee1275/openfw.c: Likewise.
6136         * kern/sparc64/cache.S: Likewise.
6137         * kern/sparc64/dl.c: Likewise.
6138         * kern/sparc64/ieee1275/init.c: Likewise.
6139         * kern/sparc64/ieee1275/openfw.c: Likewise.
6140         * loader/efi/chainloader.c: Likewise.
6141         * loader/efi/chainloader_normal.c: Likewise.
6142         * loader/i386/efi/linux.c: Likewise.
6143         * loader/i386/efi/linux_normal.c: Likewise.
6144         * loader/i386/pc/chainloader.c: Likewise.
6145         * loader/i386/pc/chainloader_normal.c: Likewise.
6146         * loader/i386/pc/linux.c: Likewise.
6147         * loader/i386/pc/linux_normal.c: Likewise.
6148         * loader/i386/pc/multiboot.c: Likewise.
6149         * loader/i386/pc/multiboot_normal.c: Likewise.
6150         * loader/powerpc/ieee1275/linux.c: Likewise.
6151         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
6152         * normal/arg.c: Likewise.
6153         * normal/cmdline.c: Likewise.
6154         * normal/command.c: Likewise.
6155         * normal/completion.c: Likewise.
6156         * normal/execute.c: Likewise.
6157         * normal/function.c: Likewise.
6158         * normal/lexer.c: Likewise.
6159         * normal/main.c: Likewise.
6160         * normal/menu.c: Likewise.
6161         * normal/menu_entry.c: Likewise.
6162         * normal/misc.c: Likewise.
6163         * normal/parser.y: Likewise.
6164         * normal/script.c: Likewise.
6165         * normal/i386/setjmp.S: Likewise.
6166         * normal/powerpc/setjmp.S: Likewise.
6167         * normal/sparc64/setjmp.S: Likewise.
6168         * partmap/acorn.c: Likewise.
6169         * partmap/amiga.c: Likewise.
6170         * partmap/apple.c: Likewise.
6171         * partmap/gpt.c: Likewise.
6172         * partmap/pc.c: Likewise.
6173         * partmap/sun.c: Likewise.
6174         * term/gfxterm.c: Likewise.
6175         * term/terminfo.c: Likewise.
6176         * term/efi/console.c: Likewise.
6177         * term/i386/pc/console.c: Likewise.
6178         * term/i386/pc/serial.c: Likewise.
6179         * term/i386/pc/vesafb.c: Likewise.
6180         * term/i386/pc/vga.c: Likewise.
6181         * term/ieee1275/ofconsole.c: Likewise.
6182         * util/biosdisk.c: Likewise.
6183         * util/console.c: Likewise.
6184         * util/genmoddep.c: Likewise.
6185         * util/getroot.c: Likewise.
6186         * util/grub-emu.c: Likewise.
6187         * util/grub-mkdevicemap.c: Likewise.
6188         * util/grub-probe.c: Likewise.
6189         * util/lvm.c: Likewise.
6190         * util/misc.c: Likewise.
6191         * util/raid.c: Likewise.
6192         * util/resolve.c: Likewise.
6193         * util/update-grub.in: Likewise.
6194         * util/update-grub_lib.in: Likewise.
6195         * util/grub.d/00_header.in: Likewise.
6196         * util/grub.d/10_hurd.in: Likewise.
6197         * util/grub.d/10_linux.in: Likewise.
6198         * util/i386/efi/grub-install.in: Likewise.
6199         * util/i386/efi/grub-mkimage.c: Likewise.
6200         * util/i386/pc/grub-install.in: Likewise.
6201         * util/i386/pc/grub-mkimage.c: Likewise.
6202         * util/i386/pc/grub-mkrescue.in: Likewise.
6203         * util/i386/pc/grub-setup.c: Likewise.
6204         * util/i386/pc/misc.c: Likewise.
6205         * util/powerpc/ieee1275/grub-install.in: Likewise.
6206         * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
6207         * util/powerpc/ieee1275/misc.c: Likewise.
6208         * video/bitmap.c: Likewise.
6209         * video/video.c: Likewise.
6210         * video/i386/pc/vbe.c: Likewise.
6211         * video/i386/pc/vbeblit.c: Likewise.
6212         * video/i386/pc/vbefill.c: Likewise.
6213         * video/i386/pc/vbeutil.c: Likewise.
6214         * video/readers/tga.c: Likewise.
6216 2007-07-02  Robert Millan  <rmh@aybabtu.com>
6218         * conf/i386-efi.rmk: Replace obsolete reference to
6219         util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
6220         with util/getroot.c.
6221         * conf/powerpc-ieee1275.rmk: Likewise.
6222         * conf/sparc64-ieee1275.rmk: Likewise.
6224         * util/grub-emu.c (main): Fix unchecked pointer handling.
6226 2007-07-02  Robert Millan  <rmh@aybabtu.com>
6228         * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
6229         invocation to fail, in order to support partition-less media.
6231         * util/i386/pc/grub-install.in: Likewise.
6233         * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
6234         which fs or partmap modules are needed (akin to its sister scripts).
6236         Also use grub-probe to get rid of unportable /proc/mounts check.
6238         Print the same informational message that the other scripts do, before
6239         exiting.
6241 2007-06-23  Robert Millan  <rmh@aybabtu.com>
6243         * util/update-grub_lib.in (font_path): New function.  Determine whether
6244         a font file can be found and, if so, echo the GRUB path to it.
6246         * util/update-grub.in: Handle multiple terminals depending on user
6247         input, platform availability and font file presence.  Propagate
6248         variables of our findings to /etc/grub.d/ children.
6250         * util/grub.d/00_header.in: Handle multiple terminals, based on
6251         environment setup by update-grub.
6253 2007-06-23  Robert Millan  <rmh@aybabtu.com>
6255         * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
6257 2007-06-21  Robert Millan  <rmh@aybabtu.com>
6259         * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
6260         indicate end of data section in kernel image.
6261         * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
6262         GRUB_KERNEL_MACHINE_DATA_END.
6264         * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
6265         space for it.
6266         * kern/i386/efi/startup.S: Likewise.
6268         * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
6269         during image generation.  Implement --prefix option to override this
6270         patch.
6271         * util/i386/efi/grub-mkimage.c: Likewise.
6273         * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
6274         code to make path relative to its root into a separate function.
6276         * util/i386/pc/grub-install.in: Use newly provided
6277         make_system_path_relative_to_its_root() to convert ${grubdir}, then
6278         pass the result to grub-install --prefix.
6280 2007-06-13  Robert Millan  <rmh@aybabtu.com>
6282         * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
6283         DEFAULT_DEVICE_MAP.
6284         * util/grub-emu.c: Use above definitions from misc.h instead of
6285         defining them.
6286         * util/grub-mkdevicemap.c: Likewise.
6287         * util/i386/pc/grub-setup.c: Likewise.
6288         * util/grub-probe.c: Likewise.
6289         (probe): Abort with grub_util_error() when either
6290         grub_guess_root_device or grub_util_get_grub_dev fails.
6292 2007-06-12  Robert Millan  <rmh@aybabtu.com>
6294         * normal/command.c (grub_command_execute): Use NULL rather than 0 for
6295         "pager" assignment.
6296         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
6297         "pcdata".
6298         * util/grub-probe.c (probe): Likewise for "drive_name".
6300 2007-06-11  Robert Millan  <rmh@aybabtu.com>
6302         * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
6303         not just the cdrom one.
6305 2007-06-11  Robert Millan  <rmh@aybabtu.com>
6307         * util/i386/pc/grub-mkrescue.in: Add "set -e".
6308         Add --pkglibdir=DIR option to override pkglibdir.
6309         Mention --image-type=TYPE in help output.
6310         Fix --grub-mkimage (it was a no-op).
6311         Abort gracefully when no parameter is given.
6313 2007-06-11  Robert Millan  <rmh@aybabtu.com>
6315         * util/i386/pc/grub-mkrescue.in: New file.
6316         * conf/i386-pc.rmk: Add its build declarations.  Put it in bin_SCRIPTS.
6317         * Makefile.in: Handle bin_SCRIPTS.
6319 2007-06-10  Vesa Jaaskelainen  <chaac@nic.fi>
6321         * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
6322         list of video modes.
6324 2007-06-06  Robert Millan  <rmh@aybabtu.com>
6326         * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
6327         file doesn't exist, or if it is in a filesystem grub can't read.
6329         * util/update-grub.in: Set fallback for GRUB_FS check to "unknown".  Do
6330         not abort if GRUB_DRIVE could not be defined.  Rearrange generated
6331         header comment to fit in 80 columns when the variables are resolved.
6333         * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
6334         could be identified by update-grub.  Remove redundant check for
6335         unifont.pff existence (since convert_system_path_to_grub_path now
6336         handles that).
6338 2007-06-04  Robert Millan  <rmh@aybabtu.com>
6340         * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
6342         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
6344         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
6346 2007-06-04  Robert Millan  <rmh@aybabtu.com>
6348         * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
6350         * include/grub/partition.h: Declare grub_apple_partition_map_init and
6351         grub_apple_partition_map_fini.
6353         * util/biosdisk.c
6354         (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
6355         to access >2 TiB disks).
6357         Print disk->total_sectors with %llu instead of %lu, since this
6358         variable is always 64-bit (prevents wrong disk size from being displayed
6359         on either >2 TiB disk or big-endian CPU).
6361         (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
6362         into a generic case that supports all (sane) partition maps.
6364         Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
6365         breaks big-endian.
6367         * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
6368         and grub_apple_partition_map_fini() after that.
6370 2007-06-01  Robert Millan  <rmh@aybabtu.com>
6372         * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
6374         * util/grub.d/00_header.in: Only enable gfxterm when
6375         convert_system_path_to_grub_path() succeeds.
6377 2007-05-20  Robert Millan  <rmh@aybabtu.com>
6379         * util/update-grub_lib.in: New file.
6380         * DISTLIST: Add update-grub_lib.in.
6381         * conf/common.rmk: Generate update-grub_lib and install it in
6382         $(lib_DATA).
6383         * Makefile.in: Add install routine for $(lib_DATA).
6385         * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
6386         function provided by update-grub_lib to support arbitrary paths of
6387         unifont.pff.
6388         * util/update-grub.in: Use convert_system_path_to_grub_path() to
6389         initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
6391 2007-05-19  Robert Millan  <rmh@aybabtu.com>
6393         * commands/i386/cpuid.c: New module.
6394         * DISTLIST: Add it.
6395         * conf/i386-efi.rmk: Enable cpuid.mod.
6396         * conf/i386-pc.rmk: Likewise.
6398 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
6400         * kern/disk.c (grub_disk_read): Check return value of
6401         grub_realloc().
6403 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
6405         * util/getroot.c (grub_util_get_grub_dev): Support partitionable
6406         arrays.
6407         * disk/raid.c (grub_raid_open): Likewise.
6409 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
6411         * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
6412         stack instead of on the heap.
6414         * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
6415         before doing a read on it.
6417         * configure.ac: Only use -fno-stack-protector for the target
6418         environment.
6420 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
6422         * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
6423         __attribute_ ((unused)) to mode_type argument.
6425         * util/getroot.c (grub_guess_root_device): Fix #endif.
6427         * kern/misc.c (memcmp): Fix prototype.
6429         * include/grub/partition.h [GRUB_UTIL]
6430         (grub_gpt_partition_map_init): Add prototype.
6431         (grub_gpt_partition_map_fini): Likewise.
6433         * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
6434         at the right place.
6436         * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
6437         (grub_fat_read_data): Likewise.
6438         (grub_fat_find_dir): Likewise.
6440         * font/manager.c (find_glyph): Make table a const.
6441         (grub_font_get_glyph): Remove bitmap from if statement.
6443 2007-05-16  Jeroen Dekkers  <jeroen@dekkers.cx>
6445         * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
6446         code, first search for device in /dev/mapper, then in /dev.
6447         (grub_util_get_grub_dev): New function.
6448         * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
6449         prototype.
6450         * util/grub-probe.c (probe): Remove check for RAID, call
6451         grub_util_get_grub_dev() instead of
6452         grub_util_biosdisk_get_grub_dev().
6453         * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
6454         grub_util_biosdisk_get_grub_dev().
6455         * util/i386/pc/grub-setup.c (main): Likewise.
6457 2007-05-16  Robert Millan  <rmh@aybabtu.com>
6459         * DISTLIST: Update for the latest changes.
6460         * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
6461         util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
6462         * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
6463         grub/util/biosdisk.h.
6464         * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
6465         grub/util/biosdisk.h.
6467 2007-05-16  Robert Millan  <rmh@aybabtu.com>
6469         * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
6471 2007-05-16  Robert Millan  <rmh@aybabtu.com>
6473         * util/i386/efi/grub-install.in: New.
6474         * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
6475         newly added grub-install.
6476         * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
6477         include.
6478         * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
6479         grub/util/biosdisk.h.
6480         * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
6481         grub/util/biosdisk.h.
6483 2007-05-16  Robert Millan  <rmh@aybabtu.com>
6485         * include/grub/i386/pc/util/biosdisk.h: Moved to ...
6486         * include/grub/util/biosdisk.h: ... here.
6487         * util/i386/pc/biosdisk.c: Moved to ...
6488         * util/biosdisk.c: ... here.
6489         * util/i386/pc/getroot.c: Moved to ...
6490         * util/getroot.c: ... here.
6491         * util/i386/pc/grub-mkdevicemap.c: Moved to ...
6492         * util/grub-mkdevicemap.c: ... here.
6493         * util/i386/pc/grub-probe.c: Moved to ...
6494         * util/grub-probe.c: ... here.
6496 2007-05-15  Robert Millan  <rmh@aybabtu.com>
6498         * util/update-grub.in: Remove duplicated line in grub.cfg header
6499         message.
6501 2007-05-13  Robert Millan  <rmh@aybabtu.com>
6503         * util/update-grub.in: Fix a few assumptions about the devices holding
6504         /, /boot and /boot/grub being the same.
6505         * util/grub.d/00_header.in: Likewise.
6506         * util/grub.d/10_hurd.in: Likewise.
6507         * util/grub.d/10_linux.in: Likewise.
6509         * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
6510         patterns.  Use that to define the `.old' suffix as older than `'.
6512         * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
6514         * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
6515         the grub.cfg header message.
6517 2007-05-11  Robert Millan  <rmh@aybabtu.com>
6519         * util/update-grub.in: Create device.map if it doesn't already exist,
6520         before attempting to run grub-probe.
6521         Check for grub-probe and grub-mkdevicemap with the same code
6522         grub-install is using.
6523         Remove test mode.
6525 2007-05-09  Jeroen Dekkers  <jeroen@dekkers.cx>
6527         * Makefile.in: Add the datarootdir autoconf variable.
6529 2007-05-09  Robert Millan  <rmh@aybabtu.com>
6531         * util/i386/pc/grub-probe.c (probe): When detecting partition map,
6532         fail gracefully if dev->disk->partition == NULL.
6534 2007-05-07  Robert Millan  <rmh@aybabtu.com>
6536         * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
6537         determine partition map module.
6538         * util/i386/pc/grub-install.in: Use this feature to decide which
6539         partition module to load, instead of hardcoding pc and gpt.
6541 2007-05-07  Robert Millan  <rmh@aybabtu.com>
6543         * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
6544         source directory differs from build directory.
6546 2007-05-05  Robert Millan  <rmh@aybabtu.com>
6548         * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
6549         initialisation.
6551 2007-05-05  Robert Millan  <rmh@aybabtu.com>
6553         * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
6555 2007-05-05  Robert Millan  <rmh@aybabtu.com>
6557         * util/grub.d/10_linux.in: Allow the administrator to insert Linux
6558         command-line arguments via ${GRUB_CMDLINE_LINUX}.
6560 2007-05-05  Robert Millan  <rmh@aybabtu.com>
6562         * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
6563         (grub_probe_SOURCES): Likewise.
6564         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
6565         GPT and initialize dos_part and bsd_part accordingly.
6566         * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
6567         install_bsd_part.
6568         (main): Activate gpt module for use during partition identification,
6569         and deactivate it afterwards.
6570         * util/i386/pc/grub-install.in: Add gpt module to core.img.
6571         * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
6572         partition identification, and deactivate it afterwards.
6574 2007-05-05  Robert Millan  <rmh@aybabtu.com>
6576         * term/i386/pc/console.c (grub_console_fini): Call
6577         grub_term_set_current() before grub_term_unregister().
6579 2007-05-04  Robert Millan  <rmh@aybabtu.com>
6581         * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
6582         util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
6583         * Makefile.in: Build update-grub_SCRIPTS.  Install update-grub_SCRIPTS
6584         and update-grub_DATA.
6585         * conf/common.rmk: Build and install update-grub components.
6586         * conf/common.mk: Regenerate.
6587         * util/update-grub.in: New.  Core of update-grub.
6588         * util/grub.d/00_header.in: New.  Generates grub.cfg header.
6589         * util/grub.d/10_hurd.in: New.  Generates boot entries for the Hurd.
6590         * util/grub.d/10_linux.in: New.  Generates boot entries for Linux.
6591         * util/grub.d/README: New.  Document grub.d directory layout.
6593 2007-05-01  Robert Millan  <rmh@aybabtu.com>
6595         * util/grub-emu.c: Move initialization functions
6596         grub_util_biosdisk_init() and grub_init_all() before
6597         grub_util_biosdisk_get_grub_dev(), which relies on them.
6599 2007-04-19  Robert Millan  <rmh@aybabtu.com>
6601         * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
6602         it is used later.
6604 2007-04-18  Jerone Young  <jerone@gmail.com>
6606         * kernel/elf.c: Add missing parenthesis for conditional statement
6607         stanza.
6609 2007-04-10  Jerone Young  <jerone@gmail.com>
6611         * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
6612         continue on and look for device node with real device name.
6614 2007-04-10  Jerone Young  <jerone@gmail.com>
6616         * configure.ac: Add argument for autoconf to use transformation
6617         ability.
6618         * Makefile.in: Add autoconf package transformation code.
6619         * util/i386/pc/grub-install.in: Likewise.
6620         * util/powerpc/ieee1275/grub-install.in: Likewise.
6622 2007-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
6624         * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
6625         (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
6626         (EXT2_REVISION): Likewise.
6627         (EXT2_INODE_SIZE): Likewise.
6628         (struct grub_ext2_block_group): Added a missing member
6629         "used_dirs".
6630         (grub_ext2_read_inode): Divide by the inode size in a superblock
6631         instead of 128 to obtain INODES_PER_BLOCK.
6632         Use the macro EXT2_INODE_SIZE instead of directly using
6633         SBLOCK->INODE_SIZE.
6635 2007-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
6637         * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
6638         superblock instead of the structure size to compute an
6639         offset. This fixes the problem that GRUB could not read a
6640         filesystem when inode size is different from 128-byte.
6642 2007-03-05  Marco Gerards  <marco@gnu.org>
6644         * normal/main.c (read_config_file): When "menu" is not set, create
6645         an initial context.
6647 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
6649         * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
6650         (HEAP_LIMIT): New macro.
6651         (grub_claim_heap): Claim memory up to `heaplimit'.
6653 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
6655         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
6656         * kern/powerpc/ieee1275/init.c (_end): Add declaration.
6657         (_start): Likewise.
6658         (grub_arch_modules_addr): Return address after `_end'.
6659         * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
6660         (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
6661         (add_segments): Calculate `_end' from phdr size and location.
6662         (ALIGN_UP): Moved to ...
6663         * include/grub/misc.h: here.
6664         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
6665         New macro.
6666         (GRUB_IEEE1275_MODULE_BASE): Removed.
6668 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
6670         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
6671         loop boundary.
6673 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
6675         * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
6676         All users updated.
6677         (grub_elf64_load_hook_t): Likewise.
6678         * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
6679         debug output.
6681 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
6683         * kern/mm.c: Update copyright.
6684         (grub_mm_debug): Correct syntax error.
6685         (grub_mm_dump_free): New function.
6686         (grub_debug_free): Call `grub_free'.
6687         * include/grub/mm.h: Update copyright.
6688         (grub_mm_dump_free): Add declaration.
6690 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
6692         * include/grub/ieee1275/ieee1275.h: Update copyright.
6693         * kern/powerpc/ieee1275/init.c: Likewise.
6694         * kern/powerpc/ieee1275/openfw.c: Likewise.
6696         * loader/powerpc/ieee1275/linux.c: Likewise.
6697         * include/grub/elfload.h: Likewise.
6698         * kern/elf.c: Likewise.
6699         (grub_elf32_load): Pass `base' and `size' parameters.  Update all
6700         callers.
6701         (grub_elf64_load): Likewise.
6702         (grub_elf32_load_segment): Move to a nested function.
6703         (grub_elf64_load_segment): Likewise.
6705 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
6707         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
6708         prototype.
6709         * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
6710         (grub_heap_len): Likewise.
6711         (HEAP_SIZE): New macro.
6712         (grub_claim_heap): New function.
6713         (grub_machine_init): Don't claim heap directly.  Call
6714         `grub_claim_heap'.
6715         * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
6716         (grub_available_iterate): New function.
6718 2007-02-03  Thomas Schwinge  <tschwinge@gnu.org>
6720         * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
6721         * configure.ac: Use it for testing the HOST and TARGET compilers.
6723 2006-12-13  Thomas Schwinge  <tschwinge@gnu.org>
6725         * Makefile.in (enable_grub_emu): New variable.
6726         * configure.ac (--enable-grub-emu): New option.
6727         Do the checks for (n)curses only if `--enable-grub-emu' is requested.
6728         * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
6729         * conf/i386-pc.rmk: Likewise.
6730         * conf/powerpc-ieee1275.rmk: Likewise.
6731         * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
6733 2006-12-12  Marco Gerards  <marco@gnu.org>
6735         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
6737         * kern/env.c (grub_env_unset): Don't free the member `value' when
6738         the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
6739         pointer.
6741         * normal/main.c (current_menu): Removed.
6742         (free_menu): Unset the `menu' environment variable.
6743         (grub_normal_menu_addentry): Make use of the environment variable
6744         `menu', instead of using the global `current_menu'.  Allocate
6745         memory for the sourcecode of this entry.
6746         (read_config_file): New argument `nested', changed all callers.
6747         Only in the case of a new context, initialize a new menu.  Set the
6748         `menu' environment variable.
6749         (grub_normal_execute): Don't set and unset the environment
6750         variable `menu' here anymore.  Only free the menu when leaving the
6751         context.
6753         * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
6754         leak.
6756 2006-12-11  Marco Gerards  <marco@gnu.org>
6758         * normal/menu_entry.c (run): Fix off by one bug so the last line
6759         is executed.  Move the loader check to outside the loop.
6761 2006-12-08  Hollis Blanchard  <hollis@penguinppc.org>
6763         * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
6765 2006-11-25  Yoshinori K. Okuji  <okuji@enbug.org>
6767         * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
6768         the number of sectors.  Reported by Andrey Shuvikov
6769         <mr_hyro@yahoo.com>.
6771 2006-11-11  Jeroen Dekkers  <jeroen@dekkers.cx>
6773         * kern/disk.c (grub_disk_read): When there is a read error, always
6774         try to read only the necessary data.
6776         * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
6777         disk/raid.c.
6778         * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
6779         prototype.
6780         [GRUB_UTIL] (grub_raid_fini): Likewise.
6781         [GRUB_UTIL] (grub_lvm_init): Likewise.
6782         [GRUB_UTIL] (grub_lvm_fini): Likewise.
6783         * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
6784         RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
6785         (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
6786         and grub_raid_fini().
6788 2006-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
6790         * include/grub/types.h (__unused): Rename to UNUSED.
6791         * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
6792         (grub_elf64_size): Likewise.
6794 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
6796         * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
6797         grub_error_push and grub_error_pop in the error-handling path.
6798         (grub_elf32_load_segment): Only call grub_file_read with non-zero
6799         length.
6801 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
6803         * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
6804         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
6805         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6806         (kernel_elf_SOURCES): Likewise.
6807         * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
6808         * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
6809         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
6810         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
6811         * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
6812         (elf_mod_SOURCES): New variable.
6813         (elf_mod_CFLAGS): Likewise.
6814         (elf_mod_LDFLAGS): Likewise.
6815         * include/grub/types.h (__unused): New macro.
6816         * include/grub/elfload.h: New file.
6817         * kern/elf.c: Likewise.
6818         * loader/powerpc/ieee1275/linux.c: Include elfload.h.
6819         (ELF32_LOADMASK): New macro.
6820         (ELF64_LOADMASK): Likewise.
6821         (vmlinux): Removed.
6822         (grub_linux_load32): New function.
6823         (grub_linux_load64): Likewise.
6824         (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
6825         Use grub_elf_t instead of grub_file_t.
6827 2006-11-02  Hollis Blanchard  <hollis@penguinppc.org>
6829         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
6830         `catch_result' to struct set_color_args.
6832 2006-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
6834         * normal/menu.c: Include grub/script.h.
6835         * normal/menu_entry.c: Likewise.
6836         * include/grub/normal.h: Do not include grub/script.h.
6838 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
6840         * kern/disk.c (grub_disk_read): Correct debug printf formatting.
6842 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
6844         * kern/disk.c (grub_disk_open): Print debug messages when opening a
6845         disk.
6846         (grub_disk_close): Print debug messages when closing a disk.
6847         (grub_disk_read): Print debug messages when disk read fails.
6848         * kern/fs.c (grub_fs_probe): Print debug messages when detecting
6849         filesystem type.
6850         * kern/partition.c: Include misc.h.
6851         (grub_partition_iterate): Print debug messages when detecting
6852         partition type.
6854 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
6856         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
6857         is negative.
6858         * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
6860 2006-10-26  Hollis Blanchard  <hollis@penguinppc.org>
6862         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
6863         Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
6865 2006-10-25  Jeroen Dekkers  <jeroen@dekkers.cx>
6867         * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
6868         instead of sizeof(lv). Patch by Michael Guntsche.
6870 2006-10-18  Jeroen Dekkers  <jeroen@dekkers.cx>
6872         * disk/lvm.c: Rename VGS to VG_LIST.
6873         (grub_lvm_iterate): Change VGS->LV to VG-LV.
6874         (grub_lvm_open): Likewise.
6875         Thanks to Michael Guntsche for finding this bug.
6877 2006-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
6879         * configure.ac (AC_INIT): Bumped to 1.95.
6881 2006-10-14  Robert Millan  <rmh@aybabtu.com>
6883         * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
6884         with "/dev/.static/dev/md".
6886 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
6888         * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
6889         DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
6890         DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
6891         DRIVE_NAME are always freed.
6893         * util/i386/pc/biosdisk.c (make_device_name): Add one into
6894         DOS_PART, as a DOS partition is counted from one instead of zero
6895         now. Reported by Robert Millan.
6897 2006-10-14  Robert Millan  <rmh@aybabtu.com>
6899         * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
6900         grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
6901         * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
6902         string returned by grub_guess_root_device.
6903         * util/i386/pc/grub-setup.c: Likewise.
6904         * util/i386/pc/grub-probefs.c: Likewise.
6906         * util/i386/pc/grub-probefs.c: Rename to ...
6907         * util/i386/pc/grub-probe.c: ... this.
6908         * DISTLIST: Remove grub-probefs, add grub-probe.
6909         * conf/i386-efi.rmk: Likewise.
6910         * conf/i386-pc.rmk: Likewise.
6911         * util/i386/pc/grub-install.in: Likewise.
6913         * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
6914         choose which information we want to print.
6916 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
6918         * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
6919         include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
6920         include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
6921         include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
6922         video/readers/tga.c and video/i386/pc/vbeutil.c.
6924 2006-10-14  Jeroen Dekkers  <jeroen@dekkers.cx>
6926         Added support for RAID and LVM.
6928         * disk/lvm.c: New file.
6929         * disk/raid.c: Likewise.
6930         * include/grub/lvm.h: Likewise.
6931         * include/grub/raid.h: Likewise.
6932         * include/grub/util/lvm.h: Likewise.
6933         * include/grub/util/raid.h: Likewise.
6934         * util/lvm.c: Likewise.
6935         * util/raid.c: Likewise.
6937         * include/grub/disk.h (grub_disk_dev_id): Add
6938         GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
6939         (grub_disk_get_size): New prototype.
6940         * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
6941         returns a partition.
6942         (grub_disk_get_size): New function.
6944         * kern/i386/pc/init.c (make_install_device): Copy the prefix
6945         verbatim if grub_install_dos_part is -2.
6947         * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
6948         and LVM devices.
6950         * util/i386/pc/grub-setup.c (setup): New argument
6951         MUST_EMBED. Force embedding of GRUB when the argument is
6952         true. Close FILE before returning.
6953         (main): Add support for RAID and LVM.
6955         * conf/common.rmk: Add RAID and LVM modules.
6956         * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
6957         util/lvm.c.
6958         (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
6960         * kern/misc.c (grub_strstr): New function.
6961         * include/grub/misc.h (grub_strstr): New prototype.
6963 2006-10-10  Tristan Gingold  <tristan.gingold@bull.net>
6965         * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
6967 2006-10-05  Tristan Gingold  <tristan.gingold@bull.net>
6969         * kern/misc.c (grub_strtoull): Guess the base only if not
6970         specified.
6972 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
6974         * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
6975         PowerMac support.
6977 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
6979         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
6981         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
6982         Remove `flags' argument.  All callers changed.
6983         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
6984         (IEEE1275_IHANDLE_INVALID): New variable.
6985         (IEEE1275_CELL_INVALID): New variable.
6986         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
6987         grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
6988         grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
6989         grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
6990         grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
6991         codes from Open Firmware.  All callers updated.
6992         (grub_ieee1275_next_property): Directly return Open Firmware return
6993         code.
6994         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
6995         Standardize error checking from `grub_ieee1275_get_property'.
6996         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
6997         `devalias' to `aliases'.  Correct comments.  Consolidate error paths.
6999 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
7001         * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
7002         `instance_to_package_args' to `instance_to_path_args'.
7004         * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
7005         `grub_ieee1275_chosen'.
7007         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
7008         `grub_ieee1275_interpret'.
7010 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
7012         * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
7014 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
7016         * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
7017         (__cmpdi): Likewise.
7019         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
7020         `flags' to `grub_ieee1275_next_property'.  Change `pathlen' to type
7021         `grub_ssize_t'.
7023         * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
7025         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
7026         to type `grub_ssize_t'.
7027         (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
7029 2006-09-22  Marco Gerards  <marco@gnu.org>
7031         * normal/script.c (grub_script_create_cmdmenu): Skip leading
7032         newlines.
7034 2006-09-22  Marco Gerards  <marco@gnu.org>
7036         * commands/echo.c: New file.
7038         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
7040         * conf/common.rmk (echo_mod_SOURCES): New variable.
7041         (echo_mod_CFLAGS): Likewise.
7042         (echo_mod_LDFLAGS): Likewise.
7044 2006-09-22  Marco Gerards  <marco@gnu.org>
7046         * normal/main.c (get_line): Malloc memory instead of using
7047         preallocated memory.  Removed the arguments `cmdline' and
7048         `max_len'.  Updated all callers.
7050 2006-09-22  Marco Gerards  <marco@gnu.org>
7052         * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
7053         (normal_mod_DEPENDENCIES): Likewise.
7055         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
7056         (normal_mod_DEPENDENCIES): Likewise.
7058         * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
7060 2006-09-22  Johan Rydberg  <jrydberg@gnu.org>
7062         * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
7063         programs.
7064         * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
7065         (normal_mod_DEPENDENCIES): Likewise.
7066         * conf/i386-pc.mk: Regenerate.
7067         * conf/i386-efi.mk: Likewise
7068         * conf/common.mk: Likewise.
7069         * conf/powerpc-ieee1275.mk: Likewise.
7070         * conf/sparc64-ieee1275.mk: Likewise.
7072 2006-09-22  Robert Millan  <rmh@aybabtu.com>
7074         Sync with i386 version.
7075         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
7076         * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
7078 2006-09-21  Robert Millan  <rmh@aybabtu.com>
7080         Import from GRUB Legacy (lib/device.c):
7081         * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
7082         (init_device_map) [__linux__]: Add support for I2O devices.
7084 2006-09-14  Marco Gerards  <marco@gnu.org>
7086         * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
7087         `-melf_i386'.
7089 2006-09-14  Robert Millan  <rmh@aybabtu.com>
7091         * util/i386/pc/grub-install.in: Skip menu.lst when removing
7092         /boot/grub/*.lst.
7094         * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
7096         * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
7097         before adding it to device.map.
7099 2006-08-15  Johan Rydberg  <jrydberg@gnu.org>
7101         * genmk.rb: Let GCC generate dependencies the first time it
7102         compiles a file; using the -MD option.
7103         * conf/common.mk: Regenerate.
7104         * conf/i386-pc.mk: Likewise.
7105         * conf/i386-efi.mk: Likewise.
7106         * conf/powerpc-ieee1275.mk: Likewise.
7107         * conf/sparc64-ieee1275.mk: Likewise.
7109 2006-08-04  Yoshinori K. Okuji  <okuji@enbug.org>
7111         Move the prototypes of grub_setjmp and grub_longjmp to
7112         cpu/setjmp.h, so that each architecture may specify different
7113         attributes.
7115         * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
7116         (grub_longjmp): Likewise.
7117         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
7118         (grub_longjmp): Likewise.
7119         * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
7120         (grub_longjmp): Likewise.
7122         * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
7123         [!GRUB_UTIL] (grub_longjmp): Removed.
7125 2006-08-01  Pelletier Vincent  <subdino2004@yahoo.fr>
7127         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
7128         "color!" method does not return any value.
7130 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
7132         * include/grub/bitmap.h: New file.
7134         * include/grub/i386/pc/vbeutil.h: Likewise.
7136         * video/bitmap.c: Likewise.
7138         * video/readers/tga.c: Likewise.
7140         * video/i386/pc/vbeutil.c: Likewise.
7142         * commands/videotest.c: Code cleanup and updated to reflect to new
7143         video API.
7145         * term/gfxterm.c: Likewise.
7147         * video/video.c: Likewise.
7149         * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
7150         (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
7151         (bitmap_mod_SOURCES): New entry.
7152         (bitmap_mod_CFLAGS): Likewise.
7153         (bitmap_mod_LDFLAGS): Likewise.
7154         (tga_mod_SOURCES): Likewise.
7155         (tga_mod_CFLAGS): Likewise.
7156         (tga_mod_LDFLAGS): Likewise.
7158         * include/grub/video.h (grub_video_blit_operators): New enum type.
7159         (grub_video_render_target): Changed as forward declaration and moved
7160         actual definition to be video driver specific.
7161         (grub_video_adapter.blit_bitmap): Added blitting operator.
7162         (grub_video_adapter.blit_render_target): Likewise.
7163         (grub_video_blit_bitmap): Likewise.
7164         (grub_video_blit_render_target): Likewise.
7166         * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
7167         driver specific render target definition.
7168         (grub_video_vbe_map_rgba): Added driver internal helper.
7169         (grub_video_vbe_unmap_color): Updated to use
7170         grub_video_i386_vbeblit_info.
7171         (grub_video_vbe_get_video_ptr): Likewise.
7173         * include/grub/i386/pc/vbeblit.h
7174         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
7175         grub_video_i386_vbeblit_info.
7176         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
7177         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
7178         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
7179         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
7180         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
7181         (grub_video_i386_vbeblit_index_index): Likewise.
7182         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
7183         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
7184         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
7185         (grub_video_i386_vbeblit_blend): Added generic blitter for blend
7186         operator.
7187         (grub_video_i386_vbeblit_replace): Added generic blitter for replace
7188         operator.
7190         * video/i386/pc/vbeblit.c: Updated to reflect changes on
7191         include/grub/i386/pc/vbeblit.h.
7193         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
7194         Updated to use grub_video_i386_vbeblit_info.
7195         (grub_video_i386_vbefill_R8G8B8): Likewise.
7196         (grub_video_i386_vbefill_index): Likewise.
7197         (grub_video_i386_vbefill): Added generic filler.
7199         * video/i386/pc/vbefill.c: Updated to reflect changes on
7200         include/grub/i386/pc/vbefill.h.
7202         * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
7203         grub_video_i386_vbeblit_info.
7204         (grub_video_vbe_unmap_color): Likewise.
7205         (grub_video_vbe_blit_glyph): Likewise.
7206         (grub_video_vbe_scroll): Likewise.
7207         (grub_video_vbe_draw_pixel): Removed function.
7208         (grub_video_vbe_get_pixel): Likewise.
7209         (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
7210         updated code to use it.
7211         (common_blitter): Added common blitter for render target and bitmap.
7212         (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
7213         (grub_video_vbe_blit_render_target): Likewise.
7215 2006-07-30  Johan Rydberg  <jrydberg@gnu.org>
7217         * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
7218         is in text mode if there is no console control protocol instance
7219         available.
7221 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
7223         * include/grub/video.h: Code cleanup.
7225         * include/grub/i386/pc/vbe.h: Likewise.
7227         * video/i386/pc/vbe.c: Likewise.
7229         * video/i386/pc/vbeblit.c: Likewise.
7231         * video/i386/pc/vbefill.c: Likewise.
7233         * video/video.c: Likewise.  Also added more comments.
7235 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
7237         * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
7238         (struct grub_biosdisk_dap): Likewise.
7240         * include/grub/i386/pc/biosdisk.h: ... to here.  Also corrected
7241         linkage settings for all functions.
7243 2006-07-12  Marco Gerards  <marco@gnu.org>
7245         * configure.ac (--enable-mm-debug): Fix typo.
7247         * genkernsyms.sh.in: Use proper quoting for `CC'.
7249 2006-07-02  Jeroen Dekkers  <jeroen@dekkers.cx>
7251         * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
7252         (normal_mod_ASFLAGS): Remove "-m32".
7254 2006-06-14  Yoshinori K. Okuji  <okuji@enbug.org>
7256         * util/misc.c: Include config.h.
7257         [!HAVE_MEMALIGN]: Do not include malloc.h.
7258         (grub_memalign): Use posix_memalign, if present. Then, use
7259         memalign, if present. Otherwise, emit an error.
7261         * util/grub-emu.c: Do not include malloc.h.
7263         * include/grub/util/misc.h: Include unistd.h. This is required for
7264         FreeBSD, because off_t is defined in unistd.h. Reported by Harley
7265         D. Eades III <hde@foobar-qux.org>.
7267         * configure.ac (AC_GNU_SOURCE): Added.
7268         (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
7269         type.
7271 2006-06-09  Yoshinori K. Okuji  <okuji@enbug.org>
7273         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
7274         ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
7276 2006-06-07  Jeroen Dekkers  <jeroen@dekkers.cx>
7278         * include/grub/types.h (grub_host_addr_t): Rename to
7279         grub_target_addr_t.
7280         (grub_host_off_t): Rename to grub_target_off_t.
7281         (grub_host_size_t): Rename to grub_target_size_t.
7282         (grub_host_ssize_t): Rename to grub_target_ssize_t.
7283         Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
7285         * include/grub/kernel.h (struct grub_module_header): Change type
7286         of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
7287         (grub_module_info): Likewise.
7289 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
7291         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
7292         of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
7293         Velazquez <jesus.velazquez@gmail.com>.
7295 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
7297         Count partitions from 1 instead of 0 in the string representation
7298         of partitions. Still use 0-based internally.
7300         * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
7301         (sun_partition_map_iterate): Use grub_partition_t instead of
7302         struct grub_partition *. Cast DESC->START_CYLINDER to
7303         grub_uint64_t after converting the endian.
7304         (sun_partition_map_probe): Subtract 1 for PARTNUM.
7305         (sun_partition_map_get_name): Add 1 to P->INDEX.
7307         * partmap/pc.c (grub_partition_parse): Subtract 1 for
7308         PCDATA->DOS_PART.
7309         (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
7311         * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
7312         zero instead of one.
7313         (gpt_partition_map_probe): Subtract 1 for PARTNUM.
7314         (gpt_partition_map_get_name): Add 1 into P->INDEX.
7316         * partmap/apple.c (apple_partition_map_iterate): Change the type
7317         of POS to unsigned.
7318         (apple_partition_map_probe): Subtract 1 for PARTNUM.
7319         (apple_partition_map_get_name): Add 1 into P->INDEX.
7321         * partmap/amiga.c (amiga_partition_map_iterate): Change the type
7322         of POS to unsigned.
7323         (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
7324         calculate the offset of a partition.
7325         (amiga_partition_map_probe): Subtract 1 for PARTNUM.
7326         (amiga_partition_map_get_name): Add 1 into P->INDEX.
7328         * partmap/acorn.c (acorn_partition_map_find): Change the type of
7329         SECTOR to grub_disk_addr_t.
7330         (acorn_partition_map_iterate): Likewise.
7331         (acorn_partition_map_probe): Subtract 1 for PARTNUM.
7332         Change the type of SECTOR to grub_disk_addr_t. Declare P on the
7333         top.
7334         (acorn_partition_map_get_name): Add 1 into P->INDEX.
7336         * kern/i386/pc/init.c (make_install_device): Add 1 into
7337         GRUB_INSTALL_DOS_PART.
7339         * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
7340         conditional.
7342 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
7344         Clean up the code to support 64-bit addressing in disks and
7345         files. This change is not enough for filesystems yet.
7347         * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
7348         type of "start" to grub_uint64_t.
7349         (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
7350         grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
7351         save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
7352         convert addresses.
7354         * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
7355         to grub_disk_addr_t.
7357         * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
7358         string.
7360         * partmap/pc.c (pc_partition_map_iterate): Likewise.
7362         * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
7363         to char *.
7365         * normal/script.c (grub_script_parse): Remove unused MEMFREE.
7367         * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
7369         * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
7371         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
7372         to grub_off_t, to detect an error from grub_file_seek.
7373         (grub_multiboot_load_elf32): Likewise.
7375         * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
7376         maximum unsigned long value when an overflow is detected.
7377         (grub_strtoull): New function.
7378         (grub_divmod64): Likewise.
7379         (grub_lltoa): use grub_divmod64.
7381         * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
7382         grub_disk_addr_t.
7383         (grub_fs_blocklist_open): Increase P if P is not NULL to advance
7384         the pointer to next character. Use grub_strtoull instead of
7385         grub_strtoul.
7386         (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
7387         SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
7388         respectively.
7390         * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
7391         return value is signed.
7392         (grub_file_seek): Change the type of OLD to grub_off_t. Do not
7393         test if OFFSET is less than zero, as OFFSET is unsigned now.
7395         * kern/disk.c (struct grub_disk_cache): Change the type of
7396         "sector" to grub_disk_addr_t.
7397         (grub_disk_cache_get_index): Change the type of SECTOR to
7398         grub_disk_addr_t. Calculate the hash with SECTOR casted to
7399         unsigned after shifting.
7400         (grub_disk_cache_invalidate): Change the type of SECTOR to
7401         grub_disk_addr_t.
7402         (grub_disk_cache_unlock): Likewise.
7403         (grub_disk_cache_store): Likewise.
7404         (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
7405         START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
7406         grub_disk_addr_t and grub_uint64_t, respectively.
7407         (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
7408         body, as the value of OFFSET is tweaked by
7409         grub_disk_check_range. Change the types of START_SECTOR, LEN and
7410         POS to grub_disk_addr_t, grub_size_t and grub_size_t,
7411         respectively.
7412         (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
7413         body, as the value of OFFSET is tweaked by
7414         grub_disk_check_range. Change the types of LEN and N to
7415         grub_size_t.
7417         * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
7418         and "saved_offset" to grub_off_t.
7419         (test_header): Cast BUF to char *.
7420         (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
7421         to char *.
7422         (grub_gzio_read): Change the types of OFFSET and SIZE to
7423         grub_off_t and grub_size_t, respectively.
7425         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
7426         Removed.
7427         (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
7428         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
7429         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
7430         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
7431         (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
7433         * include/grub/types.h (grub_off_t): Unconditionally set to
7434         grub_uint64_t.
7435         (grub_disk_addr_t): Changed to grub_uint64_t.
7437         * include/grub/partition.h (struct grub_partition): Change the
7438         types of "start", "len" and "offset" to grub_disk_addr_t,
7439         grub_uint64_t and grub_disk_addr_t, respectively.
7440         (grub_partition_get_start): Return grub_disk_addr_t.
7441         (grub_partition_get_len): Return grub_uint64_t.
7443         * include/grub/misc.h (grub_strtoull): New prototype.
7444         (grub_divmod64): Likewise.
7446         * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
7447         of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
7448         grub_off_t, respectively.
7449         All callers and references changed.
7451         * include/grub/fs.h (struct grub_fs): Change the type of LEN to
7452         grub_size_t in "read".
7453         All callers and references changed.
7455         * include/grub/file.h (struct grub_file): Change the types of
7456         "offset" and "size" to grub_off_t and grub_off_t,
7457         respectively. Change the type of SECTOR to grub_disk_addr_t in
7458         "read_hook".
7459         (grub_file_read): Change the type of LEN to grub_size_t.
7460         (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
7461         grub_off_t.
7462         (grub_file_size): Return grub_off_t.
7463         (grub_file_tell): Likewise.
7464         All callers and references changed.
7466         * include/grub/disk.h (struct grub_disk_dev): Change the types of
7467         SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
7468         "write".
7469         (struct grub_disk): Change the type of "total_sectors" to
7470         grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
7471         "read_hook".
7472         (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
7473         grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
7474         (grub_disk_write): Likewise.
7475         All callers and references changed.
7477         * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
7478         char * for grub_strncmp to silence gcc.
7479         (grub_iso9660_mount): Likewise.
7480         (grub_iso9660_mount): Likewise.
7481         (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
7482         return statement.
7483         (grub_iso9660_iterate_dir): Likewise.
7484         (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
7486         * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
7487         LEN to grub_disk_addr_t and grub_size_t, respectively.
7489         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
7491         * fs/jfs.c (grub_jfs_read_file): Likewise.
7493         * fs/minix.c (grub_jfs_read_file): Likewise.
7495         * fs/sfs.c (grub_jfs_read_file): Likewise.
7497         * fs/ufs.c (grub_jfs_read_file): Likewise.
7499         * fs/xfs.c (grub_jfs_read_file): Likewise.
7501         * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
7502         and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
7503         respectively.
7505         * fs/ext2.c (grub_ext2_read_block): When an error happens, set
7506         BLKNR to -1 instead of returning GRUB_ERRNO.
7507         (grub_ext2_read_file): Change the types of SECTOR and
7508         LEN to grub_disk_addr_t and grub_size_t, respectively.
7510         * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
7511         LEN to grub_disk_addr_t and grub_size_t, respectively.
7513         * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
7514         grub_file_read.
7516         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
7517         string. Do not cast SECTOR explicitly.
7519         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
7520         TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
7521         (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
7522         grub_disk_addr_t and grub_size_t, respectively. If the sector is
7523         over 2TB and LBA mode is not supported, raise an error.
7524         (get_safe_sectors): New function.
7525         (grub_biosdisk_read): Use get_safe_sectors.
7526         (grub_biosdisk_write): Likewise.
7528         * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
7529         (grub_efidisk_write): Likewise.
7531         * disk/loopback.c (delete_loopback): Cosmetic changes.
7532         (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
7533         correctly.
7534         (grub_loopback_open): Likewise.
7535         (grub_loopback_read): Likewise. Also, change the type of POS to
7536         grub_off_t, and fix the usage of grub_memset.
7538         * commands/i386/pc/play.c: Include grub/machine/time.h.
7540         * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
7541         print FILE->SIZE.
7543         * commands/configfile.c: Include grub/env.h.
7545         * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
7546         GRUB_ERRNO directly instead. Change the type of POS to
7547         grub_off_t. Follow the coding standard.
7549         * commands/blocklist.c: Include grub/partition.h.
7550         (grub_cmd_blocklist): Return an error if the underlying device is
7551         not a disk. Take the starting sector of a partition into account,
7552         if a partition is used.
7554         * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
7555         a length field.
7556         (lba_mode): Support 64-bit addresses.
7557         (chs_mode): Likewise.
7558         (copy_buffer): Adapted to the new offsets of a length field and a
7559         segment field.
7560         (blocklist_default_start): Allocate 64-bit space.
7562         * boot/i386/pc/boot.S (force_lba): Removed.
7563         (boot_drive): Moved to under KERNEL_SECTOR.
7564         (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
7565         space.
7566         (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
7567         is useless.
7568         (lba_mode): Refactored to support a 64-bit address. More size
7569         optimization.
7570         (setup_sectors): Likewise.
7572 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
7574         * DISTLIST: Added include/grub/i386/linux.h. Removed
7575         include/grub/i386/pc/linux.h
7577         * configure.ac (AC_INIT): Bumped to 1.94.
7579         * config.guess: Updated from gnulib.
7580         * config.sub: Likewise.
7581         * install-sh: Likewise.
7582         * mkinstalldirs: Likewise.
7584 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
7586         * conf/common.rmk (grub_modules_init.lst): Depended on
7587         grub_emu_SOURCES, excluding grub_emu_init.c, instead of
7588         MODSRCFILES.
7590         * genmk.rb (PModule::rule): Reverted the previous change.
7592 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
7594         * conf/common.rmk (grub_modules_init.lst): Depends on
7595         $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
7596         that the target does not exist before producing.
7597         (grub_modules_init.h): Remove the target before generating.
7598         (grub_emu_init.c): Likewise.
7600         * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
7602 2006-05-31  Jeroen Dekkers  <jeroen@dekkers.cx>
7604         * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
7605         for the target-specific tests. Make sure that we also have the
7606         up-to-date target variables for those tests.
7608 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
7610         * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
7611         (PModule::rule): Likewise.
7613 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
7615         * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
7616         TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
7617         target-specific flags should be prefixed.
7618         (PModule::rule): Likewise.
7620 2006-05-30  Yoshinori K. Okuji  <okuji@enbug.org>
7622         * configure.ac (CMP): Check if cmp is available explicitly.
7624 2006-05-29  Yoshinori K. Okuji  <okuji@enbug.org>
7626         * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
7627         (target_cpu): New variable.
7628         (pkglibdir): Use target_cpu instead of host_cpu.
7630         * util/i386/pc/grub-install.in (host_cpu): Removed.
7631         (target_cpu): New variable.
7632         (pkglibdir): Use target_cpu instead of host_cpu.
7634         * util/genmoddep.c: Removed.
7636         * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
7637         instead of GRUB_HOST_SIZEOF_VOID_P.
7638         * kern/dl.c: Likewise.
7640         * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
7641         ...
7642         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
7643         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
7644         (GRUB_TARGET_SIZEOF_LONG): ... this.
7645         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
7646         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
7647         * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
7648         to ...
7649         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
7650         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
7651         (GRUB_TARGET_SIZEOF_LONG): ... this.
7652         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
7653         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
7654         * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
7655         to ...
7656         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
7657         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
7658         (GRUB_TARGET_SIZEOF_LONG): ... this.
7659         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
7660         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
7662         * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
7663         GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
7664         [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
7665         instead of GRUB_HOST_SIZEOF_LONG.
7666         [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
7667         GRUB_HOST_WORDS_BIGENDIAN to define or undefine
7668         GRUB_CPU_WORDS_BIGENDIAN.
7669         Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
7670         define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
7671         grub_host_ssize_t.
7673         * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
7674         (genmoddep_SOURCES): Likewise.
7675         * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
7676         (genmoddep_SOURCES): Likewise.
7677         * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
7678         (genmoddep_SOURCES): Likewise.
7679         * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
7680         Likewise.
7681         (genmoddep_SOURCES): Likewise.
7683         * genmoddep.awk: New file.
7685         * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
7686         TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
7687         CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
7688         (PModule::rule): Likewise.
7689         (Program::rule): Likewise.
7690         (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
7691         BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
7692         respectively.
7694         * configure.ac: Rewritten intensively to use host and target
7695         instead of build and host, respectively.
7697         * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
7698         (host_cpu): Removed.
7699         (target_cpu): New variable.
7700         (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
7701         (BUILD_CC): Removed.
7702         (BUILD_CFLAGS): Likewise.
7703         (BUILD_CPPFLAGS): Likewise.
7704         (TARGET_CC): New variable.
7705         (TARGET_CFLAGS): Likewise.
7706         (TARGET_CPPFLAGS): Likewise.
7707         (TARGET_LDFLAGS): Likewise.
7708         (AWK): Likewise.
7709         (include): Use target_cpu instead of host_cpu.
7710         (moddep.lst:): Use genmoddep.awk instead of genmoddep.
7712         * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
7714 2006-05-29  Vesa Jaaskelainen  <chaac@nic.fi>
7716         * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
7717         'exec_to_evaluate'.  Renamed field 'true' to 'exec_on_true'.  Renamed
7718         field 'false' to 'exec_on_false'.
7719         (grub_script_create_cmdif): Renamed argument names to reflect above
7720         changes.
7722         * normal/execute.c (grub_script_execute_cmdif): Likewise.
7724         * normal/script.c (grub_script_create_cmdif): Likewise.
7726 2006-05-28  Yoshinori K. Okuji  <okuji@enbug.org>
7728         * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
7729         top.
7730         (grub_hfsplus_btree_recptr): Likewise.
7731         (grub_hfsplus_find_block): Do not take RETRY any longer. Use
7732         FILEBLOCK both to pass a block number and store next block
7733         number.
7734         (grub_hfsplus_read_block): Rewritten heavily to support an extent
7735         overflow file correctly. Specify errors appropriately, because
7736         fshelp expects that GRUB_ERRNO is set when fails. Reuse
7737         grub_hfsplus_btree_recptr to get the pointer to a found key.
7738         (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
7739         is found.
7741         * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
7742         linux.mod.
7743         (_linux_mod_SOURCES): New variable.
7744         (_linux_mod_CFLAGS): Likewise.
7745         (_linux_mod_LDFLAGS): Likewise.
7746         (linux_mod_SOURCES): Likewise.
7747         (linux_mod_CFLAGS): Likewise.
7748         (linux_mod_LDFLAGS): Likewise.
7750         * DISTLIST: Added loader/i386/efi/linux.c,
7751         loader/i386/efi/linux_normal.c and
7752         include/grub/i386/efi/loader.h.
7754         * loader/i386/efi/linux.c: New file.
7755         * loader/i386/efi/linux_normal.c: Likewise.
7756         * include/grub/i386/efi/loader.h: Likewise.
7758 2006-05-27  Yoshinori K. Okuji  <okuji@enbug.org>
7760         * commands/blocklist.c: New file.
7762         * DISTLIST: Added commands/blocklist.c.
7764         * term/efi/console.c (grub_console_highlight_color): Use a lighter
7765         color for the background, and a darker color for the foreground.
7766         (grub_console_checkkey): Return READ_KEY.
7767         (grub_console_cls): Set the background to
7768         GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
7770         * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
7772         * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
7773         the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
7775         * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
7776         prototype.
7778         * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
7779         BG. The spec is wrong again.
7781         * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
7782         prototype.
7783         [GRUB_UTIL] (grub_blocklist_fini): Likewise.
7785         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
7786         commands/blocklist.c.
7787         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7789         * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
7790         (blocklist_mod_SOURCES): New variable.
7791         (blocklist_mod_CFLAGS): Likewise.
7792         (blocklist_mod_LDFLAGS): Likewise.
7794 2006-05-20  Yoshinori K. Okuji  <okuji@enbug.org>
7796         * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
7797         duplication.
7798         (lba_mode): Use %eax more intensively to reduce the code size.
7800 2006-05-20  Marco Gerards  <marco@gnu.org>
7802         * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
7804         * normal/parser.y (commandblock): Defined as <cmd>.  A subroutine
7805         for `menuentry'.
7806         (script): Accept leading newlines.
7807         (newlines): New rule to describe 0 or more newlines.
7808         (commands): Accept `command' with trailing newline.  Fixed the
7809         order in which arguments were passed to `grub_script_add_cmd'.
7810         Accept commands separated by newlines.
7811         (function): Changed to accept newlines.
7812         (menuentry) Rewritten.
7814         * normal/script.c (grub_script_create_cmdmenu): Add new entries in
7815         front of the list, instead of to the end.
7817 2006-05-19  Yoshinori K. Okuji  <okuji@enbug.org>
7819         * util/i386/pc/grub-install.in (bindir): New variable.
7820         (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
7821         Shaver <lbgwjl@gmail.com>.
7823 2006-05-14  Yoshinori K. Okuji  <okuji@enbug.org>
7825         * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
7826         grub/machine/linux.h
7827         * loader/i386/pc/linux.c: Likewise.
7829         * include/grub/i386/pc/linux.h: Moved to ...
7830         * include/grub/i386/linux.h: ... here.
7832         * include/grub/i386/linux.h (struct linux_kernel_params): New
7833         struct.
7835 2006-05-09  Vesa Jaaskelainen  <chaac@nic.fi>
7837         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
7838         checking.
7839         (grub_video_vbe_blit_glyph): Likewise.
7840         (grub_video_vbe_blit_bitmap): Likewise.
7841         (grub_video_vbe_blit_render_target): Likewise.
7843 2006-05-09  Yoshinori K. Okuji  <okuji@enbug.org>
7845         * configure.ac (--with-platform): Properly quote the square
7846         brackets.
7848 2006-05-08  Marco Gerards  <marco@gnu.org>
7850         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
7851         this...
7852         (kernel_elf_HEADERS): ...to this.  Updated all users.
7853         (grubof_symlist.c): Renamed from this...
7854         (kernel_elf_symlist.c): ...to this.  Updated all users.
7855         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
7856         (grubof_SOURCES): Renamed from this...
7857         (kernel_elf_SOURCES): ...to this.
7858         (grubof_HEADERS): Renamed from this...
7859         (kernel_elf_HEADERS): ...to this.
7860         (grubof_CFLAGS): Renamed from this...
7861         (kernel_elf_CFLAGS): ...to this.
7862         (grubof_ASFLAGS): Renamed from this...
7863         (kernel_elf_ASFLAGS): ...to this.
7864         (grubof_LDFLAGS): Renamed from this...
7865         (kernel_elf_LDFLAGS): ...to this.
7867         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
7868         this...
7869         (kernel_elf_HEADERS): ...to this.  Updated all users.
7870         (grubof_symlist.c): Renamed from this...
7871         (kernel_elf_symlist.c): ...to this.  Updated all users.
7872         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
7873         (grubof_SOURCES): Renamed from this...
7874         (kernel_elf_SOURCES): ...to this.
7875         (grubof_HEADERS): Renamed from this...
7876         (kernel_elf_HEADERS): ...to this.
7877         (grubof_CFLAGS): Renamed from this...
7878         (kernel_elf_CFLAGS): ...to this.
7879         (grubof_ASFLAGS): Renamed from this...
7880         (kernel_elf_ASFLAGS): ...to this.
7881         (grubof_LDFLAGS): Renamed from this...
7882         (kernel_elf_LDFLAGS): ...to this.
7884         * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
7885         `kernel.elf' instead of `grubof'.
7887 2006-05-08  Yoshinori K. Okuji  <okuji@enbug.org>
7889         Add --with-platform to configure. Use pkglibdir instead of
7890         pkgdatadir. This is reported by Roger Leigh.
7892         * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
7893         (host_vendor): Likewise.
7894         (host_os): Likewise.
7895         (pkgdatadir): Likewise.
7896         (platform): New variable.
7897         (pkglibdir): Likewise.
7898         Use PKGLIBDIR instead of PKGDATADIR.
7900         * util/i386/pc/grub-install.in (datadir): Removed.
7901         (host_vendor): Likewise.
7902         (host_os): Likewise.
7903         (pkgdatadir): Likewise.
7904         (platform): New variable.
7905         (pkglibdir): Likewise.
7906         Use PKGLIBDIR instead of PKGDATADIR.
7908         * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
7909         instead of GRUB_DATADIR.
7910         (main): Likewise.
7911         * util/i386/pc/grub-mkimage.c (usage): Likewise.
7912         (main): Likewise.
7913         * util/i386/efi/grub-mkimage.c (usage): Likewise.
7914         (main): Likewise.
7916         * configure.ac (--with-platform): New option.
7917         Use PLATFORM instead of HOST_VENDOR to specify a platform.
7919         * Makefile.in: Include a makefile based on PLATFORM instead of
7920         HOST_VENDOR.
7921         (pkgdatadir): Not appended by the machine type.
7922         (pkglibdir): Appended by the machine type.
7923         (host_vendor): Removed.
7924         (platform): New variable.
7925         (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
7926         (install-local): Use PKGLIBDIR instead of PKGDATADIR.
7927         (uninstall): Likewise.
7929 2006-05-07  Yoshinori K. Okuji  <okuji@enbug.org>
7931         Use the environment context in the menu. Remove the commands
7932         "default" and "timeout", and use variables instead.
7934         * normal/menu.c: Include grub/env.h.
7935         (print_entry): Cast TITLE to silence gcc.
7936         (get_timeout): New function.
7937         (set_timeout): Likewise.
7938         (get_entry_number): Likewise.
7939         (run_menu): Use a default entry, a fallback entry and a timeout
7940         in the environment variables "default", "fallback" and
7941         "timeout". Also, tweak the default entry if it is not within the
7942         current menu entries.
7943         (grub_menu_run): Use a fallback entry in the environment variable
7944         "fallback".
7946         * normal/main.c (read_config_file): Do not initialize
7947         NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
7948         NEWMENU->TIMEOUT.
7949         (grub_normal_execute): Use a data slot to store the menu.
7951         * include/grub/normal.h (struct grub_menu): Removed default_entry,
7952         fallback_entry and timeout.
7953         (struct grub_menu_list): Removed.
7954         (grub_menu_list_t): Likewise.
7955         (struct grub_context): Likewise.
7956         (grub_context_t): Likewise.
7957         (grub_context_get): Likewise.
7958         (grub_context_get_current_menu): Likewise.
7959         (grub_context_push_menu): Likewise.
7960         (grub_context_pop_menu): Likewise.
7961         (grub_default_init): Likewise.
7962         (grub_default_fini): Likewise.
7963         (grub_timeout_init): Likewise.
7964         (grub_timeout_fini): Likewise.
7966         * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
7967         and timeout.mod.
7968         (normal_mod_SOURCES): Removed normal/context.c.
7970         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
7971         commands/default.c, commands/timeout.c and normal/context.c.
7972         (normal_mod_SOURCES): Removed normal/context.c.
7974         * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
7975         commands/timeout.c and normal/context.c.
7976         (normal_mod_SOURCES): Removed normal/context.c.
7978         * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
7979         commands/default.c, commands/timeout.c and normal/context.c.
7980         (normal_mod_SOURCES): Removed normal/context.c.
7982         * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
7983         timeout.mod.
7984         (default_mod_SOURCES): Removed.
7985         (default_mod_CFLAGS): Likewise.
7986         (default_mod_LDFLAGS): Likewise.
7987         (timeout_mod_SOURCES): Removed.
7988         (timeout_mod_CFLAGS): Likewise.
7989         (timeout_mod_LDFLAGS): Likewise.
7991         * DISTLIST: Removed commands/default.c, commands/timeout.c and
7992         normal/context.c.
7994         * commands/default.c: Removed.
7995         * commands/timeout.c: Likewise.
7996         * normal/context.c: Likewise.
7998 2006-05-07  Vesa Jaaskelainen  <chaac@nic.fi>
8000         * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
8002 2006-05-02  Yoshinori K. Okuji  <okuji@enbug.org>
8004         * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
8005         "next" to "prev" for readability.
8006         (struct grub_env_sorted_var): New struct.
8007         (grub_env_context): Renamed to ...
8008         (initial_context): ... this.
8009         (grub_env_var_context): Renamed to ...
8010         (current_context): ... this.
8011         (grub_env_find): Look only at CURRENT_CONTEXT.
8012         (grub_env_context_open): Rewritten to copy exported variables from
8013         previous context.
8014         (grub_env_context_close): Rewritten according to the new
8015         scheme. Also, add an assertion to prevent the initial context from
8016         removed.
8017         (grub_env_insert): Removed the code for the sorted list.
8018         (grub_env_remove): Likewise.
8019         (grub_env_export): Simply mark the variable with
8020         GRUB_ENV_VAR_GLOBAL.
8021         (grub_env_set): A cosmetic change for naming consistency.
8022         (grub_env_get): Likewise.
8023         (grub_env_unset): Likewise.
8024         (grub_env_iterate): Rewritten to sort variables within this
8025         function.
8026         (grub_register_variable_hook): Fixed for naming consistency. Call
8027         grub_env_find again, only if NAME is not found at the first time.
8028         (mangle_data_slot_name): New function.
8029         (grub_env_set_data_slot): Likewise.
8030         (grub_env_get_data_slot): Likewise.
8031         (grub_env_unset_data_slot): Likewise.
8033         * include/grub/env.h (grub_env_var_type): New enum.
8034         (GRUB_ENV_VAR_LOCAL): New constant.
8035         (GRUB_ENV_VAR_GLOBAL): Likewise.
8036         (GRUB_ENV_VAR_DATA): Likewise.
8037         (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
8038         "type".
8039         (grub_env_set): Replace VAR with NAME for consistency.
8040         (grub_register_variable_hook): Likewise.
8041         (grub_env_export): Specify the name of the argument.
8042         (grub_env_set_data_slot): New prototype.
8043         (grub_env_get_data_slot): Likewise.
8044         (grub_env_unset_data_slot): Likewise.
8046 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
8048         Extend the loader so that GRUB can accept a loader which comes
8049         back to GRUB when a loaded image exits. Also, this change adds
8050         support for a chainloader on EFI.
8052         * term/efi/console.c: Include grub/misc.h.
8053         (grub_console_checkkey): Display a scan code on the top for
8054         debugging. This will be removed once the EFI port gets stable.
8055         Correct the scan code mapping.
8057         * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
8058         allocate memory from larger regions, in order to reduce the number
8059         of allocated regions. Otherwise, the MacOSX loader panics.
8060         (filter_memory_map): Avoid less than 1MB for compatibility with
8061         other loaders.
8062         (add_memory_regions): Allocate from the tail of a region, if
8063         possible, to avoid allocating a region near to 1MB, for the MacOSX
8064         loader.
8066         * kern/efi/init.c (grub_efi_set_prefix): Specify
8067         GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
8069         * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
8070         argument IMAGE_HANDLE and specify it to get a loaded image.
8071         (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
8072         grub_efi_get_loaded_image.
8073         (grub_efi_get_filename): Divide the length by the size of
8074         grub_efi_char16_t.
8075         (grub_efi_get_device_path): New function.
8076         (grub_efi_print_device_path): Print End Device Path nodes. Divide
8077         the length by the size of grub_efi_char16_t for a file path device
8078         path node.
8080         * kern/loader.c (grub_loader_noreturn): New variable.
8081         (grub_loader_set): Accept a new argument NORETURN. Set
8082         GRUB_LOADER_NORETURN to NORETURN.
8083         All callers changed.
8084         (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
8085         grub_machine_fini.
8087         * include/grub/efi/efi.h (grub_efi_get_device_path): New
8088         prototype.
8089         (grub_efi_get_loaded_image): Take an argument to specify an image
8090         handle.
8092         * include/grub/loader.h (grub_loader_set): Added one more argument
8093         NORETURN.
8095         * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
8096         instead of grub_efi_open_protocol.
8097         (grub_efidisk_get_device_name): Likewise.
8098         (grub_efidisk_close): Print a newline.
8099         (grub_efidisk_get_device_handle): Fixed to use
8100         GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
8101         GRUB_EFI_DEVICE_PATH_TYPE.
8103         * disk/efi/efidisk.c (device_path_guid): Moved to ...
8104         * kern/efi/efi.c (device_path_guid): ... here.
8106         * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
8107         chain.mod.
8108         (kernel_mod_HEADERS): Added efi/disk.h.
8109         (_chain_mod_SOURCES): New variable.
8110         (_chain_mod_CFLAGS): Likewise.
8111         (_chain_mod_LDFLAGS): Likewise.
8112         (chain_mod_SOURCES): Likewise.
8113         (chain_mod_CFLAGS): Likewise.
8114         (chain_mod_LDFLAGS): Likewise.
8116         * DISTLIST: Added include/grub/efi/chainloader.h,
8117         loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
8119         * include/grub/efi/chainloader.h: New file.
8120         * loader/efi/chainloader.c: Likewise.
8121         * loader/efi/chainloader_normal.c: Likewise.
8123 2006-04-30  Marco Gerards  <marco@gnu.org>
8125         * commands/configfile.c (grub_cmd_source): New function.
8126         (GRUB_MOD_INIT): Register the commands `source' and `.'.
8127         (GRUB_MOD_FINI): De-register the commands `source' and `.'.
8129 2006-04-30  Marco Gerards  <marco@gnu.org>
8131         * normal/execute.c (grub_script_execute_cmd): Change the return
8132         type to `grub_err_t'.  Correctly return the error.
8133         (grub_script_execute_cmdline): In case a command line is not a
8134         command or a function, try to interpret it as an assignment.
8136 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
8138         * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
8139         (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
8140         skip a node whose name is obviously invalid as UTF-16,
8141         i.e. contains a NUL character. Stop the iteration when the last
8142         directory entry is found. Instead of using the return value of
8143         grub_hfsplus_btree_iterate_node, store the value in RET and use
8144         it, because the iterator can be stopped by the last directory
8145         entry.
8147 2006-04-30  Marco Gerards  <marco@gnu.org>
8149         * include/grub/env.h (grub_env_export): New prototype.  Reported
8150         by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
8152 2006-04-30  Marco Gerards  <marco@gnu.org>
8154         * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
8155         size of the extents in a catalog file record.
8157 2006-04-29  Marco Gerards  <marco@gnu.org>
8159         * commands/configfile.c (grub_cmd_configfile): Execute the
8160         configfile within its own context.
8162         * include/grub/env.h (grub_env_context_open): New prototype.
8163         (grub_env_context_close): Likewise.
8165         * kern/env.c (grub_env): Removed.
8166         (grub_env_sorted): Likewise.
8167         (grub_env_context): New variable.
8168         (grub_env_var_context): Likewise.
8169         (grub_env_find): Search both the active context and the global
8170         context.
8171         (grub_env_context_open): New function.
8172         (grub_env_context_close): Likewise.
8173         (grub_env_insert): Likewise.
8174         (grub_env_remove): Likewise.
8175         (grub_env_export): Likewise.
8176         (grub_env_set): Changed to use helper functions to avoid code
8177         duplication.
8178         (grub_env_iterate): Rewritten so both the current context and the
8179         global context are being used.
8181         * normal/command.c (export_command): New function.
8182         (grub_command_init): Register the `export' function.
8184 2006-04-26  Yoshinori K. Okuji  <okuji@enbug.org>
8186         * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
8187         explicitly to suppress gcc's warnings.
8188         * fs/fat.c (grub_fat_find_dir): Likewise.
8189         (grub_fat_label): Likewise.
8190         * fs/xfs.c (grub_xfs_read_inode): Likewise.
8191         (grub_xfs_mount): Likewise.
8192         (grub_xfs_label): Likewise.
8193         * fs/affs.c (grub_affs_mount): Likewise.
8194         (grub_affs_label): Likewise.
8195         (grub_affs_iterate_dir): Likewise.
8196         * fs/sfs.c (grub_sfs_mount): Likewise.
8197         (grub_sfs_iterate_dir): Likewise.
8198         * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
8199         * fs/hfs.c (grub_hfs_mount): Likewise.
8200         (grub_hfs_cmp_catkeys): Likewise.
8201         (grub_hfs_find_dir): Likewise.
8202         (grub_hfs_dir): Likewise.
8203         (grub_hfs_label): Likewise.
8204         * fs/jfs.c (grub_jfs_mount): Likewise.
8205         (grub_jfs_opendir): Likewise.
8206         (grub_jfs_getent): Likewise.
8207         (grub_jfs_lookup_symlink): Likewise.
8208         (grub_jfs_label): Likewise.
8209         * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
8210         (grub_hfsplus_iterate_dir): Likewise.
8211         (grub_hfsplus_btree_iterate_node): Made static.
8213         * util/grub-emu.c (prefix): New variable.
8214         (grub_machine_set_prefix): New function.
8215         (main): Do not set the environment variable "prefix" here. Only
8216         set PREFIX, which is used later by grub_machine_set_prefix.
8218         * include/grub/video.h: Do not include grub/symbol.h.
8219         (grub_video_register): Not exported. This symbol is not defined in
8220         the kernel.
8221         (grub_video_unregister): Likewise.
8222         (grub_video_iterate): Likewise.
8223         (grub_video_setup): Likewise.
8224         (grub_video_restore): Likewise.
8225         (grub_video_get_info): Likewise.
8226         (grub_video_get_blit_format): Likewise.
8227         (grub_video_set_palette): Likewise.
8228         (grub_video_get_palette): Likewise.
8229         (grub_video_set_viewport): Likewise.
8230         (grub_video_get_viewport): Likewise.
8231         (grub_video_map_color): Likewise.
8232         (grub_video_map_rgb): Likewise.
8233         (grub_video_map_rgba): Likewise.
8234         (grub_video_fill_rect): Likewise.
8235         (grub_video_blit_glyph): Likewise.
8236         (grub_video_blit_bitmap): Likewise.
8237         (grub_video_blit_render_target): Likewise.
8238         (grub_video_scroll): Likewise.
8239         (grub_video_swap_buffers): Likewise.
8240         (grub_video_create_render_target): Likewise.
8241         (grub_video_delete_render_target): Likewise.
8242         (grub_video_set_active_render_target): Likewise.
8244         * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
8245         Undefined.
8246         [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
8248         * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
8249         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
8250         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
8251         instead of $(srcdir)/genkernsyms.sh.
8253         * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
8254         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
8255         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
8256         instead of $(srcdir)/genkernsyms.sh.
8258         * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
8259         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
8260         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
8261         instead of $(srcdir)/genkernsyms.sh.
8263         * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
8264         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
8265         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
8266         instead of $(srcdir)/genkernsyms.sh.
8268         * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
8269         genkernsyms.sh.
8271         * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
8272         genkernsyms.sh.
8273         (gensymlist.sh): New target.
8274         (genkernsyms.sh): Likewise.
8276         * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
8277         genkernsyms.sh.in and gensymlist.sh.in.
8279         * genkernsyms.sh: Removed.
8280         * gensymlist.sh: Likewise.
8282         * genkernsyms.sh.in: New file.
8283         * gensymlist.sh.in: Likewise.
8285 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
8287         * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
8288         clobber "prefix", since we may have already set it manually.
8290 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
8292         * kern/misc.c (abort): New alias for grub_abort.
8294 2006-04-25  Yoshinori K. Okuji  <okuji@enbug.org>
8296         A new machine-specific function "grub_machine_set_prefix" is
8297         defined. This is called after loading modules, so that a prefix
8298         initialization can use modules. Also, this change adds an
8299         intensive debugging feature for the memory manager via the
8300         configure option "--enable-mm-debug".
8302         * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
8303         PART.LEN.
8305         * kern/sparc64/ieee1275/init.c (abort): Removed.
8306         (grub_stop): Likewise.
8307         (grub_exit): New function.
8308         (grub_set_prefix): Renamed to ...
8309         (grub_machine_set_prefix): ... this.
8310         (grub_machine_init): Do not call grub_set_prefix.
8312         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
8313         (grub_machine_set_prefix): ... this.
8314         (grub_machine_init): Do not call grub_set_prefix.
8316         * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
8317         (grub_machine_init): Do not set the prefix here.
8319         * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
8321         * kern/efi/init.c: Include grub/mm.h.
8322         (grub_efi_set_prefix): New function.
8324         * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
8325         (grub_efi_get_filename): New function.
8326         (grub_print_device_path): Renamed to ...
8327         (grub_efi_print_device_path): ... this.
8329         * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
8330         [MM_DEBUG] (grub_realloc): Likewise.
8331         [MM_DEBUG] (grub_free): Likewise.
8332         [MM_DEBUG] (grub_memalign): Likewise.
8333         [MM_DEBUG] (grub_mm_debug): New variable.
8334         [MM_DEBUG] (grub_debug_malloc): New function.
8335         [MM_DEBUG] (grub_debug_free): New function.
8336         [MM_DEBUG] (grub_debug_realloc): New function.
8337         [MM_DEBUG] (grub_debug_memalign): New function.
8339         * kern/misc.c (grub_abort): Print a newline to distinguish
8340         the message.
8342         * kern/main.c (grub_main): Call grub_machine_set_prefix and
8343         grub_set_root_dev after loading modules. This is necessary when
8344         setting a prefix depends on modules.
8346         * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
8347         (grub_efi_print_device_path): ... this.
8348         (grub_efi_get_filename): New prototype.
8349         (grub_efi_set_prefix): Likewise.
8351         * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
8352         and grub/disk.h.
8353         (grub_efidisk_get_device_handle): New prototype.
8354         (grub_efidisk_get_device_name): Likewise.
8356         * include/grub/mm.h: Include config.h.
8357         (MM_DEBUG): Removed.
8358         [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
8359         [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
8360         [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
8361         [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
8362         [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
8363         [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
8364         [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
8365         [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
8366         [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
8368         * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
8370         * disk/efi/efidisk.c: Include grub/partition.h.
8371         (iterate_child_devices): New function.
8372         (add_device): First, compare only last device path nodes, so that
8373         devices are sorted by the types.
8374         (grub_efidisk_get_device_handle): New function.
8375         (grub_efidisk_get_device_name): Likewise.
8377         * configure.ac (--enable-mm-debug): New option to enable the
8378         memory manager debugging feature. This makes the binary much
8379         bigger, so is disabled by default.
8381 2006-04-23  Yoshinori K. Okuji  <okuji@enbug.org>
8383         Use grub_abort instead of grub_stop, and grub_exit must be
8384         define in each architecture now. Also, this change adds support
8385         for EFI disks.
8387         * util/i386/pc/grub-probefs.c: Include grub/term.h.
8388         (grub_getkey): New function.
8389         (grub_term_get_current): Likewise.
8391         * util/i386/pc/grub-setup.c: Include grub/term.h.
8392         (grub_getkey): New function.
8393         (grub_term_get_current): Likewise.
8395         * util/misc.c (grub_stop): Renamed to ...
8396         (grub_exit): ... this.
8398         * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
8399         (grub_exit): ... this.
8400         (grub_machine_init): Use grub_abort instead of abort.
8401         (grub_stop): Removed.
8403         * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
8404         abort.
8406         * kern/i386/pc/startup.S (grub_exit): New function.
8407         (cold_reboot): New label.
8409         * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
8410         (grub_efi_init): Call grub_efidisk_init.
8411         (grub_efi_fini): Call grub_efidisk_fini.
8413         * kern/efi/efi.c: Include grub/mm.h.
8414         (grub_efi_console_control_guid): Renamed to ...
8415         (console_control_guid): ... this.
8416         (grub_efi_loaded_image_guid): Renamed to ...
8417         (loaded_image_guid): ... this.
8418         (grub_efi_locate_handle): New function.
8419         (grub_efi_open_protocol): Likewise.
8420         (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
8421         GRUB_EFI_CONSOLE_CONTROL_GUID.
8422         (grub_efi_exit): Removed.
8423         (grub_stop): Likewise.
8424         (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
8425         (grub_exit): New function.
8426         (grub_print_device_path): Likewise.
8428         * kern/rescue.c (grub_rescue_cmd_exit): New function.
8429         (grub_enter_rescue_mode): Register "exit".
8431         * kern/misc.c (grub_real_dprintf): A cosmetic change.
8432         (grub_abort): New function.
8434         * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
8436         * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
8438         * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
8440         * include/grub/efi/efi.h (grub_efi_exit): Removed.
8441         (grub_print_device_path): New prototype.
8442         (grub_efi_locate_handle): Likewise.
8443         (grub_efi_open_protocol): Likewise.
8445         * include/grub/efi/disk.h (grub_efidisk_fini): New file.
8446         * disk/efi/efidisk.c: Likewise.
8448         * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
8450         * include/grub/efi/console_control.h
8451         (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
8453         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
8454         last 8 bytes as an array.
8455         (GRUB_EFI_DISK_IO_GUID): New macro.
8456         (GRUB_EFI_BLOCK_IO_GUID): Likewise.
8457         (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
8458         (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
8459         grub_uint8_t.
8460         (struct grub_efi_guid): Use an array to specify the last 8 bytes.
8461         (struct grub_efi_device_path): Rename the member "sub_type" to
8462         "subtype".
8463         (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
8464         (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
8465         (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
8466         (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
8467         (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
8468         (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
8469         (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
8470         (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
8471         (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
8472         (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
8473         (struct grub_efi_pci_device_path): New structure.
8474         (grub_efi_pci_device_path_t): New type.
8475         (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
8476         (struct grub_efi_pccard_device_path): New structure.
8477         (grub_efi_pccard_device_path_t): New type.
8478         (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
8479         (struct grub_efi_memory_mapped_device_path): New structure.
8480         (grub_efi_memory_mapped_device_path_t): New type.
8481         (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
8482         (struct grub_efi_vendor_device_path): New structure.
8483         (grub_efi_vendor_device_path_t): New type.
8484         (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
8485         (struct grub_efi_controller_device_path): New structure.
8486         (grub_efi_controller_device_path_t): New type.
8487         (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
8488         (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
8489         (struct grub_efi_acpi_device_path): New structure.
8490         (grub_efi_acpi_device_path_t): New type.
8491         (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
8492         (struct grub_efi_expanded_acpi_device_path): New structure.
8493         (grub_efi_expanded_acpi_device_path_t): New type.
8494         (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
8495         (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
8496         (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
8497         (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
8498         (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
8499         (struct grub_efi_atapi_device_path): New structure.
8500         (grub_efi_atapi_device_path_t): New type.
8501         (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
8502         (struct grub_efi_fibre_channel_device_path): New structure.
8503         (grub_efi_fibre_channel_device_path_t): New type.
8504         (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
8505         (struct grub_efi_1394_device_path): New structure.
8506         (grub_efi_1394_device_path_t): New type.
8507         (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
8508         (struct grub_efi_usb_device_path): New structure.
8509         (grub_efi_usb_device_path_t): New type.
8510         (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
8511         (struct grub_efi_usb_class_device_path): New structure.
8512         (grub_efi_usb_class_device_path_t): New type.
8513         (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
8514         (struct grub_efi_i2o_device_path): New structure.
8515         (grub_efi_i2o_device_path_t): New type.
8516         (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
8517         (struct grub_efi_mac_address_device_path): New structure.
8518         (grub_efi_mac_address_device_path_t): New type.
8519         (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
8520         (struct grub_efi_ipv4_device_path): New structure.
8521         (grub_efi_ipv4_device_path_t): New type.
8522         (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
8523         (struct grub_efi_ipv6_device_path): New structure.
8524         (grub_efi_ipv6_device_path_t): New type.
8525         (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
8526         (struct grub_efi_infiniband_device_path): New structure.
8527         (grub_efi_infiniband_device_path_t): New type.
8528         (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
8529         (struct grub_efi_uart_device_path): New structure.
8530         (grub_efi_uart_device_path_t): New type.
8531         (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
8532         (struct grub_efi_vendor_messaging_device_path): New structure.
8533         (grub_efi_vendor_messaging_device_path_t): New type.
8534         (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
8535         (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
8536         (struct grub_efi_hard_drive_device_path): New structure.
8537         (grub_efi_hard_drive_device_path_t): New type.
8538         (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
8539         (struct grub_efi_cdrom_device_path): New structure.
8540         (grub_efi_cdrom_device_path_t): New type.
8541         (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
8542         (struct grub_efi_vendor_media_device_path): New structure.
8543         (grub_efi_vendor_media_device_path_t): New type.
8544         (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
8545         (struct grub_efi_file_path_device_path): New structure.
8546         (grub_efi_file_path_device_path_t): New type.
8547         (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
8548         (struct grub_efi_protocol_device_path): New structure.
8549         (grub_efi_protocol_device_path_t): New type.
8550         (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
8551         (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
8552         (struct grub_efi_bios_device_path): New structure.
8553         (grub_efi_bios_device_path_t): New type.
8554         (struct grub_efi_disk_io): New structure.
8555         (grub_efi_disk_io_t): New type.
8556         (struct grub_efi_block_io_media): New structure.
8557         (grub_efi_block_io_media_t): New type.
8558         (struct grub_efi_block_io): New structure.
8559         (grub_efi_block_io_t): New type.
8561         * include/grub/misc.h (grub_stop): Removed.
8562         (grub_exit): New prototype.
8563         (grub_abort): Likewise.
8565         * include/grub/disk.h (enum grub_disk_dev_id): Added
8566         GRUB_DISK_DEVICE_EFIDISK_ID.
8568         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
8569         disk/efi/efidisk.c.
8570         (kernel_syms.lst): Remove the target if an error occurs.
8572 2006-04-22  Yoshinori K. Okuji  <okuji@enbug.org>
8574         * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
8575         as it was simply too buggy.
8577 2006-04-21  Yoshinori K. Okuji  <okuji@enbug.org>
8579         * kern/misc.c (grub_lltoa): New function.
8580         (grub_vsprintf): Added support for the long long suffix,
8581         i.e. "ll".
8583 2006-04-20  Hollis Blanchard  <hollis@penguinppc.org>
8585         * Makefile.in (LDFLAGS): Add variable.
8586         (LD): Remove variable.
8587         * configure.ac: Add -m32 to LDFLAGS.
8588         * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
8589         * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
8590         (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
8591         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
8592         suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
8593         variables.
8594         * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
8595         * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
8596         * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
8598 2006-04-20  Vesa Jaaskelainen  <chaac@nic.fi>
8600         * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
8601         length for unknown glyph.
8603 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
8605         Add support for pre-loaded modules into the EFI port.
8607         * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
8608         completely. Accept one more argument DIR. The caller has changed.
8610         * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
8612         * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
8613         (grub_efi_loaded_image_guid): New variable.
8614         (grub_efi_get_loaded_image): New function.
8615         (grub_arch_modules_addr): Likewise.
8617         * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
8618         prototype.
8620         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
8621         (struct grub_efi_loaded_image): New structure.
8622         (grub_efi_loaded_image_t): New type.
8624 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
8626         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
8627         size with GRUB_OS_AREA_SIZE as grub_size_t instead of
8628         grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
8630 2006-04-19  Roger Leigh  <rleigh@whinlatter.ukfsn.org>
8632         * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
8634 2006-04-19  Yoshinori K. Okuji  <okuji@enbug.org>
8636         * DISTLIST: Added include/grub/efi/console.h,
8637         include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
8638         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
8640         * include/grub/efi/console.h: New file.
8641         * include/grub/efi/time.h: Likewise.
8642         * include/grub/i386/efi/kernel.h: Likewise.
8643         * kern/efi/init.c: Likewise.
8644         * kern/efi/mm.c: Likewise.
8645         * term/efi/console.c: Likewise.
8647         * kern/i386/efi/init.c: Do not include grub/machine/time.h.
8648         (grub_stop): Removed.
8649         (grub_get_rtc): Likewise.
8650         (grub_machine_init): Simply call grub_efi_init.
8651         (grub_machine_fini): Call grub_efi_fini.
8653         * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
8654         (grub_efi_output_string): Removed.
8655         (grub_efi_stall): New function.
8656         (grub_stop): Likewise.
8657         (grub_get_rtc): Likewise.
8659         * include/grub/efi/efi.h (grub_efi_output_string): Removed.
8660         (grub_efi_stall): New prototype.
8661         (grub_efi_allocate_pages): Likewise.
8662         (grub_efi_free_pages): Likewise.
8663         (grub_efi_get_memory_map): Likewise.
8664         (grub_efi_mm_init): Likewise.
8665         (grub_efi_mm_fini): Likewise.
8666         (grub_efi_init): Likewise.
8667         (grub_efi_fini): Likewise.
8669         * include/grub/i386/efi/time.h: Do not include
8670         grub/symbol.h. Include grub/efi/time.h.
8671         (GRUB_TICKS_PER_SECOND): Removed.
8672         (grub_get_rtc): Likewise.
8674         * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
8675         Added padding. The EFI spec is buggy.
8676         (GRUB_EFI_BLACK): New macro.
8677         (GRUB_EFI_BLUE): Likewise.
8678         (GRUB_EFI_GREEN): Likewise.
8679         (GRUB_EFI_CYAN): Likewise.
8680         (GRUB_EFI_RED): Likewise.
8681         (GRUB_EFI_MAGENTA): Likewise.
8682         (GRUB_EFI_BROWN): Likewise.
8683         (GRUB_EFI_LIGHTGRAY): Likewise.
8684         (GRUB_EFI_BRIGHT): Likewise.
8685         (GRUB_EFI_DARKGRAY): Likewise.
8686         (GRUB_EFI_LIGHTBLUE): Likewise.
8687         (GRUB_EFI_LIGHTGREEN): Likewise.
8688         (GRUB_EFI_LIGHTCYAN): Likewise.
8689         (GRUB_EFI_LIGHTRED): Likewise.
8690         (GRUB_EFI_LIGHTMAGENTA): Likewise.
8691         (GRUB_EFI_YELLOW): Likewise.
8692         (GRUB_EFI_WHITE): Likewise.
8693         (GRUB_EFI_BACKGROUND_BLACK): Likewise.
8694         (GRUB_EFI_BACKGROUND_BLUE): Likewise.
8695         (GRUB_EFI_BACKGROUND_GREEN): Likewise.
8696         (GRUB_EFI_BACKGROUND_CYAN): Likewise.
8697         (GRUB_EFI_BACKGROUND_RED): Likewise.
8698         (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
8699         (GRUB_EFI_BACKGROUND_BROWN): Likewise.
8700         (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
8701         (GRUB_EFI_TEXT_ATTR): Likewise.
8703         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
8704         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
8705         (kernel_mod_HEADERS): Added efi/time.h.
8707 2006-04-18  Yoshinori K. Okuji  <okuji@enbug.org>
8709         * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
8710         include/grub/efi/api.h, include/grub/efi/console_control.h,
8711         include/grub/efi/efi.h, include/grub/efi/pe32.h,
8712         include/grub/i386/efi/time.h, kern/efi/efi.c,
8713         kern/i386/efi/init.c, kern/i386/efi/startup.S,
8714         and util/i386/efi/grub-mkimage.c.
8716         * Makefile.in (RMKFILES): Added i386-efi.rmk.
8718         * genmk.rb (PModule#rule): Do not export symbols if
8719         #{prefix}_EXPORTS is set to "no".
8721         * conf/i386-efi.mk: New file.
8722         * conf/i386-efi.rmk: Likewise.
8723         * include/grub/efi/api.h: Likewise.
8724         * include/grub/efi/console_control.h: Likewise.
8725         * include/grub/efi/efi.h: Likewise.
8726         * include/grub/efi/pe32.h: Likewise.
8727         * include/grub/i386/efi/time.h: Likewise.
8728         * kern/efi/efi.c: Likewise.
8729         * kern/i386/efi/init.c: Likewise.
8730         * kern/i386/efi/startup.S: Likewise.
8731         * util/i386/efi/grub-mkimage.c: Likewise.
8733 2006-04-17  Marco Gerards  <marco@gnu.org>
8735         * include/grub/script.h: Include <grub/parser.h> and
8736         "grub_script.tab.h".
8737         (struct grub_lexer_param): New struct.
8738         (struct grub_parser_param): Likewise.
8739         (grub_script_create_arglist): Pass the state in an argument.
8740         (grub_script_add_arglist): Likewise.
8741         (grub_script_create_cmdline): Likewise.
8742         (grub_script_create_cmdblock): Likewise.
8743         (grub_script_create_cmdif): Likewise.
8744         (grub_script_create_cmdmenu): Likewise.
8745         (grub_script_add_cmd): Likewise.
8746         (grub_script_arg_add): Likewise.
8747         (grub_script_lexer_ref): Likewise.
8748         (grub_script_lexer_deref): Likewise.
8749         (grub_script_lexer_record_start): Likewise.
8750         (grub_script_lexer_record_stop): Likewise.
8751         (grub_script_mem_record): Likewise.
8752         (grub_script_mem_record_stop): Likewise.
8753         (grub_script_malloc): Likewise.
8754         (grub_script_yylex): Likewise.
8755         (grub_script_yyparse): Likewise.
8756         (grub_script_yyerror): Likewise.
8757         (grub_script_yylex): Likewise.
8758         (grub_script_lexer_init): Return the state.
8760         * normal/lexer.c (grub_script_lexer_state): Removed variable.
8761         (grub_script_lexer_done): Likewise.
8762         (grub_script_lexer_getline): Likewise.
8763         (grub_script_lexer_refs): Likewise.
8764         (script): Likewise.
8765         (newscript): Likewise.
8766         (record): Likewise.
8767         (recording): Likewise.
8768         (recordpos): Likewise.
8769         (recordlen): Likewise.
8770         (grub_script_lexer_init): Return the state instead of setting
8771         global variables.
8772         (grub_script_lexer_ref): Use the newly added argument for state
8773         instead of globals.
8774         (grub_script_lexer_deref): Likewise.
8775         (grub_script_lexer_record_start): Likewise.
8776         (grub_script_lexer_record_stop): Likewise.
8777         (recordchar): Likewise.
8778         (nextchar): Likewise.
8779         (grub_script_yylex2): Likewise.
8780         (grub_script_yylex): Likewise.
8781         (grub_script_yyerror): Likewise.
8783         * normal/parser.y (func_mem): Removed variable.
8784         (menu_entry): Likewise.
8785         (err): Likewise.
8786         (%lex-param): New parser option.
8787         (%parse-param): Likewise.
8788         (script): Always return the AST.
8789         (argument): Pass the state around.
8790         (arguments): Likewise.
8791         (grubcmd): Likewise.
8792         (commands): Likewise.
8793         (function): Likewise.
8794         (menuentry): Likewise.
8795         (if_statement): Likewise.
8796         (if): Likewise.
8798         * normal/script.c (grub_script_memused): Removed variable.
8799         (grub_script_parsed): Likewise.
8800         (grub_script_malloc): Added a state argument.  Use that instead of
8801         global variables.
8802         (grub_script_mem_record): Likewise.
8803         (grub_script_mem_record_stop): Likewise.
8804         (grub_script_arg_add): Likewise.
8805         (grub_script_add_arglist): Likewise.
8806         (grub_script_create_cmdline): Likewise.
8807         (grub_script_create_cmdif): Likewise.
8808         (grub_script_create_cmdmenu): Likewise.
8809         (grub_script_add_cmd): Likewise.
8810         (grub_script_parse): Setup the state before calling the parser.
8812 2006-04-16  Marco Gerards  <marco@gnu.org>
8814         * normal/command.c (grub_command_init): Remove the title command.
8816         * normal/lexer.c (grub_script_yylex): Renamed from this...
8817         (grub_script_yylex2): ... to this.
8818         (grub_script_yylex): New function.  Temporary
8819         introduced to filter some tokens.
8820         (grub_script_yyerror): Print a newline.
8822         * normal/main.c (read_config_file): Output information about the
8823         lines that contain errors.  Wait for a key after all lines have
8824         been processed.  Don't return an empty menu.
8826         * normal/parser.y (func_mem): Don't initialize.
8827         (menu_entry): Likewise.
8828         (err): New variable.
8829         (script): Don't return anything when an error was encountered.
8830         (ws, returns): Removed rules.
8831         (argument): Disabled concatenated variable support.
8832         (arguments): Remove explicit separators.
8833         (grubcmd): Likewise.
8834         (function): Likewise.
8835         (menuentry): Likewise.
8836         (if): Likewise.
8837         (commands): Likewise.  Add error handling.
8839         * normal/script.c (grub_script_create_cmdline): If
8840         `grub_script_parsed' is 0, assume the parser encountered an error.
8842 2006-04-02  Yoshinori K. Okuji  <okuji@enbug.org>
8844         * configure.ac: Add support for EFI. Fix the typo
8845         BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
8847 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
8849         * util/unifont2pff.rb: Removed unnecessary byte ordering.  Now
8850         foreign multibyte characters should be shown correctly.
8852 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
8854         * normal/main.c (grub_normal_menu_addentry): Fixed menu size
8855         calculation.
8856         (read_config_file): Made it to close file before returning.
8858 2006-03-31  Vesa Jaaskelainen  <chaac@nic.fi>
8860         * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
8861         include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
8862         video/i386/pc/vbefill.c.
8864         * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
8865         video/i386/pc/vbefill.c.
8867         * include/grub/video.h (grub_video_blit_format): New enum.
8868         (grub_video_mode_info): Added new member blit_format.
8869         (grub_video_get_blit_format): New function prototype.
8871         * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
8872         function prototype.
8873         (grub_video_vbe_map_rgb): Likewise.
8874         (grub_video_vbe_unmap_color): Likewise.
8876         * include/grub/i386/pc/vbeblit.h: New file.
8878         * include/grub/i386/pc/vbefill.h: New file.
8880         * video/video.c (grub_video_get_blit_format): New function.
8881         (grub_video_vbe_get_video_ptr): Re-declared as non-static.
8882         (grub_video_vbe_map_rgb): Likewise.
8883         (grub_video_vbe_unmap_color): Likewise.
8885         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
8886         optimized fills.
8887         (grub_video_vbe_blit_render_target): Changed to use more optimized
8888         blits.
8889         (grub_video_vbe_setup): Added detection for optimized settings.
8890         (grub_video_vbe_create_render_target): Likewise.
8892         * video/i386/pc/vbeblit.c: New file.
8894         * video/i386/pc/vbefill.c: New file.
8896 2006-03-30  Vesa Jaaskelainen  <chaac@nic.fi>
8898         * font/manager.c (grub_font_get_glyph): Removed font fixup from
8899         here...
8901         * util/unifont2pff.rb: ... and moved it to here.  Improved argument
8902         parsing to support both hex and dec ranges.  If filename was missing
8903         show usage information.
8905 2006-03-14  Vesa Jaaskelainen  <chaac@nic.fi>
8907         * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
8908         video/video.c, commands/videotest.c.  Removed term/i386/pc/vesafb.c.
8910         * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
8911         gfxterm.mod, videotest.mod.  Removed vga.mod, vesafb.mod.
8912         (video_mod_SOURCES): Added.
8913         (video_mod_CFLAGS): Likewise.
8914         (video_mod_LDFLAGS): Likewise.
8915         (gfxterm_mod_SOURCES): Likewise.
8916         (gfxterm_mod_CFLAGS): Likewise.
8917         (gfxterm_mod_LDFLAGS): Likewise.
8918         (videotest_mod_SOURCES): Likewise.
8919         (videotest_mod_CFLAGS): Likewise.
8920         (videotest_mod_LDFLAGS): Likewise.
8921         (vesafb_mod_SOURCES): Removed.
8922         (vesafb_mod_CFLAGS): Likewise.
8923         (vesafb_mod_LDFLAGS): Likewise.
8924         (vga_mod_SOURCES): Likewise.
8925         (vga_mod_CFLAGS): Likewise.
8926         (vga_mod_LDFLAGS): Likewise.
8928         * commands/videotest.c: New file.
8930         * font/manager.c (fill_with_default_glyph): Modified to use
8931         grub_font_glyph.
8932         (grub_font_get_glyph): Likewise.
8933         (fontmanager): Renamed from this...
8934         (font_manager): ... to this.
8936         * include/grub/font.h (grub_font_glyph): Added new structure.
8937         (grub_font_get_glyph): Modified to use grub_font_glyph.
8939         * include/grub/misc.h (grub_abs): Added as inline function.
8941         * include/grub/video.h: New file.
8943         * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
8944         (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
8945         (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
8946         (grub_vbe_get_controller_info): Renamed from this...
8947         (grub_vbe_bios_get_controller_info): ... to this.
8948         (grub_vbe_get_mode_info): Renamed from this...
8949         (grub_vbe_bios_get_mode_info): ... to this.
8950         (grub_vbe_set_mode): Renamed from this...
8951         (grub_vbe_bios_set_mode): ... to this.
8952         (grub_vbe_get_mode): Renamed from this...
8953         (grub_vbe_bios_get_mode): ... to this.
8954         (grub_vbe_set_memory_window): Renamed from this...
8955         (grub_vbe_bios_set_memory_window): ... to this.
8956         (grub_vbe_get_memory_window): Renamed from this...
8957         (grub_vbe_bios_get_memory_window): ... to this.
8958         (grub_vbe_set_scanline_length): Renamed from this...
8959         (grub_vbe_set_scanline_length): ... to this.
8960         (grub_vbe_get_scanline_length): Renamed from this...
8961         (grub_vbe_bios_get_scanline_length): ... to this.
8962         (grub_vbe_set_display_start): Renamed from this...
8963         (grub_vbe_bios_set_display_start): ... to this.
8964         (grub_vbe_get_display_start): Renamed from this...
8965         (grub_vbe_bios_get_display_start): ... to this.
8966         (grub_vbe_set_palette_data): Renamed from this...
8967         (grub_vbe_bios_set_palette_data): ... to this.
8968         (grub_vbe_set_pixel_rgb): Removed.
8969         (grub_vbe_set_pixel_index): Likewise.
8971         * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
8972         from this...
8973         (grub_vbe_bios_get_controller_info): ... to this.
8974         (grub_vbe_get_mode_info): Renamed from this...
8975         (grub_vbe_bios_get_mode_info): ... to this.
8976         (grub_vbe_set_mode): Renamed from this...
8977         (grub_vbe_bios_set_mode): ... to this.
8978         (grub_vbe_get_mode): Renamed from this...
8979         (grub_vbe_bios_get_mode): ... to this.
8980         (grub_vbe_set_memory_window): Renamed from this...
8981         (grub_vbe_bios_set_memory_window): ... to this.
8982         (grub_vbe_get_memory_window): Renamed from this...
8983         (grub_vbe_bios_get_memory_window): ... to this.
8984         (grub_vbe_set_scanline_length): Renamed from this...
8985         (grub_vbe_set_scanline_length): ... to this.
8986         (grub_vbe_get_scanline_length): Renamed from this...
8987         (grub_vbe_bios_get_scanline_length): ... to this.
8988         (grub_vbe_set_display_start): Renamed from this...
8989         (grub_vbe_bios_set_display_start): ... to this.
8990         (grub_vbe_get_display_start): Renamed from this...
8991         (grub_vbe_bios_get_display_start): ... to this.
8992         (grub_vbe_set_palette_data): Renamed from this...
8993         (grub_vbe_bios_set_palette_data): ... to this.
8994         (grub_vbe_bios_get_controller_info): Fixed problem with registers
8995         getting corrupted after calling it.  Added more pushes and pops.
8996         (grub_vbe_bios_set_mode): Likewise.
8997         (grub_vbe_bios_get_mode): Likewise.
8998         (grub_vbe_bios_get_memory_window): Likewise.
8999         (grub_vbe_bios_set_scanline_length): Likewise.
9000         (grub_vbe_bios_get_scanline_length): Likewise.
9001         (grub_vbe_bios_get_display_start): Likewise.
9002         (grub_vbe_bios_set_palette_data): Likewise.
9004         * normal/cmdline.c (cl_set_pos): Refresh the screen.
9005         (cl_insert): Likewise.
9006         (cl_delete): Likewise.
9008         * term/gfxterm.c: New file.
9010         * term/i386/pc/vesafb.c: Removed file.
9012         * video/video.c: New file.
9014         * video/i386/pc/vbe.c (real2pm): Added new function.
9015         (grub_video_vbe_draw_pixel): Likewise.
9016         (grub_video_vbe_get_video_ptr): Likewise.
9017         (grub_video_vbe_get_pixel): Likewise
9018         (grub_video_vbe_init): Likewise.
9019         (grub_video_vbe_fini): Likewise.
9020         (grub_video_vbe_setup): Likewise.
9021         (grub_video_vbe_get_info): Likewise.
9022         (grub_video_vbe_set_palette): Likewise.
9023         (grub_video_vbe_get_palette): Likewise.
9024         (grub_video_vbe_set_viewport): Likewise.
9025         (grub_video_vbe_get_viewport): Likewise.
9026         (grub_video_vbe_map_color): Likewise.
9027         (grub_video_vbe_map_rgb): Likewise.
9028         (grub_video_vbe_map_rgba): Likewise.
9029         (grub_video_vbe_unmap_color): Likewise.
9030         (grub_video_vbe_fill_rect): Likewise.
9031         (grub_video_vbe_blit_glyph): Likewise.
9032         (grub_video_vbe_blit_bitmap): Likewise.
9033         (grub_video_vbe_blit_render_target): Likewise.
9034         (grub_video_vbe_scroll): Likewise.
9035         (grub_video_vbe_swap_buffers): Likewise.
9036         (grub_video_vbe_create_render_target): Likewise.
9037         (grub_video_vbe_delete_render_target): Likewise.
9038         (grub_video_vbe_set_active_render_target): Likewise.
9039         (grub_vbe_set_pixel_rgb): Remove function.
9040         (grub_vbe_set_pixel_index): Likewise.
9041         (index_color_mode): Remove static variable.
9042         (active_mode): Likewise.
9043         (framebuffer): Likewise.
9044         (bytes_per_scan_line): Likewise.
9045         (grub_video_vbe_adapter): Added new static variable.
9046         (framebuffer): Likewise.
9047         (render_target): Likewise.
9048         (initial_mode): Likewise.
9049         (mode_in_use): Likewise.
9050         (mode_list): Likewise.
9052 2006-03-10  Marco Gerards  <marco@gnu.org>
9054         * configure.ac (AC_INIT): Bumped to 1.93.
9056         * DISTLIST: Added `include/grub/hfs.h'.
9058 2006-02-01  Yoshinori K. Okuji  <okuji@enbug.org>
9060         * boot/i386/pc/boot.S (general_error): Before looping, try INT
9061         18H, which might help the BIOS falling back to next boot media.
9063 2006-01-25  Yoshinori K. Okuji  <okuji@enbug.org>
9065         * util/i386/pc/grub-install.in: Escape a backslash. Reported by
9066         Poe Chen <poe.poechen@gmail.com>.
9068 2006-01-17  Marco Gerards  <marco@gnu.org>
9070         * include/grub/normal.h: Include <grub/script.h>.
9071         (grub_command_list): Removed struct.
9072         (grub_command_list_t): Removed type.
9073         (grub_menu_entry): Remove members `num' and `command_list'.  Add
9074         members `commands' and `sourcecode'.
9075         * include/grub/script.h: Add inclusion guards.
9076         (grub_script_cmd_menuentry): New struct.
9077         (grub_script_execute_menuentry): New prototype.
9078         (grub_script_lexer_record_start): Likewise.
9079         (grub_script_lexer_record_stop): Likewise.
9080         * normal/execute.c (grub_script_execute_menuentry): New function.
9081         * normal/lexer.c (record, recording, recordpos, recordlen): New
9082         variables.
9083         (grub_script_lexer_record_start): New function.
9084         (grub_script_lexer_record_stop): Likewise.
9085         (recordchar): Likewise.
9086         (nextchar): Likewise.
9087         (grub_script_yylex): Use `nextchar' to fetch new characters.  Use
9088         2048 as the buffer size.  Add the tokens `menuentry' and `@'.
9089         * normal/main.c: Include <grub/parser.h> and <grub/script.h>
9090         (current_menu): New variable.
9091         (free_menu): Mainly rewritten.
9092         (grub_normal_menu_addentry): New function.
9093         (read_config_file): Rewritten.
9094         * normal/menu.c (run_menu_entry): Mainly rewritten.
9095         * normal/menu_entry.c (make_screen): Rewritten the code to insert
9096         the menu entry.
9097         (run): Mainly rewritten.
9098         * normal/parser.y (menu_entry): New variable.
9099         (GRUB_PARSER_TOKEN_MENUENTRY): New token.
9100         (menuentry): New rule.
9101         (command): Add `menuentry'.
9102         (if_statement): Allow additional returns before `fi'.
9103         * normal/script.c (grub_script_create_cmdmenu): New function.
9105 2006-01-03  Marco Gerards  <marco@gnu.org>
9107         * INSTALL: GNU Bison is required.
9108         * configure.ac: Rewritten the test to detect Bison.
9109         * Makefile.in (YACC): New variable.  Reported by Xun Sun
9110         <xun.sun.cn@gmail.com>.
9112 2006-01-03  Marco Gerards  <marco@gnu.org>
9114         * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
9115         the HFS+ filesystem to filesystem blocks.
9116         (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
9117         GCC warning is silenced.
9119 2006-01-03  Marco Gerards  <marco@gnu.org>
9121         * partmap/apple.c (apple_partition_map_iterate): Convert the data
9122         read from disk from big endian to host byte order.
9124 2006-01-03  Hollis Blanchard  <hollis@penguinppc.org>
9126         * fs/hfs.c: Include <grub/hfs.h>.  Added reference to the official
9127         documentation.
9128         (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
9129         (grub_hfs_mount): Grammar fix in error. Make sure this is not an
9130         embedded HFS+ filesystem.
9131         (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
9132         (grub_hfs_sblock): Move from here...
9133         * include/grub/hfs.h: To here...  New file.
9134         * fs/hfsplus.c: Include <grub/hfs.h>.  Added reference to the official
9135         documentation.
9136         (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
9137         New macros.
9138         (grub_hfsplus_volheader): Change type of member `magic' to
9139         `grub_uint16_t'.
9140         (grub_hfsplus_data): Add new member `embedded_offset'.
9141         (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
9142         returned block.
9143         (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
9144         Calculate the offset.
9146 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
9148         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
9149         Removed.
9150         (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
9152 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
9154         * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
9155         ENV->NAME is NULL after allocating ENV->VALUE.
9157 2005-12-25  Marco Gerards  <marco@gnu.org>
9159         * kern/env.c (grub_env_set): Rewritten the error handling code.
9161 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
9163         * geninit.sh: Made more robust, and more portable.
9165 2005-12-25  Marco Gerards  <marco@gnu.org>
9167         Add support for Apple HFS+ filesystems.
9169         * fs/hfsplus.c: New file.
9171         * DISTLIST: Added `fs/hfsplus.c'.
9173         * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
9174         (hfsplus_mod_SOURCES): New variable.
9175         (hfsplus_mod_CFLAGS): Likewise.
9176         (hfsplus_mod_LDFLAGS): Likewise.
9177         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
9178         (grub_setup_SOURCES): Likewise.
9179         (grub_mkdevicemap_SOURCES): Likewise.
9180         (grub_emu_SOURCES): Likewise.
9181         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9183         * fs/fshelp.c (grub_fshelp_log2blksize): New function.
9185         * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
9187 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
9189         * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
9190         commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
9191         include/grub/parser.h, include/grub/script.h, kern/parser.c,
9192         kern/sparc64/cache.S, normal/execute.c, normal/function.c,
9193         normal/lexer.c, normal/parser.y, normal/script.c, and
9194         partmap/gpt.c.
9195         Removed kern/sparc64/cache.c.
9197         * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
9198         grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
9199         grub_emu_init.c.
9201         * configure.ac (AC_INIT): Bumped to 1.92.
9203 2005-12-24  Vesa Jaaskelainen  <chaac@nic.fi>
9205         * kern/err.c (grub_error_push): Added new function to support error
9206         stacks.
9207         (grub_error_pop): Likewise.
9208         (grub_error_stack_items): New local variable to support error stacks.
9209         (grub_error_stack_pos): Likewise.
9210         (grub_error_stack_assert): Likewise.
9211         (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
9212         stack depth.
9213         (grub_print_error): Added support to print errors from error stack.
9215         * include/grub/err.h (grub_error_push): Added function prototype.
9216         (grub_error_pop): Likewise.
9218 2005-12-09  Hollis Blanchard  <hollis@penguinppc.org>
9220         * configure.ac: Accept `powerpc64' as host_cpu.
9221         (amd64): Rename to `biarch32'.
9223         * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
9224         non-cacheline-aligned addresses.
9226         * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
9227         (grub_dl_flush_cache): Likewise.  Only call `grub_arch_sync_caches'
9228         if `size' is non-zero.
9230 2005-12-03  Marco Gerards  <mgerards@xs4all.nl>
9232         * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
9233         and `cd' to make sure the filename is not prefixed with a
9234         directory name.
9235         (pkgdata_MODULES): Add `gpt.mod'.
9236         (gpt_mod_SOURCES): New variable.
9237         (gpt_mod_CFLAGS): Likewise.
9238         (gpt_mod_LDFLAGS): Likewise.
9240         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
9242         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
9243         New macro.
9245         * partmap/gpt.c: New file.
9247         * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
9248         GPT partition map is detected.
9250 2005-12-03  Vincent Pelletier  <subdino2004@yahoo.fr>
9252         * commands/i386/pc/play.c: New file.
9253         * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
9254         (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
9255         macros.
9257 2005-11-27  Marco Gerards  <mgerards@xs4all.nl>
9259         * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
9260         ((unused))' to silence gcc warning.
9262 2005-11-26  Hollis Blanchard  <hollis@penguinppc.org>
9264         * configure.ac: Correct `AC_PROG_YACC' test.
9266 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
9268         * util/powerpc/ieee1275/grub-install.in: Run the mount point
9269         check before installing files.
9271 2005-11-22  Mike Small  <smallm@panix.com>
9273         * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
9274         number regex so multidigit numbers are recognized correctly.
9276 2005-11-22  Mike Small  <smallm@panix.com>
9278         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
9279         debugging message before attempting to claim memory.
9280         (grub_rescue_cmd_initrd): Add a claim debugging message and try
9281         multiple addresses in case of failure.
9283 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
9285         * term/tparm.c (get_space): Remove empty `if' statement.
9287         * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
9289         * kern/parser.c (check_varstate): Rename `state' to 's'.
9291 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
9293         * partmap/acorn.c: Change `unsigned' to `unsigned int'.  Move all
9294         variable definitions to the beginning of each function.  Sort stack
9295         variables by size.
9296         (find): Rename to `acorn_partition_map_find'.  Cast `grub_disk_read'
9297         `buf' argument to `char *'.
9299 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
9301         * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
9302         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
9303         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
9304         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
9305         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
9306         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
9307         configfile.mod, search.mod, gzio.mod and test.mod.
9308         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
9309         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
9310         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
9311         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
9312         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
9313         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
9314         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
9315         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
9316         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
9317         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
9318         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
9319         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
9320         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
9321         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
9322         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
9323         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
9324         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
9325         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
9326         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
9327         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
9328         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
9329         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
9330         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
9332         * conf/common.mk (grub_modules_init.lst): Use `find' instead of
9333         `grep --include'.
9334         (pkgdata_MODULES): Add test.mod.
9336 2005-11-18  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
9338         * genmk.rb: Fixed list rules moved to Makefile.in.  Recognise
9339         appending to variables with "+=".
9340         (PModule): Use full pathname to generate *.lst filenames.
9342         * Makefile.in: Fixed list rules moved from genmk.rb.
9343         (.DELETE_ON_ERROR): New special target.
9344         (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
9346         * conf/i386-pc.rmk: Include conf/common.mk.
9347         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
9348         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
9349         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
9350         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
9351         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
9352         configfile.mod, search.mod, gzio.mod and test.mod.
9353         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
9354         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
9355         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
9356         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
9357         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
9358         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
9359         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
9360         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
9361         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
9362         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
9363         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
9364         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
9365         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
9366         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
9367         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
9368         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
9369         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
9370         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
9371         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
9372         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
9373         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
9374         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
9375         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
9376         here...
9377         * conf/common.rmk: ... to here.  New file.
9379         * conf/common.mk: New file.
9381 2005-11-18  Yoshinori K. Okuji  <okuji@enbug.org>
9383         * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
9384         (grub_script.tab.c): ... here.
9386         * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
9387         (grub_script.tab.c): ... here.
9389         * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
9390         (grub_script.tab.c): ... here.
9392         * normal/command.c (grub_command_find): Fixed a memory leak of
9393         MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
9395 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
9397         * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
9398         "@" which marks the start of a comment on ARM.
9399         (VARIABLE): Likewise.
9401 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
9403         Add support for Linux/ADFS partition tables.
9405         * partmap/acorn.c: New file.
9407         * include/grub/acorn_filecore.h: Likewise.
9409         * DISTLIST: Added `partmap/acorn.c' and
9410         `include/grub/acorn_filecore.h'.
9412         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
9413         `partmap/acorn.c'.
9414         (pkgdata_MODULES): Add `acorn.mod'.
9415         (acorn_mod_SOURCES): New variable.
9416         (acorn_mod_CFLAGS): Likewise.
9418         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
9419         `partmap/acorn.c'.
9420         (pkgdata_MODULES): Add `acorn.mod'.
9421         (acorn_mod_SOURCES): New variable.
9422         (acorn_mod_CFLAGS): Likewise.
9424         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
9425         (pkgdata_MODULES): Add `acorn.mod'.
9426         (acorn_mod_SOURCES): New variable.
9427         (acorn_mod_CFLAGS): Likewise.
9428         (acorn_mod_LDFLAGS): Likewise.
9430         * include/types.h (grub_disk_addr_t): New typedef.
9432 2005-11-13  Marco Gerards  <mgerards@xs4all.nl>
9434         * geninit.sh: New file.
9436         * geninitheader.sh: Likewise.
9438         * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
9439         * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
9440         * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
9441         * commands/configfile.c (grub_configfile_init)
9442         (grub_configfile_fini): Likewise.
9443         * commands/default.c (grub_default_init, grub_default_fini):
9444         Likewise.
9445         * commands/help.c (grub_help_init, grub_help_fini): Likewise.
9446         * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
9447         * commands/search.c (grub_search_init, grub_search_fini): Likewise.
9448         * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
9449         Likewise.
9450         * commands/test.c (grub_test_init, grub_test_fini): Likewise.
9451         * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
9452         Likewise.
9453         * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
9454         * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
9455         Likewise.
9456         * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
9457         Likewise.
9458         * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
9459         Likewise.
9460         * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
9461         * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
9462         * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
9463         * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
9464         * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
9465         * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
9466         * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
9467         * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
9468         * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
9469         * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
9470         * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
9471         * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
9472         * partmap/amiga.c (grub_amiga_partition_map_init)
9473         (grub_amiga_partition_map_fini): Likewise.
9474         * partmap/apple.c (grub_apple_partition_map_init)
9475         (grub_apple_partition_map_fini): Likewise.
9476         * partmap/pc.c (grub_pc_partition_map_init)
9477         (grub_pc_partition_map_fini): Likewise.
9478         * partmap/sun.c (grub_sun_partition_map_init,
9479         grub_sun_partition_map_fini): Likewise.
9480         * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
9481         Likewise.
9483         * util/grub-emu.c: Include <grub_modules_init.h>.
9484         (main): Don't initialize and de-initialize any modules directly,
9485         use `grub_init_all' and `grub_fini_all' instead.
9487         * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
9488         `grub_vesafb_mod_init'.
9489         (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'.  Updated
9490         all users.
9491         * term/i386/pc/vga.c (grub_vga_init): Renamed to
9492         `grub_vga_mod_init'.  Updated all users.
9493         (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
9495         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
9496         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
9497         rules.
9499         * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
9500         Generate a function to initialize the module in utilities.
9501         Updated all callers.
9502         (GRUB_MOD_FINI): Add argument `name'.  Generate a function to
9503         initialize the module in utilities.  Updated all callers.
9505 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
9507         * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
9508         escape sequence and a literal ^L to clear the screen.
9510         * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
9511         when returning from Open Firmware.
9513 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
9515         * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
9516         (grub_ofconsole_height): Likewise.
9517         (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
9518         manually insert a '\n'.
9519         (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
9520         `grub_ofconsole_height'.  Return early if these are already set.
9522 2005-11-07  Vincent Pelletier  <subdino2004@yahoo.fr>
9524         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
9525         `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
9526         `normal/execute.c', `normal/lexer.c', `io/gzio.c',
9527         `kern/parser.c', `grub_script.tab.c', `normal/function.c'
9528         and `normal/script.c'.
9529         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
9530         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9531         (test_mod_SOURCES): New variable.
9532         (test_mod_CFLAGS): Likewise.
9533         (test_mod_LDFLAGS): Likewise.
9534         (pkgdata_MODULES): Add `test.mod'.
9535         (grub_script.tab.c): New rule.
9536         (grub_script.tab.h): Likewise.
9538 2005-11-07  Marco Gerards  <mgerards@xs4all.nl>
9540         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
9541         `commands/test.c', `normal/execute.c', `normal/lexer.c',
9542         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9543         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
9544         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9545         (test_mod_SOURCES): New variable.
9546         (test_mod_CFLAGS): Likewise.
9547         (pkgdata_MODULES): Add `test.mod'.
9548         (grub_script.tab.c): New rule.
9549         (grub_script.tab.h): Likewise.
9551 2005-11-06  Marco Gerards  <mgerards@xs4all.nl>
9553         Add initial scripting support.
9555         * commands/test.c: New file.
9556         * include/grub/script.h: Likewise.
9557         * normal/execute.c: Likewise.
9558         * normal/function.c: Likewise.
9559         * normal/lexer.c: Likewise.
9560         * normal/parser.y: Likewise.
9561         * normal/script.c: Likewise.
9563         * configure.ac: Add `AC_PROG_YACC' test.
9565         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
9566         `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
9567         `normal/function.c' and `normal/script.c'.
9568         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
9569         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9570         (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
9571         variables.
9572         (pkgdata_MODULES): Add `test.mod'.
9573         (grub_script.tab.c): New rule.
9574         (grub_script.tab.h): Likewise.
9576         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
9578         * include/grub/normal.h (grub_test_init): New prototype.
9579         (grub_test_fini): Likewise.
9581         * normal/command.c: Include <grub/script.h>.
9582         (grub_command_execute): Rewritten.
9584         * util/grub-emu.c (main): Call `grub_test_init' and
9585         `grub_test_fini'.
9587 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
9589         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
9590         to 0.
9591         * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
9592         there are no pending characters.
9594 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
9596         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
9597         `grub_strndup' to drop device arguments. Replace unnecessary
9598         `grub_strndup' with `grub_strdup'.
9600 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
9602         * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
9603         `debug' environment variable has been set.
9605 2005-11-02  Hollis Blanchard  <hollis@penguinppc.org>
9607         * Makefile.in (install-local): Use $(DATA).
9608         (uninstall): Likewise.
9609         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
9610         (sbin_UTILITIES): ... to here.
9611         (sbin_SCRIPTS): New variable.
9612         (grub_install_SOURCES): New variable.
9613         * util/powerpc/ieee1275/grub-install.in: New file.
9614         * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
9615         variable.
9616         (add_segments): Call `grub_util_get_path'.
9618 2005-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
9620         From Timothy Baldwin:
9621         * commands/ls.c (grub_ls_list_files): Close FILE with
9622         grub_file_close.
9623         * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
9625 2005-10-24  Marco Gerards  <mgerards@xs4all.nl>
9627         * include/grub/parser.h: New file.
9629         * kern/parser.c: Likewise.
9631         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
9632         (grub_setup_SOURCES): Likewise.
9633         (grub_probefs_SOURCES): Likewise.
9634         (grub_emu_SOURCES): Likewise.
9635         (kernel_img_HEADERS): Add `parser.h'.
9637         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
9638         (grub_emu_SOURCES): Add `kern/parser.c'.
9639         (grubof_SOURCES): Likewise.
9641         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
9642         (grubof_SOURCES): Add `kern/parser.c'.
9644         * include/grub/misc.h (grub_split_cmdline): Removed prototype.
9646         * kern/misc.c (grub_split_cmdline): Removed function.
9648         * kern/rescue.c: Include <grub/parser.h>.
9649         (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
9650         of `grub_split_cmdline'.
9652         * normal/command.c: Include <grub/parser.h>.
9653         (grub_command_execute):  Use `grub_parser_split_cmdline' instead
9654         of `grub_split_cmdline'.
9656         * normal/completion.c: Include <grub/parser.h>.
9657         (cmdline_state): New variable.
9658         (iterate_dir): End the filename with a quote depending on the
9659         command line state.
9660         (get_state): new function.
9661         (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
9662         split the arguments and determine the current argument.  When the
9663         argument string is not quoted, escape all spaces.
9665 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
9667         * normal/sparc64/setjmp.S: New file.
9669 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
9671         * include/grub/sparc64/libgcc.h: New file.
9672         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
9673         (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
9674         normal/sparc64/setjmp.c.
9676 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
9678         * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
9679         * kern/sparc64/cache.S: New file.
9680         * kern/sparc64/cache.c: Removed.
9681         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
9682         (COMMON_CFLAGS): Add -mno-app-regs.  Remove -mcpu=v9 and
9683         -mtune=ultrasparc.
9684         (COMMON_LDFLAGS): Add -melf64_sparc.
9685         (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
9686         (grubof_SOURCES): Use cache.S instead of cache.c.
9687         (grubof_LDFLAGS): Add -mno-app-regs.  Replace "-Xlinker
9688         --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
9689         (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
9690         commented though.
9691         (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
9692         (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
9693         (linux_mod_CFLAGS): Commented out.
9694         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
9695         out because module isn't built.
9696         (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
9697         (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
9698         (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
9699         (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
9700         (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
9701         (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
9702         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
9703         (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
9704         (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
9705         (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
9706         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
9707         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
9708         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
9709         (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
9711 2005-10-20  Yoshinori K. Okuji  <okuji@enbug.org>
9713         * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
9714         grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
9715         longer, because HFS should not be used on PC.
9717 2005-10-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
9719         * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
9720         consistently within the loop.
9722 2005-10-15  Marco Gerards  <mgerards@xs4all.nl>
9724         * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
9725         directory can not be read.
9727 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
9729         * configure.ac (AC_INIT): Increase the version number to 1.91.
9731         * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
9732         include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
9733         term/i386/pc/serial.c.
9735 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
9737         * kern/file.c (grub_file_seek): Seeking to an offset equal to a
9738         file size must be permitted.
9740         * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
9741         between %ah and %al.
9743 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
9745         * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
9746         grub_uint64_t.
9747         Call the hook with a NUL-terminated filename.
9748         (grub_xfs_mount): Use grub_be_to_cpu32 instead of
9749         grub_cpu_to_be32.
9751         * kern/term.c (cursor_state): New variable.
9752         (grub_term_set_current): Reset the cursor state on a new
9753         terminal.
9754         (grub_setcursor): Rewritten to use CURSOR_STATE.
9755         (grub_getcursor): New function.
9757         * include/grub/term.h (grub_getcursor): New prototype.
9759         * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
9760         integers on ARM. Reported by Timothy Baldwin
9761         <T.E.Baldwin99@members.leeds.ac.uk>.
9763 2005-10-11  Marco Gerards  <mgerards@xs4all.nl>
9765         * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
9766         allocated.
9767         (grub_sfs_dir): Likewise.
9769 2005-10-09  Marco Gerards  <mgerards@xs4all.nl>
9771         Add support for the SFS filesystem.
9773         * fs/sfs.c: New file.
9775         * DISTLIST: Added `fs/sfs.c'.
9777         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
9778         (grub_probefs_SOURCES): Likewise.
9779         (grub_emu_SOURCES): Likewise.
9780         (pkgdata_MODULES): Add `sfs.mod'.
9781         (sfs_mod_SOURCES): New variable.
9782         (sfs_mod_CFLAGS): Likewise.
9783         (sfs_mod_LDFLAGS): Likewise.
9785         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
9786         (pkgdata_MODULES): Add `sfs.mod'.
9787         (sfs_mod_SOURCES): New variable.
9788         (sfs_mod_CFLAGS): Likewise.
9790         * util/grub-emu.c (main): Call `grub_sfs_init' and
9791         `grub_sfs_fini'.
9793         * include/grub/fs.h (grub_sfs_init): New prototype.
9794         (grub_sfs_fini): Likewise.
9796 2005-10-07  Marco Gerards  <mgerards@xs4all.nl>
9798         Add support for the AFFS filesystem.
9800         * fs/affs.c: New file.
9802         * DISTLIST: Added `fs/affs.c'.
9804         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
9805         (grub_probefs_SOURCES): Likewise.
9806         (grub_emu_SOURCES): Likewise.
9807         (pkgdata_MODULES): Add `affs.mod'.
9808         (affs_mod_SOURCES): New variable.
9809         (affs_mod_CFLAGS): Likewise.
9810         (affs_mod_LDFLAGS): Likewise.
9812         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
9813         (pkgdata_MODULES): Add `affs.mod'.
9814         (affs_mod_SOURCES): New variable.
9815         (affs_mod_CFLAGS): Likewise.
9817         * util/grub-emu.c (main): Call `grub_affs_init' and
9818         `grub_affs_fini'.
9820         * include/grub/fs.h (grub_affs_init): New prototype.
9821         (grub_affs_fini): Likewise.
9823 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
9825         * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
9827 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
9829         * configure.ac: Accept `x86_64' as host_cpu.  In that case add
9830         `-m32' to CFLAGS.
9832         * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
9833         linking.
9835         * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
9836         (COMMON_LDFLAGS): New variable.
9837         (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
9838         (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
9839         (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
9840         (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
9841         (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
9842         (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
9843         (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
9844         (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
9845         (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
9846         (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
9847         (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
9848         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
9849         (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
9850         (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
9851         (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
9852         variables.
9853         (normal_mod_ASFLAGS): Add `-m32'.
9855         * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
9856         (grub_host_size_t, grub_host_ssize_t): New types.
9857         (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
9858         dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
9859         `GRUB_HOST_SIZEOF_VOID_P'.
9861         * include/grub/kernel.h (struct grub_module_header): Type of
9862         member offset changed to `grub_host_off_t'.  Type of member size
9863         changed to `grub_host_size_t'.
9864         (struct grub_module_info): Type of member offset changed to
9865         `grub_host_off_t'.  Type of member size changed to
9866         `grub_host_size_t'.
9868 2005-09-29  Yoshinori K. Okuji  <okuji@enbug.org>
9870         Make GRUB's kernel compliant to Multiboot Specification.
9872         * kern/i386/pc/startup.S (multiboot_header): New label.
9873         (multiboot_entry): Likewise.
9874         (multiboot_trampoline): Likewise.
9876         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
9877         Increased to 0x4A0.
9879         * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
9880         put parentheses after a question mark.
9881         [!GRUB_UTIL] (my_mod): New variable.
9883         * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
9885 2005-09-28  Marco Gerards  <mgerards@xs4all.nl>
9887         Adds support for the XFS filesystem.  Btrees are not supported
9888         yet.
9890         * fs/xfs.c: New file.
9892         * DISTLIST: Added `fs/xfs.c'.
9894         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
9895         (grub_probefs_SOURCES): Likewise.
9896         (grub_emu_SOURCES): Likewise.
9897         (pkgdata_MODULES): Add `xfs.mod'.
9898         (xfs_mod_SOURCES): New variable.
9899         (xfs_mod_CFLAGS): Likewise.
9901         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
9902         (pkgdata_MODULES): Add `xfs.mod'.
9903         (xfs_mod_SOURCES): New variable.
9904         (xfs_mod_CFLAGS): Likewise.
9906         * util/grub-emu.c (main): Call `grub_xfs_init' and
9907         `grub_xfs_fini'.
9909         * include/grub/fs.h (grub_xfs_init): New prototype.
9910         (grub_xfs_fini): Likewise.
9913 2005-09-18  Vesa Jaaskelainen  <chaac@nic.fi>
9915         * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
9916         color modes, allow greater than 16 colors to be configured as
9917         a default palette.
9919 2005-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
9921         * normal/completion.c (complete_arguments): Add the qualifier
9922         const into OPTIONS.
9924         From Omniflux <omniflux+lists@omniflux.com>:
9925         * include/grub/terminfo.h: New file.
9926         * include/grub/tparm.h: Likewise.
9927         * include/grub/i386/pc/serial.h: Likewise.
9928         * term/terminfo.c: Likewise.
9929         * term/tparm.c: Likewise.
9930         * term/i386/pc/serial.c: Likewise.
9931         * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
9932         serial.mod.
9933         (terminfo_mod_SOURCES): New variable.
9934         (terminfo_mod_CFLAGS): Likewise.
9935         (serial_mod_SOURCES): Likewise.
9936         (serial_mod_CFLAGS): Likewise.
9938 2005-08-31  Yoshinori K. Okuji  <okuji@enbug.org>
9940         * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
9941         boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
9942         and kern/powerpc/ieee1275/cmain.c, respectively.
9944         * boot/powerpc/ieee1275/crt0.S: Moved to ...
9945         * kern/powerpc/ieee1275/crt0.S: ... here.
9947         * boot/powerpc/ieee1275/cmain.c: Moved to ...
9948         * kern/powerpc/ieee1275/cmain.c: ... here.
9950         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
9951         kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
9952         instead of boot/powerpc/ieee1275/crt0.S and
9953         boot/powerpc/ieee1275/cmain.c, respectively.
9955         * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
9956         sectors. It was not used anyway.
9958 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
9960         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
9961         `unused parameter' warning.
9963 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
9965         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
9966         function.
9967         (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
9968         getcharwidth.
9970 2005-08-28  Marco Gerards  <metgerards@student.han.nl>
9972         * include/grub/normal.h (enum grub_completion_type): Added
9973         `GRUB_COMPLETION_TYPE_ARGUMENT'.
9975         * normal/cmdline.c (print_completion): Handle
9976         the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
9977         * normal/menu_entry.c (store_completion): Likewise.
9979         * normal/completion.c (complete_arguments): New function.
9980         (grub_normal_do_completion): Call `complete_arguments' when the
9981         current words start with a dash.
9983 2005-08-27  Marco Gerards  <metgerards@student.han.nl>
9985         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
9986         `gzio.mod' instead of `io.mod').
9988 2005-08-22  Yoshinori K. Okuji  <okuji@enbug.org>
9990         * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
9991         (DISTDIRS): Added io and video.
9992         Rewrite the search routine to make an output consistently.
9994         * DISTLIST: Added conf/sparc64-ieee1275.mk,
9995         conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
9996         include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
9997         io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
9998         kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
9999         util/powerpc/ieee1275/misc.c.
10001         * include/grub/gzio.h: New file.
10002         * io/gzio.c: Likewise.
10004         * kern/file.c (grub_file_close): Call grub_device_close only if
10005         FILE->DEVICE is not NULL.
10007         * include/grub/mm.h [!NULL] (NULL): New macro.
10009         * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
10011         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
10012         (pkgdata_MODULES): Added gzio.mod.
10013         (gzio_mod_SOURCES): New variable.
10014         (gzio_mod_CFLAGS): Likewise.
10016         * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
10017         (pkgdata_MODULES): Added gzio.mod.
10018         (gzio_mod_SOURCES): New variable.
10019         (gzio_mod_CFLAGS): Likewise.
10021         * commands/cat.c: Include grub/gzio.h.
10022         (grub_cmd_cat): Use grub_gzfile_open instead of
10023         grub_file_open.
10025         * commands/cmp.c: Include grub/gzio.h.
10026         (grub_cmd_cmp): Use grub_gzfile_open instead of
10027         grub_file_open.
10029         * loader/i386/pc/multiboot.c: Include grub/gzio.h.
10030         (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
10031         grub_file_open.
10032         (grub_rescue_cmd_module): Likewise.
10034 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
10036         * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
10037         kern/sparc64/ieee1275/init.c because it contains _start.
10038         * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
10040 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
10042         * configure.ac: Add support for sparc64 host with ieee1275
10043         firmware.
10044         * configure: Generated from configure.ac.
10045         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
10046         instead of int.
10047         (grub_ofdisk_read): Likewise.
10048         (grub_ofdisk_open): Use %p to print pointer values, and cast the
10049         pointers as (void *) to remove a warning.
10050         (grub_ofdisk_close): Likewise.
10051         (grub_ofdisk_read): Likewise.
10052         * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
10053         returns, so make it return void to remove a warning.
10054         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
10055         Corresponding prototype change.
10056         * kern/mm.c (grub_mm_init_region): Use %p to print pointer
10057         values, and cast the pointers as (void *) to remove a warning.
10058         (grub_mm_dump): Likewise.
10059         * conf/sparc64-ieee1275.mk: New file.
10060         * conf/sparc64-ieee1275.rmk: Likewise.
10061         * include/grub/sparc64/setjmp.h: Likewise.
10062         * include/grub/sparc64/types.h: Likewise.
10063         * include/grub/sparc64/ieee1275/console.h: Likewise.
10064         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
10065         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
10066         * include/grub/sparc64/ieee1275/time.h: Likewise.
10067         * kern/sparc64/cache.c: Likewise.
10068         * kern/sparc64/dl.c: Likewise.
10069         * kern/sparc64/ieee1275/init.c: Likewise.
10070         * kern/sparc64/ieee1275/openfw.c: Likewise.
10072 2005-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
10074         * util/console.c (grub_ncurses_putchar): If C is greater than
10075         0x7f, set C to a question mark.
10076         (grub_ncurses_getcharwidth): New function.
10077         (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
10078         getcharwidth.
10080         * normal/menu.c (print_entry): Made aware of Unicode. First,
10081         convert TITLE to UCS-4, and predict the cursor position by
10082         grub_getcharwidth.
10084         * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
10085         const to SRC.
10086         * kern/misc.c (grub_utf16_to_utf8): Likewise.
10088 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
10090         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
10091         the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
10092         grub_strcat.
10094         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
10095         file by the option BOOT_IMAGE. Use grub_stpcpy instead of
10096         grub_strcpy and grub_strlen. Take it into account that a space
10097         character is inserted as a delimiter.
10099 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
10101         * partmap/pc.c (pc_partition_map_iterate): Include the value of an
10102         invalid magic in the error.
10104         * commands/search.c: New file.
10106         * util/grub-emu.c (main): Call grub_search_init and
10107         grub_search_fini.
10109         * kern/rescue.c (grub_rescue_print_disks): Removed.
10110         (grub_rescue_print_devices): New function.
10111         (grub_rescue_cmd_ls): Use grub_device_iterate with
10112         grub_rescue_print_devices instead of grub_disk_dev_iterate with
10113         grub_rescue_print_disks.
10115         * kern/partition.c (grub_partition_iterate): Return the result of
10116         PARTMAP->ITERATE instead of GRUB_ERRNO.
10118         * kern/device.c: Include grub/partition.h.
10119         (grub_device_iterate): New function.
10121         * include/grub/partition.h (grub_partition_iterate): Return int
10122         instead of grub_err_t.
10124         * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
10125         prototype.
10126         [GRUB_UTIL] (grub_search_fini): Likewise.
10128         * include/grub/device.h (grub_device_iterate): New prototype.
10130         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
10131         commands/search.c.
10132         (pkgdata_MODULES): Added search.mod.
10133         (search_mod_SOURCES): New variable.
10134         (search_mod_CFLAGS): Likewise.
10136         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
10137         (pkgdata_MODULES): Added search.mod.
10138         (search_mod_SOURCES): New variable.
10139         (search_mod_CFLAGS): Likewise.
10141         * commands/ls.c (grub_ls_list_disks): Renamed to ...
10142         (grub_ls_list_devices): ... this, and use grub_device_iterate.
10143         All callers changed.
10145         * DISTLIST: Added commands/search.c.
10147 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
10149         * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
10150         conversion.
10151         (grub_getcharwidth): New function.
10153         * kern/misc.c (grub_utf8_to_ucs4): New function.
10155         * include/grub/term.h (struct grub_term): Added a new member
10156         "getcharwidth".
10157         (grub_getcharwidth): New prototype.
10159         * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
10161         * term/i386/pc/console.c (map_char): New function. Segregated from
10162         grub_console_putchar.
10163         (grub_console_putchar): Use map_char.
10164         (grub_console_getcharwidth): New function.
10165         (grub_console_term): Specified grub_console_getcharwidth as
10166         getcharwidth.
10168         * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
10169         (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
10171         * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
10172         GRUB_ERRNO.
10173         (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
10174         on grub_strtoul completely.
10175         (write_char): Declare local variables in the beginning of the
10176         function.
10177         (grub_vesafb_getcharwidth): New function.
10178         (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
10179         getcharwidth.
10181 2005-08-19  Yoshinori K. Okuji  <okuji@enbug.org>
10183         * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
10184         commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
10185         commands/i386/pc/vbetest.c.
10187         * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
10188         call grub_vbe_get_controller_info again, because the returned
10189         information is volatile.
10190         (grub_vbe_set_video_mode): Mostly rewritten.
10191         (grub_vbe_get_video_mode): Use grub_vbe_probe and use
10192         grub_vbe_status_t correctly.
10193         (grub_vbe_get_video_mode_info): Likewise.
10194         (grub_vbe_set_pixel_rgb): Use a switch statement rather than
10195         several if statements.
10197         * commands/i386/pc/vbe_list_modes.c: Renamed to ...
10198         * commands/i386/pc/vbeinfo.c: ... this.
10200         * commands/i386/pc/vbe_test.c: Renamed to ...
10201         * commands/i386/pc/vbetest.c: ... this.
10203         * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
10204         ...
10205         (grub_cmd_vbeinfo): ... this. Save video modes before
10206         iterating. Skip a video mode, if it is not available, not enough
10207         information is given or it is monochrome. Show the memory
10208         model. Leave the interpretation of MODEVAR to grub_strtoul
10209         completely.
10210         (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
10211         (GRUB_MOD_FINI): Likewise.
10213         * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
10214         (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
10215         grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
10216         duplicated grub_env_get. Leave the interpretation of MODEVAR to
10217         grub_strtoul completely.
10218         (real2pm): Removed.
10219         (GRUB_MOD_INIT): Rename vbe_test to vbetest.
10220         (GRUB_MOD_FINI): Likewise.
10222         * normal/misc.c: Include grub/mm.h.
10224         * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
10225         vbe_list_modes with vbetest.mod and vbeinfo.mod.
10226         (vbe_list_modes_mod_SOURCES): Removed.
10227         (vbe_list_modes_mod_CFLAGS): Likewise.
10228         (vbe_test_mod_SOURCES): Likewise.
10229         (vbe_test_mod_CFLAGS): Likewise.
10230         (vbeinfo_mod_SOURCES): New variable.
10231         (vbeinfo_mod_CFLAGS): Likewise.
10232         (vbetest_mod_SOURCES): Likewise.
10233         (vbetest_mod_CFLAGS): Likewise.
10235 2005-08-18  Yoshinori K. Okuji  <okuji@enbug.org>
10237         * normal/misc.c: New file.
10239         * DISTLIST: Added normal/misc.c.
10241         * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
10242         DISK to HOOK. Call HOOK with DISK.
10243         * partmap/apple.c (apple_partition_map_iterate): Likewise.
10244         * partmap/pc.c (pc_partition_map_iterate): Likewise.
10245         * partmap/sun.c (sun_partition_map_iterate): Likewise.
10247         * normal/menu_entry.c (struct screen): Added a new member
10248         "completion_shown".
10249         (completion_buffer): New global variable.
10250         (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
10251         (store_completion): New function.
10252         (complete): Likewise.
10253         (clear_completions): Likewise.
10254         (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
10255         call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
10256         a tab, call complete.
10258         * normal/completion.c (disk_dev): Removed.
10259         (print_simple_completion): Likewise.
10260         (print_partition_completion): Likewise.
10261         (print_func): New global variable.
10262         (add_completion): Do not take the arguments WHAT or PRINT any
10263         longer. Added a new argument TYPE. Instead of printing directly,
10264         call PRINT_FUNC if not NULL.
10265         All callers changed.
10266         (complete_device): Use a local variable DEV instead of
10267         DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
10268         (grub_normal_do_completion): Take a new argument HOOK. Do not
10269         initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
10270         empty string, return NULL instead.
10271         All callers changed.
10273         * normal/cmdline.c (print_completion): New function.
10275         * kern/partition.c (grub_partition_iterate): Add an argument DISK
10276         to HOOK.
10277         All callers changed.
10279         * kern/disk.c (grub_print_partinfo): Removed.
10281         * include/grub/partition.h (struct grub_partition_map): Add a new
10282         argument DISK into HOOK of ITERATE.
10283         (grub_partition_iterate): Add a new argument DISK to HOOK.
10285         * include/grub/normal.h (enum grub_completion_type): New enum.
10286         (grub_completion_type_t): New type.
10287         (GRUB_COMPLETION_TYPE_COMMAND): New constant.
10288         (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
10289         (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
10290         (GRUB_COMPLETION_TYPE_FILE): Likewise.
10291         (grub_normal_do_completion): Added a new argument HOOK.
10292         (grub_normal_print_device_info): New prototype.
10294         * include/grub/disk.h (grub_print_partinfo): Removed.
10296         * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
10297         (normal_mod_SOURCES): Likewise.
10298         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10299         (normal_mod_SOURCES): Likewise.
10301         * commands/ls.c (grub_ls_list_disks): Use
10302         grub_normal_print_device_info instead of grub_print_partinfo. Free
10303         PNAME.
10304         (grub_ls_list_files): Use grub_normal_print_device_info instead of
10305         duplicating the code.
10307 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
10309         * commands/i386/pc/vbe_list_modes.c: Update source formatting to
10310         follow GCS more precisely.
10311         * commands/i386/pc/vbe_test.c: Likewise.
10312         * include/grub/i386/pc/vbe.h: Likewise.
10313         * term/i386/pc/vesafb.c: Likewise.
10314         * video/i386/pc/vbe.c: Likewise.
10316 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
10318         * DISTLIST: Added term/i386/pc/vesafb.c
10319         DISTLIST: Added video/i386/pc/vbe.c
10320         DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
10321         DISTLIST: Added commands/i386/pc/vbe_test.c.
10322         * commands/i386/pc/vbe_list_modes.c: New file.
10323         * commands/i386/pc/vbe_test.c: Likewise.
10324         * term/i386/pc/vesafb.c: Likewise.
10325         * video/i386/pc/vbe.c: Likewise.
10326         * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
10327         (grub_vbe_probe) Added prototype.
10328         (grub_vbe_set_video_mode) Likewise.
10329         (grub_vbe_get_video_mode) Likewise.
10330         (grub_vbe_get_video_mode_info) Likewise.
10331         (grub_vbe_set_pixel_rgb) Likewise.
10332         (grub_vbe_set_pixel_index) Likewise.
10333         * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
10334         (pkgdata_MODULES): Added vesafb.mod.
10335         (pkgdata_MODULES): Added vbe_list_modes.mod.
10336         (pkgdata_MODULES): Added vbe_test.mod.
10337         (vbe_mod_SOURCES): Added.
10338         (vbe_mod_CFLAGS): Likewise.
10339         (vesafb_mod_SOURCES): Likewise.
10340         (vesafb_mod_CFLAGS): Likewise.
10341         (vbe_list_modes_mod_SOURCES): Likewise.
10342         (vbe_list_modes_mod_CFLAGS): Likewise.
10343         (vbe_test_mod_SOURCES): Likewise.
10344         (vbe_test_mod_CFLAGS): Likewise.
10346 2005-08-14  Yoshinori K. Okuji  <okuji@enbug.org>
10348         * normal/command.c (grub_command_execute): If INTERACTIVE is
10349         false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
10350         CMDLINE. Disable the pager if INTERACTIVE is true.
10351         All callers are changed.
10353         * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
10354         before reading a config file.
10355         * normal/main.c (read_config_file): Even if a command is not
10356         found, register it if it is within an entry.
10358         * util/grub-emu.c: Include sys/types.h and unistd.h.
10359         (options): Added --hold.
10360         (struct arguments): Added a new member "hold".
10361         (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
10362         missing.
10363         (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
10364         cleared by a debugger, if it is not zero.
10366         * include/grub/normal.h (grub_command_execute): Add an argument
10367         INTERACTIVE.
10369 2005-08-14  Vesa Jaaskelainen  <chaac@nic.fi>
10371         * DISTLIST: Added include/grub/i386/pc/vbe.h.
10373 2005-08-13  Yoshinori K. Okuji  <okuji@enbug.org>
10375         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
10376         program with another one, because the old one didn't detect a bug
10377         in gcc-3.4. Always use regparm 2, because the new test is still
10378         not enough for gcc-4.0. Someone must investigate a simple test
10379         case which detects a bug in gcc-4.0.
10381 2005-08-12  Yoshinori K. Okuji  <okuji@enbug.org>
10383         * DISTLIST: Added normal/completion.c.
10385         * normal/completion.c: New file.
10387         * term/i386/pc/console.c (grub_console_getwh): New function.
10388         (grub_console_term): Assign grub_console_getwh to getwh.
10390         * normal/cmdline.c (grub_tab_complete): Removed. Now the same
10391         function is defined in normal/completion.c as
10392         grub_normal_do_completion.
10393         (grub_cmdline_get): Use grub_normal_do_completion instead of
10394         grub_tab_complete.
10396         * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
10397         returns non-zero, otherwise return 0.
10398         (grub_partition_iterate): First, probe the partition map. Then,
10399         call ITERATE only for this partition map.
10401         * kern/misc.c (grub_strncmp): Rewritten.
10403         * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
10404         returns non-zero. Otherwise return 0.
10406         * include/grub/partition.h (grub_partition_map_iterate): Return
10407         int instead of void.
10409         * include/grub/normal.h (grub_normal_do_completion): New prototype.
10411         * include/grub/misc.h (grub_strncmp): Change the type of N to
10412         grub_size_t.
10414         * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
10415         of void.
10417         * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
10418         unsigned explicitly before comparing it with I.
10420         * kern/main.c (grub_env_write_root): Add the attribute unused into
10421         VAR.
10423         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
10424         normal/completion.c.
10425         (normal_mod_SOURCES): Likewise.
10426         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
10427         (normal_mod_SOURCES): Likewise.
10429         * normal/command.c (grub_iterate_commands): If ITERATE returns
10430         non-zero, return one immediately.
10432 2005-08-09  Vesa Jaaskelainen  <chaac@nic.fi>
10434         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
10435         * kern/i386/pc/startup.S: Updated Global Descriptor table's
10436         descriptions.
10437         (grub_vbe_get_controller_info): New function.
10438         (grub_vbe_get_mode_info): Likewise.
10439         (grub_vbe_set_mode): Likewise.
10440         (grub_vbe_get_mode): Likewise.
10441         (grub_vbe_set_memory_window): Likewise.
10442         (grub_vbe_get_memory_window): Likewise.
10443         (grub_vbe_set_scanline_length): Likewise.
10444         (grub_vbe_get_scanline_length): Likewise.
10445         (grub_vbe_set_display_start): Likewise.
10446         (grub_vbe_get_display_start): Likewise.
10447         (grub_vbe_set_palette_data): Likewise.
10448         * include/grub/i386/pc/vbe.h: New file.
10450 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
10452         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
10453         kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
10454         * DISTLIST: Likewise.
10455         * kern/ieee1275/of.c: Moved to ...
10456         * kern/ieee1275/ieee1275.c: ... here.
10458 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
10460         * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
10461         (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
10462         Pass 0 as `end' parameter to grub_strtoul().
10464 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
10466         * include/grub/powerpc/ieee1275/console.h: Do not include
10467         <grub/types.h>.  Do not include <grub/symbol.h>.  Remove ASM_FILE
10468         ifdef.
10469         (grub_console_cur_color): Remove i386-specific prototype.
10470         (grub_console_real_putchar): Likewise.
10471         (grub_console_checkkey): Likewise.
10472         (grub_console_getkey): Likewise.
10473         (grub_console_getxy): Likewise.
10474         (grub_console_gotoxy): Likewise.
10475         (grub_console_cls): Likewise.
10476         (grub_console_setcursor): Likewise.
10477         * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
10478         Include <grub/machine/console.h>.
10479         * term/ieee1275/ofconsole.c: Likewise.
10481 2005-08-08  Yoshinori K. Okuji  <okuji@enbug.org>
10483         * Makefile.in (LIBLZO): New variable.
10485         * configure.ac: Check for LZO version 2.
10487         * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
10488         lzo/lzo1x.h instead of lzo1x.h.
10490         * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
10491         of -llzo.
10493         * util/i386/pc/grub-setup.c (main): Do not free PREFIX
10494         twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
10496         * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
10497         copying the data from PARTITION to P.
10499 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
10501         * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
10502         negative, unload the module.
10504         * util/i386/pc/grub-setup.c (setup): The name of the PC partition
10505         map is "pc_partition_map" but not "pc".
10506         (usage): Fix the description. The options are --boot-image and
10507         --core-image but not --boot-file or --core-file.
10508         (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
10509         based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
10510         DEFAULT_DIRECTORY.
10512         * util/i386/pc/grub-install.in: Do not specify --boot-file or
10513         --core-file. Specify INSTALL_DEVICE as an argument.
10515         * util/console.c: Include config.h.
10516         [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
10517         [HAVE_NCURSES_H]: Include ncurses.h.
10518         [HAVE_CURSES_H]: Include curses.h.
10519         [!A_NORMAL] (A_NORMAL): Defined as zero.
10520         [!A_STANDOUT] (A_STANDOUT): Likewise.
10522         * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
10523         -lncurses.
10524         * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
10526         * configure.ac: Check for curses libraries and headers.
10528         * Makefile.in (LIBCURSES): New variable.
10530         * genmk.rb (Script::rule): Set the executable bits.
10532         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
10533         name of the PC partition map is "pc_partition_map" but not "pc".
10535 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
10537         * util/i386/pc/grub-install.in (grub_probefs): New variable.
10538         (modules): Likewise.
10539         (usage): Added descriptions for --modules and --grub-probefs.
10540         Handle --modules and --grub-probefs. Save the arguments in MODULES
10541         and GRUB_PROBEFS, respectively.
10542         Auto-detect a filesystem module against GRUBDIR. If the result is
10543         empty and modules are not specified explicitly, abort the
10544         installation. Add the result to MODULES.
10546         * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
10547         disk/powerpc/ieee1275/ofdisk.c,
10548         include/grub/powerpc/ieee1275/init.h and
10549         term/powerpc/ieee1275/ofconsole.c.
10550         Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
10551         term/ieee1275/ofconsole.c.
10553         * include/grub/powerpc/ieee1275/console.h: Resurrected.
10555         * COPYING: Upgraded to the latest version. Only the address of the
10556         FSF office has changed.
10558 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
10560         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
10561         kern/ieee1275.c with kern/ieee1275/of.c.
10563         * kern/ieee1275.c: Moved to ...
10564         * kern/ieee1275/of.c: ... here.
10566 2005-08-06  Yoshinori K. Okuji  <okuji@enbug.org>
10568         * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
10569         readability.
10571         * config.guess: Updated to the latest version from gnulib.
10572         * config.sub: Likewise.
10573         * install.sh: Likewise.
10574         * mkinstalldirs: Likewise.
10576         * include/grub/console.h: Removed. This file is arch-specific. Do
10577         not put this in include/grub.
10579         * include/grub/i386/pc/console.h: Resurrected.
10581         * util/console.c: Include grub/machine/console.h instead of
10582         grub/console.h.
10583         * util/grub-emu.c: Likewise.
10585 2005-08-04  Marco Gerards  <metgerards@student.han.nl>
10587         * kern/term.c (grub_putcode): Use `grub_getwh' instead of
10588         hardcoded value.
10590         From Vincent Pelletier  <subdino2004@yahoo.fr>
10591         * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
10592         Redefined to use grub_getwh.
10593         (grub_term): New member named getwh.
10594         (grub_getwh): New prototype.
10595         * kern/term.c (grub_getwh): New function.
10596         * term/i386/pc/console.c (grub_console_getwh): New function.
10597         (grub_console_term): New member `getwh'.
10598         * term/i386/pc/vga.c (grub_vga_getwh): New function.
10599         (grub_vga_term): New member `getwh'.
10600         * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
10601         grub_ssize_t.
10602         (grub_ofconsole_getw): New function.
10603         (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
10604         (grub_ofconsole_term): New field named getwh and new initial
10605         value.
10607 2005-08-03  Hollis Blanchard  <hollis@penguinppc.org>
10609         * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
10610         * include/grub/ieee1275/ieee1275.h: ... to here.  All users updated.
10611         Move `abort', `grub_reboot', and `grub_halt' prototypes ...
10612         * include/grub/powerpc/ieee1275/kernel.h: ... to here.
10613         * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
10614         of <grub/machine/ieee1275.h>.
10615         * commands/ieee1275/reboot.c: Likewise.
10616         * boot/powerpc/ieee1275/ieee1275.c: Move ...
10617         * kern/ieee1275.c: ... to here.  All users updated.  Change all
10618         parameter structs to use new type `grub_ieee1275_cell_t'.
10619         * term/powerpc/ieee1275/ofconsole.c: Move ...
10620         * term/ieee1275/ofconsole.c: ... to here.  All users updated.
10621         * disk/powerpc/ieee1275/ofdisk.c: Move ...
10622         * disk/ieee1275/ofdisk.c: ... to here.  All users updated.
10623         * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
10624         to return int.
10625         * include/grub/i386/pc/console.h: Move to include/grub/console.h.
10626         Remove unused prototypes.  All users updated.
10627         * include/grub/powerpc/ieee1275/console.h: Removed.
10628         * include/grub/powerpc/ieee1275/ieee1275.h: Define
10629         `grub_ieee1275_cell_t'.
10630         * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
10631         Cast comparisons with -1 to the correct type.
10632         * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
10633         type to match `grub_ieee1275_entry_fn'.
10635 2005-08-01  Yoshinori K. Okuji  <okuji@enbug.org>
10637         * DISTLIST: Added util/i386/pc/grub-probefs.c.
10639         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
10640         (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
10641         partmap/sun.c.
10642         (grub_probefs_SOURCES): New variable.
10644         * util/i386/pc/grub-probefs.c: New file.
10646         * util/i386/pc/grub-setup.c (main): Call
10647         grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
10648         grub_hfs_init and grub_jfs_init to initialize the system. Call
10649         grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
10650         grub_pc_partition_map_fini to finish the system.
10652 2005-07-31  Yoshinori K. Okuji  <okuji@enbug.org>
10654         * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
10655         function.
10656         (grub_multiboot_load_elf32): Likewise.
10657         (grub_multiboot_is_elf64): Likewise.
10658         (grub_multiboot_load_elf64): Likewise.
10659         (grub_multiboot_load_elf): Likewise.
10660         (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
10661         an ELF32 or ELF64 file.
10662         This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
10664         From Serbinenko Vladimir <serbinenko.vova@list.ru>:
10665         * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
10666         NULL before calling FS->LABEL.
10667         * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
10668         * commands/ls.c (grub_ls_list_files): Show labels, if possible.
10669         (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
10670         before calling FS->LABEL.
10672 2005-07-26  Yoshinori K. Okuji  <okuji@enbug.org>
10674         * util/i386/pc/grub-install.in (datadir): New variable.
10675         (libdir): Removed.
10676         (pkgdatadir): New variable.
10677         (pkglibdir): Removed.
10679 2005-07-24  Yoshinori K. Okuji  <okuji@enbug.org>
10681         * DISTLIST: Added util/i386/pc/grub-install.in.
10683         * util/i386/pc/grub-install.in: New file.
10685         * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
10686         (grub_install_SOURCES): Likewise.
10688         * genmk.rb: Added support for scripts.
10689         (Script): New class.
10690         (scripts): New variable.
10692         * Makefile.in (install-local): Install sbin_SCRIPTS by
10693         INSTALL_SCRIPT.
10694         (uninstall): Remove sbin_SCRIPTS.
10696         * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
10697         device, try to get a GRUB device by
10698         grub_util_biosdisk_get_grub_dev.
10699         Free DEST_DEV.
10701         * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
10702         description for --device-map.
10704 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
10706         Change the semantics of variable hooks. They now return strings
10707         instead of error values.
10709         * util/i386/pc/grub-setup.c: Include grub/env.h.
10710         (setup): Use grub_device_set_root instead of grub_env_set.
10712         * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
10713         grub_env_get instead of grub_device_set_root and
10714         grub_device_get_root, respectively.
10716         * kern/main.c (grub_env_write_root): New function.
10717         (grub_set_root_dev): Register grub_env_write_hook for "root". Use
10718         grub_env_set instead of grub_device_set_root.
10720         * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
10721         many variables.
10722         (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
10723         rather than calling ENV->WRITE_HOOK afterwards.
10724         (grub_env_get): Return the result of ENV->READ_HOOK rather than
10725         passing a pointer of a pointer.
10726         (grub_register_variable_hook): Change the types of "read_hook" and
10727         "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
10728         respectively.
10729         Allocate the default empty string on the heap, because this string
10730         may be freed later.
10732         * kern/device.c: Include grub/env.h.
10733         (grub_device_set_root): Removed.
10734         (grub_device_get_root): Likewise.
10735         (grub_device_open): Use grub_env_get instead of
10736         grub_device_get_root.
10738         * include/grub/env.h (grub_env_read_hook_t): New type.
10739         (grub_env_write_hook_t): Likewise.
10740         (grub_env_var): Change the types of "read_hook" and "write_hook"
10741         to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
10742         (grub_register_variable_hook): Likewise.
10744         * include/grub/device.h (grub_device_set_root): Removed.
10745         (grub_device_set_root): Likewise.
10747         * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
10748         make sure that DIRNAME terminates with '/', so that
10749         grub_fat_find_dir will fail if PATH is not a directory.
10751         * commands/ls.c (grub_ls_list_files): Remove the qualifier const
10752         from DIRNAME.
10753         Use the qualifier auto for print_files and print_files_long.
10754         If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
10755         as a regular file.
10756         Put a newline only if there is no error.
10757         (grub_cmd_ls): Remove grub_ls_print_files, because this is not
10758         used.
10760 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
10762         * kern/partition.c (grub_partition_probe): Initialize PART to
10763         NULL. Otherwise, when no partition map is registered, this returns
10764         a garbage.
10766 2005-07-19  Yoshinori K. Okuji  <okuji@enbug.org>
10768         * partmap/apple.c (apple_partition_map_iterate): Check if POS
10769         equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
10770         valid.
10772 2005-07-18  Yoshinori K. Okuji  <okuji@enbug.org>
10774         * commands/ls.c (grub_ls_list_disks): Print the filesystem
10775         information on each device, if it does not have partitions. Print
10776         "Device" instead of "Disk", because this function is not specific
10777         to disk devices.
10779         * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
10780         static to ensure that it is put on the memory rather than a
10781         register.
10783 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
10785         * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
10786         (grub_cat_init): Likewise.
10787         * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
10788         (options): Likewise.
10789         * commands/configfile.c (GRUB_MOD_INIT): Likewise.
10790         (grub_configfile_init): Likewise.
10791         * font/manager.c (GRUB_MOD_INIT): Likewise.
10792         * commands/help.c (GRUB_MOD_INIT): Likewise.
10793         (grub_help_init): Likewise.
10794         * normal/command.c (grub_command_init): Likewise.
10795         * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
10796         * disk/loopback.c (grub_loop_init): Likewise.
10797         (GRUB_MOD_INIT): Likewise.
10798         * commands/ls.c (grub_ls_init): Likewise.
10799         (GRUB_MOD_INIT): Likewise.
10800         (options): Likewise.
10801         * commands/boot.c (grub_boot_init): Likewise.
10802         (GRUB_MOD_INIT): Likewise.
10803         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
10804         * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
10805         (GRUB_MOD_INIT): Likewise.
10806         * commands/cmp.c (grub_cmp_init): Likewise.
10807         (GRUB_MOD_INIT): Likewise.
10809         * normal/arg.c: Use <> instead of "" to include header files.
10810         (SHORT_ARG_HELP): New macro.
10811         (SHORT_ARG_USAGE): Likewise.
10812         (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
10813         of 'h' and 'u' for help and usage, respectively. Use more GNU-like
10814         descriptions.
10815         (find_short): Check if C is 'h' or 'u' explicitly.
10816         (grub_arg_show_help): Use space characters instead of tabs. Treat
10817         SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
10818         are shown with --help and --usage only if they are not used for
10819         the command itself.
10820         (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
10821         'h' and 'u'.
10823         * include/grub/arg.h (struct grub_arg_option): Add the qualifier
10824         const into "longarg". Change the type of "shortarg" to int.
10826 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
10828         * boot/i386/pc/boot.S (boot_drive_check): New label.
10830         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
10831         macro.
10833         * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
10834         which do not pass a boot drive correctly. Copied from GRUB Legacy.
10836 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
10838         * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
10839         When turning off Gate A20, skip the check and return immediately,
10840         because this is not fatal usually.
10842 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
10844         * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
10845         be 0x7C00 instead of 0x8000.
10847         * boot/i386/pc/pxeboot.S: Rewritten.
10849         * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
10850         EXT_C.
10851         (gate_a20_check_state): Read a byte from 0x108000. Invert the
10852         result.
10854 2005-07-16  Yoshinori K. Okuji  <okuji@enbug.org>
10856         * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
10857         robustness. This routine now supports a BIOS call and System
10858         Control Port A to modify the gate A20.
10860         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
10861         Increased to 0x440.
10863 2005-07-12  Hollis Blanchard  <hollis@penguinppc.org>
10865         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
10866         device path and resulting ihandle.
10867         (grub_ofdisk_close): dprintf the ihandle being closed.
10868         (grub_ofdisk_read): dprintf function parameters.
10869         * kern/mm.c (grub_mm_init_region): Likewise.
10870         * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
10871         (grub_linux_boot): dprintf the Linux entry point, initrd address and
10872         size, and boot arguments.
10873         (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
10874         before loading into memory.
10875         (grub_rescue_cmd_initrd): dprintf the initrd's address and size
10876         before loading into memory.
10878 2005-07-12  Yoshinori K. Okuji  <okuji@enbug.org>
10880         * kern/mm.c: Added much documentation.
10881         (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
10882         8, set to 5 instead of 8.
10884 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
10886         * DISTLIST: Added util/i386/pc/grub-mkimage.c.
10888         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
10889         (grub_mkdevicemap_SOURCES): New variable.
10891         * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
10892         lib/device.c of GRUB Legacy.
10894 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
10896         * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
10897         instead of PATH is NULL.
10899 2005-07-09  Vincent Pelletier  <subdino2004@yahoo.fr>
10901         * commands/cmp.c (BUFFER_SIZE): New macro.
10902         (grub_cmd_cmp): Close the right file at the right time.  Compare
10903         only data just read.  Don't report files of different  size as
10904         identical.  Dynamically allocate buffers.  Move variable
10905         declarations at the beginning of function.
10907 2005-07-09  Yoshinori Okuji  <okuji@enbug.org>
10909         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
10910         reverse.
10912 2004-07-04  Vincent Pelletier  <subdino2004@yahoo.fr>
10914         * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
10915         when backspace is pressed at beginning of line.
10917 2005-07-03  Yoshinori Okuji  <okuji@enbug.org>
10919         * DISTLIST: Added genfslist.sh.
10921         * normal/main.c (fs_module_list): New variable.
10922         (autoload_fs_module): New function.
10923         (read_fs_list): Likewise.
10924         (grub_normal_execute): Call read_fs_list.
10926         * kern/fs.c (grub_fs_autoload_hook): New variable.
10927         (grub_fs_probe): Added support for auto-loading.
10929         * include/grub/normal.h (struct grub_fs_module_list): New struct.
10930         (grub_fs_module_list_t): New type.
10932         * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
10933         (grub_fs_autoload_hook): New prototype.
10935         * genfslist.sh: New file.
10937         * genmk.rb: Added a rule to generate a filesystem list.
10939 2005-06-30  Marco Gerards  <metgerards@student.han.nl>
10941         * configure.ac: Fix the test for cross-compiling.
10943         * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'.  Don't
10944         define GRUB_UTIL anymore.
10946         * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
10947         so this function works on other systems than just big endian.
10948         (load_modules): Likewise.
10949         (add_segments): Likewise.
10951 2005-06-23  Hollis Blanchard  <hollis@penguinppc.org>
10953         * kern/misc.c (grub_vsprintf): Add `longfmt'.  If format string
10954         contains `l' modifier, get a long from va_arg().
10956 2005-06-23  Yoshinori K. Okuji  <okuji@enbug.org>
10958         * kern/mm.c (grub_free): If the next free block which is being
10959         merged is the first free block, set the first block to the block
10960         being freed.
10961         Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
10963 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
10965         * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
10966         `grub_ieee1275_chosen'.
10968 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
10970         * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
10971         (grub_ieee1275_chosen): New variable.
10972         (cmain): Initialize and use `grub_ieee1275_chosen' instead of
10973         `chosen'.
10974         * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
10975         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
10976         Rename first argument to `phandle' for consistency.
10977         (grub_ieee1275_get_property_length): Likewise.
10978         (grub_ieee1275_next_property): Likewise.  Change type of first argument
10979         to grub_ieee1275_phandle_t.
10980         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
10981         Move export next to declaration.
10982         (grub_ieee1275_chosen): New variable.
10983         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
10984         Correct cosmetic typo.
10985         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
10986         `grub_ieee1275_chosen'.
10987         * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
10988         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
10989         (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
10990         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
10991         `grub_ieee1275_chosen'.
10993 2005-05-10  Hollis Blanchard  <hollis@penguinppc.org>
10995         * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
10996         /chosen/bootargs.
10997         * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
10998         /chosen/bootargs as "variable=value" pairs.
11000 2005-05-08  Vincent Pelletier  <subdino2004@yahoo.fr>
11002         * include/grub/misc.h (grub_dprintf): New macro.
11003         (grub_real_dprintf): New prototype.
11004         (grub_strword): Likewise.
11005         (grub_iswordseparator): Likewise.
11006         * kern/misc.c (grub_real_dprintf): New function.
11007         (grub_strword): Likewise.
11008         (grub_iswordseparator): Likewise.
11010 2005-04-30  Hollis Blanchard  <hollis@penguinppc.org>
11012         * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
11013         (roundup): Remove macro.
11014         (grub_ieee1275_flags): Make static.
11015         (grub_ieee1275_realmode): Remove.
11016         (grub_ieee1275_test_flag): New function.
11017         (grub_ieee1275_set_flag): Likewise.
11018         (find_options): Rename to `grub_ieee1275_find_options'; update
11019         callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
11020         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
11021         (cmain): New prototype.
11022         (cmain): Use `grub_ieee1275_set_flag' instead of accessing
11023         `grub_ieee1275_flags' directly.
11024         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
11025         machine/biosdisk.h.
11026         * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
11027         Don't include grub/machine/init.h.
11028         (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
11029         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
11030         Remove prototype.
11031         (grub_ieee1275_realmode): Likewise.
11032         (grub_ieee1275_flag): New enum.
11033         (grub_ieee1275_test_flag): New prototype.
11034         (grub_ieee1275_set_flag): New prototype.
11035         * include/grub/powerpc/ieee1275/init.h: Remove file.
11036         * include/grub/powerpc/ieee1275/ofdisk.h: New file.
11037         * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
11038         Include grub/machine/console.h.  Include grub/machine/ofdisk.h.
11039         (grub_machine_fini): Don't call `grub_ieee1275_release'.  Remove
11040         comment.
11041         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
11042         `grub_ieee1275_test_flag'.
11043         (grub_ieee1275_encode_devname): Likewise.
11045 2005-04-21  Hollis Blanchard  <hollis@penguinppc.org>
11047         * include/grub/powerpc/ieee1275/ieee1275.h
11048         (grub_ieee1275_encode_devname): New prototype.
11049         (grub_ieee1275_get_filename): Likewise.
11050         * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
11051         function.
11052         (grub_set_prefix): Likewise.
11053         (grub_machine_init): Call grub_set_prefix.
11054         * kern/powerpc/ieee1275/openfw.c: Fix typos.
11055         (grub_parse_type): New enum.
11056         (grub_ieee1275_get_devargs): New function.
11057         (grub_ieee1275_get_devname): Likewise.
11058         (grub_ieee1275_parse_args): Likewise.
11059         (grub_ieee1275_get_filename): Likewise.
11060         (grub_ieee1275_encode_devname): Likewise.
11062 2005-03-30  Marco Gerards  <metgerards@student.han.nl>
11064         * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
11065         `grub_loader_unset'.
11067 2005-03-26  Hollis Blanchard  <hollis@penguinppc.org>
11069         * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
11070         instead of grub_ieee1275_interpret.
11071         (grub_halt_init): New function.
11072         (grub_halt_fini): Likewise.
11073         (GRUB_MOD_INIT): Correct message grammar.
11074         * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
11075         instead of grub_ieee1275_interpret.
11076         (grub_reboot_init): New function.
11077         (grub_reboot_fini): Likewise.
11078         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
11079         commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
11080         util/i386/pc/misc.c with commands/ieee1275/halt.c,
11081         commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
11082         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
11083         function.
11084         * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
11085         Add prototype.
11086         * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
11087         prototype.
11088         (grub_halt): Likewise.
11089         * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
11090         (cmain): Remove __attribute__((unused)).
11091         * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
11092         (grub_heap_len): Likewise.
11093         (grub_machine_fini): New function.
11094         * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
11095         (grub_halt): Likewise.
11096         * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
11097         function.
11098         * util/powerpc/ieee1275/misc.c: New file.
11100 2005-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
11102         * DISTLIST: New file.
11103         * gendistlist.sh: Likewise.
11105         * Makefile.in (COMMON_DISTFILES): Removed.
11106         (BOOT_DISTFILES): Likewise.
11107         (CONF_DISTFILES): Likewise.
11108         (DISK_DISTFILES): Likewise.
11109         (FS_DISTFILES): Likewise.
11110         (INCLUDE_DISTFILES): Likewise.
11111         (KERN_DISTFILES): Likewise.
11112         (LOADER_DISTFILES): Likewise.
11113         (TERM_DISTFILES): Likewise.
11114         (UTIL_DISTFILES): Likewise.
11115         (DISTFILES): Likewise.
11116         (uninstall): Uninstall files in $(pkgdata_DATA).
11117         (DISTLIST): New target.
11118         (distdir): Use the contents of the file DISTLIST to get a list of
11119         distributed files.
11121 2005-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
11123         * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
11124         descriptor. This is ported from GRUB Legacy.
11126         * gencmdlist.sh: Added an extra semicolon to make it work with
11127         old sed versions. Reported by Robert Bihlmeyer
11128         <robbe@orcus.priv.at>.
11130 2005-03-08  Yoshinori Okuji  <okuji@enbug.org>
11132         Automatic loading of commands is supported.
11134         * normal/main.c (read_command_list): New function.
11135         (grub_normal_execute): Call read_command_list.
11137         * normal/command.c (grub_register_command): Return zero or CMD.
11138         Allocate CMD->NAME from the heap.
11139         Initialize CMD->MODULE_NAME to zero.
11140         Find the same name as well. If the same command is found and it is
11141         a dummy command, overwrite members. If it is not a dummy command,
11142         return zero.
11143         (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
11144         (grub_command_find): If a dummy command is found, load a module
11145         and retry to find a command only once.
11147         * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
11148         make sure that each command is loaded.
11150         * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
11151         macro.
11152         (struct grub_command): Remove const from the member `name'.
11153         Add a new member `module_name'.
11154         (grub_register_command): Return grub_command_t.
11156         * commands/help.c (grub_cmd_help): Call grub_command_find to make
11157         sure that each command is loaded.
11159         * genmk.rb (PModule::rule): Specify a module name without the
11160         suffix ".mod" to gencmdlist.sh.
11162 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
11164         * gencmdlist.sh: New file.
11166         * genmk.rb (PModule::rule): Generate a rule for a command list.
11167         Clean command.lst.
11168         Generate command.lst from $(COMMANDFILES).
11170         * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
11171         (DATA): Added $(pkgdata_DATA).
11172         (install-local): Install files in $(pkgdata_DATA).
11174 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
11176         * term/i386/pc/vga.c (debug_command): Removed.
11177         (GRUB_MOD_INIT): Do not register the command "debug".
11179         From Hollis Blanchard:
11180         * commands/configfile.c: New file.
11181         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11182         commands/configfile.c.
11183         (pkgdata_MODULES): Added configfile.mod.
11184         (configfile_mod_SOURCES): New variable.
11185         (configfile_mod_CFLAGS): Likewise.
11186         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
11187         commands/configfile.c.
11188         (pkgdata_MODULES): Added configfile.mod.
11189         (configfile_mod_SOURCES): New variable.
11190         (configfile_mod_CFLAGS): Likewise.
11191         * util/grub-emu.c (main): Call grub_configfile_init and
11192         grub_configfile_fini.
11193         * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
11194         prototype.
11195         [GRUB_UTIL] (grub_configfile_fini): Likewise.
11197 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
11199         * normal/arg.c (grub_arg_show_help): Do not show the bug report
11200         address.
11202         * commands/help.c (grub_cmd_help): Do not print newlines after
11203         the last command in print_command_help.
11205 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
11207         * commands/default.h: New file.
11208         * commands/timeout.h: Likewise.
11209         * normal/context.c: Likewise.
11211         * util/misc.c: Do not include sys/times.h.
11212         Include sys/time.h and grub/machine/time.h.
11213         (grub_get_rtc): Rewritten with gettimeofday.
11215         * util/grub-emu.c (main): Call grub_default_init and
11216         grub_timeout_init before grub_normal_init, and call
11217         grub_timeout_fini and grub_default_fini after grub_main.
11219         * util/console.c (grub_ncurses_checkkey): Return the read
11220         character or -1.
11222         * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
11223         timeouts.
11225         * normal/main.c (read_config_file): Push MENU. If this fails,
11226         print an error and wait for a user input.
11227         Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
11228         If a menu is empty or an error occurs, pop MENU.
11229         (grub_normal_execute): Pop and free MENU after grub_menu_run
11230         returns.
11232         * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
11234         * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
11235         include time.h.
11236         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
11237         without GRUB_UTIL.
11238         * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
11239         time.h.
11240         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
11241         without GRUB_UTIL.
11243         * include/grub/normal.h (struct grub_menu_list): New struct.
11244         (grub_menu_list_t): New type.
11245         (struct grub_context): New struct.
11246         (grub_context_t): New type.
11247         (grub_register_command): Got rid of EXPORT_FUNC.
11248         (grub_unregister_command): Likewise.
11249         (grub_context_get): New prototype.
11250         (grub_context_get_current_menu): Likewise.
11251         (grub_context_push_menu): Likewise.
11252         (grub_context_pop_menu): Likewise.
11253         [GRUB_UTIL] (grub_default_init): Likewise.
11254         [GRUB_UTIL] (grub_default_fini): Likewise.
11255         [GRUB_UTIL] (grub_timeout_init): Likewise.
11256         [GRUB_UTIL] (grub_timeout_fini): Likewise.
11258         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
11259         commands/timeout.c and normal/context.c.
11260         (pkgdata_MODULES): Added default.mod and timeout.mod.
11261         (normal_mod_SOURCES): Added normal/context.c.
11262         (default_mod_SOURCES): New variable.
11263         (default_mod_CFLAGS): Likewise.
11264         (timeout_mod_SOURCES): Likewise.
11265         (timeout_mod_CFLAGS): Likewise.
11266         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
11267         conf/i386-pc.rmk.
11268         (pkgdata_MODULES): Added default.mod and timeout.mod.
11269         (normal_mod_SOURCES): Added normal/context.c.
11270         (default_mod_SOURCES): New variable.
11271         (default_mod_CFLAGS): Likewise.
11272         (timeout_mod_SOURCES): Likewise.
11273         (timeout_mod_CFLAGS): Likewise.
11275         * Makefile.in (all-local): Added $(MKFILES).
11277 2005-02-21  Vincent Pelletier  <subdino2004@yahoo.fr>
11279         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
11280         (grub_emu_SOURCES): Likewise.
11281         (pkgdata_MODULES): Add `sun.mod'.
11282         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
11283         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11284         `partmap/sun.c'.
11285         (pkgdata_MODULES): Add `sun.mod'.
11286         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
11287         * include/grub/partition.h (grub_sun_partition_map_init): New
11288         prototype.
11289         (grub_sun_partition_map_fini): Likewise.
11290         * partmap/sun.c: New file.
11291         * util/grub-emu.c (main): Initialize and de-initialize the sun
11292         partitionmap support.
11294 2005-02-19  Yoshinori K. Okuji  <okuji@enbug.org>
11296         This implements an Emacs-like menu entry editor.
11298         * normal/menu_entry.c: New file.
11300         * util/console.c (grub_ncurses_putchar): Translate some Unicode
11301         characters to ASCII.
11302         (saved_char): New variable.
11303         (grub_ncurses_checkkey): Rewritten completely.
11304         (grub_ncurses_getkey): Likewise.
11305         (grub_ncurses_init): Call raw instead of cbreak.
11307         * normal/menu.c (print_entry): Do not put a space.
11308         (init_page): Renamed to ...
11309         (grub_menu_init_page): ... this. All callers changed.
11310         (edit_menu_entry): Removed.
11311         (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
11313         * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
11315         * kern/misc.c (grub_vprintf): Call grub_refresh.
11317         * normal/menu.c (DISP_LEFT): Renamed to ...
11318         * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
11319         * normal/menu.c (DISP_UP): Renamed to ...
11320         * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
11321         * normal/menu.c (DISP_RIGHT): Renamed to ...
11322         * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
11323         * normal/menu.c (DISP_DOWN): Renamed to ...
11324         * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
11325         * normal/menu.c (DISP_HLINE): Renamed to ...
11326         * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
11327         * normal/menu.c (DISP_VLINE): Renamed to ...
11328         * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
11329         * normal/menu.c (DISP_UL): Renamed to ...
11330         * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
11331         * normal/menu.c (DISP_UR): Renamed to ...
11332         * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
11333         * normal/menu.c (DISP_LL): Renamed to ...
11334         * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
11335         * normal/menu.c (DISP_LR): Renamed to ...
11336         * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
11337         * normal/menu.c (TERM_WIDTH): Renamed to ...
11338         * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
11339         * normal/menu.c (TERM_HEIGHT): Renamed to ...
11340         * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
11341         * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
11342         * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
11343         * normal/menu.c (TERM_MARGIN): Renamed to ...
11344         * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
11345         * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
11346         * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
11347         * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
11348         * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
11349         * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
11350         * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
11351         * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
11352         * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
11353         * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
11354         * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
11355         * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
11356         * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
11357         * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
11358         * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
11359         * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
11360         * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
11361         * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
11362         * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
11363         * normal/menu.c (TERM_CURSOR_X): Renamed to ...
11364         * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
11365         All callers changed.
11367         * include/grub/normal.h: New prototype.
11369         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11370         normal/menu_entry.c.
11371         (normal_mod_SOURCES): Likewise.
11372         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11373         (normal_mod_SOURCES): Likewise.
11375 2005-02-15  Yoshinori K. Okuji  <okuji@enbug.org>
11377         * include/grub/normal.h (grub_halt_init): New prototype.
11378         (grub_halt_fini): Likewise.
11379         (grub_reboot_init): Likewise.
11380         (grub_reboot_fini): Likewise.
11382         * util/grub-emu.c: Include signal.h.
11383         (main_env): New global variable.
11384         (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
11385         catch C-c.
11386         (grub_machine_fini): New function.
11387         (main): Call grub_halt_init and grub_reboot_init before
11388         grub_main, and grub_reboot_fini and grub_halt_fini after it.
11389         Call setjmp with MAIN_ENV to go back afterwards.
11390         Call grub_machine_fini right before return.
11392         * include/grub/util/misc.h: Include setjmp.h.
11393         (main_env): New prototype.
11395         * include/grub/kernel.h (grub_machine_fini): New prototype.
11396         * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
11397         * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
11399         * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
11400         * kern/i386/pc/init.c (grub_machine_fini): Likewise.
11401         * term/i386/pc/console.c (grub_console_fini): Likewise.
11403         * util/i386/pc/misc.c: New file.
11405         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11406         util/i386/pc/misc.c, commands/i386/pc/halt.c and
11407         commands/i386/pc/reboot.c.
11409 2005-02-14  Guillem Jover  <guillem@hadrons.org>
11411         * include/grub/dl.h (grub_dl_check_header): New prototype.
11412         (grub_arch_dl_check_header): Change return type to grub_err_t,
11413         remove size parameter and export function.  Update all callers.
11414         * kern/dl.c (grub_dl_check_header): New function.
11415         (grub_dl_load_core): Use `grub_dl_check_header' instead of
11416         `grub_arch_dl_check_header'.  Check ELF type.  Check if sections
11417         are inside the core.
11418         * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
11419         independent ELF header checks.
11420         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
11421         * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
11422         `grub_dl_check_header' instead of explicit checks.  Check for the
11423         ELF type.
11424         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
11425         `grub_dl_check_header' instead of explicit checks.  Remove arch
11426         specific ELF header checks.
11428         * util/grub-emu.c (grub_arch_dl_check_header): Remove the
11429         argument SIZE.
11431 2005-02-13  Hollis Blanchard  <hollis@penguinppc.org>
11433         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
11434         * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
11436 2005-02-12  Hollis Blanchard  <hollis@penguinppc.org>
11438         * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
11439         return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
11440         (part_map_iterate): Clear `grub_errno' and return 0 if
11441         `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
11442         * partmap/amiga.c (amiga_partition_map_iterate): Return
11443         GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
11444         * partmap/apple.c (apple_partition_map_iterate): Likewise.
11446 2005-02-01  Guillem Jover  <guillem@hadrons.org>
11448         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
11449         help info.
11451 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
11453         * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
11454         Removed prototype.
11455         (grub_rescue_cmd_linux): New prototype.
11456         (grub_rescue_cmd_initrd): Likewise.
11457         * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
11458         `bi_rec'.
11459         (grub_linux_release_mem): Release the memory for the initrd.
11460         (grub_load_linux): Renamed from this...
11461         (grub_rescue_cmd_linux): ...To this.  Changed all callers.
11462         Changed `entry' not to be static.  Loop over memory regions to
11463         find another one when the default fails.
11464         (grub_rescue_cmd_initrd): New function.
11465         (grub_linux_init): Remove function.
11466         (grub_linux_fini): Likewise.
11467         (GRUB_MOD_INIT): Register `initrd'.
11468         (GRUB_MOD_FINI): Unregister `initrd'.
11469         * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
11470         Function removed.
11471         (grub_linux_normal_fini): Likewise.
11472         (GRUB_MOD_INIT): Register `initrd'.
11473         (GRUB_MOD_FINI): Unregister `initrd'.
11475 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
11477         * commands/help.c: New file.
11478         * normal/arg.c (show_help): Renamed to...
11479         (grub_arg_show_help): ... this.
11480         * commands/i386/pc/halt.c: New file.
11481         * commands/i386/pc/reboot.c: Likewise.
11482         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
11483         (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
11484         (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
11485         (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
11486         variables.
11487         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11488         `commands/help.c'.
11489         (pkgdata_MODULES): Add `help.mod'.
11490         (help_mod_SOURCES, help_mod_CFLAGS): New variables.
11491         * grub/i386/pc/init.h (grub_reboot): New prototype.
11492         (grub_halt): Likewise.
11493         * include/grub/normal.h (grub_arg_show_help): New prototype.
11494         (grub_help_init): Likewise.
11495         (grub_help_fini): Likewise.
11496         * util/grub-emu.c (main): Initialize and deinitialize the help
11497         command.
11499         * normal/cmdline.c (grub_cmdline_get): Doc fix.
11501         * normal/command.c (grub_command_init): Fixed the description of
11502         the `set' and `unset' commands.
11504 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
11506         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
11507         function.
11508         * commands/ieee1275/halt.c: New file.
11509         * commands/ieee1275/reboot.c: Likewise.
11510         * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
11511         `__attribute__ ((unused))'.  Some GCS related fixed.
11512         (grub_suspend_init) [GRUB_UTIL]: Function removed.
11513         (grub_suspend_fini): Likewise.
11514         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
11515         and `halt.mod'.
11516         (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
11517         (halt_mod_CFLAGS): New variables.
11518         * include/grub/powerpc/ieee1275/ieee1275.h
11519         (grub_ieee1275_interpret): New prototype.
11521 2005-01-29  Yoshinori K. Okuji  <okuji@enbug.org>
11523         * include/grub/misc.h (memmove): New prototype.
11524         (memcpy): Likewise.
11526 2005-01-22  Hollis Blanchard  <hollis@penguinppc.org>
11528         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
11529         `devpath' to 0.  Use `name' instead of `devpath' with `grub_strndup'.
11531 2005-01-22  Marco Gerards  <metgerards@student.han.nl>
11533         * kern/misc.c (grub_strndup): Function rewritten.
11535 2005-01-22  Vincent Pelletier  <subdino2004@yahoo.fr>
11537         * normal/menu.c (TERM_WIDTH): Macro redefined.
11538         (TERM_TOP_BORDER_Y): Likewise.
11539         (draw_border): Replaced while-loop by a for-loop.  Make the number
11540         of lines consistent with the number of lines displayed in
11541         print_entries.  Added a margin below the rectangle.
11542         (print_entry): Make the entry fit in the rectangle.
11543         (print_entries): Display the scroll arrows next to the right
11544         border.
11546 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
11548         * fs/minix.c (grub_minix_find_file): Reserve more space for
11549         `fpath' so the \0 can be stored.  Use `grub_strcpy' instead of
11550         `grub_strncpy' to copy `path' into it.
11552 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
11554         Add the loopback device, a device via which files can be accessed
11555         as devices.
11557         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
11558         (pkgdata_MODULES): Add loopback.mod.
11559         (loopback_mod_SOURCES): New variable.
11560         (loopback_mod_CFLAGS): Likewise.
11561         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11562         `disk/loopback.c'.
11563         (pkgdata_MODULES): Add loopback.mod.
11564         (loopback_mod_SOURCES): New variable.
11565         (loopback_mod_CFLAGS): Likewise.
11566         * disk/loopback.c: new file.
11567         * include/grub/normal.h (grub_loop_init): New prototype.
11568         (grub_loop_fini): New prototype.
11569         * util/grub-emu.c (main): Initialize and de-initialize loopback
11570         support.
11571         * include/grub/disk.h (grub_disk_dev_id): Add
11572         `GRUB_DISK_DEVICE_LOOPBACK_ID'.
11574 2005-01-20  Hollis Blanchard  <hollis@penguinppc.org>
11576         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
11577         function.
11578         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
11579         (suspend_mod_SOURCES): New variable.
11580         (suspend_mod_CFLAGS): Likewise.
11581         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
11582         New prototype.
11583         * commands/ieee1275/suspend.c: New file.
11585 2005-01-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
11587         * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
11588         ((unused))' to `__attribute__ ((used))'.
11589         (GRUB_MOD_FINI): Likewise.
11590         * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
11591         * genmk.rb (PModule): Assign space to common symbols when linking
11592         modules.
11594 2005-01-20  Marco Gerards  <metgerards@student.han.nl>
11596         * include/grub/mm.h (grub_mm_init_region): Change the type of the
11597         `unsigned' arguments to `grub_size_t'.
11598         (grub_malloc): Likewise.
11599         (grub_realloc): Likewise.
11600         (grub_memalign): Likewise.
11601         * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
11602         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
11603         * util/misc.c (grub_malloc): Likewise.
11604         (grub_realloc): Likewise.
11605         * kern/mm.c (get_header_from_pointer): Change the casts to
11606         `unsigned' into a cast to `grub_size_t'.
11608         * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
11609         point to `currnode' when `currnode' is changed.
11611         * util/grub-emu.c (main): Initialize `progname'.  Reported by Nico
11612         Schottelius <nico-linux@schottelius.org>.
11614 2005-01-09  Hollis Blanchard  <hollis@penguinppc.org>
11616         * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
11617         (note_path): Remove variable.
11618         (GRUB_IEEE1275_NOTE_NAME): New macro.
11619         (GRUB_IEEE1275_NOTE_TYPE): Likewise.
11620         (grub_ieee1275_note_hdr): New structure.
11621         (grub_ieee1275_note_desc): Likewise.
11622         (grub_ieee1275_note): Likewise.
11623         (load_note): Remove `dir' argument.  All callers updated.  Remove
11624         `note_img' and `path'.  Do not load a file from `note_path'.
11625         Initialize a struct grub_ieee1275_note and write that to `out'.
11626         Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
11628 2005-01-05  Marco Gerards  <metgerards@student.han.nl>
11630         * util/misc.c (grub_util_read_image): Revert last change.  It
11631         called `grub_util_read_at', which seeks from the beginning of the
11632         file.
11634 2005-01-04  Hollis Blanchard  <hollis@penguinppc.org>
11636         * TODO: Add note about endianness in grub-mkimage.
11637         * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
11638         section.
11639         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
11640         (grub_mkimage_SOURCES): New target.
11641         * include/grub/kernel.h (grub_start_addr): Remove variable.
11642         (grub_end_addr): Likewise.
11643         (grub_total_module_size): Likewise.
11644         (grub_kernel_image_size): Likewise.
11645         (GRUB_MODULE_MAGIC): New constant.
11646         (grub_module_info): New structure.
11647         (grub_arch_modules_addr): New prototype.
11648         (grub_get_end_addr): Remove prototype.
11649         * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
11650         * include/grub/powerpc/ieee1275/kernel.h: New file.
11651         * include/grub/util/misc.h (grub_util_get_fp_size): New
11652         prototype.
11653         (grub_util_read_at): Likewise.
11654         (grub_util_write_image_at): Likewise.
11655         * kern/main.c (grub_get_end_addr): Remove function.
11656         (grub_load_modules): Call grub_arch_modules_addr instead of using
11657         grub_end_addr.  Look for a grub_module_info struct in memory.  Use
11658         the grub_module_info fields instead of calling grub_get_end_addr
11659         as loop conditions.  Move grub_add_unused_region code here.
11660         (grub_add_unused_region): Remove function.
11661         * kern/i386/pc/init.c: Include grub/cache.h.
11662         (grub_machine_init): Remove call to grub_get_end_addr.  Remove
11663         one call to add_mem_region.
11664         (grub_arch_modules_addr): New function.
11665         * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
11666         (grub_total_module_size): Likewise.
11667         Include grub/machine/kernel.h.
11668         (grub_arch_modules_addr): New function.
11669         * util/grub-emu.c (grub_end_addr): Remove variable.
11670         (grub_total_module_size): Likewise.
11671         (grub_arch_modules_addr): New function.
11672         * util/misc.c: Include unistd.h.
11673         (grub_util_get_fp_size): New function.
11674         (grub_util_read_at): Likewise.
11675         (grub_util_write_image_at): Likewise.
11676         (grub_util_read_image): Call grub_util_read_at.
11677         (grub_util_write_image): Call grub_util_write_image_at.
11678         * util/i386/pc/grub-mkimage.c (generate_image): Allocate
11679         additional memory in kernel_img for a struct grub_module_info.
11680         Fill in that grub_module_info.
11681         * util/powerpc/ieee1275/grub-mkimage.c: New file.
11683 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
11685         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
11686         New function.
11687         * include/grub/powerpc/ieee1275/ieee1275.h
11688         (grub_ieee1275_milliseconds): New prototype.
11689         * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
11690         Change to 1000.
11691         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
11692         grub_ieee1275_milliseconds.
11694 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
11696         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
11697         variable.
11698         (find_options): New function.
11699         (cmain): Call find_options.
11700         * include/grub/powerpc/ieee1275/ieee1275.h
11701         (grub_ieee1275_realmode): New extern variable.
11702         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
11703         grub_map if grub_ieee1275_realmode is false.
11705 2004-12-29  Marco Gerards  <metgerards@student.han.nl>
11707         * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
11708         lines are inserted and make it work like readline.  Reported by
11709         Vincent Pelletier <subdino2004@yahoo.fr>.
11711 2004-12-28  Marco Gerards  <metgerards@student.han.nl>
11713         * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
11715         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
11716         `kern/powerpc/cache.S'.
11718 2004-12-27  Marco Gerards  <metgerards@student.han.nl>
11720         * genmk.rb: Handle the `Program' class in the main loop.  Written
11721         by Johan Rydberg <jrydberg@gnu.org>.
11722         (Program): New class.
11723         (programs): New variable.
11724         * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
11725         instead of "grub/machine/ieee1275.h".  Include <grub/kernel.h>
11726         instead of "grub/kernel.h".  Include <grub/machine/init.h>.
11727         (help_arch): Function removed.
11728         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
11729         `powerpc/libgcc.h' and `loader.h'.
11730         (pkgdata_PROGRAMS): New variable.
11731         (sbin_UTILITIES): Variable removed.
11732         (grub_emu_SOURCES): Added kern/powerpc/cache.S.
11733         (grubof_SOURCES): Variable re-defined so it only includes the
11734         core functionality.
11735         (grubof_CFLAGS): Remove `-DGRUBOF'.
11736         (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
11737         (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
11738         (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
11739         (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
11740         (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
11741         (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
11742         (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
11743         (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
11744         (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
11745         (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
11746         (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
11747         (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
11748         (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
11749         (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
11750         (pc_mod_CFLAGS): New variables.
11751         * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
11752         (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
11753         * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
11754         * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
11755         Moved from here...
11756         * include/grub/i386/pc/init.h (grub_os_area_addr)
11757         (rub_os_area_size): ... to here.
11758         * include/grub/powerpc/ieee1275/ieee1275.h
11759         (grub_ieee1275_entry_fn): Export symbol.
11760         * include/grub/powerpc/ieee1275/init.h: New file.
11761         * include/grub/powerpc/libgcc.h: Likewise.
11762         * include/grub/cache.h: Likewise.
11763         * kern/powerpc/cache.S: Likewise.  Written by Hollis Blanchard
11764         <hollis@penguinppc.org>.
11765         * kern/dl.c: Include <grub/cache.h>.
11766         (grub_dl_flush_cache): New function.
11767         (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
11768         for this module.
11769         * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
11770         (grub_console_init): Removed prototypes.
11771         (grub_machine_init): Don't initialize the modules anymore.
11772         * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
11773         static.
11774         * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
11775         Macro undef removed.
11776         (GRUB_HOST_WORDS_BIGENDIAN): New macro.
11777         * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
11778         relocation `R_PPC_REL32'.  Return an error when the relocation is
11779         unknown.
11780         * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
11781         * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
11782         * util/misc.c (grub_arch_sync_caches): Likewise.
11784 2004-12-19  Marco Gerards  <metgerards@student.han.nl>
11786         * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
11787         `symlist.c', add `grubof_symlist.c'.
11788         (symlist.c): Variable removed.
11789         (grubof_HEADERS): Variable added.
11790         (grubof_symlist.c): New target.
11791         (kernel_syms.lst): Use `grubof_HEADERS' instead of
11792         `kernel_img_HEADERS'.
11793         (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
11794         * kern/powerpc/dl.c: New file.
11795         * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
11796         Function removed.
11797         (grub_arch_dl_relocate_symbols): Likewise.
11798         (grub_register_exported_symbols): Likewise.
11800 2004-12-13  Marco Gerards  <metgerards@student.han.nl>
11802         * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
11803         (grub_ext2_dir): Likewise.  Don't return in case of an error, jump
11804         to fail instead.  Reported by Vincent Pelletier
11805         <subdino2004@yahoo.fr>.
11807         * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
11808         it is not allocated.  Reported by Vincent Pelletier
11809         <subdino2004@yahoo.fr>.
11811         * normal/cmdline.c (grub_tab_complete): Add a blank line to the
11812         output so the output looks better.
11814 2004-12-04  Marco Gerards  <metgerards@student.han.nl>
11816         Modulize the partition map support and add support for the amiga
11817         partition map.
11819         * commands/ls.c: Include <grub/partition.h> instead of
11820         <grub/machine/partition.h>.
11821         * kern/disk.c: Likewise.
11822         * kern/rescue.c: Likewise.
11823         * loader/i386/pc/chainloader.c: Likewise.
11824         * normal/cmdline.c: Likewise.
11825         * kern/powerpc/ieee1275/init.c: Likewise.
11826         (grub_machine_init): Call `grub_pc_partition_map_init',
11827         `grub_amiga_partition_map_init' and
11828         `grub_apple_partition_map_init'.
11829         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
11830         `disk/i386/pc/partition.c'.  Add `kern/partition.c'.
11831         (kernel_img_HEADERS): Remove `machine/partition.h'.  Add
11832         `partition.h' and `pc_partition.h'.
11833         (grub_setup_SOURCES): Remove
11834         `disk/i386/pc/partition.c'.  Add `kern/partition.c',
11835         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
11836         (grub_emu_SOURCES): Likewise.
11837         (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
11838         (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
11839         (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
11840         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
11841         `disk/powerpc/ieee1275/partition.c'.  Add `kern/partition.c',
11842         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
11843         (grubof_SOURCES): Likewise.
11844         * disk/i386/pc/partition.c: File removed.
11845         * disk/powerpc/ieee1275/partition.c: Likewise.
11846         * include/grub/powerpc/ieee1275/partition.h: Likewise.
11847         * include/grub/i386/pc/partition.h: Likewise.
11848         * kern/partition.c: New file.
11849         * partmap/amiga.c: Likewise.
11850         * partmap/apple.c: Likewise.
11851         * partmap/pc.c: Likewise.
11852         * include/grub/partition.h: Likewise..
11853         * include/grub/pc_partition.h: Likewise.
11854         * util/grub-emu.c: Include <grub/partition.h> instead of
11855         <grub/machine/partition.h>.
11856         (main): Call `grub_pc_partition_map_init',
11857         `grub_amiga_partition_map_init' and
11858         `grub_apple_partition_map_init' and deinitialize afterwards.
11859         * util/i386/pc/biosdisk.c: Include `#include
11860         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
11861         `<grub/machine/partition.h>'.
11862         * util/i386/pc/grub-setup.c: Likewise.
11863         * util/i386/pc/biosdisk.c: Likewise.
11864         (grub_util_biosdisk_get_grub_dev): Only access the PC specific
11865         partition information in case of a PC partition.
11866         * util/i386/pc/grub-setup.c: Include `#include
11867         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
11868         `<grub/machine/partition.h>'.
11869         (setup): Only access the PC specific partition information in case
11870         of a PC partition.
11872 2004-11-17  Hollis Blanchard  <hollis@penguinppc.org>
11874         * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
11875         (grub_longjmp): Likewise.
11876         * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
11877         20.
11878         * normal/powerpc/setjmp.S: New file.
11879         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
11880         `normal/powerpc/setjmp.S'.
11881         (grubof_CFLAGS): Add `-DGRUBOF'.
11882         * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
11883         [GRUB_UTIL && !GRUBOF].
11885 2004-11-16  Marco Gerards  <metgerards@student.han.nl>
11887         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
11888         property named `name'.  Correctly handle the error returned by
11889         `grub_ieee1275_finddevice' if a device can not be opened.
11891 2004-11-02  Hollis Blanchard  <hollis@penguinppc.org>
11893         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
11894         `actual' for negativity.
11895         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
11896         kern/fshelp.c.
11898 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
11900         * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
11901         (PAGE_OFFSET): New macro.
11902         (CRTC_ADDR_PORT): Likewise.
11903         (CRTC_DATA_PORT): Likewise.
11904         (START_ADDR_HIGH_REGISTER): Likewise.
11905         (START_ADDR_LOW_REGISTER): Likewise.
11906         (GRAPHICS_ADDR_PORT): Likewise.
11907         (GRAPHICS_DATA_PORT): Likewise.
11908         (READ_MAP_REGISTER): Likewise.
11909         (INPUT_STATUS1_REGISTER): Likewise.
11910         (INPUT_STATUS1_VERTR_BIT): Likewise.
11911         (page): New variable.
11912         (wait_vretrace): New function.
11913         (set_read_map): Likewise.
11914         (set_start_address): Likewise.
11915         (grub_vga_init): Use mode 0x10 instead of mode 0x12.  Switch to
11916         the right page.
11917         (check_vga_mem): Take the page into account.
11918         (write_char): Likewise.
11919         (write_cursor): Likewise.
11920         (scroll_up): Likewise.  Copy the page to the page that is not
11921         shown and switch between both pages.
11922         (grub_vga_putchar): Fix off by one error.
11923         (grub_vga_cls): Wait for the vertical retrace.  Take the page into
11924         account.
11926 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
11928         Add support for iso9660 (including rockridge).
11930         * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
11931         (iso9660_mod_SOURCES): New variable.
11932         (iso9660_mod_CFLAGS): Likewise.
11933         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
11934         * include/grub/fs.h (grub_iso9660_init): New prototype.
11935         * util/grub-emu.c (main): Call `grub_iso9660_init'.
11936         * fs/iso9660.c: New file.
11938         * include/grub/misc.h (grub_strncat): New prototype.
11939         * kern/misc.c (grub_strncat): New function.
11941         * fs/hfs.c (grub_hfs_mount): Translate the error
11942         `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
11943         * fs/jfs.c (grub_jfs_mount): Likewise.
11944         * fs/ufs.c (grub_ufs_mount): Likewise.
11946 2004-10-28  Hollis Blanchard  <hollis@penguinppc.org>
11948         * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
11949         which initialized BAT registers.
11950         * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
11951         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
11952         Move from here...
11953         * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
11954         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
11955         ... to here.
11956         * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
11957         (grub_mapclaim): Likewise.
11958         * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
11959         grub_mapclaim instead of grub_ieee1275_claim.  Assign linux_addr by
11960         hand.
11962 2004-10-19  Hollis Blanchard  <hollis@penguinppc.org>
11964         * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
11965         (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
11966         -ffreestanding and -msoft-float.
11968 2004-10-15  Hollis Blanchard  <hollis@penguinppc.org>
11970         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
11971         append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
11972         set in grub_ieee1275_flags.
11974 2004-10-14  Hollis Blanchard  <hollis@penguinppc.org>
11976         * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
11977         prototype.
11978         * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
11979         grub_console_init first.
11980         Change the memory range used for grub_ieee1275_claim and
11981         grub_mm_init_region.
11982         Print an error message if the claim fails.
11983         Include <grub/misc.h>.
11985 2004-10-13  Hollis Blanchard  <hollis@penguinppc.org>
11987         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
11988         Call grub_children_iterate for device nodes of type `scsi',
11989         `ide', or `ata'.
11990         (grub_ofdisk_open): Remove manual device alias resolution.
11991         Fix memory leak when device cannot be opened.
11992         * include/grub/powerpc/ieee1275/ieee1275.h
11993         (grub_children_iterate): New prototype.
11994         * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
11995         New function.
11996         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
11997         Return -1 if args.size was -1.
11999 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
12001         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
12002         (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
12003         World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
12004         Open Firmware's memory for it; claim memory from _start to _end.
12005         * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
12006         (_end): New extern.
12007         (_start): Zero BSS from __bss_start to _end.
12008         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
12009         New extern.
12010         (GRUB_IEEE1275_NO_PARTITION_0): New #define.
12012 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
12014         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
12015         -1 if args.base was -1.
12017 2004-10-08  Hollis Blanchard  <hollis@penguinppc.org>
12019         * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
12020         escape sequence instead of a literal ^L. Also call
12021         grub_ofconsole_gotoxy.
12023 2004-10-03  Hollis Blanchard  <hollis@penguinppc.org>
12025         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
12026         void *  arguments to grub_addr_t.  All callers updated.  Also make
12027         the `result' argument optional.
12028         (grub_ieee1275_release): change void * arguments to grub_addr_t.
12029         All callers updated.
12031 2004-09-22  Hollis Blanchard  <hollis@penguinppc.org>
12033         * commands/ls.c (grub_ls_list_files): Use the string following the
12034         initial ')', if present, as the filesystem path.
12035         * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
12037         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
12039 2004-09-18  Yoshinori K. Okuji  <okuji@enbug.org>
12041         Make the source code of the menu interface more readable.
12043         * normal/menu.c: Include grub/mm.h.
12044         (TERM_WIDTH): New macro.
12045         (TERM_HEIGHT): Likewise.
12046         (TERM_INFO_HEIGHT): Likewise.
12047         (TERM_MARGIN): Likewise.
12048         (TERM_SCROLL_WIDTH): Likewise.
12049         (TERM_TOP_BORDER_Y): Likewise.
12050         (TERM_LEFT_BORDER_X): Likewise.
12051         (TERM_BORDER_WIDTH): Likewise.
12052         (TERM_MESSAGE_HEIGHT): Likewise.
12053         (TERM_BORDER_HEIGHT): Likewise.
12054         (TERM_NUM_ENTRIES): Likewise.
12055         (TERM_FIRST_ENTRY_Y): Likewise.
12056         (TERM_ENTRY_WIDTH): Likewise.
12057         (TERM_CURSOR_X): Likewise.
12058         (draw_border): Use macros instead of magic numbers.
12059         (print_entry): Likewise.
12060         (print_entries): Likewise.
12061         (run_menu): Likewise. Also, handle the key 'e'.
12062         (run_menu_entry): Ignore empty command lines.
12063         (print_message): Added a new argument EDIT. If EDIT is true,
12064         print a different message.
12065         (init_page): Likewise.
12066         (edit_menu_entry): New function. Not implemented yet.
12068 2004-09-17  Marco Gerards  <metgerards@student.han.nl>
12070         Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
12071         can be loaded from normal mode.
12073         * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
12074         `multiboot.mod'.
12075         (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
12076         (multiboot_mod_CFLAGS): New variables.
12077         * loader/i386/pc/linux_normal.c: New file.
12078         * loader/i386/pc/multiboot_normal.c: Likewise.
12080         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
12081         attribute `unused'.
12083         * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type.  Use
12084         `fdiro' to read the mode information from instead of `diro'.
12086         * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
12087         looking up a symlink.
12089         * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
12090         macro.
12091         * normal/command.c (grub_command_execute): Don't parse the
12092         arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
12093         flags of the command.
12095         * normal/menu.c (grub_menu_run): Fix typo.
12097 2004-09-14  Hollis Blanchard  <hollis@penguinppc.org>
12099         * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
12101         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
12102         `y + 1' instead of `y - 1'.
12104         * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
12106 2004-09-14  Yoshinori K. Okuji  <okuji@enbug.org>
12108         From Hollis Blanchard <hollis@penguinppc.org>:
12109         * kern/misc.c (memmove): New alias for grub_memmove.
12110         (memcmp): New alias for grub_memcmp.
12111         (memset): New alias for grub_memset.
12112         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
12113         Change "int handle" to "grub_ieee1275_phandle_t handle".
12114         * include/grub/powerpc/ieee1275/ieee1275.h
12115         (grub_ieee1275_get_property): Likewise.
12117 2004-09-12  Tomas Ebenlendr  <ebik@ucw.cz>
12119         Added normal mode command `chainloader' as module chain.mod, which
12120         depends on normal.mod and _chain.mod.
12122         * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
12123         (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
12124         * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
12125         Deleted prototype.
12126         * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
12127         but arguments parsing moved to ...
12128         (grub_chainloader_cmd): ... here.  New function.
12129         * include/grub/i386/pc/chainloader.h: New file.
12130         * loader/i386/pc/chainloader_normal.c: Likewise.
12132 2004-09-11  Marco Gerards  <metgerards@student.han.nl>
12134         * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
12135         (grub_mkimage_LDFLAGS): Likewise.
12136         (grub_emu_SOURCES): Likewise.
12137         (kernel_img_HEADERS): Added fshelp.h.
12138         * fs/ext2.c: Include <grub/fshelp.h>.
12139         (FILETYPE_REG): New macro.
12140         (FILETYPE_INO_REG): Likewise.
12141         (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
12142         Changed all users.
12143         (ext2_block_group): Renamed to `grub_ext2_block_group'.  Changed
12144         all users.
12145         (grub_fshelp_node): New struct.
12146         (grub_ext2_data): Added member `diropen'.  Changed member `inode'
12147         to a pointer.
12148         (grub_ext2_get_file_block): Removed function.
12149         (grub_ext2_read_block): New function.
12150         (grub_ext2_read_file): Replaced parameter `data' by `node'.
12151         This function was written.
12152         (grub_ext2_mount): Read the root inode.  Create a diropen struct.
12153         (grub_ext2_find_file): Removed function.
12154         (grub_ext2_read_symlink): New function.
12155         (grub_ext2_iterate_dir): Likewise.
12156         (grub_ext2_open): Rewritten.
12157         (grub_ext2_dir): Rewritten.
12158         * include/grub/fshelp.h: New file.
12159         * fs/fshelp.c: Likewise.
12161 2004-09-10  Yoshinori K. Okuji  <okuji@enbug.org>
12163         * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
12164         (print_message): Add a missing newline.
12165         (run_menu): Added timeout support.
12166         (run_menu_entry): New local function.
12167         (grub_menu_run): Added support for booting.
12169         * kern/loader.c (grub_loader_is_loaded): New function.
12171         * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
12172         (grub_get_rtc): Exported.
12174         * include/grub/i386/pc/time.h: Include grub/symbol.h.
12175         (grub_get_rtc): Exported.
12177         * include/grub/normal.h (struct grub_command_list): Remove
12178         constant from the member `command'.
12180         * include/grub/loader.h (grub_loader_is_loaded): Declared.
12182         * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
12184         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
12186 2004-08-28  Marco Gerards  <metgerards@student.han.nl>
12188         Add support for the JFS filesystem.
12190         * fs/jfs.c: New file.
12191         * include/grub/fs.h (grub_jfs_init): New prototype.
12192         (grub_jfs_fini): New prototype.
12193         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
12194         (grub_emu_SOURCES): Likewise.
12195         (pkgdata_MODULES): Add jfs.mod.
12196         (jfs_mod_SOURCES): New variable.
12197         (jfs_mod_CFLAGS): Likewise.
12198         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
12199         (grubof_SOURCES): Likewise.
12200         * util/grub-emu.c (main): Initialize and deinitialize JFS support.
12202         * fs/fat.c (grub_fat_find_dir): Convert the filename little
12203         endian to the host endian.
12204         (grub_fat_utf16_to_utf8): Move function from there...
12205         * kern/misc.c (grub_utf16_to_utf8): ...to here.  Do not convert
12206         the endianness of the source string anymore.
12207         * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
12209 2004-08-24  Marco Gerards  <metgerards@student.han.nl>
12211         * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
12212         (grub_boot_fini) [GRUB_UTIL]: Likewise.
12213         (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
12214         (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
12216         * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
12217         (grub_hfs_iterate_dir): Make the function static.  Add prototypes
12218         for `node_found' and `it_dir'.
12219         (grub_hfs_dir): Add prototype for `dir_hook'.
12221         * fs/minix.c (grub_minix_get_file_block): Add prototype for
12222         `grub_get_indir'.  Rename `indir' in two blocks to `indir16'
12223         and `indir32' to silence a gcc warning.
12225         * include/grub/fs.h (grub_hfs_init): New prototype.
12226         (grub_hfs_fini): Likewise.
12229 2004-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
12231         Each disk device has its own id now. This is useful to make use
12232         of multiple disk devices.
12234         * include/grub/disk.h (grub_disk_dev_id): New enum.
12235         (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
12236         (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
12238         * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
12239         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
12241         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
12242         GRUB_DISK_DEVICE_OFDISK_ID as an id.
12244         * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
12245         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
12247         * include/grub/disk.h (struct grub_disk_dev): Added a new member
12248         "id" which is used by the cache manager.
12250         * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
12251         of just "GRUB".
12253 2004-08-18  Marco Gerards  <metgerards@student.han.nl>
12255         * fs/hfs.c: New file.
12256         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
12257         (grub_emu_SOURCES): Likewise.
12258         (pkgdata_MODULES): Add hfs.mod.
12259         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
12260         (grubof_SOURCES): Likewise.
12261         * util/grub-emu.c (main): Initialize and deinitialize HFS support.
12263         * include/grub/misc.h (grub_strncasecmp): Add prototype.
12264         * kern/misc.c (grub_strncasecmp): Add function.
12266 2004-08-14  Marco Gerards  <metgerards@student.han.nl>
12268         * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
12269         with parentheses.
12271         * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
12272         (grub_ext2_dir): In case the directory entry type is unknown, read
12273         it from the inode.
12275 2004-08-02  Peter Bruin  <pjbruin@dds.nl>
12277         * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
12278         grub_load_linux instead of grub_rescue_cmd_linux as second
12279         argument of grub_rescue_register_command.
12281         * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
12283 2004-07-27  Marco Gerards  <metgerards@student.han.nl>
12285         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
12286         function.
12287         * commands/boot.c: Remove the check for `GRUB_UTIL'.
12288         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
12289         `loader/powerpc/ieee1275/linux.c',
12290         `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
12291         * include/grub/powerpc/ieee1275/ieee1275.h
12292         (grub_ieee1275_release): New prototype.
12293         * include/grub/powerpc/ieee1275/loader.h: Rewritten.
12294         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
12295         normal, boot, linux and linux_normal.
12296         * loader/powerpc/ieee1275/linux.c: New file.
12297         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
12299 2004-07-12  Marco Gerards  <metgerards@student.han.nl>
12301         * normal/arg.c (grub_arg_parse): Correct error handling after
12302         reallocating the argumentlist (check if `argl' is not null instead
12303         of checking if `args' is not null).
12304         * kern/mm.c (grub_realloc): Return the same pointer when using the
12305         same region, instead of returning the header address.
12307 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
12309         * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
12310         one block instead of two when looking for the initial partition.
12311         (grub_partition_probe): Initialize the local variable `p' with 0.
12312         Use base 10 for the grub_strtoul call.
12313         * kern/misc.c (grub_strncpy): Fix off by one bug.  Eliminated the
12314         need for one local variable.
12315         (grub_strtoul): Don't add the new value to `num', instead of that
12316         just assign it.
12318 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
12320         * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
12321         (pxeboot_img_SOURCES): New variable.
12322         (pxeboot_img_ASFLAGS): Likewise.
12323         (pxeboot_img_LDFLAGS): Likewise.
12324         * boot/i386/pc/pxeboot.S: New file.  Based on pxeloader.S from
12325         GRUB Legacy and boot.S.  Adopted for GRUB 2 by lode leroy
12326         <lode_leroy@hotmail.com>.
12328 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
12330         * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
12331         there was no input.
12333 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
12335         * normal/cmdline.c (grub_set_history): Fix off by one bug.  Fixed
12336         the history buffer logic.
12338 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
12340         * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
12341         (FILETYPE_INO_SYMLINK): New macros.
12342         (grub_ext2_find_file): Check if the node is a directory using the
12343         inode stat information instead of using the filetype in the
12344         dirent.  Exclude the first character of an absolute symlink.
12345         (grub_ext2_dir): Mask out the filetype part of the mode member of
12346         the inode.
12348 2004-05-24  Marco Gerards  <metgerards@student.han.nl>
12350         Add support for UFS version 1 and 2.  Add support for the minix
12351         filesystem version 1 and 2, both the variants with 14 and 30 long
12352         filenames.
12354         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
12355         fs/minix.c.
12356         (grub_emu_SOURCES): Likewise.
12357         (pkgdata_MODULES): Add ufs.mod and minix.mod.
12358         (ufs_mod_SOURCES): New variable.
12359         (ufs_mod_CFLAGS): Likewise.
12360         (minix_mod_SOURCES): Likewise.
12361         (minix_mod_CFLAGS): Likewise.
12362         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
12363         fs/minix.c.
12364         (grubof_SOURCES): Likewise.
12365         * fs/ufs.c: New file.
12366         * fs/minix.c: New file.
12367         * include/grub/fs.h (grub_ufs_init): New prototype.
12368         (grub_ufs_fini): Likewise.
12369         (grub_minix_init): Likewise.
12370         (grub_minix_fini): Likewise.
12371         * util/grub-emu.c (main): Initialize and deinitialize UFS and
12372         minix fs.
12374 2004-04-30  Jeroen Dekkers  <jeroen@dekkers.cx>
12376         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
12377         commands/ls.c, commands/terminal.c, commands/boot.c,
12378         commands/cmp.c and commands/cat.c.
12379         (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
12381         * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
12382         "env.h"
12384 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
12386         All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
12387         and grub_, respectively. Because the conversion is trivial and
12388         mechanical, I omit the details here. Please refer to the CVS
12389         if you need more information.
12391 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
12393         * include/pupa: Renamed to ...
12394         * include/grub: ... this.
12395         * util/i386/pc/pupa-mkimage.c: Renamed to ...
12396         * util/i386/pc/grub-mkimage.c: ... this.
12397         * util/i386/pc/pupa-setup.c: Renamed to ...
12398         * util/i386/pc/grub-setup.c: ... this.
12399         * util/pupa-emu.c: Renamed to ...
12400         * util/grub-emu.c: ... this.
12402 2004-03-29  Marco Gerards  <metgerards@student.han.nl>
12404         Add support for the newworld apple macintosh (PPC).  This has been
12405         tested on the powerbook 2000 only.  It only adds support for
12406         generic ieee1275 functions, console and disk support.  This should
12407         be easy to port to other architectures with support for Open
12408         Firmware.
12410         * configure.ac: Accept the powerpc as host_cpu.  In the case of
12411         the powerpc cpu set the host_vendor to ieee1275.  Make sure the i386
12412         specific tests are only executed while building for the i386.
12413         Inverse test for crosscompile.
12414         * genmk.rb (Utility): Allow assembler files.
12415         * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
12416         * conf/powerpc-ieee1275.rmk: New file.
12417         * disk/powerpc/ieee1275/ofdisk.c: Likewise.
12418         * disk/powerpc/ieee1275/partition.c: Likewise.
12419         * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
12420         * include/pupa/powerpc/ieee1275/console.h: Likewise.
12421         * include/pupa/powerpc/ieee1275/partition.h: Likewise.
12422         * include/pupa/powerpc/ieee1275/time.h: Likewise.
12423         * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
12424         * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
12425         * include/pupa/powerpc/ieee1275/loader.h
12426         * include/pupa/powerpc/setjmp.h: Likewise.
12427         * include/pupa/powerpc/types.h: Likewise.
12428         * kern/powerpc/ieee1275/init.c: Likewise.
12429         * kern/powerpc/ieee1275/openfw.c: Likewise.
12430         * term/powerpc/ieee1275/ofconsole.c: Likewise.
12432         These files were written by Johan Rydberg
12433         (jrydberg@night.trouble.net) and I only modified them slightly.
12435         * boot/powerpc/ieee1275/cmain.c: New file.
12436         * boot/powerpc/ieee1275/crt0.S: Likewise.
12437         * boot/powerpc/ieee1275/ieee1275.c: Likewise.
12438         * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
12440 2004-03-14  Jeroen Dekkers  <jeroen@dekkers.cx>
12442         * Makefile.in: Update copyright.
12443         * genmodsrc.sh: Likewise.
12444         * gensymlist.sh: Likewise.
12445         * term/i386/pc/vga.c: Indent correctly.
12447         * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
12448         bugreporting address.
12449         * util/i386/pc/pupa-setup.c (usage): Likewise,
12450         (main): Call pupa_ext2_init and pupa_ext2_fini.
12452         * fs/fat.c (log2): Renamed to ...
12453         (fat_log2): ... this.
12454         All callers changed.
12455         * kern/misc.c (memcpy): Alias to pupa_memmove.
12456         * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
12457         lvalue cast.
12458         * util/console.c (pupa_ncurses_fini): Return 0.
12460         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
12461         Move fail label here.
12462         [__GNU__]: Don't warn when using stat.
12463         (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
12464         (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
12465         long int. Use strtol instead of strtoul.
12467 2004-03-14  Marco Gerards  <metgerards@student.han.nl>
12469         * commands/boot.c: New file.
12470         * commands/cat.c: Likewise.
12471         * commands/cmp.c: Likewise.
12472         * commands/ls.c: Likewise.
12473         * commands/terminal.c: Likewise.
12474         * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
12475         (pupa_register_command): Changed interface to match the new
12476         argument parser.
12477         (pupa_command_execute): Changed (almost rewritten) so it uses
12478         pupa_split_command.  Added support for setting variables using the
12479         syntax `foo=bar'.
12480         (rescue_command): Changed to work with the new argument parser.
12481         (terminal_command): Moved from here to commands/terminal.c.
12482         (set_command): New function.
12483         (unset_command): New function.
12484         (insmod_command): New function.
12485         (rmmod_command): New function.
12486         (lsmod_command): New function.
12487         (pupa_command_init): Don't initialize the command terminal
12488         anymore.  Initialize the commands set, unset, insmod, rmmod and
12489         lsmod.
12490         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
12491         (kernel_img_HEADERS): Add arg.h and env.h.
12492         (pupa_mkimage_LDFLAGS): Add kern/env.c.
12493         (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
12494         commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
12495         normal/arg.c.
12496         (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
12497         terminal.mod.
12498         (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
12499         (boot_mod_SOURCES): New variable.
12500         (terminal_mod_SOURCES): Likewise.
12501         (ls_mod_SOURCES): Likewise.
12502         (cmp_mod_SOURCES): Likewise.
12503         (cat_mod_SOURCES): Likewise.
12505         * normal/arg.c: New file.
12506         * kern/env.c: Likewise.
12507         * include/pupa/arg.h: Likewise.
12508         * include/pupa/env.h: Likewise.
12509         * font/manager.c (font_command): Changed to match argument parsing
12510         interface changes.
12511         (PUPA_MOD_INIT): Likewise.
12512         * hello/hello.c (pupa_cmd_hello): Likewise.
12513         (PUPA_MOD_INIT): Likewise.
12514         * include/pupa/disk.h: Include <pupa/device.h>.
12515         (pupa_print_partinfo): New prototype.
12516         * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
12517         (pupa_dl_get_prefix): Likewise.
12518         * include/pupa/misc.h: Include <pupa/err.h>.
12519         (pupa_isgraph): New prototype.
12520         (pupa_isdigit): Likewise.
12521         (pupa_split_cmdline): Likewise.
12522         * include/pupa/normal.h: Include <pupa/arg.h>.
12523         (pupa_command): Changed the prototype of the member `func' to
12524         match the argument parsing interface.  Added member `options'.
12525         (pupa_register_command): Updated to match function.
12526         (pupa_arg_parse): New prototype.
12527         (pupa_hello_init) [PUPA_UTIL]: New prototype.
12528         (pupa_hello_fini) [PUPA_UTIL]: Likewise.
12529         (pupa_ls_init) [PUPA_UTIL]: Likewise.
12530         (pupa_ls_fini) [PUPA_UTIL]: Likewise.
12531         (pupa_cat_init) [PUPA_UTIL]: Likewise.
12532         (pupa_cat_fini) [PUPA_UTIL]: Likewise.
12533         (pupa_boot_init) [PUPA_UTIL]: Likewise.
12534         (pupa_boot_fini) [PUPA_UTIL]: Likewise.
12535         (pupa_cmp_init) [PUPA_UTIL]: Likewise.
12536         (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
12537         (pupa_terminal_init) [PUPA_UTIL]: Likewise.
12538         (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
12539         * kern/disk.c: Include <pupa/file.h>.
12540         (pupa_print_partinfo): New function.
12541         * kern/dl.c: Include <pupa/env.h>.
12542         (pupa_dl_dir): Variable removed.
12543         (pupa_dl_load): Use the environment variable `prefix' instead of
12544         the variable pupa_dl_dir.
12545         (pupa_dl_set_prefix): Function removed.
12546         (pupa_dl_get_prefix): Likewise.
12547         * kern/i386/pc/init.c: Include <pupa/env.h>.
12548         (pupa_machine_init): Use the environment variable `prefix' instead of
12549         using pupa_dl_set_prefix to set the prefix.
12550         * kern/main.c: Include <pupa/env.h>.
12551         (pupa_set_root_dev): Use the environment variable `prefix' instead of
12552         using pupa_dl_get_prefix to get the prefix.
12553         * kern/misc.c: Include <pupa/env.h>.
12554         (pupa_isdigit): New function.
12555         (pupa_isgraph): Likewise.
12556         (pupa_ftoa): Likewise.
12557         (pupa_vsprintf): Added support for printing values of the type
12558         `double'.  Make it possible to format variable output when using
12559         formatting like `%1.2%f'.
12560         (pupa_split_cmdline): New function.
12561         * kern/rescue.c: Include <pupa/env.h>.
12562         (next_word): Removed function.
12563         (pupa_rescue_cmd_prefix): Likewise.
12564         (pupa_rescue_cmd_set): New function.
12565         (pupa_rescue_cmd_unset): New function.
12566         (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
12567         split the command line instead of splitting it here.  Added
12568         support for setting variables using the syntax `foo=bar'.  Don't
12569         initialize the prefix command anymore.  Initialized the set and
12570         unset commands.
12571         * normal/cmdline.c: Include <pupa/env.h>.
12572         (pupa_tab_complete): Added prototypes for print_simple_completion,
12573         print_partition_completion, add_completion, iterate_commands,
12574         iterate_dev, iterate_part and iterate_dir. Moved code to print
12575         partition information from here to kern/disk.c.
12576         (pupa_cmdline_run): Don't check if the function exists anymore.
12577         * normal/main.c: Include <pupa/env.h>.
12578         (pupa_rescue_cmd_normal): Use the environment variable `prefix'
12579         instead of using pupa_dl_get_prefix to get the prefix.
12580         * term/i386/pc/vga.c: Include <pupa/arg.h>.
12581         (check_vga_mem): Cast pointers to `void *' to silence a gcc
12582         warning.
12583         (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
12584         (pupa_vga_setcolor): Declare unused variables with `__attribute__
12585         ((unused))' to silence a gcc warning.
12586         (pupa_vga_setcolor): Likewise.
12587         (debug_command): Changed to match argument parsing
12588         interface changes.
12589         * util/pupa-emu.c: Include <pupa/env.h>.
12590         (options): Added 0's for unused fields to silence a gcc warning.
12591         (argp): Likewise.
12592         (main): Use the environment variable `prefix' instead of using
12593         pupa_dl_set_prefix to set the prefix.  Initialize the commands ls,
12594         boot, cmp, cat and terminal.  Finish the commands boot, cmp, cat
12595         and terminal.
12597         * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
12598         * util/misc.c: Include <malloc.h>.
12599         (pupa_malloc): Rewritten so errors are correctly reported.
12600         (pupa_realloc): Likewise.
12601         (pupa_memalign): Likewise.
12602         (pupa_mm_init_region): Declare unused variables with
12603         `__attribute__ ((unused))' to silence a gcc warning.
12604         * normal/i386/setjmp.S: Remove tab at the end of the file to
12605         silence a gcc warning.
12606         * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
12607         variables with `__attribute__ ((unused))' to silence a gcc
12608         warning.
12609         * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
12610         local variable i unsigned to silence a gcc warning.
12612         * kern/term.c: Include <pupa/misc.h>.
12613         (pupa_more_lines): New variable.
12614         (pupa_more): Likewise.
12615         (pupa_putcode): When the pager is active pause at the end of every
12616         screen.
12617         (pupa_set_more): New function.
12618         * include/pupa/term.h (pupa_set_more): New prototype.
12621 2004-03-07  Yoshinori K. Okuji  <okuji@enbug.org>
12623         Now this project is GRUB 2 rather than PUPA. The location of
12624         the CVS repository was moved to GRUB's.
12626         * configure.ac: Use bug-grub as the reporting address.
12627         Use GRUB instead of PUPA.
12628         Change the version number to 1.90.
12630 2004-02-24  Yoshinori K. Okuji  <okuji@enbug.org>
12632         * genkernsyms.sh: Updated copyright information.
12633         * genmk.rb: Likewise.
12634         * genmodsrc.sh: Likewise.
12635         * gensymlist.sh: Likewise.
12636         * boot/i386/pc/boot.S: Likewise.
12637         * boot/i386/pc/diskboot.S: Likewise.
12638         * disk/i386/pc/biosdisk.c: Likewise.
12639         * disk/i386/pc/partition.c: Likewise.
12640         * font/manager.c: Likewise.
12641         * fs/ext2.c: Likewise.
12642         * fs/fat.c: Likewise.
12643         * include/pupa/boot.h: Likewise.
12644         * include/pupa/device.h: Likewise.
12645         * include/pupa/disk.h: Likewise.
12646         * include/pupa/dl.h: Likewise.
12647         * include/pupa/elf.h: Likewise.
12648         * include/pupa/err.h: Likewise.
12649         * include/pupa/file.h: Likewise.
12650         * include/pupa/font.h: Likewise.
12651         * include/pupa/fs.h: Likewise.
12652         * include/pupa/kernel.h: Likewise.
12653         * include/pupa/loader.h: Likewise.
12654         * include/pupa/misc.h: Likewise.
12655         * include/pupa/mm.h: Likewise.
12656         * include/pupa/net.h: Likewise.
12657         * include/pupa/normal.h: Likewise.
12658         * include/pupa/rescue.h: Likewise.
12659         * include/pupa/setjmp.h: Likewise.
12660         * include/pupa/symbol.h: Likewise.
12661         * include/pupa/term.h: Likewise.
12662         * include/pupa/types.h: Likewise.
12663         * include/pupa/i386/setjmp.h: Likewise.
12664         * include/pupa/i386/types.h: Likewise.
12665         * include/pupa/i386/pc/biosdisk.h: Likewise.
12666         * include/pupa/i386/pc/boot.h: Likewise.
12667         * include/pupa/i386/pc/console.h: Likewise.
12668         * include/pupa/i386/pc/init.h: Likewise.
12669         * include/pupa/i386/pc/kernel.h: Likewise.
12670         * include/pupa/i386/pc/linux.h: Likewise.
12671         * include/pupa/i386/pc/loader.h: Likewise.
12672         * include/pupa/i386/pc/memory.h: Likewise.
12673         * include/pupa/i386/pc/multiboot.h: Likewise.
12674         * include/pupa/i386/pc/partition.h: Likewise.
12675         * include/pupa/i386/pc/time.h: Likewise.
12676         * include/pupa/i386/pc/vga.h: Likewise.
12677         * include/pupa/i386/pc/util/biosdisk.h: Likewise.
12678         * include/pupa/util/getroot.h: Likewise.
12679         * include/pupa/util/misc.h: Likewise.
12680         * include/pupa/util/resolve.h: Likewise.
12681         * kern/device.c: Likewise.
12682         * kern/disk.c: Likewise.
12683         * kern/dl.c: Likewise.
12684         * kern/err.c: Likewise.
12685         * kern/file.c: Likewise.
12686         * kern/fs.c: Likewise.
12687         * kern/loader.c: Likewise.
12688         * kern/main.c: Likewise.
12689         * kern/misc.c: Likewise.
12690         * kern/mm.c: Likewise.
12691         * kern/rescue.c: Likewise.
12692         * kern/term.c: Likewise.
12693         * kern/i386/dl.c: Likewise.
12694         * kern/i386/pc/init.c: Likewise.
12695         * kern/i386/pc/lzo1x.S: Likewise.
12696         * kern/i386/pc/startup.S: Likewise.
12697         * loader/i386/pc/chainloader.c: Likewise.
12698         * loader/i386/pc/linux.c: Likewise.
12699         * loader/i386/pc/multiboot.c: Likewise.
12700         * normal/cmdline.c: Likewise.
12701         * normal/command.c: Likewise.
12702         * normal/main.c: Likewise.
12703         * normal/menu.c: Likewise.
12704         * normal/i386/setjmp.S: Likewise.
12705         * term/i386/pc/console.c: Likewise.
12706         * term/i386/pc/vga.c: Likewise.
12707         * util/console.c: Likewise.
12708         * util/genmoddep.c: Likewise.
12709         * util/misc.c: Likewise.
12710         * util/pupa-emu.c: Likewise.
12711         * util/resolve.c: Likewise.
12712         * util/unifont2pff.rb: Likewise.
12713         * util/i386/pc/biosdisk.c: Likewise.
12714         * util/i386/pc/getroot.c: Likewise.
12715         * util/i386/pc/pupa-mkimage.c: Likewise.
12716         * util/i386/pc/pupa-setup.c: Likewise.
12718 2004-02-15  Jeroen Dekkers  <jeroen@dekkers.cx>
12720         * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
12721         when it is EXT2_BLOCK_SIZE (data).  New argument READ_HOOK, all
12722         callers changed.  Set DATA->DISK->READ_HOOK to READ_HOOK before
12723         reading and reset it after reading.
12724         (pupa_ext2_close): Return PUPA_ERR_NONE.
12726         * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
12727         Correct value.
12728         (struct linux_kernel_header): Add kernel_version and
12729         initrd_addr_max.
12730         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
12731         pupa_file_read succeeds.
12732         (pupa_rescue_cmd_initrd): Implement.
12734 2003-12-03  Marco Gerards  <metgerards@student.han.nl>
12736         * fs/ext2.c (pupa_ext2_label): New function.
12737         (pupa_ext2_fs): Added label.
12738         * fs/fat.c (pupa_fat_label): New function.
12739         (pupa_fat_fs): Added label.
12740         * include/pupa/fs.h (struct pupa_fs): Added prototype label.
12742         * kern/misc.c (pupa_strndup): New function.
12743         * include/pupa/misc.h (pupa_strndup): New prototype.
12745         * include/pupa/normal.h: Include <pupa/err.h>.
12746         (pupa_set_history): New prototype.
12747         (pupa_iterate_commands): New prototype.
12748         * normal/cmdline.c: Include <pupa/machine/partition.h>,
12749         <pupa/disk.h>, <pupa/file.h>.
12750         (hist_size): New variable.
12751         (hist_lines): Likewise.
12752         (hist_end): Likewise.
12753         (hist_used): Likewise.
12754         (pupa_set_history): New function.
12755         (pupa_history_get): Likewise.
12756         (pupa_history_add): Likewise.
12757         (pupa_history_replace): Likewise.
12758         (pupa_tab_complete): Likewise.
12759         (pupa_cmdline_run): Added tab completion and history buffer.  Tab
12760         completion shows partitionnames while completing partitions, this
12761         feature was suggested by Jeff Bailey.
12762         * normal/command.c (pupa_iterate_commands): New function.
12763         * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
12764         (pupa_normal_init): Initialize history buffer.
12765         (PUPA_MOD_INIT): Likewise.
12766         (pupa_normal_fini): Free the history buffer.
12767         (PUPA_MOD_FINI): Likewise.
12769         * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
12770         key.
12772         * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
12773         * configure.ac [i386]: Check for regparam bug.
12774         (NESTED_FUNC_ATTR) [! i386]: Defined.
12776 2003-11-17  Marco Gerards  <metgerards@student.han.nl>
12778         * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
12779         (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
12780         (pupa_emu_SOURCES): New variable.
12781         (pupa_emu_LDFLAGS): Likewise.
12782         * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
12783         (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
12784         * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
12785         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
12786         * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
12787         (pupa_jmp_buf): New typedef.
12788         (pupa_setjmp) [PUPA_UTIL]: New macro.
12789         (pupa_longjmp) [PUPA_UTIL]: Likewise.
12790         * include/pupa/term.h (struct pupa_term): New member `refresh'.
12791         (pupa_refresh): New prototype.
12792         * include/pupa/util/getroot.h: New file.
12793         * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
12794         it.
12795         * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
12796         (pupa_rescue_cmd_cat): Likewise.
12797         (pupa_rescue_cmd_ls): Likewise.
12798         (pupa_rescue_cmd_testload): Likewise.
12799         (pupa_rescue_cmd_lsmod): Likewise.
12800         * normal/cmdline.c (pupa_cmdline_get): Likewise.
12801         * normal/menu.c (run_menu): Likewise.
12802         * kern/term.c (pupa_cls): Likewise.
12803         (pupa_refresh): New function.
12804         * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
12805         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
12806         * util/console.c: New file.
12808         * util/i386/pc/getroot.c: New file.
12809         * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
12810         (pupa_putchar): New function.
12811         (pupa_refresh): Likewise.
12812         (xgetcwd): Function moved to ...
12813         (strip_extra_slashes): Likewise.
12814         (get_prefix): Likewise.
12815         * util/i386/pc/getroot.c: ... here.
12816         (find_root_device): Function moved and renamed to...
12817         * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
12818         Changed all callers.
12819         * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
12820         and renamed to...
12821         * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
12822         Changed all callers.
12823         * util/misc.c (pupa_memalign): New function.
12824         (pupa_mm_init_region): Likewise.
12825         (pupa_register_exported_symbols): Likewise.
12826         (pupa_putchar): Function removed.
12827         * util/pupa-emu.c: New file.
12829 2003-11-16  Jeroen Dekkers  <jeroen@dekkers.cx>
12831         * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
12832         (_multiboot_mod_SOURCES): New variable.
12833         (_multiboot_mod_CFLAGS): Likewise.
12834         * loader/i386/pc/multiboot.c: New file.
12835         * include/pupa/i386/pc/multiboot.h: Likewise.
12836         * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
12837         (pupa_multiboot_real_boot): New function.
12838         * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
12839         (pupa_multiboot_real_boot): New prototype.
12840         (pupa_rescue_cmd_multiboot): Likewise
12841         (pupa_rescue_cmd_module): Likewise.
12843         * kern/loader.c (pupa_loader_set): Continue when
12844         pupa_loader_unload_func() fails.
12845         (pupa_loader_unset): New function.
12846         * include/pupa/loader.h (pupa_loader_unset): New prototype.
12848         * kern/misc.c (pupa_stpcpy): New function.
12849         * include/pupa/misc.h (pupa_stpcpy): New prototype.
12851 2003-11-12  Marco Gerards  <metgerards@student.han.nl>
12853         * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
12854         for available extensions.
12856         * include/pupa/i386/pc/time.h: New file.
12857         * kern/disk.c: Include <pupa/machine/time.h>.
12858         (PUPA_CACHE_TIMEOUT): New macro.
12859         (pupa_last_time): New variable.
12860         (pupa_disk_open): Flush the cache when there was a timeout.
12861         (pupa_disk_close): Reset the timer.
12862         * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
12863         pupa_currticks.
12864         * util/misc.c: Include <sys/times.h>
12865         (pupa_get_rtc): New function.
12867 2003-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
12869         * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
12870         as blocks.
12871         (pupa_ext2_get_file_block): Use blocks member.
12873         * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
12874         first block. Return -1 instead of pupa_errno on error.
12876 2003-10-27  Marco Gerards  <metgerards@student.han.nl>
12878         * README: In the pupa-mkimage example use _chain instead of chain
12879         and ext2 instead of fat.
12880         * TODO: Replace ext2fs with jfs as an example.  Add an item for
12881         adding journal playback for ext2fs.
12882         * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
12883         (pkgdata_MODULES): Added ext2.mod.
12884         (ext2_mod_SOURCES): New variable.
12885         (ext2_mod_CFLAGS): Likewise.
12886         * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
12887         * include/pupa/misc.h (pupa_strncpy): New prototype.
12888         (pupa_strcat): Likewise.
12889         (pupa_strncmp): Likewise.
12890         * kern/misc.c (pupa_strcat): Enable function.
12891         (pupa_strncpy): New function.
12892         (pupa_strncmp): Likewise.
12893         * fs/ext2.c: New file.
12895         * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
12896         when the read failed before retrying.
12897         * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
12898         (_FILE_OFFSET_BITS): Likewise.
12899         * configure.ac: Added AC_SYS_LARGEFILE.
12901 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
12903         * genmk.rb (PModule#rule): Make sure to get only symbol names
12904         from the output of nm.
12905         Reported by Robert Millan <zeratul2@wanadoo.es>.
12907 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
12909         I forgot to check in these changes for a long time. This adds
12910         incomplete support for VGA console, and this is still very
12911         buggy. Also, a lot of consideration is required for I18N,
12912         UNICODE, and VGA font issues. Therefore, assume that this is
12913         such that "better than nothing".
12915         * font/manager.c: New file.
12916         * include/pupa/font.h: Likewise.
12917         * include/pupa/i386/pc/vga.h: Likewise.
12918         * term/i386/pc/vga.c: Likewise.
12919         * util/unifont2pff.rb: Likewise.
12921         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
12922         (pkgdata_MODULES): Added vga.mod and font.mod.
12923         (vga_mod_SOURCES): New variables.
12924         (vga_mod_CFLAGS): Likewise.
12925         (font_mod_SOURCES): Likewise.
12926         (font_mod_CFLAGS): Likewise.
12928         * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
12930         * include/pupa/term.h: Include pupa/err.h.
12931         (struct pupa_term): Added init and fini.
12932         Changed the argument of putchar to pupa_uint32_t.
12934         * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
12935         (pupa_console_real_putchar): New prototype.
12936         (pupa_console_putchar): Removed.
12937         (pupa_console_checkkey): Exported.
12938         (pupa_console_getkey): Likewise.
12940         * kern/misc.c (pupa_vsprintf): Add support for UNICODE
12941         characters.
12943         * kern/term.c (pupa_term_set_current): Rewritten.
12944         (pupa_putchar): Likewise.
12945         (pupa_putcode): New function.
12947         * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
12948         (pupa_console_real_putchar): ... this.
12949         (pupa_vga_set_mode): New function.
12950         (pupa_vga_get_font): Likewise.
12952         * normal/command.c: Include pupa/term.h.
12953         (terminal_command): New function.
12954         (pupa_command_init): Register the command "terminal".
12956         * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
12957         (DISP_UP): Likewise.
12958         (DISP_RIGHT): Likewise.
12959         (DISP_DOWN): Likewise.
12960         (DISP_HLINE): Likewise.
12961         (DISP_VLINE): Likewise.
12962         (DISP_UL): Likewise.
12963         (DISP_UR): Likewise.
12964         (DISP_LL): Likewise.
12965         (DISP_LR): Likewise.
12967         * term/i386/pc/console.c (pupa_console_putchar): New function.
12969 2003-02-08  NIIBE Yutaka  <gniibe@m17n.org>
12971         * util/resolve.c (pupa_util_resolve_dependencies): BUG
12972         FIX. Reverse the path_list.
12974         * include/pupa/normal.h: Export pupa_register_command and
12975         pupa_unregister_command.
12977         * hello/hello.c (pupa_cmd_hello): New module.
12978         * conf/i386-pc.rmk: Added hello.mod.
12980 2003-01-31  Yoshinori K. Okuji  <okuji@enbug.org>
12982         * kern/i386/pc/lzo1x.S: New file.
12984         * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
12985         (compress_kernel): New variable.
12986         (generate_image): Heavily modified to support compressing a
12987         large part of the core image.
12989         * util/misc.c (pupa_util_read_image): Fix a file descriptor
12990         leak.
12991         (pupa_util_load_image): New function.
12993         * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
12994         (pupa_compressed_size): New variable.
12995         (codestart): Enable Gate A20 here.
12996         Decompress the compressed part of the core image.
12997         Rearrange the code to put functions and variables which are
12998         required for initialization in the non-compressed part.
12999         Include lzo1x.S.
13001         * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
13002         here.
13004         * include/pupa/util/misc.h (pupa_util_write_image): Declared.
13006         * include/pupa/i386/pc/kernel.h
13007         (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
13008         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
13009         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
13010         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
13011         (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
13013         * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
13015         * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
13016         (Utility#rule): Likewise.
13018         * configure.ac: Check if LZO is available.
13020 2003-01-20  Yoshinori K. Okuji  <okuji@enbug.org>
13022         * include/pupa/normal.h: New file.
13023         * include/pupa/setjmp.h: Likewise.
13024         * include/pupa/i386/setjmp.h: Likewise.
13025         * normal/cmdline.c: Likewise.
13026         * normal/command.c: Likewise.
13027         * normal/main.c: Likewise.
13028         * normal/menu.c: Likewise.
13029         * normal/i386/setjmp.S: Likewise.
13031         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
13032         (pupa_rescue_cmd_initrd): Likewise.
13034         * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
13035         Likewise.
13037         * kern/i386/pc/startup.S (translation_table): New variable.
13038         (translate_keycode): New function.
13039         (pupa_console_getkey): Call translate_keycode.
13041         * kern/rescue.c (attempt_normal_mode): New function.
13042         (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
13043         it failed, print a message.
13045         * kern/mm.c (pupa_real_malloc): Print more information when a
13046         free magic is broken.
13047         (pupa_free): If the first free header is not free actually, set
13048         it to P.
13050         * kern/main.c (pupa_load_normal_mode): Just load the module
13051         "normal".
13052         (pupa_main): Don't print the message
13053         "Entering into rescue mode..." here.
13055         * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
13056         Declared.
13057         (pupa_rescue_cmd_initrd): Likewise.
13058         (pupa_rescue_cmd_initrd): Likewise.
13060         * include/pupa/symbol.h (FUNCTION): Specify the type.
13061         (VARIABLE): Likewise.
13063         * include/pupa/err.h (pupa_err_t): Added
13064         PUPA_ERR_UNKNOWN_COMMAND.
13066         * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
13067         (pupa_dl_get_prefix): Likewise.
13069         * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
13070         Added _chain.mod and _linux.mod instead of chain.mod and
13071         linux.mod.
13072         (chain_mod_SOURCES): Renamed to ...
13073         (_chain_mod_SOURCES): ... this.
13074         (chain_mod_CFLAGS): Renamed to ...
13075         (_chain_mod_CFLAGS): ... this.
13076         (linux_mod_SOURCES): Renamed to ...
13077         (_linux_mod_SOURCES): ... this.
13078         (linux_mod_CFLAGS): Renamed to ...
13079         (_linux_mod_CFLAGS): ... this.
13080         (normal_mod_SOURCES): New variable.
13081         (normal_mod_CFLAGS): Likewise.
13082         (normal_mod_ASFLAGS): Likewise.
13084 2003-01-18  Yoshinori K. Okuji  <okuji@enbug.org>
13086         * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
13087         possible.
13089         * kern/dl.c (pupa_dl_ref): Refer depending modules
13090         recursively.
13091         (pupa_dl_unref): Unrefer depending modules recursively.
13092         Don't call pupa_dl_unload implicitly, because PUPA can crash if
13093         a module is unloaded before one depending on that module is
13094         unloaded.
13095         (pupa_dl_unload): Unload depending modules explicitly,
13096         if possible.
13098 2003-01-17  Yoshinori K. Okuji  <okuji@enbug.org>
13100         * include/pupa/i386/pc/linux.h: New file.
13101         * loader/i386/pc/linux.c: Likewise.
13103         * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
13104         Removed.
13105         (pupa_chainloader_unload): Return PUPA_ERR_NONE.
13106         (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
13107         of PUPA_CHAINLOADER_BOOT_SECTOR.
13109         * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
13110         (pupa_linux_prot_size): New variable.
13111         (pupa_linux_tmp_addr): Likewise.
13112         (pupa_linux_real_addr): Likewise.
13113         (pupa_linux_boot_zimage): New function.
13114         (pupa_linux_boot_bzimage): Likewise.
13116         * kern/i386/pc/init.c (struct mem_region): New structure.
13117         (MAX_REGIONS): New macro.
13118         (mem_regions): New variable.
13119         (num_regions): Likewise.
13120         (pupa_os_area_addr): Likewise.
13121         (pupa_os_area_size): Likewise.
13122         (pupa_lower_mem): Likewise.
13123         (pupa_upper_mem): Likewise.
13124         (add_mem_region): New function.
13125         (compact_mem_regions): Likewise.
13126         (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
13127         the size of the conventional memory and that of so-called upper
13128         memory (before the first memory hole).
13129         Instead of adding each found region to free memory, use
13130         add_mem_region and add them after removing overlaps.
13131         Also, add only 1/4 of the upper memory to free memory. The rest
13132         is used for loading OS images. Maybe this is ad hoc, but this
13133         makes it much easier to relocate OS images when booting.
13135         * kern/rescue.c (pupa_rescue_cmd_module): Removed.
13136         (pupa_enter_rescue_mode): Don't register initrd and module.
13138         * kern/mm.c: Include pupa/dl.h.
13140         * kern/main.c: Include pupa/file.h and pupa/device.h.
13142         * kern/loader.c (pupa_loader_load_module_func): Removed.
13143         (pupa_loader_load_module): Likewise.
13145         * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
13146         ``.o''.
13148         * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
13149         (pupa_linux_tmp_addr): Likewise.
13150         (pupa_linux_real_addr): Likewise.
13151         (pupa_linux_boot_zimage): Likewise.
13152         (pupa_linux_boot_bzimage): Likewise.
13154         * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
13155         (pupa_upper_mem): Likewise.
13156         (pupa_gate_a20): Don't export, because turning off Gate A20 in a
13157         module is too dangerous.
13159         * include/pupa/loader.h (pupa_os_area_addr): Declared.
13160         (pupa_os_area_size): Likewise.
13161         (pupa_loader_set): Remove the first argument. Loader doesn't
13162         manage modules or initrd any longer.
13163         (pupa_loader_load_module): Removed.
13165         * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
13166         (linux_mod_SOURCES): New variable.
13167         (linux_mod_CFLAGS): Likewise.
13169 2003-01-07  Yoshinori K. Okuji  <okuji@enbug.org>
13171         * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
13172         the length of a blocklist correctly.
13174         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
13175         Use ioctl only if the OS file is a block device.
13176         (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
13177         not very useful for normal files.
13179         * kern/main.c (pupa_set_root_dev): New function.
13180         (pupa_load_normal_mode): Likewise.
13181         (pupa_main): Call those above.
13183         * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
13184         pupa_uint16_t.
13186         * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
13188 2003-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
13190         * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
13191         (setup): Configure the installed partition information and the
13192         dl prefix.
13194         * loader/i386/pc/chainloader.c (my_mod): New variable.
13195         (pupa_chainloader_unload): New function.
13196         (pupa_rescue_cmd_chainloader): Refer itself.
13197         (PUPA_MOD_INIT): Save its own module in MY_MOD.
13199         * kern/i386/pc/startup.S (install_partition): Removed.
13200         (version_string): Likewise.
13201         (config_file): Likewise.
13202         (pupa_install_dos_part): New variable.
13203         (pupa_install_bsd_part): Likewise.
13204         (pupa_prefix): Likewise.
13205         (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
13207         * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
13208         and pupa/misc.h.
13209         (make_install_device): New function.
13210         (pupa_machine_init): Set the dl prefix.
13212         * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
13213         (buf): Renamed to ...
13214         (linebuf): ... this.
13215         (pupa_rescue_cmd_prefix): New function.
13216         (pupa_rescue_cmd_insmod): Likewise.
13217         (pupa_rescue_cmd_rmmod): Likewise.
13218         (pupa_rescue_cmd_lsmod): Likewise.
13219         (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
13220         rmmod and lsmod.
13222         * kern/mm.c (pupa_memalign): If failed even after invalidating
13223         disk caches, unload unneeded modules and retry.
13225         * kern/misc.c (pupa_memmove): New function.
13226         (pupa_memcpy): Removed.
13227         (pupa_strcpy): New function.
13228         (pupa_itoa): Made static.
13230         * kern/dl.c (pupa_dl_iterate): New function.
13231         (pupa_dl_ref): Likewise.
13232         (pupa_dl_unref): Likewise.
13233         (pupa_dl_unload): Return if succeeded or not.
13234         (pupa_dl_unload_unneeded): New function.
13235         (pupa_dl_unload_all): Likewise.
13236         (pupa_dl_init): Renamed to ...
13237         (pupa_dl_set_prefix): ... this.
13238         (pupa_dl_get_prefix): New function.
13240         * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
13241         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
13242         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
13243         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
13244         (pupa_install_dos_part): Declared.
13245         (pupa_install_bsd_part): Likewise.
13246         (pupa_prefix): Likewise.
13247         (pupa_boot_drive): Likewise.
13249         * include/pupa/types.h: Fix a typo.
13251         * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
13252         pupa_memmove.
13253         (pupa_memmove): Declared.
13254         (pupa_strcpy): Likewise.
13256         * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
13257         pupa_mod_init takes one argument, its own module.
13258         (pupa_dl_unload_unneeded): Declared.
13259         (pupa_dl_unload_all): Likewise.
13260         (pupa_dl_ref): Likewise.
13261         (pupa_dl_unref): Likewise.
13262         (pupa_dl_iterate): Likewise.
13263         (pupa_dl_init): Renamed to ...
13264         (pupa_dl_set_prefix): ... this.
13265         (pupa_dl_get_prefix): Declared.
13267         * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
13268         (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
13269         unloaded.
13270         (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
13271         (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
13273         * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
13274         -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
13276 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
13278         * util/i386/pc/pupa-setup.c (setup): Define the internal
13279         function find_first_partition_start at the top level, because GCC
13280         3.0.x cannot compile internal functions in deeper scopes
13281         correctly.
13282         (find_root_device): Use lstat instead of stat.
13283         Don't follow symbolic links.
13284         Fix the path-constructing code.
13286         * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
13287         (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
13288         by a BLKGETSIZE ioctl first, because block devices don't fill
13289         the member st_mode of the structure stat on Linux.
13290         [__linux__] (linux_find_partition): Use a temporary buffer
13291         REAL_DEV for the working space. Copy it to DEV before returning.
13292         (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
13293         buffer cache consistent.
13294         (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
13295         strncmp. The previous value was merely wrong.
13296         (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
13298         * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
13299         FAT size is 12. The previous value was merely wrong.
13301         * kern/main.c (pupa_main): Don't split the starting message from
13302         newlines.
13304         * kern/term.c (pupa_putchar): Put CR after LF instead of before
13305         LF, because BIOS goes crazy about character attributes in this
13306         case.
13308 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
13310         * include/i386/pc/util/biosdisk.h: New file.
13311         * util/i386/pc/biosdisk.c: Likewise.
13312         * util/i386/pc/pupa-setup.c: Likewise.
13314         * Makefile.in (INCLUDE_DISTFILES): Added
13315         include/pupa/i386/pc/util/biosdisk.h.
13316         (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
13317         directory util/i386/pc.
13318         (install-local): Added a rule for sbin_UTILITIES.
13319         (uninstall): Likewise.
13321         * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
13323         * util/misc.c (xrealloc): New function.
13324         (pupa_malloc): Likewise.
13325         (pupa_free): Likewise.
13326         (pupa_realloc): Likewise.
13327         (pupa_stop): Likewise.
13328         (pupa_putchar): Likewise.
13330         * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
13332         * include/pupa/util/misc.h (xrealloc): Declared.
13334         * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
13335         macro.
13336         (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
13337         (PUPA_BOOT_MACHINE_BPB_END): ... this.
13339         * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
13340         [PUPA_UTIL] (pupa_fat_fini): Likewise.
13342         * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
13343         way should be implemented.
13344         [PUPA_UTIL] (pupa_fat_fini): Likewise.
13346         * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
13347         the size of NAME for safety.
13348         (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
13349         0x88.
13351         * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
13352         (pupa_setup_SOURCES): Likewise.
13354         * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
13356 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
13358         * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
13359         bunch of pushl's from pusha, because this destroys the return
13360         value.
13362 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
13364         Use -mrtd and -mregparm=3 to reduce the generated code sizes.
13365         This means that any missing prototypes could be fatal. Also, you
13366         must take care when writing assembly code. See the comments at
13367         the beginning of startup.S, for more details.
13369         * kern/i386/pc/startup.S (pupa_halt): Modified for the new
13370         compilation mechanism.
13371         (pupa_chainloader_real_boot): Likewise.
13372         (pupa_biosdisk_rw_int13_extensions): Likewise.
13373         (pupa_biosdisk_rw_standard): Likewise.
13374         (pupa_biosdisk_check_int13_extensions): Likewise.
13375         (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
13376         (pupa_biosdisk_get_diskinfo_standard): Likewise.
13377         (pupa_get_memsize): Likewise.
13378         (pupa_get_mmap_entry): Likewise.
13379         (pupa_console_putchar): Likewise.
13380         (pupa_console_setcursor): Likewise.
13381         (pupa_getrtsecs): Use pushl instead of push.
13383         * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
13384         memory instead of the stack for a mmap entry, because some
13385         BIOSes may ignore the maximum size and overflow.
13387         * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
13389         * genmk.rb (PModule#rule): Compile automatically generated
13390         sources with module-specific CFLAGS as well as other sources.
13392 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
13394         * configure.ac: Check ld.
13395         Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
13396         respectively, before checking endianness and sizes.
13398         * Makefile.in (LD): New variable.
13400 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
13402         * Makefile.in (BUILD_CC): CC -> BUILD_CC.
13404 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
13406         * Changelog: New file.