2008-11-07 Robert Millan <rmh@aybabtu.com>
[grub2/phcoder.git] / ChangeLog
blobc00a0026e3125ff15338f2524e8246697cfc63ad
1 2008-11-07  Robert Millan  <rmh@aybabtu.com>
3         * include/multiboot2.h (struct multiboot_header): Add `flags' member as
4         per specification.
5         * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
6         * loader/multiboot_loader.c (find_multi_boot2_header): New function
7         (based on find_multi_boot1_header).
8         (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
9         using find_multi_boot2_header(), and abort if neither Multiboot or
10         Multiboot headers were found.
12 2008-11-07  Robert Millan  <rmh@aybabtu.com>
14         Modularize at_keyboard.mod:
16         * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
17         (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
18         (at_keyboard_mod_LDFLAGS): New variables.
20         Actual terminal split:
22         * include/grub/term.h (struct grub_term): Split in ...
23         (struct grub_term_input): ... this, and ...
24         (struct grub_term_output): ... this.  Update all users.
25         (grub_term_set_current): Split in ...
26         (grub_term_set_current_input): ... this, and ...
27         (grub_term_set_current_output): ... this.
28         (grub_term_get_current): Split in ...
29         (grub_term_get_current_input): ... this, and ...
30         (grub_term_get_current_output): ... this.
31         (grub_term_register): Split in ...
32         (grub_term_register_input): ... this, and ...
33         (grub_term_register_output): ... this.
34         (grub_term_unregister): Split in ...
35         (grub_term_unregister_input): ... this, and ...
36         (grub_term_unregister_output): ... this.
37         (grub_term_iterate): Split in ...
38         (grub_term_iterate_input): ... this, and ...
39         (grub_term_iterate_output): ... this.
41         * kern/term.c (grub_term_list): Split in ...
42         (grub_term_list_input): ... this, and ...
43         (grub_term_list_output): ... this.  Update all users.
44         (grub_cur_term): Split in ...
45         (grub_cur_term_input): ... this, and ...
46         (grub_cur_term_output): ... this.  Update all users.
47         (grub_term_set_current): Split in ...
48         (grub_term_set_current_input): ... this, and ...
49         (grub_term_set_current_output): ... this.
50         (grub_term_get_current): Split in ...
51         (grub_term_get_current_input): ... this, and ...
52         (grub_term_get_current_output): ... this.
53         (grub_term_register): Split in ...
54         (grub_term_register_input): ... this, and ...
55         (grub_term_register_output): ... this.
56         (grub_term_unregister): Split in ...
57         (grub_term_unregister_input): ... this, and ...
58         (grub_term_unregister_output): ... this.
59         (grub_term_iterate): Split in ...
60         (grub_term_iterate_input): ... this, and ...
61         (grub_term_iterate_output): ... this.
63         * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
64         a check for input and one for output (and only attempt to get keys
65         from user when input works).
67         * util/grub-probe.c (grub_term_get_current): Split in ...
68         (grub_term_get_current_input): ... this, and ...
69         (grub_term_get_current_output): ... this.
70         * util/grub-fstest.c: Likewise.
71         * util/i386/pc/grub-setup.c: Likewise.
72         * util/grub-editenv.c: Likewise.
74         Portability adjustments:
76         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
77         `term/i386/pc/at_keyboard.c'.
78         * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
79         grub_keyboard_controller_init() (now handled by terminal .init).
80         * kern/i386/coreboot/init.c (grub_machine_init): Add call to
81         grub_at_keyboard_init().
82         * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
83         (grub_console_checkkey, grub_console_getkey): Remove (now provided by
84         at_keyboard.mod via input terminal interface).
85         * include/grub/i386/coreboot/console.h: Convert into a stub for
86         `<grub/i386/pc/console.h>'.
88         Migrate full terminals to new API:
90         * term/efi/console.c (grub_console_term): Split into ...
91         (grub_console_term_input): ... this, and ...
92         (grub_console_term_output): ... this.  Update all users.
93         * term/ieee1275/ofconsole.c: Remove __i386__ hack.
94         (grub_ofconsole_init): Split into ...
95         (grub_ofconsole_init_input): ... this, and ...
96         (grub_ofconsole_init_output): ... this.
97         (grub_ofconsole_term): Split into ...
98         (grub_ofconsole_term_input): ... this, and ...
99         (grub_ofconsole_term_output): ... this.  Update all users.
100         * term/i386/pc/serial.c (grub_serial_term): Split into ...
101         (grub_serial_term_input): ... this, and ...
102         (grub_serial_term_output): ... this.  Update all users.
103         * term/i386/pc/console.c (grub_console_term): Split into ...
104         (grub_console_term_input): ... this, and ...
105         (grub_console_term_output): ... this.  Update all users.
106         (grub_console_term_input): Only enable it on PC/BIOS platform.
107         (grub_console_init): Remove grub_keyboard_controller_init() call.
109         Migrate input terminals to new API:
111         * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
112         `i386' and `i386/pc' to enable build on x86_64 (this driver is
113         i386-specific anyway).
114         (grub_console_checkkey): Rename to ...
115         (grub_at_keyboard_checkkey): ... this.  Static-ize.  Update all
116         users.
117         (grub_keyboard_controller_orig): New variable.
118         (grub_console_getkey): Rename to ...
119         (grub_at_keyboard_getkey): ... this.  Static-ize.  Update all
120         users.
121         (grub_keyboard_controller_init): Static-ize.  Save original
122         controller value so that it can be restored ...
123         (grub_keyboard_controller_fini): ... here (new function).
124         (grub_at_keyboard_term): New structure.
125         (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
126         functions.
128         Migrate output terminals to new API:
130         * term/i386/pc/vga.c (grub_vga_term): Change type to
131         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
132         members.  Update all users.
133         * term/gfxterm.c (grub_video_term): Change type to
134         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
135         members.  Update all users.
136         * include/grub/i386/pc/console.h (grub_console_checkkey)
137         (grub_console_getkey): Do not export (no longer needed by gfxterm,
138         etc).
140         Migrate `terminal' command and userland tools to new API:
142         * commands/terminal.c (grub_cmd_terminal): Split into ...
143         (grub_cmd_terminal_input): ... this, and ...
144         (grub_cmd_terminal_output): ... this.
145         (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
146         `terminal_input' and `terminal_output'.
147         * util/grub.d/00_header.in: Adjust `terminal' calls to new
148         `terminal_input' / `terminal_output' API.
149         * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
150         ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
151         provided ${GRUB_TERMINAL}, convert it).
153 2008-11-04  Robert Millan  <rmh@aybabtu.com>
155         * util/grub.d/10_freebsd.in: New file.  Generate grub configuration
156         for FreeBSD.
157         * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
159 2008-11-03  Bean  <bean123ch@gmail.com>
161         * kern/elf.c (grub_elf32_load): Revert to previous code.
162         (grub_elf64_load): Likewise.
164         * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
166 2008-11-01  Robert Millan  <rmh@aybabtu.com>
168         * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
169         (TARGET_CPPFLAGS): Likewise.
170         * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
172 2008-11-01  Carles Pina i Estany  <carles@pina.cat>
174         * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
176 2008-10-29  Guillem Jover <guillem.jover@nokia.com>
178         * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
179         addition of objects until the code is not going to be able to fail.
181 2008-10-29  Guillem Jover <guillem.jover@nokia.com>
183         * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
184         (add a missing NULL check, and correct them by moving the pointer
185         operations after the actual check).
187 2008-10-29  Robert Millan  <rmh@aybabtu.com>
189         * util/i386/pc/grub-install.in: Handle empty string as output from
190         make_system_path_relative_to_its_root().
192 2008-10-05  Hans Lambermont  <hans@lambermont.dyndns.org>
194         * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
195         circular metadata worst case scenario. If the metadata is circular
196         then copy the wrap in place.
197         * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
198         project lib/format_text/layout.h
199         Circular metadata bug found and patch debugged by Jan Derk Gerlings.
201 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
203         * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
205 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
207         * util/update-grub_lib.in: Mention filename in warning message.
209 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
211         * NEWS: Update for rename of update-grub to grub-mkconfig.
213 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
215         * util/update-grub_lib.in: Copy to ...
216         * util/grub-mkconfig_lib.in: ... this.  Update all users.
217         * util/update-grub_lib.in: Make it a stub to `grub-mkconfigig_lib.in'.
218         * util/update-grub.in: Rename to ...
219         * util/grub-mkconfig.in: ... this.  Update all users.  Remove `-y'
220         option. Add `--output' option to allow users to specify the generated
221         configuration file.  Default to stdout.
222         (update_grub_dir): Rename to ...
223         (grub_mkconfig_dir): ... this.
224         (grub_cfg): Default to an empty string.
225         * conf/common.rmk (update-grub): Rename to ...
226         (grub-mkconfig): ... this.
227         (update-grub_lib): Copy to ...
228         (grub-mkconfig_lib): ... this.
229         (update-grub_SCRIPTS): Copy to ...
230         (grub-mkconfig_SCRIPTS): ... this. Update all users.
231         (update-grub_DATA): Rename to ...
232         (grub-mkconfig_DATA): ... this.
234 2008-09-28  Robert Millan  <rmh@aybabtu.com>
236         * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
237         to `modified'.  Add the real `created' field.
238         (grub_iso9660_uuid): Use `modified' rather than `created' for
239         constructing the UUID.
241 2008-09-28  Felix Zielcke  <fzielcke@z-51.de>
243         fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
244         Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
246 2008-09-28  Bean  <bean123ch@gmail.com>
248         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
249         Thanks to Christian Franke for finding this bug.
251 2008-09-25  Robert Millan  <rmh@aybabtu.com>
253         * util/grub-mkdevicemap.c (make_device_map): Actually replace all
254         instances of grub_util_get_disk_name() (see previous commit).
256 2008-09-25  Robert Millan  <rmh@aybabtu.com>
258         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
259         `util/i386/get_disk_name.c'.
260         * conf/i386-efi.rmk: Likewise.
261         * conf/x86_64-efi.rmk: Likewise.
262         * conf/i386-coreboot.rmk: Likewise.
263         * conf/i386-ieee1275.rmk: Likewise.
264         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
265         `util/ieee1275/get_disk_name.c'.
266         * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
267         * util/ieee1275/get_disk_name.c: Remove file.
268         * util/i386/get_disk_name.c: Remove file.
269         * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
270         "hd%d" for device.map entries, rather than using
271         grub_util_get_disk_name().
273 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
275         * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
276         warning.
277         * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
279 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
281         * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
282         Changed to 0x5100.
283         (GRUB_TERM_PPAGE): Changed to 0x4900.
285 2008-09-24  Robert Millan  <rmh@aybabtu.com>
287         * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
288         macros (they were i386-pc specific).
289         * include/grub/sparc64/ieee1275/console.h: Likewise.
290         * include/grub/efi/console.h: Likewise.
292 2008-09-22  Bean  <bean123ch@gmail.com>
294         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
295         resident and in attribute list.
297         * include/grub/ntfs.h (BMP_LEN): Removed.
299 2008-09-22  Bean  <bean123ch@gmail.com>
301         * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
302         scsi->name and scsi->luns, as they will be set in grub_scsi_open.
304         * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
305         error occurs, as grub_disk_open will call grub_disk_close, which will
306         call p->close (scsi).
308 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
310         * configure.ac (AC_INIT): Quote `GRUB' string and version number.
311         (AC_PREREQ): Bumped to 2.59.
312         (AC_TRY_COMPILE): Replace obsolete macro with ...
313         (AC_COMPILE_IFELSE): ... this.
314         * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
315         (AC_LINK_IFELSE): ... this.
317 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
319         * autogen.sh: Add a call to `gendistlist.sh'.
321 2008-09-19  Christian Franke  <franke@computer.org>
323         * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
324         * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
325         * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
326         Export __enable_execute_stack() to modules.
327         * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
328         New function.
330 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
332         * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
333         Sort the list.
335 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
337         * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
338         #include <grub/util/hostdisk.h>.
340 2008-09-08  Robert Millan  <rmh@aybabtu.com>
342         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
343         segments when their filesz is zero (grub_file_read() interprets
344         zero-size as "read until EOF", which results in memory corruption).
345         Use `lowest_segment' rather than 0 for calculating the current
346         segment load address.
348 2008-09-08  Robert Millan  <rmh@aybabtu.com>
350         * util/hostdisk.c (open_device): Replace a grub_util_info() call
351         with grub_dprintf("hostdisk", ...), as it was so verbose that it
352         clobbered useful information.
354 2008-09-08  Robert Millan  <rmh@aybabtu.com>
356         * include/grub/util/biosdisk.h: Move to ...
357         * include/grub/util/hostdisk.h: ... here.  Update all users.
358         * util/biosdisk.c: Move to ...
359         * util/hostdisk.c: ... here.  Update all users.
361 2008-09-07  Robert Millan  <rmh@aybabtu.com>
363         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
364         variables.
365         (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
366         and length can be stored directly in the `mbi->mmap_addr' and
367         `mbi->mmap_length' struct fields.
369 2008-09-07  Robert Millan  <rmh@aybabtu.com>
371         * conf/i386.rmk: New file.  Provides declaration for building
372         `cpuid.mod'.
373         * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
374         (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
375         variables.
376         Include `conf/i386.mk'.
377         * conf/i386-efi.rmk: Likewise.
378         * conf/x86_64-efi.rmk: Likewise.
379         * conf/i386-coreboot.rmk: Likewise.
380         * conf/i386-ieee1275.rmk: Likewise.
382 2008-09-07  Vesa Jääskeläinen  <chaac@nic.fi>
384         Based on patch created by Colin D Bennett <colin@gibibit.com>.
385         Adds optimization support for BGR based modes.
387         * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
388         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
389         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
390         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
391         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
392         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
393         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
394         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
395         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
396         (grub_video_i386_vbeblit_index_index): Likewise.
397         (grub_video_i386_vbeblit_replace_directN): Added.
398         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
399         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
400         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
401         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
402         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
403         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
404         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
405         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
406         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
407         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
408         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
409         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
410         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
412         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
413         (grub_video_i386_vbefill_R8G8B8): Likewise.
414         (grub_video_i386_vbefill_index): Likewise.
415         (grub_video_i386_vbefill_direct32): Added.
416         (grub_video_i386_vbefill_direct24): Likewise.
417         (grub_video_i386_vbefill_direct16): Likewise.
418         (grub_video_i386_vbefill_direct8): Likewise.
420         * include/grub/video.h (grub_video_blit_format): Removed
421         GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
422         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
423         GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
424         GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
425         GRUB_VIDEO_BLIT_FORMAT_BGR_565.
427         * video/video.c (grub_video_get_blit_format): Updated to use new
428         blit formats.  Added handling for 16 bit color modes.
430         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
431         fillers.
432         (common_blitter): Updated to use new blitters.
434         * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
435         Removed.
436         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
437         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
438         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
439         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
440         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
441         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
442         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
443         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
444         (grub_video_i386_vbeblit_index_index): Likewise.
445         (grub_video_i386_vbeblit_replace_directN): Added.
446         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
447         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
448         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
449         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
450         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
451         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
452         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
453         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
454         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
455         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
456         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
457         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
458         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
460         * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
461         (grub_video_i386_vbefill_R8G8B8): Likewise.
462         (grub_video_i386_vbefill_index): Likewise.
463         (grub_video_i386_vbefill_direct32): Added.
464         (grub_video_i386_vbefill_direct24): Likewise.
465         (grub_video_i386_vbefill_direct16): Likewise.
466         (grub_video_i386_vbefill_direct8): Likewise.
468         * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
469         types.
471         * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
472         types.
474         * video/readers/png.c (grub_png_decode_image_header): Adapt to new
475         blitter types.
477         * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
478         types.
480 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
482         * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
483         RAID level 1.
485 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
487         * fs/iso9660.c (grub_iso9660_date): New structure.
488         (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
489         (grub_iso9660_uuid): New function.
491 2008-09-05  Bean  <bean123ch@gmail.com>
493         * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
495         * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
496         insensitive bit for names in Win32 and Win32 & DOS namespace.
498         * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
500         * include/grub/types.h (LONG_MAX): Likewise.
502 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
504         * util/getroot.c: Include <config.h>.
505         (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
506         add support for /dev/md/N devices and handle LVM double dash escaping.
508 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
510         * config.guess: Update to latest version from config git.
511         * config.sub: Likewise.
513 2008-09-03  Robert Millan  <rmh@aybabtu.com>
515         * disk/scsi.c (grub_scsi_open): Remove size limit when printing
516         `disk->total_sectors'.
518 2008-09-01  Colin D Bennett  <colin@gibibit.com>
520         * include/grub/normal.h: Fixed incorrect comment for
521         GRUB_COMMAND_FLAG_NO_ARG_PARSE.
523 2008-09-01  Colin D Bennett  <colin@gibibit.com>
525         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
526         values with defines.
528         * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
529         (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
530         (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
531         (GRUB_VBE_MODEATTR_COLOR): Likewise.
532         (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
533         (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
534         (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
535         (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
536         (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
537         (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
538         (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
539         (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
540         (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
541         (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
542         (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
543         (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
544         (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
545         (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
546         (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
548 2008-08-31  Robert Millan  <rmh@aybabtu.com>
550         * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
551         declaration.
552         (grub_multiboot): Fix a few warnings.
554 2008-08-31  Robert Millan  <rmh@aybabtu.com>
556         * loader/i386/pc/multiboot.c: Update comment not to say that
557         boot_device support is unimplemented.
559 2008-08-31  Robert Millan  <rmh@aybabtu.com>
561         * loader/i386/pc/multiboot.c: Update comment not to say that a.out
562         or memory map support are unimplemented.
564 2008-08-31  Colin D Bennett  <colin@gibibit.com>
566         * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
568 2008-08-31  Colin D Bennett  <colin@gibibit.com>
570         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
571         total video memory in 'vbeinfo' output; show color format details for
572         each video mode.
574 2008-08-30  Pavel Roskin  <proski@gnu.org>
576         * util/genmoddep.c: Remove for real this time.
577         * DISTLIST: Remove util/genmoddep.c.
579 2008-08-30  Robert Millan  <rmh@aybabtu.com>
581         * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
582         as required by Multiboot spec (it was already 4-byte aligned, but
583         only by chance).
585 2008-08-29  Pavel Roskin  <proski@gnu.org>
587         * kern/powerpc/ieee1275/crt0.S: Rename to ...
588         * kern/powerpc/ieee1275/startup.S: ... this.
589         * conf/powerpc-ieee1275.rmk: Adjust for the above.
590         * DISTLIST: Likewise.
592         * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
593         grub/cpu/kernel.h.  Add start label for consistency with other
594         platforms.  Add grub_prefix immediately after start.  Add jump
595         to the code after grub_prefix.
596         * include/grub/powerpc/kernel.h: Provide valid values for
597         GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
599 2008-08-29  Bean  <bean123ch@gmail.com>
601         * configure.ac: Change host_os to cygwin for mingw.
602         (asprintf): New check for function.
604         * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
605         #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
607         * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
608         declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
609         sync, sleep and grub_util_get_disk_size for mingw.
611         * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
612         to get size in mingw.
613         (open_device): Use flag O_BINARY if it's defined.
614         (find_root_device): Add dummy code for mingw.
616         * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
617         (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
618         (get_scsi_disk_name): Return 0 for mingw.
620         * util/hostfs.c: #include <grub/util/misc.h>.
621         (grub_hostfs_open): Use "rb" flag to open file, use
622         grub_util_get_disk_size to get disk size for mingw.
624         * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
625         (asprintf): New function if HAVE_ASPRINTF is not set.
626         (sync): New function for mingw.
627         (sleep): Likewise.
628         (grub_util_get_disk_size): Likewise.
630 2008-08-28  Pavel Roskin  <proski@gnu.org>
632         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
633         kern/time.c.
635 2008-08-28  Robert Millan  <rmh@aybabtu.com>
637         * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
639 2008-08-28  Robert Millan  <rmh@aybabtu.com>
641         Change find_grub_drive() syntax so it doesn't prevent it from
642         detecting NULL names as errors.
644         * util/biosdisk.c (find_grub_drive): Move free slot search code
645         from here ...
646         (find_free_slot): ... to here.
647         (read_device_map): Use find_free_slot() to search for free slots.
649 2008-08-27  Marco Gerards  <marco@gnu.org>
651         * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
652         (scsi_mod_SOURCES): New variable.
653         (scsi_mod_CFLAGS): Likewise
654         (scsi_mod_LDFLAGS): Likewise.
656         * disk/scsi.c: New file.
658         * include/grub/scsi.h: Likewise.
660         * include/grub/scsicmd.h: Likewise.
662         * disk/ata.c: Include <grub/scsi.h>.
663         (grub_atapi_packet): Do not use grub_ata_cmd, use registers
664         instead.
665         (grub_ata_iterate): Skip ATAPI devices.
666         (grub_ata_open): Only handle ATAPI devices.
667         (struct grub_atapi_read): Removed.
668         (grub_atapi_readsector): Likewise.
669         (grub_ata_read): No longer handle ATAPI devices.
670         (grub_ata_write): Likewise.
671         (grub_atapi_iterate): New function.
672         (grub_atapi_read): Likewise.
673         (grub_atapi_write): Likewise.
674         (grub_atapi_open): Likewise.
675         (grub_atapi_close): Likewise.
676         (grub_atapi_dev): New variable.
677         (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
678         (GRUB_MOD_FINI(ata)): Unregister ATAPI.
680         * include/grub/disk.h (enum grub_disk_dev_id): Add
681         `GRUB_DISK_DEVICE_SCSI_ID'.
683 2008-08-26  Robert Millan  <rmh@aybabtu.com>
685         * util/biosdisk.c (grub_util_biosdisk_open, open_device)
686         (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
687         descriptive.
689 2008-08-23  Bean  <bean123ch@gmail.com>
691         * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
692         (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
693         disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
694         (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
695         dm_nv.mod.
696         (raid5rec_mod_SOURCES): New macro.
697         (raid5rec_mod_CFLAGS): Likewise.
698         (raid5rec_mod_LDFLAGS): Likewise.
699         (raid6rec_mod_SOURCES): Likewise.
700         (raid6rec_mod_CFLAGS): Likewise.
701         (raid6rec_mod_LDFLAGS): Likewise.
702         (mdraid_mod_SOURCES): Likewise.
703         (mdraid_mod_CFLAGS): Likewise.
704         (mdraid_mod_LDFLAGS): Likewise.
705         (dm_nv_mod_SOURCES): Likewise.
706         (dm_nv_mod_CFLAGS): Likewise.
707         (dm_nv_mod_LDFLAGS): Likewise.
709         * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
710         (grub_emu_SOURCES):  Add disk/raid5_recover.c, disk/raid6_recover.c,
711         disk/mdraid_linux.c and disk/dmraid_nvidia.c.
713         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
714         disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
716         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
718         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
720         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
722         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
724         * disk/raid5_recover.c: New file.
726         * disk/raid6_recover.c: Likewise.
728         * disk/mdraid_linux.c: Likewise.
730         * disk/dmraid_nvidia.c: Likewise.
732         * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
733         ULONG_MAX.
735         * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
736         calculate the size of raid device.
737         (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
738         different layout of raid5.
739         (grub_raid_scan_device): Remove code specific to mdraid.
740         (grub_raid_list): New variable.
741         (free_array): New function.
742         (grub_raid_register): Likewise.
743         (grub_raid_unregister): Likewise.
744         (grub_raid_rescan): Likewise.
745         (GRUB_MOD_INIT): Don't iterate device here.
746         (GRUB_MOD_FINI): Use free_array to release resource.
748         * include/grub/raid.h: Remove macro and structure specific to mdraid.
749         (grub_raid5_recover_func_t): New function variable type.
750         (grub_raid6_recover_func_t): Likewise.
751         (grub_raid5_recover_func): New variable.
752         (grub_raid6_recover_func): Likewise.
753         (grub_raid_register): New function.
754         (grub_raid_unregister): Likewise.
755         (grub_raid_rescan): Likewise.
756         (grub_raid_block_xor): Likewise.
758         * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
759         (CMD_CRC): New macro.
760         (part): Removed.
761         (read_file): Handle device as well as file.
762         (cmd_crc): New function.
763         (fstest): Handle multiple disks.
764         (options): Remove part, raw and long, add root and diskcount.
765         (usage): Add crc, remove -p, -r, -l, add -r and -c.
766         (main): Find the first non option entry and ignore subsequence options,
767         add handling for the new options, support multiple disks.
769         * util/grub-probe.c (probe): Add mdraid to abstraction_name.
771 2008-08-23  Bean  <bean123ch@gmail.com>
773         * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
775         * genfslist.sh: Ignore kernel.mod.
777         * genpartmaplist.sh: Likewise.
779 2008-08-23  Robert Millan  <rmh@aybabtu.com>
781         * util/getroot.c (find_root_device): Skip anything that starts with
782         a dot, not just directories.  This avoids things like /dev/.tmp.md0.
784 2008-08-22  Felix Zielcke  <fzielcke@z-51.de>
786         * util/update-grub.in (GRUB_GFXMODE): Export variable.
787         * util/grub.d/00_header.in: Allow the administrator to change default
788         gfxmode via ${GRUB_GFXMODE}.
790 2008-08-21  Felix Zielcke  <fzielcke@z-51.de>
792         * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
794 2008-08-21  Robert Millan  <rmh@aybabtu.com>
796         * loader/i386/linux.c: New file.  Implements generic 32-bit Linux
797         loader.
798         * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
799         `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
801 2008-08-20  Carles Pina i Estany  <carles@pina.cat>
803         * menu/normal.c (run_menu): Replace hardcoded numbers with macros
804         (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
806 2008-08-19  Robert Millan  <rmh@aybabtu.com>
808         * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
809         (struct grub_virtual_screen): Remove `cursor_color'.
810         (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
811         initialization.
812         (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
814 2008-08-18  Robert Millan  <rmh@aybabtu.com>
816         Unify (identical) linux_normal.c files.
817         * loader/i386/efi/linux_normal.c: Move from here ...
818         * loader/linux_normal.c: ... to here.  Update all users.
819         * loader/i386/pc/linux_normal.c: Delete.  Update all users.
820         * loader/i386/ieee1275/linux_normal.c: Likewise.
822 2008-08-18  Robert Millan  <rmh@aybabtu.com>
824         * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
825         (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
826         (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
827         (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
828         (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
829         New macros.
830         (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
831         * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
832         (GRUB_LINUX_CL_END_OFFSET): ... to here.
833         * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
834         (GRUB_LINUX_CL_OFFSET): ... this.  Update all users.
835         (GRUB_EFI_CL_END_OFFSET): Rename to ...
836         (GRUB_LINUX_CL_END_OFFSET): ... this.  Update all users.
837         (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
838         Initialize `params->video_cursor_x' and `params->video_cursor_y'
839         portably using grub_getxy().
840         Replace `-EFI' with `-bzImage' in boot message.
842 2008-08-17  Robert Millan  <rmh@aybabtu.com>
844         * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
846 2008-08-17  Robert Millan  <rmh@aybabtu.com>
848         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
850         * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
851         (GRUB_MACHINE_MEMORY_RESERVED): New macros.
852         (grub_machine_mmap_iterate): New function declaration.
853         * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
854         structure.
855         (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
856         macros.
858         * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
859         type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
860         Move e820 parsing from here ...
861         * kern/i386/pc/mmap.c: New file.
862         (grub_machine_mmap_iterate): ... to here.
864         * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
865         (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
866         (GRUB_MACHINE_MEMORY_AVAILABLE): ... this.  Update all users.
867         (grub_available_iterate): Redeclare to return `void', and redeclare
868         its hook to use grub_uint64_t as addr and size parameters, and rename
869         to ...
870         (grub_machine_mmap_iterate): ... this.  Update all users.
872         * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
873         to make it more readable.  Rename to ...
874         (grub_machine_mmap_iterate): ... this.
876         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
877         (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
878         (grub_multiboot): Allocate an extra region after the payload, and fill
879         it with a Multiboot memory map.  Adjust a.out loader to calculate size
880         with the extra space.
881         (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
882         with the extra space.
884 2008-08-17  Carles Pina i Estany  <carles@pina.cat>
886         * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
888 2008-08-17  Felix Zielcke  <fzielcke@z-51.de>
890         * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
891         mdate-sh to the list `find' searches for.
892         * DISTLIST: Regenerated.
894 2008-08-16  Felix Zielcke  <fzielcke@z-51.de>
896         * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
897         genkernsyms.sh.  Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
898         genmoddep.awk, gensymlist.sh.in.
899         (DISTDIRS): Add bus, docs, hook, lib.
900         * DISTLIST: Regenerated.
901         * NEWS: Add cygwin support and change the `os-prober' entry a bit.
903 2008-08-16  Robert Millan  <rmh@aybabtu.com>
905         * disk/raid.c (grub_raid_init): Handle/report errors set by
906         grub_device_iterate().
907         * disk/lvm.c (grub_lvm_init): Likewise.
909 2008-08-15  Bean  <bean123ch@gmail.com>
911         * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
912         and datehook.mod.
913         (datetime_mod_SOURCES): New macro.
914         (datetime_mod_CFLAGS): Likewise.
915         (datetime_mod_LDFLAGS): Likewise.
916         (date_mod_SOURCES): Likewise.
917         (date_mod_CFLAGS): Likewise.
918         (date_mod_LDFLAGS): Likewise.
919         (datehook_mod_SOURCES): Likewise.
920         (datehook_mod_CFLAGS): Likewise.
921         (datehook_mod_LDFLAGS): Likewise.
923         * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
924         and datehook.mod.
925         (datetime_mod_SOURCES): New macro.
926         (datetime_mod_CFLAGS): Likewise.
927         (datetime_mod_LDFLAGS): Likewise.
928         (date_mod_SOURCES): Likewise.
929         (date_mod_CFLAGS): Likewise.
930         (date_mod_LDFLAGS): Likewise.
931         (datehook_mod_SOURCES): Likewise.
932         (datehook_mod_CFLAGS): Likewise.
933         (datehook_mod_LDFLAGS): Likewise.
935         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
936         and datehook.mod.
937         (datetime_mod_SOURCES): New macro.
938         (datetime_mod_CFLAGS): Likewise.
939         (datetime_mod_LDFLAGS): Likewise.
940         (date_mod_SOURCES): Likewise.
941         (date_mod_CFLAGS): Likewise.
942         (date_mod_LDFLAGS): Likewise.
943         (datehook_mod_SOURCES): Likewise.
944         (datehook_mod_CFLAGS): Likewise.
945         (datehook_mod_LDFLAGS): Likewise.
947         * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
948         and datehook.mod.
949         (datetime_mod_SOURCES): New macro.
950         (datetime_mod_CFLAGS): Likewise.
951         (datetime_mod_LDFLAGS): Likewise.
952         (date_mod_SOURCES): Likewise.
953         (date_mod_CFLAGS): Likewise.
954         (date_mod_LDFLAGS): Likewise.
955         (datehook_mod_SOURCES): Likewise.
956         (datehook_mod_CFLAGS): Likewise.
957         (datehook_mod_LDFLAGS): Likewise.
959         * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
960         and datehook.mod.
961         (datetime_mod_SOURCES): New macro.
962         (datetime_mod_CFLAGS): Likewise.
963         (datetime_mod_LDFLAGS): Likewise.
964         (date_mod_SOURCES): Likewise.
965         (date_mod_CFLAGS): Likewise.
966         (date_mod_LDFLAGS): Likewise.
967         (datehook_mod_SOURCES): Likewise.
968         (datehook_mod_CFLAGS): Likewise.
969         (datehook_mod_LDFLAGS): Likewise.
971         * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
973         * commands/date.c: New file.
975         * hook/datehook.c: Likewise.
977         * include/grub/lib/datetime.h: Likewise.
979         * include/grub/i386/cmos.h: Likewise.
981         * lib/datetime.c: Likewise.
983         * lib/i386/datetime.c: Likewise.
985         * lib/efi/datetime.c: Likewise.
987 2008-08-14  Robert Millan  <rmh@aybabtu.com>
989         * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
990         (grub_mkelfimage_SOURCES): New variable.
991         (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
993         * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
994         (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
995         * conf/powerpc-ieee1275.rmk: Likewise.
996         * conf/i386-ieee1275.rmk: Likewise.
998         * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
999         * kern/i386/coreboot/init.c: Likewise.
1001         * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
1002         with `<grub/cpu/kernel.h>'.
1003         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
1004         to ...
1005         (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
1006         * kern/i386/coreboot/startup.S: Likewise.
1008         * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
1009         (GRUB_MOD_GAP): Remove.
1010         * include/grub/powerpc/kernel.h: New file.
1011         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
1012         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
1013         * include/grub/i386/kernel.h: New file.
1014         * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
1015         (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
1016         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
1018         * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
1019         `grub-mkelfimage'.
1020         Use --directory when invoking grub_mkimage.
1022         * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
1023         (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
1024         GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
1025         and GRUB_KERNEL_CPU_PREFIX.
1027 2008-08-14  Felix Zielcke  <fzielcke@z-51.de>
1029         * include/grub/err.h (grub_err_printf): New function prototype.
1030         * util/misc.c (grub_err_printf): New function.
1031         * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
1032         grub_printf.
1033         * kern/err.c (grub_print_error): Use grub_err_printf.
1035 2008-08-13  Robert Millan  <rmh@aybabtu.com>
1037         * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
1039 2008-08-13  Robert Millan  <rmh@aybabtu.com>
1041         * docs/grub.cfg: Use the native device name for the example GNU/Hurd
1042         boot entry.
1044 2008-08-12  Robert Millan  <rmh@aybabtu.com>
1046         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
1047         of the relocation code from here ...
1048         (grub_multiboot): ... to here.
1049         (forward_relocator, backward_relocator): Move from here ...
1050         * kern/i386/loader.S (grub_multiboot_forward_relocator)
1051         (grub_multiboot_backward_relocator): ... to here.
1052         (grub_multiboot_real_boot): Use %edx for entry offset.  Put Multiboot
1053         magic in %eax.  Use %ebp for jumping (so %edx is not trashed).
1054         * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
1055         (grub_multiboot_forward_relocator_end)
1056         (grub_multiboot_backward_relocator)
1057         (grub_multiboot_backward_relocator_end): New variables.
1059 2008-08-12  Bean  <bean123ch@gmail.com>
1061         * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
1063 2008-08-11  Robert Millan  <rmh@aybabtu.com>
1065         * kern/i386/linuxbios/startup.S: Move from here ...
1066         * kern/i386/coreboot/startup.S: ... to here.
1068         * kern/i386/linuxbios/init.c: Move from here ...
1069         * kern/i386/coreboot/init.c: ... to here.
1071         * kern/i386/linuxbios/table.c: Move from here ...
1072         * kern/i386/coreboot/mmap.c: ... to here.
1074         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
1076 2008-08-11  Robert Millan  <rmh@aybabtu.com>
1078         * kern/device.c (grub_device_open): Do not handle grub_disk_open()
1079         errors.  Leave it to the upper layer to handle them.
1081 2008-08-09  Christian Franke  <franke@computer.org>
1083         * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
1084         * conf/common.rmk: Install `grub-pe2elf' only if requested.
1085         Install `grub.d/10_windows' only on Cygwin.
1086         * configure.ac: Add subst of `target_os'.
1087         Check `target_os' also before setting TARGET_OBJ2ELF.
1088         Add `--enable-grub-pe2elf'.
1090 2008-08-08  Robert Millan  <rmh@aybabtu.com>
1092         * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
1093         (grub_last_time): Change type to grub_uint64_t.
1094         (grub_disk_open): Migrate code from to using grub_get_time_ms().
1095         (grub_disk_close): Likewise.
1097         * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
1098         (run_menu): Migrate code from to using grub_get_time_ms().
1100         * util/misc.c (grub_get_time_ms): New function.
1102 2008-08-08  Marco Gerards  <marco@gnu.org>
1104         * disk/ata.c (grub_ata_regget): Change return type to
1105         `grub_uint8_t'.
1106         (grub_ata_regget2): Likewise.
1107         (grub_ata_wait_status): New function.
1108         (grub_ata_wait_busy): Removed function, updated all users to use
1109         `grub_ata_wait_status'.
1110         (grub_ata_wait_drq): Likewise.
1111         (grub_ata_cmd): New function.
1112         (grub_ata_pio_read): Change return type to `grub_uint8_t'.  Add
1113         error handling.
1114         (grub_ata_pio_write): Add error handling.
1115         (grub_atapi_identify): Likewise.
1116         (grub_atapi_packet): Use `grub_ata_cmd' and improve error
1117         handling.
1118         (grub_ata_identify): Use `grub_ata_cmd' and improve error
1119         handling.  Actually use the detected registers.  Reorder the
1120         detection logic such that it is easier to read.
1121         (grub_ata_pciinit): Do not assign the same ID to each controller.
1122         (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
1123         handling.
1124         (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
1126         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
1128 2008-08-08  Marco Gerards  <marco@gnu.org>
1130         * NEWS: Update.
1132 2008-08-07  Bean  <bean123ch@gmail.com>
1134         * include/grub/x86_64/pci.h: New file.
1136 2008-08-07  Christian Franke  <franke@computer.org>
1138         * kern/i386/pit.c (TIMER2_SPEAKER): New define.
1139         (TIMER2_GATE): Likewise.
1140         (grub_pit_wait): Add enable/disable of the timer2 gate
1141         bit of port 0x61.  This fixes a possible infinite loop.
1143 2008-08-07  Bean  <bean123ch@gmail.com>
1145         * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
1146         kern/i386/tsc.c and kern/i386/pit.c.
1148         * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
1149         x86_64 platform.
1151         * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
1152         <grub/i386/tsc.h>.
1154         * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
1156 2008-08-07  Bean  <bean123ch@gmail.com>
1158         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
1160         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
1162         * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
1163         multiple inclusion. Add #include <grub/types.h>.
1165 2008-08-06  Christian Franke  <franke@computer.org>
1167         * conf/common.rmk: Build and install `10_windows'.
1168         * util/grub.d/10_windows.in: New script.
1170 2008-08-06  Pavel Roskin  <proski@gnu.org>
1172         * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
1174 2008-08-06  Robert Millan  <rmh@aybabtu.com>
1176         * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
1177         * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
1179 2008-08-06  Bean  <bean123ch@gmail.com>
1181         * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
1182         (grub_pxefs_fs_int): Remove dummy definition.
1183         (grub_pxefs_open): Use data->block_size to store the current block
1184         size setting.
1185         (grub_pxefs_read): Use block size stored in data->block_size. As the
1186         value of grub_pxe_blksize can be changed after the file is opened.
1188 2008-08-06  Bean  <bean123ch@gmail.com>
1190         * fs/i386/pc/pxe.c (curr_file): new variable.
1191         (grub_pxefs_open): Simply the handling of pxe file system. Don't
1192         require the dummy internal file system anymore.
1193         (grub_pxefs_read): Removed.
1194         (grub_pxefs_close): Likewise.
1195         (grub_pxefs_fs_int): Likewise.
1196         (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
1197         connection when we switch file.
1198         (grub_pxefs_close_int): Renamed to grub_pxefs_close.
1200 2008-08-06  Robert Millan  <rmh@aybabtu.com>
1202         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
1203         `halt.mod'.
1204         (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
1205         (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
1207         * kern/i386/halt.c: New file.
1208         * kern/i386/reboot.c: Likewise.
1209         * include/grub/i386/reboot.h: Likewise.
1210         * include/grub/i386/halt.h: Likewise.
1212         * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
1213         Include `<grub/cpu/halt.h>'.
1214         * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
1215         [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
1217         * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
1218         (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
1219         (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
1220         (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
1221         (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
1222         (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
1223         from here ...
1224         * include/grub/i386/at_keyboard.h: ... to here.
1226 2008-08-05  Robert Millan  <rmh@aybabtu.com>
1228         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
1229         * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
1230         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
1231         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
1232         `kern/generic/millisleep.c'.
1234         * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
1235         instead of grub_get_rtc().
1236         (grub_tsc_init): Initialize `tsc_boot_time'.
1238         * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
1239         (grub_machine_init): Use grub_tsc_init() rather than
1240         installing an RTC-based handler via grub_install_get_time_ms().
1242         * kern/i386/pit.c: New file.
1243         * include/grub/i386/pit.h: Likewise.
1245 2008-08-05  Bean  <bean123ch@gmail.com>
1247         * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
1249         * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
1250         (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
1251         (pxe_mod_SOURCES): New macro.
1252         (pxe_mod_CFLAGS): Likewise.
1253         (pxe_mod_LDFLAGS): Likewise.
1254         (pxecmd_mod_SOURCES): Likewise.
1255         (pxecmd_mod_CFLAGS): Likewise.
1256         (pxecmd_mod_LDFLAGS): Likewise.
1258         * kern/i386/pc/startup.S (grub_pxe_scan): New function.
1259         (grub_pxe_call): Likewise.
1261         * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
1263         * commands/i386/pc/pxecmd.c: New file.
1265         * fs/i386/pc/pxe.c: Likewise.
1267         * include/grub/i386/pc/pxe.h: Likewise.
1269 2008-08-05  Bean  <bean123ch@gmail.com>
1271         * util/console.c (grub_console_cur_color): New variable.
1272         (grub_console_standard_color): Likewise.
1273         (grub_console_normal_color): Likewise.
1274         (grub_console_highlight_color): Likewise.
1275         (color_map): Likewise.
1276         (use_color): Likewise.
1277         (NUM_COLORS): New macro.
1278         (grub_ncurses_setcolorstate): Handle color properly.
1279         (grub_ncurses_setcolor): Don't change color here, just remember the
1280         settings, color will be set in grub_ncurses_setcolorstate.
1281         (grub_ncurses_getcolor): New function.
1282         (grub_ncurses_init): Initialize color pairs.
1283         (grub_ncurses_term): New member grub_ncurses_getcolor.
1285 2008-08-05  Colin D Bennett  <colin@gibibit.com>
1287         High resolution timer support.  Implemented for x86 CPUs using TSC.
1288         Extracted generic grub_millisleep() so it's linked in only as needed.
1289         This requires a Pentium compatible CPU; if the RDTSC instruction is
1290         not supported, then it falls back on the generic grub_get_time_ms()
1291         implementation that uses the machine's RTC.
1293         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
1294         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
1295         `kern/generic/millisleep.c'.
1297         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
1298         `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
1300         * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
1301         `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
1303         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
1305         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
1306         `kern/generic/millisleep.c'.
1308         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
1310         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
1312         * kern/generic/rtc_get_time_ms.c: New file.
1314         * kern/generic/millisleep.c: New file.
1316         * kern/misc.c: Don't include
1317         <kern/time.h> anymore.
1318         (grub_millisleep_generic): Removed.
1320         * commands/sleep.c (grub_interruptible_millisleep): Uses
1321         grub_get_time_ms() instead of grub_get_rtc().
1323         * include/grub/i386/tsc.h (grub_get_tsc): New file.  New inline
1324         function.
1325         (grub_cpu_is_cpuid_supported): New inline function.
1326         (grub_cpu_is_tsc_supported): New inline function.
1327         (grub_tsc_init): New function prototype.
1328         (grub_tsc_get_time_ms): New function prototype.
1330         * kern/i386/tsc.c (grub_get_time_ms): New file.
1332         * include/grub/time.h: Include <grub/types.h.
1333         (grub_millisleep_generic): Removed.
1334         (grub_get_time_ms): New prototype.
1335         (grub_install_get_time_ms): New prototype.
1336         (grub_rtc_get_time_ms): New prototype.
1338         * kern/time.c (grub_get_time_ms): New function.
1339         (grub_install_get_time_ms): New function.
1341         * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>.  Don't include
1342         <grub/time.h> anymore.
1343         (grub_millisleep): Removed.
1344         (grub_machine_init): Call grub_tsc_init.
1346         * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
1347         get_time_ms() implementation.
1349         * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
1350         (ieee1275_get_time_ms): New function.
1351         (grub_machine_init): Install get_time_ms() implementation.
1353         * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
1354         (grub_machine_init): Call grub_tsc_init().
1355         (grub_millisleep): Removed.
1357         * kern/ieee1275/init.c (grub_millisleep): Removed.
1358         (grub_machine_init): Install ieee1275_get_time_ms()
1359         implementation.
1360         (ieee1275_get_time_ms): New function.
1361         (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
1362         real work.
1364 2008-08-05  Marco Gerards  <marco@gnu.org>
1366         * disk/ata.c: Include <grub/pci.h>.
1367         (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
1368         (grub_ata_initialize): Rewritten.
1369         (grub_ata_device_initialize): New function.
1371 2008-08-04  Pavel Roskin  <proski@gnu.org>
1373         * kern/main.c: Include grub/mm.h.
1375 2008-08-04  Robert Millan  <rmh@aybabtu.com>
1377         * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
1378         (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
1379         corruption problem).
1381 2008-08-04  Robert Millan  <rmh@aybabtu.com>
1383         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
1384         warnings introduced in my last commit.
1386 2008-08-03  Robert Millan  <rmh@aybabtu.com>
1388         Make PCI available on all i386 architectures.
1390         * include/grub/i386/pc/pci.h: Move from here ...
1391         * include/grub/i386/pci.h: ... to here.
1393         * include/grub/i386/pc/pci.h: Remove.
1394         * include/grub/i386/efi/pci.h: Remove.
1395         * include/grub/x86_64/efi/pci.h: Remove.
1397         * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
1398         `<grub/cpu/pci.h>'.
1400         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
1401         (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
1402         (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
1404         * conf/i386-ieee1275.rmk: Likewise.
1406 2008-08-03  Robert Millan  <rmh@aybabtu.com>
1408         * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
1409         (grub_console_setcursor): Make it possible to set cursor off.
1411 2008-08-03  Robert Millan  <rmh@aybabtu.com>
1413         * util/grub.d/00_header.in: Be platform-agnostic.  Probe for existence
1414         of modules instead of assuming which platform provides what.
1415         * util/update-grub.in: Likewise.
1417 2008-08-03  Robert Millan  <rmh@aybabtu.com>
1419         * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
1420         instead of `grub_install_dos_part' to determine whether a drive needs
1421         to be prepended to prefix (`grub_install_dos_part' is not reliable,
1422         because it can be overridden when loading GRUB via Multiboot).
1424 2008-08-02  Robert Millan  <rmh@aybabtu.com>
1426         * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
1428 2008-08-02  Robert Millan  <rmh@aybabtu.com>
1430         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
1431         of informational grub_dprintf() calls.
1433 2008-08-02  Robert Millan  <rmh@aybabtu.com>
1435         * disk/memdisk.c (memdisk_size): Don't initialize.
1436         (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
1438         * include/grub/i386/pc/kernel.h
1439         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
1440         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
1441         (grub_memdisk_image_size, grub_arch_memdisk_addr)
1442         (grub_arch_memdisk_size): Remove.
1444         * include/grub/kernel.h (struct grub_module_header): Remove `offset'
1445         field (was only used to transfer a constant).  Add `type' field to
1446         support multiple module types.
1447         (grub_module_iterate): New function.
1449         * kern/device.c (grub_device_open): Do not hide error messages
1450         when grub_disk_open() fails.  Use grub_print_error() instead.
1452         * kern/i386/pc/init.c (grub_arch_modules_addr)
1453         (grub_arch_memdisk_size): Remove functions.
1454         (grub_arch_modules_addr): Return the module address in high memory
1455         (now that it isn't copied anymore).
1457         * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
1458         (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
1459         decompression routine (grub_total_module_size already includes that
1460         now).  Don't copy modules back to low memory.
1462         * kern/main.c: Include `<grub/mm.h>'.
1463         (grub_load_modules): Split out (and use) ...
1464         (grub_module_iterate): ... this function, which iterates through
1465         module objects and runs a hook.
1466         Comment out grub_mm_init_region() call, as it would cause non-ELF
1467         modules to be overwritten.
1469         * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
1470         the memdisk image in its own region, make it part of the module list.
1471         * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
1472         (main): Parse --memdisk|-m option, and pass user-provided path as
1473         parameter to generate_image().
1474         (add_segments): Pass `memdisk_path' down to load_modules().
1475         (load_modules): Embed memdisk image in module section when requested.
1476         * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
1477         `header.type' instead of `header.offset'.
1479         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
1480         (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
1481         (memdisk_mod_LDFLAGS): New variables.
1482         * conf/i386-coreboot.rmk: Likewise.
1483         * conf/i386-ieee1275.rmk: Likewise.
1485 2008-08-02  Robert Millan  <rmh@aybabtu.com>
1487         * loader/i386/pc/multiboot.c (playground, forward_relocator)
1488         (backward_relocator): New variables.  Used to allocate and relocate
1489         the payload, respectively.
1490         (grub_multiboot_load_elf32): Load into heap instead of requested
1491         address, install the appropriate relocator code in each bound of
1492         the payload, and set the entry point such that
1493         grub_multiboot_real_boot() will jump to one of them.
1495         * kern/i386/loader.S (grub_multiboot_payload_size)
1496         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
1497         (grub_multiboot_payload_entry_offset): New variables.
1498         (grub_multiboot_real_boot): Set cpu context to what the relocator
1499         expects, and jump to the relocator instead of the payload.
1501         * include/grub/i386/loader.h (grub_multiboot_payload_size)
1502         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
1503         (grub_multiboot_payload_entry_offset): Export.
1505 2008-08-01  Bean  <bean123ch@gmail.com>
1507         * normal/menu_entry.c (editor_getline): Don't return the original
1508         string as result, as it will be released by lexer once it has done
1509         using it.
1511 2008-08-01  Robert Millan  <rmh@aybabtu.com>
1513         * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
1514         within menuentries, not before them.
1515         util/grub.d/10_hurd.in: Likewise.
1517 2008-08-01  Bean  <bean123ch@gmail.com>
1519         * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
1520         (bufio_mod_SOURCES): New macro.
1521         (bufio_mod_CFLAGS): Likewise.
1522         (bufio_mod_LDFLAGS): Likewise.
1524         * include/grub/bufio.h: New file.
1526         * io/bufio.c: Likewise.
1528         * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
1529         (grub_video_reader_png): Use grub_buffile_open to open file.
1531         * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
1532         (grub_video_reader_jpeg): Use grub_buffile_open to open file.
1534         * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
1535         (grub_video_reader_tga): Use grub_buffile_open to open file.
1537         * font/manager.c: Include <grub/bufio.h>.
1538         (add_font): Use grub_buffile_open to open file.
1540 2008-07-31  Robert Millan  <rmh@aybabtu.com>
1542         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
1543         ELF segments, use a macro for arbitrarily accessing any of them instead
1544         of preparing a pointer that allows access to one at a time.
1545         (grub_multiboot_load_elf64): Likewise.
1547 2008-07-31  Bean  <bean123ch@gmail.com>
1549         * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
1550         GRUB_KERNEL_MACHINE_DATA_END.
1552 2008-07-30  Robert Millan  <rmh@aybabtu.com>
1554         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
1555         Increase from 0x50 to 0x60.
1556         * util/i386/pc/grub-install.in: Detect cross-disk installs, and
1557         use UUIDs to identify the root drive for them.  If that's not
1558         possible, abort.
1559         * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
1560         check, for cross-disk installs.
1562 2008-07-30  Robert Millan  <rmh@aybabtu.com>
1564         * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
1565         is non-empty, use it to set the `prefix' environment variable instead
1566         of the usual approach.
1567         * kern/i386/linuxbios/init.c (make_install_device): Remove function.
1568         (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
1569         environment variable instead of dummy make_install_device().
1571         * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
1572         (start): Insert a data section, with `grub_prefix' variable.
1573         * kern/i386/linuxbios/startup.S: Likewise.
1575         * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
1576         New variable reference.
1577         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
1578         New macro.  Defines offset of `grub_prefix' within startup.S (relative
1579         to `start').
1580         (GRUB_KERNEL_MACHINE_DATA_END): New macro.  Defines the end of data
1581         section within startup.S (relative to `start').
1582         * include/grub/i386/coreboot/kernel.h: Likewise.
1584         * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
1585         Overwrite grub_prefix with its contents, at the beginning of the
1586         first segment.
1587         (main): Understand -p|--prefix.
1589 2008-07-30  Robert Millan  <rmh@aybabtu.com>
1591         * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
1593 2008-07-30  Robert Millan  <rmh@aybabtu.com>
1595         * term/i386/pc/vga_text.c (grub_console_cls): Use
1596         grub_console_gotoxy() to go back to beginning of the screen.
1597         Found by Patrick Georgi <patrick.georgi@coresystems.de>
1599 2008-07-29  Christian Franke  <franke@computer.org>
1601         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
1602         Add conversion of emulated mount points on Cygwin.
1604 2008-07-29  Christian Franke  <franke@computer.org>
1606         * util/update-grub.in: Add a check for admin
1607         group on Cygwin.
1608         Remove old `grub.cfg.new' before creation.
1609         Add `-f' to `mv' to handle the different filesystem
1610         semantics of Windows.
1612 2008-07-29  Bean  <bean123ch@gmail.com>
1614         * normal/main.c (get_line): Fix buffer overflow bug.
1616 2008-07-28  Robert Millan  <rmh@aybabtu.com>
1618         * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
1619         (struct grub_apple_header): New struct.  Describes the layout of
1620         the partmap header.
1621         (apple_partition_map_iterate): Check the header magic as well as the
1622         partition magic (which was already being checked).
1624 2008-07-28  Pavel Roskin  <proski@gnu.org>
1626         * genmk.rb: Add a warning to the beginning of the output that
1627         it's a generated file and should not be edited.
1629 2008-07-28  Robert Millan  <rmh@aybabtu.com>
1631         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
1632         with the same number are found, just use issue a warning with
1633         grub_dprintf(), as this error has been reported to be non-fatal.
1635 2008-07-27  Robert Millan  <rmh@aybabtu.com>
1637         * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
1638         information.
1640 2008-07-27  Bean  <bean123ch@gmail.com>
1642         * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
1643         (grub_fat_find_dir): Ignore case when comparing filename.
1645 2008-07-27  Bean  <bean123ch@gmail.com>
1647         * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
1648         smallino, as it's more descriptive, and i8count can be confused with
1649         the other field count.
1650         (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
1651         inode type.
1653 2008-07-27  Bean  <bean123ch@gmail.com>
1655         * commands/crc.c: New file.
1657         * lib/crc.c: Likewise.
1659         * include/grub/lib/crc.h: Likewise.
1661         * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
1663         * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
1664         (hexdump): Move this function to ...
1666         * lib/hexdump.c: ... here.
1668         * include/grub/hexdump.h: Renamed to ...
1670         * include/grub/lib/hexdump.h: ... this.
1672         * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
1674         * util/grub-editenv.c: Likewise.
1676         * include/envblk.h: Renamed to ...
1678         * include/lib/envblk.h: ... this.
1680         * util/envblk.c: Renamed to ...
1682         * lib/envblk.c: ... this.
1684         * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
1685         lib/hexdump.c.
1686         (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
1687         (pkglib_MODULES): Add crc.mod.
1688         (hexdump_mod_SOURCES): Add lib/hexdump.c.
1689         (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
1690         (crc_mod_SOURCES): New macro.
1691         (crc_mod_CFLAGS): Likewise.
1692         (crc_mod_LDFLAGS): Likewise.
1694         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
1696         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1698         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
1700         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1702         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1704 2008-07-27  Felix Zielcke  <fzielcke@z-51.de>
1706         * commands/help.c: Include <grub/term.h>.
1707         (TERM_WIDTH): Removed.  Updated all users.
1709 2008-07-27  Pavel Roskin  <proski@gnu.org>
1711         * util/getroot.c (find_root_device): Rephrase a comment to avoid
1712         spurious warnings about a comment within a comment.
1714 2008-07-25  Robert Millan  <rmh@aybabtu.com>
1716         * util/getroot.c (find_root_device): Skip devices that match
1717         /dev/dm-[0-9].  This lets the real device be found for any type of
1718         abstraction (LVM, EVMS, RAID..).
1719         (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
1720         and /dev/evms (for EVMS) before traversing /dev.  If a /dev/dm-[0-9]
1721         device is found first, find_root_device() will now skip it.
1723 2008-07-24  Pavel Roskin  <proski@gnu.org>
1725         * include/grub/types.h: Use __builtin_bswap32() and
1726         __builtin_bswap64() with gcc 4.3 and newer.
1728 2008-07-24  Christian Franke  <franke@computer.org>
1730         * util/i386/pc/grub-install.in: If `--debug' is specified,
1731         pass `--verbose' to grub-setup.
1732         Abort script if make_system_path_relative_to_its_root() fails.
1734 2008-07-24  Bean  <bean123ch@gmail.com>
1736         * configure.ac: Fixed a bug caused by the previous cygwin patch,
1737         variable `target_platform' should be `platform'.
1739 2008-07-24  Bean  <bean123ch@gmail.com>
1741         * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
1742         (grub_png_init_fixed_block): New function.
1743         (grub_png_decode_image_data): Handle fixed huffman code compression.
1745 2008-07-24  Bean  <bean123ch@gmail.com>
1747         * common.rmk (bin_UTILITIES): Add grub-pe2elf.
1748         (grub_pe2elf_SOURCES): New macro.
1749         (CLEANFILES): Add grub-pe2elf.
1751         * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
1752         (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
1753         (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
1754         (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
1755         (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
1756         (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
1757         (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
1758         (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
1759         (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
1760         (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
1761         (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
1762         (GRUB_PE32_SYM_CLASS_FILE): Likewise.
1763         (GRUB_PE32_DT_FUNCTION): Likewise.
1764         (GRUB_PE32_REL_I386_DIR32): Likewise.
1765         (GRUB_PE32_REL_I386_REL32): Likewise.
1766         (grub_pe32_symbol): New structure.
1767         (grub_pe32_reloc): Likewise.
1769         * util/grub-pe2elf.c: New file.
1771         * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
1772         start symbol in non pc platform.
1774         * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
1776         The following patches are from Christian Franke.
1778         * include/grub/dl.h: Remove .previous, gas supports this only
1779         for ELF format.
1781         * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
1782         Remove .type, gas supports this only for ELF format.
1784         * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
1785         nullbytes in symbol table. This fixes an infinite loop if table is
1786         zero filled.
1788         * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
1789         TARGET_IMG_LDFLAGS and EXEEXT.
1791         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
1792         TARGET_IMG_LDFLAGS_AC.
1793         (grub_CHECK_STACK_ARG_PROBE): New function.
1795         * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
1797         * conf/i386-pc-cygwin-ld-img.sc: New linker script.
1799         * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
1800         to set TARGET_IMG_LD* accordingly.
1801         Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
1802         Add call to grub_CHECK_STACK_ARG_PROBE.
1803         Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
1805         * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
1807         * genmk.rb: Add EXEEXT to CLEANFILES.
1809 2008-07-23  Robert Millan  <rmh@aybabtu.com>
1811         * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
1812         define the codes for arrows and lines used for the menu).
1813         (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
1814         as well.
1816         * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
1817         fonts, because the latter are too slow.
1819 2008-07-21  Bean  <bean123ch@gmail.com>
1821         * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
1822         a20. Run keyboard test last, as it will cause macbook to halt.
1824 2008-07-18  Pavel Roskin  <proski@gnu.org>
1826         * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P.  We cannot
1827         load foreign architecture modules correctly anyway.  Keep
1828         support for loading host architecture modules, whether we
1829         compile them or not.
1831 2008-07-17  Pavel Roskin  <proski@gnu.org>
1833         * configure.ac: Use -m32 or -m64 regardless of whether we had to
1834         change target_cpu.  The compiler default can mismatch target_cpu
1835         in any case.
1837         * disk/efi/efidisk.c: Fix format warnings on x86_64.
1838         * kern/efi/efi.c: Likewise.
1840         * aclocal.m4 (grub_PROG_TARGET_CC): New macro.  Check if the
1841         target compiler is functional.
1842         * configure.ac: Call grub_PROG_TARGET_CC once all target flags
1843         are set up.
1845         * configure.ac: Default to efi platform for x86_64-apple.  Allow
1846         powerpc64 CPU, default to ieee1275 platform for it.  Split CPU
1847         adjustments from the rest, only do them if target is not
1848         explicitly given.  Merge other adjustments with the final sanity
1849         check.  Remove an extraneous check for supported CPU.  Be
1850         specific which CPU and which platform is not supported.
1852         * configure.ac: Default to pc platform for x86_64.
1854 2008-07-17  Robert Millan  <rmh@aybabtu.com>
1856         Partial LinuxBIOS -> Coreboot rename.
1858         * conf/i386-linuxbios.rmk: Renamed to ...
1859         * conf/i386-coreboot.rmk: ... this.
1860         * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
1861         * configure.ac: Accept "coreboot" as input platform (but maintain
1862         compatibility with "linuxbios").
1863         * include/grub/i386/linuxbios: Renamed to ...
1864         * include/grub/i386/coreboot: ... this.
1866 2008-07-17  Bean  <bean123ch@gmail.com>
1868         * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
1869         (appleldr_mod_SOURCE): New variable.
1870         (appleldr_mod_CFLAGS): Likewise.
1871         (appleldr_mod_LDFLAGS): Likewise.
1872         (pci_mod_SOURCES): Likewise.
1873         (pci_mod_CFLAGS): Likewise.
1874         (pci_mod_LDFLAGS): Likewise.
1875         (lspci_mod_SOURCES): Likewise.
1876         (lspci_mod_CFLAGS): Likewise.
1877         (lspci_mod_LDFLAGS): Likewise.
1879         * conf/x86_64-efi.rmk: New file.
1881         * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
1882         macro.
1883         (grub_efidisk_write): Likewise.
1885         * include/efi/api.h (efi_call_0): New macro.
1886         (efi_call_1): Likewise.
1887         (efi_call_2): Likewise.
1888         (efi_call_3): Likewise.
1889         (efi_call_4): Likewise.
1890         (efi_call_5): Likewise.
1891         (efi_call_6): Likewise.
1893         * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
1894         grub_rescue_cmd_chainloader.
1896         * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
1897         (grub_pe32_optional_header): Change some fields based on i386 or
1898         x86_64 platform.
1899         (GRUB_PE32_PE32_MAGIC): Likewise.
1901         * include/grub/efi/uga_draw.h: New file.
1903         * include/grub/elf.h (STN_ABS): New constant.
1904         (R_X86_64_NONE): Relocation constant for x86_64.
1905         (R_X86_64_64): Likewise.
1906         (R_X86_64_PC32): Likewise.
1907         (R_X86_64_GOT32): Likewise.
1908         (R_X86_64_PLT32): Likewise.
1909         (R_X86_64_COPY): Likewise.
1910         (R_X86_64_GLOB_DAT): Likewise.
1911         (R_X86_64_JUMP_SLOT): Likewise.
1912         (R_X86_64_RELATIVE): Likewise.
1913         (R_X86_64_GOTPCREL): Likewise.
1914         (R_X86_64_32): Likewise.
1915         (R_X86_64_32S): Likewise.
1916         (R_X86_64_16): Likewise.
1917         (R_X86_64_PC16): Likewise.
1918         (R_X86_64_8): Likewise.
1919         (R_X86_64_PC8): Likewise.
1921         * include/grub/i386/efi/pci.h: New file.
1923         * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
1924         Change it value based on platform.
1925         (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
1926         (GRUB_E820_RAM): Likewise.
1927         (GRUB_E820_RESERVED): Likewise.
1928         (GRUB_E820_ACPI): Likewise.
1929         (GRUB_E820_NVS): Likewise.
1930         (GRUB_E820_EXEC_CODE): Likewise.
1931         (GRUB_E820_MAX_ENTRY): Likewise.
1932         (grub_e820_mmap): New structure.
1933         (linux_kernel_header): Change the efi field according to different
1934         kernel version, also field from linux_kernel_header.
1936         * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
1938         * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
1939         (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
1940         (GRUB_PCI_ADDR_SPACE_IO): Likewise.
1941         (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
1942         (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
1943         (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
1944         (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
1945         (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
1946         (GRUB_PCI_ADDR_MEM_MASK): Likewise.
1947         (GRUB_PCI_ADDR_IO_MASK): Likewise.
1949         * include/grub/x86_64/efi/kernel.h: New file.
1951         * include/grub/x86_64/efi/loader.h: Likewise.
1953         * include/grub/x86_64/efi/machine.h: Likewise.
1955         * include/grub/x86_64/efi/pci.h: Likewise.
1957         * include/grub/x86_64/efi/time.h: Likewise.
1959         * include/grub/x86_64/linux.h: Likewise.
1961         * include/grub/x86_64/setjmp.h: Likewise.
1963         * include/grub/x86_64/time.h: Likewise.
1965         * include/grub/x86_64/types.h: Likewise.
1967         * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
1968          GRUB_TARGET_SIZEOF_VOID_P.
1970         * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
1971         (grub_efi_locate_handle): Likewise.
1972         (grub_efi_open_protocol): Likewise.
1973         (grub_efi_set_text_mode): Likewise.
1974         (grub_efi_stall): Likewise.
1975         (grub_exit): Likewise.
1976         (grub_reboot): Likewise.
1977         (grub_halt): Likewise.
1978         (grub_efi_exit_boot_services): Likewise.
1979         (grub_get_rtc): Likewise.
1981         * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
1982         (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
1983         (grub_efi_allocate_pages): Wrap efi calls.
1984         (grub_efi_free_pages): Wrap efi calls.
1985         (grub_efi_get_memory_map): Wrap efi calls.
1987         * kern/x86_64/dl.c: New file.
1989         * kern/x86_64/efi/callwrap.S: Likewise.
1991         * kern/x86_64/efi/startup.S: Likewise.
1993         * loader/efi/appleloader.c: Likewise.
1995         * loader/efi/chainloader.c (cmdline): New variable.
1996         (grub_chainloader_unload): Wrap efi calls.
1997         (grub_chainloader_boot): Likewise.
1998         (grub_rescue_cmd_chainloader): Wrap efi calls, handle
1999         command line.
2001         * loader/efi/chainloader_normal.c (chainloader_command):
2002         Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
2003         command line.
2005         * loader/i386/efi/linux.c (allocate_pages): Change allocation
2006         method.
2007         (grub_e820_add_region): New function.
2008         (grub_linux_boot): Construct e820 map from efi map, handle x86_64
2009         booting.
2010         (grub_find_video_card): New function.
2011         (grub_linux_setup_video): New function.
2012         (grub_rescue_cmd_linux): Probe for video information.
2014         * normal/x86_64/setjmp.S: New file.
2016         * term/efi/console.c (map_char): New function.
2017         (grub_console_putchar): Map unicode char.
2018         (grub_console_checkkey): Wrap efi calls.
2019         (grub_console_getkey): Likewise.
2020         (grub_console_getwh): Likewise.
2021         (grub_console_gotoxy): Likewise.
2022         (grub_console_cls): Likewise.
2023         (grub_console_setcolorstate): Likewise.
2024         (grub_console_setcursor): Likewise.
2026         * util/i386/efi/grub-mkimage.c: Add support for x86_64.
2028 2008-07-16  Pavel Roskin  <proski@gnu.org>
2030         * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
2031         format strings.
2033         * util/i386/efi/grub-mkimage.c (get_target_address): Return a
2034         pointer, not an integer.  This fixes a warning and prevents
2035         precision loss on 64-bit systems.
2036         (relocate_addresses): Remove unneeded cast.
2038 2008-07-15  Pavel Roskin  <proski@gnu.org>
2040         * kern/i386/ieee1275/init.c: Include grub/cache.h.
2042         * term/ieee1275/ofconsole.c: Disable code unused on i386.
2044         * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
2045         Fix comparison between signed and unsigned.
2047         * include/grub/i386/ieee1275/console.h: Declare
2048         grub_console_init() and grub_console_fini().
2050         * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
2051         It's empty and unused.
2053         * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
2054         beginning to avoid warnings with some compilers.
2056         * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
2057         [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
2059 2008-07-14  Pavel Roskin  <proski@gnu.org>
2061         * kern/env.c (grub_register_variable_hook): Don't copy empty
2062         string, it leaks memory.  Pass "" to grub_env_set(), it should
2063         handle constant strings.
2065         * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
2066         * commands/cmp.c (grub_cmd_cmp): Likewise.
2067         * kern/dl.c (grub_dl_flush_cache): Likewise.
2068         (grub_dl_load_core): Likewise.
2069         * kern/elf.c (grub_elf32_load_phdrs): Likewise.
2070         (grub_elf64_load_phdrs): Likewise.
2072 2008-07-13  Pavel Roskin  <proski@gnu.org>
2074         * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
2075         between signed and unsigned.
2076         (LzmaEnc_Finish): Fix warning about an unused parameter.
2078 2008-07-13  Bean  <bean123ch@gmail.com>
2080         * Makefile.in (enable_lzo): New rule.
2082         * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
2084         * configure.ac (ENABLE_LZO): New option --enable-lzo.
2086         * boot/i386/pc/lnxboot.S: #include <config.h>.
2088         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
2089         its value according to the compression algorithm used, lzo or lzma.
2091         * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
2092         compression algorithm according to configure macro.
2094         * kern/i386/pc/startup.S (codestart): Likewise.
2096         * kern/i386/pc/lzma_decode.S: New file.
2098         * include/grub/lib/LzFind.h: Likewise.
2100         * include/grub/lib/LzHash.h: Likewise.
2102         * include/grub/lib/LzmaDec.h: Likewise.
2104         * include/grub/lib/LzmaEnc.h: Likewise.
2106         * include/grub/lib/LzmaTypes.h: Likewise.
2108         * lib/LzFind.c: Likewise.
2110         * lib/LzmaDec.c: Likewise.
2112         * lib/LzmaEnc.c: Likewise.
2114 2008-07-13  Bean  <bean123ch@gmail.com>
2116         * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
2117         (grub_ext4_extent_header): New structure.
2118         (grub_ext4_extent): Likewise.
2119         (grub_ext4_extent_idx): Likewise.
2120         (grub_ext4_find_leaf): New function.
2121         (grub_ext2_read_block): Handle extents.
2123 2008-07-12  Robert Millan  <rmh@aybabtu.com>
2125         * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
2127 2008-07-11  Robert Millan  <rmh@aybabtu.com>
2129         * util/grub.d/40_custom.in: New file. Example on how to add custom
2130         entries to /etc/grub.d.
2131         * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
2132         40_custom (implicitly, by merging all the grub.d rules).
2134 2008-07-11  Pavel Roskin  <proski@gnu.org>
2136         * commands/read.c (grub_getline): Fix invalid memory access.
2137         Don't add newline to the variable value.
2139         * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
2140         [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
2141         (serial_hw_get_port): Check validity of the port number.
2142         (grub_cmd_serial): Check return value of serial_hw_get_port().
2144 2008-07-07  Pavel Roskin  <proski@gnu.org>
2146         * boot/i386/pc/diskboot.S (notification_string): Replace
2147         "Loading kernel" with just "loading".  This is shorter, less
2148         confusing and saves a few bytes for possible future changes.
2150 2008-07-05  Pavel Roskin  <proski@gnu.org>
2152         * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
2153         size for ATAPI devices, they are undefined.  Output sector
2154         number in decimal form.
2156         * disk/ata.c: Use named constants for status bits.
2158 2008-07-04  Pavel Roskin  <proski@gnu.org>
2160         * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
2161         grub_addr_t before casting it to the void pointer to fix a
2162         warning.  Non-addressable regions are discarded earlier.
2163         (grub_arch_modules_addr): Cast _end to grub_addr_t.
2164         * kern/i386/linuxbios/table.c: Include grub/misc.h.
2165         (check_signature): Don't shadow table_header.
2166         (grub_linuxbios_table_iterate): Cast numeric constants to
2167         grub_linuxbios_table_header_t.
2168         * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
2169         grub_stop().
2171         * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
2172         prevent warnings.
2174         * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
2175         pointer, which can cause warnings.  Support 64-bit addresses.
2177         * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
2178         of sizeof(long).  This fixes PowerPC image generation on x86_64.
2180 2008-07-04  Robert Millan  <rmh@aybabtu.com>
2182         This fixes a performance issue when pc & gpt partmap iterators
2183         didn't abort iteration even after our hook found what it was
2184         looking for (often causing expensive probes of non-existent drives).
2186         Some callers relied on previous buggy behaviour, since they would
2187         rise an error when their own hooks caused early abortion of its
2188         iteration.
2190         * kern/device.c (grub_device_open): Improve error message.
2191         * disk/lvm.c (grub_lvm_open): Likewise.
2192         * disk/raid.c (grub_raid_open): Likewise.
2194         * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
2195         when hook requests it, independently of grub_errno.
2196         (pc_partition_map_probe): Do not fail when find_func() caused
2197         early abortion of pc_partition_map_iterate().
2199         * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
2200         when hook requests it, independently of grub_errno.
2201         (gpt_partition_map_probe): Do not fail when find_func() caused
2202         early abortion of gpt_partition_map_iterate().
2204         * kern/partition.c (grub_partition_iterate): Abort parent iteration
2205         when hook requests it, independently of grub_errno.  Do not fail when
2206         part_map_iterate_hook() caused early abortion of p->iterate().
2208         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
2209         when grub_partition_iterate() returned with non-zero.
2211 2008-07-03  Pavel Roskin  <proski@gnu.org>
2213         * disk/ata.c (grub_ata_pio_write): Check status before writing,
2214         like we do in grub_ata_pio_read().
2215         (grub_ata_readwrite): Always write individual sectors.  Fix the
2216         sector count for the remainder.
2217         (grub_ata_write): Enable writing to ATA devices.  Correctly
2218         report error for ATAPI devices.
2220 2008-07-02  Pavel Roskin  <proski@gnu.org>
2222         * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
2223         warning.
2225         * disk/ata.c (grub_ata_readwrite): Don't increment sector number
2226         for every read sector, we already increment it for the whole
2227         batch.  This fixes reading more than 256 sectors at once.
2229         * util/grub-editenv.c (cmd_info): Cast argument to long
2230         explicitly.  ptrdiff_t reduces to int on i386.
2232         * util/grub-editenv.c (main): Be specific which parameter is
2233         missing.
2235         * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
2236         (memdisk): Make memdisk_orig_addr a pointer.
2238         * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
2239         for file offsets, use grub_off_t instead.  Fix printf format
2240         warnings.
2242         * fs/reiserfs.c: Remove #warning, TODO list items don't belong
2243         there.  Real unexpected warnings should not drown in the noise
2244         about known problems.
2246         * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
2247         grub_disk_addr_t for memory addresses.
2249         * loader/aout.c (grub_aout_load): Cast load_addr to pointer
2250         explicitly to fix a warning.
2252         * util/grub-editenv.c (cmd_info): Fix warning in printf format.
2254         * Makefile.in (MODULE_LDFLAGS): New variable.
2255         * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro.  Check if
2256         the linker accepts --build-id=none.
2257         * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE.  Substitute
2258         MODULE_LDFLAGS.
2259         * genmk.rb: Use MODULE_LDFLAGS when linking modules.
2261         * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
2262         those in Linux XFS code.  Provide a way to access 64-bit parent
2263         inode.
2264         (grub_xfs_iterate_dir): Use the new names.  Avoid reading past
2265         the end of struct grub_xfs_dir_header.
2267 2008-07-02  Bean  <bean123ch@gmail.com>
2269         * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
2270         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
2271         and GRUB_IEEE1275_FLAG_NO_ANSI.
2273         * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
2274         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
2275         and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
2277         * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
2278         immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
2280         * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
2281         GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
2283         * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
2284         esc sequence on non ANSI terminal.
2285         (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
2287         * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
2288         beginning of file.
2290 2008-07-02  Bean  <bean123ch@gmail.com>
2292         * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
2293         (grub_editenv_SOURCES): New variable.
2294         (pkglib_MODULES): Add loadenv.mod.
2295         (loadenv_mod_SOURCES): New variable.
2296         (loadenv_mod_CFLAGS): Likewise.
2297         (loadenv_mod_LDFLAGS): Likewise.
2299         * include/grub/envblk.h: New file.
2301         * util/envblk.c: New file.
2303         * util/grub-editenv.c: New file.
2305         * commands/loadenv.c: New file.
2307 2008-07-01  Pavel Roskin  <proski@gnu.org>
2309         * include/multiboot2.h (struct multiboot_tag_module): Use char,
2310         not unsigned char.  This fixes warnings and is consistent with
2311         other tags.
2313         * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
2315         * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
2317         * term/tparm.c (analyze): Always set *popcount.
2319         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
2320         cast to fix a warning.
2322         * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
2323         cast to suppress a warning.
2325         * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
2326         grub_fshelp_read_file() expects.
2328         * fs/fat.c: Fix UUID calculation on big-endian systems.  We
2329         write uuid as a 32-bit value in CPU byte order, so declare and
2330         use it as such.
2332         * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
2333         long if the format specifier expects it.
2334         * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
2335         * partmap/pc.c (pc_partition_map_iterate): Likewise.
2336         * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
2337         long to fix a warning.
2338         * fs/reiserfs.c (grub_reiserfs_read): Change casts in
2339         grub_dprintf() arguments to fix warnings.
2341 2008-06-30  Pavel Roskin  <proski@gnu.org>
2343         * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
2344         install_bsd_part immediately before core.img is embedded or
2345         modified on disk.  This fixes core.img verification if core.img
2346         cannot be embedded.
2348         * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
2349         core_path to calculate the blocklist.
2350         Patch from Javier Martín <lordhabbit@gmail.com>
2352 2008-06-29  Robert Millan  <rmh@aybabtu.com>
2354         * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro.  Maps filesystem
2355         block to disk block.
2356         (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
2357         Patch from Niels Böhm <bitbucket@arcor.de>
2359 2008-06-29  Robert Millan  <rmh@aybabtu.com>
2361         * util/update-grub_lib.in (font_path): Search for fonts in
2362         /boot/grub first, which is more likely to be readable (we aren't
2363         deciding where fonts live, just looking for them).
2365 2008-06-26  Pavel Roskin  <proski@gnu.org>
2367         * util/biosdisk.c (read_device_map): Don't leave dead map
2368         entries for devices failing stat() check.
2370         * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
2371         core_path_dev for the core.img path on the target device.
2373 2008-06-26  Robert Millan  <rmh@aybabtu.com>
2375         * disk/fs_uuid.c: New file.
2376         * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
2377         (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
2378         (fs_uuid_mod_LDFLAGS): New variables.
2379         * include/grub/disk.h (grub_disk_dev_id): Add
2380         `GRUB_DISK_DEVICE_UUID_ID'.
2381         * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
2382         implement iterate().
2384 2008-06-26  Robert Millan  <rmh@aybabtu.com>
2386         * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
2387         "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
2388         Linux image includes no initrd.
2390 2008-06-21  Javier Martín  <lordhabbit@gmail.com>
2392         * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
2393         call to resolve the core image location that effectively appended the
2394         name twice.
2396 2008-06-21  Robert Millan  <rmh@aybabtu.com>
2398         * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
2399         call from here ...
2401         * util/grub.d/10_hurd.in: ... to here ...
2402         * util/grub.d/10_linux.in: ... and here.
2404 2008-06-19  Robert Millan  <rmh@aybabtu.com>
2406         * kern/main.c (grub_main): Export `prefix' variable immediately
2407         after it has been set by grub_machine_set_prefix().
2409 2008-06-19  Robert Millan  <rmh@aybabtu.com>
2411         * commands/search.c (search_label, search_fs_uuid, search_file): Print
2412         search result when not saving to variable, not the other way around.
2413         When saving to variable, abort iteration as soon as a match is found.
2415 2008-06-19  Robert Millan  <rmh@aybabtu.com>
2417         * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
2418         check for partition that provides /boot/grub.  Its logic is flawed,
2419         as it prevents prepare_grub_to_access_device() from being called
2420         multiple times.
2422 2008-06-19  Robert Millan  <rmh@aybabtu.com>
2424         * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
2425         "insmod" command directly when abstraction modules are needed,
2426         instead of relying on GRUB_PRELOAD_MODULES (which had no effect
2427         since it had already been processed).
2429 2008-06-19  Pavel Roskin  <proski@gnu.org>
2431         * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
2432         changed.  This is needed in case GRUB_LIBDIR changes.
2433         * conf/i386-ieee1275.rmk: Likewise.
2434         * conf/i386-linuxbios.rmk: Likewise.
2435         * conf/i386-pc.rmk: Likewise.
2436         * conf/powerpc-ieee1275.rmk: Likewise.
2438 2008-06-18  Pavel Roskin  <proski@gnu.org>
2440         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
2441         kernel_elf_symlist.c to symlist.c for consistency with other
2442         architectures.  Update all users.
2443         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
2445 2008-06-18  Robert Millan  <rmh@aybabtu.com>
2447         * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
2448         it in prefix.
2450         * util/i386/pc/grub-setup.c (main): Don't handle prefix at all.  Set
2451         `must_embed' to 1 when root_dev is a RAID device.  When dest_dev is
2452         a RAID device, run setup() for all members independently on whether
2453         LVM abstraction is being used.
2454         (setup): Don't handle prefix at all; let grub-mkimage take care of it.
2455         If grub-mkimage has set `*install_dos_part == -2', don't override this
2456         value.
2457         Perform *install_dos_part adjustments independently on whether
2458         we're embedding or not.
2459         Clarify error message when image is too big for embedding.
2460         Remove duplicate *install_dos_part stanza.
2462 2008-06-17  Robert Millan  <rmh@aybabtu.com>
2464         * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
2465         (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
2466         variables.
2467         (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
2468         values in grub_ofconsole_normal_color and
2469         grub_ofconsole_highlight_color (they're not directly related to
2470         background and foreground).
2471         (grub_ofconsole_setcolorstate): Extract background and foreground
2472         from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
2474 2008-06-17  Robert Millan  <rmh@aybabtu.com>
2476         * util/update-grub_lib.in (prepare_grub_to_access_device): Use
2477         /boot/grub for the check in last commit, not /boot (they could be
2478         different partitions).
2480 2008-06-16  Robert Millan  <rmh@aybabtu.com>
2482         * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
2483         asked to setup access for the same partition that provides /boot,
2484         don't bother using UUIDs since our root already has the value we
2485         want.
2487 2008-06-16  Robert Millan  <rmh@aybabtu.com>
2489         * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
2490         I2O devices.
2491         Patch from Sven Mueller <sven@debian.org>.
2493 2008-06-16  Robert Millan  <rmh@aybabtu.com>
2495         * util/update-grub.in: Check for $EUID instead of $UID.
2496         Reported by Vincent Zweije.
2498 2008-06-16  Bean  <bean123ch@gmail.com>
2500         * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
2501         (grub_ext2_read_block): Likewise.
2502         (grub_ext2_read_inode): Likewise.
2503         (grub_ext2_mount): Likewise.
2504         (grub_ext2_close): Likewise.
2505         (grub_ext3_get_journal): Removed.
2507         * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
2508         (grub_reiserfs_read_symlink): Likewise.
2509         (grub_reiserfs_mount): Likewise.
2510         (grub_reiserfs_open): Likewise.
2511         (grub_reiserfs_read): Likewise.
2512         (grub_reiserfs_close): Likewise.
2513         (grub_reiserfs_get_journal): Removed.
2515         * fs/fshelp.c (grub_fshelp_read): Removed.
2516         (grub_fshelp_map_block): Likewise.
2518         * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
2519         (grub_fshelp_journal): Likewise.
2520         (grub_fshelp_read): Likewise.
2521         (grub_fshelp_map_block): Likewise.
2523 2008-06-16  Pavel Roskin  <proski@gnu.org>
2525         * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
2526         floating point anymore.
2527         * include/grub/powerpc/libgcc.h: Leave only necessary exports.
2529 2008-06-15  Pavel Roskin  <proski@gnu.org>
2531         * commands/ls.c (grub_ls_list_files): Use integer calculations
2532         for human readable format, avoid floating point use.
2533         * kern/misc.c (grub_ftoa): Remove.
2534         (grub_vsprintf): Remove floating point support.
2536 2008-06-15  Robert Millan  <rmh@aybabtu.com>
2538         * util/grub.d/10_linux.in: Use the underlying device for loop-AES
2539         devices.
2540         Reported by Max Vozeler.
2542 2008-06-15  Robert Millan  <rmh@aybabtu.com>
2544         * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
2545         in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
2546         skipped later.
2547         (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
2548         the beginning of the prefix.
2550         * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
2551         It is assumed that if we have a memdisk, grub-mkimage has set
2552         grub_prefix to include the "(memdisk)" drive in it.
2554 2008-06-15  Robert Millan  <rmh@aybabtu.com>
2556         * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
2557         Initialize keyboard controller after registering the terminal, so that
2558         grub_printf() can be called from grub_keyboard_controller_init().
2560 2008-06-15  Robert Millan  <rmh@aybabtu.com>
2562         * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
2563         extent-btree which is written as big endian on disk.
2564         Reported by Alain Greppin  <al@chilibi.org>.
2566 2008-06-14  Robert Millan  <rmh@aybabtu.com>
2568         * util/i386/efi/grub-install.in (modules): Remove `_chain'.
2569         * util/i386/pc/grub-install.in (modules): Likewise.
2571 2008-06-13  Pavel Roskin  <proski@gnu.org>
2573         * commands/ls.c (grub_ls_list_files): Fix format warnings.
2575 2008-06-13  Bean  <bean123ch@gmail.com>
2577         * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
2579         * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
2581         * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
2582         to indicate sparse block.
2584 2008-06-12  Pavel Roskin  <proski@gnu.org>
2586         * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
2587         number, grub_fshelp_read() does it for us.
2589         * fs/fshelp.c (grub_fshelp_read): New function.  Implement
2590         linear disk read with journal translation.
2591         * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
2592         * include/grub/fshelp.h: Declare grub_fshelp_read().
2594 2008-06-09  Pavel Roskin  <proski@gnu.org>
2596         * fs/minix.c (grub_minix_mount): Handle error reading
2597         superblock.
2599 2008-06-08  Robert Millan  <rmh@aybabtu.com>
2601         * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
2602         don't append the RAID prefix afterwards.
2603         Reported by Clint Adams.
2605 2008-06-08  Robert Millan  <rmh@aybabtu.com>
2607         Based on description from Pavel:
2608         * kern/disk.c (grub_disk_check_range): Rename to ...
2609         (grub_disk_adjust_range): ... this.  Add a comment explaining the
2610         tasks performed by this function.
2612 2008-06-08  Robert Millan  <rmh@aybabtu.com>
2614         * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
2615         `num_serial' (for consistency with other variables).
2616         (struct grub_ntfs_data): Add `uuid' member.
2617         * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
2618         (grub_ntfs_uuid): New function.
2619         (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
2621 2008-06-07  Pavel Roskin  <proski@gnu.org>
2623         * util/biosdisk.c (open_device): Revert last change to the
2624         function, it broke installation.  The sector needs to be
2625         different dependent on which device is opened.
2627 2008-06-06  Robert Millan  <rmh@aybabtu.com>
2629         Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
2630         rest of GRUB, and breakage doesn't happen if its value were modified.
2632         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
2633         Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
2634         a constant (same value).
2635         * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
2636         `GRUB_KERNEL_MACHINE_DATA_END' (same value).
2638 2008-06-06  Robert Millan  <rmh@aybabtu.com>
2640         * util/biosdisk.c (open_device): Do not modify sector offset when
2641         accessing a partition.  kern/disk.c already handles this for us.
2643 2008-06-06  Robert Millan  <rmh@aybabtu.com>
2645         * util/grub-emu.c (grub_machine_init): Move code in this function from
2646         here ...
2647         (main): ... to here (before grub_util_biosdisk_init() call, to prevent
2648         segfault in case grub_printf() is called).
2650         * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
2651         grub_probe.  Update all users not to explicitly add it again.
2652         (grub_device): New variable; contains corresponding device for grubdir.
2653         (fs_module, partmap_module, devabstraction_module): Pass
2654         `--device ${grub_device}' to grub_probe to avoid traversing /dev
2655         every time.
2657 2008-06-05  Robert Millan  <rmh@aybabtu.com>
2659         * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
2660         is found, print it (same layout as with labels).
2662 2008-06-04  Robert Millan  <rmh@aybabtu.com>
2664         * util/biosdisk.c (get_drive): Rename to ...
2665         (find_grub_drive): ... this.  Update all users.
2667         (get_os_disk): Rename to ...
2668         (convert_system_partition_to_system_disk): ... this.  Update all users.
2670         (find_drive): Rename to ...
2671         (find_system_device): ... this.  Update all users.
2673 2008-06-04  Robert Millan  <rmh@aybabtu.com>
2675         * util/biosdisk.c (get_os_disk): Handle IDA devices.
2676         * util/grub-mkdevicemap.c (get_mmc_disk_name)
2677         (make_device_map): Likewise.
2679 2008-06-01  Robert Millan  <rmh@aybabtu.com>
2681         *  util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
2682         before dereferencing it.
2684         * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
2685         union with fat12/fat16-specific ones.  Add some new fields, including
2686         `num_serial' for both versions.
2687         (struct grub_fat_data): Add `uuid' member.
2688         (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
2689         names.  Initialize `data->uuid' using `num_serial'.
2690         (grub_fat_uuid): New function.
2691         (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
2693         * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
2694         (grub_reiserfs_uuid): New function.
2695         (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
2696         member.
2698         * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
2699         (grub_xfs_uuid): New function.
2700         (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
2702 2008-06-01  Robert Millan  <rmh@aybabtu.com>
2704         * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
2705         code that is backward compatible with pre-uuid search command.
2707 2008-05-31  Robert Millan  <rmh@aybabtu.com>
2709         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
2710         floppies after everything else, to ensure floppy drive isn't accessed
2711         unnecessarily (patch from Bean).
2713 2008-05-31  Robert Millan  <rmh@aybabtu.com>
2715         * commands/search.c (search_label, search_fs_uuid, search_file): Do
2716         not print device names when we were asked to set a variable.
2718 2008-05-31  Robert Millan  <rmh@aybabtu.com>
2720         * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
2721         using "cursor-on" and "cursor-off" commands (understood at least by
2722         the Open Firmware flavour on OLPC).
2724 2008-05-31  Michael Gorven  <michael@gorven.za.net>
2726         * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
2727         on and off sequences.
2729 2008-05-31  Robert Millan  <rmh@aybabtu.com>
2731         * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
2732         * util/update-grub.in: Likewise.
2734 2008-05-30  Pavel Roskin  <proski@gnu.org>
2736         * util/biosdisk.c (linux_find_partition): Simplify logic and
2737         make the code more universal.  Keep special processing for
2738         devfs, but use a simple rule for all other devices.  If the
2739         device ends with a number, append 'p' and the partition number.
2740         Otherwise, append only the partition number.
2742 2008-05-30  Robert Millan  <rmh@aybabtu.com>
2744         * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
2745         * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
2746         GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
2747         the `root' parameter to Linux.
2749 2008-05-30  Robert Millan  <rmh@aybabtu.com>
2751         * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
2752         * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
2753         --fs_uuid with --fs-uuid.
2754         * util/update-grub.in: Allow filesystem UUID probes to fail (since not
2755         all filesystems support them).
2757 2008-05-30  Robert Millan  <rmh@aybabtu.com>
2759         * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
2760         grub_printf() flags, since we're printing in units of 2 bytes.
2762 2008-05-30  Robert Millan  <rmh@aybabtu.com>
2764         * util/grub.d/00_header.in: Remove obsolete comment referencing
2765         convert_system_path_to_grub_path().
2766         * util/update-grub.in: Likewise.
2767         * util/update-grub_lib.in (is_path_readable_by_grub): New function.
2768         (convert_system_path_to_grub_path): Add a warning message explaining
2769         that this function is deprecated.  Rely on is_path_readable_by_grub()
2770         for the readability checks.
2771         (font_path): Use is_path_readable_by_grub() for the readability
2772         check rather than convert_system_path_to_grub_path().
2774 2008-05-30  Robert Millan  <rmh@aybabtu.com>
2776         * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
2777         * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
2778         converting it first.
2779         * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
2780         grub.cfg for access to font file, and afterwards call it again to set
2781         the root device.
2783 2008-05-30  Robert Millan  <rmh@aybabtu.com>
2785         * commands/search.c (options): Add --fs_uuid option.
2786         (search_fs_uuid): New function.
2787         (grub_cmd_search): Fix --set argument passing.
2788         Use search_fs_uuid() when requested via --fs_uuid.
2789         (grub_search_init): Update help message.
2790         * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
2791         and redeclare it as an array of 16-bit words.
2792         (grub_ext2_uuid): New function.
2793         (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
2794         * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
2795         * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
2796         (GRUB_DEVICE_BOOT_UUID): New variables.
2797         (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
2798         * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
2799         whenever possible.
2800         * util/grub.d/10_hurd.in: Avoid explicit use of root drive.  Instead,
2801         just assume `root' variable has the right value.
2802         * util/grub.d/10_linux.in: Likewise.
2803         * util/grub-probe.c (probe): Probe for filesystem UUID when requested
2804         via PRINT_FS_UUID.
2805         (main): Recognise `-t fs_uuid' argument.
2807 2008-05-30  Robert Millan  <rmh@aybabtu.com>
2809         * util/biosdisk.c (map): Redefine structure to hold information
2810         about GRUB drive name.
2811         (get_drive): Reimplement without assuming (and verifying) BIOS-like
2812         drive names.
2813         (call_hook): Remove.
2814         (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
2815         member.  Assume drive has partitions.
2816         (grub_util_biosdisk_open): Access device names via `.device' struct
2817         member.
2818         (open_device): Likewise.
2819         (find_drive): Likewise.
2820         (read_device_map): Adjust map[] usage to match the new struct
2821         definition.  Don't check for duplicates (still possible, but not cheap
2822         anymore).
2823         (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
2824         (make_device_name): Remove assumption of BIOS-like drive names.
2826 2008-05-30  Pavel Roskin  <proski@gnu.org>
2828         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
2829         compiling execute.c doesn't need grub_script.tab.h anymore.
2830         (normal/command.c_DEPENDENCIES): Likewise.
2831         (normal/function.c_DEPENDENCIES): Likewise.
2832         * conf/i386-ieee1275.rmk: Likewise.
2833         * conf/i386-linuxbios.rmk: Likewise.
2834         * conf/i386-pc.rmk: Likewise.
2835         * conf/powerpc-ieee1275.rmk: Likewise.
2836         * conf/sparc64-ieee1275.rmk: Likewise.
2838 2008-05-29  Pavel Roskin  <proski@gnu.org>
2840         * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
2841         when scanning metadata for volume group name.
2843         * include/grub/script.h: Don't include grub_script.tab.h.  It's
2844         a generated file, which may only be included from the files with
2845         DEPENDENCIES rules in the makefile.  Don't use typedef YYSTYPE,
2846         use union YYSTYPE, as the later allows forward declaration.
2847         * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
2849 2008-05-29  Robert Millan  <rmh@aybabtu.com>
2851         * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
2852         (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
2853         [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
2854         (grub_console_checkkey): Add grub_dprintf() call to report unknown
2855         scan codes.
2857 2008-05-29  Robert Millan  <rmh@aybabtu.com>
2859         * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
2860         control key combinations.
2862 2008-05-29  Robert Millan  <rmh@aybabtu.com>
2864         * util/powerpc/ieee1275/grub-install.in: Move from here ...
2865         * util/ieee1275/grub-install.in: ... to here.
2866         * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
2867         * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
2868         (grub_install_SOURCES): Likewise.
2870 2008-05-29  Robert Millan  <rmh@aybabtu.com>
2872         * fs/affs.c: Update copyright year.
2873         * fs/ext2.c: Likewise.
2874         * fs/fshelp.c: Likewise.
2875         * fs/hfsplus.c: Likewise.
2876         * fs/ntfs.c: Likewise.
2877         * fs/xfs.c: Likewise.
2878         * include/grub/fshelp.h: Likewise.
2879         * util/grub-mkdevicemap.c: Likewise.
2881 2008-05-28  Robert Millan  <rmh@aybabtu.com>
2883         * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
2884         might need to be fatfs to support some firmware implementations
2885         (e.g. OFW or EFI).
2887 2008-05-28  Robert Millan  <rmh@aybabtu.com>
2889         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
2890         devices.
2891         * util/grub-mkdevicemap.c (get_mmc_disk_name)
2892         (make_device_map): Likewise.
2894 2008-05-20  Bean  <bean123ch@gmail.com>
2896         * fs/fshelp.c (grub_fshelp_map_block): New function.
2897         (grub_fshelp_find_file): Use 64-bit type for pos and block address.
2898         Use `>>' and `&' operator to avoid 64-bit divide and modulo.
2900         * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
2901         (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
2902         (grub_fshelp_journal): New structure.
2903         (grub_fshelp_map_block): New function prototype.
2904         (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
2905         (grub_fshelp_map_block): Likewise.
2907         * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
2908         (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
2909         (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
2910         (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
2911         (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
2912         (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
2913         (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
2914         (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
2915         (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
2916         (EXT3_JOURNAL_FLAG_DELETED): Likewise.
2917         (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
2918         (grub_ext2_sblock): New members for journal support.
2919         (grub_ext3_journal_header): New structure.
2920         (grub_ext3_journal_revoke_header): Likewise.
2921         (grub_ext3_journal_block_tag): Likewise.
2922         (grub_ext3_journal_sblock): Likewise.
2923         (grub_fshelp_node): New members logfile and journal.
2924         (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
2925         grub_fshelp_map_block to get real block number.
2926         (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
2927         number.
2928         (grub_ext2_read_inode): Likewise.
2929         (grub_ext3_get_journal): New function.
2930         (grub_read_inode): Initialize journal using grub_ext3_get_journal.
2931         (grub_ext2_close): Release memory used by journal.
2933         * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
2934         (REISERFS_MAGIC_DESC_BLOCK): New macro.
2935         (grub_reiserfs_transaction_header): Renamed to
2936         grub_reiserfs_description_block, replace field data with real_blocks.
2937         (grub_reiserfs_commit_block): New structure.
2938         (grub_reiserfs_data): New member journal.
2939         (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
2940         number.
2941         (grub_reiserfs_read_symlink): Likewise.
2942         (grub_reiserfs_iterate_dir): Likewise.
2943         (grub_reiserfs_open): Likewise.
2944         (grub_reiserfs_read): Likewise.
2945         (grub_reiserfs_get_journal): New function.
2946         (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
2947         three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
2948         using grub_reiserfs_get_journal.
2949         (grub_reiserfs_close): Release memory used by journal.
2951         * fs/affs.c (grub_affs_read_block): Change block type to
2952         grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
2954         * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
2956         * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
2958         * fs/ntfs.c (grub_ntfs_read_block): Likewise.
2960         * fs/udf.c (grub_udf_read_block): Change block type to
2961         grub_disk_addr_t. Use type cast to avoid warning.
2963         * fs/xfs.c (grub_xfs_read_block): Likewise.
2965 2008-05-16  Christian Franke  <franke@computer.org>
2967         * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
2968         to ensure that break with ESC will always work.
2969         * commands/sleep.c (grub_interruptible_millisleep): Likewise.
2970         Remove ESC from keyboard queue.
2972 2008-05-16  Christian Franke  <franke@computer.org>
2974         * util/biosdisk.c: [__CYGWIN__] Add includes.
2975         (grub_util_biosdisk_open): Use Linux code also for Cygwin.
2976         (get_os_disk): Move variable declarations to OS specific
2977         parts to avoid warning.
2978         [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
2979         [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
2980         (grub_util_biosdisk_get_grub_dev): Use Linux code also for
2981         Cygwin.
2982         * util/getroot.c: [__CYGWIN__] Add includes.
2983         (strip_extra_slashes): Fix "/" case.
2984         [__CYGWIN__] (get_win32_path): New function.
2985         [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
2986         [__CYGWIN__] (find_root_device): Disable.
2987         [__CYGWIN__] (get_bootsec_serial): New function.
2988         [__CYGWIN__] (find_cygwin_root_device): Likewise.
2989         [__linux__] (grub_guess_root_device): Add early returns to simplify
2990         structure.
2991         [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
2992         [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
2993         check for Linux only.
2995 2008-05-15  Bean  <bean123ch@gmail.com>
2997         * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
2998         keyboard hang problem in apple's intel mac.
3000 2008-05-09  Robert Millan  <rmh@aybabtu.com>
3002         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
3003         devices.
3004         * util/grub-mkdevicemap.c (get_virtio_disk_name)
3005         (make_device_map): Likewise.
3006         Reported by Aurelien Jarno <aurel32@debian.org>
3008 2008-05-07  Ian Campbell  <ijc@hellion.org.uk>
3010         * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
3011         * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
3012         (make_device_map): Output entries for xvd type disks.
3014 2008-05-07  Robert Millan  <rmh@aybabtu.com>
3016         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
3017         devices.
3018         * util/grub-mkdevicemap.c (get_cciss_disk_name)
3019         (make_device_map): Likewise.
3020         Reported by Roland Dreier <rdreier@cisco.com>
3022 2008-05-07  Robert Millan  <rmh@aybabtu.com>
3024         * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
3025         grub_strstr() call.  Correct a few mistakes in failure path handling.
3027 2008-05-06  Robert Millan  <rmh@aybabtu.com>
3029         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
3030         Do not print a trailing slash (therefore, the root directory is an
3031         empty string).
3032         (convert_system_path_to_grub_path): Do not remove trailing slash
3033         from make_system_path_relative_to_its_root() output.
3035         * util/i386/pc/grub-install.in: Add trailing slash to output from
3036         make_system_path_relative_to_its_root().
3038 2008-05-06  Robert Millan  <rmh@aybabtu.com>
3040         * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'.  This
3041         ensures that output lines aren't intermangled with those sent to
3042         stderr (via grub_util_info()).
3043         * util/grub-probe.c (grub_refresh): Likewise.
3044         * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
3046 2008-05-05  Christian Franke  <franke@computer.org>
3048         * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
3049         Add Cygwin device names.
3050         (get_ide_disk_name) [__CYGWIN__]: Likewise.
3051         (get_scsi_disk_name) [__CYGWIN__]: Likewise.
3052         (check_device): Return error instead of success on empty name.
3053         (make_device_map): Move label inside linux specific code to
3054         prevent compiler warning.
3056 2008-04-30  Robert Millan  <rmh@aybabtu.com>
3058         Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
3059         * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
3060         first boot option.
3061         * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
3063 2008-04-29  Robert Millan  <rmh@aybabtu.com>
3065         * docs/grub.cfg: New file (example GRUB configuration).
3067 2008-04-26  Robert Millan  <rmh@aybabtu.com>
3069         * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST).  Add
3070         `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
3071         and `disk/ieee1275/nand.c'.
3073 2008-04-25  Bean  <bean123ch@gmail.com>
3075         * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
3076         i386-linuxbios.
3078         * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
3079         change the buffer size to 4096 for cdrom device.
3081         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
3082         and nand.mod.
3083         (_linux_mod_SOURCES): New variable.
3084         (_linux_mod_CFLAGS): Likewise.
3085         (_linux_mod_LDFLAGS): Likewise.
3086         (linux_mod_SOURCES): Likewise.
3087         (linux_mod_CFLAGS): Likewise.
3088         (linux_mod_LDFLAGS): Likewise.
3089         (nand_mod_SOURCES): Likewise.
3090         (nand_mod_CFLAGS): Likewise.
3091         (nand_mod_LDFLAGS): Likewise.
3093         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
3094         GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
3095         type property. (nand device in olpc don't have this property)
3097         * include/grub/disk.h (grub_disk_dev_id): New macro
3098         GRUB_DISK_DEVICE_NAND_ID.
3100         * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
3101         function prototype.
3102         (grub_rescue_cmd_initrd): Likewise.
3104         * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
3105         (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
3106         ofw_cif_handler and ofw_idt, adjust padding number.
3108         * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
3109         GRUB_MACHINE_IEEE1275 is defined.
3111         * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
3112         Use NESTED_FUNC_ATTR attribute on the hook parameter.
3114         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
3115         on nested function heap_init.
3116         (grub_upper_mem): New variable for i386-ieee1275.
3117         (grub_get_extended_memory): New function for i386-ieee1275.
3118         (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
3120         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
3121         NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
3122         property.
3124         * loader/i386/ieee1275/linux.c: New file.
3126         * loader/i386/ieee1275/linux_normal.c: New file.
3128         * disk/ieee1275/nand.c: New file.
3130 2008-04-18  Thomas Schwinge  <tschwinge@gnu.org>
3132         * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
3133         value.
3134         * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
3136 2008-04-18  Robert Millan  <rmh@aybabtu.com>
3138         Restructures early code path on ieee1275 to unify grub_main() as
3139         the first C function that is executed in every platform.
3141         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
3142         * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
3143         cmain().
3144         * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
3145         * kern/ieee1275/cmain.c (cmain): Rename to ...
3146         * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
3147         * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
3148         at the beginning.
3150 2008-04-18  Robert Millan  <rmh@aybabtu.com>
3152         * util/update-grub.in: Fix syntax error when setting
3153         `GRUB_PRELOAD_MODULES'.
3154         Reported by Stephane Chazelas <stephane@artesyncp.com>
3156 2008-04-17  Lubomir Kundrak  <lkundrak@redhat.com>
3158         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
3159         section into account, newer toolchains generate unique build ids
3160         * configure.ac: remove the test for --build-id=none acceptance,
3161         we want build ids to be preserved
3162         * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
3163         far from other sections don't cause the raw binary images grow
3164         size
3166 2008-04-15  Robert Millan  <rmh@aybabtu.com>
3168         * disk/lvm.c: Update copyright year.
3169         * kern/misc.c: Likewise.
3171 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
3173         * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
3174         there is no memory left for physical volume name.
3176 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
3178         * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
3179         volume name mapping to support bigger than 9 character names properly.
3181 2008-04-13  Robert Millan  <rmh@aybabtu.com>
3183         * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
3184         as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
3186 2008-04-13  Christian Franke  <franke@computer.org>
3188         * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
3189         to create a floppy emulation boot CD when non emulation mode
3190         does not work.
3191         Enable Joliet CD filesystem extension.
3193 2008-04-13  Robert Millan  <rmh@aybabtu.com>
3195         * kern/misc.c (grub_strncat): Fix off-by-one error.
3196         Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
3198         * kern/env.c (grub_env_context_close): Clear current context, not
3199         previous one.
3200         Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
3202         * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
3204 2008-04-13  Robert Millan  <rmh@aybabtu.com>
3206         Improve robustness when handling LVM.
3208         * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
3209         (and leave `*p' unmodified).
3210         (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
3211         through it.
3212         (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
3213         iterating through it.
3214         (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
3215         through it.
3216         (grub_lvm_scan_device): Check the return value (and fail gracefully
3217         when due) on each grub_lvm_getvalue() or grub_strstr() call.
3218         Don't assume `vg->pvs != NULL' when iterating through it.
3220 2008-04-13  Robert Millan  <rmh@aybabtu.com>
3222         * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
3223         * genmk.rb (partmap): New variable.
3224         (CLEANFILES, PARTMAPFILES): Add #{partmap}.
3225         (#{partmap}): New target rule.
3226         * genpartmaplist.sh: New file.
3227         * Makefile.in (pkglib_DATA): Add partmap.lst.
3228         (partmap.lst): New target rule.
3229         * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
3230         modules (including all partition maps), instead of preloading them.
3232 2007-04-13  Fabian Greffrath  <fabian.greffrath@web.de>
3234         * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
3235         `linux-boot-prober' (if installed) to detect other operating
3236         systems which are installed on the computer and add them to
3237         the boot menu.
3238         * conf/common.rmk: Build and install 30_os-prober.
3240 2008-04-12  Robert Millan  <rmh@aybabtu.com>
3242         * kern/powerpc/ieee1275/init.c: Move from here ...
3243         * kern/ieee1275/init.c: ... to here.  Update all users.
3245         * kern/powerpc/ieee1275/cmain.c: Move from here ...
3246         * kern/ieee1275/cmain.c: ... to here.  Update all users.
3248         * kern/powerpc/ieee1275/openfw.c: Move from here ...
3249         * kern/ieee1275/openfw.c: ... to here.  Update all users.
3251         * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
3252         * loader/ieee1275/multiboot2.c: ... to here.  Update all users.
3254 2008-04-10  Pavel Roskin  <proski@gnu.org>
3256         * configure.ac: Always use "_cv_" in cache variables for
3257         compatibility with Autoconf 2.62.
3259 2008-04-07  Robert Millan  <rmh@aybabtu.com>
3261         Revert grub/machine/init.h addition by Pavel (since it breaks on
3262         i386-ieee1275 and others):
3263         * util/i386/pc/misc.c: Remove grub/machine/init.h.
3264         * util/powerpc/ieee1275/misc.c: Likewise.
3266 2008-04-07  Robert Millan  <rmh@aybabtu.com>
3268         * util/grub-probe.c (probe): Improve error message.
3270 2008-04-07  Robert Millan  <rmh@aybabtu.com>
3272         * util/biosdisk.c (read_device_map): Skip devices that don't exist
3273         (this prevents the presence of a bogus entry from ruining the whole
3274         thing).
3276 2008-04-06  Pavel Roskin  <proski@gnu.org>
3278         * util/biosdisk.c: Include grub/util/biosdisk.h.
3279         * util/grub-fstest.c (execute_command): Make static.
3280         * util/grub-mkdevicemap.c (check_device): Likewise.
3281         * util/i386/pc/misc.c: Include grub/machine/init.h.
3282         * util/powerpc/ieee1275/misc.c: Likewise.
3283         * util/lvm.c: Include grub/util/lvm.h.
3284         * util/misc.c: Include grub/kernel.h, grub/misc.h and
3285         grub/cache.h.
3286         * util/raid.c: Include grub/util/raid.h.
3287         (grub_util_getdiskname): Make static.
3289         * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
3290         grub_hostfs_fini(), as they are called from grub_init_all() and
3291         grub_fini_all() respectively.  This fixes an infinite loop in
3292         grub-fstest due to double registration of hostfs.
3293         Reported by Christian Franke <Christian.Franke@t-online.de>
3295 2008-04-05  Pavel Roskin  <proski@gnu.org>
3297         * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
3298         all 8 functions.  Otherwise, probe function 0 only.
3300 2008-04-04  Pavel Roskin  <proski@gnu.org>
3302         * commands/lspci.c (grub_lspci_iter): Print the bus number
3303         correctly.
3305         * commands/lspci.c (grub_pci_classes): Fix typos.
3306         (grub_lspci_iter): Don't print func twice.  Print vendor ID
3307         before device ID, as it's normally done.
3309         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
3310         Fix signedness warnings.
3311         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
3312         Likewise.
3313         * util/ieee1275/get_disk_name.c: Include config.h so that
3314         _GNU_SOURCE is defined and getline() is declared.  Mark an
3315         unused argument as such.  Fix a signedness warning.
3317 2008-04-02  Pavel Roskin  <proski@gnu.org>
3319         * genkernsyms.sh.in: Use more robust assignments for CC and
3320         srcdir.  Quote srcdir.
3321         * gensymlist.sh.in: Likewise.  Assert at the compile time that
3322         the symbol table is not empty.
3324         * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
3325         * fs/cpio.c (grub_cpio_read): Likewise.
3327 2008-04-01  Pavel Roskin  <proski@gnu.org>
3329         * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
3330         * disk/host.c (grub_host_open): Likewise.
3331         * disk/loopback.c (grub_loopback_open): Likewise.
3332         * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
3333         disk->id as in disk/host.c, not a multi-character constant.
3335         * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek().  The
3336         later is obsolete, potentially dangerous and sets a bad example.
3337         * util/i386/efi/grub-mkimage.c (make_header): Likewise.
3338         * util/misc.c (grub_util_get_image_size): Likewise.
3340         * disk/loopback.c (options): Improve help for "--partitions".
3342         * normal/arg.c (grub_arg_show_help): Fix spacing of the long
3343         options to align them with the short options, e.g. "echo -e".
3345 2008-03-31  Bean  <bean123ch@gmail.com>
3347         * video/reader/png.c (grub_png_data): New member is_16bit and
3348         image_data.
3349         (grub_png_decode_image_header): Detect 16 bit png image.
3350         (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
3351         (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
3352         (grub_video_reader_png): Release memory occupied by image_data.
3354         * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
3355         4096 bytes.
3356         (grub_nfs_mount): Skip the test for sector per cluster.
3358         * include/grub/ntfs.h (MAX_SPC): Removed.
3360 2008-03-31  Bean  <bean123ch@gmail.com>
3362         * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
3363         (grub_probe_SOURCES): Add fs/afs.c.
3364         (grub_fstest_SOURCES): Likewise.
3365         (afs_mod_SOURCES): New variable.
3366         (afs_mod_CFLAGS): Likewise.
3367         (afs_mod_LDFLAGS): Likewise.
3369         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
3370         (grub_emu_SOURCES): Likewise.
3372         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3374         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3376         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3378         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3380         * fs/afs.c: New file.
3382 2008-03-30  Pavel Roskin  <proski@gnu.org>
3384         * disk/host.c: Include grub/misc.h to fix a warning.
3385         * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
3386         warnings about implicit declarations.
3388         * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
3389         variable.
3390         * include/grub/i386/loader.h: Change declaration of
3391         grub_linux_boot() to match what grub_loader_set() expects.
3392         * util/getroot.c (grub_guess_root_device): Return const char* to
3393         fix a warning.
3394         * util/grub-probe.c (probe): Fix a warning about uninitialized
3395         abstraction_name variable.
3396         * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
3397         second argument as unused to fix a warning.
3399         * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
3400         missing grub_error() call.
3402         * util/update-grub_lib.in: Define datarootdir, since Autoconf
3403         2.60 and newer uses it to define datadir.
3405         * commands/sleep.c: Fix warning about implicit declaration.
3406         * disk/memdisk.c: Likewise.
3407         * loader/aout.c: Likewise.
3408         * loader/i386/bsd_normal.c: Likewise.
3409         * util/grub-probe.c: Likewise.
3411         * commands/i386/cpuid.c (has_longmode): Make static.
3412         * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
3413         * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
3415         * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
3416         GDT.  This is more robust, as %ds can change.
3417         (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
3418         calling real_to_prot().
3419         (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
3421 2008-03-28  Pavel Roskin  <proski@gnu.org>
3423         * kern/i386/pc/startup.S: Assert that uncompressed functions
3424         don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
3425         * kern/i386/pc/lzo1x.S: Remove all .align directives in the
3426         code, as they push parts of the code (error handlers) beyond
3427         GRUB_KERNEL_MACHINE_RAW_SIZE.  Speed is not as important in this
3428         code as correctness and size.
3430 2008-03-28  Pavel Roskin  <proski@gnu.org>
3432         * kern/i386/pc/startup.S
3433         (grub_biosdisk_get_diskinfo_int13_extensions): When converting
3434         data block address to the real mode, keep offset minimal.  This
3435         works around a bug in AWARD BIOS on old Athlon systems, which
3436         makes CD detection hang.
3438 2008-03-26  Pavel Roskin  <proski@gnu.org>
3440         * normal/color.c (grub_parse_color_name_pair): Make `name' a
3441         const.
3442         * include/grub/normal.h: Add grub_parse_color_name_pair()
3443         declaration.
3445 2008-03-24  Bean  <bean123ch@gmail.com>
3447         * disk/i386/pc/biosdisk.c (cd_start): Removed.
3448         (cd_count): Removed.
3449         (cd_drive): New variable.
3450         (grub_biosdisk_get_drive): Don't check for (cdN) device.
3451         (grub_biosdisk_call_hook): Likewise.
3452         (grub_biosdisk_iterate): Change cdrom detection method.
3453         (grub_biosdisk_open): Replace cd_start with cd_drive.
3454         (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
3455         detect cdrom device.
3457         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
3458         Removed.
3459         (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
3460         (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
3461         (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
3462         (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
3463         (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
3464         (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
3465         (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
3466         (grub_biosdisk_cdrp): New structure.
3467         (grub_biosdisk_get_cdinfo_int13_extensions): New function.
3469         * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
3471         * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
3472         device.
3474         * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
3475         New function.
3477 2008-03-20  Robert Millan  <rmh@aybabtu.com>
3479         Remove 2 TiB limit in ata.mod.
3480         * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
3481         (grub_ata_dumpinfo): Print sector count with 0x%llx.
3482         (grub_ata_identify): Interpret `&info16[100]' as a pointer to
3483         grub_uint64_t instead of grub_uint32_t.
3485 2008-03-05  Bean  <bean123ch@gmail.com>
3487         * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
3488         (grub_multiboot): Set boot device.
3490         * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
3492 2008-03-02  Bean  <bean123ch@gmail.com>
3494         * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
3495         symlink_buffer.
3497 2008-03-01  Yoshinori K. Okuji  <okuji@enbug.org>
3499         * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
3500         texinfo.tex.
3502         * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
3503         modified.
3505         * docs/fdl.texi: New file.
3507         * docs/mdate-sh: New file. Copied from gnulib.
3508         * docs/texinfo.tex: Likewise.
3510         * config.guess: Updated from gnulib.
3511         * install-sh: Likewise.
3513 2008-02-28  Robert Millan  <rmh@aybabtu.com>
3515         * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
3516         (aout_mod_SOURCES): New variable.
3517         (aout_mod_CFLAGS): Likewise.
3518         (aout_mod_LDFLAGS): Likewise.
3520         * conf/i386-ieee1275.rmk: Likewise.
3522 2008-02-28  Robert Millan  <rmh@aybabtu.com>
3524         * util/update-grub.in: Reorganise terminal validity check.  Accept
3525         `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
3526         Based on suggestion by Franklin PIAT.
3528 2008-02-28  Fabian Greffrath  <greffrath@leat.rub.de>
3530         * include/grub/util/getroot.h (grub_util_check_block_device): Export new
3531         function.
3532         * util/getroot.c (grub_util_check_block_device): New function that
3533         returns the given argument if it is a block device and returns NULL else.
3534         * util/grub-probe.c (argument_is_device): New variable.
3535         (probe): Promote device_name from a variable to an argument. Receive
3536         device_name from grub_util_check_block_device() if path is NULL and from
3537         grub_guess_root_device() else. Do not free() device_name anymore.
3538         (options): Introduce new parameter '-d, --device'.
3539         (main): Add description of the new parameter to the help screen.
3540         Rename path variable to argument. Set argument_is_device if the '-d'
3541         option is given. Pass argument to probe() depending on
3542         argument_is_device.
3544 2008-02-24  Bean  <bean123ch@gmail.com>
3546         * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
3547         (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
3548         (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
3549         (GRUB_ISO9660_VOLDESC_PART): Likewise.
3550         (GRUB_ISO9660_VOLDESC_END): Likewise.
3551         (grub_iso9660_primary_voldesc): New member escape.
3552         (grub_iso9660_data): New member joliet.
3553         (grub_iso9660_convert_string): New function.
3554         (grub_iso9660_mount): Detect joliet extension.
3555         (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
3556         (grub_iso9660_iso9660_label): Likewise.
3558         * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
3559         (grub_setup_SOURCES): Add fs/udf.c.
3560         (grub_fstest_SOURCES): Likewise.
3561         (udf_mod_SOURCES): New variable.
3562         (udf_mod_CFLAGS): Likewise.
3563         (udf_mod_LDFLAGS): Likewise.
3565         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
3566         (grub_emu_SOURCES): Likewise.
3568         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3570         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3572         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3574         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3576         * fs/udf.c: New file.
3578 2008-02-24  Robert Millan  <rmh@aybabtu.com>
3580         * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
3581         (normal/lexer.c_DEPENDENCIES): New variables.
3582         * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
3583         (normal/lexer.c_DEPENDENCIES): Likewise.
3584         * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
3585         (normal/lexer.c_DEPENDENCIES): Likewise.
3586         * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
3587         (normal/lexer.c_DEPENDENCIES): Likewise.
3588         * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
3589         (normal/lexer.c_DEPENDENCIES): Likewise.
3590         * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
3591         (normal/lexer.c_DEPENDENCIES): Likewise.
3593 2008-02-23  Robert Millan  <rmh@aybabtu.com>
3595         * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
3596         since they were intended to be in hex.  This didn't break previously
3597         because of a bug in gpt_partition_map_iterate() (see below).
3599         (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
3600         when checking the validity of GPT header.
3601         Remove `partno', since it always provides the same information as `i'.
3603 2008-02-21  Yoshinori K. Okuji  <okuji@enbug.org>
3605         * include/grub/efi/time.h: Fix a wrong comment.
3607 2008-02-19  Pavel Roskin  <proski@gnu.org>
3609         * kern/rescue.c (grub_enter_rescue_mode): Improve initial
3610         message.
3612 2008-02-19  Bean  <bean123ch@gmail.com>
3614         * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
3615         (aout_mod_SOURCES): New variable.
3616         (aout_mod_CFLAGS): Likewise.
3617         (aout_mod_LDFLAGS): Likewise.
3618         (_bsd_mod_SOURCES): New variable.
3619         (_bsd_mod_CFLAGS): Likewise.
3620         (_bsd_mod_LDFLAGS): Likewise.
3621         (bsd_mod_SOURCES): New variable.
3622         (bsd_mod_CFLAGS): Likewise.
3623         (bsd_mod_LDFLAGS): Likewise.
3625         * include/grub/aout.h: New file.
3627         * include/grub/i386/loader.h (grub_unix_real_boot): New function.
3629         * include/grub/i386/bsd.h: New file.
3631         * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
3632         to make it public.
3634         * kern/elf.c (grub_elf32_load): Get the physical address after the hook
3635         function is called, so that it's possible to change it inside the hook.
3636         (grub_elf64_load): Likewise.
3637         (grub_elf_file): Don't close the file if elf header is not found.
3638         (grub_elf_close): Close the file if grub_elf_file fails (The new
3639         grub_elf_file won't close it).
3640         (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
3641         (grub_elf64_size): Likewise.
3643         * kern/i386/loader.S (grub_unix_real_boot): New function.
3645         * loader/aout.c: New file.
3647         * loader/i386/bsd.c: New file.
3649         * loader/i386/bsd_normal.c: New file.
3651         * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
3653         * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
3654         can test other formats.
3656 2008-02-19  Robert Millan  <rmh@aybabtu.com>
3658         * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
3659         (grub_gpt_partition_type_empty): Redefine with macro from
3660         `<grub/gpt_partition.h>'.
3661         (gpt_partition_map_iterate): Adjust partition type comparison.
3663         Export `entry' as partmap-specific `part.data' struct.
3664         (grub_gpt_header, grub_gpt_partentry): Move from here ...
3666         * include/grub/gpt_partition.h (grub_gpt_header)
3667         (grub_gpt_partentry): ... to here (new file).
3669         * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
3671         (grub_gpt_partition_type_bios_boot): New const variable, defined
3672         with macro from `<grub/gpt_partition.h>'.
3674         (setup): Replace `first_start' with `embed_region', which keeps
3675         track of the embed region (and is partmap-agnostic).
3677         Replace find_first_partition_start() with find_usable_region(),
3678         which finds a usable region for embedding using partmap-specific
3679         knowledge (supports PC/MSDOS and GPT).
3681         Fix all assumptions that the embed region start at sector 1, using
3682         `embed_region.start' from now on.  Similarly, use `embed_region.end'
3683         rather than `first_start' to calculate available size.
3685         In grub_util_info() message, replace "into after the MBR" with an
3686         indication of the specific sector our embed region starts at.
3688 2008-02-19  Robert Millan  <rmh@aybabtu.com>
3690         * DISTLIST: Replace `commands/ieee1275/halt.c' and
3691         `commands/ieee1275/reboot.c' with `commands/halt.c' and
3692         `commands/reboot.c'.
3693         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
3694         (halt_mod_SOURCES): Likewise.
3695         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
3696         (halt_mod_SOURCES): Likewise.
3698 2008-02-17  Christian Franke  <franke@computer.org>
3700         * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
3702 2008-02-17  Robert Millan  <rmh@aybabtu.com>
3704         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
3705         set `first_start' to 0 for non-PC/MSDOS partition maps.
3707 2008-02-16  Robert Millan  <rmh@aybabtu.com>
3709         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
3710         do not assume partition map is PC/MSDOS before performing checks that
3711         are specific to that layout.
3713 2008-02-13  Robert Millan  <rmh@aybabtu.com>
3715         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
3716         `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
3717         * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
3719 2008-02-13  Yoshinori K. Okuji  <okuji@enbug.org>
3721         * configure.ac: Only a cosmetic change on the handling of
3722         -fno-stack-protector.
3724 2008-02-12  Alexandre Boeglin  <alex@boeglin.org>
3726         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
3727         commands/i386/pc/halt.c and reboot.c by commands/halt.c and
3728         reboot.c.
3729         (grub_install_SOURCES): Add halt.mod and reboot.mod.
3730         (halt_mod_SOURCES): New variable.
3731         (halt_mod_CFLAGS): Likewise.
3732         (halt_mod_LDFLAGS): Likewise.
3733         (reboot_mod_SOURCES): Likewise.
3734         (reboot_mod_CFLAGS): Likewise.
3735         (reboot_mod_LDFLAGS): Likewise.
3737         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
3738         commands/ieee1275/halt.c and reboot.c by commands/halt.c and
3739         reboot.c.
3740         (halt_mod_SOURCES): Likewise.
3741         (reboot_mod_SOURCES): Likewise.
3743         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
3744         commands/i386/pc/reboot.c by commands/reboot.c.
3745         (reboot_mod_SOURCES): Likewise.
3747         * commands/i386/pc/reboot.c: merge this file ...
3749         * commands/ieee1275/reboot.c: ... and this file ...
3751         * commands/reboot.c: ... to this file.
3752         Add some precompiler directive to include the correct header for
3753         each machine.
3755         * commands/ieee1275/halt.c: move this file ...
3757         * commands/halt.c: ... to here.
3758         Add some precompiler directive to include the correct header for
3759         each machine.
3761         * include/grub/efi/efi.h (grub_reboot): New function declaration.
3762         (grub_halt): Likewise.
3764         * kern/efi/efi.c (grub_reboot): New function.
3765         (grub_halt): Likewise.
3767 2008-02-12  Robert Millan  <rmh@aybabtu.com>
3769         * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
3770         /dev (like it is done for /dev/mapper).  This doesn't provide support
3771         for EVMS, but at least it is now easy to identify the problem when it
3772         arises.
3774 2008-02-11  Robert Millan  <rmh@aybabtu.com>
3776         * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
3777         (grub_util_biosdisk_get_grub_dev): Check open() exit status by
3778         comparing it with -1, not 0.
3780 2008-02-10  Robert Millan  <rmh@aybabtu.com>
3782         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
3783         `disk/lvm.c'.
3784         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3785         * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
3787         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
3788         `disk/lvm.c' to the end of the list.
3789         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3790         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3792 2008-02-10  Robert Millan  <rmh@aybabtu.com>
3794         * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'.  Call
3795         grub_print_error() instead.  This will let user know why we're entering
3796         rescue mode.
3797         Based on suggestions from Sam Morris.
3799 2008-02-10  Alexandre Boeglin  <alex@boeglin.org>
3801         * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
3802         on remaining N args, instead of "--" arg N times.
3804 2008-02-09  Vesa Jaaskelainen  <chaac@nic.fi>
3806         * font/manager.c (unknown_glyph): Added variable for unknown glyph.
3807         (fill_with_default_glyph): Changed to use unknown_glyph for fill
3808         pattern for unknown glyphs.
3810 2008-02-09  Robert Millan  <rmh@aybabtu.com>
3812         * configure.ac: Probe for `help2man'.
3813         * Makefile.in (builddir): New variable.
3814         (HELP2MAN): Likewise.  Set to `true' when @HELP2MAN@ doesn't provide it,
3815         or otherwise add a few flags/options to it.
3816         (install-local): For every executable utility or script that is
3817         installed, invoke $(HELP2MAN) to install a manpage based on --help
3818         output.
3820         * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
3821         that it doesn't prevent --help from working in build tree.
3823         * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
3824         with `bug-grub@gnu.org'.
3825         * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
3826         * util/update-grub.in (usage): New function.
3827         Implement proper argument check, with support for --help and --version
3828         (as well as existing -y).
3830 2008-02-09  Christian Franke  <franke@computer.org>
3832         * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
3833         avoid overwriting previous output.
3834         * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
3836 2008-02-09  Robert Millan  <rmh@aybabtu.com>
3838         * normal/menu.c (run_menu): If timeout is set to zero, don't bother
3839         drawing the menu.
3841 2008-02-09  Robert Millan  <rmh@aybabtu.com>
3843         * commands/sleep.c: New file.
3844         * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
3845         (sleep_mod_SOURCES): New variable.
3846         (sleep_mod_CFLAGS): Likewise.
3847         (sleep_mod_LDFLAGS): Likewise.
3849 2008-02-09  Robert Millan  <rmh@aybabtu.com>
3851         * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
3852         situations in which we can deduce the RAID size and the superblock
3853         doesn't match it.
3855 2008-02-09  Robert Millan  <rmh@aybabtu.com>
3857         * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function.  Construct
3858         and return a grub_diskmemberlist_t composed of LVM physical volumes.
3859         [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
3861         * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function.  Construct
3862         and return a grub_diskmemberlist_t composed of physical array members.
3863         [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
3865         * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
3866         prototype.
3867         [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
3868         [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
3869         [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
3871         * util/grub-probe.c (probe): Move partmap probing code from here ...
3872         (probe_partmap): ... to here.
3873         (probe): Use probe_partmap() once for the disk we're probing, and
3874         additionally, when such disk contains a memberlist() struct member,
3875         once for each disk that is contained in the structure returned by
3876         memberlist().
3878 2008-02-09  Robert Millan  <rmh@aybabtu.com>
3880         * util/grub-probe.c (main): When `verbosity > 1', set `debug'
3881         environment variable to 'all' in order to obtain debug output from
3882         non-util/ code.
3883         * util/i386/pc/grub-setup.c (main): Likewise.
3885 2008-02-08  Robert Millan  <rmh@aybabtu.com>
3887         * disk/raid.c (grub_raid_scan_device): Check for
3888         `array->device[sb.this_disk.number]' rather than for
3889         `array->device[sb.this_disk.number]->name', since the latter is not
3890         guaranteed to be accessible.
3892 2008-02-08  Robert Millan  <rmh@aybabtu.com>
3894         * disk/raid.c: Update copyright.
3895         * fs/cpio.c: Likewise.
3896         * include/grub/raid.h: Likewise.
3897         * loader/i386/pc/multiboot.c: Likewise.
3898         * util/hostfs.c: Likewise.
3900 2008-02-08  Robert Millan  <rmh@aybabtu.com>
3902         * include/grub/raid.h (struct grub_raid_array): Change type of `device'
3903         to a grub_disk_t array.
3904         * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
3905         `device[x]'.
3906         (grub_raid_scan_device): Replace `device[x].name' accesses with
3907         `device[x]->name'.  Simplify initialization of `array->device[x]'.
3909 2008-02-08  Robert Millan  <rmh@aybabtu.com>
3911         * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
3912         grub_dprintf() calls.
3913         * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
3914         error message.
3916 2008-02-07  Christian Franke  <franke@computer.org>
3918         * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
3919         instead of fseek and ftell to support large files.
3920         (grub_hostfs_read): Likewise.
3922 2008-02-07  Robert Millan  <rmh@aybabtu.com>
3924         Patch from Jeroen Dekkers.
3925         * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
3926         failure, since successfully reading all array members might not be
3927         required.
3929 2008-02-06  Robert Millan  <rmh@aybabtu.com>
3931         * util/grub-probe.c (probe): Simplify partmap probing (with the
3932         assumption that the first word up to the underscore equals to
3933         the module name).
3935 2008-02-06  Christian Franke  <franke@computer.org>
3937         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
3938         (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
3939         last block of a cpio or tar stream.
3940         Check for "TRAILER!!!" instead of any empty data
3941         block to detect last block of a cpio stream.
3942         (grub_cpio_dir): Fix constness of variable np.
3943         (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
3944         cpio or tar trailer is detected.  This fixes a crash
3945         on open of a non existing file.
3947 2008-02-05  Bean  <bean123ch@gmail.com>
3949         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
3950         address of entry.
3951         (grub_multiboot_load_elf64): Likewise.
3952         (grub_multiboot): Initialize mbi structure.
3954         * util/grub-fstest.c: Don't include unused header file script.h.
3956         * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
3957         of file.
3958         (grub_fstest_SOURCES): Likewise.
3960 2008-02-05  Robert Millan  <rmh@aybabtu.com>
3962         * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
3963         (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
3964         (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
3965         (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
3967         * kern/i386/pc/startup.S: Include `<grub/term.h>'.
3968         (translation_table): Replace hardcoded values with macros
3969         provided by `<grub/term.h>'.
3971         * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
3972         (keyboard_map): Correct/add a few values, with macros provided
3973         by `<grub/term.h>'.
3974         (keyboard_map_shift): Zero values that don't differ from their
3975         `keyboard_map' equivalents.
3976         (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
3977         Discard the second scan code that is always sent by Caps lock.
3978         Only use `keyboard_map_shift' when it provides a non-zero value,
3979         otherwise fallback to `keyboard_map'.
3981 2008-02-04  Bean  <bean123ch@gmail.com>
3983         * Makefile.in (enable_grub_fstest): New variable.
3985         * conf/common.rmk (grub_fstest_init.lst): New rule.
3986         (grub_fstest_init.h): Likewise.
3987         (grub_fstest_init.c): Likewise.
3988         (util/grub-fstest.c_DEPENDENCIES): New variable.
3989         (grub_fstest_SOURCES): Likewise.
3991         * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
3993         * util/grub-fstest.c: New file.
3995 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
3997         Make grub-setup handle a separate root device.
3999         * util/i386/pc/grub-setup.c (setup): Always open the root device,
4000         so that the root device can be compared with the destination
4001         device.
4002         When embedding the core image, if the root and destination devices
4003         are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
4004         0xFF.
4005         When not embedding, set ROOT_DRIVE to 0xFF.
4007 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
4009         Add support for having a grub directory in a different drive. This
4010         is still only the data handling part.
4012         * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
4013         (codestart): Save %dh in GRUB_ROOT_DRIVE.
4014         (grub_root_drive): New variable.
4016         * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
4017         instead of GRUB_BOOT_DRIVE to construct a device name. Set
4018         GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
4019         as it was.
4021         * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
4023         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
4024         macro.
4025         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
4027         * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
4028         is bogus, because PXE booting does not specify any drive
4029         correctly.
4031         * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
4032         am not sure if this is really correct.
4034         * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
4035         is always identical to the boot drive when booting from a CD.
4037         * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
4038         longer.
4039         (root_drive): New variable.
4040         (real_start): Unconditionally set %dh to ROOT_DRIVE.
4041         (setup_sectors): Push %dx right after popping it, because %dh will
4042         be modified later.
4043         (copy_buffer): Restore %dx.
4045 2008-02-03  Robert Millan  <rmh@aybabtu.com>
4047         * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
4048         use `cdboot.img' for cdrom images.
4050 2008-02-03  Robert Millan  <rmh@aybabtu.com>
4052         * util/grub.d/00_header.in: Issue scripting commands for GRUB to
4053         only setup gfxterm when `font' command has succeeded.
4055 2008-02-03  Robert Millan  <rmh@aybabtu.com>
4057         * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
4058         (grub_rescue_cmd_multiboot_loader)
4059         (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
4061 2008-02-03  Pavel Roskin  <proski@gnu.org>
4063         * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
4064         %edx and %esi from stack only after grub_gate_a20() is called.
4065         grub_gate_a20() clobbers %edx.
4067 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
4069         * configure.ac (AC_INIT): Bumped to 1.96.
4071         * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
4072         commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
4073         include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
4074         video/readers/png.c.
4076 2008-02-03  Bean  <bean123ch@gmail.com>
4078         * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
4079         (cdboot_img_SOURCES): New variable.
4080         (cdboot_img_ASFLAGS): New variable.
4081         (cdboot_img_LDFLAGS): New variable.
4083         * boot/i386/pc/cdboot.S: New file.
4085         * disk/i386/pc/biosdisk.c (cd_start): New variable.
4086         (cd_count): Likewise.
4087         (grub_biosdisk_get_drive): Add support for cd device.
4088         (grub_biosdisk_call_hook): Likewise.
4089         (grub_biosdisk_iterate): Likewise.
4090         (grub_biosdisk_open): Likewise.
4091         (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
4092         (grub_biosdisk_rw): Support reading from cd device.
4093         (GRUB_MOD_INIT): Iterate cd devices.
4095         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
4096         (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
4097         (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
4099         * kern/i386/pc/init.c (make_install_device): Check for cd device.
4101 2008-02-02  Robert Millan  <rmh@aybabtu.com>
4103         * commands/read.c: New file.
4104         * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
4105         (read_mod_SOURCES): New variable.
4106         (read_mod_CFLAGS): Likewise.
4107         (read_mod_LDFLAGS): Likewise.
4109 2008-02-02  Robert Millan  <rmh@aybabtu.com>
4111         * normal/main.c (grub_normal_execute): Check for `menu->size' when
4112         determining whether menu has to be displayed.
4114 2008-02-02  Marco Gerards  <marco@gnu.org>
4116         * bus/pci.c: New file.
4118         * include/grub/pci.h: Likewise.
4120         * include/grub/i386/pc/pci.h: Likewise.
4122         * commands/lspci.c: Likewise.
4124         * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
4125         `lspci.mod'.
4126         (pci_mod_SOURCES): New variable.
4127         (pci_mod_CFLAGS): Likewise.
4128         (pci_mod_LDFLAGS): Likewise.
4129         (lspci_mod_SOURCES): Likewise.
4130         (lspci_mod_CFLAGS): Likewise.
4131         (lspci_mod_LDFLAGS): Likewise.
4133 2008-02-02  Bean  <bean123ch@gmail.com>
4135         * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
4136         (grub_ufs_get_file_block): Fix indirect block calculation problem.
4138         * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
4139         (grub_xfs_btree_node): New structure.
4140         (grub_xfs_btree_root): New structure.
4141         (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
4142         (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
4143         (GRUB_XFS_EXTENT_BLOCK): Likewise.
4144         (GRUB_XFS_EXTENT_SIZE): Likewise.
4145         (grub_xfs_read_block): Support btree format type.
4146         (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
4147         Use directory block as basic unit.
4149         * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
4151         * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
4152         __attribute__ ((__regparm__ (1))).
4154 2008-02-01  Robert Millan  <rmh@aybabtu.com>
4156         Correct a mistake in previous commit.
4158         * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
4159         top.
4160         (normal/command.c_DEPENDENCIES): New variable.
4162 2008-02-01  Robert Millan  <rmh@aybabtu.com>
4164         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
4165         top.
4166         (normal/command.c_DEPENDENCIES): New variable.
4167         (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
4168         * conf/i386-ieee1275.rmk: Likewise.
4169         * conf/i386-linuxbios.rmk: Likewise.
4170         * conf/i386-pc.rmk: Likewise.
4171         * conf/sparc64-ieee1275.rmk: Likewise.
4172         * conf/powerpc-ieee1275.rmk: Likewise.
4173         (grub_emu_SOURCES): Add `fs/fshelp.c'.
4175         * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
4177 2008-02-01  Robert Millan  <rmh@aybabtu.com>
4179         * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
4180         call at beginning of function.
4182 2008-01-31  Pavel Roskin  <proski@gnu.org>
4184         * util/powerpc/ieee1275/grub-mkrescue.in: New file.
4185         * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
4186         (grub_mkrescue_SOURCES): Likewise.
4187         * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
4189 2008-01-30  Robert Millan  <rmh@aybabtu.com>
4191         * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
4192         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
4193         * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
4194         (grub_probe_SOURCES): ... to here.
4196         * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
4197         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
4198         * conf/i386-ieee1275.rmk: Likewise.
4199         * conf/i386-linuxbios.rmk: Likewise.
4200         * conf/powerpc-ieee1275.rmk: Likewise.
4202 2008-01-30  Tristan Gingold  <gingold@free.fr>
4204         * kern/rescue.c: Silently accept empty lines.
4206 2008-01-29  Bean  <bean123ch@gmail.com>
4208         * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
4209         (real_code_2): Code cleanup and change comment style.
4210         (move_memory): Avoid using 32-bit address mode.
4212 2008-01-29  Bean  <bean123ch@gmail.com>
4214         * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
4215         (png_mod_SOURCES): New variable.
4216         (png_mod_CFLAGS): Likewise.
4217         (png_mod_LDFLAGS): Likewise.
4219         * video/readers/png.c: New file.
4221 2008-01-28  Robert Millan  <rmh@aybabtu.com>
4223         * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
4224         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
4225         `ifndef GRUB_MOD_GAP' hack.
4226         * util/elf/grub-mkimage.c (add_segments): Likewise.
4228 2008-01-27  Robert Millan  <rmh@aybabtu.com>
4230         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
4231         `GRUB_MOD_GAP' for platforms in which it's not defined.
4232         * util/elf/grub-mkimage.c (add_segments): Likewise.
4234 2008-01-27  Robert Millan  <rmh@aybabtu.com>
4236         Get grub-emu to build again (including parallel builds).
4238         * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
4239         Split into ...
4240         (util/grub-emu.c_DEPENDENCIES): ... this, ...
4241         (normal/execute.c_DEPENDENCIES): ... this, ...
4242         (grub-emu_DEPENDENCIES): ... and this.
4244         * conf/i386-efi.rmk: Likewise.
4245         * conf/i386-linuxbios.rmk: Likewise.
4246         * conf/i386-ieee1275.rmk: Likewise.
4247         * conf/powerpc-ieee1275.rmk: Likewise.
4248         (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
4250 2008-01-27  Robert Millan  <rmh@aybabtu.com>
4252         * NEWS: Add a few items.
4254 2008-01-27  Robert Millan  <rmh@aybabtu.com>
4256         Fix parallel builds with grub-emu.  Based on earlier commit for
4257         grub-probe and grub-setup.
4259         * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4260         (util/grub-emu.c_DEPENDENCIES): ... this.
4261         * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4262         (util/grub-emu.c_DEPENDENCIES): ... this.
4263         * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4264         (util/grub-emu.c_DEPENDENCIES): ... this.
4265         * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4266         (util/grub-emu.c_DEPENDENCIES): ... this.
4267         * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4268         (util/grub-emu.c_DEPENDENCIES): ... this.
4270 2008-01-27  Pavel Roskin  <proski@gnu.org>
4272         * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
4273         to create a gap between _end and the modules added to the image
4274         with grub-mkrescue.  That fixes "CLAIM failed" on PowerMAC.
4275         * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
4276         * util/elf/grub-mkimage.c (add_segments): Likewise.
4278 2008-01-26  Pavel Roskin  <proski@gnu.org>
4280         * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
4281         just return an error.
4283 2008-01-26  Bean  <bean123ch@gmail.com>
4285         * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
4286         (grub_reiserfs_get_item): Save offset of the next item.
4287         (grub_reiserfs_iterate_dir): Use next_offset to find next item.
4289 2008-01-25  Robert Millan  <rmh@aybabtu.com>
4291         * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
4292         make all filesystem sources appear together (possibly fixing omissions
4293         while at it).
4294         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4295         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4296         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4297         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4299         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.  Additionally,
4300         add `kern/file.c'.
4301         * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
4302         * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
4303         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
4304         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
4306         * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
4307         (probe): Add a sanity check to make sure of our ability to read
4308         requested files when probing for filesystem type.
4310         * genmk.rb: Update copyright year (2007).
4312         * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
4313         (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
4314         (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
4315         (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
4316         (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
4317         : Remove function prototypes.
4319 2008-01-25  Robert Millan  <rmh@aybabtu.com>
4321         Revert my previous commits (based on wrong assumption of how grub_errno
4322         works).
4324         * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
4325         * kern/file.c (grub_file_open): Likewise.
4327 2008-01-24  Pavel Roskin  <proski@gnu.org>
4329         * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
4330         that hang if GRUB tries to setup colors.
4331         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
4332         colors for firmwares that don't support it.
4333         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
4334         Recognize Open Hack'Ware, set flags to work around its
4335         limitations.
4337 2008-01-24  Robert Millan  <rmh@aybabtu.com>
4339         * kern/file.c (grub_file_open): Do not account previous failures of
4340         unrelated functions when grub_errno is checked for.
4341         Reported by Oleg Strikov.
4343 2008-01-24  Bean  <bean123ch@gmail.com>
4345         * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
4346         (grub_ufs_sblock): New member volume name.
4347         (grub_ufs_find_file): Fix string copy bug.
4348         (grub_ufs_label): Implement this function properly.
4350         * fs/hfs.c (grub_hfs_cnid_type): New enum.
4351         (grub_hfs_iterate_records): Use the correct file number for extents
4352         and catalog file. Fix problem in next index calculation.
4353         (grub_hfs_find_node): Replace recursive function call with loop.
4354         (grub_hfs_iterate_dir): Replace recursive function call with loop.
4356 2008-01-23  Robert Millan  <rmh@aybabtu.com>
4358         * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
4359         `<grub/symbol.h>' and `<grub/multiboot.h>'.
4360         (grub_multiboot2_real_boot): New function prototype.
4362         * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
4363         [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
4365         * kern/i386/ieee1275/init.c (grub_os_area_addr)
4366         (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
4368 2008-01-23  Robert Millan  <rmh@aybabtu.com>
4370         * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
4371         #ifdef'ed out grub_printf().
4373 2008-01-23  Robert Millan  <rmh@aybabtu.com>
4375         * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
4376         grub_dprintf calls, since they make "debug=all" mode unusable.
4377         (grub_console_checkkey): Likewise.
4379 2008-01-23  Robert Millan  <rmh@aybabtu.com>
4381         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
4382         `term/i386/pc/at_keyboard.c'.
4383         (pkglib_MODULES): Add `serial.mod'.
4384         (serial_mod_SOURCES): New variable.
4385         (serial_mod_CFLAGS): Likewise.
4386         (serial_mod_LDFLAGS): Likewise.
4388         * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'.  Remove
4389         `<grub/powerpc/ieee1275/console.h>'.
4390         (grub_keyboard_controller_init): New function prototype.
4391         (grub_console_checkkey): Likewise.
4392         (grub_console_getkey): Likewise.
4394         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
4395         keyboard on i386.
4397         * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
4398         grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
4400 2008-01-23  Robert Millan  <rmh@aybabtu.com>
4402         * kern/i386/pc/init.c (make_install_device): When memdisk image is
4403         present, "(memdisk)/boot/grub" becomes the default prefix.
4405         * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
4406         a memdisk tarball with all the modules.  Add --overlay=DIR option that
4407         allows users to overlay additional files into the image.
4409 2008-01-23  Robert Millan  <rmh@aybabtu.com>
4411         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
4412         and `machine/memory.h'.
4413         (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
4414         (_multiboot_mod_SOURCES): New variable.
4415         (_multiboot_mod_CFLAGS): Likewise.
4416         (_multiboot_mod_LDFLAGS): Likewise.
4417         (multiboot_mod_SOURCES): Likewise.
4418         (multiboot_mod_CFLAGS): Likewise.
4419         (multiboot_mod_LDFLAGS): Likewise.
4421         * include/grub/i386/ieee1275/loader.h: New file.
4423         * include/grub/i386/ieee1275/machine.h: Likewise.
4425         * include/grub/i386/ieee1275/memory.h: Likewise.
4427         * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
4428         variable declaration.
4429         (grub_os_area_size): Likewise.
4431         * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
4432         (grub_lower_mem, grub_upper_mem): New variables.
4433         (grub_stop_floppy): New function (just to make
4434         grub_multiboot2_real_boot() happy).
4436         * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
4437         `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
4438         (grub_stop): New function.
4439         Include `"../realmode.S"' and `"../loader.S"'.
4441         * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
4442         Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
4444         * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
4445         rely on grub_multiboot2_real_boot() for final boot.
4447 2008-01-22  Robert Millan  <rmh@aybabtu.com>
4449         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
4450         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
4451         device that doesn't look like an SD card.
4452         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
4453         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
4454         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
4455         OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
4456         found.
4458 2008-01-22  Robert Millan  <rmh@aybabtu.com>
4460         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
4461         avoid claiming over our own code.
4463 2008-01-22  Bean  <bean123ch@gmail.com>
4465         * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
4466         (jpeg_mod_SOURCES): New variable.
4467         (jpeg_mod_CFLAGS): Likewise.
4468         (jpeg_mod_LDFLAGS): Likewise.
4470         * video/readers/jpeg.c : New file.
4472 2008-01-22  Bean  <bean123ch@gmail.com>
4474         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
4475         there are no more items.
4477 2008-01-21  Robert Millan  <rmh@aybabtu.com>
4479         * kern/mm.c (grub_mm_init_region): Improve debug message.
4481 2008-01-21  Robert Millan  <rmh@aybabtu.com>
4483         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
4484         (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
4485         address.
4486         (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
4487         a C macro.
4488         * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
4489         Indicates start of upper memory.
4490         * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
4491         (generate_image): Abort when image size is big enough to corrupt
4492         upper memory.
4494         * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
4495         (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
4496         * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
4497         instead of hardcoding 0xA0000.
4498         * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
4499         (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
4500         instead of hardcoding 0xA0000.
4502 2008-01-21  Robert Millan  <rmh@aybabtu.com>
4504         * disk/memdisk.c (memdisk_size): New variable.
4505         (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
4506         `memdisk_size'.
4507         (grub_memdisk_init): Initialize `memdisk_size'.  Reallocate memdisk
4508         image to dynamic memory.
4509         (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
4510         `memdisk_size'.  Free memdisk block.
4512 2008-01-21  Robert Millan  <rmh@aybabtu.com>
4514         Fix detection of very small filesystems (like tar).
4516         * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
4517         contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
4518         GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
4519         a problem with this disk).
4521 2008-01-21  Robert Millan  <rmh@aybabtu.com>
4523         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
4524         on grub_biosdisk_rw_standard() error.
4526 2008-01-21  Robert Millan  <rmh@aybabtu.com>
4528         * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
4529         recent changes.
4530         * kern/elf.c: Likewise.
4531         * kern/ieee1275/ieee1275.c: Likewise.
4532         * kern/powerpc/ieee1275/openfw.c: Likewise.
4533         * term/ieee1275/ofconsole.c: Likewise.
4535 2008-01-21  Robert Millan  <rmh@aybabtu.com>
4537         * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
4539         * include/grub/kernel.h (grub_arch_memdisk_addr)
4540         (grub_arch_memdisk_size): Moved from here ...
4542         * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
4543         (grub_arch_memdisk_size): ... to here.
4545 2008-01-21  Robert Millan  <rmh@aybabtu.com>
4547         Mostly based on bugfix from Bean.
4549         * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
4550         attribute with hook() parameter.
4551         (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
4552         declaration.
4553         (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
4554         attribute with hook() parameter.
4555         (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
4556         declaration.
4558 2008-01-21  Robert Millan  <rmh@aybabtu.com>
4560         * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
4561         (pkglib_MODULES): Add `memdisk.mod'.
4562         (memdisk_mod_SOURCES): New variable.
4563         (memdisk_mod_CFLAGS): Likewise.
4564         (memdisk_mod_LDFLAGS): Likewise.
4566         * disk/memdisk.c: New file.
4568         * include/grub/disk.h (grub_disk_dev_id): Add
4569         `GRUB_DISK_DEVICE_MEMDISK_ID'.
4571         * include/grub/i386/pc/kernel.h
4572         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
4573         (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
4574         (grub_kernel_image_size): New variable declaration.
4575         (grub_total_module_size): Likewise.
4576         (grub_memdisk_image_size): Likewise.
4578         * include/grub/i386/pc/memory.h
4579         (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
4581         * include/grub/kernel.h: Include `<grub/symbol.h>'.
4582         (grub_arch_memdisk_addr): New variable declaration.
4583         (grub_arch_memdisk_size): Likewise.
4585         * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
4586         (grub_arch_memdisk_size): Likewise.
4588         * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
4589         (codestart): Replace hardcoded `0x100000' with
4590         `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
4592         * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
4593         (generate_image): Add `memdisk_path' parameter.  When `memdisk_path' is
4594         not NULL, append the contents of the file it refers to, at the end of
4595         the compressed kernel image.  Initialize `grub_memdisk_image_size'
4596         variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
4597         (options): Add "memdisk"|'m' option.
4598         (main): Parse --memdisk|-m option, and pass user-provided path as
4599         parameter to generate_image().
4601 2008-01-20  Robert Millan  <rmh@aybabtu.com>
4603         * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
4604         grub_dprintf() calls from here ...
4605         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
4607 2008-01-20  Robert Millan  <rmh@aybabtu.com>
4609         Fix detection of "real mode" when /options/real-mode? doesn't exist.
4611         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
4612         declaration.
4613         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
4614         (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
4615         `GRUB_IEEE1275_FLAG_REAL_MODE'.
4616         (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
4617         property).
4618         * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
4619         `grub_ieee1275_mmu' rather than obtaining a handler on every call.
4621 2008-01-19  Robert Millan  <rmh@aybabtu.com>
4623         Get rid of confusing function (superseded by
4624         `grub_ieee1275_get_integer_property')
4625         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
4626         prototype.
4627         * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
4628         function.
4629         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
4630         grub_ieee1275_decode_int_4(), by obtaining integer properties directly
4631         in native endianness from grub_ieee1275_get_integer_property().
4633 2008-01-19  Robert Millan  <rmh@aybabtu.com>
4635         * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
4636         command after "shut-down", since implementations differ on which
4637         the command for halt is.
4639 2008-01-19  Robert Millan  <rmh@aybabtu.com>
4641         * include/grub/i386/linuxbios/console.h: Add header protection.
4642         (grub_keyboard_controller_init): New function prototype.
4643         * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
4644         (KEYBOARD_COMMAND_READ): Likewise.
4645         (KEYBOARD_COMMAND_WRITE): Likewise.
4646         (KEYBOARD_SCANCODE_SET1): Likewise.
4647         (grub_keyboard_controller_write): New function.
4648         (grub_keyboard_controller_read): Likewise.
4649         (grub_keyboard_controller_init): Likewise.
4651         * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
4652         (grub_console_init): On coreboot/LinuxBIOS, call
4653         grub_keyboard_controller_init().
4655 2008-01-19  Robert Millan  <rmh@aybabtu.com>
4657         PowerPC changes provided by Pavel Roskin.
4659         * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
4660         * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
4661         don't rely on cmain() doing it.
4662         * kern/i386/ieee1275/startup.S (_start): Store %eax in
4663         grub_ieee1275_entry_fn, don't rely on cmain() doing it.
4665 2008-01-16  Robert Millan  <rmh@aybabtu.com>
4667         * include/grub/i386/linuxbios/memory.h
4668         (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
4669         * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
4670         receive `table_header' as argument.  Instead, probe for it in the
4671         known memory ranges where it can be present.
4672         (grub_available_iterate): Do not pass a fixed `table_header' address
4673         to grub_linuxbios_table_iterate().
4675 2008-01-15  Robert Millan  <rmh@aybabtu.com>
4677         * configure.ac: Add `i386-ieee1275' to the list of supported targets.
4678         * conf/i386-ieee1275.rmk: New file.
4679         * include/grub/i386/ieee1275/console.h: Likewise.
4680         * include/grub/i386/ieee1275/ieee1275.h: Likewise.
4681         * include/grub/i386/ieee1275/kernel.h: Likewise.
4682         * include/grub/i386/ieee1275/time.h: Likewise.
4683         * kern/i386/ieee1275/init.c: Likewise.
4684         * kern/i386/ieee1275/startup.S: Likewise.
4686 2008-01-15  Robert Millan  <rmh@aybabtu.com>
4688         * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
4689         when pointers are 32-bit (but still do set it to one when they are
4690         64-bit).
4692 2008-01-15  Robert Millan  <rmh@aybabtu.com>
4694         * include/grub/ieee1275/ieee1275.h
4695         (grub_ieee1275_get_integer_property): New function prototype.
4697         * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
4698         (grub_ieee1275_get_integer_property): New function.  Wraps around
4699         grub_ieee1275_get_property() to handle endianness.
4701         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
4702         grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
4703         where appropriate.
4704         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
4705         (grub_map): Likewise.
4706         * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
4708 2008-01-15  Bean  <bean123ch@gmail.com>
4710         * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
4711         (grub_script_execute_cmdline): Reset grub_errno.
4713         * normal/main.c (read_config_file): Reset grub_errno.
4715         * normal/parse.y (script_init): New.
4716         (script): Move function and menuentry here.
4717         (delimiter): New.
4718         (command): Add delimiter at the end of command.
4719         (commands): Adjust to match the new command.
4720         (commandblock): Remove grub_script_lexer_record_start.
4721         (menuentry): Add grub_script_lexer_record_start, use the new commands.
4722         (if): Use the new commands.
4724         * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
4726 2008-01-15  Robert Millan  <rmh@aybabtu.com>
4728         * normal/menu.c (run_menu): Move timeout message from here ...
4729         (print_timeout): ... to here.
4730         (run_menu): Use print_timeout() once during initial draw to print
4731         the whole message, and again in every clock tick to update only
4732         the number of seconds.
4734 2008-01-15  Robert Millan  <rmh@aybabtu.com>
4736         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
4737         actual size of `available' from grub_ieee1275_get_property(), and
4738         restrict parsing to that bound.
4740 2008-01-15  Christian Franke  <franke@computer.org>
4742         * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
4743         (argp_program_version): Remove variable.
4744         (argp_program_bug_address): Likewise.
4745         (options): Convert from struct argp_option to struct option.
4746         (struct arguments): Remove.
4747         (parse_opt): Remove.
4748         (usage): New function.
4749         (main): Replace struct args members by simple variables.
4750         Replace argp_parse() by getopt_long().
4751         Add switch to evaluate options.
4752         Add missing "(...)" around root_dev in prefix string.
4754 2008-01-14  Robert Millan  <rmh@aybabtu.com>
4756         * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
4757         for grub_ieee1275_exit(), in order to improve portability.
4759 2008-01-14  Robert Millan  <rmh@aybabtu.com>
4761         * util/grub.d/10_linux.in (prefix): Define.
4762         (exec_prefix): Likewise.  Both definitions are later used by `libdir'.
4764 2008-01-13  Pavel Roskin  <proski@gnu.org>
4766         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
4767         grub_errno if no errors have been detected.
4769 2008-01-12  Robert Millan  <rmh@aybabtu.com>
4771         * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
4772         (grub_util_get_dev_abstraction): New function prototype.
4774         * util/getroot.c: Include `<grub/util/getroot.h>'
4775         (grub_util_get_grub_dev): Move detection of abstraction type to ...
4776         (grub_util_get_dev_abstraction): ... here (new function).
4778         * util/grub-probe.c: Convert PRINT_* to an enum.  Add
4779         `PRINT_ABSTRACTION'.
4780         (probe): Probe for abstraction type when requested.
4781         (main): Understand `--target=abstraction'.
4783         * util/i386/efi/grub-install.in: Add abstraction module to core
4784         image when it is found to be necessary.
4785         * util/i386/pc/grub-install.in: Likewise.
4786         * util/powerpc/ieee1275/grub-install.in: Likewise.
4788         * util/update-grub_lib.in (font_path): Return system path without
4789         converting to GRUB path.
4790         * util/update-grub.in: Convert system path returned by font_path()
4791         to a GRUB path.  Use `grub-probe -t abstraction' to determine what
4792         abstraction module is needed for loading fonts (if any).  Export
4793         that as `GRUB_PRELOAD_MODULES'.
4794         * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
4795         insmod commands).
4797 2008-01-12  Yoshinori K. Okuji  <okuji@enbug.org>
4799         Remove some unused code from reiserfs.
4801         * fs/reiserfs.c (struct grub_reiserfs_key)
4802         [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
4803         (struct grub_reiserfs_node_body): Removed.
4804         (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
4805         Likewise.
4806         (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
4807         Likewise.
4808         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
4809         Likewise.
4810         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
4811         Likewise.
4812         (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
4813         Likewise.
4814         (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
4815         Likewise.
4816         (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
4817         (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
4818         (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
4820 2008-01-10  Robert Millan  <rmh@aybabtu.com>
4822         * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
4823         Determines if a file is garbage left by packaging systems, etc.
4824         * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
4825         for processing /etc/grub.d scripts.
4826         * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
4827         * util/grub.d/10_linux.in: Likewise.  Use grub_file_is_not_garbage()
4828         as a condition for processing Linux images.
4830 2008-01-10  Pavel Roskin  <proski@gnu.org>
4832         * include/grub/powerpc/libgcc.h (__ucmpdi2): New export.  Needed
4833         to compile reiserfs.c on PowerPC.
4835 2008-01-10  Robert Millan  <rmh@aybabtu.com>
4837         * kern/device.c (grub_device_iterate): Do not abort device iteration
4838         when one of the devices cannot be opened.
4839         * kern/disk.c (grub_disk_open): Do not account previous failures of
4840         unrelated functions when grub_errno is checked for.
4842 2008-01-08  Robert Millan  <rmh@aybabtu.com>
4844         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
4845         `! grub_linux_is_bzimage', change order of address comparison to make
4846         it more intuitive, and improve "too big zImage" error message.
4848 2008-01-08  Robert Millan  <rmh@aybabtu.com>
4850         * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
4851         `$(update-grub_DATA)'.
4852         (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
4853         targets.
4855 2008-01-07  Robert Millan  <rmh@aybabtu.com>
4857         * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
4858         which instruction is modified by grub-setup during installation
4859         (since it wasn't obvious by only looking at this file).
4861 2008-01-07  Robert Millan  <rmh@aybabtu.com>
4863         * TODO: Rewrite.  Just refer to the wiki and the BTS instead of
4864         listing actual TODO items.
4866 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
4868         * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
4869         correctly.
4870         (grub_reiserfs_get_key_offset): Likewise.
4871         (grub_reiserfs_set_key_offset): Likewise.
4872         (grub_reiserfs_set_key_type): Likewise.
4873         (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
4875         (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
4876         better to remove the bitfield version completely.
4878 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
4880         * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
4881         allocated from the heap, due to the fshelp implementation.
4882         (grub_reiserfs_dir): Free NODE, due to the same reason.
4884 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
4886         Mostly from Vincent Pelletier:
4888         * fs/reiserfs.c: New file.
4890         * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
4891         (reiserfs_mod_SOURCES): New variable.
4892         (reiserfs_mod_CFLAGS): Likewise.
4893         (reiserfs_mod_LDFLAGS): Likewise.
4895         * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
4896         disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
4897         include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
4898         normal/color.c.
4900 2008-01-06  Robert Millan  <rmh@aybabtu.com>
4902         * normal/color.c: Remove `<grub/env.h>'.
4904 2008-01-05  Jeroen Dekkers  <jeroen@dekkers.cx>
4906         * include/grub/normal.h: Include <grub/env.h>.
4908 2008-01-05  Robert Millan  <rmh@aybabtu.com>
4910         * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
4911         usage example with `(hd0,1)'.
4912         Reported by Samuel Thibault.
4914 2008-01-05  Robert Millan  <rmh@aybabtu.com>
4916         * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
4917         (grub_linux_boot_zimage): Rename to ...
4918         (grub_linux_boot): ... this.
4919         (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
4920         (grub_linux_boot_zimage): Conditionalize zImage copy.
4922         * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
4923         (grub_linux_boot_bzimage): Remove prototype.
4924         (grub_linux_boot_zimage): Rename to ...
4925         (grub_linux_boot): ... this.
4927         * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
4928         (grub_linux_boot): Remove function.
4930 2008-01-05  Robert Millan  <rmh@aybabtu.com>
4932         * include/grub/normal.h (grub_env_write_color_normal): New prototype.
4933         (grub_env_write_color_highlight): Likewise.
4934         (grub_wait_after_message): Likewise.
4936         * normal/color.c: New file.
4938         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
4939         (normal_mod_DEPENDENCIES): Likewise.
4941         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
4942         (normal_mod_DEPENDENCIES): Likewise.
4944         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
4945         (normal_mod_DEPENDENCIES): Likewise.
4947         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
4948         (normal_mod_DEPENDENCIES): Likewise.
4950         * normal/menu_entry.c (run): Rely on grub_wait_after_message()
4951         for waiting after a message is printed.
4952         * normal/main.c (read_config_file): Likewise.
4953         (grub_normal_init): Register grub_env_write_color_normal() and
4954         grub_env_write_color_highlight() hooks.  Mark `color_normal' and
4955         `color_highlight' variables as global.
4957         * normal/menu.c (grub_wait_after_message): New function.
4958         (grub_color_menu_normal): New variable.  Replaces ...
4959         (GRUB_COLOR_MENU_NORMAL): ... this macro.
4960         (grub_color_menu_highlight): New variable.  Replaces ...
4961         (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
4962         (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
4963         `GRUB_TERM_COLOR_STANDARD'.
4964         (print_message): Use `grub_setcolorstate' to reload colors.  Rename
4965         `normal_code' and `highlight_code' to `old_color_normal' and
4966         `old_color_highlight', respectively.
4967         (grub_menu_init_page): Update colors when drawing the menu, based on
4968         `menu_color_normal' and `menu_color_highlight' variables.
4969         (grub_menu_run): Rely on grub_wait_after_message() for waiting after
4970         a message is printed.
4972 2008-01-05  Robert Millan  <rmh@aybabtu.com>
4974         * kern/env.c (grub_env_context_open): Propagate hooks for global
4975         variables to new context.
4977         * kern/main.c (grub_set_root_dev): Export `root' variable.
4979 2008-01-05  Robert Millan  <rmh@aybabtu.com>
4981         * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
4982         discs unconditionally, since udev and others have options to provide
4983         them.
4985 2008-01-05  Robert Millan  <rmh@aybabtu.com>
4987         * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
4989 2008-01-04  Christian Franke  <franke@computer.org>
4991         * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
4992         of eisa_mmap.
4994 2008-01-03  Pavel Roskin  <proski@gnu.org>
4996         * kern/i386/linuxbios/init.c: Put "void" to all function
4997         declarations with no arguments.
4998         * kern/powerpc/ieee1275/init.c: Likewise.
4999         * term/i386/pc/at_keyboard.c: Likewise.
5000         * term/i386/pc/vga_text.c: Likewise.
5001         * util/grub-mkdevicemap.c: Likewise.
5003 2008-01-02  Robert Millan  <rmh@aybabtu.com>
5005         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
5006         message when loaded image is out of bounds.
5007         (grub_multiboot_load_elf64): Likewise.
5009 2008-01-02  Pavel Roskin  <proski@gnu.org>
5011         * util/grub.d/10_linux.in: Try version without ".old" when
5012         looking for initrd.  It's better to use initrd from the newer
5013         kernel of the same version than no initrd at all.
5015 2008-01-01  Robert Millan  <rmh@aybabtu.com>
5017         * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
5019 2008-01-01  Vesa Jaaskelainen  <chaac@nic.fi>
5021         * include/grub/video.h: Added grub_video_unmap_color and
5022         grub_video_get_active_render_target.
5023         (grub_video_adapter): Added unmap_color and get_active_render_target.
5025         * video/video.c: Added grub_video_unmap_color and
5026         grub_video_get_active_render_target.
5027         (grub_video_get_info): Changed method to accept NULL pointer as an
5028         argument to allow detection of active video adapter.
5030         * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
5031         grub_video_vbe_unmap_color_int.
5032         Added grub_video_vbe_unmap_color and
5033         grub_video_vbe_get_active_render_target.
5034         (grub_video_vbe_adapter): Added unmap_color and
5035         get_active_render_target.
5037         * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
5038         with grub_video_vbe_unmap_color_int.
5040         * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
5041         (DEFAULT_NORMAL_COLOR): Likewise.
5042         (DEFAULT_HIGHLIGHT_COLOR) Likewise.
5043         (DEFAULT_FG_COLOR): Removed.
5044         (DEFAULT_BG_COLOR): Likewise.
5045         (DEFAULT_CURSOR_COLOR): Changed value.
5046         (grub_virtual_screen): Added standard_color_setting,
5047         normal_color_setting, highlight_color_setting and term_color.
5048         (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
5049         (bitmap_width): Added.
5050         (bitmap_height): Likewise.
5051         (bitmap): Likewise.
5052         (set_term_color): Likewise.
5053         (grub_virtual_screen_setup): Changed to use new terminal coloring
5054         settings.
5055         (grub_gfxterm_init): Added init for bitmap.
5056         (grub_gfxterm_fini): Added destroy for bitmap.
5057         (redraw_screen_rect): Updated to use background bitmap and new
5058         terminal coloring.
5059         (scroll_up): Added optimization for case when there is no bitmap.
5060         (grub_gfxterm_cls): Fixed to use correct background color.
5061         (grub_virtual_screen_setcolorstate): Changed to use new terminal
5062         coloring.
5063         (grub_virtual_screen_setcolor): Likewise.
5064         (grub_virtual_screen_getcolor): Added.
5065         (grub_gfxterm_background_image_cmd): Likewise.
5066         (grub_video_term): Added setcolor and getcolor.
5067         (MOD_INIT): Added registration of background_image command.
5068         (MOD_TERM): Added unregistration for background_image command.
5070 2007-12-30  Pavel Roskin  <proski@gnu.org>
5072         * loader/multiboot_loader.c: Fix multiboot command
5073         unregistration.  Fix all typos in the word "multiboot".
5075 2007-12-29  Pavel Roskin  <proski@gnu.org>
5077         * util/grub.d/10_linux.in: Refactor search for initrd.  Add
5078         support for initrd names used in Fedora.
5080 2007-12-26  Bean  <bean123ch@gmail.com>
5082         * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
5083         (cpio_mod_SOURCES): New variable.
5084         (cpio_mod_CFLAGS): Likewise.
5085         (cpio_mod_LDFLAGS): Likewise.
5087         * fs/cpio.c: New file.
5089         * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
5091         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5093         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5095         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5097 2007-12-25  Robert Millan  <rmh@aybabtu.com>
5099         * include/grub/term.h (struct grub_term): Add `getcolor' function.
5100         (grub_getcolor): New function.
5102         * kern/term.c (grub_getcolor): New function.
5103         * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
5104         (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
5105         (print_entry): Set normal and highlight colors to
5106         `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
5107         respectively, before printing and restore them to old
5108         values afterwards.
5109         (grub_menu_init_page): Likewise.  Fill an additional colored space
5110         that would otherwise be left blank.
5112         * term/efi/console.c (grub_console_getcolor): New function.
5113         (struct grub_console_term.getcolor): New variable.
5114         * term/i386/pc/console.c (grub_console_getcolor): New function.
5115         (struct grub_console_term.getcolor): New variable.
5116         * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
5117         (struct grub_console_term.getcolor): New variable.
5119         * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
5120         (struct grub_console_term.setcolor): Remove variable.
5121         * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
5122         (struct grub_console_term.setcolor): Remove variable.
5123         * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
5124         (struct grub_console_term.setcolor): Remove variable.
5125         * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
5126         (struct grub_console_term.setcolor): Remove variable.
5128 2007-12-25  Robert Millan  <rmh@aybabtu.com>
5130         * configure.ac: Search for possible unifont.hex locations, and
5131         define UNIFONT_HEX if found.
5133         * Makefile.in (UNIFONT_HEX): Define variable.
5134         (DATA): Rename to ...
5135         (PKGLIB): ... this.  Update all users.
5136         (PKGDATA): New variable.
5137         (pkgdata_IMAGES): Rename to ...
5138         (pkglib_IMAGES): ... this. Update all users.
5139         (pkgdata_MODULES): Rename to ...
5140         (pkglib_MODULES): ... this. Update all users.
5141         (pkgdata_PROGRAMS): Rename to ...
5142         (pkglib_PROGRAMS): ... this. Update all users.
5143         (pkgdata_DATA): Rename to ...
5144         (pkglib_DATA): ... this. Update all users.
5145         (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
5146         (unicode.pff, ascii.pff): New rules.
5147         (all-local): Add `$(PKGDATA)' dependency.
5148         (install-local): Process `$(PKGDATA)'.
5150         * util/update-grub_lib.in (font_path): Search for *.pff files in
5151         a few more locations, including `${pkgdata}'.
5153 2007-12-23  Robert Millan  <rmh@aybabtu.com>
5155         Patch from Bean  <bean123ch@gmail.com>:
5156         * disk/loopback.c (grub_loopback_read): Add missing bit shift to
5157         `size'.
5159 2007-12-21  Bean  <bean123ch@gmail.com>
5161         * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
5162         (ntfscomp_mod_SOURCES): New variable.
5163         (ntfscomp_mod_CFLAGS): Likewise.
5164         (ntfscomp_mod_LDFLAGS): Likewise.
5166         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
5167         (grub_probe_SOURCES): Likewise.
5168         (grub_emu_SOURCES): Likewise.
5170         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
5171         (grub_emu_SOURCES): Likewise.
5173         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
5174         (grub_emu_SOURCES): Likewise.
5176         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
5177         (grub_emu_SOURCES): Likewise.
5179         * fs/ntfs.c (grub_ntfscomp_func): New variable.
5180         (read_run_list): Renamed to grub_ntfs_read_run_list.
5181         (decomp_nextvcn): Moved to ntfscomp.c.
5182         (decomp_getch): Likewise.
5183         (decomp_get16): Likewise.
5184         (decomp_block): Likewise.
5185         (read_block): Likewise.
5186         (read_data): Partially moved to ntfscomp.c.
5187         (fixup): Change unsigned to grub_uint16_t.
5188         (read_mft): Change unsigned long to grub_uint32_t.
5189         (read_attr): Likewise.
5190         (read_data): Likewise.
5191         (read_run_data): Likewise.
5192         (read_run_list): Likewise.
5193         (read_mft): Likewise.
5195         * fs/ntfscomp.c: New file.
5197         * include/grub/ntfs.h: New file.
5199 2007-12-16  Robert Millan  <rmh@aybabtu.com>
5201         * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
5202         IDE disk check, since Linux is known to support 20 IDE disks.
5203         Reported by Colin Watson.
5205 2007-12-15  Bean  <bean123ch@gmail.com>
5207         * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
5208         (lnxboot_img_SOURCES): New variable.
5209         (lnxboot_img_ASFLAGS): Likewise.
5210         (lnxboot_img_LDFLAGS): Likewise.
5212         * boot/i386/pc/lnxboot.S: New file.
5214 2007-11-24  Pavel Roskin  <proski@gnu.org>
5216         * configure.ac: Test if '--build-id=none' is supported by the
5217         linker.  If yes, add it to TARGET_LDFLAGS.  Build ID causes
5218         objcopy to generate incorrect binary files (binutils
5219         2.17.50.0.18-1 as shipped by Fedora 8).
5220         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
5221         linking, so that build ID doesn't break the test.
5223 2007-11-24  Pavel Roskin  <proski@gnu.org>
5225         * include/grub/i386/time.h: use "void" in the argument list
5226         of grub_cpu_idle().
5227         * include/grub/powerpc/time.h: Likewise.
5228         * include/grub/sparc64/time.h: Likewise.
5230 2007-11-18  Christian Franke  <franke@computer.org>
5232         * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
5233         now return control chars instead of GRUB_CONSOLE_KEY_* constants.
5234         This fixes the problem that function keys did not work in grub-emu.
5236 2007-11-18  Christian Franke  <franke@computer.org>
5238         * disk/host.c (grub_host_open): Remove attribute unused from
5239         name parameter. Add check for "host". This fixes the problem
5240         that grub-emu does not find partitions.
5242 2007-11-18  Christian Franke  <franke@computer.org>
5244         * util/hostfs.c (is_dir): New function.
5245         (grub_hostfs_dir):  Handle missing dirent.d_type case.
5246         (grub_hostfs_read): Add missing fseek().
5247         (grub_hostfs_label): Clear label pointer.  This fixes a crash
5248         of grub-emu on "ls (host)".
5250 2007-11-18  Christian Franke  <franke@computer.org>
5252         * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
5253         Add attribute packed, gcc 3.4.4 on Cygwin aligns this
5254         to 64 bit boundary by default.
5256 2007-11-18  Bean  <bean123ch@gmail.com>
5258         * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
5259         (hexdump_mod_SOURCES): New variable.
5260         (hexdump_mod_CFLAGS): Likewise.
5261         (hexdump_mod_LDFLAGS): Likewise.
5263         * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5265         * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5267         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5269         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5271         * include/grub/hexdump.h: New file.
5273         * commands/hexdump.c: New file.
5275 2007-11-10  Robert Millan  <rmh@aybabtu.com>
5277         * commands/i386/pc/play.c (beep_off): Switch order of arguments
5278         in grub_outb() calls.
5279         (beep_on): Likewise.
5281 2007-11-10  Christian Franke  <franke@computer.org>
5283         * normal/menu.c (run_menu): Check for empty menu to avoid crash.
5284         (grub_menu_run): Likewise.
5286 2007-11-10  Robert Millan  <rmh@aybabtu.com>
5288         * include/grub/i386/efi/machine.h: New file.
5289         * include/grub/i386/linuxbios/machine.h: Likewise.
5290         * include/grub/i386/pc/machine.h: Likewise.
5291         * include/grub/powerpc/ieee1275/machine.h: Likewise.
5292         * include/grub/sparc64/ieee1275/machine.h: Likewise.
5294         * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
5295         (serial_hw_io_addr): New variable.
5296         (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
5297         instead of `(unsigned short *) 0x400'.
5299 2007-11-10  Bean  <bean123ch@gmail.com>
5301         * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
5303 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
5305         * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
5306         (vga_mod_SOURCES): Added.
5307         (vga_mod_CFLAGS): Likewise.
5308         (vga_mod_LDFLAGS): Likewise.
5310         * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
5311         grub_outb() calls.
5312         (set_map_mask): Likewise.
5313         (set_read_map): Likewise.
5314         (set_read_address): Likewise.
5315         (vga_font): Removed variable.
5316         (get_vga_glyph): Removed function.
5317         (invalidate_char): Likewise.
5318         (write_char): Changed to use grub_font_get_glyph() for font
5319         information.
5320         (grub_vga_putchar): Likewise.
5321         (grub_vga_getcharwidth): Likewise.
5323 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
5325         * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
5326         flags.
5327         (pxeboot_img_LDFLAGS): Likewise.
5328         (diskboot_img_LDFLAGS): Likewise.
5329         (kernel_img_LDFLAGS): Likewise.
5331 2007-11-06  Robert Millan  <rmh@aybabtu.com>
5333         * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
5334         in grub_outb() calls.
5335         (serial_hw_init): Likewise.
5337 2007-11-05  Robert Millan  <rmh@aybabtu.com>
5339         * util/update-grub.in: Allow files in ${update_grub_dir} to contain
5340         spaces.  Skip non-regular files.
5342 2007-11-05  Robert Millan  <rmh@aybabtu.com>
5344         * kern/disk.c (grub_disk_firmware_fini)
5345         (grub_disk_firmware_is_tainted): New variables.
5347         * include/grub/disk.h (grub_disk_firmware_fini)
5348         (grub_disk_firmware_is_tainted): Likewise.
5350         * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
5351         (grub_disk_biosdisk_fini): ... to here.
5352         (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
5353         (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
5354         is set.  Register grub_disk_biosdisk_fini() in
5355         `grub_disk_firmware_fini'.
5357         * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
5358         (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
5359         Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
5360         to finish existing firmware disk interface.
5362         * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
5363         (ata_mod_SOURCES): New variable.
5364         (ata_mod_CFLAGS): Likewise.
5365         (ata_mod_LDFLAGS): Likewise.
5367 2007-11-05  Robert Millan  <rmh@aybabtu.com>
5369         * disk/ata.c: Remove `<grub/machine/time.h>'.  Include `<grub/time.h>'.
5370         (grub_ata_wait): Reimplement using grub_millisleep().
5372         * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
5373         * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
5375 2007-11-03  Marco Gerards  <marco@gnu.org>
5377         * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
5378         (CRTC_ADDR_PORT): New macro.
5379         (CRTC_DATA_PORT): Likewise.
5380         (CRTC_CURSOR): Likewise.
5381         (CRTC_CURSOR_ADDR_HIGH): Likewise.
5382         (CRTC_CURSOR_ADDR_LOW): Likewise.
5383         (update_cursor): New function.
5384         (grub_console_real_putchar): Call `update_cursor'.
5385         (grub_console_gotoxy): Likewise.
5386         (grub_console_cls): Set the default color when clearing the
5387         screen.
5388         (grub_console_setcursor): Implemented.
5390 2007-11-03  Marco Gerards  <marco@gnu.org>
5392         * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
5393         become activate.
5394         (grub_ata_pio_write): Likewise.
5396         (grub_atapi_identify): Wait after issuing an ATA command.
5397         (grub_atapi_packet): Likewise.
5398         (grub_ata_identify): Likewise.
5399         (grub_ata_readwrite): Likewise.
5401 2007-11-03  Marco Gerards  <marco@gnu.org>
5403         * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
5404         (grub_ata_pio_write): Likewise.
5405         (grub_ata_readwrite): Use `grub_error', instead of
5406         returning `grub_errno'.
5408 2007-11-03  Marco Gerards  <marco@gnu.org>
5410         * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
5411         grub_ata_pio_write once for every single sector, instead of for
5412         multiple sectors.
5414 2007-10-31  Robert Millan  <rmh@aybabtu.com>
5416         * configure.ac: Add `i386-linuxbios' to the list of supported targets.
5418         * conf/i386-linuxbios.rmk: New file.
5420         * kern/i386/pc/hardware.c: Likewise.
5421         * term/i386/pc/at_keyboard.c: Likewise.
5422         * term/i386/pc/vga_text.c: Likewise.
5424         * include/grub/i386/linuxbios/boot.h: Likewise.
5425         * include/grub/i386/linuxbios/console.h: Likewise.
5426         * include/grub/i386/linuxbios/init.h: Likewise.
5427         * include/grub/i386/linuxbios/kernel.h: Likewise.
5428         * include/grub/i386/linuxbios/loader.h: Likewise.
5429         * include/grub/i386/linuxbios/memory.h: Likewise.
5430         * include/grub/i386/linuxbios/serial.h: Likewise.
5431         * include/grub/i386/linuxbios/time.h: Likewise.
5433         * kern/i386/linuxbios/init.c: Likewise.
5434         * kern/i386/linuxbios/startup.S: Likewise.
5435         * kern/i386/linuxbios/table.c: Likewise.
5437 2007-10-31  Marco Gerards  <marco@gnu.org>
5439         * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
5440         (ata_mod_SOURCES): New variable.
5441         (ata_mod_CFLAGS): Likewise.
5442         (ata_mod_LDFLAGS): Likewise.
5444         * disk/ata.c: New file.
5446         * include/grub/disk.h (grub_disk_dev_id): Add
5447         `GRUB_DISK_DEV_ATA_ID'.
5449 2007-10-31  Robert Millan  <rmh@aybabtu.com>
5451         * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
5452         * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
5454         * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
5455         * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
5457         * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
5458         `<grub/types.h>'.
5460         * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
5462 2007-10-27  Robert Millan  <rmh@aybabtu.com>
5464         * include/grub/types.h (ULONG_MAX): Define macro.
5466 2007-10-22  Robert Millan  <rmh@aybabtu.com>
5468         * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'.  Include
5469         `"../realmode.S"'.
5470         Remove `"kern/i386/loader.S"'.  Include `"../loader.S"'.
5472 2007-10-22  Robert Millan  <rmh@aybabtu.com>
5474         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
5475         (pkgdata_MODULES): Add `biosdisk.mod'.
5476         (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
5477         variables.
5479         * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
5480         (grub_biosdisk_init): Replace with ...
5481         (GRUB_MOD_INIT(biosdisk)): ... this.
5482         (grub_biosdisk_fini): Replace with ...
5483         (GRUB_MOD_FINI(biosdisk)): ... this.
5485         * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
5486         (grub_machine_init): Remove call to grub_biosdisk_init().
5487         (grub_machine_fini): Remove call to grub_machine_fini().
5489         * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
5491 2007-10-22  Robert Millan  <rmh@aybabtu.com>
5493         * include/grub/time.h: New file.
5494         * include/grub/i386/time.h: Likewise.
5495         * include/grub/powerpc/time.h: Likewise.
5496         * include/grub/sparc64/time.h: Likewise.
5498         * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
5499         instances to ...
5500         (KERNEL_MACHINE_TIME_HEADER): ... this.
5501         * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
5502         instances to ...
5503         (KERNEL_MACHINE_TIME_HEADER): ... this.
5504         * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
5505         instances to ...
5506         (KERNEL_MACHINE_TIME_HEADER): ... this.
5508         * kern/i386/efi/init.c: Include `<grub/time.h>'.
5509         (grub_millisleep): New function.
5510         * kern/i386/pc/init.c: Include `<grub/time.h>'.
5511         (grub_millisleep): New function.
5512         * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
5513         Remove `grub/machine/time.h' include.
5514         (grub_millisleep): New function.
5515         * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
5516         Remove `grub/machine/time.h' include.
5517         (grub_millisleep): New function.
5519         * include/grub/misc.h (grub_div_roundup): New function.
5521         * kern/misc.c: Include `<grub/time.h>'.
5522         (grub_millisleep_generic): New function.
5524         * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
5525         Add `time.h'.
5526         * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
5527         Add `time.h'.
5528         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
5529         `machine/time.h'.  Add `time.h'.
5530         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
5532 2007-10-21  Robert Millan  <rmh@aybabtu.com>
5534         * include/grub/misc.h (grub_max): New function.
5536 2007-10-21  Robert Millan  <rmh@aybabtu.com>
5538         * util/misc.c (grub_util_info): Call fflush() before returning.
5540 2007-10-20  Robert Millan  <rmh@aybabtu.com>
5542         * genmk.rb (Image): Copy `extra_flags' from here ...
5543         (PModule): ... to here.  Use it in `#{obj}: #{src}' rule.
5545         * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
5546         to `argc' and `args' arguments.
5548 2007-10-17  Robert Millan  <rmh@aybabtu.com>
5550         * kern/i386/loader.S: New file.
5552         * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
5553         * kern/i386/loader.S (grub_linux_prot_size)... to here.
5554         * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
5555         * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
5556         * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
5557         * kern/i386/loader.S (grub_linux_real_addr)... to here.
5558         * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
5559         * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
5560         * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
5561         * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
5562         * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
5563         * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
5564         * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
5565         * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
5567         * kern/i386/realmode.S: New file.
5569         * kern/i386/pc/startup.S (protstack): Moved from here ...
5570         * kern/i386/realmode.S (protstack)... to here.
5571         * kern/i386/pc/startup.S (gdt): Moved from here ...
5572         * kern/i386/realmode.S (gdt)... to here.
5573         * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
5574         * kern/i386/realmode.S (prot_to_real)... to here.
5576         * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
5577         `kern/i386/realmode.S'.
5579 2007-10-17  Robert Millan  <rmh@aybabtu.com>
5581         * include/grub/i386/loader.h: New file.
5583         * include/grub/i386/pc/loader.h (grub_linux_prot_size)
5584         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
5585         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
5586         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
5587         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
5588         * include/grub/i386/loader.h (grub_linux_prot_size)
5589         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
5590         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
5591         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
5592         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
5594         * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
5596 2007-10-15  Robert Millan  <rmh@aybabtu.com>
5598         * normal/misc.c (grub_normal_print_device_info): Do not probe for
5599         filesystem when dev->disk is unset.
5600         Do probe for filesystem even when dev->disk->has_partitions is set.
5601         In case a filesystem is found, always report it.
5602         In case it isn't, if dev->disk->has_partitions is set, report that
5603         a partition table was found instead of reporting that no filesystem
5604         could be identified.
5606 2007-10-12  Robert Millan  <rmh@aybabtu.com>
5608         * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
5609         to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
5611         * include/grub/types.h (grub_host_to_target16): New macro.
5612         (grub_host_to_target32): Likewise.
5613         (grub_host_to_target64): Likewise.
5614         (grub_target_to_host16): Likewise.
5615         (grub_target_to_host32): Likewise.
5616         (grub_target_to_host64): Likewise.
5618         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
5619         Renamed from to ...
5620         (GRUB_MOD_ALIGN): ...this.  Update all users.
5622         * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
5623         grub_host_to_target32.
5624         Replace grub_be_to_cpu32 with grub_target_to_host32.
5625         (load_modules): Likewise.
5626         (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
5627         Replace grub_be_to_cpu32 with grub_target_to_host32.
5628         Replace grub_cpu_to_be16 with grub_host_to_target16.
5629         Replace grub_cpu_to_be32 grub_host_to_target32.
5631 2007-10-12  Robert Millan  <rmh@aybabtu.com>
5633         * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
5634         * util/elf/grub-mkimage.c: ... here.
5636         * DISTLIST: Add `util/elf/grub-mkimage.c'.  Remove
5637         `util/powerpc/ieee1275/grub-mkimage.c'.
5639 2007-10-07  Robert Millan  <rmh@aybabtu.com>
5641         * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
5642         and make it easier to figure out.
5643         Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
5644         (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
5645         Do not avoid claiming a region above HEAP_MAX_ADDR if that would
5646         leave us with less than HEAP_MIN_SIZE total heap.
5647         Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
5649 2007-10-03  Robert Millan  <rmh@aybabtu.com>
5651         * include/grub/i386/io.h: New file.
5652         * commands/i386/pc/play.c (inb): Removed.
5653         (outb): Removed.
5654         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
5655         with grub_outb().
5656         * term/i386/pc/serial.c  (inb): Removed.
5657         (outb): Removed.
5658         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
5659         with grub_outb().
5660         * term/i386/pc/vga.c  (inb): Removed.
5661         (outb): Removed.
5662         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
5663         with grub_outb().
5665 2007-10-02  Robert Millan  <rmh@aybabtu.com>
5667         * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
5668         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5669         Reported by Marcin Kurek.
5671 2007-09-07  Robert Millan  <rmh@aybabtu.com>
5673         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
5674         SmartFirmware version updates (as released by Sven Luther), and avoid
5675         setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
5676         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
5677         known broken.
5679 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
5681         From Hitoshi Ozeki:
5682         * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
5683         when merging two regions.
5685 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
5687         * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
5688         * normal/completion.c (grub_normal_do_completion): Likewise.
5689         Reported by Hitoshi Ozeki.
5691 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
5693         Do not use devices at boot in chainloading.
5695         * loader/i386/pc/chainloader.c (boot_drive): New variable.
5696         (boot_part_addr): Likewise.
5697         (grub_chainloader_boot): Simply call grub_chainloader_real_boot
5698         with BOOT_DRIVE and BOOT_PART_ADDR.
5699         (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
5700         Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
5702 2007-08-29  Robert Millan  <rmh@aybabtu.com>
5704         Patch from Simon Peter <dn.tlp@gmx.net>:
5705         * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
5706         * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
5707         util/grub-probe.c_DEPENDENCIES.  Replace grub-setup_DEPENDENCIES with
5708         util/i386/pc/grub-setup.c_DEPENDENCIES.
5709         * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
5710         util/grub-probe.c_DEPENDENCIES.
5711         * conf/powerpc-ieee1275.rmk: Likewise.
5713 2007-08-28  Robert Millan  <rmh@aybabtu.com>
5715         * util/i386/get_disk_name.c: New.  Implement grub_util_get_disk_name()
5716         to tell grub-mkdevicemap how to name devices.
5717         * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
5718         feature).
5720         * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
5721         util/i386/get_disk_name.c.
5722         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
5723         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
5724         util/ieee1275/get_disk_name.c.
5726         * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
5728         * DISTLIST: Add util/i386/get_disk_name.c and
5729         util/ieee1275/get_disk_name.c.
5731         * util/grub-mkdevicemap.c: Replace device naming logic with
5732         grub_util_get_disk_name() calls.
5734 2007-08-20  Robert Millan  <rmh@aybabtu.com>
5736         * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
5737         (so that it works for both plural and singular quantities).
5739 2007-08-05  Robert Millan  <rmh@aybabtu.com>
5741         * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
5742         so that [xz] isn't taken into account when determining order.
5744 2007-08-02  Marco Gerards  <marco@gnu.org>
5746         * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
5747         `include/multiboot2.h', `include/grub/elfload.h',
5748         `include/multiboot.h', `include/grub/multiboot.h',
5749         `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
5750         `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
5751         `kern/elf.c', `loader/multiboot_loader.c',
5752         `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
5753         `loader/i386/pc/multiboot2.c',
5754         `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
5755         `util/i386/pc/grub-mkrescue.in'.  Remove
5756         `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
5757         `include/grub/i386/pc/util/biosdisk.h' and
5758         `include/grub/powerpc/ieee1275/multiboot.h'.
5760 2007-08-02  Bean  <bean123ch@gmail.com>
5762         * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
5763         (ntfs_mod_SOURCES): New variable.
5764         (ntfs_mod_CFLAGS): Likewise.
5765         (ntfs_mod_LDFLAGS): Likewise.
5767         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
5768         (grub_probe_SOURCES): Likewise.
5769         (grub_emu_SOURCES): Likewise.
5771         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
5772         (grub_emu_SOURCES): Likewise.
5774         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
5775         (grub_emu_SOURCES): Likewise.
5777         * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
5779         * fs/ntfs.c: New file.
5781 2007-08-02  Bean  <bean123ch@gmail.com>
5783         * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
5785         * file.h (grub_file): Likewise.
5787         * fshelp.h (grub_fshelp_read_file): Likewise.
5789         * util/i386/pc/grub-setup.c (setup): Likewise.
5790         (save_first_sector): Likewise.
5791         (save_blocklists): Likewise.
5793         * fs/affs.c (grub_affs_read_file): Likewise.
5795         * fs/ext2.c (grub_ext2_read_file): Likewise.
5797         * fs/fat.c (grub_fat_read_data): Likewise.
5799         * fs/fshelp.c (grub_fshelp_read_file): Likewise.
5801         * fs/hfs.c (grub_hfs_read_file): Likewise.
5803         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
5805         * fs/jfs.c (grub_jfs_read_file): Likewise.
5807         * fs/minix.c (grub_minix_read_file): Likewise.
5809         * fs/sfs.c (grub_sfs_read_file): Likewise.
5811         * fs/ufs.c (grub_ufs_read_file): Likewise.
5813         * fs/xfs.c (grub_xfs_read_file): Likewise.
5815         * command/blocklist.c (read_blocklist): Likewise.
5816         (print_blocklist): Likewise.
5818 2007-08-02  Marco Gerards  <marco@gnu.org>
5820         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
5821         `util/hostfs.c'.
5823         * disk/host.c: New file.
5825         * util/hostfs.c: Likewise.
5827         * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
5828         return `GRUB_ERR_BAD_FS'.
5829         * fs/sfs.c (grub_sfs_mount): Likewise.
5830         * fs/xfs.c (grub_xfs_mount): Likewise.
5832         * include/grub/disk.h (enum grub_disk_dev_id): Add
5833         `GRUB_DISK_DEVICE_HOST_ID'.
5835         * util/grub-emu.c (main): Initialize and de-initialize hostfs.
5837 2007-07-24  Jerone Young  <jerone@gmail.com>
5839         * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
5840         modules for compilation.
5841         * conf/powerpc-ieee1275.rmk: Likewise.
5843         * include/multiboot.h: Move multiboot definitions to one file. Rename
5844         many definitions to not get grub specific.
5845         * include/multiboot2.h: Create header with multiboot 2 definitions.
5846         * include/grub/multiboot.h: Header for grub specific function
5847         prototypes and definitions.
5848         * include/grub/multiboot2.h: Likewise.
5849         * include/grub/multiboot_loader.h: Likewise.
5850         * include/grub/i386/pc/multiboot.h: Removed.
5851         * include/grub/powerpc/ieee1275/multiboot.h: Removed.
5853         * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
5854         and 2 to allow for one multiboot and module commands.
5855         * loader/multiboot2.c: Add multiboot2 functionality.
5856         * loader/i386/pc/multiboot.c: Modify for new multiboot header location
5857         and definition names.
5858         * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
5859         2 functions.
5860         * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
5861         ieee1275 specific multiboot2 code.
5863         * kern/i386/pc/startup.S: Change headers and definition names for
5864         multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
5866 2007-07-22  Robert Millan  <rmh@aybabtu.com>
5868         * geninitheader.sh: Process file specified in first parameter rather
5869         than hardcoding grub_modules_init.lst.
5870         * geninit.sh: Likewise.  Also, construct header name dynamically rather
5871         than hardcoding grub_modules_init.h.
5873         * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
5874         grub-emu to grub_emu_init.[ch].  Add rules to build analogous
5875         grub_probe_init.[ch] and grub_setup_init.[ch].
5877         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
5878         grub_modules_init.h with grub_emu_init.h.
5879         (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
5880         grub_probe_init.[ch] files.
5881         * conf/i386-efi.rmk: Likewise.
5882         * conf/i386-pc.rmk: Likewise.
5883         (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
5884         grub_setup_init.[ch] files.
5886         * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
5887         * util/grub-probe.c: Include grub_probe_init.h.  Use grub_init_all()
5888         to initialize modules rather than a list of hardcoded functions.
5889         * util/i386/pc/grub-setup.c: Include grub_setup_init.h.  Use
5890         grub_init_all() to initialize modules rather than a list of hardcoded
5891         functions.
5893 2007-07-22  Robert Millan  <rmh@aybabtu.com>
5895         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
5896         GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
5898 2007-07-22  Robert Millan  <rmh@aybabtu.com>
5900         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
5901         GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
5902         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
5903         flag when running on SmartFirmware.
5904         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
5905         "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
5906         was set.
5908         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
5909         Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
5910         rather than decreasing it.
5912         * util/i386/pc/grub-setup.c (setup): When embedding is required, but
5913         there's not enough space to do it, fail in the same way as when it
5914         can't be done because there are no partitions.
5916         * util/powerpc/ieee1275/grub-install.in: Improve error message shown
5917         when nvsetenv failed.
5919 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
5921         * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
5922         because this rule is automatically generated.
5923         (grub-mkrescue): Removed for the same reason as above.
5925 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
5927         Migrate to GNU General Public License Version 3.
5929         * COPYING: Replaced with the plain text version of GPLv3.
5931         * config.guess: Updated from gnulib.
5932         * config.sub: Likewise.
5934         * geninit.sh: Output a GPLv3 copyright notice.
5935         * geninitheader.sh: Likewise.
5936         * genmodsrc.sh: Likewise.
5937         * gensymlist.sh.in: Likewise.
5939         * boot/i386/pc/boot.S: Upgraded to GPLv3.
5940         * boot/i386/pc/diskboot.S: Likewise.
5941         * boot/i386/pc/pxeboot.S: Likewise.
5942         * commands/blocklist.c: Likewise.
5943         * commands/boot.c: Likewise.
5944         * commands/cat.c: Likewise.
5945         * commands/cmp.c: Likewise.
5946         * commands/configfile.c: Likewise.
5947         * commands/echo.c: Likewise.
5948         * commands/help.c: Likewise.
5949         * commands/ls.c: Likewise.
5950         * commands/search.c: Likewise.
5951         * commands/terminal.c: Likewise.
5952         * commands/test.c: Likewise.
5953         * commands/videotest.c: Likewise.
5954         * commands/i386/cpuid.c: Likewise.
5955         * commands/i386/pc/halt.c: Likewise.
5956         * commands/i386/pc/play.c: Likewise.
5957         * commands/i386/pc/reboot.c: Likewise.
5958         * commands/i386/pc/vbeinfo.c: Likewise.
5959         * commands/i386/pc/vbetest.c: Likewise.
5960         * commands/ieee1275/halt.c: Likewise.
5961         * commands/ieee1275/reboot.c: Likewise.
5962         * commands/ieee1275/suspend.c: Likewise.
5963         * disk/loopback.c: Likewise.
5964         * disk/lvm.c: Likewise.
5965         * disk/raid.c: Likewise.
5966         * disk/efi/efidisk.c: Likewise.
5967         * disk/i386/pc/biosdisk.c: Likewise.
5968         * disk/ieee1275/ofdisk.c: Likewise.
5969         * font/manager.c: Likewise.
5970         * fs/affs.c: Likewise.
5971         * fs/ext2.c: Likewise.
5972         * fs/fat.c: Likewise.
5973         * fs/fshelp.c: Likewise.
5974         * fs/hfs.c: Likewise.
5975         * fs/hfsplus.c: Likewise.
5976         * fs/iso9660.c: Likewise.
5977         * fs/jfs.c: Likewise.
5978         * fs/minix.c: Likewise.
5979         * fs/sfs.c: Likewise.
5980         * fs/ufs.c: Likewise.
5981         * fs/xfs.c: Likewise.
5982         * hello/hello.c: Likewise.
5983         * include/grub/acorn_filecore.h: Likewise.
5984         * include/grub/arg.h: Likewise.
5985         * include/grub/bitmap.h: Likewise.
5986         * include/grub/boot.h: Likewise.
5987         * include/grub/cache.h: Likewise.
5988         * include/grub/device.h: Likewise.
5989         * include/grub/disk.h: Likewise.
5990         * include/grub/dl.h: Likewise.
5991         * include/grub/elfload.h: Likewise.
5992         * include/grub/env.h: Likewise.
5993         * include/grub/err.h: Likewise.
5994         * include/grub/file.h: Likewise.
5995         * include/grub/font.h: Likewise.
5996         * include/grub/fs.h: Likewise.
5997         * include/grub/fshelp.h: Likewise.
5998         * include/grub/gzio.h: Likewise.
5999         * include/grub/hfs.h: Likewise.
6000         * include/grub/kernel.h: Likewise.
6001         * include/grub/loader.h: Likewise.
6002         * include/grub/lvm.h: Likewise.
6003         * include/grub/misc.h: Likewise.
6004         * include/grub/mm.h: Likewise.
6005         * include/grub/net.h: Likewise.
6006         * include/grub/normal.h: Likewise.
6007         * include/grub/parser.h: Likewise.
6008         * include/grub/partition.h: Likewise.
6009         * include/grub/pc_partition.h: Likewise.
6010         * include/grub/raid.h: Likewise.
6011         * include/grub/rescue.h: Likewise.
6012         * include/grub/script.h: Likewise.
6013         * include/grub/setjmp.h: Likewise.
6014         * include/grub/symbol.h: Likewise.
6015         * include/grub/term.h: Likewise.
6016         * include/grub/terminfo.h: Likewise.
6017         * include/grub/tparm.h: Likewise.
6018         * include/grub/types.h: Likewise.
6019         * include/grub/video.h: Likewise.
6020         * include/grub/efi/api.h: Likewise.
6021         * include/grub/efi/chainloader.h: Likewise.
6022         * include/grub/efi/console.h: Likewise.
6023         * include/grub/efi/console_control.h: Likewise.
6024         * include/grub/efi/disk.h: Likewise.
6025         * include/grub/efi/efi.h: Likewise.
6026         * include/grub/efi/pe32.h: Likewise.
6027         * include/grub/efi/time.h: Likewise.
6028         * include/grub/i386/linux.h: Likewise.
6029         * include/grub/i386/setjmp.h: Likewise.
6030         * include/grub/i386/types.h: Likewise.
6031         * include/grub/i386/efi/kernel.h: Likewise.
6032         * include/grub/i386/efi/loader.h: Likewise.
6033         * include/grub/i386/efi/time.h: Likewise.
6034         * include/grub/i386/pc/biosdisk.h: Likewise.
6035         * include/grub/i386/pc/boot.h: Likewise.
6036         * include/grub/i386/pc/chainloader.h: Likewise.
6037         * include/grub/i386/pc/console.h: Likewise.
6038         * include/grub/i386/pc/init.h: Likewise.
6039         * include/grub/i386/pc/kernel.h: Likewise.
6040         * include/grub/i386/pc/loader.h: Likewise.
6041         * include/grub/i386/pc/memory.h: Likewise.
6042         * include/grub/i386/pc/multiboot.h: Likewise.
6043         * include/grub/i386/pc/serial.h: Likewise.
6044         * include/grub/i386/pc/time.h: Likewise.
6045         * include/grub/i386/pc/vbe.h: Likewise.
6046         * include/grub/i386/pc/vbeblit.h: Likewise.
6047         * include/grub/i386/pc/vbefill.h: Likewise.
6048         * include/grub/i386/pc/vbeutil.h: Likewise.
6049         * include/grub/i386/pc/vga.h: Likewise.
6050         * include/grub/ieee1275/ieee1275.h: Likewise.
6051         * include/grub/ieee1275/ofdisk.h: Likewise.
6052         * include/grub/powerpc/libgcc.h: Likewise.
6053         * include/grub/powerpc/setjmp.h: Likewise.
6054         * include/grub/powerpc/types.h: Likewise.
6055         * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
6056         * include/grub/powerpc/ieee1275/console.h: Likewise.
6057         * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
6058         * include/grub/powerpc/ieee1275/kernel.h: Likewise.
6059         * include/grub/powerpc/ieee1275/loader.h: Likewise.
6060         * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
6061         * include/grub/powerpc/ieee1275/time.h: Likewise.
6062         * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
6063         * include/grub/sparc64/libgcc.h: Likewise.
6064         * include/grub/sparc64/setjmp.h: Likewise.
6065         * include/grub/sparc64/types.h: Likewise.
6066         * include/grub/sparc64/ieee1275/console.h: Likewise.
6067         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
6068         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
6069         * include/grub/sparc64/ieee1275/time.h: Likewise.
6070         * include/grub/util/biosdisk.h: Likewise.
6071         * include/grub/util/getroot.h: Likewise.
6072         * include/grub/util/lvm.h: Likewise.
6073         * include/grub/util/misc.h: Likewise.
6074         * include/grub/util/raid.h: Likewise.
6075         * include/grub/util/resolve.h: Likewise.
6076         * io/gzio.c: Likewise.
6077         * kern/device.c: Likewise.
6078         * kern/disk.c: Likewise.
6079         * kern/dl.c: Likewise.
6080         * kern/elf.c: Likewise.
6081         * kern/env.c: Likewise.
6082         * kern/err.c: Likewise.
6083         * kern/file.c: Likewise.
6084         * kern/fs.c: Likewise.
6085         * kern/loader.c: Likewise.
6086         * kern/main.c: Likewise.
6087         * kern/misc.c: Likewise.
6088         * kern/mm.c: Likewise.
6089         * kern/parser.c: Likewise.
6090         * kern/partition.c: Likewise.
6091         * kern/rescue.c: Likewise.
6092         * kern/term.c: Likewise.
6093         * kern/efi/efi.c: Likewise.
6094         * kern/efi/init.c: Likewise.
6095         * kern/efi/mm.c: Likewise.
6096         * kern/i386/dl.c: Likewise.
6097         * kern/i386/efi/init.c: Likewise.
6098         * kern/i386/efi/startup.S: Likewise.
6099         * kern/i386/pc/init.c: Likewise.
6100         * kern/i386/pc/lzo1x.S: Likewise.
6101         * kern/i386/pc/startup.S: Likewise.
6102         * kern/ieee1275/ieee1275.c: Likewise.
6103         * kern/powerpc/cache.S: Likewise.
6104         * kern/powerpc/dl.c: Likewise.
6105         * kern/powerpc/ieee1275/cmain.c: Likewise.
6106         * kern/powerpc/ieee1275/crt0.S: Likewise.
6107         * kern/powerpc/ieee1275/init.c: Likewise.
6108         * kern/powerpc/ieee1275/openfw.c: Likewise.
6109         * kern/sparc64/cache.S: Likewise.
6110         * kern/sparc64/dl.c: Likewise.
6111         * kern/sparc64/ieee1275/init.c: Likewise.
6112         * kern/sparc64/ieee1275/openfw.c: Likewise.
6113         * loader/efi/chainloader.c: Likewise.
6114         * loader/efi/chainloader_normal.c: Likewise.
6115         * loader/i386/efi/linux.c: Likewise.
6116         * loader/i386/efi/linux_normal.c: Likewise.
6117         * loader/i386/pc/chainloader.c: Likewise.
6118         * loader/i386/pc/chainloader_normal.c: Likewise.
6119         * loader/i386/pc/linux.c: Likewise.
6120         * loader/i386/pc/linux_normal.c: Likewise.
6121         * loader/i386/pc/multiboot.c: Likewise.
6122         * loader/i386/pc/multiboot_normal.c: Likewise.
6123         * loader/powerpc/ieee1275/linux.c: Likewise.
6124         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
6125         * normal/arg.c: Likewise.
6126         * normal/cmdline.c: Likewise.
6127         * normal/command.c: Likewise.
6128         * normal/completion.c: Likewise.
6129         * normal/execute.c: Likewise.
6130         * normal/function.c: Likewise.
6131         * normal/lexer.c: Likewise.
6132         * normal/main.c: Likewise.
6133         * normal/menu.c: Likewise.
6134         * normal/menu_entry.c: Likewise.
6135         * normal/misc.c: Likewise.
6136         * normal/parser.y: Likewise.
6137         * normal/script.c: Likewise.
6138         * normal/i386/setjmp.S: Likewise.
6139         * normal/powerpc/setjmp.S: Likewise.
6140         * normal/sparc64/setjmp.S: Likewise.
6141         * partmap/acorn.c: Likewise.
6142         * partmap/amiga.c: Likewise.
6143         * partmap/apple.c: Likewise.
6144         * partmap/gpt.c: Likewise.
6145         * partmap/pc.c: Likewise.
6146         * partmap/sun.c: Likewise.
6147         * term/gfxterm.c: Likewise.
6148         * term/terminfo.c: Likewise.
6149         * term/efi/console.c: Likewise.
6150         * term/i386/pc/console.c: Likewise.
6151         * term/i386/pc/serial.c: Likewise.
6152         * term/i386/pc/vesafb.c: Likewise.
6153         * term/i386/pc/vga.c: Likewise.
6154         * term/ieee1275/ofconsole.c: Likewise.
6155         * util/biosdisk.c: Likewise.
6156         * util/console.c: Likewise.
6157         * util/genmoddep.c: Likewise.
6158         * util/getroot.c: Likewise.
6159         * util/grub-emu.c: Likewise.
6160         * util/grub-mkdevicemap.c: Likewise.
6161         * util/grub-probe.c: Likewise.
6162         * util/lvm.c: Likewise.
6163         * util/misc.c: Likewise.
6164         * util/raid.c: Likewise.
6165         * util/resolve.c: Likewise.
6166         * util/update-grub.in: Likewise.
6167         * util/update-grub_lib.in: Likewise.
6168         * util/grub.d/00_header.in: Likewise.
6169         * util/grub.d/10_hurd.in: Likewise.
6170         * util/grub.d/10_linux.in: Likewise.
6171         * util/i386/efi/grub-install.in: Likewise.
6172         * util/i386/efi/grub-mkimage.c: Likewise.
6173         * util/i386/pc/grub-install.in: Likewise.
6174         * util/i386/pc/grub-mkimage.c: Likewise.
6175         * util/i386/pc/grub-mkrescue.in: Likewise.
6176         * util/i386/pc/grub-setup.c: Likewise.
6177         * util/i386/pc/misc.c: Likewise.
6178         * util/powerpc/ieee1275/grub-install.in: Likewise.
6179         * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
6180         * util/powerpc/ieee1275/misc.c: Likewise.
6181         * video/bitmap.c: Likewise.
6182         * video/video.c: Likewise.
6183         * video/i386/pc/vbe.c: Likewise.
6184         * video/i386/pc/vbeblit.c: Likewise.
6185         * video/i386/pc/vbefill.c: Likewise.
6186         * video/i386/pc/vbeutil.c: Likewise.
6187         * video/readers/tga.c: Likewise.
6189 2007-07-02  Robert Millan  <rmh@aybabtu.com>
6191         * conf/i386-efi.rmk: Replace obsolete reference to
6192         util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
6193         with util/getroot.c.
6194         * conf/powerpc-ieee1275.rmk: Likewise.
6195         * conf/sparc64-ieee1275.rmk: Likewise.
6197         * util/grub-emu.c (main): Fix unchecked pointer handling.
6199 2007-07-02  Robert Millan  <rmh@aybabtu.com>
6201         * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
6202         invocation to fail, in order to support partition-less media.
6204         * util/i386/pc/grub-install.in: Likewise.
6206         * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
6207         which fs or partmap modules are needed (akin to its sister scripts).
6209         Also use grub-probe to get rid of unportable /proc/mounts check.
6211         Print the same informational message that the other scripts do, before
6212         exiting.
6214 2007-06-23  Robert Millan  <rmh@aybabtu.com>
6216         * util/update-grub_lib.in (font_path): New function.  Determine whether
6217         a font file can be found and, if so, echo the GRUB path to it.
6219         * util/update-grub.in: Handle multiple terminals depending on user
6220         input, platform availability and font file presence.  Propagate
6221         variables of our findings to /etc/grub.d/ children.
6223         * util/grub.d/00_header.in: Handle multiple terminals, based on
6224         environment setup by update-grub.
6226 2007-06-23  Robert Millan  <rmh@aybabtu.com>
6228         * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
6230 2007-06-21  Robert Millan  <rmh@aybabtu.com>
6232         * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
6233         indicate end of data section in kernel image.
6234         * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
6235         GRUB_KERNEL_MACHINE_DATA_END.
6237         * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
6238         space for it.
6239         * kern/i386/efi/startup.S: Likewise.
6241         * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
6242         during image generation.  Implement --prefix option to override this
6243         patch.
6244         * util/i386/efi/grub-mkimage.c: Likewise.
6246         * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
6247         code to make path relative to its root into a separate function.
6249         * util/i386/pc/grub-install.in: Use newly provided
6250         make_system_path_relative_to_its_root() to convert ${grubdir}, then
6251         pass the result to grub-install --prefix.
6253 2007-06-13  Robert Millan  <rmh@aybabtu.com>
6255         * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
6256         DEFAULT_DEVICE_MAP.
6257         * util/grub-emu.c: Use above definitions from misc.h instead of
6258         defining them.
6259         * util/grub-mkdevicemap.c: Likewise.
6260         * util/i386/pc/grub-setup.c: Likewise.
6261         * util/grub-probe.c: Likewise.
6262         (probe): Abort with grub_util_error() when either
6263         grub_guess_root_device or grub_util_get_grub_dev fails.
6265 2007-06-12  Robert Millan  <rmh@aybabtu.com>
6267         * normal/command.c (grub_command_execute): Use NULL rather than 0 for
6268         "pager" assignment.
6269         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
6270         "pcdata".
6271         * util/grub-probe.c (probe): Likewise for "drive_name".
6273 2007-06-11  Robert Millan  <rmh@aybabtu.com>
6275         * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
6276         not just the cdrom one.
6278 2007-06-11  Robert Millan  <rmh@aybabtu.com>
6280         * util/i386/pc/grub-mkrescue.in: Add "set -e".
6281         Add --pkglibdir=DIR option to override pkglibdir.
6282         Mention --image-type=TYPE in help output.
6283         Fix --grub-mkimage (it was a no-op).
6284         Abort gracefully when no parameter is given.
6286 2007-06-11  Robert Millan  <rmh@aybabtu.com>
6288         * util/i386/pc/grub-mkrescue.in: New file.
6289         * conf/i386-pc.rmk: Add its build declarations.  Put it in bin_SCRIPTS.
6290         * Makefile.in: Handle bin_SCRIPTS.
6292 2007-06-10  Vesa Jaaskelainen  <chaac@nic.fi>
6294         * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
6295         list of video modes.
6297 2007-06-06  Robert Millan  <rmh@aybabtu.com>
6299         * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
6300         file doesn't exist, or if it is in a filesystem grub can't read.
6302         * util/update-grub.in: Set fallback for GRUB_FS check to "unknown".  Do
6303         not abort if GRUB_DRIVE could not be defined.  Rearrange generated
6304         header comment to fit in 80 columns when the variables are resolved.
6306         * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
6307         could be identified by update-grub.  Remove redundant check for
6308         unifont.pff existence (since convert_system_path_to_grub_path now
6309         handles that).
6311 2007-06-04  Robert Millan  <rmh@aybabtu.com>
6313         * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
6315         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
6317         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
6319 2007-06-04  Robert Millan  <rmh@aybabtu.com>
6321         * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
6323         * include/grub/partition.h: Declare grub_apple_partition_map_init and
6324         grub_apple_partition_map_fini.
6326         * util/biosdisk.c
6327         (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
6328         to access >2 TiB disks).
6330         Print disk->total_sectors with %llu instead of %lu, since this
6331         variable is always 64-bit (prevents wrong disk size from being displayed
6332         on either >2 TiB disk or big-endian CPU).
6334         (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
6335         into a generic case that supports all (sane) partition maps.
6337         Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
6338         breaks big-endian.
6340         * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
6341         and grub_apple_partition_map_fini() after that.
6343 2007-06-01  Robert Millan  <rmh@aybabtu.com>
6345         * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
6347         * util/grub.d/00_header.in: Only enable gfxterm when
6348         convert_system_path_to_grub_path() succeeds.
6350 2007-05-20  Robert Millan  <rmh@aybabtu.com>
6352         * util/update-grub_lib.in: New file.
6353         * DISTLIST: Add update-grub_lib.in.
6354         * conf/common.rmk: Generate update-grub_lib and install it in
6355         $(lib_DATA).
6356         * Makefile.in: Add install routine for $(lib_DATA).
6358         * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
6359         function provided by update-grub_lib to support arbitrary paths of
6360         unifont.pff.
6361         * util/update-grub.in: Use convert_system_path_to_grub_path() to
6362         initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
6364 2007-05-19  Robert Millan  <rmh@aybabtu.com>
6366         * commands/i386/cpuid.c: New module.
6367         * DISTLIST: Add it.
6368         * conf/i386-efi.rmk: Enable cpuid.mod.
6369         * conf/i386-pc.rmk: Likewise.
6371 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
6373         * kern/disk.c (grub_disk_read): Check return value of
6374         grub_realloc().
6376 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
6378         * util/getroot.c (grub_util_get_grub_dev): Support partitionable
6379         arrays.
6380         * disk/raid.c (grub_raid_open): Likewise.
6382 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
6384         * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
6385         stack instead of on the heap.
6387         * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
6388         before doing a read on it.
6390         * configure.ac: Only use -fno-stack-protector for the target
6391         environment.
6393 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
6395         * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
6396         __attribute_ ((unused)) to mode_type argument.
6398         * util/getroot.c (grub_guess_root_device): Fix #endif.
6400         * kern/misc.c (memcmp): Fix prototype.
6402         * include/grub/partition.h [GRUB_UTIL]
6403         (grub_gpt_partition_map_init): Add prototype.
6404         (grub_gpt_partition_map_fini): Likewise.
6406         * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
6407         at the right place.
6409         * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
6410         (grub_fat_read_data): Likewise.
6411         (grub_fat_find_dir): Likewise.
6413         * font/manager.c (find_glyph): Make table a const.
6414         (grub_font_get_glyph): Remove bitmap from if statement.
6416 2007-05-16  Jeroen Dekkers  <jeroen@dekkers.cx>
6418         * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
6419         code, first search for device in /dev/mapper, then in /dev.
6420         (grub_util_get_grub_dev): New function.
6421         * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
6422         prototype.
6423         * util/grub-probe.c (probe): Remove check for RAID, call
6424         grub_util_get_grub_dev() instead of
6425         grub_util_biosdisk_get_grub_dev().
6426         * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
6427         grub_util_biosdisk_get_grub_dev().
6428         * util/i386/pc/grub-setup.c (main): Likewise.
6430 2007-05-16  Robert Millan  <rmh@aybabtu.com>
6432         * DISTLIST: Update for the latest changes.
6433         * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
6434         util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
6435         * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
6436         grub/util/biosdisk.h.
6437         * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
6438         grub/util/biosdisk.h.
6440 2007-05-16  Robert Millan  <rmh@aybabtu.com>
6442         * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
6444 2007-05-16  Robert Millan  <rmh@aybabtu.com>
6446         * util/i386/efi/grub-install.in: New.
6447         * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
6448         newly added grub-install.
6449         * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
6450         include.
6451         * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
6452         grub/util/biosdisk.h.
6453         * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
6454         grub/util/biosdisk.h.
6456 2007-05-16  Robert Millan  <rmh@aybabtu.com>
6458         * include/grub/i386/pc/util/biosdisk.h: Moved to ...
6459         * include/grub/util/biosdisk.h: ... here.
6460         * util/i386/pc/biosdisk.c: Moved to ...
6461         * util/biosdisk.c: ... here.
6462         * util/i386/pc/getroot.c: Moved to ...
6463         * util/getroot.c: ... here.
6464         * util/i386/pc/grub-mkdevicemap.c: Moved to ...
6465         * util/grub-mkdevicemap.c: ... here.
6466         * util/i386/pc/grub-probe.c: Moved to ...
6467         * util/grub-probe.c: ... here.
6469 2007-05-15  Robert Millan  <rmh@aybabtu.com>
6471         * util/update-grub.in: Remove duplicated line in grub.cfg header
6472         message.
6474 2007-05-13  Robert Millan  <rmh@aybabtu.com>
6476         * util/update-grub.in: Fix a few assumptions about the devices holding
6477         /, /boot and /boot/grub being the same.
6478         * util/grub.d/00_header.in: Likewise.
6479         * util/grub.d/10_hurd.in: Likewise.
6480         * util/grub.d/10_linux.in: Likewise.
6482         * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
6483         patterns.  Use that to define the `.old' suffix as older than `'.
6485         * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
6487         * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
6488         the grub.cfg header message.
6490 2007-05-11  Robert Millan  <rmh@aybabtu.com>
6492         * util/update-grub.in: Create device.map if it doesn't already exist,
6493         before attempting to run grub-probe.
6494         Check for grub-probe and grub-mkdevicemap with the same code
6495         grub-install is using.
6496         Remove test mode.
6498 2007-05-09  Jeroen Dekkers  <jeroen@dekkers.cx>
6500         * Makefile.in: Add the datarootdir autoconf variable.
6502 2007-05-09  Robert Millan  <rmh@aybabtu.com>
6504         * util/i386/pc/grub-probe.c (probe): When detecting partition map,
6505         fail gracefully if dev->disk->partition == NULL.
6507 2007-05-07  Robert Millan  <rmh@aybabtu.com>
6509         * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
6510         determine partition map module.
6511         * util/i386/pc/grub-install.in: Use this feature to decide which
6512         partition module to load, instead of hardcoding pc and gpt.
6514 2007-05-07  Robert Millan  <rmh@aybabtu.com>
6516         * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
6517         source directory differs from build directory.
6519 2007-05-05  Robert Millan  <rmh@aybabtu.com>
6521         * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
6522         initialisation.
6524 2007-05-05  Robert Millan  <rmh@aybabtu.com>
6526         * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
6528 2007-05-05  Robert Millan  <rmh@aybabtu.com>
6530         * util/grub.d/10_linux.in: Allow the administrator to insert Linux
6531         command-line arguments via ${GRUB_CMDLINE_LINUX}.
6533 2007-05-05  Robert Millan  <rmh@aybabtu.com>
6535         * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
6536         (grub_probe_SOURCES): Likewise.
6537         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
6538         GPT and initialize dos_part and bsd_part accordingly.
6539         * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
6540         install_bsd_part.
6541         (main): Activate gpt module for use during partition identification,
6542         and deactivate it afterwards.
6543         * util/i386/pc/grub-install.in: Add gpt module to core.img.
6544         * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
6545         partition identification, and deactivate it afterwards.
6547 2007-05-05  Robert Millan  <rmh@aybabtu.com>
6549         * term/i386/pc/console.c (grub_console_fini): Call
6550         grub_term_set_current() before grub_term_unregister().
6552 2007-05-04  Robert Millan  <rmh@aybabtu.com>
6554         * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
6555         util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
6556         * Makefile.in: Build update-grub_SCRIPTS.  Install update-grub_SCRIPTS
6557         and update-grub_DATA.
6558         * conf/common.rmk: Build and install update-grub components.
6559         * conf/common.mk: Regenerate.
6560         * util/update-grub.in: New.  Core of update-grub.
6561         * util/grub.d/00_header.in: New.  Generates grub.cfg header.
6562         * util/grub.d/10_hurd.in: New.  Generates boot entries for the Hurd.
6563         * util/grub.d/10_linux.in: New.  Generates boot entries for Linux.
6564         * util/grub.d/README: New.  Document grub.d directory layout.
6566 2007-05-01  Robert Millan  <rmh@aybabtu.com>
6568         * util/grub-emu.c: Move initialization functions
6569         grub_util_biosdisk_init() and grub_init_all() before
6570         grub_util_biosdisk_get_grub_dev(), which relies on them.
6572 2007-04-19  Robert Millan  <rmh@aybabtu.com>
6574         * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
6575         it is used later.
6577 2007-04-18  Jerone Young  <jerone@gmail.com>
6579         * kernel/elf.c: Add missing parenthesis for conditional statement
6580         stanza.
6582 2007-04-10  Jerone Young  <jerone@gmail.com>
6584         * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
6585         continue on and look for device node with real device name.
6587 2007-04-10  Jerone Young  <jerone@gmail.com>
6589         * configure.ac: Add argument for autoconf to use transformation
6590         ability.
6591         * Makefile.in: Add autoconf package transformation code.
6592         * util/i386/pc/grub-install.in: Likewise.
6593         * util/powerpc/ieee1275/grub-install.in: Likewise.
6595 2007-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
6597         * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
6598         (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
6599         (EXT2_REVISION): Likewise.
6600         (EXT2_INODE_SIZE): Likewise.
6601         (struct grub_ext2_block_group): Added a missing member
6602         "used_dirs".
6603         (grub_ext2_read_inode): Divide by the inode size in a superblock
6604         instead of 128 to obtain INODES_PER_BLOCK.
6605         Use the macro EXT2_INODE_SIZE instead of directly using
6606         SBLOCK->INODE_SIZE.
6608 2007-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
6610         * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
6611         superblock instead of the structure size to compute an
6612         offset. This fixes the problem that GRUB could not read a
6613         filesystem when inode size is different from 128-byte.
6615 2007-03-05  Marco Gerards  <marco@gnu.org>
6617         * normal/main.c (read_config_file): When "menu" is not set, create
6618         an initial context.
6620 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
6622         * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
6623         (HEAP_LIMIT): New macro.
6624         (grub_claim_heap): Claim memory up to `heaplimit'.
6626 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
6628         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
6629         * kern/powerpc/ieee1275/init.c (_end): Add declaration.
6630         (_start): Likewise.
6631         (grub_arch_modules_addr): Return address after `_end'.
6632         * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
6633         (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
6634         (add_segments): Calculate `_end' from phdr size and location.
6635         (ALIGN_UP): Moved to ...
6636         * include/grub/misc.h: here.
6637         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
6638         New macro.
6639         (GRUB_IEEE1275_MODULE_BASE): Removed.
6641 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
6643         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
6644         loop boundary.
6646 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
6648         * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
6649         All users updated.
6650         (grub_elf64_load_hook_t): Likewise.
6651         * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
6652         debug output.
6654 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
6656         * kern/mm.c: Update copyright.
6657         (grub_mm_debug): Correct syntax error.
6658         (grub_mm_dump_free): New function.
6659         (grub_debug_free): Call `grub_free'.
6660         * include/grub/mm.h: Update copyright.
6661         (grub_mm_dump_free): Add declaration.
6663 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
6665         * include/grub/ieee1275/ieee1275.h: Update copyright.
6666         * kern/powerpc/ieee1275/init.c: Likewise.
6667         * kern/powerpc/ieee1275/openfw.c: Likewise.
6669         * loader/powerpc/ieee1275/linux.c: Likewise.
6670         * include/grub/elfload.h: Likewise.
6671         * kern/elf.c: Likewise.
6672         (grub_elf32_load): Pass `base' and `size' parameters.  Update all
6673         callers.
6674         (grub_elf64_load): Likewise.
6675         (grub_elf32_load_segment): Move to a nested function.
6676         (grub_elf64_load_segment): Likewise.
6678 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
6680         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
6681         prototype.
6682         * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
6683         (grub_heap_len): Likewise.
6684         (HEAP_SIZE): New macro.
6685         (grub_claim_heap): New function.
6686         (grub_machine_init): Don't claim heap directly.  Call
6687         `grub_claim_heap'.
6688         * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
6689         (grub_available_iterate): New function.
6691 2007-02-03  Thomas Schwinge  <tschwinge@gnu.org>
6693         * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
6694         * configure.ac: Use it for testing the HOST and TARGET compilers.
6696 2006-12-13  Thomas Schwinge  <tschwinge@gnu.org>
6698         * Makefile.in (enable_grub_emu): New variable.
6699         * configure.ac (--enable-grub-emu): New option.
6700         Do the checks for (n)curses only if `--enable-grub-emu' is requested.
6701         * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
6702         * conf/i386-pc.rmk: Likewise.
6703         * conf/powerpc-ieee1275.rmk: Likewise.
6704         * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
6706 2006-12-12  Marco Gerards  <marco@gnu.org>
6708         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
6710         * kern/env.c (grub_env_unset): Don't free the member `value' when
6711         the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
6712         pointer.
6714         * normal/main.c (current_menu): Removed.
6715         (free_menu): Unset the `menu' environment variable.
6716         (grub_normal_menu_addentry): Make use of the environment variable
6717         `menu', instead of using the global `current_menu'.  Allocate
6718         memory for the sourcecode of this entry.
6719         (read_config_file): New argument `nested', changed all callers.
6720         Only in the case of a new context, initialize a new menu.  Set the
6721         `menu' environment variable.
6722         (grub_normal_execute): Don't set and unset the environment
6723         variable `menu' here anymore.  Only free the menu when leaving the
6724         context.
6726         * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
6727         leak.
6729 2006-12-11  Marco Gerards  <marco@gnu.org>
6731         * normal/menu_entry.c (run): Fix off by one bug so the last line
6732         is executed.  Move the loader check to outside the loop.
6734 2006-12-08  Hollis Blanchard  <hollis@penguinppc.org>
6736         * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
6738 2006-11-25  Yoshinori K. Okuji  <okuji@enbug.org>
6740         * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
6741         the number of sectors.  Reported by Andrey Shuvikov
6742         <mr_hyro@yahoo.com>.
6744 2006-11-11  Jeroen Dekkers  <jeroen@dekkers.cx>
6746         * kern/disk.c (grub_disk_read): When there is a read error, always
6747         try to read only the necessary data.
6749         * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
6750         disk/raid.c.
6751         * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
6752         prototype.
6753         [GRUB_UTIL] (grub_raid_fini): Likewise.
6754         [GRUB_UTIL] (grub_lvm_init): Likewise.
6755         [GRUB_UTIL] (grub_lvm_fini): Likewise.
6756         * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
6757         RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
6758         (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
6759         and grub_raid_fini().
6761 2006-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
6763         * include/grub/types.h (__unused): Rename to UNUSED.
6764         * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
6765         (grub_elf64_size): Likewise.
6767 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
6769         * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
6770         grub_error_push and grub_error_pop in the error-handling path.
6771         (grub_elf32_load_segment): Only call grub_file_read with non-zero
6772         length.
6774 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
6776         * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
6777         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
6778         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6779         (kernel_elf_SOURCES): Likewise.
6780         * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
6781         * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
6782         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
6783         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
6784         * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
6785         (elf_mod_SOURCES): New variable.
6786         (elf_mod_CFLAGS): Likewise.
6787         (elf_mod_LDFLAGS): Likewise.
6788         * include/grub/types.h (__unused): New macro.
6789         * include/grub/elfload.h: New file.
6790         * kern/elf.c: Likewise.
6791         * loader/powerpc/ieee1275/linux.c: Include elfload.h.
6792         (ELF32_LOADMASK): New macro.
6793         (ELF64_LOADMASK): Likewise.
6794         (vmlinux): Removed.
6795         (grub_linux_load32): New function.
6796         (grub_linux_load64): Likewise.
6797         (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
6798         Use grub_elf_t instead of grub_file_t.
6800 2006-11-02  Hollis Blanchard  <hollis@penguinppc.org>
6802         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
6803         `catch_result' to struct set_color_args.
6805 2006-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
6807         * normal/menu.c: Include grub/script.h.
6808         * normal/menu_entry.c: Likewise.
6809         * include/grub/normal.h: Do not include grub/script.h.
6811 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
6813         * kern/disk.c (grub_disk_read): Correct debug printf formatting.
6815 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
6817         * kern/disk.c (grub_disk_open): Print debug messages when opening a
6818         disk.
6819         (grub_disk_close): Print debug messages when closing a disk.
6820         (grub_disk_read): Print debug messages when disk read fails.
6821         * kern/fs.c (grub_fs_probe): Print debug messages when detecting
6822         filesystem type.
6823         * kern/partition.c: Include misc.h.
6824         (grub_partition_iterate): Print debug messages when detecting
6825         partition type.
6827 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
6829         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
6830         is negative.
6831         * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
6833 2006-10-26  Hollis Blanchard  <hollis@penguinppc.org>
6835         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
6836         Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
6838 2006-10-25  Jeroen Dekkers  <jeroen@dekkers.cx>
6840         * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
6841         instead of sizeof(lv). Patch by Michael Guntsche.
6843 2006-10-18  Jeroen Dekkers  <jeroen@dekkers.cx>
6845         * disk/lvm.c: Rename VGS to VG_LIST.
6846         (grub_lvm_iterate): Change VGS->LV to VG-LV.
6847         (grub_lvm_open): Likewise.
6848         Thanks to Michael Guntsche for finding this bug.
6850 2006-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
6852         * configure.ac (AC_INIT): Bumped to 1.95.
6854 2006-10-14  Robert Millan  <rmh@aybabtu.com>
6856         * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
6857         with "/dev/.static/dev/md".
6859 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
6861         * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
6862         DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
6863         DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
6864         DRIVE_NAME are always freed.
6866         * util/i386/pc/biosdisk.c (make_device_name): Add one into
6867         DOS_PART, as a DOS partition is counted from one instead of zero
6868         now. Reported by Robert Millan.
6870 2006-10-14  Robert Millan  <rmh@aybabtu.com>
6872         * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
6873         grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
6874         * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
6875         string returned by grub_guess_root_device.
6876         * util/i386/pc/grub-setup.c: Likewise.
6877         * util/i386/pc/grub-probefs.c: Likewise.
6879         * util/i386/pc/grub-probefs.c: Rename to ...
6880         * util/i386/pc/grub-probe.c: ... this.
6881         * DISTLIST: Remove grub-probefs, add grub-probe.
6882         * conf/i386-efi.rmk: Likewise.
6883         * conf/i386-pc.rmk: Likewise.
6884         * util/i386/pc/grub-install.in: Likewise.
6886         * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
6887         choose which information we want to print.
6889 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
6891         * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
6892         include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
6893         include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
6894         include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
6895         video/readers/tga.c and video/i386/pc/vbeutil.c.
6897 2006-10-14  Jeroen Dekkers  <jeroen@dekkers.cx>
6899         Added support for RAID and LVM.
6901         * disk/lvm.c: New file.
6902         * disk/raid.c: Likewise.
6903         * include/grub/lvm.h: Likewise.
6904         * include/grub/raid.h: Likewise.
6905         * include/grub/util/lvm.h: Likewise.
6906         * include/grub/util/raid.h: Likewise.
6907         * util/lvm.c: Likewise.
6908         * util/raid.c: Likewise.
6910         * include/grub/disk.h (grub_disk_dev_id): Add
6911         GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
6912         (grub_disk_get_size): New prototype.
6913         * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
6914         returns a partition.
6915         (grub_disk_get_size): New function.
6917         * kern/i386/pc/init.c (make_install_device): Copy the prefix
6918         verbatim if grub_install_dos_part is -2.
6920         * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
6921         and LVM devices.
6923         * util/i386/pc/grub-setup.c (setup): New argument
6924         MUST_EMBED. Force embedding of GRUB when the argument is
6925         true. Close FILE before returning.
6926         (main): Add support for RAID and LVM.
6928         * conf/common.rmk: Add RAID and LVM modules.
6929         * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
6930         util/lvm.c.
6931         (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
6933         * kern/misc.c (grub_strstr): New function.
6934         * include/grub/misc.h (grub_strstr): New prototype.
6936 2006-10-10  Tristan Gingold  <tristan.gingold@bull.net>
6938         * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
6940 2006-10-05  Tristan Gingold  <tristan.gingold@bull.net>
6942         * kern/misc.c (grub_strtoull): Guess the base only if not
6943         specified.
6945 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
6947         * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
6948         PowerMac support.
6950 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
6952         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
6954         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
6955         Remove `flags' argument.  All callers changed.
6956         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
6957         (IEEE1275_IHANDLE_INVALID): New variable.
6958         (IEEE1275_CELL_INVALID): New variable.
6959         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
6960         grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
6961         grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
6962         grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
6963         grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
6964         codes from Open Firmware.  All callers updated.
6965         (grub_ieee1275_next_property): Directly return Open Firmware return
6966         code.
6967         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
6968         Standardize error checking from `grub_ieee1275_get_property'.
6969         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
6970         `devalias' to `aliases'.  Correct comments.  Consolidate error paths.
6972 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
6974         * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
6975         `instance_to_package_args' to `instance_to_path_args'.
6977         * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
6978         `grub_ieee1275_chosen'.
6980         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
6981         `grub_ieee1275_interpret'.
6983 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
6985         * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
6987 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
6989         * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
6990         (__cmpdi): Likewise.
6992         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
6993         `flags' to `grub_ieee1275_next_property'.  Change `pathlen' to type
6994         `grub_ssize_t'.
6996         * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
6998         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
6999         to type `grub_ssize_t'.
7000         (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
7002 2006-09-22  Marco Gerards  <marco@gnu.org>
7004         * normal/script.c (grub_script_create_cmdmenu): Skip leading
7005         newlines.
7007 2006-09-22  Marco Gerards  <marco@gnu.org>
7009         * commands/echo.c: New file.
7011         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
7013         * conf/common.rmk (echo_mod_SOURCES): New variable.
7014         (echo_mod_CFLAGS): Likewise.
7015         (echo_mod_LDFLAGS): Likewise.
7017 2006-09-22  Marco Gerards  <marco@gnu.org>
7019         * normal/main.c (get_line): Malloc memory instead of using
7020         preallocated memory.  Removed the arguments `cmdline' and
7021         `max_len'.  Updated all callers.
7023 2006-09-22  Marco Gerards  <marco@gnu.org>
7025         * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
7026         (normal_mod_DEPENDENCIES): Likewise.
7028         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
7029         (normal_mod_DEPENDENCIES): Likewise.
7031         * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
7033 2006-09-22  Johan Rydberg  <jrydberg@gnu.org>
7035         * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
7036         programs.
7037         * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
7038         (normal_mod_DEPENDENCIES): Likewise.
7039         * conf/i386-pc.mk: Regenerate.
7040         * conf/i386-efi.mk: Likewise
7041         * conf/common.mk: Likewise.
7042         * conf/powerpc-ieee1275.mk: Likewise.
7043         * conf/sparc64-ieee1275.mk: Likewise.
7045 2006-09-22  Robert Millan  <rmh@aybabtu.com>
7047         Sync with i386 version.
7048         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
7049         * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
7051 2006-09-21  Robert Millan  <rmh@aybabtu.com>
7053         Import from GRUB Legacy (lib/device.c):
7054         * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
7055         (init_device_map) [__linux__]: Add support for I2O devices.
7057 2006-09-14  Marco Gerards  <marco@gnu.org>
7059         * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
7060         `-melf_i386'.
7062 2006-09-14  Robert Millan  <rmh@aybabtu.com>
7064         * util/i386/pc/grub-install.in: Skip menu.lst when removing
7065         /boot/grub/*.lst.
7067         * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
7069         * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
7070         before adding it to device.map.
7072 2006-08-15  Johan Rydberg  <jrydberg@gnu.org>
7074         * genmk.rb: Let GCC generate dependencies the first time it
7075         compiles a file; using the -MD option.
7076         * conf/common.mk: Regenerate.
7077         * conf/i386-pc.mk: Likewise.
7078         * conf/i386-efi.mk: Likewise.
7079         * conf/powerpc-ieee1275.mk: Likewise.
7080         * conf/sparc64-ieee1275.mk: Likewise.
7082 2006-08-04  Yoshinori K. Okuji  <okuji@enbug.org>
7084         Move the prototypes of grub_setjmp and grub_longjmp to
7085         cpu/setjmp.h, so that each architecture may specify different
7086         attributes.
7088         * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
7089         (grub_longjmp): Likewise.
7090         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
7091         (grub_longjmp): Likewise.
7092         * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
7093         (grub_longjmp): Likewise.
7095         * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
7096         [!GRUB_UTIL] (grub_longjmp): Removed.
7098 2006-08-01  Pelletier Vincent  <subdino2004@yahoo.fr>
7100         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
7101         "color!" method does not return any value.
7103 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
7105         * include/grub/bitmap.h: New file.
7107         * include/grub/i386/pc/vbeutil.h: Likewise.
7109         * video/bitmap.c: Likewise.
7111         * video/readers/tga.c: Likewise.
7113         * video/i386/pc/vbeutil.c: Likewise.
7115         * commands/videotest.c: Code cleanup and updated to reflect to new
7116         video API.
7118         * term/gfxterm.c: Likewise.
7120         * video/video.c: Likewise.
7122         * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
7123         (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
7124         (bitmap_mod_SOURCES): New entry.
7125         (bitmap_mod_CFLAGS): Likewise.
7126         (bitmap_mod_LDFLAGS): Likewise.
7127         (tga_mod_SOURCES): Likewise.
7128         (tga_mod_CFLAGS): Likewise.
7129         (tga_mod_LDFLAGS): Likewise.
7131         * include/grub/video.h (grub_video_blit_operators): New enum type.
7132         (grub_video_render_target): Changed as forward declaration and moved
7133         actual definition to be video driver specific.
7134         (grub_video_adapter.blit_bitmap): Added blitting operator.
7135         (grub_video_adapter.blit_render_target): Likewise.
7136         (grub_video_blit_bitmap): Likewise.
7137         (grub_video_blit_render_target): Likewise.
7139         * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
7140         driver specific render target definition.
7141         (grub_video_vbe_map_rgba): Added driver internal helper.
7142         (grub_video_vbe_unmap_color): Updated to use
7143         grub_video_i386_vbeblit_info.
7144         (grub_video_vbe_get_video_ptr): Likewise.
7146         * include/grub/i386/pc/vbeblit.h
7147         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
7148         grub_video_i386_vbeblit_info.
7149         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
7150         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
7151         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
7152         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
7153         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
7154         (grub_video_i386_vbeblit_index_index): Likewise.
7155         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
7156         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
7157         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
7158         (grub_video_i386_vbeblit_blend): Added generic blitter for blend
7159         operator.
7160         (grub_video_i386_vbeblit_replace): Added generic blitter for replace
7161         operator.
7163         * video/i386/pc/vbeblit.c: Updated to reflect changes on
7164         include/grub/i386/pc/vbeblit.h.
7166         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
7167         Updated to use grub_video_i386_vbeblit_info.
7168         (grub_video_i386_vbefill_R8G8B8): Likewise.
7169         (grub_video_i386_vbefill_index): Likewise.
7170         (grub_video_i386_vbefill): Added generic filler.
7172         * video/i386/pc/vbefill.c: Updated to reflect changes on
7173         include/grub/i386/pc/vbefill.h.
7175         * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
7176         grub_video_i386_vbeblit_info.
7177         (grub_video_vbe_unmap_color): Likewise.
7178         (grub_video_vbe_blit_glyph): Likewise.
7179         (grub_video_vbe_scroll): Likewise.
7180         (grub_video_vbe_draw_pixel): Removed function.
7181         (grub_video_vbe_get_pixel): Likewise.
7182         (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
7183         updated code to use it.
7184         (common_blitter): Added common blitter for render target and bitmap.
7185         (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
7186         (grub_video_vbe_blit_render_target): Likewise.
7188 2006-07-30  Johan Rydberg  <jrydberg@gnu.org>
7190         * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
7191         is in text mode if there is no console control protocol instance
7192         available.
7194 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
7196         * include/grub/video.h: Code cleanup.
7198         * include/grub/i386/pc/vbe.h: Likewise.
7200         * video/i386/pc/vbe.c: Likewise.
7202         * video/i386/pc/vbeblit.c: Likewise.
7204         * video/i386/pc/vbefill.c: Likewise.
7206         * video/video.c: Likewise.  Also added more comments.
7208 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
7210         * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
7211         (struct grub_biosdisk_dap): Likewise.
7213         * include/grub/i386/pc/biosdisk.h: ... to here.  Also corrected
7214         linkage settings for all functions.
7216 2006-07-12  Marco Gerards  <marco@gnu.org>
7218         * configure.ac (--enable-mm-debug): Fix typo.
7220         * genkernsyms.sh.in: Use proper quoting for `CC'.
7222 2006-07-02  Jeroen Dekkers  <jeroen@dekkers.cx>
7224         * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
7225         (normal_mod_ASFLAGS): Remove "-m32".
7227 2006-06-14  Yoshinori K. Okuji  <okuji@enbug.org>
7229         * util/misc.c: Include config.h.
7230         [!HAVE_MEMALIGN]: Do not include malloc.h.
7231         (grub_memalign): Use posix_memalign, if present. Then, use
7232         memalign, if present. Otherwise, emit an error.
7234         * util/grub-emu.c: Do not include malloc.h.
7236         * include/grub/util/misc.h: Include unistd.h. This is required for
7237         FreeBSD, because off_t is defined in unistd.h. Reported by Harley
7238         D. Eades III <hde@foobar-qux.org>.
7240         * configure.ac (AC_GNU_SOURCE): Added.
7241         (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
7242         type.
7244 2006-06-09  Yoshinori K. Okuji  <okuji@enbug.org>
7246         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
7247         ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
7249 2006-06-07  Jeroen Dekkers  <jeroen@dekkers.cx>
7251         * include/grub/types.h (grub_host_addr_t): Rename to
7252         grub_target_addr_t.
7253         (grub_host_off_t): Rename to grub_target_off_t.
7254         (grub_host_size_t): Rename to grub_target_size_t.
7255         (grub_host_ssize_t): Rename to grub_target_ssize_t.
7256         Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
7258         * include/grub/kernel.h (struct grub_module_header): Change type
7259         of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
7260         (grub_module_info): Likewise.
7262 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
7264         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
7265         of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
7266         Velazquez <jesus.velazquez@gmail.com>.
7268 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
7270         Count partitions from 1 instead of 0 in the string representation
7271         of partitions. Still use 0-based internally.
7273         * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
7274         (sun_partition_map_iterate): Use grub_partition_t instead of
7275         struct grub_partition *. Cast DESC->START_CYLINDER to
7276         grub_uint64_t after converting the endian.
7277         (sun_partition_map_probe): Subtract 1 for PARTNUM.
7278         (sun_partition_map_get_name): Add 1 to P->INDEX.
7280         * partmap/pc.c (grub_partition_parse): Subtract 1 for
7281         PCDATA->DOS_PART.
7282         (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
7284         * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
7285         zero instead of one.
7286         (gpt_partition_map_probe): Subtract 1 for PARTNUM.
7287         (gpt_partition_map_get_name): Add 1 into P->INDEX.
7289         * partmap/apple.c (apple_partition_map_iterate): Change the type
7290         of POS to unsigned.
7291         (apple_partition_map_probe): Subtract 1 for PARTNUM.
7292         (apple_partition_map_get_name): Add 1 into P->INDEX.
7294         * partmap/amiga.c (amiga_partition_map_iterate): Change the type
7295         of POS to unsigned.
7296         (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
7297         calculate the offset of a partition.
7298         (amiga_partition_map_probe): Subtract 1 for PARTNUM.
7299         (amiga_partition_map_get_name): Add 1 into P->INDEX.
7301         * partmap/acorn.c (acorn_partition_map_find): Change the type of
7302         SECTOR to grub_disk_addr_t.
7303         (acorn_partition_map_iterate): Likewise.
7304         (acorn_partition_map_probe): Subtract 1 for PARTNUM.
7305         Change the type of SECTOR to grub_disk_addr_t. Declare P on the
7306         top.
7307         (acorn_partition_map_get_name): Add 1 into P->INDEX.
7309         * kern/i386/pc/init.c (make_install_device): Add 1 into
7310         GRUB_INSTALL_DOS_PART.
7312         * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
7313         conditional.
7315 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
7317         Clean up the code to support 64-bit addressing in disks and
7318         files. This change is not enough for filesystems yet.
7320         * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
7321         type of "start" to grub_uint64_t.
7322         (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
7323         grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
7324         save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
7325         convert addresses.
7327         * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
7328         to grub_disk_addr_t.
7330         * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
7331         string.
7333         * partmap/pc.c (pc_partition_map_iterate): Likewise.
7335         * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
7336         to char *.
7338         * normal/script.c (grub_script_parse): Remove unused MEMFREE.
7340         * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
7342         * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
7344         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
7345         to grub_off_t, to detect an error from grub_file_seek.
7346         (grub_multiboot_load_elf32): Likewise.
7348         * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
7349         maximum unsigned long value when an overflow is detected.
7350         (grub_strtoull): New function.
7351         (grub_divmod64): Likewise.
7352         (grub_lltoa): use grub_divmod64.
7354         * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
7355         grub_disk_addr_t.
7356         (grub_fs_blocklist_open): Increase P if P is not NULL to advance
7357         the pointer to next character. Use grub_strtoull instead of
7358         grub_strtoul.
7359         (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
7360         SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
7361         respectively.
7363         * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
7364         return value is signed.
7365         (grub_file_seek): Change the type of OLD to grub_off_t. Do not
7366         test if OFFSET is less than zero, as OFFSET is unsigned now.
7368         * kern/disk.c (struct grub_disk_cache): Change the type of
7369         "sector" to grub_disk_addr_t.
7370         (grub_disk_cache_get_index): Change the type of SECTOR to
7371         grub_disk_addr_t. Calculate the hash with SECTOR casted to
7372         unsigned after shifting.
7373         (grub_disk_cache_invalidate): Change the type of SECTOR to
7374         grub_disk_addr_t.
7375         (grub_disk_cache_unlock): Likewise.
7376         (grub_disk_cache_store): Likewise.
7377         (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
7378         START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
7379         grub_disk_addr_t and grub_uint64_t, respectively.
7380         (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
7381         body, as the value of OFFSET is tweaked by
7382         grub_disk_check_range. Change the types of START_SECTOR, LEN and
7383         POS to grub_disk_addr_t, grub_size_t and grub_size_t,
7384         respectively.
7385         (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
7386         body, as the value of OFFSET is tweaked by
7387         grub_disk_check_range. Change the types of LEN and N to
7388         grub_size_t.
7390         * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
7391         and "saved_offset" to grub_off_t.
7392         (test_header): Cast BUF to char *.
7393         (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
7394         to char *.
7395         (grub_gzio_read): Change the types of OFFSET and SIZE to
7396         grub_off_t and grub_size_t, respectively.
7398         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
7399         Removed.
7400         (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
7401         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
7402         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
7403         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
7404         (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
7406         * include/grub/types.h (grub_off_t): Unconditionally set to
7407         grub_uint64_t.
7408         (grub_disk_addr_t): Changed to grub_uint64_t.
7410         * include/grub/partition.h (struct grub_partition): Change the
7411         types of "start", "len" and "offset" to grub_disk_addr_t,
7412         grub_uint64_t and grub_disk_addr_t, respectively.
7413         (grub_partition_get_start): Return grub_disk_addr_t.
7414         (grub_partition_get_len): Return grub_uint64_t.
7416         * include/grub/misc.h (grub_strtoull): New prototype.
7417         (grub_divmod64): Likewise.
7419         * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
7420         of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
7421         grub_off_t, respectively.
7422         All callers and references changed.
7424         * include/grub/fs.h (struct grub_fs): Change the type of LEN to
7425         grub_size_t in "read".
7426         All callers and references changed.
7428         * include/grub/file.h (struct grub_file): Change the types of
7429         "offset" and "size" to grub_off_t and grub_off_t,
7430         respectively. Change the type of SECTOR to grub_disk_addr_t in
7431         "read_hook".
7432         (grub_file_read): Change the type of LEN to grub_size_t.
7433         (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
7434         grub_off_t.
7435         (grub_file_size): Return grub_off_t.
7436         (grub_file_tell): Likewise.
7437         All callers and references changed.
7439         * include/grub/disk.h (struct grub_disk_dev): Change the types of
7440         SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
7441         "write".
7442         (struct grub_disk): Change the type of "total_sectors" to
7443         grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
7444         "read_hook".
7445         (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
7446         grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
7447         (grub_disk_write): Likewise.
7448         All callers and references changed.
7450         * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
7451         char * for grub_strncmp to silence gcc.
7452         (grub_iso9660_mount): Likewise.
7453         (grub_iso9660_mount): Likewise.
7454         (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
7455         return statement.
7456         (grub_iso9660_iterate_dir): Likewise.
7457         (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
7459         * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
7460         LEN to grub_disk_addr_t and grub_size_t, respectively.
7462         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
7464         * fs/jfs.c (grub_jfs_read_file): Likewise.
7466         * fs/minix.c (grub_jfs_read_file): Likewise.
7468         * fs/sfs.c (grub_jfs_read_file): Likewise.
7470         * fs/ufs.c (grub_jfs_read_file): Likewise.
7472         * fs/xfs.c (grub_jfs_read_file): Likewise.
7474         * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
7475         and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
7476         respectively.
7478         * fs/ext2.c (grub_ext2_read_block): When an error happens, set
7479         BLKNR to -1 instead of returning GRUB_ERRNO.
7480         (grub_ext2_read_file): Change the types of SECTOR and
7481         LEN to grub_disk_addr_t and grub_size_t, respectively.
7483         * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
7484         LEN to grub_disk_addr_t and grub_size_t, respectively.
7486         * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
7487         grub_file_read.
7489         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
7490         string. Do not cast SECTOR explicitly.
7492         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
7493         TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
7494         (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
7495         grub_disk_addr_t and grub_size_t, respectively. If the sector is
7496         over 2TB and LBA mode is not supported, raise an error.
7497         (get_safe_sectors): New function.
7498         (grub_biosdisk_read): Use get_safe_sectors.
7499         (grub_biosdisk_write): Likewise.
7501         * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
7502         (grub_efidisk_write): Likewise.
7504         * disk/loopback.c (delete_loopback): Cosmetic changes.
7505         (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
7506         correctly.
7507         (grub_loopback_open): Likewise.
7508         (grub_loopback_read): Likewise. Also, change the type of POS to
7509         grub_off_t, and fix the usage of grub_memset.
7511         * commands/i386/pc/play.c: Include grub/machine/time.h.
7513         * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
7514         print FILE->SIZE.
7516         * commands/configfile.c: Include grub/env.h.
7518         * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
7519         GRUB_ERRNO directly instead. Change the type of POS to
7520         grub_off_t. Follow the coding standard.
7522         * commands/blocklist.c: Include grub/partition.h.
7523         (grub_cmd_blocklist): Return an error if the underlying device is
7524         not a disk. Take the starting sector of a partition into account,
7525         if a partition is used.
7527         * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
7528         a length field.
7529         (lba_mode): Support 64-bit addresses.
7530         (chs_mode): Likewise.
7531         (copy_buffer): Adapted to the new offsets of a length field and a
7532         segment field.
7533         (blocklist_default_start): Allocate 64-bit space.
7535         * boot/i386/pc/boot.S (force_lba): Removed.
7536         (boot_drive): Moved to under KERNEL_SECTOR.
7537         (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
7538         space.
7539         (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
7540         is useless.
7541         (lba_mode): Refactored to support a 64-bit address. More size
7542         optimization.
7543         (setup_sectors): Likewise.
7545 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
7547         * DISTLIST: Added include/grub/i386/linux.h. Removed
7548         include/grub/i386/pc/linux.h
7550         * configure.ac (AC_INIT): Bumped to 1.94.
7552         * config.guess: Updated from gnulib.
7553         * config.sub: Likewise.
7554         * install-sh: Likewise.
7555         * mkinstalldirs: Likewise.
7557 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
7559         * conf/common.rmk (grub_modules_init.lst): Depended on
7560         grub_emu_SOURCES, excluding grub_emu_init.c, instead of
7561         MODSRCFILES.
7563         * genmk.rb (PModule::rule): Reverted the previous change.
7565 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
7567         * conf/common.rmk (grub_modules_init.lst): Depends on
7568         $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
7569         that the target does not exist before producing.
7570         (grub_modules_init.h): Remove the target before generating.
7571         (grub_emu_init.c): Likewise.
7573         * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
7575 2006-05-31  Jeroen Dekkers  <jeroen@dekkers.cx>
7577         * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
7578         for the target-specific tests. Make sure that we also have the
7579         up-to-date target variables for those tests.
7581 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
7583         * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
7584         (PModule::rule): Likewise.
7586 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
7588         * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
7589         TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
7590         target-specific flags should be prefixed.
7591         (PModule::rule): Likewise.
7593 2006-05-30  Yoshinori K. Okuji  <okuji@enbug.org>
7595         * configure.ac (CMP): Check if cmp is available explicitly.
7597 2006-05-29  Yoshinori K. Okuji  <okuji@enbug.org>
7599         * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
7600         (target_cpu): New variable.
7601         (pkglibdir): Use target_cpu instead of host_cpu.
7603         * util/i386/pc/grub-install.in (host_cpu): Removed.
7604         (target_cpu): New variable.
7605         (pkglibdir): Use target_cpu instead of host_cpu.
7607         * util/genmoddep.c: Removed.
7609         * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
7610         instead of GRUB_HOST_SIZEOF_VOID_P.
7611         * kern/dl.c: Likewise.
7613         * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
7614         ...
7615         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
7616         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
7617         (GRUB_TARGET_SIZEOF_LONG): ... this.
7618         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
7619         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
7620         * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
7621         to ...
7622         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
7623         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
7624         (GRUB_TARGET_SIZEOF_LONG): ... this.
7625         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
7626         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
7627         * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
7628         to ...
7629         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
7630         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
7631         (GRUB_TARGET_SIZEOF_LONG): ... this.
7632         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
7633         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
7635         * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
7636         GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
7637         [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
7638         instead of GRUB_HOST_SIZEOF_LONG.
7639         [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
7640         GRUB_HOST_WORDS_BIGENDIAN to define or undefine
7641         GRUB_CPU_WORDS_BIGENDIAN.
7642         Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
7643         define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
7644         grub_host_ssize_t.
7646         * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
7647         (genmoddep_SOURCES): Likewise.
7648         * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
7649         (genmoddep_SOURCES): Likewise.
7650         * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
7651         (genmoddep_SOURCES): Likewise.
7652         * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
7653         Likewise.
7654         (genmoddep_SOURCES): Likewise.
7656         * genmoddep.awk: New file.
7658         * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
7659         TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
7660         CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
7661         (PModule::rule): Likewise.
7662         (Program::rule): Likewise.
7663         (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
7664         BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
7665         respectively.
7667         * configure.ac: Rewritten intensively to use host and target
7668         instead of build and host, respectively.
7670         * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
7671         (host_cpu): Removed.
7672         (target_cpu): New variable.
7673         (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
7674         (BUILD_CC): Removed.
7675         (BUILD_CFLAGS): Likewise.
7676         (BUILD_CPPFLAGS): Likewise.
7677         (TARGET_CC): New variable.
7678         (TARGET_CFLAGS): Likewise.
7679         (TARGET_CPPFLAGS): Likewise.
7680         (TARGET_LDFLAGS): Likewise.
7681         (AWK): Likewise.
7682         (include): Use target_cpu instead of host_cpu.
7683         (moddep.lst:): Use genmoddep.awk instead of genmoddep.
7685         * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
7687 2006-05-29  Vesa Jaaskelainen  <chaac@nic.fi>
7689         * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
7690         'exec_to_evaluate'.  Renamed field 'true' to 'exec_on_true'.  Renamed
7691         field 'false' to 'exec_on_false'.
7692         (grub_script_create_cmdif): Renamed argument names to reflect above
7693         changes.
7695         * normal/execute.c (grub_script_execute_cmdif): Likewise.
7697         * normal/script.c (grub_script_create_cmdif): Likewise.
7699 2006-05-28  Yoshinori K. Okuji  <okuji@enbug.org>
7701         * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
7702         top.
7703         (grub_hfsplus_btree_recptr): Likewise.
7704         (grub_hfsplus_find_block): Do not take RETRY any longer. Use
7705         FILEBLOCK both to pass a block number and store next block
7706         number.
7707         (grub_hfsplus_read_block): Rewritten heavily to support an extent
7708         overflow file correctly. Specify errors appropriately, because
7709         fshelp expects that GRUB_ERRNO is set when fails. Reuse
7710         grub_hfsplus_btree_recptr to get the pointer to a found key.
7711         (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
7712         is found.
7714         * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
7715         linux.mod.
7716         (_linux_mod_SOURCES): New variable.
7717         (_linux_mod_CFLAGS): Likewise.
7718         (_linux_mod_LDFLAGS): Likewise.
7719         (linux_mod_SOURCES): Likewise.
7720         (linux_mod_CFLAGS): Likewise.
7721         (linux_mod_LDFLAGS): Likewise.
7723         * DISTLIST: Added loader/i386/efi/linux.c,
7724         loader/i386/efi/linux_normal.c and
7725         include/grub/i386/efi/loader.h.
7727         * loader/i386/efi/linux.c: New file.
7728         * loader/i386/efi/linux_normal.c: Likewise.
7729         * include/grub/i386/efi/loader.h: Likewise.
7731 2006-05-27  Yoshinori K. Okuji  <okuji@enbug.org>
7733         * commands/blocklist.c: New file.
7735         * DISTLIST: Added commands/blocklist.c.
7737         * term/efi/console.c (grub_console_highlight_color): Use a lighter
7738         color for the background, and a darker color for the foreground.
7739         (grub_console_checkkey): Return READ_KEY.
7740         (grub_console_cls): Set the background to
7741         GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
7743         * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
7745         * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
7746         the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
7748         * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
7749         prototype.
7751         * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
7752         BG. The spec is wrong again.
7754         * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
7755         prototype.
7756         [GRUB_UTIL] (grub_blocklist_fini): Likewise.
7758         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
7759         commands/blocklist.c.
7760         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7762         * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
7763         (blocklist_mod_SOURCES): New variable.
7764         (blocklist_mod_CFLAGS): Likewise.
7765         (blocklist_mod_LDFLAGS): Likewise.
7767 2006-05-20  Yoshinori K. Okuji  <okuji@enbug.org>
7769         * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
7770         duplication.
7771         (lba_mode): Use %eax more intensively to reduce the code size.
7773 2006-05-20  Marco Gerards  <marco@gnu.org>
7775         * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
7777         * normal/parser.y (commandblock): Defined as <cmd>.  A subroutine
7778         for `menuentry'.
7779         (script): Accept leading newlines.
7780         (newlines): New rule to describe 0 or more newlines.
7781         (commands): Accept `command' with trailing newline.  Fixed the
7782         order in which arguments were passed to `grub_script_add_cmd'.
7783         Accept commands separated by newlines.
7784         (function): Changed to accept newlines.
7785         (menuentry) Rewritten.
7787         * normal/script.c (grub_script_create_cmdmenu): Add new entries in
7788         front of the list, instead of to the end.
7790 2006-05-19  Yoshinori K. Okuji  <okuji@enbug.org>
7792         * util/i386/pc/grub-install.in (bindir): New variable.
7793         (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
7794         Shaver <lbgwjl@gmail.com>.
7796 2006-05-14  Yoshinori K. Okuji  <okuji@enbug.org>
7798         * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
7799         grub/machine/linux.h
7800         * loader/i386/pc/linux.c: Likewise.
7802         * include/grub/i386/pc/linux.h: Moved to ...
7803         * include/grub/i386/linux.h: ... here.
7805         * include/grub/i386/linux.h (struct linux_kernel_params): New
7806         struct.
7808 2006-05-09  Vesa Jaaskelainen  <chaac@nic.fi>
7810         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
7811         checking.
7812         (grub_video_vbe_blit_glyph): Likewise.
7813         (grub_video_vbe_blit_bitmap): Likewise.
7814         (grub_video_vbe_blit_render_target): Likewise.
7816 2006-05-09  Yoshinori K. Okuji  <okuji@enbug.org>
7818         * configure.ac (--with-platform): Properly quote the square
7819         brackets.
7821 2006-05-08  Marco Gerards  <marco@gnu.org>
7823         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
7824         this...
7825         (kernel_elf_HEADERS): ...to this.  Updated all users.
7826         (grubof_symlist.c): Renamed from this...
7827         (kernel_elf_symlist.c): ...to this.  Updated all users.
7828         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
7829         (grubof_SOURCES): Renamed from this...
7830         (kernel_elf_SOURCES): ...to this.
7831         (grubof_HEADERS): Renamed from this...
7832         (kernel_elf_HEADERS): ...to this.
7833         (grubof_CFLAGS): Renamed from this...
7834         (kernel_elf_CFLAGS): ...to this.
7835         (grubof_ASFLAGS): Renamed from this...
7836         (kernel_elf_ASFLAGS): ...to this.
7837         (grubof_LDFLAGS): Renamed from this...
7838         (kernel_elf_LDFLAGS): ...to this.
7840         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
7841         this...
7842         (kernel_elf_HEADERS): ...to this.  Updated all users.
7843         (grubof_symlist.c): Renamed from this...
7844         (kernel_elf_symlist.c): ...to this.  Updated all users.
7845         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
7846         (grubof_SOURCES): Renamed from this...
7847         (kernel_elf_SOURCES): ...to this.
7848         (grubof_HEADERS): Renamed from this...
7849         (kernel_elf_HEADERS): ...to this.
7850         (grubof_CFLAGS): Renamed from this...
7851         (kernel_elf_CFLAGS): ...to this.
7852         (grubof_ASFLAGS): Renamed from this...
7853         (kernel_elf_ASFLAGS): ...to this.
7854         (grubof_LDFLAGS): Renamed from this...
7855         (kernel_elf_LDFLAGS): ...to this.
7857         * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
7858         `kernel.elf' instead of `grubof'.
7860 2006-05-08  Yoshinori K. Okuji  <okuji@enbug.org>
7862         Add --with-platform to configure. Use pkglibdir instead of
7863         pkgdatadir. This is reported by Roger Leigh.
7865         * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
7866         (host_vendor): Likewise.
7867         (host_os): Likewise.
7868         (pkgdatadir): Likewise.
7869         (platform): New variable.
7870         (pkglibdir): Likewise.
7871         Use PKGLIBDIR instead of PKGDATADIR.
7873         * util/i386/pc/grub-install.in (datadir): Removed.
7874         (host_vendor): Likewise.
7875         (host_os): Likewise.
7876         (pkgdatadir): Likewise.
7877         (platform): New variable.
7878         (pkglibdir): Likewise.
7879         Use PKGLIBDIR instead of PKGDATADIR.
7881         * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
7882         instead of GRUB_DATADIR.
7883         (main): Likewise.
7884         * util/i386/pc/grub-mkimage.c (usage): Likewise.
7885         (main): Likewise.
7886         * util/i386/efi/grub-mkimage.c (usage): Likewise.
7887         (main): Likewise.
7889         * configure.ac (--with-platform): New option.
7890         Use PLATFORM instead of HOST_VENDOR to specify a platform.
7892         * Makefile.in: Include a makefile based on PLATFORM instead of
7893         HOST_VENDOR.
7894         (pkgdatadir): Not appended by the machine type.
7895         (pkglibdir): Appended by the machine type.
7896         (host_vendor): Removed.
7897         (platform): New variable.
7898         (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
7899         (install-local): Use PKGLIBDIR instead of PKGDATADIR.
7900         (uninstall): Likewise.
7902 2006-05-07  Yoshinori K. Okuji  <okuji@enbug.org>
7904         Use the environment context in the menu. Remove the commands
7905         "default" and "timeout", and use variables instead.
7907         * normal/menu.c: Include grub/env.h.
7908         (print_entry): Cast TITLE to silence gcc.
7909         (get_timeout): New function.
7910         (set_timeout): Likewise.
7911         (get_entry_number): Likewise.
7912         (run_menu): Use a default entry, a fallback entry and a timeout
7913         in the environment variables "default", "fallback" and
7914         "timeout". Also, tweak the default entry if it is not within the
7915         current menu entries.
7916         (grub_menu_run): Use a fallback entry in the environment variable
7917         "fallback".
7919         * normal/main.c (read_config_file): Do not initialize
7920         NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
7921         NEWMENU->TIMEOUT.
7922         (grub_normal_execute): Use a data slot to store the menu.
7924         * include/grub/normal.h (struct grub_menu): Removed default_entry,
7925         fallback_entry and timeout.
7926         (struct grub_menu_list): Removed.
7927         (grub_menu_list_t): Likewise.
7928         (struct grub_context): Likewise.
7929         (grub_context_t): Likewise.
7930         (grub_context_get): Likewise.
7931         (grub_context_get_current_menu): Likewise.
7932         (grub_context_push_menu): Likewise.
7933         (grub_context_pop_menu): Likewise.
7934         (grub_default_init): Likewise.
7935         (grub_default_fini): Likewise.
7936         (grub_timeout_init): Likewise.
7937         (grub_timeout_fini): Likewise.
7939         * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
7940         and timeout.mod.
7941         (normal_mod_SOURCES): Removed normal/context.c.
7943         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
7944         commands/default.c, commands/timeout.c and normal/context.c.
7945         (normal_mod_SOURCES): Removed normal/context.c.
7947         * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
7948         commands/timeout.c and normal/context.c.
7949         (normal_mod_SOURCES): Removed normal/context.c.
7951         * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
7952         commands/default.c, commands/timeout.c and normal/context.c.
7953         (normal_mod_SOURCES): Removed normal/context.c.
7955         * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
7956         timeout.mod.
7957         (default_mod_SOURCES): Removed.
7958         (default_mod_CFLAGS): Likewise.
7959         (default_mod_LDFLAGS): Likewise.
7960         (timeout_mod_SOURCES): Removed.
7961         (timeout_mod_CFLAGS): Likewise.
7962         (timeout_mod_LDFLAGS): Likewise.
7964         * DISTLIST: Removed commands/default.c, commands/timeout.c and
7965         normal/context.c.
7967         * commands/default.c: Removed.
7968         * commands/timeout.c: Likewise.
7969         * normal/context.c: Likewise.
7971 2006-05-07  Vesa Jaaskelainen  <chaac@nic.fi>
7973         * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
7975 2006-05-02  Yoshinori K. Okuji  <okuji@enbug.org>
7977         * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
7978         "next" to "prev" for readability.
7979         (struct grub_env_sorted_var): New struct.
7980         (grub_env_context): Renamed to ...
7981         (initial_context): ... this.
7982         (grub_env_var_context): Renamed to ...
7983         (current_context): ... this.
7984         (grub_env_find): Look only at CURRENT_CONTEXT.
7985         (grub_env_context_open): Rewritten to copy exported variables from
7986         previous context.
7987         (grub_env_context_close): Rewritten according to the new
7988         scheme. Also, add an assertion to prevent the initial context from
7989         removed.
7990         (grub_env_insert): Removed the code for the sorted list.
7991         (grub_env_remove): Likewise.
7992         (grub_env_export): Simply mark the variable with
7993         GRUB_ENV_VAR_GLOBAL.
7994         (grub_env_set): A cosmetic change for naming consistency.
7995         (grub_env_get): Likewise.
7996         (grub_env_unset): Likewise.
7997         (grub_env_iterate): Rewritten to sort variables within this
7998         function.
7999         (grub_register_variable_hook): Fixed for naming consistency. Call
8000         grub_env_find again, only if NAME is not found at the first time.
8001         (mangle_data_slot_name): New function.
8002         (grub_env_set_data_slot): Likewise.
8003         (grub_env_get_data_slot): Likewise.
8004         (grub_env_unset_data_slot): Likewise.
8006         * include/grub/env.h (grub_env_var_type): New enum.
8007         (GRUB_ENV_VAR_LOCAL): New constant.
8008         (GRUB_ENV_VAR_GLOBAL): Likewise.
8009         (GRUB_ENV_VAR_DATA): Likewise.
8010         (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
8011         "type".
8012         (grub_env_set): Replace VAR with NAME for consistency.
8013         (grub_register_variable_hook): Likewise.
8014         (grub_env_export): Specify the name of the argument.
8015         (grub_env_set_data_slot): New prototype.
8016         (grub_env_get_data_slot): Likewise.
8017         (grub_env_unset_data_slot): Likewise.
8019 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
8021         Extend the loader so that GRUB can accept a loader which comes
8022         back to GRUB when a loaded image exits. Also, this change adds
8023         support for a chainloader on EFI.
8025         * term/efi/console.c: Include grub/misc.h.
8026         (grub_console_checkkey): Display a scan code on the top for
8027         debugging. This will be removed once the EFI port gets stable.
8028         Correct the scan code mapping.
8030         * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
8031         allocate memory from larger regions, in order to reduce the number
8032         of allocated regions. Otherwise, the MacOSX loader panics.
8033         (filter_memory_map): Avoid less than 1MB for compatibility with
8034         other loaders.
8035         (add_memory_regions): Allocate from the tail of a region, if
8036         possible, to avoid allocating a region near to 1MB, for the MacOSX
8037         loader.
8039         * kern/efi/init.c (grub_efi_set_prefix): Specify
8040         GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
8042         * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
8043         argument IMAGE_HANDLE and specify it to get a loaded image.
8044         (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
8045         grub_efi_get_loaded_image.
8046         (grub_efi_get_filename): Divide the length by the size of
8047         grub_efi_char16_t.
8048         (grub_efi_get_device_path): New function.
8049         (grub_efi_print_device_path): Print End Device Path nodes. Divide
8050         the length by the size of grub_efi_char16_t for a file path device
8051         path node.
8053         * kern/loader.c (grub_loader_noreturn): New variable.
8054         (grub_loader_set): Accept a new argument NORETURN. Set
8055         GRUB_LOADER_NORETURN to NORETURN.
8056         All callers changed.
8057         (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
8058         grub_machine_fini.
8060         * include/grub/efi/efi.h (grub_efi_get_device_path): New
8061         prototype.
8062         (grub_efi_get_loaded_image): Take an argument to specify an image
8063         handle.
8065         * include/grub/loader.h (grub_loader_set): Added one more argument
8066         NORETURN.
8068         * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
8069         instead of grub_efi_open_protocol.
8070         (grub_efidisk_get_device_name): Likewise.
8071         (grub_efidisk_close): Print a newline.
8072         (grub_efidisk_get_device_handle): Fixed to use
8073         GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
8074         GRUB_EFI_DEVICE_PATH_TYPE.
8076         * disk/efi/efidisk.c (device_path_guid): Moved to ...
8077         * kern/efi/efi.c (device_path_guid): ... here.
8079         * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
8080         chain.mod.
8081         (kernel_mod_HEADERS): Added efi/disk.h.
8082         (_chain_mod_SOURCES): New variable.
8083         (_chain_mod_CFLAGS): Likewise.
8084         (_chain_mod_LDFLAGS): Likewise.
8085         (chain_mod_SOURCES): Likewise.
8086         (chain_mod_CFLAGS): Likewise.
8087         (chain_mod_LDFLAGS): Likewise.
8089         * DISTLIST: Added include/grub/efi/chainloader.h,
8090         loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
8092         * include/grub/efi/chainloader.h: New file.
8093         * loader/efi/chainloader.c: Likewise.
8094         * loader/efi/chainloader_normal.c: Likewise.
8096 2006-04-30  Marco Gerards  <marco@gnu.org>
8098         * commands/configfile.c (grub_cmd_source): New function.
8099         (GRUB_MOD_INIT): Register the commands `source' and `.'.
8100         (GRUB_MOD_FINI): De-register the commands `source' and `.'.
8102 2006-04-30  Marco Gerards  <marco@gnu.org>
8104         * normal/execute.c (grub_script_execute_cmd): Change the return
8105         type to `grub_err_t'.  Correctly return the error.
8106         (grub_script_execute_cmdline): In case a command line is not a
8107         command or a function, try to interpret it as an assignment.
8109 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
8111         * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
8112         (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
8113         skip a node whose name is obviously invalid as UTF-16,
8114         i.e. contains a NUL character. Stop the iteration when the last
8115         directory entry is found. Instead of using the return value of
8116         grub_hfsplus_btree_iterate_node, store the value in RET and use
8117         it, because the iterator can be stopped by the last directory
8118         entry.
8120 2006-04-30  Marco Gerards  <marco@gnu.org>
8122         * include/grub/env.h (grub_env_export): New prototype.  Reported
8123         by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
8125 2006-04-30  Marco Gerards  <marco@gnu.org>
8127         * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
8128         size of the extents in a catalog file record.
8130 2006-04-29  Marco Gerards  <marco@gnu.org>
8132         * commands/configfile.c (grub_cmd_configfile): Execute the
8133         configfile within its own context.
8135         * include/grub/env.h (grub_env_context_open): New prototype.
8136         (grub_env_context_close): Likewise.
8138         * kern/env.c (grub_env): Removed.
8139         (grub_env_sorted): Likewise.
8140         (grub_env_context): New variable.
8141         (grub_env_var_context): Likewise.
8142         (grub_env_find): Search both the active context and the global
8143         context.
8144         (grub_env_context_open): New function.
8145         (grub_env_context_close): Likewise.
8146         (grub_env_insert): Likewise.
8147         (grub_env_remove): Likewise.
8148         (grub_env_export): Likewise.
8149         (grub_env_set): Changed to use helper functions to avoid code
8150         duplication.
8151         (grub_env_iterate): Rewritten so both the current context and the
8152         global context are being used.
8154         * normal/command.c (export_command): New function.
8155         (grub_command_init): Register the `export' function.
8157 2006-04-26  Yoshinori K. Okuji  <okuji@enbug.org>
8159         * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
8160         explicitly to suppress gcc's warnings.
8161         * fs/fat.c (grub_fat_find_dir): Likewise.
8162         (grub_fat_label): Likewise.
8163         * fs/xfs.c (grub_xfs_read_inode): Likewise.
8164         (grub_xfs_mount): Likewise.
8165         (grub_xfs_label): Likewise.
8166         * fs/affs.c (grub_affs_mount): Likewise.
8167         (grub_affs_label): Likewise.
8168         (grub_affs_iterate_dir): Likewise.
8169         * fs/sfs.c (grub_sfs_mount): Likewise.
8170         (grub_sfs_iterate_dir): Likewise.
8171         * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
8172         * fs/hfs.c (grub_hfs_mount): Likewise.
8173         (grub_hfs_cmp_catkeys): Likewise.
8174         (grub_hfs_find_dir): Likewise.
8175         (grub_hfs_dir): Likewise.
8176         (grub_hfs_label): Likewise.
8177         * fs/jfs.c (grub_jfs_mount): Likewise.
8178         (grub_jfs_opendir): Likewise.
8179         (grub_jfs_getent): Likewise.
8180         (grub_jfs_lookup_symlink): Likewise.
8181         (grub_jfs_label): Likewise.
8182         * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
8183         (grub_hfsplus_iterate_dir): Likewise.
8184         (grub_hfsplus_btree_iterate_node): Made static.
8186         * util/grub-emu.c (prefix): New variable.
8187         (grub_machine_set_prefix): New function.
8188         (main): Do not set the environment variable "prefix" here. Only
8189         set PREFIX, which is used later by grub_machine_set_prefix.
8191         * include/grub/video.h: Do not include grub/symbol.h.
8192         (grub_video_register): Not exported. This symbol is not defined in
8193         the kernel.
8194         (grub_video_unregister): Likewise.
8195         (grub_video_iterate): Likewise.
8196         (grub_video_setup): Likewise.
8197         (grub_video_restore): Likewise.
8198         (grub_video_get_info): Likewise.
8199         (grub_video_get_blit_format): Likewise.
8200         (grub_video_set_palette): Likewise.
8201         (grub_video_get_palette): Likewise.
8202         (grub_video_set_viewport): Likewise.
8203         (grub_video_get_viewport): Likewise.
8204         (grub_video_map_color): Likewise.
8205         (grub_video_map_rgb): Likewise.
8206         (grub_video_map_rgba): Likewise.
8207         (grub_video_fill_rect): Likewise.
8208         (grub_video_blit_glyph): Likewise.
8209         (grub_video_blit_bitmap): Likewise.
8210         (grub_video_blit_render_target): Likewise.
8211         (grub_video_scroll): Likewise.
8212         (grub_video_swap_buffers): Likewise.
8213         (grub_video_create_render_target): Likewise.
8214         (grub_video_delete_render_target): Likewise.
8215         (grub_video_set_active_render_target): Likewise.
8217         * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
8218         Undefined.
8219         [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
8221         * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
8222         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
8223         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
8224         instead of $(srcdir)/genkernsyms.sh.
8226         * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
8227         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
8228         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
8229         instead of $(srcdir)/genkernsyms.sh.
8231         * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
8232         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
8233         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
8234         instead of $(srcdir)/genkernsyms.sh.
8236         * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
8237         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
8238         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
8239         instead of $(srcdir)/genkernsyms.sh.
8241         * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
8242         genkernsyms.sh.
8244         * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
8245         genkernsyms.sh.
8246         (gensymlist.sh): New target.
8247         (genkernsyms.sh): Likewise.
8249         * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
8250         genkernsyms.sh.in and gensymlist.sh.in.
8252         * genkernsyms.sh: Removed.
8253         * gensymlist.sh: Likewise.
8255         * genkernsyms.sh.in: New file.
8256         * gensymlist.sh.in: Likewise.
8258 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
8260         * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
8261         clobber "prefix", since we may have already set it manually.
8263 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
8265         * kern/misc.c (abort): New alias for grub_abort.
8267 2006-04-25  Yoshinori K. Okuji  <okuji@enbug.org>
8269         A new machine-specific function "grub_machine_set_prefix" is
8270         defined. This is called after loading modules, so that a prefix
8271         initialization can use modules. Also, this change adds an
8272         intensive debugging feature for the memory manager via the
8273         configure option "--enable-mm-debug".
8275         * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
8276         PART.LEN.
8278         * kern/sparc64/ieee1275/init.c (abort): Removed.
8279         (grub_stop): Likewise.
8280         (grub_exit): New function.
8281         (grub_set_prefix): Renamed to ...
8282         (grub_machine_set_prefix): ... this.
8283         (grub_machine_init): Do not call grub_set_prefix.
8285         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
8286         (grub_machine_set_prefix): ... this.
8287         (grub_machine_init): Do not call grub_set_prefix.
8289         * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
8290         (grub_machine_init): Do not set the prefix here.
8292         * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
8294         * kern/efi/init.c: Include grub/mm.h.
8295         (grub_efi_set_prefix): New function.
8297         * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
8298         (grub_efi_get_filename): New function.
8299         (grub_print_device_path): Renamed to ...
8300         (grub_efi_print_device_path): ... this.
8302         * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
8303         [MM_DEBUG] (grub_realloc): Likewise.
8304         [MM_DEBUG] (grub_free): Likewise.
8305         [MM_DEBUG] (grub_memalign): Likewise.
8306         [MM_DEBUG] (grub_mm_debug): New variable.
8307         [MM_DEBUG] (grub_debug_malloc): New function.
8308         [MM_DEBUG] (grub_debug_free): New function.
8309         [MM_DEBUG] (grub_debug_realloc): New function.
8310         [MM_DEBUG] (grub_debug_memalign): New function.
8312         * kern/misc.c (grub_abort): Print a newline to distinguish
8313         the message.
8315         * kern/main.c (grub_main): Call grub_machine_set_prefix and
8316         grub_set_root_dev after loading modules. This is necessary when
8317         setting a prefix depends on modules.
8319         * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
8320         (grub_efi_print_device_path): ... this.
8321         (grub_efi_get_filename): New prototype.
8322         (grub_efi_set_prefix): Likewise.
8324         * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
8325         and grub/disk.h.
8326         (grub_efidisk_get_device_handle): New prototype.
8327         (grub_efidisk_get_device_name): Likewise.
8329         * include/grub/mm.h: Include config.h.
8330         (MM_DEBUG): Removed.
8331         [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
8332         [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
8333         [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
8334         [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
8335         [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
8336         [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
8337         [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
8338         [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
8339         [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
8341         * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
8343         * disk/efi/efidisk.c: Include grub/partition.h.
8344         (iterate_child_devices): New function.
8345         (add_device): First, compare only last device path nodes, so that
8346         devices are sorted by the types.
8347         (grub_efidisk_get_device_handle): New function.
8348         (grub_efidisk_get_device_name): Likewise.
8350         * configure.ac (--enable-mm-debug): New option to enable the
8351         memory manager debugging feature. This makes the binary much
8352         bigger, so is disabled by default.
8354 2006-04-23  Yoshinori K. Okuji  <okuji@enbug.org>
8356         Use grub_abort instead of grub_stop, and grub_exit must be
8357         define in each architecture now. Also, this change adds support
8358         for EFI disks.
8360         * util/i386/pc/grub-probefs.c: Include grub/term.h.
8361         (grub_getkey): New function.
8362         (grub_term_get_current): Likewise.
8364         * util/i386/pc/grub-setup.c: Include grub/term.h.
8365         (grub_getkey): New function.
8366         (grub_term_get_current): Likewise.
8368         * util/misc.c (grub_stop): Renamed to ...
8369         (grub_exit): ... this.
8371         * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
8372         (grub_exit): ... this.
8373         (grub_machine_init): Use grub_abort instead of abort.
8374         (grub_stop): Removed.
8376         * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
8377         abort.
8379         * kern/i386/pc/startup.S (grub_exit): New function.
8380         (cold_reboot): New label.
8382         * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
8383         (grub_efi_init): Call grub_efidisk_init.
8384         (grub_efi_fini): Call grub_efidisk_fini.
8386         * kern/efi/efi.c: Include grub/mm.h.
8387         (grub_efi_console_control_guid): Renamed to ...
8388         (console_control_guid): ... this.
8389         (grub_efi_loaded_image_guid): Renamed to ...
8390         (loaded_image_guid): ... this.
8391         (grub_efi_locate_handle): New function.
8392         (grub_efi_open_protocol): Likewise.
8393         (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
8394         GRUB_EFI_CONSOLE_CONTROL_GUID.
8395         (grub_efi_exit): Removed.
8396         (grub_stop): Likewise.
8397         (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
8398         (grub_exit): New function.
8399         (grub_print_device_path): Likewise.
8401         * kern/rescue.c (grub_rescue_cmd_exit): New function.
8402         (grub_enter_rescue_mode): Register "exit".
8404         * kern/misc.c (grub_real_dprintf): A cosmetic change.
8405         (grub_abort): New function.
8407         * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
8409         * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
8411         * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
8413         * include/grub/efi/efi.h (grub_efi_exit): Removed.
8414         (grub_print_device_path): New prototype.
8415         (grub_efi_locate_handle): Likewise.
8416         (grub_efi_open_protocol): Likewise.
8418         * include/grub/efi/disk.h (grub_efidisk_fini): New file.
8419         * disk/efi/efidisk.c: Likewise.
8421         * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
8423         * include/grub/efi/console_control.h
8424         (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
8426         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
8427         last 8 bytes as an array.
8428         (GRUB_EFI_DISK_IO_GUID): New macro.
8429         (GRUB_EFI_BLOCK_IO_GUID): Likewise.
8430         (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
8431         (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
8432         grub_uint8_t.
8433         (struct grub_efi_guid): Use an array to specify the last 8 bytes.
8434         (struct grub_efi_device_path): Rename the member "sub_type" to
8435         "subtype".
8436         (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
8437         (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
8438         (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
8439         (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
8440         (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
8441         (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
8442         (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
8443         (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
8444         (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
8445         (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
8446         (struct grub_efi_pci_device_path): New structure.
8447         (grub_efi_pci_device_path_t): New type.
8448         (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
8449         (struct grub_efi_pccard_device_path): New structure.
8450         (grub_efi_pccard_device_path_t): New type.
8451         (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
8452         (struct grub_efi_memory_mapped_device_path): New structure.
8453         (grub_efi_memory_mapped_device_path_t): New type.
8454         (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
8455         (struct grub_efi_vendor_device_path): New structure.
8456         (grub_efi_vendor_device_path_t): New type.
8457         (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
8458         (struct grub_efi_controller_device_path): New structure.
8459         (grub_efi_controller_device_path_t): New type.
8460         (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
8461         (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
8462         (struct grub_efi_acpi_device_path): New structure.
8463         (grub_efi_acpi_device_path_t): New type.
8464         (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
8465         (struct grub_efi_expanded_acpi_device_path): New structure.
8466         (grub_efi_expanded_acpi_device_path_t): New type.
8467         (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
8468         (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
8469         (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
8470         (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
8471         (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
8472         (struct grub_efi_atapi_device_path): New structure.
8473         (grub_efi_atapi_device_path_t): New type.
8474         (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
8475         (struct grub_efi_fibre_channel_device_path): New structure.
8476         (grub_efi_fibre_channel_device_path_t): New type.
8477         (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
8478         (struct grub_efi_1394_device_path): New structure.
8479         (grub_efi_1394_device_path_t): New type.
8480         (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
8481         (struct grub_efi_usb_device_path): New structure.
8482         (grub_efi_usb_device_path_t): New type.
8483         (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
8484         (struct grub_efi_usb_class_device_path): New structure.
8485         (grub_efi_usb_class_device_path_t): New type.
8486         (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
8487         (struct grub_efi_i2o_device_path): New structure.
8488         (grub_efi_i2o_device_path_t): New type.
8489         (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
8490         (struct grub_efi_mac_address_device_path): New structure.
8491         (grub_efi_mac_address_device_path_t): New type.
8492         (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
8493         (struct grub_efi_ipv4_device_path): New structure.
8494         (grub_efi_ipv4_device_path_t): New type.
8495         (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
8496         (struct grub_efi_ipv6_device_path): New structure.
8497         (grub_efi_ipv6_device_path_t): New type.
8498         (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
8499         (struct grub_efi_infiniband_device_path): New structure.
8500         (grub_efi_infiniband_device_path_t): New type.
8501         (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
8502         (struct grub_efi_uart_device_path): New structure.
8503         (grub_efi_uart_device_path_t): New type.
8504         (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
8505         (struct grub_efi_vendor_messaging_device_path): New structure.
8506         (grub_efi_vendor_messaging_device_path_t): New type.
8507         (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
8508         (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
8509         (struct grub_efi_hard_drive_device_path): New structure.
8510         (grub_efi_hard_drive_device_path_t): New type.
8511         (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
8512         (struct grub_efi_cdrom_device_path): New structure.
8513         (grub_efi_cdrom_device_path_t): New type.
8514         (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
8515         (struct grub_efi_vendor_media_device_path): New structure.
8516         (grub_efi_vendor_media_device_path_t): New type.
8517         (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
8518         (struct grub_efi_file_path_device_path): New structure.
8519         (grub_efi_file_path_device_path_t): New type.
8520         (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
8521         (struct grub_efi_protocol_device_path): New structure.
8522         (grub_efi_protocol_device_path_t): New type.
8523         (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
8524         (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
8525         (struct grub_efi_bios_device_path): New structure.
8526         (grub_efi_bios_device_path_t): New type.
8527         (struct grub_efi_disk_io): New structure.
8528         (grub_efi_disk_io_t): New type.
8529         (struct grub_efi_block_io_media): New structure.
8530         (grub_efi_block_io_media_t): New type.
8531         (struct grub_efi_block_io): New structure.
8532         (grub_efi_block_io_t): New type.
8534         * include/grub/misc.h (grub_stop): Removed.
8535         (grub_exit): New prototype.
8536         (grub_abort): Likewise.
8538         * include/grub/disk.h (enum grub_disk_dev_id): Added
8539         GRUB_DISK_DEVICE_EFIDISK_ID.
8541         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
8542         disk/efi/efidisk.c.
8543         (kernel_syms.lst): Remove the target if an error occurs.
8545 2006-04-22  Yoshinori K. Okuji  <okuji@enbug.org>
8547         * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
8548         as it was simply too buggy.
8550 2006-04-21  Yoshinori K. Okuji  <okuji@enbug.org>
8552         * kern/misc.c (grub_lltoa): New function.
8553         (grub_vsprintf): Added support for the long long suffix,
8554         i.e. "ll".
8556 2006-04-20  Hollis Blanchard  <hollis@penguinppc.org>
8558         * Makefile.in (LDFLAGS): Add variable.
8559         (LD): Remove variable.
8560         * configure.ac: Add -m32 to LDFLAGS.
8561         * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
8562         * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
8563         (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
8564         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
8565         suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
8566         variables.
8567         * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
8568         * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
8569         * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
8571 2006-04-20  Vesa Jaaskelainen  <chaac@nic.fi>
8573         * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
8574         length for unknown glyph.
8576 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
8578         Add support for pre-loaded modules into the EFI port.
8580         * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
8581         completely. Accept one more argument DIR. The caller has changed.
8583         * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
8585         * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
8586         (grub_efi_loaded_image_guid): New variable.
8587         (grub_efi_get_loaded_image): New function.
8588         (grub_arch_modules_addr): Likewise.
8590         * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
8591         prototype.
8593         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
8594         (struct grub_efi_loaded_image): New structure.
8595         (grub_efi_loaded_image_t): New type.
8597 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
8599         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
8600         size with GRUB_OS_AREA_SIZE as grub_size_t instead of
8601         grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
8603 2006-04-19  Roger Leigh  <rleigh@whinlatter.ukfsn.org>
8605         * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
8607 2006-04-19  Yoshinori K. Okuji  <okuji@enbug.org>
8609         * DISTLIST: Added include/grub/efi/console.h,
8610         include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
8611         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
8613         * include/grub/efi/console.h: New file.
8614         * include/grub/efi/time.h: Likewise.
8615         * include/grub/i386/efi/kernel.h: Likewise.
8616         * kern/efi/init.c: Likewise.
8617         * kern/efi/mm.c: Likewise.
8618         * term/efi/console.c: Likewise.
8620         * kern/i386/efi/init.c: Do not include grub/machine/time.h.
8621         (grub_stop): Removed.
8622         (grub_get_rtc): Likewise.
8623         (grub_machine_init): Simply call grub_efi_init.
8624         (grub_machine_fini): Call grub_efi_fini.
8626         * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
8627         (grub_efi_output_string): Removed.
8628         (grub_efi_stall): New function.
8629         (grub_stop): Likewise.
8630         (grub_get_rtc): Likewise.
8632         * include/grub/efi/efi.h (grub_efi_output_string): Removed.
8633         (grub_efi_stall): New prototype.
8634         (grub_efi_allocate_pages): Likewise.
8635         (grub_efi_free_pages): Likewise.
8636         (grub_efi_get_memory_map): Likewise.
8637         (grub_efi_mm_init): Likewise.
8638         (grub_efi_mm_fini): Likewise.
8639         (grub_efi_init): Likewise.
8640         (grub_efi_fini): Likewise.
8642         * include/grub/i386/efi/time.h: Do not include
8643         grub/symbol.h. Include grub/efi/time.h.
8644         (GRUB_TICKS_PER_SECOND): Removed.
8645         (grub_get_rtc): Likewise.
8647         * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
8648         Added padding. The EFI spec is buggy.
8649         (GRUB_EFI_BLACK): New macro.
8650         (GRUB_EFI_BLUE): Likewise.
8651         (GRUB_EFI_GREEN): Likewise.
8652         (GRUB_EFI_CYAN): Likewise.
8653         (GRUB_EFI_RED): Likewise.
8654         (GRUB_EFI_MAGENTA): Likewise.
8655         (GRUB_EFI_BROWN): Likewise.
8656         (GRUB_EFI_LIGHTGRAY): Likewise.
8657         (GRUB_EFI_BRIGHT): Likewise.
8658         (GRUB_EFI_DARKGRAY): Likewise.
8659         (GRUB_EFI_LIGHTBLUE): Likewise.
8660         (GRUB_EFI_LIGHTGREEN): Likewise.
8661         (GRUB_EFI_LIGHTCYAN): Likewise.
8662         (GRUB_EFI_LIGHTRED): Likewise.
8663         (GRUB_EFI_LIGHTMAGENTA): Likewise.
8664         (GRUB_EFI_YELLOW): Likewise.
8665         (GRUB_EFI_WHITE): Likewise.
8666         (GRUB_EFI_BACKGROUND_BLACK): Likewise.
8667         (GRUB_EFI_BACKGROUND_BLUE): Likewise.
8668         (GRUB_EFI_BACKGROUND_GREEN): Likewise.
8669         (GRUB_EFI_BACKGROUND_CYAN): Likewise.
8670         (GRUB_EFI_BACKGROUND_RED): Likewise.
8671         (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
8672         (GRUB_EFI_BACKGROUND_BROWN): Likewise.
8673         (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
8674         (GRUB_EFI_TEXT_ATTR): Likewise.
8676         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
8677         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
8678         (kernel_mod_HEADERS): Added efi/time.h.
8680 2006-04-18  Yoshinori K. Okuji  <okuji@enbug.org>
8682         * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
8683         include/grub/efi/api.h, include/grub/efi/console_control.h,
8684         include/grub/efi/efi.h, include/grub/efi/pe32.h,
8685         include/grub/i386/efi/time.h, kern/efi/efi.c,
8686         kern/i386/efi/init.c, kern/i386/efi/startup.S,
8687         and util/i386/efi/grub-mkimage.c.
8689         * Makefile.in (RMKFILES): Added i386-efi.rmk.
8691         * genmk.rb (PModule#rule): Do not export symbols if
8692         #{prefix}_EXPORTS is set to "no".
8694         * conf/i386-efi.mk: New file.
8695         * conf/i386-efi.rmk: Likewise.
8696         * include/grub/efi/api.h: Likewise.
8697         * include/grub/efi/console_control.h: Likewise.
8698         * include/grub/efi/efi.h: Likewise.
8699         * include/grub/efi/pe32.h: Likewise.
8700         * include/grub/i386/efi/time.h: Likewise.
8701         * kern/efi/efi.c: Likewise.
8702         * kern/i386/efi/init.c: Likewise.
8703         * kern/i386/efi/startup.S: Likewise.
8704         * util/i386/efi/grub-mkimage.c: Likewise.
8706 2006-04-17  Marco Gerards  <marco@gnu.org>
8708         * include/grub/script.h: Include <grub/parser.h> and
8709         "grub_script.tab.h".
8710         (struct grub_lexer_param): New struct.
8711         (struct grub_parser_param): Likewise.
8712         (grub_script_create_arglist): Pass the state in an argument.
8713         (grub_script_add_arglist): Likewise.
8714         (grub_script_create_cmdline): Likewise.
8715         (grub_script_create_cmdblock): Likewise.
8716         (grub_script_create_cmdif): Likewise.
8717         (grub_script_create_cmdmenu): Likewise.
8718         (grub_script_add_cmd): Likewise.
8719         (grub_script_arg_add): Likewise.
8720         (grub_script_lexer_ref): Likewise.
8721         (grub_script_lexer_deref): Likewise.
8722         (grub_script_lexer_record_start): Likewise.
8723         (grub_script_lexer_record_stop): Likewise.
8724         (grub_script_mem_record): Likewise.
8725         (grub_script_mem_record_stop): Likewise.
8726         (grub_script_malloc): Likewise.
8727         (grub_script_yylex): Likewise.
8728         (grub_script_yyparse): Likewise.
8729         (grub_script_yyerror): Likewise.
8730         (grub_script_yylex): Likewise.
8731         (grub_script_lexer_init): Return the state.
8733         * normal/lexer.c (grub_script_lexer_state): Removed variable.
8734         (grub_script_lexer_done): Likewise.
8735         (grub_script_lexer_getline): Likewise.
8736         (grub_script_lexer_refs): Likewise.
8737         (script): Likewise.
8738         (newscript): Likewise.
8739         (record): Likewise.
8740         (recording): Likewise.
8741         (recordpos): Likewise.
8742         (recordlen): Likewise.
8743         (grub_script_lexer_init): Return the state instead of setting
8744         global variables.
8745         (grub_script_lexer_ref): Use the newly added argument for state
8746         instead of globals.
8747         (grub_script_lexer_deref): Likewise.
8748         (grub_script_lexer_record_start): Likewise.
8749         (grub_script_lexer_record_stop): Likewise.
8750         (recordchar): Likewise.
8751         (nextchar): Likewise.
8752         (grub_script_yylex2): Likewise.
8753         (grub_script_yylex): Likewise.
8754         (grub_script_yyerror): Likewise.
8756         * normal/parser.y (func_mem): Removed variable.
8757         (menu_entry): Likewise.
8758         (err): Likewise.
8759         (%lex-param): New parser option.
8760         (%parse-param): Likewise.
8761         (script): Always return the AST.
8762         (argument): Pass the state around.
8763         (arguments): Likewise.
8764         (grubcmd): Likewise.
8765         (commands): Likewise.
8766         (function): Likewise.
8767         (menuentry): Likewise.
8768         (if_statement): Likewise.
8769         (if): Likewise.
8771         * normal/script.c (grub_script_memused): Removed variable.
8772         (grub_script_parsed): Likewise.
8773         (grub_script_malloc): Added a state argument.  Use that instead of
8774         global variables.
8775         (grub_script_mem_record): Likewise.
8776         (grub_script_mem_record_stop): Likewise.
8777         (grub_script_arg_add): Likewise.
8778         (grub_script_add_arglist): Likewise.
8779         (grub_script_create_cmdline): Likewise.
8780         (grub_script_create_cmdif): Likewise.
8781         (grub_script_create_cmdmenu): Likewise.
8782         (grub_script_add_cmd): Likewise.
8783         (grub_script_parse): Setup the state before calling the parser.
8785 2006-04-16  Marco Gerards  <marco@gnu.org>
8787         * normal/command.c (grub_command_init): Remove the title command.
8789         * normal/lexer.c (grub_script_yylex): Renamed from this...
8790         (grub_script_yylex2): ... to this.
8791         (grub_script_yylex): New function.  Temporary
8792         introduced to filter some tokens.
8793         (grub_script_yyerror): Print a newline.
8795         * normal/main.c (read_config_file): Output information about the
8796         lines that contain errors.  Wait for a key after all lines have
8797         been processed.  Don't return an empty menu.
8799         * normal/parser.y (func_mem): Don't initialize.
8800         (menu_entry): Likewise.
8801         (err): New variable.
8802         (script): Don't return anything when an error was encountered.
8803         (ws, returns): Removed rules.
8804         (argument): Disabled concatenated variable support.
8805         (arguments): Remove explicit separators.
8806         (grubcmd): Likewise.
8807         (function): Likewise.
8808         (menuentry): Likewise.
8809         (if): Likewise.
8810         (commands): Likewise.  Add error handling.
8812         * normal/script.c (grub_script_create_cmdline): If
8813         `grub_script_parsed' is 0, assume the parser encountered an error.
8815 2006-04-02  Yoshinori K. Okuji  <okuji@enbug.org>
8817         * configure.ac: Add support for EFI. Fix the typo
8818         BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
8820 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
8822         * util/unifont2pff.rb: Removed unnecessary byte ordering.  Now
8823         foreign multibyte characters should be shown correctly.
8825 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
8827         * normal/main.c (grub_normal_menu_addentry): Fixed menu size
8828         calculation.
8829         (read_config_file): Made it to close file before returning.
8831 2006-03-31  Vesa Jaaskelainen  <chaac@nic.fi>
8833         * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
8834         include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
8835         video/i386/pc/vbefill.c.
8837         * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
8838         video/i386/pc/vbefill.c.
8840         * include/grub/video.h (grub_video_blit_format): New enum.
8841         (grub_video_mode_info): Added new member blit_format.
8842         (grub_video_get_blit_format): New function prototype.
8844         * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
8845         function prototype.
8846         (grub_video_vbe_map_rgb): Likewise.
8847         (grub_video_vbe_unmap_color): Likewise.
8849         * include/grub/i386/pc/vbeblit.h: New file.
8851         * include/grub/i386/pc/vbefill.h: New file.
8853         * video/video.c (grub_video_get_blit_format): New function.
8854         (grub_video_vbe_get_video_ptr): Re-declared as non-static.
8855         (grub_video_vbe_map_rgb): Likewise.
8856         (grub_video_vbe_unmap_color): Likewise.
8858         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
8859         optimized fills.
8860         (grub_video_vbe_blit_render_target): Changed to use more optimized
8861         blits.
8862         (grub_video_vbe_setup): Added detection for optimized settings.
8863         (grub_video_vbe_create_render_target): Likewise.
8865         * video/i386/pc/vbeblit.c: New file.
8867         * video/i386/pc/vbefill.c: New file.
8869 2006-03-30  Vesa Jaaskelainen  <chaac@nic.fi>
8871         * font/manager.c (grub_font_get_glyph): Removed font fixup from
8872         here...
8874         * util/unifont2pff.rb: ... and moved it to here.  Improved argument
8875         parsing to support both hex and dec ranges.  If filename was missing
8876         show usage information.
8878 2006-03-14  Vesa Jaaskelainen  <chaac@nic.fi>
8880         * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
8881         video/video.c, commands/videotest.c.  Removed term/i386/pc/vesafb.c.
8883         * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
8884         gfxterm.mod, videotest.mod.  Removed vga.mod, vesafb.mod.
8885         (video_mod_SOURCES): Added.
8886         (video_mod_CFLAGS): Likewise.
8887         (video_mod_LDFLAGS): Likewise.
8888         (gfxterm_mod_SOURCES): Likewise.
8889         (gfxterm_mod_CFLAGS): Likewise.
8890         (gfxterm_mod_LDFLAGS): Likewise.
8891         (videotest_mod_SOURCES): Likewise.
8892         (videotest_mod_CFLAGS): Likewise.
8893         (videotest_mod_LDFLAGS): Likewise.
8894         (vesafb_mod_SOURCES): Removed.
8895         (vesafb_mod_CFLAGS): Likewise.
8896         (vesafb_mod_LDFLAGS): Likewise.
8897         (vga_mod_SOURCES): Likewise.
8898         (vga_mod_CFLAGS): Likewise.
8899         (vga_mod_LDFLAGS): Likewise.
8901         * commands/videotest.c: New file.
8903         * font/manager.c (fill_with_default_glyph): Modified to use
8904         grub_font_glyph.
8905         (grub_font_get_glyph): Likewise.
8906         (fontmanager): Renamed from this...
8907         (font_manager): ... to this.
8909         * include/grub/font.h (grub_font_glyph): Added new structure.
8910         (grub_font_get_glyph): Modified to use grub_font_glyph.
8912         * include/grub/misc.h (grub_abs): Added as inline function.
8914         * include/grub/video.h: New file.
8916         * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
8917         (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
8918         (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
8919         (grub_vbe_get_controller_info): Renamed from this...
8920         (grub_vbe_bios_get_controller_info): ... to this.
8921         (grub_vbe_get_mode_info): Renamed from this...
8922         (grub_vbe_bios_get_mode_info): ... to this.
8923         (grub_vbe_set_mode): Renamed from this...
8924         (grub_vbe_bios_set_mode): ... to this.
8925         (grub_vbe_get_mode): Renamed from this...
8926         (grub_vbe_bios_get_mode): ... to this.
8927         (grub_vbe_set_memory_window): Renamed from this...
8928         (grub_vbe_bios_set_memory_window): ... to this.
8929         (grub_vbe_get_memory_window): Renamed from this...
8930         (grub_vbe_bios_get_memory_window): ... to this.
8931         (grub_vbe_set_scanline_length): Renamed from this...
8932         (grub_vbe_set_scanline_length): ... to this.
8933         (grub_vbe_get_scanline_length): Renamed from this...
8934         (grub_vbe_bios_get_scanline_length): ... to this.
8935         (grub_vbe_set_display_start): Renamed from this...
8936         (grub_vbe_bios_set_display_start): ... to this.
8937         (grub_vbe_get_display_start): Renamed from this...
8938         (grub_vbe_bios_get_display_start): ... to this.
8939         (grub_vbe_set_palette_data): Renamed from this...
8940         (grub_vbe_bios_set_palette_data): ... to this.
8941         (grub_vbe_set_pixel_rgb): Removed.
8942         (grub_vbe_set_pixel_index): Likewise.
8944         * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
8945         from this...
8946         (grub_vbe_bios_get_controller_info): ... to this.
8947         (grub_vbe_get_mode_info): Renamed from this...
8948         (grub_vbe_bios_get_mode_info): ... to this.
8949         (grub_vbe_set_mode): Renamed from this...
8950         (grub_vbe_bios_set_mode): ... to this.
8951         (grub_vbe_get_mode): Renamed from this...
8952         (grub_vbe_bios_get_mode): ... to this.
8953         (grub_vbe_set_memory_window): Renamed from this...
8954         (grub_vbe_bios_set_memory_window): ... to this.
8955         (grub_vbe_get_memory_window): Renamed from this...
8956         (grub_vbe_bios_get_memory_window): ... to this.
8957         (grub_vbe_set_scanline_length): Renamed from this...
8958         (grub_vbe_set_scanline_length): ... to this.
8959         (grub_vbe_get_scanline_length): Renamed from this...
8960         (grub_vbe_bios_get_scanline_length): ... to this.
8961         (grub_vbe_set_display_start): Renamed from this...
8962         (grub_vbe_bios_set_display_start): ... to this.
8963         (grub_vbe_get_display_start): Renamed from this...
8964         (grub_vbe_bios_get_display_start): ... to this.
8965         (grub_vbe_set_palette_data): Renamed from this...
8966         (grub_vbe_bios_set_palette_data): ... to this.
8967         (grub_vbe_bios_get_controller_info): Fixed problem with registers
8968         getting corrupted after calling it.  Added more pushes and pops.
8969         (grub_vbe_bios_set_mode): Likewise.
8970         (grub_vbe_bios_get_mode): Likewise.
8971         (grub_vbe_bios_get_memory_window): Likewise.
8972         (grub_vbe_bios_set_scanline_length): Likewise.
8973         (grub_vbe_bios_get_scanline_length): Likewise.
8974         (grub_vbe_bios_get_display_start): Likewise.
8975         (grub_vbe_bios_set_palette_data): Likewise.
8977         * normal/cmdline.c (cl_set_pos): Refresh the screen.
8978         (cl_insert): Likewise.
8979         (cl_delete): Likewise.
8981         * term/gfxterm.c: New file.
8983         * term/i386/pc/vesafb.c: Removed file.
8985         * video/video.c: New file.
8987         * video/i386/pc/vbe.c (real2pm): Added new function.
8988         (grub_video_vbe_draw_pixel): Likewise.
8989         (grub_video_vbe_get_video_ptr): Likewise.
8990         (grub_video_vbe_get_pixel): Likewise
8991         (grub_video_vbe_init): Likewise.
8992         (grub_video_vbe_fini): Likewise.
8993         (grub_video_vbe_setup): Likewise.
8994         (grub_video_vbe_get_info): Likewise.
8995         (grub_video_vbe_set_palette): Likewise.
8996         (grub_video_vbe_get_palette): Likewise.
8997         (grub_video_vbe_set_viewport): Likewise.
8998         (grub_video_vbe_get_viewport): Likewise.
8999         (grub_video_vbe_map_color): Likewise.
9000         (grub_video_vbe_map_rgb): Likewise.
9001         (grub_video_vbe_map_rgba): Likewise.
9002         (grub_video_vbe_unmap_color): Likewise.
9003         (grub_video_vbe_fill_rect): Likewise.
9004         (grub_video_vbe_blit_glyph): Likewise.
9005         (grub_video_vbe_blit_bitmap): Likewise.
9006         (grub_video_vbe_blit_render_target): Likewise.
9007         (grub_video_vbe_scroll): Likewise.
9008         (grub_video_vbe_swap_buffers): Likewise.
9009         (grub_video_vbe_create_render_target): Likewise.
9010         (grub_video_vbe_delete_render_target): Likewise.
9011         (grub_video_vbe_set_active_render_target): Likewise.
9012         (grub_vbe_set_pixel_rgb): Remove function.
9013         (grub_vbe_set_pixel_index): Likewise.
9014         (index_color_mode): Remove static variable.
9015         (active_mode): Likewise.
9016         (framebuffer): Likewise.
9017         (bytes_per_scan_line): Likewise.
9018         (grub_video_vbe_adapter): Added new static variable.
9019         (framebuffer): Likewise.
9020         (render_target): Likewise.
9021         (initial_mode): Likewise.
9022         (mode_in_use): Likewise.
9023         (mode_list): Likewise.
9025 2006-03-10  Marco Gerards  <marco@gnu.org>
9027         * configure.ac (AC_INIT): Bumped to 1.93.
9029         * DISTLIST: Added `include/grub/hfs.h'.
9031 2006-02-01  Yoshinori K. Okuji  <okuji@enbug.org>
9033         * boot/i386/pc/boot.S (general_error): Before looping, try INT
9034         18H, which might help the BIOS falling back to next boot media.
9036 2006-01-25  Yoshinori K. Okuji  <okuji@enbug.org>
9038         * util/i386/pc/grub-install.in: Escape a backslash. Reported by
9039         Poe Chen <poe.poechen@gmail.com>.
9041 2006-01-17  Marco Gerards  <marco@gnu.org>
9043         * include/grub/normal.h: Include <grub/script.h>.
9044         (grub_command_list): Removed struct.
9045         (grub_command_list_t): Removed type.
9046         (grub_menu_entry): Remove members `num' and `command_list'.  Add
9047         members `commands' and `sourcecode'.
9048         * include/grub/script.h: Add inclusion guards.
9049         (grub_script_cmd_menuentry): New struct.
9050         (grub_script_execute_menuentry): New prototype.
9051         (grub_script_lexer_record_start): Likewise.
9052         (grub_script_lexer_record_stop): Likewise.
9053         * normal/execute.c (grub_script_execute_menuentry): New function.
9054         * normal/lexer.c (record, recording, recordpos, recordlen): New
9055         variables.
9056         (grub_script_lexer_record_start): New function.
9057         (grub_script_lexer_record_stop): Likewise.
9058         (recordchar): Likewise.
9059         (nextchar): Likewise.
9060         (grub_script_yylex): Use `nextchar' to fetch new characters.  Use
9061         2048 as the buffer size.  Add the tokens `menuentry' and `@'.
9062         * normal/main.c: Include <grub/parser.h> and <grub/script.h>
9063         (current_menu): New variable.
9064         (free_menu): Mainly rewritten.
9065         (grub_normal_menu_addentry): New function.
9066         (read_config_file): Rewritten.
9067         * normal/menu.c (run_menu_entry): Mainly rewritten.
9068         * normal/menu_entry.c (make_screen): Rewritten the code to insert
9069         the menu entry.
9070         (run): Mainly rewritten.
9071         * normal/parser.y (menu_entry): New variable.
9072         (GRUB_PARSER_TOKEN_MENUENTRY): New token.
9073         (menuentry): New rule.
9074         (command): Add `menuentry'.
9075         (if_statement): Allow additional returns before `fi'.
9076         * normal/script.c (grub_script_create_cmdmenu): New function.
9078 2006-01-03  Marco Gerards  <marco@gnu.org>
9080         * INSTALL: GNU Bison is required.
9081         * configure.ac: Rewritten the test to detect Bison.
9082         * Makefile.in (YACC): New variable.  Reported by Xun Sun
9083         <xun.sun.cn@gmail.com>.
9085 2006-01-03  Marco Gerards  <marco@gnu.org>
9087         * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
9088         the HFS+ filesystem to filesystem blocks.
9089         (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
9090         GCC warning is silenced.
9092 2006-01-03  Marco Gerards  <marco@gnu.org>
9094         * partmap/apple.c (apple_partition_map_iterate): Convert the data
9095         read from disk from big endian to host byte order.
9097 2006-01-03  Hollis Blanchard  <hollis@penguinppc.org>
9099         * fs/hfs.c: Include <grub/hfs.h>.  Added reference to the official
9100         documentation.
9101         (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
9102         (grub_hfs_mount): Grammar fix in error. Make sure this is not an
9103         embedded HFS+ filesystem.
9104         (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
9105         (grub_hfs_sblock): Move from here...
9106         * include/grub/hfs.h: To here...  New file.
9107         * fs/hfsplus.c: Include <grub/hfs.h>.  Added reference to the official
9108         documentation.
9109         (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
9110         New macros.
9111         (grub_hfsplus_volheader): Change type of member `magic' to
9112         `grub_uint16_t'.
9113         (grub_hfsplus_data): Add new member `embedded_offset'.
9114         (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
9115         returned block.
9116         (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
9117         Calculate the offset.
9119 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
9121         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
9122         Removed.
9123         (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
9125 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
9127         * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
9128         ENV->NAME is NULL after allocating ENV->VALUE.
9130 2005-12-25  Marco Gerards  <marco@gnu.org>
9132         * kern/env.c (grub_env_set): Rewritten the error handling code.
9134 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
9136         * geninit.sh: Made more robust, and more portable.
9138 2005-12-25  Marco Gerards  <marco@gnu.org>
9140         Add support for Apple HFS+ filesystems.
9142         * fs/hfsplus.c: New file.
9144         * DISTLIST: Added `fs/hfsplus.c'.
9146         * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
9147         (hfsplus_mod_SOURCES): New variable.
9148         (hfsplus_mod_CFLAGS): Likewise.
9149         (hfsplus_mod_LDFLAGS): Likewise.
9150         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
9151         (grub_setup_SOURCES): Likewise.
9152         (grub_mkdevicemap_SOURCES): Likewise.
9153         (grub_emu_SOURCES): Likewise.
9154         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9156         * fs/fshelp.c (grub_fshelp_log2blksize): New function.
9158         * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
9160 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
9162         * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
9163         commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
9164         include/grub/parser.h, include/grub/script.h, kern/parser.c,
9165         kern/sparc64/cache.S, normal/execute.c, normal/function.c,
9166         normal/lexer.c, normal/parser.y, normal/script.c, and
9167         partmap/gpt.c.
9168         Removed kern/sparc64/cache.c.
9170         * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
9171         grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
9172         grub_emu_init.c.
9174         * configure.ac (AC_INIT): Bumped to 1.92.
9176 2005-12-24  Vesa Jaaskelainen  <chaac@nic.fi>
9178         * kern/err.c (grub_error_push): Added new function to support error
9179         stacks.
9180         (grub_error_pop): Likewise.
9181         (grub_error_stack_items): New local variable to support error stacks.
9182         (grub_error_stack_pos): Likewise.
9183         (grub_error_stack_assert): Likewise.
9184         (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
9185         stack depth.
9186         (grub_print_error): Added support to print errors from error stack.
9188         * include/grub/err.h (grub_error_push): Added function prototype.
9189         (grub_error_pop): Likewise.
9191 2005-12-09  Hollis Blanchard  <hollis@penguinppc.org>
9193         * configure.ac: Accept `powerpc64' as host_cpu.
9194         (amd64): Rename to `biarch32'.
9196         * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
9197         non-cacheline-aligned addresses.
9199         * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
9200         (grub_dl_flush_cache): Likewise.  Only call `grub_arch_sync_caches'
9201         if `size' is non-zero.
9203 2005-12-03  Marco Gerards  <mgerards@xs4all.nl>
9205         * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
9206         and `cd' to make sure the filename is not prefixed with a
9207         directory name.
9208         (pkgdata_MODULES): Add `gpt.mod'.
9209         (gpt_mod_SOURCES): New variable.
9210         (gpt_mod_CFLAGS): Likewise.
9211         (gpt_mod_LDFLAGS): Likewise.
9213         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
9215         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
9216         New macro.
9218         * partmap/gpt.c: New file.
9220         * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
9221         GPT partition map is detected.
9223 2005-12-03  Vincent Pelletier  <subdino2004@yahoo.fr>
9225         * commands/i386/pc/play.c: New file.
9226         * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
9227         (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
9228         macros.
9230 2005-11-27  Marco Gerards  <mgerards@xs4all.nl>
9232         * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
9233         ((unused))' to silence gcc warning.
9235 2005-11-26  Hollis Blanchard  <hollis@penguinppc.org>
9237         * configure.ac: Correct `AC_PROG_YACC' test.
9239 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
9241         * util/powerpc/ieee1275/grub-install.in: Run the mount point
9242         check before installing files.
9244 2005-11-22  Mike Small  <smallm@panix.com>
9246         * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
9247         number regex so multidigit numbers are recognized correctly.
9249 2005-11-22  Mike Small  <smallm@panix.com>
9251         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
9252         debugging message before attempting to claim memory.
9253         (grub_rescue_cmd_initrd): Add a claim debugging message and try
9254         multiple addresses in case of failure.
9256 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
9258         * term/tparm.c (get_space): Remove empty `if' statement.
9260         * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
9262         * kern/parser.c (check_varstate): Rename `state' to 's'.
9264 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
9266         * partmap/acorn.c: Change `unsigned' to `unsigned int'.  Move all
9267         variable definitions to the beginning of each function.  Sort stack
9268         variables by size.
9269         (find): Rename to `acorn_partition_map_find'.  Cast `grub_disk_read'
9270         `buf' argument to `char *'.
9272 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
9274         * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
9275         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
9276         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
9277         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
9278         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
9279         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
9280         configfile.mod, search.mod, gzio.mod and test.mod.
9281         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
9282         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
9283         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
9284         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
9285         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
9286         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
9287         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
9288         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
9289         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
9290         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
9291         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
9292         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
9293         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
9294         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
9295         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
9296         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
9297         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
9298         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
9299         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
9300         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
9301         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
9302         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
9303         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
9305         * conf/common.mk (grub_modules_init.lst): Use `find' instead of
9306         `grep --include'.
9307         (pkgdata_MODULES): Add test.mod.
9309 2005-11-18  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
9311         * genmk.rb: Fixed list rules moved to Makefile.in.  Recognise
9312         appending to variables with "+=".
9313         (PModule): Use full pathname to generate *.lst filenames.
9315         * Makefile.in: Fixed list rules moved from genmk.rb.
9316         (.DELETE_ON_ERROR): New special target.
9317         (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
9319         * conf/i386-pc.rmk: Include conf/common.mk.
9320         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
9321         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
9322         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
9323         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
9324         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
9325         configfile.mod, search.mod, gzio.mod and test.mod.
9326         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
9327         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
9328         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
9329         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
9330         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
9331         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
9332         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
9333         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
9334         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
9335         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
9336         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
9337         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
9338         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
9339         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
9340         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
9341         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
9342         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
9343         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
9344         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
9345         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
9346         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
9347         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
9348         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
9349         here...
9350         * conf/common.rmk: ... to here.  New file.
9352         * conf/common.mk: New file.
9354 2005-11-18  Yoshinori K. Okuji  <okuji@enbug.org>
9356         * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
9357         (grub_script.tab.c): ... here.
9359         * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
9360         (grub_script.tab.c): ... here.
9362         * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
9363         (grub_script.tab.c): ... here.
9365         * normal/command.c (grub_command_find): Fixed a memory leak of
9366         MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
9368 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
9370         * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
9371         "@" which marks the start of a comment on ARM.
9372         (VARIABLE): Likewise.
9374 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
9376         Add support for Linux/ADFS partition tables.
9378         * partmap/acorn.c: New file.
9380         * include/grub/acorn_filecore.h: Likewise.
9382         * DISTLIST: Added `partmap/acorn.c' and
9383         `include/grub/acorn_filecore.h'.
9385         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
9386         `partmap/acorn.c'.
9387         (pkgdata_MODULES): Add `acorn.mod'.
9388         (acorn_mod_SOURCES): New variable.
9389         (acorn_mod_CFLAGS): Likewise.
9391         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
9392         `partmap/acorn.c'.
9393         (pkgdata_MODULES): Add `acorn.mod'.
9394         (acorn_mod_SOURCES): New variable.
9395         (acorn_mod_CFLAGS): Likewise.
9397         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
9398         (pkgdata_MODULES): Add `acorn.mod'.
9399         (acorn_mod_SOURCES): New variable.
9400         (acorn_mod_CFLAGS): Likewise.
9401         (acorn_mod_LDFLAGS): Likewise.
9403         * include/types.h (grub_disk_addr_t): New typedef.
9405 2005-11-13  Marco Gerards  <mgerards@xs4all.nl>
9407         * geninit.sh: New file.
9409         * geninitheader.sh: Likewise.
9411         * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
9412         * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
9413         * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
9414         * commands/configfile.c (grub_configfile_init)
9415         (grub_configfile_fini): Likewise.
9416         * commands/default.c (grub_default_init, grub_default_fini):
9417         Likewise.
9418         * commands/help.c (grub_help_init, grub_help_fini): Likewise.
9419         * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
9420         * commands/search.c (grub_search_init, grub_search_fini): Likewise.
9421         * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
9422         Likewise.
9423         * commands/test.c (grub_test_init, grub_test_fini): Likewise.
9424         * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
9425         Likewise.
9426         * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
9427         * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
9428         Likewise.
9429         * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
9430         Likewise.
9431         * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
9432         Likewise.
9433         * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
9434         * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
9435         * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
9436         * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
9437         * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
9438         * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
9439         * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
9440         * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
9441         * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
9442         * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
9443         * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
9444         * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
9445         * partmap/amiga.c (grub_amiga_partition_map_init)
9446         (grub_amiga_partition_map_fini): Likewise.
9447         * partmap/apple.c (grub_apple_partition_map_init)
9448         (grub_apple_partition_map_fini): Likewise.
9449         * partmap/pc.c (grub_pc_partition_map_init)
9450         (grub_pc_partition_map_fini): Likewise.
9451         * partmap/sun.c (grub_sun_partition_map_init,
9452         grub_sun_partition_map_fini): Likewise.
9453         * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
9454         Likewise.
9456         * util/grub-emu.c: Include <grub_modules_init.h>.
9457         (main): Don't initialize and de-initialize any modules directly,
9458         use `grub_init_all' and `grub_fini_all' instead.
9460         * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
9461         `grub_vesafb_mod_init'.
9462         (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'.  Updated
9463         all users.
9464         * term/i386/pc/vga.c (grub_vga_init): Renamed to
9465         `grub_vga_mod_init'.  Updated all users.
9466         (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
9468         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
9469         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
9470         rules.
9472         * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
9473         Generate a function to initialize the module in utilities.
9474         Updated all callers.
9475         (GRUB_MOD_FINI): Add argument `name'.  Generate a function to
9476         initialize the module in utilities.  Updated all callers.
9478 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
9480         * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
9481         escape sequence and a literal ^L to clear the screen.
9483         * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
9484         when returning from Open Firmware.
9486 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
9488         * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
9489         (grub_ofconsole_height): Likewise.
9490         (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
9491         manually insert a '\n'.
9492         (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
9493         `grub_ofconsole_height'.  Return early if these are already set.
9495 2005-11-07  Vincent Pelletier  <subdino2004@yahoo.fr>
9497         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
9498         `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
9499         `normal/execute.c', `normal/lexer.c', `io/gzio.c',
9500         `kern/parser.c', `grub_script.tab.c', `normal/function.c'
9501         and `normal/script.c'.
9502         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
9503         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9504         (test_mod_SOURCES): New variable.
9505         (test_mod_CFLAGS): Likewise.
9506         (test_mod_LDFLAGS): Likewise.
9507         (pkgdata_MODULES): Add `test.mod'.
9508         (grub_script.tab.c): New rule.
9509         (grub_script.tab.h): Likewise.
9511 2005-11-07  Marco Gerards  <mgerards@xs4all.nl>
9513         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
9514         `commands/test.c', `normal/execute.c', `normal/lexer.c',
9515         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9516         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
9517         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9518         (test_mod_SOURCES): New variable.
9519         (test_mod_CFLAGS): Likewise.
9520         (pkgdata_MODULES): Add `test.mod'.
9521         (grub_script.tab.c): New rule.
9522         (grub_script.tab.h): Likewise.
9524 2005-11-06  Marco Gerards  <mgerards@xs4all.nl>
9526         Add initial scripting support.
9528         * commands/test.c: New file.
9529         * include/grub/script.h: Likewise.
9530         * normal/execute.c: Likewise.
9531         * normal/function.c: Likewise.
9532         * normal/lexer.c: Likewise.
9533         * normal/parser.y: Likewise.
9534         * normal/script.c: Likewise.
9536         * configure.ac: Add `AC_PROG_YACC' test.
9538         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
9539         `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
9540         `normal/function.c' and `normal/script.c'.
9541         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
9542         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9543         (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
9544         variables.
9545         (pkgdata_MODULES): Add `test.mod'.
9546         (grub_script.tab.c): New rule.
9547         (grub_script.tab.h): Likewise.
9549         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
9551         * include/grub/normal.h (grub_test_init): New prototype.
9552         (grub_test_fini): Likewise.
9554         * normal/command.c: Include <grub/script.h>.
9555         (grub_command_execute): Rewritten.
9557         * util/grub-emu.c (main): Call `grub_test_init' and
9558         `grub_test_fini'.
9560 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
9562         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
9563         to 0.
9564         * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
9565         there are no pending characters.
9567 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
9569         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
9570         `grub_strndup' to drop device arguments. Replace unnecessary
9571         `grub_strndup' with `grub_strdup'.
9573 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
9575         * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
9576         `debug' environment variable has been set.
9578 2005-11-02  Hollis Blanchard  <hollis@penguinppc.org>
9580         * Makefile.in (install-local): Use $(DATA).
9581         (uninstall): Likewise.
9582         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
9583         (sbin_UTILITIES): ... to here.
9584         (sbin_SCRIPTS): New variable.
9585         (grub_install_SOURCES): New variable.
9586         * util/powerpc/ieee1275/grub-install.in: New file.
9587         * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
9588         variable.
9589         (add_segments): Call `grub_util_get_path'.
9591 2005-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
9593         From Timothy Baldwin:
9594         * commands/ls.c (grub_ls_list_files): Close FILE with
9595         grub_file_close.
9596         * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
9598 2005-10-24  Marco Gerards  <mgerards@xs4all.nl>
9600         * include/grub/parser.h: New file.
9602         * kern/parser.c: Likewise.
9604         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
9605         (grub_setup_SOURCES): Likewise.
9606         (grub_probefs_SOURCES): Likewise.
9607         (grub_emu_SOURCES): Likewise.
9608         (kernel_img_HEADERS): Add `parser.h'.
9610         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
9611         (grub_emu_SOURCES): Add `kern/parser.c'.
9612         (grubof_SOURCES): Likewise.
9614         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
9615         (grubof_SOURCES): Add `kern/parser.c'.
9617         * include/grub/misc.h (grub_split_cmdline): Removed prototype.
9619         * kern/misc.c (grub_split_cmdline): Removed function.
9621         * kern/rescue.c: Include <grub/parser.h>.
9622         (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
9623         of `grub_split_cmdline'.
9625         * normal/command.c: Include <grub/parser.h>.
9626         (grub_command_execute):  Use `grub_parser_split_cmdline' instead
9627         of `grub_split_cmdline'.
9629         * normal/completion.c: Include <grub/parser.h>.
9630         (cmdline_state): New variable.
9631         (iterate_dir): End the filename with a quote depending on the
9632         command line state.
9633         (get_state): new function.
9634         (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
9635         split the arguments and determine the current argument.  When the
9636         argument string is not quoted, escape all spaces.
9638 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
9640         * normal/sparc64/setjmp.S: New file.
9642 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
9644         * include/grub/sparc64/libgcc.h: New file.
9645         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
9646         (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
9647         normal/sparc64/setjmp.c.
9649 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
9651         * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
9652         * kern/sparc64/cache.S: New file.
9653         * kern/sparc64/cache.c: Removed.
9654         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
9655         (COMMON_CFLAGS): Add -mno-app-regs.  Remove -mcpu=v9 and
9656         -mtune=ultrasparc.
9657         (COMMON_LDFLAGS): Add -melf64_sparc.
9658         (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
9659         (grubof_SOURCES): Use cache.S instead of cache.c.
9660         (grubof_LDFLAGS): Add -mno-app-regs.  Replace "-Xlinker
9661         --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
9662         (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
9663         commented though.
9664         (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
9665         (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
9666         (linux_mod_CFLAGS): Commented out.
9667         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
9668         out because module isn't built.
9669         (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
9670         (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
9671         (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
9672         (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
9673         (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
9674         (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
9675         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
9676         (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
9677         (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
9678         (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
9679         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
9680         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
9681         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
9682         (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
9684 2005-10-20  Yoshinori K. Okuji  <okuji@enbug.org>
9686         * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
9687         grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
9688         longer, because HFS should not be used on PC.
9690 2005-10-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
9692         * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
9693         consistently within the loop.
9695 2005-10-15  Marco Gerards  <mgerards@xs4all.nl>
9697         * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
9698         directory can not be read.
9700 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
9702         * configure.ac (AC_INIT): Increase the version number to 1.91.
9704         * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
9705         include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
9706         term/i386/pc/serial.c.
9708 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
9710         * kern/file.c (grub_file_seek): Seeking to an offset equal to a
9711         file size must be permitted.
9713         * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
9714         between %ah and %al.
9716 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
9718         * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
9719         grub_uint64_t.
9720         Call the hook with a NUL-terminated filename.
9721         (grub_xfs_mount): Use grub_be_to_cpu32 instead of
9722         grub_cpu_to_be32.
9724         * kern/term.c (cursor_state): New variable.
9725         (grub_term_set_current): Reset the cursor state on a new
9726         terminal.
9727         (grub_setcursor): Rewritten to use CURSOR_STATE.
9728         (grub_getcursor): New function.
9730         * include/grub/term.h (grub_getcursor): New prototype.
9732         * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
9733         integers on ARM. Reported by Timothy Baldwin
9734         <T.E.Baldwin99@members.leeds.ac.uk>.
9736 2005-10-11  Marco Gerards  <mgerards@xs4all.nl>
9738         * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
9739         allocated.
9740         (grub_sfs_dir): Likewise.
9742 2005-10-09  Marco Gerards  <mgerards@xs4all.nl>
9744         Add support for the SFS filesystem.
9746         * fs/sfs.c: New file.
9748         * DISTLIST: Added `fs/sfs.c'.
9750         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
9751         (grub_probefs_SOURCES): Likewise.
9752         (grub_emu_SOURCES): Likewise.
9753         (pkgdata_MODULES): Add `sfs.mod'.
9754         (sfs_mod_SOURCES): New variable.
9755         (sfs_mod_CFLAGS): Likewise.
9756         (sfs_mod_LDFLAGS): Likewise.
9758         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
9759         (pkgdata_MODULES): Add `sfs.mod'.
9760         (sfs_mod_SOURCES): New variable.
9761         (sfs_mod_CFLAGS): Likewise.
9763         * util/grub-emu.c (main): Call `grub_sfs_init' and
9764         `grub_sfs_fini'.
9766         * include/grub/fs.h (grub_sfs_init): New prototype.
9767         (grub_sfs_fini): Likewise.
9769 2005-10-07  Marco Gerards  <mgerards@xs4all.nl>
9771         Add support for the AFFS filesystem.
9773         * fs/affs.c: New file.
9775         * DISTLIST: Added `fs/affs.c'.
9777         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
9778         (grub_probefs_SOURCES): Likewise.
9779         (grub_emu_SOURCES): Likewise.
9780         (pkgdata_MODULES): Add `affs.mod'.
9781         (affs_mod_SOURCES): New variable.
9782         (affs_mod_CFLAGS): Likewise.
9783         (affs_mod_LDFLAGS): Likewise.
9785         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
9786         (pkgdata_MODULES): Add `affs.mod'.
9787         (affs_mod_SOURCES): New variable.
9788         (affs_mod_CFLAGS): Likewise.
9790         * util/grub-emu.c (main): Call `grub_affs_init' and
9791         `grub_affs_fini'.
9793         * include/grub/fs.h (grub_affs_init): New prototype.
9794         (grub_affs_fini): Likewise.
9796 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
9798         * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
9800 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
9802         * configure.ac: Accept `x86_64' as host_cpu.  In that case add
9803         `-m32' to CFLAGS.
9805         * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
9806         linking.
9808         * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
9809         (COMMON_LDFLAGS): New variable.
9810         (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
9811         (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
9812         (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
9813         (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
9814         (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
9815         (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
9816         (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
9817         (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
9818         (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
9819         (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
9820         (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
9821         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
9822         (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
9823         (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
9824         (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
9825         variables.
9826         (normal_mod_ASFLAGS): Add `-m32'.
9828         * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
9829         (grub_host_size_t, grub_host_ssize_t): New types.
9830         (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
9831         dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
9832         `GRUB_HOST_SIZEOF_VOID_P'.
9834         * include/grub/kernel.h (struct grub_module_header): Type of
9835         member offset changed to `grub_host_off_t'.  Type of member size
9836         changed to `grub_host_size_t'.
9837         (struct grub_module_info): Type of member offset changed to
9838         `grub_host_off_t'.  Type of member size changed to
9839         `grub_host_size_t'.
9841 2005-09-29  Yoshinori K. Okuji  <okuji@enbug.org>
9843         Make GRUB's kernel compliant to Multiboot Specification.
9845         * kern/i386/pc/startup.S (multiboot_header): New label.
9846         (multiboot_entry): Likewise.
9847         (multiboot_trampoline): Likewise.
9849         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
9850         Increased to 0x4A0.
9852         * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
9853         put parentheses after a question mark.
9854         [!GRUB_UTIL] (my_mod): New variable.
9856         * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
9858 2005-09-28  Marco Gerards  <mgerards@xs4all.nl>
9860         Adds support for the XFS filesystem.  Btrees are not supported
9861         yet.
9863         * fs/xfs.c: New file.
9865         * DISTLIST: Added `fs/xfs.c'.
9867         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
9868         (grub_probefs_SOURCES): Likewise.
9869         (grub_emu_SOURCES): Likewise.
9870         (pkgdata_MODULES): Add `xfs.mod'.
9871         (xfs_mod_SOURCES): New variable.
9872         (xfs_mod_CFLAGS): Likewise.
9874         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
9875         (pkgdata_MODULES): Add `xfs.mod'.
9876         (xfs_mod_SOURCES): New variable.
9877         (xfs_mod_CFLAGS): Likewise.
9879         * util/grub-emu.c (main): Call `grub_xfs_init' and
9880         `grub_xfs_fini'.
9882         * include/grub/fs.h (grub_xfs_init): New prototype.
9883         (grub_xfs_fini): Likewise.
9886 2005-09-18  Vesa Jaaskelainen  <chaac@nic.fi>
9888         * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
9889         color modes, allow greater than 16 colors to be configured as
9890         a default palette.
9892 2005-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
9894         * normal/completion.c (complete_arguments): Add the qualifier
9895         const into OPTIONS.
9897         From Omniflux <omniflux+lists@omniflux.com>:
9898         * include/grub/terminfo.h: New file.
9899         * include/grub/tparm.h: Likewise.
9900         * include/grub/i386/pc/serial.h: Likewise.
9901         * term/terminfo.c: Likewise.
9902         * term/tparm.c: Likewise.
9903         * term/i386/pc/serial.c: Likewise.
9904         * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
9905         serial.mod.
9906         (terminfo_mod_SOURCES): New variable.
9907         (terminfo_mod_CFLAGS): Likewise.
9908         (serial_mod_SOURCES): Likewise.
9909         (serial_mod_CFLAGS): Likewise.
9911 2005-08-31  Yoshinori K. Okuji  <okuji@enbug.org>
9913         * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
9914         boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
9915         and kern/powerpc/ieee1275/cmain.c, respectively.
9917         * boot/powerpc/ieee1275/crt0.S: Moved to ...
9918         * kern/powerpc/ieee1275/crt0.S: ... here.
9920         * boot/powerpc/ieee1275/cmain.c: Moved to ...
9921         * kern/powerpc/ieee1275/cmain.c: ... here.
9923         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
9924         kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
9925         instead of boot/powerpc/ieee1275/crt0.S and
9926         boot/powerpc/ieee1275/cmain.c, respectively.
9928         * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
9929         sectors. It was not used anyway.
9931 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
9933         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
9934         `unused parameter' warning.
9936 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
9938         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
9939         function.
9940         (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
9941         getcharwidth.
9943 2005-08-28  Marco Gerards  <metgerards@student.han.nl>
9945         * include/grub/normal.h (enum grub_completion_type): Added
9946         `GRUB_COMPLETION_TYPE_ARGUMENT'.
9948         * normal/cmdline.c (print_completion): Handle
9949         the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
9950         * normal/menu_entry.c (store_completion): Likewise.
9952         * normal/completion.c (complete_arguments): New function.
9953         (grub_normal_do_completion): Call `complete_arguments' when the
9954         current words start with a dash.
9956 2005-08-27  Marco Gerards  <metgerards@student.han.nl>
9958         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
9959         `gzio.mod' instead of `io.mod').
9961 2005-08-22  Yoshinori K. Okuji  <okuji@enbug.org>
9963         * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
9964         (DISTDIRS): Added io and video.
9965         Rewrite the search routine to make an output consistently.
9967         * DISTLIST: Added conf/sparc64-ieee1275.mk,
9968         conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
9969         include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
9970         io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
9971         kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
9972         util/powerpc/ieee1275/misc.c.
9974         * include/grub/gzio.h: New file.
9975         * io/gzio.c: Likewise.
9977         * kern/file.c (grub_file_close): Call grub_device_close only if
9978         FILE->DEVICE is not NULL.
9980         * include/grub/mm.h [!NULL] (NULL): New macro.
9982         * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
9984         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
9985         (pkgdata_MODULES): Added gzio.mod.
9986         (gzio_mod_SOURCES): New variable.
9987         (gzio_mod_CFLAGS): Likewise.
9989         * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
9990         (pkgdata_MODULES): Added gzio.mod.
9991         (gzio_mod_SOURCES): New variable.
9992         (gzio_mod_CFLAGS): Likewise.
9994         * commands/cat.c: Include grub/gzio.h.
9995         (grub_cmd_cat): Use grub_gzfile_open instead of
9996         grub_file_open.
9998         * commands/cmp.c: Include grub/gzio.h.
9999         (grub_cmd_cmp): Use grub_gzfile_open instead of
10000         grub_file_open.
10002         * loader/i386/pc/multiboot.c: Include grub/gzio.h.
10003         (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
10004         grub_file_open.
10005         (grub_rescue_cmd_module): Likewise.
10007 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
10009         * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
10010         kern/sparc64/ieee1275/init.c because it contains _start.
10011         * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
10013 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
10015         * configure.ac: Add support for sparc64 host with ieee1275
10016         firmware.
10017         * configure: Generated from configure.ac.
10018         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
10019         instead of int.
10020         (grub_ofdisk_read): Likewise.
10021         (grub_ofdisk_open): Use %p to print pointer values, and cast the
10022         pointers as (void *) to remove a warning.
10023         (grub_ofdisk_close): Likewise.
10024         (grub_ofdisk_read): Likewise.
10025         * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
10026         returns, so make it return void to remove a warning.
10027         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
10028         Corresponding prototype change.
10029         * kern/mm.c (grub_mm_init_region): Use %p to print pointer
10030         values, and cast the pointers as (void *) to remove a warning.
10031         (grub_mm_dump): Likewise.
10032         * conf/sparc64-ieee1275.mk: New file.
10033         * conf/sparc64-ieee1275.rmk: Likewise.
10034         * include/grub/sparc64/setjmp.h: Likewise.
10035         * include/grub/sparc64/types.h: Likewise.
10036         * include/grub/sparc64/ieee1275/console.h: Likewise.
10037         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
10038         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
10039         * include/grub/sparc64/ieee1275/time.h: Likewise.
10040         * kern/sparc64/cache.c: Likewise.
10041         * kern/sparc64/dl.c: Likewise.
10042         * kern/sparc64/ieee1275/init.c: Likewise.
10043         * kern/sparc64/ieee1275/openfw.c: Likewise.
10045 2005-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
10047         * util/console.c (grub_ncurses_putchar): If C is greater than
10048         0x7f, set C to a question mark.
10049         (grub_ncurses_getcharwidth): New function.
10050         (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
10051         getcharwidth.
10053         * normal/menu.c (print_entry): Made aware of Unicode. First,
10054         convert TITLE to UCS-4, and predict the cursor position by
10055         grub_getcharwidth.
10057         * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
10058         const to SRC.
10059         * kern/misc.c (grub_utf16_to_utf8): Likewise.
10061 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
10063         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
10064         the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
10065         grub_strcat.
10067         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
10068         file by the option BOOT_IMAGE. Use grub_stpcpy instead of
10069         grub_strcpy and grub_strlen. Take it into account that a space
10070         character is inserted as a delimiter.
10072 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
10074         * partmap/pc.c (pc_partition_map_iterate): Include the value of an
10075         invalid magic in the error.
10077         * commands/search.c: New file.
10079         * util/grub-emu.c (main): Call grub_search_init and
10080         grub_search_fini.
10082         * kern/rescue.c (grub_rescue_print_disks): Removed.
10083         (grub_rescue_print_devices): New function.
10084         (grub_rescue_cmd_ls): Use grub_device_iterate with
10085         grub_rescue_print_devices instead of grub_disk_dev_iterate with
10086         grub_rescue_print_disks.
10088         * kern/partition.c (grub_partition_iterate): Return the result of
10089         PARTMAP->ITERATE instead of GRUB_ERRNO.
10091         * kern/device.c: Include grub/partition.h.
10092         (grub_device_iterate): New function.
10094         * include/grub/partition.h (grub_partition_iterate): Return int
10095         instead of grub_err_t.
10097         * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
10098         prototype.
10099         [GRUB_UTIL] (grub_search_fini): Likewise.
10101         * include/grub/device.h (grub_device_iterate): New prototype.
10103         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
10104         commands/search.c.
10105         (pkgdata_MODULES): Added search.mod.
10106         (search_mod_SOURCES): New variable.
10107         (search_mod_CFLAGS): Likewise.
10109         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
10110         (pkgdata_MODULES): Added search.mod.
10111         (search_mod_SOURCES): New variable.
10112         (search_mod_CFLAGS): Likewise.
10114         * commands/ls.c (grub_ls_list_disks): Renamed to ...
10115         (grub_ls_list_devices): ... this, and use grub_device_iterate.
10116         All callers changed.
10118         * DISTLIST: Added commands/search.c.
10120 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
10122         * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
10123         conversion.
10124         (grub_getcharwidth): New function.
10126         * kern/misc.c (grub_utf8_to_ucs4): New function.
10128         * include/grub/term.h (struct grub_term): Added a new member
10129         "getcharwidth".
10130         (grub_getcharwidth): New prototype.
10132         * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
10134         * term/i386/pc/console.c (map_char): New function. Segregated from
10135         grub_console_putchar.
10136         (grub_console_putchar): Use map_char.
10137         (grub_console_getcharwidth): New function.
10138         (grub_console_term): Specified grub_console_getcharwidth as
10139         getcharwidth.
10141         * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
10142         (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
10144         * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
10145         GRUB_ERRNO.
10146         (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
10147         on grub_strtoul completely.
10148         (write_char): Declare local variables in the beginning of the
10149         function.
10150         (grub_vesafb_getcharwidth): New function.
10151         (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
10152         getcharwidth.
10154 2005-08-19  Yoshinori K. Okuji  <okuji@enbug.org>
10156         * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
10157         commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
10158         commands/i386/pc/vbetest.c.
10160         * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
10161         call grub_vbe_get_controller_info again, because the returned
10162         information is volatile.
10163         (grub_vbe_set_video_mode): Mostly rewritten.
10164         (grub_vbe_get_video_mode): Use grub_vbe_probe and use
10165         grub_vbe_status_t correctly.
10166         (grub_vbe_get_video_mode_info): Likewise.
10167         (grub_vbe_set_pixel_rgb): Use a switch statement rather than
10168         several if statements.
10170         * commands/i386/pc/vbe_list_modes.c: Renamed to ...
10171         * commands/i386/pc/vbeinfo.c: ... this.
10173         * commands/i386/pc/vbe_test.c: Renamed to ...
10174         * commands/i386/pc/vbetest.c: ... this.
10176         * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
10177         ...
10178         (grub_cmd_vbeinfo): ... this. Save video modes before
10179         iterating. Skip a video mode, if it is not available, not enough
10180         information is given or it is monochrome. Show the memory
10181         model. Leave the interpretation of MODEVAR to grub_strtoul
10182         completely.
10183         (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
10184         (GRUB_MOD_FINI): Likewise.
10186         * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
10187         (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
10188         grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
10189         duplicated grub_env_get. Leave the interpretation of MODEVAR to
10190         grub_strtoul completely.
10191         (real2pm): Removed.
10192         (GRUB_MOD_INIT): Rename vbe_test to vbetest.
10193         (GRUB_MOD_FINI): Likewise.
10195         * normal/misc.c: Include grub/mm.h.
10197         * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
10198         vbe_list_modes with vbetest.mod and vbeinfo.mod.
10199         (vbe_list_modes_mod_SOURCES): Removed.
10200         (vbe_list_modes_mod_CFLAGS): Likewise.
10201         (vbe_test_mod_SOURCES): Likewise.
10202         (vbe_test_mod_CFLAGS): Likewise.
10203         (vbeinfo_mod_SOURCES): New variable.
10204         (vbeinfo_mod_CFLAGS): Likewise.
10205         (vbetest_mod_SOURCES): Likewise.
10206         (vbetest_mod_CFLAGS): Likewise.
10208 2005-08-18  Yoshinori K. Okuji  <okuji@enbug.org>
10210         * normal/misc.c: New file.
10212         * DISTLIST: Added normal/misc.c.
10214         * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
10215         DISK to HOOK. Call HOOK with DISK.
10216         * partmap/apple.c (apple_partition_map_iterate): Likewise.
10217         * partmap/pc.c (pc_partition_map_iterate): Likewise.
10218         * partmap/sun.c (sun_partition_map_iterate): Likewise.
10220         * normal/menu_entry.c (struct screen): Added a new member
10221         "completion_shown".
10222         (completion_buffer): New global variable.
10223         (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
10224         (store_completion): New function.
10225         (complete): Likewise.
10226         (clear_completions): Likewise.
10227         (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
10228         call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
10229         a tab, call complete.
10231         * normal/completion.c (disk_dev): Removed.
10232         (print_simple_completion): Likewise.
10233         (print_partition_completion): Likewise.
10234         (print_func): New global variable.
10235         (add_completion): Do not take the arguments WHAT or PRINT any
10236         longer. Added a new argument TYPE. Instead of printing directly,
10237         call PRINT_FUNC if not NULL.
10238         All callers changed.
10239         (complete_device): Use a local variable DEV instead of
10240         DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
10241         (grub_normal_do_completion): Take a new argument HOOK. Do not
10242         initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
10243         empty string, return NULL instead.
10244         All callers changed.
10246         * normal/cmdline.c (print_completion): New function.
10248         * kern/partition.c (grub_partition_iterate): Add an argument DISK
10249         to HOOK.
10250         All callers changed.
10252         * kern/disk.c (grub_print_partinfo): Removed.
10254         * include/grub/partition.h (struct grub_partition_map): Add a new
10255         argument DISK into HOOK of ITERATE.
10256         (grub_partition_iterate): Add a new argument DISK to HOOK.
10258         * include/grub/normal.h (enum grub_completion_type): New enum.
10259         (grub_completion_type_t): New type.
10260         (GRUB_COMPLETION_TYPE_COMMAND): New constant.
10261         (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
10262         (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
10263         (GRUB_COMPLETION_TYPE_FILE): Likewise.
10264         (grub_normal_do_completion): Added a new argument HOOK.
10265         (grub_normal_print_device_info): New prototype.
10267         * include/grub/disk.h (grub_print_partinfo): Removed.
10269         * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
10270         (normal_mod_SOURCES): Likewise.
10271         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10272         (normal_mod_SOURCES): Likewise.
10274         * commands/ls.c (grub_ls_list_disks): Use
10275         grub_normal_print_device_info instead of grub_print_partinfo. Free
10276         PNAME.
10277         (grub_ls_list_files): Use grub_normal_print_device_info instead of
10278         duplicating the code.
10280 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
10282         * commands/i386/pc/vbe_list_modes.c: Update source formatting to
10283         follow GCS more precisely.
10284         * commands/i386/pc/vbe_test.c: Likewise.
10285         * include/grub/i386/pc/vbe.h: Likewise.
10286         * term/i386/pc/vesafb.c: Likewise.
10287         * video/i386/pc/vbe.c: Likewise.
10289 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
10291         * DISTLIST: Added term/i386/pc/vesafb.c
10292         DISTLIST: Added video/i386/pc/vbe.c
10293         DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
10294         DISTLIST: Added commands/i386/pc/vbe_test.c.
10295         * commands/i386/pc/vbe_list_modes.c: New file.
10296         * commands/i386/pc/vbe_test.c: Likewise.
10297         * term/i386/pc/vesafb.c: Likewise.
10298         * video/i386/pc/vbe.c: Likewise.
10299         * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
10300         (grub_vbe_probe) Added prototype.
10301         (grub_vbe_set_video_mode) Likewise.
10302         (grub_vbe_get_video_mode) Likewise.
10303         (grub_vbe_get_video_mode_info) Likewise.
10304         (grub_vbe_set_pixel_rgb) Likewise.
10305         (grub_vbe_set_pixel_index) Likewise.
10306         * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
10307         (pkgdata_MODULES): Added vesafb.mod.
10308         (pkgdata_MODULES): Added vbe_list_modes.mod.
10309         (pkgdata_MODULES): Added vbe_test.mod.
10310         (vbe_mod_SOURCES): Added.
10311         (vbe_mod_CFLAGS): Likewise.
10312         (vesafb_mod_SOURCES): Likewise.
10313         (vesafb_mod_CFLAGS): Likewise.
10314         (vbe_list_modes_mod_SOURCES): Likewise.
10315         (vbe_list_modes_mod_CFLAGS): Likewise.
10316         (vbe_test_mod_SOURCES): Likewise.
10317         (vbe_test_mod_CFLAGS): Likewise.
10319 2005-08-14  Yoshinori K. Okuji  <okuji@enbug.org>
10321         * normal/command.c (grub_command_execute): If INTERACTIVE is
10322         false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
10323         CMDLINE. Disable the pager if INTERACTIVE is true.
10324         All callers are changed.
10326         * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
10327         before reading a config file.
10328         * normal/main.c (read_config_file): Even if a command is not
10329         found, register it if it is within an entry.
10331         * util/grub-emu.c: Include sys/types.h and unistd.h.
10332         (options): Added --hold.
10333         (struct arguments): Added a new member "hold".
10334         (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
10335         missing.
10336         (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
10337         cleared by a debugger, if it is not zero.
10339         * include/grub/normal.h (grub_command_execute): Add an argument
10340         INTERACTIVE.
10342 2005-08-14  Vesa Jaaskelainen  <chaac@nic.fi>
10344         * DISTLIST: Added include/grub/i386/pc/vbe.h.
10346 2005-08-13  Yoshinori K. Okuji  <okuji@enbug.org>
10348         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
10349         program with another one, because the old one didn't detect a bug
10350         in gcc-3.4. Always use regparm 2, because the new test is still
10351         not enough for gcc-4.0. Someone must investigate a simple test
10352         case which detects a bug in gcc-4.0.
10354 2005-08-12  Yoshinori K. Okuji  <okuji@enbug.org>
10356         * DISTLIST: Added normal/completion.c.
10358         * normal/completion.c: New file.
10360         * term/i386/pc/console.c (grub_console_getwh): New function.
10361         (grub_console_term): Assign grub_console_getwh to getwh.
10363         * normal/cmdline.c (grub_tab_complete): Removed. Now the same
10364         function is defined in normal/completion.c as
10365         grub_normal_do_completion.
10366         (grub_cmdline_get): Use grub_normal_do_completion instead of
10367         grub_tab_complete.
10369         * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
10370         returns non-zero, otherwise return 0.
10371         (grub_partition_iterate): First, probe the partition map. Then,
10372         call ITERATE only for this partition map.
10374         * kern/misc.c (grub_strncmp): Rewritten.
10376         * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
10377         returns non-zero. Otherwise return 0.
10379         * include/grub/partition.h (grub_partition_map_iterate): Return
10380         int instead of void.
10382         * include/grub/normal.h (grub_normal_do_completion): New prototype.
10384         * include/grub/misc.h (grub_strncmp): Change the type of N to
10385         grub_size_t.
10387         * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
10388         of void.
10390         * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
10391         unsigned explicitly before comparing it with I.
10393         * kern/main.c (grub_env_write_root): Add the attribute unused into
10394         VAR.
10396         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
10397         normal/completion.c.
10398         (normal_mod_SOURCES): Likewise.
10399         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
10400         (normal_mod_SOURCES): Likewise.
10402         * normal/command.c (grub_iterate_commands): If ITERATE returns
10403         non-zero, return one immediately.
10405 2005-08-09  Vesa Jaaskelainen  <chaac@nic.fi>
10407         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
10408         * kern/i386/pc/startup.S: Updated Global Descriptor table's
10409         descriptions.
10410         (grub_vbe_get_controller_info): New function.
10411         (grub_vbe_get_mode_info): Likewise.
10412         (grub_vbe_set_mode): Likewise.
10413         (grub_vbe_get_mode): Likewise.
10414         (grub_vbe_set_memory_window): Likewise.
10415         (grub_vbe_get_memory_window): Likewise.
10416         (grub_vbe_set_scanline_length): Likewise.
10417         (grub_vbe_get_scanline_length): Likewise.
10418         (grub_vbe_set_display_start): Likewise.
10419         (grub_vbe_get_display_start): Likewise.
10420         (grub_vbe_set_palette_data): Likewise.
10421         * include/grub/i386/pc/vbe.h: New file.
10423 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
10425         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
10426         kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
10427         * DISTLIST: Likewise.
10428         * kern/ieee1275/of.c: Moved to ...
10429         * kern/ieee1275/ieee1275.c: ... here.
10431 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
10433         * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
10434         (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
10435         Pass 0 as `end' parameter to grub_strtoul().
10437 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
10439         * include/grub/powerpc/ieee1275/console.h: Do not include
10440         <grub/types.h>.  Do not include <grub/symbol.h>.  Remove ASM_FILE
10441         ifdef.
10442         (grub_console_cur_color): Remove i386-specific prototype.
10443         (grub_console_real_putchar): Likewise.
10444         (grub_console_checkkey): Likewise.
10445         (grub_console_getkey): Likewise.
10446         (grub_console_getxy): Likewise.
10447         (grub_console_gotoxy): Likewise.
10448         (grub_console_cls): Likewise.
10449         (grub_console_setcursor): Likewise.
10450         * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
10451         Include <grub/machine/console.h>.
10452         * term/ieee1275/ofconsole.c: Likewise.
10454 2005-08-08  Yoshinori K. Okuji  <okuji@enbug.org>
10456         * Makefile.in (LIBLZO): New variable.
10458         * configure.ac: Check for LZO version 2.
10460         * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
10461         lzo/lzo1x.h instead of lzo1x.h.
10463         * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
10464         of -llzo.
10466         * util/i386/pc/grub-setup.c (main): Do not free PREFIX
10467         twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
10469         * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
10470         copying the data from PARTITION to P.
10472 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
10474         * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
10475         negative, unload the module.
10477         * util/i386/pc/grub-setup.c (setup): The name of the PC partition
10478         map is "pc_partition_map" but not "pc".
10479         (usage): Fix the description. The options are --boot-image and
10480         --core-image but not --boot-file or --core-file.
10481         (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
10482         based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
10483         DEFAULT_DIRECTORY.
10485         * util/i386/pc/grub-install.in: Do not specify --boot-file or
10486         --core-file. Specify INSTALL_DEVICE as an argument.
10488         * util/console.c: Include config.h.
10489         [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
10490         [HAVE_NCURSES_H]: Include ncurses.h.
10491         [HAVE_CURSES_H]: Include curses.h.
10492         [!A_NORMAL] (A_NORMAL): Defined as zero.
10493         [!A_STANDOUT] (A_STANDOUT): Likewise.
10495         * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
10496         -lncurses.
10497         * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
10499         * configure.ac: Check for curses libraries and headers.
10501         * Makefile.in (LIBCURSES): New variable.
10503         * genmk.rb (Script::rule): Set the executable bits.
10505         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
10506         name of the PC partition map is "pc_partition_map" but not "pc".
10508 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
10510         * util/i386/pc/grub-install.in (grub_probefs): New variable.
10511         (modules): Likewise.
10512         (usage): Added descriptions for --modules and --grub-probefs.
10513         Handle --modules and --grub-probefs. Save the arguments in MODULES
10514         and GRUB_PROBEFS, respectively.
10515         Auto-detect a filesystem module against GRUBDIR. If the result is
10516         empty and modules are not specified explicitly, abort the
10517         installation. Add the result to MODULES.
10519         * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
10520         disk/powerpc/ieee1275/ofdisk.c,
10521         include/grub/powerpc/ieee1275/init.h and
10522         term/powerpc/ieee1275/ofconsole.c.
10523         Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
10524         term/ieee1275/ofconsole.c.
10526         * include/grub/powerpc/ieee1275/console.h: Resurrected.
10528         * COPYING: Upgraded to the latest version. Only the address of the
10529         FSF office has changed.
10531 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
10533         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
10534         kern/ieee1275.c with kern/ieee1275/of.c.
10536         * kern/ieee1275.c: Moved to ...
10537         * kern/ieee1275/of.c: ... here.
10539 2005-08-06  Yoshinori K. Okuji  <okuji@enbug.org>
10541         * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
10542         readability.
10544         * config.guess: Updated to the latest version from gnulib.
10545         * config.sub: Likewise.
10546         * install.sh: Likewise.
10547         * mkinstalldirs: Likewise.
10549         * include/grub/console.h: Removed. This file is arch-specific. Do
10550         not put this in include/grub.
10552         * include/grub/i386/pc/console.h: Resurrected.
10554         * util/console.c: Include grub/machine/console.h instead of
10555         grub/console.h.
10556         * util/grub-emu.c: Likewise.
10558 2005-08-04  Marco Gerards  <metgerards@student.han.nl>
10560         * kern/term.c (grub_putcode): Use `grub_getwh' instead of
10561         hardcoded value.
10563         From Vincent Pelletier  <subdino2004@yahoo.fr>
10564         * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
10565         Redefined to use grub_getwh.
10566         (grub_term): New member named getwh.
10567         (grub_getwh): New prototype.
10568         * kern/term.c (grub_getwh): New function.
10569         * term/i386/pc/console.c (grub_console_getwh): New function.
10570         (grub_console_term): New member `getwh'.
10571         * term/i386/pc/vga.c (grub_vga_getwh): New function.
10572         (grub_vga_term): New member `getwh'.
10573         * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
10574         grub_ssize_t.
10575         (grub_ofconsole_getw): New function.
10576         (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
10577         (grub_ofconsole_term): New field named getwh and new initial
10578         value.
10580 2005-08-03  Hollis Blanchard  <hollis@penguinppc.org>
10582         * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
10583         * include/grub/ieee1275/ieee1275.h: ... to here.  All users updated.
10584         Move `abort', `grub_reboot', and `grub_halt' prototypes ...
10585         * include/grub/powerpc/ieee1275/kernel.h: ... to here.
10586         * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
10587         of <grub/machine/ieee1275.h>.
10588         * commands/ieee1275/reboot.c: Likewise.
10589         * boot/powerpc/ieee1275/ieee1275.c: Move ...
10590         * kern/ieee1275.c: ... to here.  All users updated.  Change all
10591         parameter structs to use new type `grub_ieee1275_cell_t'.
10592         * term/powerpc/ieee1275/ofconsole.c: Move ...
10593         * term/ieee1275/ofconsole.c: ... to here.  All users updated.
10594         * disk/powerpc/ieee1275/ofdisk.c: Move ...
10595         * disk/ieee1275/ofdisk.c: ... to here.  All users updated.
10596         * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
10597         to return int.
10598         * include/grub/i386/pc/console.h: Move to include/grub/console.h.
10599         Remove unused prototypes.  All users updated.
10600         * include/grub/powerpc/ieee1275/console.h: Removed.
10601         * include/grub/powerpc/ieee1275/ieee1275.h: Define
10602         `grub_ieee1275_cell_t'.
10603         * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
10604         Cast comparisons with -1 to the correct type.
10605         * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
10606         type to match `grub_ieee1275_entry_fn'.
10608 2005-08-01  Yoshinori K. Okuji  <okuji@enbug.org>
10610         * DISTLIST: Added util/i386/pc/grub-probefs.c.
10612         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
10613         (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
10614         partmap/sun.c.
10615         (grub_probefs_SOURCES): New variable.
10617         * util/i386/pc/grub-probefs.c: New file.
10619         * util/i386/pc/grub-setup.c (main): Call
10620         grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
10621         grub_hfs_init and grub_jfs_init to initialize the system. Call
10622         grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
10623         grub_pc_partition_map_fini to finish the system.
10625 2005-07-31  Yoshinori K. Okuji  <okuji@enbug.org>
10627         * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
10628         function.
10629         (grub_multiboot_load_elf32): Likewise.
10630         (grub_multiboot_is_elf64): Likewise.
10631         (grub_multiboot_load_elf64): Likewise.
10632         (grub_multiboot_load_elf): Likewise.
10633         (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
10634         an ELF32 or ELF64 file.
10635         This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
10637         From Serbinenko Vladimir <serbinenko.vova@list.ru>:
10638         * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
10639         NULL before calling FS->LABEL.
10640         * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
10641         * commands/ls.c (grub_ls_list_files): Show labels, if possible.
10642         (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
10643         before calling FS->LABEL.
10645 2005-07-26  Yoshinori K. Okuji  <okuji@enbug.org>
10647         * util/i386/pc/grub-install.in (datadir): New variable.
10648         (libdir): Removed.
10649         (pkgdatadir): New variable.
10650         (pkglibdir): Removed.
10652 2005-07-24  Yoshinori K. Okuji  <okuji@enbug.org>
10654         * DISTLIST: Added util/i386/pc/grub-install.in.
10656         * util/i386/pc/grub-install.in: New file.
10658         * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
10659         (grub_install_SOURCES): Likewise.
10661         * genmk.rb: Added support for scripts.
10662         (Script): New class.
10663         (scripts): New variable.
10665         * Makefile.in (install-local): Install sbin_SCRIPTS by
10666         INSTALL_SCRIPT.
10667         (uninstall): Remove sbin_SCRIPTS.
10669         * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
10670         device, try to get a GRUB device by
10671         grub_util_biosdisk_get_grub_dev.
10672         Free DEST_DEV.
10674         * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
10675         description for --device-map.
10677 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
10679         Change the semantics of variable hooks. They now return strings
10680         instead of error values.
10682         * util/i386/pc/grub-setup.c: Include grub/env.h.
10683         (setup): Use grub_device_set_root instead of grub_env_set.
10685         * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
10686         grub_env_get instead of grub_device_set_root and
10687         grub_device_get_root, respectively.
10689         * kern/main.c (grub_env_write_root): New function.
10690         (grub_set_root_dev): Register grub_env_write_hook for "root". Use
10691         grub_env_set instead of grub_device_set_root.
10693         * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
10694         many variables.
10695         (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
10696         rather than calling ENV->WRITE_HOOK afterwards.
10697         (grub_env_get): Return the result of ENV->READ_HOOK rather than
10698         passing a pointer of a pointer.
10699         (grub_register_variable_hook): Change the types of "read_hook" and
10700         "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
10701         respectively.
10702         Allocate the default empty string on the heap, because this string
10703         may be freed later.
10705         * kern/device.c: Include grub/env.h.
10706         (grub_device_set_root): Removed.
10707         (grub_device_get_root): Likewise.
10708         (grub_device_open): Use grub_env_get instead of
10709         grub_device_get_root.
10711         * include/grub/env.h (grub_env_read_hook_t): New type.
10712         (grub_env_write_hook_t): Likewise.
10713         (grub_env_var): Change the types of "read_hook" and "write_hook"
10714         to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
10715         (grub_register_variable_hook): Likewise.
10717         * include/grub/device.h (grub_device_set_root): Removed.
10718         (grub_device_set_root): Likewise.
10720         * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
10721         make sure that DIRNAME terminates with '/', so that
10722         grub_fat_find_dir will fail if PATH is not a directory.
10724         * commands/ls.c (grub_ls_list_files): Remove the qualifier const
10725         from DIRNAME.
10726         Use the qualifier auto for print_files and print_files_long.
10727         If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
10728         as a regular file.
10729         Put a newline only if there is no error.
10730         (grub_cmd_ls): Remove grub_ls_print_files, because this is not
10731         used.
10733 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
10735         * kern/partition.c (grub_partition_probe): Initialize PART to
10736         NULL. Otherwise, when no partition map is registered, this returns
10737         a garbage.
10739 2005-07-19  Yoshinori K. Okuji  <okuji@enbug.org>
10741         * partmap/apple.c (apple_partition_map_iterate): Check if POS
10742         equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
10743         valid.
10745 2005-07-18  Yoshinori K. Okuji  <okuji@enbug.org>
10747         * commands/ls.c (grub_ls_list_disks): Print the filesystem
10748         information on each device, if it does not have partitions. Print
10749         "Device" instead of "Disk", because this function is not specific
10750         to disk devices.
10752         * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
10753         static to ensure that it is put on the memory rather than a
10754         register.
10756 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
10758         * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
10759         (grub_cat_init): Likewise.
10760         * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
10761         (options): Likewise.
10762         * commands/configfile.c (GRUB_MOD_INIT): Likewise.
10763         (grub_configfile_init): Likewise.
10764         * font/manager.c (GRUB_MOD_INIT): Likewise.
10765         * commands/help.c (GRUB_MOD_INIT): Likewise.
10766         (grub_help_init): Likewise.
10767         * normal/command.c (grub_command_init): Likewise.
10768         * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
10769         * disk/loopback.c (grub_loop_init): Likewise.
10770         (GRUB_MOD_INIT): Likewise.
10771         * commands/ls.c (grub_ls_init): Likewise.
10772         (GRUB_MOD_INIT): Likewise.
10773         (options): Likewise.
10774         * commands/boot.c (grub_boot_init): Likewise.
10775         (GRUB_MOD_INIT): Likewise.
10776         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
10777         * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
10778         (GRUB_MOD_INIT): Likewise.
10779         * commands/cmp.c (grub_cmp_init): Likewise.
10780         (GRUB_MOD_INIT): Likewise.
10782         * normal/arg.c: Use <> instead of "" to include header files.
10783         (SHORT_ARG_HELP): New macro.
10784         (SHORT_ARG_USAGE): Likewise.
10785         (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
10786         of 'h' and 'u' for help and usage, respectively. Use more GNU-like
10787         descriptions.
10788         (find_short): Check if C is 'h' or 'u' explicitly.
10789         (grub_arg_show_help): Use space characters instead of tabs. Treat
10790         SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
10791         are shown with --help and --usage only if they are not used for
10792         the command itself.
10793         (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
10794         'h' and 'u'.
10796         * include/grub/arg.h (struct grub_arg_option): Add the qualifier
10797         const into "longarg". Change the type of "shortarg" to int.
10799 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
10801         * boot/i386/pc/boot.S (boot_drive_check): New label.
10803         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
10804         macro.
10806         * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
10807         which do not pass a boot drive correctly. Copied from GRUB Legacy.
10809 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
10811         * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
10812         When turning off Gate A20, skip the check and return immediately,
10813         because this is not fatal usually.
10815 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
10817         * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
10818         be 0x7C00 instead of 0x8000.
10820         * boot/i386/pc/pxeboot.S: Rewritten.
10822         * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
10823         EXT_C.
10824         (gate_a20_check_state): Read a byte from 0x108000. Invert the
10825         result.
10827 2005-07-16  Yoshinori K. Okuji  <okuji@enbug.org>
10829         * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
10830         robustness. This routine now supports a BIOS call and System
10831         Control Port A to modify the gate A20.
10833         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
10834         Increased to 0x440.
10836 2005-07-12  Hollis Blanchard  <hollis@penguinppc.org>
10838         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
10839         device path and resulting ihandle.
10840         (grub_ofdisk_close): dprintf the ihandle being closed.
10841         (grub_ofdisk_read): dprintf function parameters.
10842         * kern/mm.c (grub_mm_init_region): Likewise.
10843         * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
10844         (grub_linux_boot): dprintf the Linux entry point, initrd address and
10845         size, and boot arguments.
10846         (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
10847         before loading into memory.
10848         (grub_rescue_cmd_initrd): dprintf the initrd's address and size
10849         before loading into memory.
10851 2005-07-12  Yoshinori K. Okuji  <okuji@enbug.org>
10853         * kern/mm.c: Added much documentation.
10854         (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
10855         8, set to 5 instead of 8.
10857 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
10859         * DISTLIST: Added util/i386/pc/grub-mkimage.c.
10861         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
10862         (grub_mkdevicemap_SOURCES): New variable.
10864         * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
10865         lib/device.c of GRUB Legacy.
10867 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
10869         * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
10870         instead of PATH is NULL.
10872 2005-07-09  Vincent Pelletier  <subdino2004@yahoo.fr>
10874         * commands/cmp.c (BUFFER_SIZE): New macro.
10875         (grub_cmd_cmp): Close the right file at the right time.  Compare
10876         only data just read.  Don't report files of different  size as
10877         identical.  Dynamically allocate buffers.  Move variable
10878         declarations at the beginning of function.
10880 2005-07-09  Yoshinori Okuji  <okuji@enbug.org>
10882         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
10883         reverse.
10885 2004-07-04  Vincent Pelletier  <subdino2004@yahoo.fr>
10887         * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
10888         when backspace is pressed at beginning of line.
10890 2005-07-03  Yoshinori Okuji  <okuji@enbug.org>
10892         * DISTLIST: Added genfslist.sh.
10894         * normal/main.c (fs_module_list): New variable.
10895         (autoload_fs_module): New function.
10896         (read_fs_list): Likewise.
10897         (grub_normal_execute): Call read_fs_list.
10899         * kern/fs.c (grub_fs_autoload_hook): New variable.
10900         (grub_fs_probe): Added support for auto-loading.
10902         * include/grub/normal.h (struct grub_fs_module_list): New struct.
10903         (grub_fs_module_list_t): New type.
10905         * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
10906         (grub_fs_autoload_hook): New prototype.
10908         * genfslist.sh: New file.
10910         * genmk.rb: Added a rule to generate a filesystem list.
10912 2005-06-30  Marco Gerards  <metgerards@student.han.nl>
10914         * configure.ac: Fix the test for cross-compiling.
10916         * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'.  Don't
10917         define GRUB_UTIL anymore.
10919         * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
10920         so this function works on other systems than just big endian.
10921         (load_modules): Likewise.
10922         (add_segments): Likewise.
10924 2005-06-23  Hollis Blanchard  <hollis@penguinppc.org>
10926         * kern/misc.c (grub_vsprintf): Add `longfmt'.  If format string
10927         contains `l' modifier, get a long from va_arg().
10929 2005-06-23  Yoshinori K. Okuji  <okuji@enbug.org>
10931         * kern/mm.c (grub_free): If the next free block which is being
10932         merged is the first free block, set the first block to the block
10933         being freed.
10934         Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
10936 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
10938         * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
10939         `grub_ieee1275_chosen'.
10941 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
10943         * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
10944         (grub_ieee1275_chosen): New variable.
10945         (cmain): Initialize and use `grub_ieee1275_chosen' instead of
10946         `chosen'.
10947         * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
10948         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
10949         Rename first argument to `phandle' for consistency.
10950         (grub_ieee1275_get_property_length): Likewise.
10951         (grub_ieee1275_next_property): Likewise.  Change type of first argument
10952         to grub_ieee1275_phandle_t.
10953         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
10954         Move export next to declaration.
10955         (grub_ieee1275_chosen): New variable.
10956         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
10957         Correct cosmetic typo.
10958         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
10959         `grub_ieee1275_chosen'.
10960         * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
10961         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
10962         (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
10963         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
10964         `grub_ieee1275_chosen'.
10966 2005-05-10  Hollis Blanchard  <hollis@penguinppc.org>
10968         * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
10969         /chosen/bootargs.
10970         * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
10971         /chosen/bootargs as "variable=value" pairs.
10973 2005-05-08  Vincent Pelletier  <subdino2004@yahoo.fr>
10975         * include/grub/misc.h (grub_dprintf): New macro.
10976         (grub_real_dprintf): New prototype.
10977         (grub_strword): Likewise.
10978         (grub_iswordseparator): Likewise.
10979         * kern/misc.c (grub_real_dprintf): New function.
10980         (grub_strword): Likewise.
10981         (grub_iswordseparator): Likewise.
10983 2005-04-30  Hollis Blanchard  <hollis@penguinppc.org>
10985         * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
10986         (roundup): Remove macro.
10987         (grub_ieee1275_flags): Make static.
10988         (grub_ieee1275_realmode): Remove.
10989         (grub_ieee1275_test_flag): New function.
10990         (grub_ieee1275_set_flag): Likewise.
10991         (find_options): Rename to `grub_ieee1275_find_options'; update
10992         callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
10993         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
10994         (cmain): New prototype.
10995         (cmain): Use `grub_ieee1275_set_flag' instead of accessing
10996         `grub_ieee1275_flags' directly.
10997         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
10998         machine/biosdisk.h.
10999         * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
11000         Don't include grub/machine/init.h.
11001         (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
11002         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
11003         Remove prototype.
11004         (grub_ieee1275_realmode): Likewise.
11005         (grub_ieee1275_flag): New enum.
11006         (grub_ieee1275_test_flag): New prototype.
11007         (grub_ieee1275_set_flag): New prototype.
11008         * include/grub/powerpc/ieee1275/init.h: Remove file.
11009         * include/grub/powerpc/ieee1275/ofdisk.h: New file.
11010         * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
11011         Include grub/machine/console.h.  Include grub/machine/ofdisk.h.
11012         (grub_machine_fini): Don't call `grub_ieee1275_release'.  Remove
11013         comment.
11014         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
11015         `grub_ieee1275_test_flag'.
11016         (grub_ieee1275_encode_devname): Likewise.
11018 2005-04-21  Hollis Blanchard  <hollis@penguinppc.org>
11020         * include/grub/powerpc/ieee1275/ieee1275.h
11021         (grub_ieee1275_encode_devname): New prototype.
11022         (grub_ieee1275_get_filename): Likewise.
11023         * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
11024         function.
11025         (grub_set_prefix): Likewise.
11026         (grub_machine_init): Call grub_set_prefix.
11027         * kern/powerpc/ieee1275/openfw.c: Fix typos.
11028         (grub_parse_type): New enum.
11029         (grub_ieee1275_get_devargs): New function.
11030         (grub_ieee1275_get_devname): Likewise.
11031         (grub_ieee1275_parse_args): Likewise.
11032         (grub_ieee1275_get_filename): Likewise.
11033         (grub_ieee1275_encode_devname): Likewise.
11035 2005-03-30  Marco Gerards  <metgerards@student.han.nl>
11037         * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
11038         `grub_loader_unset'.
11040 2005-03-26  Hollis Blanchard  <hollis@penguinppc.org>
11042         * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
11043         instead of grub_ieee1275_interpret.
11044         (grub_halt_init): New function.
11045         (grub_halt_fini): Likewise.
11046         (GRUB_MOD_INIT): Correct message grammar.
11047         * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
11048         instead of grub_ieee1275_interpret.
11049         (grub_reboot_init): New function.
11050         (grub_reboot_fini): Likewise.
11051         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
11052         commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
11053         util/i386/pc/misc.c with commands/ieee1275/halt.c,
11054         commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
11055         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
11056         function.
11057         * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
11058         Add prototype.
11059         * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
11060         prototype.
11061         (grub_halt): Likewise.
11062         * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
11063         (cmain): Remove __attribute__((unused)).
11064         * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
11065         (grub_heap_len): Likewise.
11066         (grub_machine_fini): New function.
11067         * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
11068         (grub_halt): Likewise.
11069         * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
11070         function.
11071         * util/powerpc/ieee1275/misc.c: New file.
11073 2005-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
11075         * DISTLIST: New file.
11076         * gendistlist.sh: Likewise.
11078         * Makefile.in (COMMON_DISTFILES): Removed.
11079         (BOOT_DISTFILES): Likewise.
11080         (CONF_DISTFILES): Likewise.
11081         (DISK_DISTFILES): Likewise.
11082         (FS_DISTFILES): Likewise.
11083         (INCLUDE_DISTFILES): Likewise.
11084         (KERN_DISTFILES): Likewise.
11085         (LOADER_DISTFILES): Likewise.
11086         (TERM_DISTFILES): Likewise.
11087         (UTIL_DISTFILES): Likewise.
11088         (DISTFILES): Likewise.
11089         (uninstall): Uninstall files in $(pkgdata_DATA).
11090         (DISTLIST): New target.
11091         (distdir): Use the contents of the file DISTLIST to get a list of
11092         distributed files.
11094 2005-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
11096         * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
11097         descriptor. This is ported from GRUB Legacy.
11099         * gencmdlist.sh: Added an extra semicolon to make it work with
11100         old sed versions. Reported by Robert Bihlmeyer
11101         <robbe@orcus.priv.at>.
11103 2005-03-08  Yoshinori Okuji  <okuji@enbug.org>
11105         Automatic loading of commands is supported.
11107         * normal/main.c (read_command_list): New function.
11108         (grub_normal_execute): Call read_command_list.
11110         * normal/command.c (grub_register_command): Return zero or CMD.
11111         Allocate CMD->NAME from the heap.
11112         Initialize CMD->MODULE_NAME to zero.
11113         Find the same name as well. If the same command is found and it is
11114         a dummy command, overwrite members. If it is not a dummy command,
11115         return zero.
11116         (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
11117         (grub_command_find): If a dummy command is found, load a module
11118         and retry to find a command only once.
11120         * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
11121         make sure that each command is loaded.
11123         * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
11124         macro.
11125         (struct grub_command): Remove const from the member `name'.
11126         Add a new member `module_name'.
11127         (grub_register_command): Return grub_command_t.
11129         * commands/help.c (grub_cmd_help): Call grub_command_find to make
11130         sure that each command is loaded.
11132         * genmk.rb (PModule::rule): Specify a module name without the
11133         suffix ".mod" to gencmdlist.sh.
11135 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
11137         * gencmdlist.sh: New file.
11139         * genmk.rb (PModule::rule): Generate a rule for a command list.
11140         Clean command.lst.
11141         Generate command.lst from $(COMMANDFILES).
11143         * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
11144         (DATA): Added $(pkgdata_DATA).
11145         (install-local): Install files in $(pkgdata_DATA).
11147 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
11149         * term/i386/pc/vga.c (debug_command): Removed.
11150         (GRUB_MOD_INIT): Do not register the command "debug".
11152         From Hollis Blanchard:
11153         * commands/configfile.c: New file.
11154         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11155         commands/configfile.c.
11156         (pkgdata_MODULES): Added configfile.mod.
11157         (configfile_mod_SOURCES): New variable.
11158         (configfile_mod_CFLAGS): Likewise.
11159         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
11160         commands/configfile.c.
11161         (pkgdata_MODULES): Added configfile.mod.
11162         (configfile_mod_SOURCES): New variable.
11163         (configfile_mod_CFLAGS): Likewise.
11164         * util/grub-emu.c (main): Call grub_configfile_init and
11165         grub_configfile_fini.
11166         * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
11167         prototype.
11168         [GRUB_UTIL] (grub_configfile_fini): Likewise.
11170 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
11172         * normal/arg.c (grub_arg_show_help): Do not show the bug report
11173         address.
11175         * commands/help.c (grub_cmd_help): Do not print newlines after
11176         the last command in print_command_help.
11178 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
11180         * commands/default.h: New file.
11181         * commands/timeout.h: Likewise.
11182         * normal/context.c: Likewise.
11184         * util/misc.c: Do not include sys/times.h.
11185         Include sys/time.h and grub/machine/time.h.
11186         (grub_get_rtc): Rewritten with gettimeofday.
11188         * util/grub-emu.c (main): Call grub_default_init and
11189         grub_timeout_init before grub_normal_init, and call
11190         grub_timeout_fini and grub_default_fini after grub_main.
11192         * util/console.c (grub_ncurses_checkkey): Return the read
11193         character or -1.
11195         * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
11196         timeouts.
11198         * normal/main.c (read_config_file): Push MENU. If this fails,
11199         print an error and wait for a user input.
11200         Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
11201         If a menu is empty or an error occurs, pop MENU.
11202         (grub_normal_execute): Pop and free MENU after grub_menu_run
11203         returns.
11205         * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
11207         * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
11208         include time.h.
11209         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
11210         without GRUB_UTIL.
11211         * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
11212         time.h.
11213         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
11214         without GRUB_UTIL.
11216         * include/grub/normal.h (struct grub_menu_list): New struct.
11217         (grub_menu_list_t): New type.
11218         (struct grub_context): New struct.
11219         (grub_context_t): New type.
11220         (grub_register_command): Got rid of EXPORT_FUNC.
11221         (grub_unregister_command): Likewise.
11222         (grub_context_get): New prototype.
11223         (grub_context_get_current_menu): Likewise.
11224         (grub_context_push_menu): Likewise.
11225         (grub_context_pop_menu): Likewise.
11226         [GRUB_UTIL] (grub_default_init): Likewise.
11227         [GRUB_UTIL] (grub_default_fini): Likewise.
11228         [GRUB_UTIL] (grub_timeout_init): Likewise.
11229         [GRUB_UTIL] (grub_timeout_fini): Likewise.
11231         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
11232         commands/timeout.c and normal/context.c.
11233         (pkgdata_MODULES): Added default.mod and timeout.mod.
11234         (normal_mod_SOURCES): Added normal/context.c.
11235         (default_mod_SOURCES): New variable.
11236         (default_mod_CFLAGS): Likewise.
11237         (timeout_mod_SOURCES): Likewise.
11238         (timeout_mod_CFLAGS): Likewise.
11239         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
11240         conf/i386-pc.rmk.
11241         (pkgdata_MODULES): Added default.mod and timeout.mod.
11242         (normal_mod_SOURCES): Added normal/context.c.
11243         (default_mod_SOURCES): New variable.
11244         (default_mod_CFLAGS): Likewise.
11245         (timeout_mod_SOURCES): Likewise.
11246         (timeout_mod_CFLAGS): Likewise.
11248         * Makefile.in (all-local): Added $(MKFILES).
11250 2005-02-21  Vincent Pelletier  <subdino2004@yahoo.fr>
11252         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
11253         (grub_emu_SOURCES): Likewise.
11254         (pkgdata_MODULES): Add `sun.mod'.
11255         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
11256         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11257         `partmap/sun.c'.
11258         (pkgdata_MODULES): Add `sun.mod'.
11259         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
11260         * include/grub/partition.h (grub_sun_partition_map_init): New
11261         prototype.
11262         (grub_sun_partition_map_fini): Likewise.
11263         * partmap/sun.c: New file.
11264         * util/grub-emu.c (main): Initialize and de-initialize the sun
11265         partitionmap support.
11267 2005-02-19  Yoshinori K. Okuji  <okuji@enbug.org>
11269         This implements an Emacs-like menu entry editor.
11271         * normal/menu_entry.c: New file.
11273         * util/console.c (grub_ncurses_putchar): Translate some Unicode
11274         characters to ASCII.
11275         (saved_char): New variable.
11276         (grub_ncurses_checkkey): Rewritten completely.
11277         (grub_ncurses_getkey): Likewise.
11278         (grub_ncurses_init): Call raw instead of cbreak.
11280         * normal/menu.c (print_entry): Do not put a space.
11281         (init_page): Renamed to ...
11282         (grub_menu_init_page): ... this. All callers changed.
11283         (edit_menu_entry): Removed.
11284         (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
11286         * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
11288         * kern/misc.c (grub_vprintf): Call grub_refresh.
11290         * normal/menu.c (DISP_LEFT): Renamed to ...
11291         * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
11292         * normal/menu.c (DISP_UP): Renamed to ...
11293         * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
11294         * normal/menu.c (DISP_RIGHT): Renamed to ...
11295         * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
11296         * normal/menu.c (DISP_DOWN): Renamed to ...
11297         * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
11298         * normal/menu.c (DISP_HLINE): Renamed to ...
11299         * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
11300         * normal/menu.c (DISP_VLINE): Renamed to ...
11301         * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
11302         * normal/menu.c (DISP_UL): Renamed to ...
11303         * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
11304         * normal/menu.c (DISP_UR): Renamed to ...
11305         * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
11306         * normal/menu.c (DISP_LL): Renamed to ...
11307         * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
11308         * normal/menu.c (DISP_LR): Renamed to ...
11309         * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
11310         * normal/menu.c (TERM_WIDTH): Renamed to ...
11311         * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
11312         * normal/menu.c (TERM_HEIGHT): Renamed to ...
11313         * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
11314         * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
11315         * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
11316         * normal/menu.c (TERM_MARGIN): Renamed to ...
11317         * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
11318         * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
11319         * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
11320         * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
11321         * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
11322         * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
11323         * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
11324         * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
11325         * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
11326         * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
11327         * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
11328         * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
11329         * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
11330         * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
11331         * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
11332         * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
11333         * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
11334         * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
11335         * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
11336         * normal/menu.c (TERM_CURSOR_X): Renamed to ...
11337         * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
11338         All callers changed.
11340         * include/grub/normal.h: New prototype.
11342         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11343         normal/menu_entry.c.
11344         (normal_mod_SOURCES): Likewise.
11345         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11346         (normal_mod_SOURCES): Likewise.
11348 2005-02-15  Yoshinori K. Okuji  <okuji@enbug.org>
11350         * include/grub/normal.h (grub_halt_init): New prototype.
11351         (grub_halt_fini): Likewise.
11352         (grub_reboot_init): Likewise.
11353         (grub_reboot_fini): Likewise.
11355         * util/grub-emu.c: Include signal.h.
11356         (main_env): New global variable.
11357         (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
11358         catch C-c.
11359         (grub_machine_fini): New function.
11360         (main): Call grub_halt_init and grub_reboot_init before
11361         grub_main, and grub_reboot_fini and grub_halt_fini after it.
11362         Call setjmp with MAIN_ENV to go back afterwards.
11363         Call grub_machine_fini right before return.
11365         * include/grub/util/misc.h: Include setjmp.h.
11366         (main_env): New prototype.
11368         * include/grub/kernel.h (grub_machine_fini): New prototype.
11369         * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
11370         * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
11372         * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
11373         * kern/i386/pc/init.c (grub_machine_fini): Likewise.
11374         * term/i386/pc/console.c (grub_console_fini): Likewise.
11376         * util/i386/pc/misc.c: New file.
11378         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11379         util/i386/pc/misc.c, commands/i386/pc/halt.c and
11380         commands/i386/pc/reboot.c.
11382 2005-02-14  Guillem Jover  <guillem@hadrons.org>
11384         * include/grub/dl.h (grub_dl_check_header): New prototype.
11385         (grub_arch_dl_check_header): Change return type to grub_err_t,
11386         remove size parameter and export function.  Update all callers.
11387         * kern/dl.c (grub_dl_check_header): New function.
11388         (grub_dl_load_core): Use `grub_dl_check_header' instead of
11389         `grub_arch_dl_check_header'.  Check ELF type.  Check if sections
11390         are inside the core.
11391         * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
11392         independent ELF header checks.
11393         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
11394         * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
11395         `grub_dl_check_header' instead of explicit checks.  Check for the
11396         ELF type.
11397         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
11398         `grub_dl_check_header' instead of explicit checks.  Remove arch
11399         specific ELF header checks.
11401         * util/grub-emu.c (grub_arch_dl_check_header): Remove the
11402         argument SIZE.
11404 2005-02-13  Hollis Blanchard  <hollis@penguinppc.org>
11406         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
11407         * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
11409 2005-02-12  Hollis Blanchard  <hollis@penguinppc.org>
11411         * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
11412         return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
11413         (part_map_iterate): Clear `grub_errno' and return 0 if
11414         `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
11415         * partmap/amiga.c (amiga_partition_map_iterate): Return
11416         GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
11417         * partmap/apple.c (apple_partition_map_iterate): Likewise.
11419 2005-02-01  Guillem Jover  <guillem@hadrons.org>
11421         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
11422         help info.
11424 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
11426         * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
11427         Removed prototype.
11428         (grub_rescue_cmd_linux): New prototype.
11429         (grub_rescue_cmd_initrd): Likewise.
11430         * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
11431         `bi_rec'.
11432         (grub_linux_release_mem): Release the memory for the initrd.
11433         (grub_load_linux): Renamed from this...
11434         (grub_rescue_cmd_linux): ...To this.  Changed all callers.
11435         Changed `entry' not to be static.  Loop over memory regions to
11436         find another one when the default fails.
11437         (grub_rescue_cmd_initrd): New function.
11438         (grub_linux_init): Remove function.
11439         (grub_linux_fini): Likewise.
11440         (GRUB_MOD_INIT): Register `initrd'.
11441         (GRUB_MOD_FINI): Unregister `initrd'.
11442         * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
11443         Function removed.
11444         (grub_linux_normal_fini): Likewise.
11445         (GRUB_MOD_INIT): Register `initrd'.
11446         (GRUB_MOD_FINI): Unregister `initrd'.
11448 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
11450         * commands/help.c: New file.
11451         * normal/arg.c (show_help): Renamed to...
11452         (grub_arg_show_help): ... this.
11453         * commands/i386/pc/halt.c: New file.
11454         * commands/i386/pc/reboot.c: Likewise.
11455         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
11456         (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
11457         (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
11458         (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
11459         variables.
11460         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11461         `commands/help.c'.
11462         (pkgdata_MODULES): Add `help.mod'.
11463         (help_mod_SOURCES, help_mod_CFLAGS): New variables.
11464         * grub/i386/pc/init.h (grub_reboot): New prototype.
11465         (grub_halt): Likewise.
11466         * include/grub/normal.h (grub_arg_show_help): New prototype.
11467         (grub_help_init): Likewise.
11468         (grub_help_fini): Likewise.
11469         * util/grub-emu.c (main): Initialize and deinitialize the help
11470         command.
11472         * normal/cmdline.c (grub_cmdline_get): Doc fix.
11474         * normal/command.c (grub_command_init): Fixed the description of
11475         the `set' and `unset' commands.
11477 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
11479         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
11480         function.
11481         * commands/ieee1275/halt.c: New file.
11482         * commands/ieee1275/reboot.c: Likewise.
11483         * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
11484         `__attribute__ ((unused))'.  Some GCS related fixed.
11485         (grub_suspend_init) [GRUB_UTIL]: Function removed.
11486         (grub_suspend_fini): Likewise.
11487         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
11488         and `halt.mod'.
11489         (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
11490         (halt_mod_CFLAGS): New variables.
11491         * include/grub/powerpc/ieee1275/ieee1275.h
11492         (grub_ieee1275_interpret): New prototype.
11494 2005-01-29  Yoshinori K. Okuji  <okuji@enbug.org>
11496         * include/grub/misc.h (memmove): New prototype.
11497         (memcpy): Likewise.
11499 2005-01-22  Hollis Blanchard  <hollis@penguinppc.org>
11501         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
11502         `devpath' to 0.  Use `name' instead of `devpath' with `grub_strndup'.
11504 2005-01-22  Marco Gerards  <metgerards@student.han.nl>
11506         * kern/misc.c (grub_strndup): Function rewritten.
11508 2005-01-22  Vincent Pelletier  <subdino2004@yahoo.fr>
11510         * normal/menu.c (TERM_WIDTH): Macro redefined.
11511         (TERM_TOP_BORDER_Y): Likewise.
11512         (draw_border): Replaced while-loop by a for-loop.  Make the number
11513         of lines consistent with the number of lines displayed in
11514         print_entries.  Added a margin below the rectangle.
11515         (print_entry): Make the entry fit in the rectangle.
11516         (print_entries): Display the scroll arrows next to the right
11517         border.
11519 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
11521         * fs/minix.c (grub_minix_find_file): Reserve more space for
11522         `fpath' so the \0 can be stored.  Use `grub_strcpy' instead of
11523         `grub_strncpy' to copy `path' into it.
11525 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
11527         Add the loopback device, a device via which files can be accessed
11528         as devices.
11530         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
11531         (pkgdata_MODULES): Add loopback.mod.
11532         (loopback_mod_SOURCES): New variable.
11533         (loopback_mod_CFLAGS): Likewise.
11534         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11535         `disk/loopback.c'.
11536         (pkgdata_MODULES): Add loopback.mod.
11537         (loopback_mod_SOURCES): New variable.
11538         (loopback_mod_CFLAGS): Likewise.
11539         * disk/loopback.c: new file.
11540         * include/grub/normal.h (grub_loop_init): New prototype.
11541         (grub_loop_fini): New prototype.
11542         * util/grub-emu.c (main): Initialize and de-initialize loopback
11543         support.
11544         * include/grub/disk.h (grub_disk_dev_id): Add
11545         `GRUB_DISK_DEVICE_LOOPBACK_ID'.
11547 2005-01-20  Hollis Blanchard  <hollis@penguinppc.org>
11549         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
11550         function.
11551         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
11552         (suspend_mod_SOURCES): New variable.
11553         (suspend_mod_CFLAGS): Likewise.
11554         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
11555         New prototype.
11556         * commands/ieee1275/suspend.c: New file.
11558 2005-01-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
11560         * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
11561         ((unused))' to `__attribute__ ((used))'.
11562         (GRUB_MOD_FINI): Likewise.
11563         * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
11564         * genmk.rb (PModule): Assign space to common symbols when linking
11565         modules.
11567 2005-01-20  Marco Gerards  <metgerards@student.han.nl>
11569         * include/grub/mm.h (grub_mm_init_region): Change the type of the
11570         `unsigned' arguments to `grub_size_t'.
11571         (grub_malloc): Likewise.
11572         (grub_realloc): Likewise.
11573         (grub_memalign): Likewise.
11574         * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
11575         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
11576         * util/misc.c (grub_malloc): Likewise.
11577         (grub_realloc): Likewise.
11578         * kern/mm.c (get_header_from_pointer): Change the casts to
11579         `unsigned' into a cast to `grub_size_t'.
11581         * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
11582         point to `currnode' when `currnode' is changed.
11584         * util/grub-emu.c (main): Initialize `progname'.  Reported by Nico
11585         Schottelius <nico-linux@schottelius.org>.
11587 2005-01-09  Hollis Blanchard  <hollis@penguinppc.org>
11589         * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
11590         (note_path): Remove variable.
11591         (GRUB_IEEE1275_NOTE_NAME): New macro.
11592         (GRUB_IEEE1275_NOTE_TYPE): Likewise.
11593         (grub_ieee1275_note_hdr): New structure.
11594         (grub_ieee1275_note_desc): Likewise.
11595         (grub_ieee1275_note): Likewise.
11596         (load_note): Remove `dir' argument.  All callers updated.  Remove
11597         `note_img' and `path'.  Do not load a file from `note_path'.
11598         Initialize a struct grub_ieee1275_note and write that to `out'.
11599         Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
11601 2005-01-05  Marco Gerards  <metgerards@student.han.nl>
11603         * util/misc.c (grub_util_read_image): Revert last change.  It
11604         called `grub_util_read_at', which seeks from the beginning of the
11605         file.
11607 2005-01-04  Hollis Blanchard  <hollis@penguinppc.org>
11609         * TODO: Add note about endianness in grub-mkimage.
11610         * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
11611         section.
11612         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
11613         (grub_mkimage_SOURCES): New target.
11614         * include/grub/kernel.h (grub_start_addr): Remove variable.
11615         (grub_end_addr): Likewise.
11616         (grub_total_module_size): Likewise.
11617         (grub_kernel_image_size): Likewise.
11618         (GRUB_MODULE_MAGIC): New constant.
11619         (grub_module_info): New structure.
11620         (grub_arch_modules_addr): New prototype.
11621         (grub_get_end_addr): Remove prototype.
11622         * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
11623         * include/grub/powerpc/ieee1275/kernel.h: New file.
11624         * include/grub/util/misc.h (grub_util_get_fp_size): New
11625         prototype.
11626         (grub_util_read_at): Likewise.
11627         (grub_util_write_image_at): Likewise.
11628         * kern/main.c (grub_get_end_addr): Remove function.
11629         (grub_load_modules): Call grub_arch_modules_addr instead of using
11630         grub_end_addr.  Look for a grub_module_info struct in memory.  Use
11631         the grub_module_info fields instead of calling grub_get_end_addr
11632         as loop conditions.  Move grub_add_unused_region code here.
11633         (grub_add_unused_region): Remove function.
11634         * kern/i386/pc/init.c: Include grub/cache.h.
11635         (grub_machine_init): Remove call to grub_get_end_addr.  Remove
11636         one call to add_mem_region.
11637         (grub_arch_modules_addr): New function.
11638         * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
11639         (grub_total_module_size): Likewise.
11640         Include grub/machine/kernel.h.
11641         (grub_arch_modules_addr): New function.
11642         * util/grub-emu.c (grub_end_addr): Remove variable.
11643         (grub_total_module_size): Likewise.
11644         (grub_arch_modules_addr): New function.
11645         * util/misc.c: Include unistd.h.
11646         (grub_util_get_fp_size): New function.
11647         (grub_util_read_at): Likewise.
11648         (grub_util_write_image_at): Likewise.
11649         (grub_util_read_image): Call grub_util_read_at.
11650         (grub_util_write_image): Call grub_util_write_image_at.
11651         * util/i386/pc/grub-mkimage.c (generate_image): Allocate
11652         additional memory in kernel_img for a struct grub_module_info.
11653         Fill in that grub_module_info.
11654         * util/powerpc/ieee1275/grub-mkimage.c: New file.
11656 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
11658         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
11659         New function.
11660         * include/grub/powerpc/ieee1275/ieee1275.h
11661         (grub_ieee1275_milliseconds): New prototype.
11662         * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
11663         Change to 1000.
11664         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
11665         grub_ieee1275_milliseconds.
11667 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
11669         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
11670         variable.
11671         (find_options): New function.
11672         (cmain): Call find_options.
11673         * include/grub/powerpc/ieee1275/ieee1275.h
11674         (grub_ieee1275_realmode): New extern variable.
11675         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
11676         grub_map if grub_ieee1275_realmode is false.
11678 2004-12-29  Marco Gerards  <metgerards@student.han.nl>
11680         * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
11681         lines are inserted and make it work like readline.  Reported by
11682         Vincent Pelletier <subdino2004@yahoo.fr>.
11684 2004-12-28  Marco Gerards  <metgerards@student.han.nl>
11686         * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
11688         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
11689         `kern/powerpc/cache.S'.
11691 2004-12-27  Marco Gerards  <metgerards@student.han.nl>
11693         * genmk.rb: Handle the `Program' class in the main loop.  Written
11694         by Johan Rydberg <jrydberg@gnu.org>.
11695         (Program): New class.
11696         (programs): New variable.
11697         * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
11698         instead of "grub/machine/ieee1275.h".  Include <grub/kernel.h>
11699         instead of "grub/kernel.h".  Include <grub/machine/init.h>.
11700         (help_arch): Function removed.
11701         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
11702         `powerpc/libgcc.h' and `loader.h'.
11703         (pkgdata_PROGRAMS): New variable.
11704         (sbin_UTILITIES): Variable removed.
11705         (grub_emu_SOURCES): Added kern/powerpc/cache.S.
11706         (grubof_SOURCES): Variable re-defined so it only includes the
11707         core functionality.
11708         (grubof_CFLAGS): Remove `-DGRUBOF'.
11709         (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
11710         (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
11711         (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
11712         (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
11713         (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
11714         (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
11715         (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
11716         (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
11717         (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
11718         (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
11719         (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
11720         (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
11721         (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
11722         (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
11723         (pc_mod_CFLAGS): New variables.
11724         * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
11725         (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
11726         * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
11727         * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
11728         Moved from here...
11729         * include/grub/i386/pc/init.h (grub_os_area_addr)
11730         (rub_os_area_size): ... to here.
11731         * include/grub/powerpc/ieee1275/ieee1275.h
11732         (grub_ieee1275_entry_fn): Export symbol.
11733         * include/grub/powerpc/ieee1275/init.h: New file.
11734         * include/grub/powerpc/libgcc.h: Likewise.
11735         * include/grub/cache.h: Likewise.
11736         * kern/powerpc/cache.S: Likewise.  Written by Hollis Blanchard
11737         <hollis@penguinppc.org>.
11738         * kern/dl.c: Include <grub/cache.h>.
11739         (grub_dl_flush_cache): New function.
11740         (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
11741         for this module.
11742         * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
11743         (grub_console_init): Removed prototypes.
11744         (grub_machine_init): Don't initialize the modules anymore.
11745         * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
11746         static.
11747         * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
11748         Macro undef removed.
11749         (GRUB_HOST_WORDS_BIGENDIAN): New macro.
11750         * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
11751         relocation `R_PPC_REL32'.  Return an error when the relocation is
11752         unknown.
11753         * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
11754         * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
11755         * util/misc.c (grub_arch_sync_caches): Likewise.
11757 2004-12-19  Marco Gerards  <metgerards@student.han.nl>
11759         * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
11760         `symlist.c', add `grubof_symlist.c'.
11761         (symlist.c): Variable removed.
11762         (grubof_HEADERS): Variable added.
11763         (grubof_symlist.c): New target.
11764         (kernel_syms.lst): Use `grubof_HEADERS' instead of
11765         `kernel_img_HEADERS'.
11766         (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
11767         * kern/powerpc/dl.c: New file.
11768         * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
11769         Function removed.
11770         (grub_arch_dl_relocate_symbols): Likewise.
11771         (grub_register_exported_symbols): Likewise.
11773 2004-12-13  Marco Gerards  <metgerards@student.han.nl>
11775         * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
11776         (grub_ext2_dir): Likewise.  Don't return in case of an error, jump
11777         to fail instead.  Reported by Vincent Pelletier
11778         <subdino2004@yahoo.fr>.
11780         * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
11781         it is not allocated.  Reported by Vincent Pelletier
11782         <subdino2004@yahoo.fr>.
11784         * normal/cmdline.c (grub_tab_complete): Add a blank line to the
11785         output so the output looks better.
11787 2004-12-04  Marco Gerards  <metgerards@student.han.nl>
11789         Modulize the partition map support and add support for the amiga
11790         partition map.
11792         * commands/ls.c: Include <grub/partition.h> instead of
11793         <grub/machine/partition.h>.
11794         * kern/disk.c: Likewise.
11795         * kern/rescue.c: Likewise.
11796         * loader/i386/pc/chainloader.c: Likewise.
11797         * normal/cmdline.c: Likewise.
11798         * kern/powerpc/ieee1275/init.c: Likewise.
11799         (grub_machine_init): Call `grub_pc_partition_map_init',
11800         `grub_amiga_partition_map_init' and
11801         `grub_apple_partition_map_init'.
11802         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
11803         `disk/i386/pc/partition.c'.  Add `kern/partition.c'.
11804         (kernel_img_HEADERS): Remove `machine/partition.h'.  Add
11805         `partition.h' and `pc_partition.h'.
11806         (grub_setup_SOURCES): Remove
11807         `disk/i386/pc/partition.c'.  Add `kern/partition.c',
11808         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
11809         (grub_emu_SOURCES): Likewise.
11810         (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
11811         (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
11812         (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
11813         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
11814         `disk/powerpc/ieee1275/partition.c'.  Add `kern/partition.c',
11815         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
11816         (grubof_SOURCES): Likewise.
11817         * disk/i386/pc/partition.c: File removed.
11818         * disk/powerpc/ieee1275/partition.c: Likewise.
11819         * include/grub/powerpc/ieee1275/partition.h: Likewise.
11820         * include/grub/i386/pc/partition.h: Likewise.
11821         * kern/partition.c: New file.
11822         * partmap/amiga.c: Likewise.
11823         * partmap/apple.c: Likewise.
11824         * partmap/pc.c: Likewise.
11825         * include/grub/partition.h: Likewise..
11826         * include/grub/pc_partition.h: Likewise.
11827         * util/grub-emu.c: Include <grub/partition.h> instead of
11828         <grub/machine/partition.h>.
11829         (main): Call `grub_pc_partition_map_init',
11830         `grub_amiga_partition_map_init' and
11831         `grub_apple_partition_map_init' and deinitialize afterwards.
11832         * util/i386/pc/biosdisk.c: Include `#include
11833         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
11834         `<grub/machine/partition.h>'.
11835         * util/i386/pc/grub-setup.c: Likewise.
11836         * util/i386/pc/biosdisk.c: Likewise.
11837         (grub_util_biosdisk_get_grub_dev): Only access the PC specific
11838         partition information in case of a PC partition.
11839         * util/i386/pc/grub-setup.c: Include `#include
11840         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
11841         `<grub/machine/partition.h>'.
11842         (setup): Only access the PC specific partition information in case
11843         of a PC partition.
11845 2004-11-17  Hollis Blanchard  <hollis@penguinppc.org>
11847         * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
11848         (grub_longjmp): Likewise.
11849         * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
11850         20.
11851         * normal/powerpc/setjmp.S: New file.
11852         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
11853         `normal/powerpc/setjmp.S'.
11854         (grubof_CFLAGS): Add `-DGRUBOF'.
11855         * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
11856         [GRUB_UTIL && !GRUBOF].
11858 2004-11-16  Marco Gerards  <metgerards@student.han.nl>
11860         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
11861         property named `name'.  Correctly handle the error returned by
11862         `grub_ieee1275_finddevice' if a device can not be opened.
11864 2004-11-02  Hollis Blanchard  <hollis@penguinppc.org>
11866         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
11867         `actual' for negativity.
11868         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
11869         kern/fshelp.c.
11871 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
11873         * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
11874         (PAGE_OFFSET): New macro.
11875         (CRTC_ADDR_PORT): Likewise.
11876         (CRTC_DATA_PORT): Likewise.
11877         (START_ADDR_HIGH_REGISTER): Likewise.
11878         (START_ADDR_LOW_REGISTER): Likewise.
11879         (GRAPHICS_ADDR_PORT): Likewise.
11880         (GRAPHICS_DATA_PORT): Likewise.
11881         (READ_MAP_REGISTER): Likewise.
11882         (INPUT_STATUS1_REGISTER): Likewise.
11883         (INPUT_STATUS1_VERTR_BIT): Likewise.
11884         (page): New variable.
11885         (wait_vretrace): New function.
11886         (set_read_map): Likewise.
11887         (set_start_address): Likewise.
11888         (grub_vga_init): Use mode 0x10 instead of mode 0x12.  Switch to
11889         the right page.
11890         (check_vga_mem): Take the page into account.
11891         (write_char): Likewise.
11892         (write_cursor): Likewise.
11893         (scroll_up): Likewise.  Copy the page to the page that is not
11894         shown and switch between both pages.
11895         (grub_vga_putchar): Fix off by one error.
11896         (grub_vga_cls): Wait for the vertical retrace.  Take the page into
11897         account.
11899 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
11901         Add support for iso9660 (including rockridge).
11903         * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
11904         (iso9660_mod_SOURCES): New variable.
11905         (iso9660_mod_CFLAGS): Likewise.
11906         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
11907         * include/grub/fs.h (grub_iso9660_init): New prototype.
11908         * util/grub-emu.c (main): Call `grub_iso9660_init'.
11909         * fs/iso9660.c: New file.
11911         * include/grub/misc.h (grub_strncat): New prototype.
11912         * kern/misc.c (grub_strncat): New function.
11914         * fs/hfs.c (grub_hfs_mount): Translate the error
11915         `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
11916         * fs/jfs.c (grub_jfs_mount): Likewise.
11917         * fs/ufs.c (grub_ufs_mount): Likewise.
11919 2004-10-28  Hollis Blanchard  <hollis@penguinppc.org>
11921         * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
11922         which initialized BAT registers.
11923         * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
11924         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
11925         Move from here...
11926         * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
11927         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
11928         ... to here.
11929         * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
11930         (grub_mapclaim): Likewise.
11931         * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
11932         grub_mapclaim instead of grub_ieee1275_claim.  Assign linux_addr by
11933         hand.
11935 2004-10-19  Hollis Blanchard  <hollis@penguinppc.org>
11937         * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
11938         (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
11939         -ffreestanding and -msoft-float.
11941 2004-10-15  Hollis Blanchard  <hollis@penguinppc.org>
11943         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
11944         append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
11945         set in grub_ieee1275_flags.
11947 2004-10-14  Hollis Blanchard  <hollis@penguinppc.org>
11949         * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
11950         prototype.
11951         * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
11952         grub_console_init first.
11953         Change the memory range used for grub_ieee1275_claim and
11954         grub_mm_init_region.
11955         Print an error message if the claim fails.
11956         Include <grub/misc.h>.
11958 2004-10-13  Hollis Blanchard  <hollis@penguinppc.org>
11960         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
11961         Call grub_children_iterate for device nodes of type `scsi',
11962         `ide', or `ata'.
11963         (grub_ofdisk_open): Remove manual device alias resolution.
11964         Fix memory leak when device cannot be opened.
11965         * include/grub/powerpc/ieee1275/ieee1275.h
11966         (grub_children_iterate): New prototype.
11967         * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
11968         New function.
11969         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
11970         Return -1 if args.size was -1.
11972 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
11974         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
11975         (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
11976         World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
11977         Open Firmware's memory for it; claim memory from _start to _end.
11978         * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
11979         (_end): New extern.
11980         (_start): Zero BSS from __bss_start to _end.
11981         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
11982         New extern.
11983         (GRUB_IEEE1275_NO_PARTITION_0): New #define.
11985 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
11987         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
11988         -1 if args.base was -1.
11990 2004-10-08  Hollis Blanchard  <hollis@penguinppc.org>
11992         * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
11993         escape sequence instead of a literal ^L. Also call
11994         grub_ofconsole_gotoxy.
11996 2004-10-03  Hollis Blanchard  <hollis@penguinppc.org>
11998         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
11999         void *  arguments to grub_addr_t.  All callers updated.  Also make
12000         the `result' argument optional.
12001         (grub_ieee1275_release): change void * arguments to grub_addr_t.
12002         All callers updated.
12004 2004-09-22  Hollis Blanchard  <hollis@penguinppc.org>
12006         * commands/ls.c (grub_ls_list_files): Use the string following the
12007         initial ')', if present, as the filesystem path.
12008         * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
12010         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
12012 2004-09-18  Yoshinori K. Okuji  <okuji@enbug.org>
12014         Make the source code of the menu interface more readable.
12016         * normal/menu.c: Include grub/mm.h.
12017         (TERM_WIDTH): New macro.
12018         (TERM_HEIGHT): Likewise.
12019         (TERM_INFO_HEIGHT): Likewise.
12020         (TERM_MARGIN): Likewise.
12021         (TERM_SCROLL_WIDTH): Likewise.
12022         (TERM_TOP_BORDER_Y): Likewise.
12023         (TERM_LEFT_BORDER_X): Likewise.
12024         (TERM_BORDER_WIDTH): Likewise.
12025         (TERM_MESSAGE_HEIGHT): Likewise.
12026         (TERM_BORDER_HEIGHT): Likewise.
12027         (TERM_NUM_ENTRIES): Likewise.
12028         (TERM_FIRST_ENTRY_Y): Likewise.
12029         (TERM_ENTRY_WIDTH): Likewise.
12030         (TERM_CURSOR_X): Likewise.
12031         (draw_border): Use macros instead of magic numbers.
12032         (print_entry): Likewise.
12033         (print_entries): Likewise.
12034         (run_menu): Likewise. Also, handle the key 'e'.
12035         (run_menu_entry): Ignore empty command lines.
12036         (print_message): Added a new argument EDIT. If EDIT is true,
12037         print a different message.
12038         (init_page): Likewise.
12039         (edit_menu_entry): New function. Not implemented yet.
12041 2004-09-17  Marco Gerards  <metgerards@student.han.nl>
12043         Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
12044         can be loaded from normal mode.
12046         * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
12047         `multiboot.mod'.
12048         (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
12049         (multiboot_mod_CFLAGS): New variables.
12050         * loader/i386/pc/linux_normal.c: New file.
12051         * loader/i386/pc/multiboot_normal.c: Likewise.
12053         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
12054         attribute `unused'.
12056         * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type.  Use
12057         `fdiro' to read the mode information from instead of `diro'.
12059         * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
12060         looking up a symlink.
12062         * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
12063         macro.
12064         * normal/command.c (grub_command_execute): Don't parse the
12065         arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
12066         flags of the command.
12068         * normal/menu.c (grub_menu_run): Fix typo.
12070 2004-09-14  Hollis Blanchard  <hollis@penguinppc.org>
12072         * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
12074         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
12075         `y + 1' instead of `y - 1'.
12077         * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
12079 2004-09-14  Yoshinori K. Okuji  <okuji@enbug.org>
12081         From Hollis Blanchard <hollis@penguinppc.org>:
12082         * kern/misc.c (memmove): New alias for grub_memmove.
12083         (memcmp): New alias for grub_memcmp.
12084         (memset): New alias for grub_memset.
12085         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
12086         Change "int handle" to "grub_ieee1275_phandle_t handle".
12087         * include/grub/powerpc/ieee1275/ieee1275.h
12088         (grub_ieee1275_get_property): Likewise.
12090 2004-09-12  Tomas Ebenlendr  <ebik@ucw.cz>
12092         Added normal mode command `chainloader' as module chain.mod, which
12093         depends on normal.mod and _chain.mod.
12095         * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
12096         (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
12097         * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
12098         Deleted prototype.
12099         * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
12100         but arguments parsing moved to ...
12101         (grub_chainloader_cmd): ... here.  New function.
12102         * include/grub/i386/pc/chainloader.h: New file.
12103         * loader/i386/pc/chainloader_normal.c: Likewise.
12105 2004-09-11  Marco Gerards  <metgerards@student.han.nl>
12107         * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
12108         (grub_mkimage_LDFLAGS): Likewise.
12109         (grub_emu_SOURCES): Likewise.
12110         (kernel_img_HEADERS): Added fshelp.h.
12111         * fs/ext2.c: Include <grub/fshelp.h>.
12112         (FILETYPE_REG): New macro.
12113         (FILETYPE_INO_REG): Likewise.
12114         (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
12115         Changed all users.
12116         (ext2_block_group): Renamed to `grub_ext2_block_group'.  Changed
12117         all users.
12118         (grub_fshelp_node): New struct.
12119         (grub_ext2_data): Added member `diropen'.  Changed member `inode'
12120         to a pointer.
12121         (grub_ext2_get_file_block): Removed function.
12122         (grub_ext2_read_block): New function.
12123         (grub_ext2_read_file): Replaced parameter `data' by `node'.
12124         This function was written.
12125         (grub_ext2_mount): Read the root inode.  Create a diropen struct.
12126         (grub_ext2_find_file): Removed function.
12127         (grub_ext2_read_symlink): New function.
12128         (grub_ext2_iterate_dir): Likewise.
12129         (grub_ext2_open): Rewritten.
12130         (grub_ext2_dir): Rewritten.
12131         * include/grub/fshelp.h: New file.
12132         * fs/fshelp.c: Likewise.
12134 2004-09-10  Yoshinori K. Okuji  <okuji@enbug.org>
12136         * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
12137         (print_message): Add a missing newline.
12138         (run_menu): Added timeout support.
12139         (run_menu_entry): New local function.
12140         (grub_menu_run): Added support for booting.
12142         * kern/loader.c (grub_loader_is_loaded): New function.
12144         * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
12145         (grub_get_rtc): Exported.
12147         * include/grub/i386/pc/time.h: Include grub/symbol.h.
12148         (grub_get_rtc): Exported.
12150         * include/grub/normal.h (struct grub_command_list): Remove
12151         constant from the member `command'.
12153         * include/grub/loader.h (grub_loader_is_loaded): Declared.
12155         * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
12157         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
12159 2004-08-28  Marco Gerards  <metgerards@student.han.nl>
12161         Add support for the JFS filesystem.
12163         * fs/jfs.c: New file.
12164         * include/grub/fs.h (grub_jfs_init): New prototype.
12165         (grub_jfs_fini): New prototype.
12166         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
12167         (grub_emu_SOURCES): Likewise.
12168         (pkgdata_MODULES): Add jfs.mod.
12169         (jfs_mod_SOURCES): New variable.
12170         (jfs_mod_CFLAGS): Likewise.
12171         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
12172         (grubof_SOURCES): Likewise.
12173         * util/grub-emu.c (main): Initialize and deinitialize JFS support.
12175         * fs/fat.c (grub_fat_find_dir): Convert the filename little
12176         endian to the host endian.
12177         (grub_fat_utf16_to_utf8): Move function from there...
12178         * kern/misc.c (grub_utf16_to_utf8): ...to here.  Do not convert
12179         the endianness of the source string anymore.
12180         * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
12182 2004-08-24  Marco Gerards  <metgerards@student.han.nl>
12184         * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
12185         (grub_boot_fini) [GRUB_UTIL]: Likewise.
12186         (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
12187         (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
12189         * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
12190         (grub_hfs_iterate_dir): Make the function static.  Add prototypes
12191         for `node_found' and `it_dir'.
12192         (grub_hfs_dir): Add prototype for `dir_hook'.
12194         * fs/minix.c (grub_minix_get_file_block): Add prototype for
12195         `grub_get_indir'.  Rename `indir' in two blocks to `indir16'
12196         and `indir32' to silence a gcc warning.
12198         * include/grub/fs.h (grub_hfs_init): New prototype.
12199         (grub_hfs_fini): Likewise.
12202 2004-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
12204         Each disk device has its own id now. This is useful to make use
12205         of multiple disk devices.
12207         * include/grub/disk.h (grub_disk_dev_id): New enum.
12208         (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
12209         (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
12211         * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
12212         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
12214         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
12215         GRUB_DISK_DEVICE_OFDISK_ID as an id.
12217         * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
12218         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
12220         * include/grub/disk.h (struct grub_disk_dev): Added a new member
12221         "id" which is used by the cache manager.
12223         * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
12224         of just "GRUB".
12226 2004-08-18  Marco Gerards  <metgerards@student.han.nl>
12228         * fs/hfs.c: New file.
12229         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
12230         (grub_emu_SOURCES): Likewise.
12231         (pkgdata_MODULES): Add hfs.mod.
12232         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
12233         (grubof_SOURCES): Likewise.
12234         * util/grub-emu.c (main): Initialize and deinitialize HFS support.
12236         * include/grub/misc.h (grub_strncasecmp): Add prototype.
12237         * kern/misc.c (grub_strncasecmp): Add function.
12239 2004-08-14  Marco Gerards  <metgerards@student.han.nl>
12241         * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
12242         with parentheses.
12244         * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
12245         (grub_ext2_dir): In case the directory entry type is unknown, read
12246         it from the inode.
12248 2004-08-02  Peter Bruin  <pjbruin@dds.nl>
12250         * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
12251         grub_load_linux instead of grub_rescue_cmd_linux as second
12252         argument of grub_rescue_register_command.
12254         * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
12256 2004-07-27  Marco Gerards  <metgerards@student.han.nl>
12258         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
12259         function.
12260         * commands/boot.c: Remove the check for `GRUB_UTIL'.
12261         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
12262         `loader/powerpc/ieee1275/linux.c',
12263         `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
12264         * include/grub/powerpc/ieee1275/ieee1275.h
12265         (grub_ieee1275_release): New prototype.
12266         * include/grub/powerpc/ieee1275/loader.h: Rewritten.
12267         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
12268         normal, boot, linux and linux_normal.
12269         * loader/powerpc/ieee1275/linux.c: New file.
12270         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
12272 2004-07-12  Marco Gerards  <metgerards@student.han.nl>
12274         * normal/arg.c (grub_arg_parse): Correct error handling after
12275         reallocating the argumentlist (check if `argl' is not null instead
12276         of checking if `args' is not null).
12277         * kern/mm.c (grub_realloc): Return the same pointer when using the
12278         same region, instead of returning the header address.
12280 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
12282         * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
12283         one block instead of two when looking for the initial partition.
12284         (grub_partition_probe): Initialize the local variable `p' with 0.
12285         Use base 10 for the grub_strtoul call.
12286         * kern/misc.c (grub_strncpy): Fix off by one bug.  Eliminated the
12287         need for one local variable.
12288         (grub_strtoul): Don't add the new value to `num', instead of that
12289         just assign it.
12291 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
12293         * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
12294         (pxeboot_img_SOURCES): New variable.
12295         (pxeboot_img_ASFLAGS): Likewise.
12296         (pxeboot_img_LDFLAGS): Likewise.
12297         * boot/i386/pc/pxeboot.S: New file.  Based on pxeloader.S from
12298         GRUB Legacy and boot.S.  Adopted for GRUB 2 by lode leroy
12299         <lode_leroy@hotmail.com>.
12301 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
12303         * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
12304         there was no input.
12306 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
12308         * normal/cmdline.c (grub_set_history): Fix off by one bug.  Fixed
12309         the history buffer logic.
12311 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
12313         * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
12314         (FILETYPE_INO_SYMLINK): New macros.
12315         (grub_ext2_find_file): Check if the node is a directory using the
12316         inode stat information instead of using the filetype in the
12317         dirent.  Exclude the first character of an absolute symlink.
12318         (grub_ext2_dir): Mask out the filetype part of the mode member of
12319         the inode.
12321 2004-05-24  Marco Gerards  <metgerards@student.han.nl>
12323         Add support for UFS version 1 and 2.  Add support for the minix
12324         filesystem version 1 and 2, both the variants with 14 and 30 long
12325         filenames.
12327         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
12328         fs/minix.c.
12329         (grub_emu_SOURCES): Likewise.
12330         (pkgdata_MODULES): Add ufs.mod and minix.mod.
12331         (ufs_mod_SOURCES): New variable.
12332         (ufs_mod_CFLAGS): Likewise.
12333         (minix_mod_SOURCES): Likewise.
12334         (minix_mod_CFLAGS): Likewise.
12335         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
12336         fs/minix.c.
12337         (grubof_SOURCES): Likewise.
12338         * fs/ufs.c: New file.
12339         * fs/minix.c: New file.
12340         * include/grub/fs.h (grub_ufs_init): New prototype.
12341         (grub_ufs_fini): Likewise.
12342         (grub_minix_init): Likewise.
12343         (grub_minix_fini): Likewise.
12344         * util/grub-emu.c (main): Initialize and deinitialize UFS and
12345         minix fs.
12347 2004-04-30  Jeroen Dekkers  <jeroen@dekkers.cx>
12349         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
12350         commands/ls.c, commands/terminal.c, commands/boot.c,
12351         commands/cmp.c and commands/cat.c.
12352         (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
12354         * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
12355         "env.h"
12357 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
12359         All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
12360         and grub_, respectively. Because the conversion is trivial and
12361         mechanical, I omit the details here. Please refer to the CVS
12362         if you need more information.
12364 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
12366         * include/pupa: Renamed to ...
12367         * include/grub: ... this.
12368         * util/i386/pc/pupa-mkimage.c: Renamed to ...
12369         * util/i386/pc/grub-mkimage.c: ... this.
12370         * util/i386/pc/pupa-setup.c: Renamed to ...
12371         * util/i386/pc/grub-setup.c: ... this.
12372         * util/pupa-emu.c: Renamed to ...
12373         * util/grub-emu.c: ... this.
12375 2004-03-29  Marco Gerards  <metgerards@student.han.nl>
12377         Add support for the newworld apple macintosh (PPC).  This has been
12378         tested on the powerbook 2000 only.  It only adds support for
12379         generic ieee1275 functions, console and disk support.  This should
12380         be easy to port to other architectures with support for Open
12381         Firmware.
12383         * configure.ac: Accept the powerpc as host_cpu.  In the case of
12384         the powerpc cpu set the host_vendor to ieee1275.  Make sure the i386
12385         specific tests are only executed while building for the i386.
12386         Inverse test for crosscompile.
12387         * genmk.rb (Utility): Allow assembler files.
12388         * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
12389         * conf/powerpc-ieee1275.rmk: New file.
12390         * disk/powerpc/ieee1275/ofdisk.c: Likewise.
12391         * disk/powerpc/ieee1275/partition.c: Likewise.
12392         * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
12393         * include/pupa/powerpc/ieee1275/console.h: Likewise.
12394         * include/pupa/powerpc/ieee1275/partition.h: Likewise.
12395         * include/pupa/powerpc/ieee1275/time.h: Likewise.
12396         * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
12397         * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
12398         * include/pupa/powerpc/ieee1275/loader.h
12399         * include/pupa/powerpc/setjmp.h: Likewise.
12400         * include/pupa/powerpc/types.h: Likewise.
12401         * kern/powerpc/ieee1275/init.c: Likewise.
12402         * kern/powerpc/ieee1275/openfw.c: Likewise.
12403         * term/powerpc/ieee1275/ofconsole.c: Likewise.
12405         These files were written by Johan Rydberg
12406         (jrydberg@night.trouble.net) and I only modified them slightly.
12408         * boot/powerpc/ieee1275/cmain.c: New file.
12409         * boot/powerpc/ieee1275/crt0.S: Likewise.
12410         * boot/powerpc/ieee1275/ieee1275.c: Likewise.
12411         * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
12413 2004-03-14  Jeroen Dekkers  <jeroen@dekkers.cx>
12415         * Makefile.in: Update copyright.
12416         * genmodsrc.sh: Likewise.
12417         * gensymlist.sh: Likewise.
12418         * term/i386/pc/vga.c: Indent correctly.
12420         * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
12421         bugreporting address.
12422         * util/i386/pc/pupa-setup.c (usage): Likewise,
12423         (main): Call pupa_ext2_init and pupa_ext2_fini.
12425         * fs/fat.c (log2): Renamed to ...
12426         (fat_log2): ... this.
12427         All callers changed.
12428         * kern/misc.c (memcpy): Alias to pupa_memmove.
12429         * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
12430         lvalue cast.
12431         * util/console.c (pupa_ncurses_fini): Return 0.
12433         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
12434         Move fail label here.
12435         [__GNU__]: Don't warn when using stat.
12436         (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
12437         (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
12438         long int. Use strtol instead of strtoul.
12440 2004-03-14  Marco Gerards  <metgerards@student.han.nl>
12442         * commands/boot.c: New file.
12443         * commands/cat.c: Likewise.
12444         * commands/cmp.c: Likewise.
12445         * commands/ls.c: Likewise.
12446         * commands/terminal.c: Likewise.
12447         * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
12448         (pupa_register_command): Changed interface to match the new
12449         argument parser.
12450         (pupa_command_execute): Changed (almost rewritten) so it uses
12451         pupa_split_command.  Added support for setting variables using the
12452         syntax `foo=bar'.
12453         (rescue_command): Changed to work with the new argument parser.
12454         (terminal_command): Moved from here to commands/terminal.c.
12455         (set_command): New function.
12456         (unset_command): New function.
12457         (insmod_command): New function.
12458         (rmmod_command): New function.
12459         (lsmod_command): New function.
12460         (pupa_command_init): Don't initialize the command terminal
12461         anymore.  Initialize the commands set, unset, insmod, rmmod and
12462         lsmod.
12463         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
12464         (kernel_img_HEADERS): Add arg.h and env.h.
12465         (pupa_mkimage_LDFLAGS): Add kern/env.c.
12466         (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
12467         commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
12468         normal/arg.c.
12469         (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
12470         terminal.mod.
12471         (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
12472         (boot_mod_SOURCES): New variable.
12473         (terminal_mod_SOURCES): Likewise.
12474         (ls_mod_SOURCES): Likewise.
12475         (cmp_mod_SOURCES): Likewise.
12476         (cat_mod_SOURCES): Likewise.
12478         * normal/arg.c: New file.
12479         * kern/env.c: Likewise.
12480         * include/pupa/arg.h: Likewise.
12481         * include/pupa/env.h: Likewise.
12482         * font/manager.c (font_command): Changed to match argument parsing
12483         interface changes.
12484         (PUPA_MOD_INIT): Likewise.
12485         * hello/hello.c (pupa_cmd_hello): Likewise.
12486         (PUPA_MOD_INIT): Likewise.
12487         * include/pupa/disk.h: Include <pupa/device.h>.
12488         (pupa_print_partinfo): New prototype.
12489         * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
12490         (pupa_dl_get_prefix): Likewise.
12491         * include/pupa/misc.h: Include <pupa/err.h>.
12492         (pupa_isgraph): New prototype.
12493         (pupa_isdigit): Likewise.
12494         (pupa_split_cmdline): Likewise.
12495         * include/pupa/normal.h: Include <pupa/arg.h>.
12496         (pupa_command): Changed the prototype of the member `func' to
12497         match the argument parsing interface.  Added member `options'.
12498         (pupa_register_command): Updated to match function.
12499         (pupa_arg_parse): New prototype.
12500         (pupa_hello_init) [PUPA_UTIL]: New prototype.
12501         (pupa_hello_fini) [PUPA_UTIL]: Likewise.
12502         (pupa_ls_init) [PUPA_UTIL]: Likewise.
12503         (pupa_ls_fini) [PUPA_UTIL]: Likewise.
12504         (pupa_cat_init) [PUPA_UTIL]: Likewise.
12505         (pupa_cat_fini) [PUPA_UTIL]: Likewise.
12506         (pupa_boot_init) [PUPA_UTIL]: Likewise.
12507         (pupa_boot_fini) [PUPA_UTIL]: Likewise.
12508         (pupa_cmp_init) [PUPA_UTIL]: Likewise.
12509         (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
12510         (pupa_terminal_init) [PUPA_UTIL]: Likewise.
12511         (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
12512         * kern/disk.c: Include <pupa/file.h>.
12513         (pupa_print_partinfo): New function.
12514         * kern/dl.c: Include <pupa/env.h>.
12515         (pupa_dl_dir): Variable removed.
12516         (pupa_dl_load): Use the environment variable `prefix' instead of
12517         the variable pupa_dl_dir.
12518         (pupa_dl_set_prefix): Function removed.
12519         (pupa_dl_get_prefix): Likewise.
12520         * kern/i386/pc/init.c: Include <pupa/env.h>.
12521         (pupa_machine_init): Use the environment variable `prefix' instead of
12522         using pupa_dl_set_prefix to set the prefix.
12523         * kern/main.c: Include <pupa/env.h>.
12524         (pupa_set_root_dev): Use the environment variable `prefix' instead of
12525         using pupa_dl_get_prefix to get the prefix.
12526         * kern/misc.c: Include <pupa/env.h>.
12527         (pupa_isdigit): New function.
12528         (pupa_isgraph): Likewise.
12529         (pupa_ftoa): Likewise.
12530         (pupa_vsprintf): Added support for printing values of the type
12531         `double'.  Make it possible to format variable output when using
12532         formatting like `%1.2%f'.
12533         (pupa_split_cmdline): New function.
12534         * kern/rescue.c: Include <pupa/env.h>.
12535         (next_word): Removed function.
12536         (pupa_rescue_cmd_prefix): Likewise.
12537         (pupa_rescue_cmd_set): New function.
12538         (pupa_rescue_cmd_unset): New function.
12539         (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
12540         split the command line instead of splitting it here.  Added
12541         support for setting variables using the syntax `foo=bar'.  Don't
12542         initialize the prefix command anymore.  Initialized the set and
12543         unset commands.
12544         * normal/cmdline.c: Include <pupa/env.h>.
12545         (pupa_tab_complete): Added prototypes for print_simple_completion,
12546         print_partition_completion, add_completion, iterate_commands,
12547         iterate_dev, iterate_part and iterate_dir. Moved code to print
12548         partition information from here to kern/disk.c.
12549         (pupa_cmdline_run): Don't check if the function exists anymore.
12550         * normal/main.c: Include <pupa/env.h>.
12551         (pupa_rescue_cmd_normal): Use the environment variable `prefix'
12552         instead of using pupa_dl_get_prefix to get the prefix.
12553         * term/i386/pc/vga.c: Include <pupa/arg.h>.
12554         (check_vga_mem): Cast pointers to `void *' to silence a gcc
12555         warning.
12556         (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
12557         (pupa_vga_setcolor): Declare unused variables with `__attribute__
12558         ((unused))' to silence a gcc warning.
12559         (pupa_vga_setcolor): Likewise.
12560         (debug_command): Changed to match argument parsing
12561         interface changes.
12562         * util/pupa-emu.c: Include <pupa/env.h>.
12563         (options): Added 0's for unused fields to silence a gcc warning.
12564         (argp): Likewise.
12565         (main): Use the environment variable `prefix' instead of using
12566         pupa_dl_set_prefix to set the prefix.  Initialize the commands ls,
12567         boot, cmp, cat and terminal.  Finish the commands boot, cmp, cat
12568         and terminal.
12570         * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
12571         * util/misc.c: Include <malloc.h>.
12572         (pupa_malloc): Rewritten so errors are correctly reported.
12573         (pupa_realloc): Likewise.
12574         (pupa_memalign): Likewise.
12575         (pupa_mm_init_region): Declare unused variables with
12576         `__attribute__ ((unused))' to silence a gcc warning.
12577         * normal/i386/setjmp.S: Remove tab at the end of the file to
12578         silence a gcc warning.
12579         * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
12580         variables with `__attribute__ ((unused))' to silence a gcc
12581         warning.
12582         * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
12583         local variable i unsigned to silence a gcc warning.
12585         * kern/term.c: Include <pupa/misc.h>.
12586         (pupa_more_lines): New variable.
12587         (pupa_more): Likewise.
12588         (pupa_putcode): When the pager is active pause at the end of every
12589         screen.
12590         (pupa_set_more): New function.
12591         * include/pupa/term.h (pupa_set_more): New prototype.
12594 2004-03-07  Yoshinori K. Okuji  <okuji@enbug.org>
12596         Now this project is GRUB 2 rather than PUPA. The location of
12597         the CVS repository was moved to GRUB's.
12599         * configure.ac: Use bug-grub as the reporting address.
12600         Use GRUB instead of PUPA.
12601         Change the version number to 1.90.
12603 2004-02-24  Yoshinori K. Okuji  <okuji@enbug.org>
12605         * genkernsyms.sh: Updated copyright information.
12606         * genmk.rb: Likewise.
12607         * genmodsrc.sh: Likewise.
12608         * gensymlist.sh: Likewise.
12609         * boot/i386/pc/boot.S: Likewise.
12610         * boot/i386/pc/diskboot.S: Likewise.
12611         * disk/i386/pc/biosdisk.c: Likewise.
12612         * disk/i386/pc/partition.c: Likewise.
12613         * font/manager.c: Likewise.
12614         * fs/ext2.c: Likewise.
12615         * fs/fat.c: Likewise.
12616         * include/pupa/boot.h: Likewise.
12617         * include/pupa/device.h: Likewise.
12618         * include/pupa/disk.h: Likewise.
12619         * include/pupa/dl.h: Likewise.
12620         * include/pupa/elf.h: Likewise.
12621         * include/pupa/err.h: Likewise.
12622         * include/pupa/file.h: Likewise.
12623         * include/pupa/font.h: Likewise.
12624         * include/pupa/fs.h: Likewise.
12625         * include/pupa/kernel.h: Likewise.
12626         * include/pupa/loader.h: Likewise.
12627         * include/pupa/misc.h: Likewise.
12628         * include/pupa/mm.h: Likewise.
12629         * include/pupa/net.h: Likewise.
12630         * include/pupa/normal.h: Likewise.
12631         * include/pupa/rescue.h: Likewise.
12632         * include/pupa/setjmp.h: Likewise.
12633         * include/pupa/symbol.h: Likewise.
12634         * include/pupa/term.h: Likewise.
12635         * include/pupa/types.h: Likewise.
12636         * include/pupa/i386/setjmp.h: Likewise.
12637         * include/pupa/i386/types.h: Likewise.
12638         * include/pupa/i386/pc/biosdisk.h: Likewise.
12639         * include/pupa/i386/pc/boot.h: Likewise.
12640         * include/pupa/i386/pc/console.h: Likewise.
12641         * include/pupa/i386/pc/init.h: Likewise.
12642         * include/pupa/i386/pc/kernel.h: Likewise.
12643         * include/pupa/i386/pc/linux.h: Likewise.
12644         * include/pupa/i386/pc/loader.h: Likewise.
12645         * include/pupa/i386/pc/memory.h: Likewise.
12646         * include/pupa/i386/pc/multiboot.h: Likewise.
12647         * include/pupa/i386/pc/partition.h: Likewise.
12648         * include/pupa/i386/pc/time.h: Likewise.
12649         * include/pupa/i386/pc/vga.h: Likewise.
12650         * include/pupa/i386/pc/util/biosdisk.h: Likewise.
12651         * include/pupa/util/getroot.h: Likewise.
12652         * include/pupa/util/misc.h: Likewise.
12653         * include/pupa/util/resolve.h: Likewise.
12654         * kern/device.c: Likewise.
12655         * kern/disk.c: Likewise.
12656         * kern/dl.c: Likewise.
12657         * kern/err.c: Likewise.
12658         * kern/file.c: Likewise.
12659         * kern/fs.c: Likewise.
12660         * kern/loader.c: Likewise.
12661         * kern/main.c: Likewise.
12662         * kern/misc.c: Likewise.
12663         * kern/mm.c: Likewise.
12664         * kern/rescue.c: Likewise.
12665         * kern/term.c: Likewise.
12666         * kern/i386/dl.c: Likewise.
12667         * kern/i386/pc/init.c: Likewise.
12668         * kern/i386/pc/lzo1x.S: Likewise.
12669         * kern/i386/pc/startup.S: Likewise.
12670         * loader/i386/pc/chainloader.c: Likewise.
12671         * loader/i386/pc/linux.c: Likewise.
12672         * loader/i386/pc/multiboot.c: Likewise.
12673         * normal/cmdline.c: Likewise.
12674         * normal/command.c: Likewise.
12675         * normal/main.c: Likewise.
12676         * normal/menu.c: Likewise.
12677         * normal/i386/setjmp.S: Likewise.
12678         * term/i386/pc/console.c: Likewise.
12679         * term/i386/pc/vga.c: Likewise.
12680         * util/console.c: Likewise.
12681         * util/genmoddep.c: Likewise.
12682         * util/misc.c: Likewise.
12683         * util/pupa-emu.c: Likewise.
12684         * util/resolve.c: Likewise.
12685         * util/unifont2pff.rb: Likewise.
12686         * util/i386/pc/biosdisk.c: Likewise.
12687         * util/i386/pc/getroot.c: Likewise.
12688         * util/i386/pc/pupa-mkimage.c: Likewise.
12689         * util/i386/pc/pupa-setup.c: Likewise.
12691 2004-02-15  Jeroen Dekkers  <jeroen@dekkers.cx>
12693         * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
12694         when it is EXT2_BLOCK_SIZE (data).  New argument READ_HOOK, all
12695         callers changed.  Set DATA->DISK->READ_HOOK to READ_HOOK before
12696         reading and reset it after reading.
12697         (pupa_ext2_close): Return PUPA_ERR_NONE.
12699         * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
12700         Correct value.
12701         (struct linux_kernel_header): Add kernel_version and
12702         initrd_addr_max.
12703         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
12704         pupa_file_read succeeds.
12705         (pupa_rescue_cmd_initrd): Implement.
12707 2003-12-03  Marco Gerards  <metgerards@student.han.nl>
12709         * fs/ext2.c (pupa_ext2_label): New function.
12710         (pupa_ext2_fs): Added label.
12711         * fs/fat.c (pupa_fat_label): New function.
12712         (pupa_fat_fs): Added label.
12713         * include/pupa/fs.h (struct pupa_fs): Added prototype label.
12715         * kern/misc.c (pupa_strndup): New function.
12716         * include/pupa/misc.h (pupa_strndup): New prototype.
12718         * include/pupa/normal.h: Include <pupa/err.h>.
12719         (pupa_set_history): New prototype.
12720         (pupa_iterate_commands): New prototype.
12721         * normal/cmdline.c: Include <pupa/machine/partition.h>,
12722         <pupa/disk.h>, <pupa/file.h>.
12723         (hist_size): New variable.
12724         (hist_lines): Likewise.
12725         (hist_end): Likewise.
12726         (hist_used): Likewise.
12727         (pupa_set_history): New function.
12728         (pupa_history_get): Likewise.
12729         (pupa_history_add): Likewise.
12730         (pupa_history_replace): Likewise.
12731         (pupa_tab_complete): Likewise.
12732         (pupa_cmdline_run): Added tab completion and history buffer.  Tab
12733         completion shows partitionnames while completing partitions, this
12734         feature was suggested by Jeff Bailey.
12735         * normal/command.c (pupa_iterate_commands): New function.
12736         * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
12737         (pupa_normal_init): Initialize history buffer.
12738         (PUPA_MOD_INIT): Likewise.
12739         (pupa_normal_fini): Free the history buffer.
12740         (PUPA_MOD_FINI): Likewise.
12742         * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
12743         key.
12745         * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
12746         * configure.ac [i386]: Check for regparam bug.
12747         (NESTED_FUNC_ATTR) [! i386]: Defined.
12749 2003-11-17  Marco Gerards  <metgerards@student.han.nl>
12751         * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
12752         (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
12753         (pupa_emu_SOURCES): New variable.
12754         (pupa_emu_LDFLAGS): Likewise.
12755         * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
12756         (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
12757         * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
12758         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
12759         * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
12760         (pupa_jmp_buf): New typedef.
12761         (pupa_setjmp) [PUPA_UTIL]: New macro.
12762         (pupa_longjmp) [PUPA_UTIL]: Likewise.
12763         * include/pupa/term.h (struct pupa_term): New member `refresh'.
12764         (pupa_refresh): New prototype.
12765         * include/pupa/util/getroot.h: New file.
12766         * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
12767         it.
12768         * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
12769         (pupa_rescue_cmd_cat): Likewise.
12770         (pupa_rescue_cmd_ls): Likewise.
12771         (pupa_rescue_cmd_testload): Likewise.
12772         (pupa_rescue_cmd_lsmod): Likewise.
12773         * normal/cmdline.c (pupa_cmdline_get): Likewise.
12774         * normal/menu.c (run_menu): Likewise.
12775         * kern/term.c (pupa_cls): Likewise.
12776         (pupa_refresh): New function.
12777         * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
12778         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
12779         * util/console.c: New file.
12781         * util/i386/pc/getroot.c: New file.
12782         * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
12783         (pupa_putchar): New function.
12784         (pupa_refresh): Likewise.
12785         (xgetcwd): Function moved to ...
12786         (strip_extra_slashes): Likewise.
12787         (get_prefix): Likewise.
12788         * util/i386/pc/getroot.c: ... here.
12789         (find_root_device): Function moved and renamed to...
12790         * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
12791         Changed all callers.
12792         * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
12793         and renamed to...
12794         * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
12795         Changed all callers.
12796         * util/misc.c (pupa_memalign): New function.
12797         (pupa_mm_init_region): Likewise.
12798         (pupa_register_exported_symbols): Likewise.
12799         (pupa_putchar): Function removed.
12800         * util/pupa-emu.c: New file.
12802 2003-11-16  Jeroen Dekkers  <jeroen@dekkers.cx>
12804         * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
12805         (_multiboot_mod_SOURCES): New variable.
12806         (_multiboot_mod_CFLAGS): Likewise.
12807         * loader/i386/pc/multiboot.c: New file.
12808         * include/pupa/i386/pc/multiboot.h: Likewise.
12809         * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
12810         (pupa_multiboot_real_boot): New function.
12811         * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
12812         (pupa_multiboot_real_boot): New prototype.
12813         (pupa_rescue_cmd_multiboot): Likewise
12814         (pupa_rescue_cmd_module): Likewise.
12816         * kern/loader.c (pupa_loader_set): Continue when
12817         pupa_loader_unload_func() fails.
12818         (pupa_loader_unset): New function.
12819         * include/pupa/loader.h (pupa_loader_unset): New prototype.
12821         * kern/misc.c (pupa_stpcpy): New function.
12822         * include/pupa/misc.h (pupa_stpcpy): New prototype.
12824 2003-11-12  Marco Gerards  <metgerards@student.han.nl>
12826         * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
12827         for available extensions.
12829         * include/pupa/i386/pc/time.h: New file.
12830         * kern/disk.c: Include <pupa/machine/time.h>.
12831         (PUPA_CACHE_TIMEOUT): New macro.
12832         (pupa_last_time): New variable.
12833         (pupa_disk_open): Flush the cache when there was a timeout.
12834         (pupa_disk_close): Reset the timer.
12835         * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
12836         pupa_currticks.
12837         * util/misc.c: Include <sys/times.h>
12838         (pupa_get_rtc): New function.
12840 2003-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
12842         * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
12843         as blocks.
12844         (pupa_ext2_get_file_block): Use blocks member.
12846         * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
12847         first block. Return -1 instead of pupa_errno on error.
12849 2003-10-27  Marco Gerards  <metgerards@student.han.nl>
12851         * README: In the pupa-mkimage example use _chain instead of chain
12852         and ext2 instead of fat.
12853         * TODO: Replace ext2fs with jfs as an example.  Add an item for
12854         adding journal playback for ext2fs.
12855         * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
12856         (pkgdata_MODULES): Added ext2.mod.
12857         (ext2_mod_SOURCES): New variable.
12858         (ext2_mod_CFLAGS): Likewise.
12859         * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
12860         * include/pupa/misc.h (pupa_strncpy): New prototype.
12861         (pupa_strcat): Likewise.
12862         (pupa_strncmp): Likewise.
12863         * kern/misc.c (pupa_strcat): Enable function.
12864         (pupa_strncpy): New function.
12865         (pupa_strncmp): Likewise.
12866         * fs/ext2.c: New file.
12868         * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
12869         when the read failed before retrying.
12870         * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
12871         (_FILE_OFFSET_BITS): Likewise.
12872         * configure.ac: Added AC_SYS_LARGEFILE.
12874 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
12876         * genmk.rb (PModule#rule): Make sure to get only symbol names
12877         from the output of nm.
12878         Reported by Robert Millan <zeratul2@wanadoo.es>.
12880 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
12882         I forgot to check in these changes for a long time. This adds
12883         incomplete support for VGA console, and this is still very
12884         buggy. Also, a lot of consideration is required for I18N,
12885         UNICODE, and VGA font issues. Therefore, assume that this is
12886         such that "better than nothing".
12888         * font/manager.c: New file.
12889         * include/pupa/font.h: Likewise.
12890         * include/pupa/i386/pc/vga.h: Likewise.
12891         * term/i386/pc/vga.c: Likewise.
12892         * util/unifont2pff.rb: Likewise.
12894         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
12895         (pkgdata_MODULES): Added vga.mod and font.mod.
12896         (vga_mod_SOURCES): New variables.
12897         (vga_mod_CFLAGS): Likewise.
12898         (font_mod_SOURCES): Likewise.
12899         (font_mod_CFLAGS): Likewise.
12901         * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
12903         * include/pupa/term.h: Include pupa/err.h.
12904         (struct pupa_term): Added init and fini.
12905         Changed the argument of putchar to pupa_uint32_t.
12907         * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
12908         (pupa_console_real_putchar): New prototype.
12909         (pupa_console_putchar): Removed.
12910         (pupa_console_checkkey): Exported.
12911         (pupa_console_getkey): Likewise.
12913         * kern/misc.c (pupa_vsprintf): Add support for UNICODE
12914         characters.
12916         * kern/term.c (pupa_term_set_current): Rewritten.
12917         (pupa_putchar): Likewise.
12918         (pupa_putcode): New function.
12920         * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
12921         (pupa_console_real_putchar): ... this.
12922         (pupa_vga_set_mode): New function.
12923         (pupa_vga_get_font): Likewise.
12925         * normal/command.c: Include pupa/term.h.
12926         (terminal_command): New function.
12927         (pupa_command_init): Register the command "terminal".
12929         * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
12930         (DISP_UP): Likewise.
12931         (DISP_RIGHT): Likewise.
12932         (DISP_DOWN): Likewise.
12933         (DISP_HLINE): Likewise.
12934         (DISP_VLINE): Likewise.
12935         (DISP_UL): Likewise.
12936         (DISP_UR): Likewise.
12937         (DISP_LL): Likewise.
12938         (DISP_LR): Likewise.
12940         * term/i386/pc/console.c (pupa_console_putchar): New function.
12942 2003-02-08  NIIBE Yutaka  <gniibe@m17n.org>
12944         * util/resolve.c (pupa_util_resolve_dependencies): BUG
12945         FIX. Reverse the path_list.
12947         * include/pupa/normal.h: Export pupa_register_command and
12948         pupa_unregister_command.
12950         * hello/hello.c (pupa_cmd_hello): New module.
12951         * conf/i386-pc.rmk: Added hello.mod.
12953 2003-01-31  Yoshinori K. Okuji  <okuji@enbug.org>
12955         * kern/i386/pc/lzo1x.S: New file.
12957         * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
12958         (compress_kernel): New variable.
12959         (generate_image): Heavily modified to support compressing a
12960         large part of the core image.
12962         * util/misc.c (pupa_util_read_image): Fix a file descriptor
12963         leak.
12964         (pupa_util_load_image): New function.
12966         * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
12967         (pupa_compressed_size): New variable.
12968         (codestart): Enable Gate A20 here.
12969         Decompress the compressed part of the core image.
12970         Rearrange the code to put functions and variables which are
12971         required for initialization in the non-compressed part.
12972         Include lzo1x.S.
12974         * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
12975         here.
12977         * include/pupa/util/misc.h (pupa_util_write_image): Declared.
12979         * include/pupa/i386/pc/kernel.h
12980         (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
12981         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
12982         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
12983         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
12984         (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
12986         * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
12988         * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
12989         (Utility#rule): Likewise.
12991         * configure.ac: Check if LZO is available.
12993 2003-01-20  Yoshinori K. Okuji  <okuji@enbug.org>
12995         * include/pupa/normal.h: New file.
12996         * include/pupa/setjmp.h: Likewise.
12997         * include/pupa/i386/setjmp.h: Likewise.
12998         * normal/cmdline.c: Likewise.
12999         * normal/command.c: Likewise.
13000         * normal/main.c: Likewise.
13001         * normal/menu.c: Likewise.
13002         * normal/i386/setjmp.S: Likewise.
13004         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
13005         (pupa_rescue_cmd_initrd): Likewise.
13007         * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
13008         Likewise.
13010         * kern/i386/pc/startup.S (translation_table): New variable.
13011         (translate_keycode): New function.
13012         (pupa_console_getkey): Call translate_keycode.
13014         * kern/rescue.c (attempt_normal_mode): New function.
13015         (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
13016         it failed, print a message.
13018         * kern/mm.c (pupa_real_malloc): Print more information when a
13019         free magic is broken.
13020         (pupa_free): If the first free header is not free actually, set
13021         it to P.
13023         * kern/main.c (pupa_load_normal_mode): Just load the module
13024         "normal".
13025         (pupa_main): Don't print the message
13026         "Entering into rescue mode..." here.
13028         * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
13029         Declared.
13030         (pupa_rescue_cmd_initrd): Likewise.
13031         (pupa_rescue_cmd_initrd): Likewise.
13033         * include/pupa/symbol.h (FUNCTION): Specify the type.
13034         (VARIABLE): Likewise.
13036         * include/pupa/err.h (pupa_err_t): Added
13037         PUPA_ERR_UNKNOWN_COMMAND.
13039         * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
13040         (pupa_dl_get_prefix): Likewise.
13042         * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
13043         Added _chain.mod and _linux.mod instead of chain.mod and
13044         linux.mod.
13045         (chain_mod_SOURCES): Renamed to ...
13046         (_chain_mod_SOURCES): ... this.
13047         (chain_mod_CFLAGS): Renamed to ...
13048         (_chain_mod_CFLAGS): ... this.
13049         (linux_mod_SOURCES): Renamed to ...
13050         (_linux_mod_SOURCES): ... this.
13051         (linux_mod_CFLAGS): Renamed to ...
13052         (_linux_mod_CFLAGS): ... this.
13053         (normal_mod_SOURCES): New variable.
13054         (normal_mod_CFLAGS): Likewise.
13055         (normal_mod_ASFLAGS): Likewise.
13057 2003-01-18  Yoshinori K. Okuji  <okuji@enbug.org>
13059         * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
13060         possible.
13062         * kern/dl.c (pupa_dl_ref): Refer depending modules
13063         recursively.
13064         (pupa_dl_unref): Unrefer depending modules recursively.
13065         Don't call pupa_dl_unload implicitly, because PUPA can crash if
13066         a module is unloaded before one depending on that module is
13067         unloaded.
13068         (pupa_dl_unload): Unload depending modules explicitly,
13069         if possible.
13071 2003-01-17  Yoshinori K. Okuji  <okuji@enbug.org>
13073         * include/pupa/i386/pc/linux.h: New file.
13074         * loader/i386/pc/linux.c: Likewise.
13076         * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
13077         Removed.
13078         (pupa_chainloader_unload): Return PUPA_ERR_NONE.
13079         (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
13080         of PUPA_CHAINLOADER_BOOT_SECTOR.
13082         * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
13083         (pupa_linux_prot_size): New variable.
13084         (pupa_linux_tmp_addr): Likewise.
13085         (pupa_linux_real_addr): Likewise.
13086         (pupa_linux_boot_zimage): New function.
13087         (pupa_linux_boot_bzimage): Likewise.
13089         * kern/i386/pc/init.c (struct mem_region): New structure.
13090         (MAX_REGIONS): New macro.
13091         (mem_regions): New variable.
13092         (num_regions): Likewise.
13093         (pupa_os_area_addr): Likewise.
13094         (pupa_os_area_size): Likewise.
13095         (pupa_lower_mem): Likewise.
13096         (pupa_upper_mem): Likewise.
13097         (add_mem_region): New function.
13098         (compact_mem_regions): Likewise.
13099         (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
13100         the size of the conventional memory and that of so-called upper
13101         memory (before the first memory hole).
13102         Instead of adding each found region to free memory, use
13103         add_mem_region and add them after removing overlaps.
13104         Also, add only 1/4 of the upper memory to free memory. The rest
13105         is used for loading OS images. Maybe this is ad hoc, but this
13106         makes it much easier to relocate OS images when booting.
13108         * kern/rescue.c (pupa_rescue_cmd_module): Removed.
13109         (pupa_enter_rescue_mode): Don't register initrd and module.
13111         * kern/mm.c: Include pupa/dl.h.
13113         * kern/main.c: Include pupa/file.h and pupa/device.h.
13115         * kern/loader.c (pupa_loader_load_module_func): Removed.
13116         (pupa_loader_load_module): Likewise.
13118         * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
13119         ``.o''.
13121         * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
13122         (pupa_linux_tmp_addr): Likewise.
13123         (pupa_linux_real_addr): Likewise.
13124         (pupa_linux_boot_zimage): Likewise.
13125         (pupa_linux_boot_bzimage): Likewise.
13127         * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
13128         (pupa_upper_mem): Likewise.
13129         (pupa_gate_a20): Don't export, because turning off Gate A20 in a
13130         module is too dangerous.
13132         * include/pupa/loader.h (pupa_os_area_addr): Declared.
13133         (pupa_os_area_size): Likewise.
13134         (pupa_loader_set): Remove the first argument. Loader doesn't
13135         manage modules or initrd any longer.
13136         (pupa_loader_load_module): Removed.
13138         * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
13139         (linux_mod_SOURCES): New variable.
13140         (linux_mod_CFLAGS): Likewise.
13142 2003-01-07  Yoshinori K. Okuji  <okuji@enbug.org>
13144         * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
13145         the length of a blocklist correctly.
13147         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
13148         Use ioctl only if the OS file is a block device.
13149         (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
13150         not very useful for normal files.
13152         * kern/main.c (pupa_set_root_dev): New function.
13153         (pupa_load_normal_mode): Likewise.
13154         (pupa_main): Call those above.
13156         * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
13157         pupa_uint16_t.
13159         * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
13161 2003-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
13163         * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
13164         (setup): Configure the installed partition information and the
13165         dl prefix.
13167         * loader/i386/pc/chainloader.c (my_mod): New variable.
13168         (pupa_chainloader_unload): New function.
13169         (pupa_rescue_cmd_chainloader): Refer itself.
13170         (PUPA_MOD_INIT): Save its own module in MY_MOD.
13172         * kern/i386/pc/startup.S (install_partition): Removed.
13173         (version_string): Likewise.
13174         (config_file): Likewise.
13175         (pupa_install_dos_part): New variable.
13176         (pupa_install_bsd_part): Likewise.
13177         (pupa_prefix): Likewise.
13178         (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
13180         * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
13181         and pupa/misc.h.
13182         (make_install_device): New function.
13183         (pupa_machine_init): Set the dl prefix.
13185         * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
13186         (buf): Renamed to ...
13187         (linebuf): ... this.
13188         (pupa_rescue_cmd_prefix): New function.
13189         (pupa_rescue_cmd_insmod): Likewise.
13190         (pupa_rescue_cmd_rmmod): Likewise.
13191         (pupa_rescue_cmd_lsmod): Likewise.
13192         (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
13193         rmmod and lsmod.
13195         * kern/mm.c (pupa_memalign): If failed even after invalidating
13196         disk caches, unload unneeded modules and retry.
13198         * kern/misc.c (pupa_memmove): New function.
13199         (pupa_memcpy): Removed.
13200         (pupa_strcpy): New function.
13201         (pupa_itoa): Made static.
13203         * kern/dl.c (pupa_dl_iterate): New function.
13204         (pupa_dl_ref): Likewise.
13205         (pupa_dl_unref): Likewise.
13206         (pupa_dl_unload): Return if succeeded or not.
13207         (pupa_dl_unload_unneeded): New function.
13208         (pupa_dl_unload_all): Likewise.
13209         (pupa_dl_init): Renamed to ...
13210         (pupa_dl_set_prefix): ... this.
13211         (pupa_dl_get_prefix): New function.
13213         * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
13214         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
13215         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
13216         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
13217         (pupa_install_dos_part): Declared.
13218         (pupa_install_bsd_part): Likewise.
13219         (pupa_prefix): Likewise.
13220         (pupa_boot_drive): Likewise.
13222         * include/pupa/types.h: Fix a typo.
13224         * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
13225         pupa_memmove.
13226         (pupa_memmove): Declared.
13227         (pupa_strcpy): Likewise.
13229         * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
13230         pupa_mod_init takes one argument, its own module.
13231         (pupa_dl_unload_unneeded): Declared.
13232         (pupa_dl_unload_all): Likewise.
13233         (pupa_dl_ref): Likewise.
13234         (pupa_dl_unref): Likewise.
13235         (pupa_dl_iterate): Likewise.
13236         (pupa_dl_init): Renamed to ...
13237         (pupa_dl_set_prefix): ... this.
13238         (pupa_dl_get_prefix): Declared.
13240         * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
13241         (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
13242         unloaded.
13243         (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
13244         (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
13246         * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
13247         -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
13249 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
13251         * util/i386/pc/pupa-setup.c (setup): Define the internal
13252         function find_first_partition_start at the top level, because GCC
13253         3.0.x cannot compile internal functions in deeper scopes
13254         correctly.
13255         (find_root_device): Use lstat instead of stat.
13256         Don't follow symbolic links.
13257         Fix the path-constructing code.
13259         * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
13260         (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
13261         by a BLKGETSIZE ioctl first, because block devices don't fill
13262         the member st_mode of the structure stat on Linux.
13263         [__linux__] (linux_find_partition): Use a temporary buffer
13264         REAL_DEV for the working space. Copy it to DEV before returning.
13265         (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
13266         buffer cache consistent.
13267         (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
13268         strncmp. The previous value was merely wrong.
13269         (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
13271         * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
13272         FAT size is 12. The previous value was merely wrong.
13274         * kern/main.c (pupa_main): Don't split the starting message from
13275         newlines.
13277         * kern/term.c (pupa_putchar): Put CR after LF instead of before
13278         LF, because BIOS goes crazy about character attributes in this
13279         case.
13281 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
13283         * include/i386/pc/util/biosdisk.h: New file.
13284         * util/i386/pc/biosdisk.c: Likewise.
13285         * util/i386/pc/pupa-setup.c: Likewise.
13287         * Makefile.in (INCLUDE_DISTFILES): Added
13288         include/pupa/i386/pc/util/biosdisk.h.
13289         (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
13290         directory util/i386/pc.
13291         (install-local): Added a rule for sbin_UTILITIES.
13292         (uninstall): Likewise.
13294         * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
13296         * util/misc.c (xrealloc): New function.
13297         (pupa_malloc): Likewise.
13298         (pupa_free): Likewise.
13299         (pupa_realloc): Likewise.
13300         (pupa_stop): Likewise.
13301         (pupa_putchar): Likewise.
13303         * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
13305         * include/pupa/util/misc.h (xrealloc): Declared.
13307         * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
13308         macro.
13309         (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
13310         (PUPA_BOOT_MACHINE_BPB_END): ... this.
13312         * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
13313         [PUPA_UTIL] (pupa_fat_fini): Likewise.
13315         * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
13316         way should be implemented.
13317         [PUPA_UTIL] (pupa_fat_fini): Likewise.
13319         * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
13320         the size of NAME for safety.
13321         (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
13322         0x88.
13324         * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
13325         (pupa_setup_SOURCES): Likewise.
13327         * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
13329 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
13331         * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
13332         bunch of pushl's from pusha, because this destroys the return
13333         value.
13335 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
13337         Use -mrtd and -mregparm=3 to reduce the generated code sizes.
13338         This means that any missing prototypes could be fatal. Also, you
13339         must take care when writing assembly code. See the comments at
13340         the beginning of startup.S, for more details.
13342         * kern/i386/pc/startup.S (pupa_halt): Modified for the new
13343         compilation mechanism.
13344         (pupa_chainloader_real_boot): Likewise.
13345         (pupa_biosdisk_rw_int13_extensions): Likewise.
13346         (pupa_biosdisk_rw_standard): Likewise.
13347         (pupa_biosdisk_check_int13_extensions): Likewise.
13348         (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
13349         (pupa_biosdisk_get_diskinfo_standard): Likewise.
13350         (pupa_get_memsize): Likewise.
13351         (pupa_get_mmap_entry): Likewise.
13352         (pupa_console_putchar): Likewise.
13353         (pupa_console_setcursor): Likewise.
13354         (pupa_getrtsecs): Use pushl instead of push.
13356         * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
13357         memory instead of the stack for a mmap entry, because some
13358         BIOSes may ignore the maximum size and overflow.
13360         * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
13362         * genmk.rb (PModule#rule): Compile automatically generated
13363         sources with module-specific CFLAGS as well as other sources.
13365 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
13367         * configure.ac: Check ld.
13368         Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
13369         respectively, before checking endianness and sizes.
13371         * Makefile.in (LD): New variable.
13373 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
13375         * Makefile.in (BUILD_CC): CC -> BUILD_CC.
13377 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
13379         * Changelog: New file.