1 2008-11-14 Robert Millan <rmh@aybabtu.com>
3 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
4 order to cope with duplicate slashes.
6 2008-11-14 Robert Millan <rmh@aybabtu.com>
8 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
9 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
10 don't want to mess with lower memory, because it is used in the Linux
13 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
14 an appropiate place in lower memory, between 0x10000 and 0x90000,
15 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
16 is in our heap (probably as a result of it being corrupted during
17 decompression). Add #error instance with comment to explain why this
18 loader isn't currently usable on PC/BIOS.
20 2008-11-14 Robert Millan <rmh@aybabtu.com>
22 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
23 (GRUB_SERIAL_PORT_NUM): Fix misscalculation.
25 2008-11-12 Robert Millan <rmh@aybabtu.com>
27 Make loader/i386/linux.c buildable on i386-pc (although disabled).
29 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
30 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
32 * include/grub/i386/pc/memory.h: ... to here.
34 2008-11-12 Robert Millan <rmh@aybabtu.com>
36 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
39 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
40 (grub_console_cur_color, grub_console_real_putchar)
41 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
42 (grub_console_setcolorstate, grub_console_setcolor)
43 (grub_console_getcolor): Move from here ...
44 * include/grub/i386/vga_common.h: ... to here (new file).
46 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
47 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
49 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
50 `<grub/i386/vga_common.h>'.
52 2008-11-12 Robert Millan <rmh@aybabtu.com>
54 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
55 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
56 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
58 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
59 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
61 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
62 grub_console_init() with call to grub_vga_text_init().
63 (grub_machine_fini): Replace call to
64 grub_console_fini() with call to grub_vga_text_fini() and
65 grub_at_keyboard_fini().
67 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
68 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
69 (grub_console_setcolorstate, grub_console_setcolor)
70 (grub_console_getcolor): New function prototypes.
72 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
73 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
74 (grub_vga_text_setcursor): Static-ize.
75 (grub_vga_text_term): New structure.
76 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
78 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
79 (grub_console_cur_color, grub_console_standard_color)
80 (grub_console_normal_color, grub_console_highlight_color)
81 (map_char, grub_console_putchar, grub_console_getcharwidth)
82 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
83 (grub_console_getcolor): Move from here ...
84 * term/i386/vga_common.c: ... to here (same function names).
86 2008-11-12 Robert Millan <rmh@aybabtu.com>
88 Use newly-added Multiboot support in coreboot.
90 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
91 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
93 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
94 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
95 (codestart): Store the MBI in `startup_multiboot_info' when we're
96 being loaded using Multiboot.
98 * kern/i386/coreboot/init.c (grub_machine_init): Move
99 grub_at_keyboard_init() call to beginning of function (useful for
100 debugging). Call grub_machine_mmap_init() before attempting to use
101 grub_machine_mmap_iterate().
102 (grub_lower_mem, grub_upper_mem): Move from here ...
103 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
106 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
109 2008-11-12 Robert Millan <rmh@aybabtu.com>
111 Fix a regression introduced by the at_keyboard.mod split. Because
112 some terminals are default on some platforms and non-default on
113 others, the first terminal being registered determines which is
116 * kern/term.c (grub_term_register_input): If this is the first
117 terminal being registered, set it as the current one.
118 (grub_term_register_output): Likewise.
120 * term/efi/console.c (grub_console_init): Do not call
121 grub_term_set_current_output() or grub_term_set_current_input().
122 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
123 * term/i386/pc/console.c (grub_console_init): Likewise.
124 (grub_console_fini): Do not call grub_term_set_current_input()
125 (but leave grub_term_set_current_output() to restore text mode).
127 2008-11-10 Robert Millan <rmh@aybabtu.com>
129 * util/grub.d/00_header.in: Add backward compatibility check for
130 versions of terminal.mod that don't understand `terminal_input' or
133 2008-11-09 Robert Millan <rmh@aybabtu.com>
135 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
136 `terminal_input' / `terminal_output', not `terminal'.
138 2008-11-08 Robert Millan <rmh@aybabtu.com>
140 * Makefile.in (include_DATA): Fix srcdir=. assumption.
141 (DISTCLEANFILES): Add `build_env.mk'.
143 2008-11-08 Robert Millan <rmh@aybabtu.com>
145 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
146 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
147 members. Update all users.
148 * util/console.c (grub_ncurses_term): Split in ...
149 (grub_ncurses_term_input): ... this, and ...
150 (grub_ncurses_term_output): ... this. Update all users.
151 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
153 2008-11-08 Robert Millan <rmh@aybabtu.com>
155 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
156 (PKGDATA): Add $(pkgdata_SRCDIR).
157 (pkglib_BUILDDIR): New variable.
158 (pkgdata_SRCDIR): New variable.
159 (build_env.mk): New target.
160 (include_DATA): New variable.
161 (install-local): Install $(include_DATA) files in $(includedir).
163 2008-11-07 Pavel Roskin <proski@gnu.org>
165 * gendistlist.sh: Use C locale for sorting to ensure consistent
166 output on all systems.
168 * util/grub.d/00_header.in: Remove incorrect space before
171 2008-11-07 Robert Millan <rmh@aybabtu.com>
173 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
175 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
176 * loader/multiboot_loader.c (find_multi_boot2_header): New function
177 (based on find_multi_boot1_header).
178 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
179 using find_multi_boot2_header(), and abort if neither Multiboot or
180 Multiboot headers were found.
182 2008-11-07 Robert Millan <rmh@aybabtu.com>
184 Modularize at_keyboard.mod:
186 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
187 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
188 (at_keyboard_mod_LDFLAGS): New variables.
190 Actual terminal split:
192 * include/grub/term.h (struct grub_term): Split in ...
193 (struct grub_term_input): ... this, and ...
194 (struct grub_term_output): ... this. Update all users.
195 (grub_term_set_current): Split in ...
196 (grub_term_set_current_input): ... this, and ...
197 (grub_term_set_current_output): ... this.
198 (grub_term_get_current): Split in ...
199 (grub_term_get_current_input): ... this, and ...
200 (grub_term_get_current_output): ... this.
201 (grub_term_register): Split in ...
202 (grub_term_register_input): ... this, and ...
203 (grub_term_register_output): ... this.
204 (grub_term_unregister): Split in ...
205 (grub_term_unregister_input): ... this, and ...
206 (grub_term_unregister_output): ... this.
207 (grub_term_iterate): Split in ...
208 (grub_term_iterate_input): ... this, and ...
209 (grub_term_iterate_output): ... this.
211 * kern/term.c (grub_term_list): Split in ...
212 (grub_term_list_input): ... this, and ...
213 (grub_term_list_output): ... this. Update all users.
214 (grub_cur_term): Split in ...
215 (grub_cur_term_input): ... this, and ...
216 (grub_cur_term_output): ... this. Update all users.
217 (grub_term_set_current): Split in ...
218 (grub_term_set_current_input): ... this, and ...
219 (grub_term_set_current_output): ... this.
220 (grub_term_get_current): Split in ...
221 (grub_term_get_current_input): ... this, and ...
222 (grub_term_get_current_output): ... this.
223 (grub_term_register): Split in ...
224 (grub_term_register_input): ... this, and ...
225 (grub_term_register_output): ... this.
226 (grub_term_unregister): Split in ...
227 (grub_term_unregister_input): ... this, and ...
228 (grub_term_unregister_output): ... this.
229 (grub_term_iterate): Split in ...
230 (grub_term_iterate_input): ... this, and ...
231 (grub_term_iterate_output): ... this.
233 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
234 a check for input and one for output (and only attempt to get keys
235 from user when input works).
237 * util/grub-probe.c (grub_term_get_current): Split in ...
238 (grub_term_get_current_input): ... this, and ...
239 (grub_term_get_current_output): ... this.
240 * util/grub-fstest.c: Likewise.
241 * util/i386/pc/grub-setup.c: Likewise.
242 * util/grub-editenv.c: Likewise.
244 Portability adjustments:
246 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
247 `term/i386/pc/at_keyboard.c'.
248 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
249 grub_keyboard_controller_init() (now handled by terminal .init).
250 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
251 grub_at_keyboard_init().
252 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
253 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
254 at_keyboard.mod via input terminal interface).
255 * include/grub/i386/coreboot/console.h: Convert into a stub for
256 `<grub/i386/pc/console.h>'.
258 Migrate full terminals to new API:
260 * term/efi/console.c (grub_console_term): Split into ...
261 (grub_console_term_input): ... this, and ...
262 (grub_console_term_output): ... this. Update all users.
263 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
264 (grub_ofconsole_init): Split into ...
265 (grub_ofconsole_init_input): ... this, and ...
266 (grub_ofconsole_init_output): ... this.
267 (grub_ofconsole_term): Split into ...
268 (grub_ofconsole_term_input): ... this, and ...
269 (grub_ofconsole_term_output): ... this. Update all users.
270 * term/i386/pc/serial.c (grub_serial_term): Split into ...
271 (grub_serial_term_input): ... this, and ...
272 (grub_serial_term_output): ... this. Update all users.
273 * term/i386/pc/console.c (grub_console_term): Split into ...
274 (grub_console_term_input): ... this, and ...
275 (grub_console_term_output): ... this. Update all users.
276 (grub_console_term_input): Only enable it on PC/BIOS platform.
277 (grub_console_init): Remove grub_keyboard_controller_init() call.
279 Migrate input terminals to new API:
281 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
282 `i386' and `i386/pc' to enable build on x86_64 (this driver is
283 i386-specific anyway).
284 (grub_console_checkkey): Rename to ...
285 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
287 (grub_keyboard_controller_orig): New variable.
288 (grub_console_getkey): Rename to ...
289 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
291 (grub_keyboard_controller_init): Static-ize. Save original
292 controller value so that it can be restored ...
293 (grub_keyboard_controller_fini): ... here (new function).
294 (grub_at_keyboard_term): New structure.
295 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
298 Migrate output terminals to new API:
300 * term/i386/pc/vga.c (grub_vga_term): Change type to
301 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
302 members. Update all users.
303 * term/gfxterm.c (grub_video_term): Change type to
304 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
305 members. Update all users.
306 * include/grub/i386/pc/console.h (grub_console_checkkey)
307 (grub_console_getkey): Do not export (no longer needed by gfxterm,
310 Migrate `terminal' command and userland tools to new API:
312 * commands/terminal.c (grub_cmd_terminal): Split into ...
313 (grub_cmd_terminal_input): ... this, and ...
314 (grub_cmd_terminal_output): ... this.
315 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
316 `terminal_input' and `terminal_output'.
317 * util/grub.d/00_header.in: Adjust `terminal' calls to new
318 `terminal_input' / `terminal_output' API.
319 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
320 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
321 provided ${GRUB_TERMINAL}, convert it).
323 2008-11-04 Robert Millan <rmh@aybabtu.com>
325 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
327 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
329 2008-11-03 Bean <bean123ch@gmail.com>
331 * kern/elf.c (grub_elf32_load): Revert to previous code.
332 (grub_elf64_load): Likewise.
334 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
336 2008-11-01 Robert Millan <rmh@aybabtu.com>
338 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
339 (TARGET_CPPFLAGS): Likewise.
340 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
342 2008-11-01 Carles Pina i Estany <carles@pina.cat>
344 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
346 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
348 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
349 addition of objects until the code is not going to be able to fail.
351 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
353 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
354 (add a missing NULL check, and correct them by moving the pointer
355 operations after the actual check).
357 2008-10-29 Robert Millan <rmh@aybabtu.com>
359 * util/i386/pc/grub-install.in: Handle empty string as output from
360 make_system_path_relative_to_its_root().
362 2008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
364 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
365 circular metadata worst case scenario. If the metadata is circular
366 then copy the wrap in place.
367 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
368 project lib/format_text/layout.h
369 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
371 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
373 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
375 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
377 * util/update-grub_lib.in: Mention filename in warning message.
379 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
381 * NEWS: Update for rename of update-grub to grub-mkconfig.
383 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
385 * util/update-grub_lib.in: Copy to ...
386 * util/grub-mkconfig_lib.in: ... this. Update all users.
387 * util/update-grub_lib.in: Make it a stub to `grub-mkconfigig_lib.in'.
388 * util/update-grub.in: Rename to ...
389 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
390 option. Add `--output' option to allow users to specify the generated
391 configuration file. Default to stdout.
392 (update_grub_dir): Rename to ...
393 (grub_mkconfig_dir): ... this.
394 (grub_cfg): Default to an empty string.
395 * conf/common.rmk (update-grub): Rename to ...
396 (grub-mkconfig): ... this.
397 (update-grub_lib): Copy to ...
398 (grub-mkconfig_lib): ... this.
399 (update-grub_SCRIPTS): Copy to ...
400 (grub-mkconfig_SCRIPTS): ... this. Update all users.
401 (update-grub_DATA): Rename to ...
402 (grub-mkconfig_DATA): ... this.
404 2008-09-28 Robert Millan <rmh@aybabtu.com>
406 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
407 to `modified'. Add the real `created' field.
408 (grub_iso9660_uuid): Use `modified' rather than `created' for
409 constructing the UUID.
411 2008-09-28 Felix Zielcke <fzielcke@z-51.de>
413 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
414 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
416 2008-09-28 Bean <bean123ch@gmail.com>
418 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
419 Thanks to Christian Franke for finding this bug.
421 2008-09-25 Robert Millan <rmh@aybabtu.com>
423 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
424 instances of grub_util_get_disk_name() (see previous commit).
426 2008-09-25 Robert Millan <rmh@aybabtu.com>
428 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
429 `util/i386/get_disk_name.c'.
430 * conf/i386-efi.rmk: Likewise.
431 * conf/x86_64-efi.rmk: Likewise.
432 * conf/i386-coreboot.rmk: Likewise.
433 * conf/i386-ieee1275.rmk: Likewise.
434 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
435 `util/ieee1275/get_disk_name.c'.
436 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
437 * util/ieee1275/get_disk_name.c: Remove file.
438 * util/i386/get_disk_name.c: Remove file.
439 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
440 "hd%d" for device.map entries, rather than using
441 grub_util_get_disk_name().
443 2008-09-24 Carles Pina i Estany <carles@pina.cat>
445 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
447 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
449 2008-09-24 Carles Pina i Estany <carles@pina.cat>
451 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
453 (GRUB_TERM_PPAGE): Changed to 0x4900.
455 2008-09-24 Robert Millan <rmh@aybabtu.com>
457 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
458 macros (they were i386-pc specific).
459 * include/grub/sparc64/ieee1275/console.h: Likewise.
460 * include/grub/efi/console.h: Likewise.
462 2008-09-22 Bean <bean123ch@gmail.com>
464 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
465 resident and in attribute list.
467 * include/grub/ntfs.h (BMP_LEN): Removed.
469 2008-09-22 Bean <bean123ch@gmail.com>
471 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
472 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
474 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
475 error occurs, as grub_disk_open will call grub_disk_close, which will
476 call p->close (scsi).
478 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
480 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
481 (AC_PREREQ): Bumped to 2.59.
482 (AC_TRY_COMPILE): Replace obsolete macro with ...
483 (AC_COMPILE_IFELSE): ... this.
484 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
485 (AC_LINK_IFELSE): ... this.
487 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
489 * autogen.sh: Add a call to `gendistlist.sh'.
491 2008-09-19 Christian Franke <franke@computer.org>
493 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
494 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
495 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
496 Export __enable_execute_stack() to modules.
497 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
500 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
502 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
505 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
507 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
508 #include <grub/util/hostdisk.h>.
510 2008-09-08 Robert Millan <rmh@aybabtu.com>
512 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
513 segments when their filesz is zero (grub_file_read() interprets
514 zero-size as "read until EOF", which results in memory corruption).
515 Use `lowest_segment' rather than 0 for calculating the current
516 segment load address.
518 2008-09-08 Robert Millan <rmh@aybabtu.com>
520 * util/hostdisk.c (open_device): Replace a grub_util_info() call
521 with grub_dprintf("hostdisk", ...), as it was so verbose that it
522 clobbered useful information.
524 2008-09-08 Robert Millan <rmh@aybabtu.com>
526 * include/grub/util/biosdisk.h: Move to ...
527 * include/grub/util/hostdisk.h: ... here. Update all users.
528 * util/biosdisk.c: Move to ...
529 * util/hostdisk.c: ... here. Update all users.
531 2008-09-07 Robert Millan <rmh@aybabtu.com>
533 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
535 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
536 and length can be stored directly in the `mbi->mmap_addr' and
537 `mbi->mmap_length' struct fields.
539 2008-09-07 Robert Millan <rmh@aybabtu.com>
541 * conf/i386.rmk: New file. Provides declaration for building
543 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
544 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
546 Include `conf/i386.mk'.
547 * conf/i386-efi.rmk: Likewise.
548 * conf/x86_64-efi.rmk: Likewise.
549 * conf/i386-coreboot.rmk: Likewise.
550 * conf/i386-ieee1275.rmk: Likewise.
552 2008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
554 Based on patch created by Colin D Bennett <colin@gibibit.com>.
555 Adds optimization support for BGR based modes.
557 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
558 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
559 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
560 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
561 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
562 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
563 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
564 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
565 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
566 (grub_video_i386_vbeblit_index_index): Likewise.
567 (grub_video_i386_vbeblit_replace_directN): Added.
568 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
569 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
570 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
571 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
572 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
573 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
574 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
575 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
576 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
577 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
578 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
579 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
580 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
582 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
583 (grub_video_i386_vbefill_R8G8B8): Likewise.
584 (grub_video_i386_vbefill_index): Likewise.
585 (grub_video_i386_vbefill_direct32): Added.
586 (grub_video_i386_vbefill_direct24): Likewise.
587 (grub_video_i386_vbefill_direct16): Likewise.
588 (grub_video_i386_vbefill_direct8): Likewise.
590 * include/grub/video.h (grub_video_blit_format): Removed
591 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
592 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
593 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
594 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
595 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
597 * video/video.c (grub_video_get_blit_format): Updated to use new
598 blit formats. Added handling for 16 bit color modes.
600 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
602 (common_blitter): Updated to use new blitters.
604 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
606 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
607 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
608 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
609 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
610 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
611 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
612 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
613 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
614 (grub_video_i386_vbeblit_index_index): Likewise.
615 (grub_video_i386_vbeblit_replace_directN): Added.
616 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
617 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
618 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
619 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
620 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
621 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
622 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
623 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
624 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
625 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
626 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
627 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
628 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
630 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
631 (grub_video_i386_vbefill_R8G8B8): Likewise.
632 (grub_video_i386_vbefill_index): Likewise.
633 (grub_video_i386_vbefill_direct32): Added.
634 (grub_video_i386_vbefill_direct24): Likewise.
635 (grub_video_i386_vbefill_direct16): Likewise.
636 (grub_video_i386_vbefill_direct8): Likewise.
638 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
641 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
644 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
647 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
650 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
652 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
655 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
657 * fs/iso9660.c (grub_iso9660_date): New structure.
658 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
659 (grub_iso9660_uuid): New function.
661 2008-09-05 Bean <bean123ch@gmail.com>
663 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
665 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
666 insensitive bit for names in Win32 and Win32 & DOS namespace.
668 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
670 * include/grub/types.h (LONG_MAX): Likewise.
672 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
674 * util/getroot.c: Include <config.h>.
675 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
676 add support for /dev/md/N devices and handle LVM double dash escaping.
678 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
680 * config.guess: Update to latest version from config git.
681 * config.sub: Likewise.
683 2008-09-03 Robert Millan <rmh@aybabtu.com>
685 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
686 `disk->total_sectors'.
688 2008-09-01 Colin D Bennett <colin@gibibit.com>
690 * include/grub/normal.h: Fixed incorrect comment for
691 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
693 2008-09-01 Colin D Bennett <colin@gibibit.com>
695 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
698 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
699 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
700 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
701 (GRUB_VBE_MODEATTR_COLOR): Likewise.
702 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
703 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
704 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
705 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
706 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
707 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
708 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
709 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
710 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
711 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
712 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
713 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
714 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
715 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
716 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
718 2008-08-31 Robert Millan <rmh@aybabtu.com>
720 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
722 (grub_multiboot): Fix a few warnings.
724 2008-08-31 Robert Millan <rmh@aybabtu.com>
726 * loader/i386/pc/multiboot.c: Update comment not to say that
727 boot_device support is unimplemented.
729 2008-08-31 Robert Millan <rmh@aybabtu.com>
731 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
732 or memory map support are unimplemented.
734 2008-08-31 Colin D Bennett <colin@gibibit.com>
736 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
738 2008-08-31 Colin D Bennett <colin@gibibit.com>
740 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
741 total video memory in 'vbeinfo' output; show color format details for
744 2008-08-30 Pavel Roskin <proski@gnu.org>
746 * util/genmoddep.c: Remove for real this time.
747 * DISTLIST: Remove util/genmoddep.c.
749 2008-08-30 Robert Millan <rmh@aybabtu.com>
751 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
752 as required by Multiboot spec (it was already 4-byte aligned, but
755 2008-08-29 Pavel Roskin <proski@gnu.org>
757 * kern/powerpc/ieee1275/crt0.S: Rename to ...
758 * kern/powerpc/ieee1275/startup.S: ... this.
759 * conf/powerpc-ieee1275.rmk: Adjust for the above.
760 * DISTLIST: Likewise.
762 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
763 grub/cpu/kernel.h. Add start label for consistency with other
764 platforms. Add grub_prefix immediately after start. Add jump
765 to the code after grub_prefix.
766 * include/grub/powerpc/kernel.h: Provide valid values for
767 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
769 2008-08-29 Bean <bean123ch@gmail.com>
771 * configure.ac: Change host_os to cygwin for mingw.
772 (asprintf): New check for function.
774 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
775 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
777 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
778 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
779 sync, sleep and grub_util_get_disk_size for mingw.
781 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
782 to get size in mingw.
783 (open_device): Use flag O_BINARY if it's defined.
784 (find_root_device): Add dummy code for mingw.
786 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
787 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
788 (get_scsi_disk_name): Return 0 for mingw.
790 * util/hostfs.c: #include <grub/util/misc.h>.
791 (grub_hostfs_open): Use "rb" flag to open file, use
792 grub_util_get_disk_size to get disk size for mingw.
794 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
795 (asprintf): New function if HAVE_ASPRINTF is not set.
796 (sync): New function for mingw.
798 (grub_util_get_disk_size): Likewise.
800 2008-08-28 Pavel Roskin <proski@gnu.org>
802 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
805 2008-08-28 Robert Millan <rmh@aybabtu.com>
807 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
809 2008-08-28 Robert Millan <rmh@aybabtu.com>
811 Change find_grub_drive() syntax so it doesn't prevent it from
812 detecting NULL names as errors.
814 * util/biosdisk.c (find_grub_drive): Move free slot search code
816 (find_free_slot): ... to here.
817 (read_device_map): Use find_free_slot() to search for free slots.
819 2008-08-27 Marco Gerards <marco@gnu.org>
821 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
822 (scsi_mod_SOURCES): New variable.
823 (scsi_mod_CFLAGS): Likewise
824 (scsi_mod_LDFLAGS): Likewise.
826 * disk/scsi.c: New file.
828 * include/grub/scsi.h: Likewise.
830 * include/grub/scsicmd.h: Likewise.
832 * disk/ata.c: Include <grub/scsi.h>.
833 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
835 (grub_ata_iterate): Skip ATAPI devices.
836 (grub_ata_open): Only handle ATAPI devices.
837 (struct grub_atapi_read): Removed.
838 (grub_atapi_readsector): Likewise.
839 (grub_ata_read): No longer handle ATAPI devices.
840 (grub_ata_write): Likewise.
841 (grub_atapi_iterate): New function.
842 (grub_atapi_read): Likewise.
843 (grub_atapi_write): Likewise.
844 (grub_atapi_open): Likewise.
845 (grub_atapi_close): Likewise.
846 (grub_atapi_dev): New variable.
847 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
848 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
850 * include/grub/disk.h (enum grub_disk_dev_id): Add
851 `GRUB_DISK_DEVICE_SCSI_ID'.
853 2008-08-26 Robert Millan <rmh@aybabtu.com>
855 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
856 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
859 2008-08-23 Bean <bean123ch@gmail.com>
861 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
862 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
863 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
864 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
866 (raid5rec_mod_SOURCES): New macro.
867 (raid5rec_mod_CFLAGS): Likewise.
868 (raid5rec_mod_LDFLAGS): Likewise.
869 (raid6rec_mod_SOURCES): Likewise.
870 (raid6rec_mod_CFLAGS): Likewise.
871 (raid6rec_mod_LDFLAGS): Likewise.
872 (mdraid_mod_SOURCES): Likewise.
873 (mdraid_mod_CFLAGS): Likewise.
874 (mdraid_mod_LDFLAGS): Likewise.
875 (dm_nv_mod_SOURCES): Likewise.
876 (dm_nv_mod_CFLAGS): Likewise.
877 (dm_nv_mod_LDFLAGS): Likewise.
879 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
880 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
881 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
883 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
884 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
886 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
888 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
890 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
892 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
894 * disk/raid5_recover.c: New file.
896 * disk/raid6_recover.c: Likewise.
898 * disk/mdraid_linux.c: Likewise.
900 * disk/dmraid_nvidia.c: Likewise.
902 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
905 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
906 calculate the size of raid device.
907 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
908 different layout of raid5.
909 (grub_raid_scan_device): Remove code specific to mdraid.
910 (grub_raid_list): New variable.
911 (free_array): New function.
912 (grub_raid_register): Likewise.
913 (grub_raid_unregister): Likewise.
914 (grub_raid_rescan): Likewise.
915 (GRUB_MOD_INIT): Don't iterate device here.
916 (GRUB_MOD_FINI): Use free_array to release resource.
918 * include/grub/raid.h: Remove macro and structure specific to mdraid.
919 (grub_raid5_recover_func_t): New function variable type.
920 (grub_raid6_recover_func_t): Likewise.
921 (grub_raid5_recover_func): New variable.
922 (grub_raid6_recover_func): Likewise.
923 (grub_raid_register): New function.
924 (grub_raid_unregister): Likewise.
925 (grub_raid_rescan): Likewise.
926 (grub_raid_block_xor): Likewise.
928 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
929 (CMD_CRC): New macro.
931 (read_file): Handle device as well as file.
932 (cmd_crc): New function.
933 (fstest): Handle multiple disks.
934 (options): Remove part, raw and long, add root and diskcount.
935 (usage): Add crc, remove -p, -r, -l, add -r and -c.
936 (main): Find the first non option entry and ignore subsequent options,
937 add handling for the new options, support multiple disks.
939 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
941 2008-08-23 Bean <bean123ch@gmail.com>
943 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
945 * genfslist.sh: Ignore kernel.mod.
947 * genpartmaplist.sh: Likewise.
949 2008-08-23 Robert Millan <rmh@aybabtu.com>
951 * util/getroot.c (find_root_device): Skip anything that starts with
952 a dot, not just directories. This avoids things like /dev/.tmp.md0.
954 2008-08-22 Felix Zielcke <fzielcke@z-51.de>
956 * util/update-grub.in (GRUB_GFXMODE): Export variable.
957 * util/grub.d/00_header.in: Allow the administrator to change default
958 gfxmode via ${GRUB_GFXMODE}.
960 2008-08-21 Felix Zielcke <fzielcke@z-51.de>
962 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
964 2008-08-21 Robert Millan <rmh@aybabtu.com>
966 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
968 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
969 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
971 2008-08-20 Carles Pina i Estany <carles@pina.cat>
973 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
974 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
976 2008-08-19 Robert Millan <rmh@aybabtu.com>
978 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
979 (struct grub_virtual_screen): Remove `cursor_color'.
980 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
982 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
984 2008-08-18 Robert Millan <rmh@aybabtu.com>
986 Unify (identical) linux_normal.c files.
987 * loader/i386/efi/linux_normal.c: Move from here ...
988 * loader/linux_normal.c: ... to here. Update all users.
989 * loader/i386/pc/linux_normal.c: Delete. Update all users.
990 * loader/i386/ieee1275/linux_normal.c: Likewise.
992 2008-08-18 Robert Millan <rmh@aybabtu.com>
994 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
995 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
996 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
997 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
998 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
1000 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
1001 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
1002 (GRUB_LINUX_CL_END_OFFSET): ... to here.
1003 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
1004 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
1005 (GRUB_EFI_CL_END_OFFSET): Rename to ...
1006 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
1007 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
1008 Initialize `params->video_cursor_x' and `params->video_cursor_y'
1009 portably using grub_getxy().
1010 Replace `-EFI' with `-bzImage' in boot message.
1012 2008-08-17 Robert Millan <rmh@aybabtu.com>
1014 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
1016 2008-08-17 Robert Millan <rmh@aybabtu.com>
1018 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
1020 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
1021 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
1022 (grub_machine_mmap_iterate): New function declaration.
1023 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
1025 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
1028 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
1029 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
1030 Move e820 parsing from here ...
1031 * kern/i386/pc/mmap.c: New file.
1032 (grub_machine_mmap_iterate): ... to here.
1034 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
1035 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
1036 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
1037 (grub_available_iterate): Redeclare to return `void', and redeclare
1038 its hook to use grub_uint64_t as addr and size parameters, and rename
1040 (grub_machine_mmap_iterate): ... this. Update all users.
1042 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
1043 to make it more readable. Rename to ...
1044 (grub_machine_mmap_iterate): ... this.
1046 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
1047 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
1048 (grub_multiboot): Allocate an extra region after the payload, and fill
1049 it with a Multiboot memory map. Adjust a.out loader to calculate size
1050 with the extra space.
1051 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
1052 with the extra space.
1054 2008-08-17 Carles Pina i Estany <carles@pina.cat>
1056 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
1058 2008-08-17 Felix Zielcke <fzielcke@z-51.de>
1060 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
1061 mdate-sh to the list `find' searches for.
1062 * DISTLIST: Regenerated.
1064 2008-08-16 Felix Zielcke <fzielcke@z-51.de>
1066 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
1067 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
1068 genmoddep.awk, gensymlist.sh.in.
1069 (DISTDIRS): Add bus, docs, hook, lib.
1070 * DISTLIST: Regenerated.
1071 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
1073 2008-08-16 Robert Millan <rmh@aybabtu.com>
1075 * disk/raid.c (grub_raid_init): Handle/report errors set by
1076 grub_device_iterate().
1077 * disk/lvm.c (grub_lvm_init): Likewise.
1079 2008-08-15 Bean <bean123ch@gmail.com>
1081 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1083 (datetime_mod_SOURCES): New macro.
1084 (datetime_mod_CFLAGS): Likewise.
1085 (datetime_mod_LDFLAGS): Likewise.
1086 (date_mod_SOURCES): Likewise.
1087 (date_mod_CFLAGS): Likewise.
1088 (date_mod_LDFLAGS): Likewise.
1089 (datehook_mod_SOURCES): Likewise.
1090 (datehook_mod_CFLAGS): Likewise.
1091 (datehook_mod_LDFLAGS): Likewise.
1093 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1095 (datetime_mod_SOURCES): New macro.
1096 (datetime_mod_CFLAGS): Likewise.
1097 (datetime_mod_LDFLAGS): Likewise.
1098 (date_mod_SOURCES): Likewise.
1099 (date_mod_CFLAGS): Likewise.
1100 (date_mod_LDFLAGS): Likewise.
1101 (datehook_mod_SOURCES): Likewise.
1102 (datehook_mod_CFLAGS): Likewise.
1103 (datehook_mod_LDFLAGS): Likewise.
1105 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1107 (datetime_mod_SOURCES): New macro.
1108 (datetime_mod_CFLAGS): Likewise.
1109 (datetime_mod_LDFLAGS): Likewise.
1110 (date_mod_SOURCES): Likewise.
1111 (date_mod_CFLAGS): Likewise.
1112 (date_mod_LDFLAGS): Likewise.
1113 (datehook_mod_SOURCES): Likewise.
1114 (datehook_mod_CFLAGS): Likewise.
1115 (datehook_mod_LDFLAGS): Likewise.
1117 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1119 (datetime_mod_SOURCES): New macro.
1120 (datetime_mod_CFLAGS): Likewise.
1121 (datetime_mod_LDFLAGS): Likewise.
1122 (date_mod_SOURCES): Likewise.
1123 (date_mod_CFLAGS): Likewise.
1124 (date_mod_LDFLAGS): Likewise.
1125 (datehook_mod_SOURCES): Likewise.
1126 (datehook_mod_CFLAGS): Likewise.
1127 (datehook_mod_LDFLAGS): Likewise.
1129 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1131 (datetime_mod_SOURCES): New macro.
1132 (datetime_mod_CFLAGS): Likewise.
1133 (datetime_mod_LDFLAGS): Likewise.
1134 (date_mod_SOURCES): Likewise.
1135 (date_mod_CFLAGS): Likewise.
1136 (date_mod_LDFLAGS): Likewise.
1137 (datehook_mod_SOURCES): Likewise.
1138 (datehook_mod_CFLAGS): Likewise.
1139 (datehook_mod_LDFLAGS): Likewise.
1141 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
1143 * commands/date.c: New file.
1145 * hook/datehook.c: Likewise.
1147 * include/grub/lib/datetime.h: Likewise.
1149 * include/grub/i386/cmos.h: Likewise.
1151 * lib/datetime.c: Likewise.
1153 * lib/i386/datetime.c: Likewise.
1155 * lib/efi/datetime.c: Likewise.
1157 2008-08-14 Robert Millan <rmh@aybabtu.com>
1159 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
1160 (grub_mkelfimage_SOURCES): New variable.
1161 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
1163 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
1164 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
1165 * conf/powerpc-ieee1275.rmk: Likewise.
1166 * conf/i386-ieee1275.rmk: Likewise.
1168 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
1169 * kern/i386/coreboot/init.c: Likewise.
1171 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
1172 with `<grub/cpu/kernel.h>'.
1173 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
1175 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
1176 * kern/i386/coreboot/startup.S: Likewise.
1178 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
1179 (GRUB_MOD_GAP): Remove.
1180 * include/grub/powerpc/kernel.h: New file.
1181 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
1182 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
1183 * include/grub/i386/kernel.h: New file.
1184 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
1185 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
1186 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
1188 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
1190 Use --directory when invoking grub_mkimage.
1192 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
1193 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
1194 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
1195 and GRUB_KERNEL_CPU_PREFIX.
1197 2008-08-14 Felix Zielcke <fzielcke@z-51.de>
1199 * include/grub/err.h (grub_err_printf): New function prototype.
1200 * util/misc.c (grub_err_printf): New function.
1201 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
1203 * kern/err.c (grub_print_error): Use grub_err_printf.
1205 2008-08-13 Robert Millan <rmh@aybabtu.com>
1207 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
1209 2008-08-13 Robert Millan <rmh@aybabtu.com>
1211 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
1214 2008-08-12 Robert Millan <rmh@aybabtu.com>
1216 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
1217 of the relocation code from here ...
1218 (grub_multiboot): ... to here.
1219 (forward_relocator, backward_relocator): Move from here ...
1220 * kern/i386/loader.S (grub_multiboot_forward_relocator)
1221 (grub_multiboot_backward_relocator): ... to here.
1222 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
1223 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
1224 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
1225 (grub_multiboot_forward_relocator_end)
1226 (grub_multiboot_backward_relocator)
1227 (grub_multiboot_backward_relocator_end): New variables.
1229 2008-08-12 Bean <bean123ch@gmail.com>
1231 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
1233 2008-08-11 Robert Millan <rmh@aybabtu.com>
1235 * kern/i386/linuxbios/startup.S: Move from here ...
1236 * kern/i386/coreboot/startup.S: ... to here.
1238 * kern/i386/linuxbios/init.c: Move from here ...
1239 * kern/i386/coreboot/init.c: ... to here.
1241 * kern/i386/linuxbios/table.c: Move from here ...
1242 * kern/i386/coreboot/mmap.c: ... to here.
1244 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
1246 2008-08-11 Robert Millan <rmh@aybabtu.com>
1248 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
1249 errors. Leave it to the upper layer to handle them.
1251 2008-08-09 Christian Franke <franke@computer.org>
1253 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
1254 * conf/common.rmk: Install `grub-pe2elf' only if requested.
1255 Install `grub.d/10_windows' only on Cygwin.
1256 * configure.ac: Add subst of `target_os'.
1257 Check `target_os' also before setting TARGET_OBJ2ELF.
1258 Add `--enable-grub-pe2elf'.
1260 2008-08-08 Robert Millan <rmh@aybabtu.com>
1262 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
1263 (grub_last_time): Change type to grub_uint64_t.
1264 (grub_disk_open): Migrate code from to using grub_get_time_ms().
1265 (grub_disk_close): Likewise.
1267 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
1268 (run_menu): Migrate code from to using grub_get_time_ms().
1270 * util/misc.c (grub_get_time_ms): New function.
1272 2008-08-08 Marco Gerards <marco@gnu.org>
1274 * disk/ata.c (grub_ata_regget): Change return type to
1276 (grub_ata_regget2): Likewise.
1277 (grub_ata_wait_status): New function.
1278 (grub_ata_wait_busy): Removed function, updated all users to use
1279 `grub_ata_wait_status'.
1280 (grub_ata_wait_drq): Likewise.
1281 (grub_ata_cmd): New function.
1282 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
1284 (grub_ata_pio_write): Add error handling.
1285 (grub_atapi_identify): Likewise.
1286 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
1288 (grub_ata_identify): Use `grub_ata_cmd' and improve error
1289 handling. Actually use the detected registers. Reorder the
1290 detection logic such that it is easier to read.
1291 (grub_ata_pciinit): Do not assign the same ID to each controller.
1292 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
1294 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
1296 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
1298 2008-08-08 Marco Gerards <marco@gnu.org>
1302 2008-08-07 Bean <bean123ch@gmail.com>
1304 * include/grub/x86_64/pci.h: New file.
1306 2008-08-07 Christian Franke <franke@computer.org>
1308 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
1309 (TIMER2_GATE): Likewise.
1310 (grub_pit_wait): Add enable/disable of the timer2 gate
1311 bit of port 0x61. This fixes a possible infinite loop.
1313 2008-08-07 Bean <bean123ch@gmail.com>
1315 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
1316 kern/i386/tsc.c and kern/i386/pit.c.
1318 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
1321 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
1324 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
1326 2008-08-07 Bean <bean123ch@gmail.com>
1328 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
1330 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
1332 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
1333 multiple inclusion. Add #include <grub/types.h>.
1335 2008-08-06 Christian Franke <franke@computer.org>
1337 * conf/common.rmk: Build and install `10_windows'.
1338 * util/grub.d/10_windows.in: New script.
1340 2008-08-06 Pavel Roskin <proski@gnu.org>
1342 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
1344 2008-08-06 Robert Millan <rmh@aybabtu.com>
1346 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
1347 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
1349 2008-08-06 Bean <bean123ch@gmail.com>
1351 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
1352 (grub_pxefs_fs_int): Remove dummy definition.
1353 (grub_pxefs_open): Use data->block_size to store the current block
1355 (grub_pxefs_read): Use block size stored in data->block_size. As the
1356 value of grub_pxe_blksize can be changed after the file is opened.
1358 2008-08-06 Bean <bean123ch@gmail.com>
1360 * fs/i386/pc/pxe.c (curr_file): new variable.
1361 (grub_pxefs_open): Simply the handling of pxe file system. Don't
1362 require the dummy internal file system anymore.
1363 (grub_pxefs_read): Removed.
1364 (grub_pxefs_close): Likewise.
1365 (grub_pxefs_fs_int): Likewise.
1366 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
1367 connection when we switch file.
1368 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
1370 2008-08-06 Robert Millan <rmh@aybabtu.com>
1372 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
1374 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
1375 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
1377 * kern/i386/halt.c: New file.
1378 * kern/i386/reboot.c: Likewise.
1379 * include/grub/i386/reboot.h: Likewise.
1380 * include/grub/i386/halt.h: Likewise.
1382 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
1383 Include `<grub/cpu/halt.h>'.
1384 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
1385 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
1387 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
1388 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
1389 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
1390 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
1391 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
1392 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
1394 * include/grub/i386/at_keyboard.h: ... to here.
1396 2008-08-05 Robert Millan <rmh@aybabtu.com>
1398 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
1399 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
1400 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
1401 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
1402 `kern/generic/millisleep.c'.
1404 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
1405 instead of grub_get_rtc().
1406 (grub_tsc_init): Initialize `tsc_boot_time'.
1408 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
1409 (grub_machine_init): Use grub_tsc_init() rather than
1410 installing an RTC-based handler via grub_install_get_time_ms().
1412 * kern/i386/pit.c: New file.
1413 * include/grub/i386/pit.h: Likewise.
1415 2008-08-05 Bean <bean123ch@gmail.com>
1417 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
1419 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
1420 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
1421 (pxe_mod_SOURCES): New macro.
1422 (pxe_mod_CFLAGS): Likewise.
1423 (pxe_mod_LDFLAGS): Likewise.
1424 (pxecmd_mod_SOURCES): Likewise.
1425 (pxecmd_mod_CFLAGS): Likewise.
1426 (pxecmd_mod_LDFLAGS): Likewise.
1428 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
1429 (grub_pxe_call): Likewise.
1431 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
1433 * commands/i386/pc/pxecmd.c: New file.
1435 * fs/i386/pc/pxe.c: Likewise.
1437 * include/grub/i386/pc/pxe.h: Likewise.
1439 2008-08-05 Bean <bean123ch@gmail.com>
1441 * util/console.c (grub_console_cur_color): New variable.
1442 (grub_console_standard_color): Likewise.
1443 (grub_console_normal_color): Likewise.
1444 (grub_console_highlight_color): Likewise.
1445 (color_map): Likewise.
1446 (use_color): Likewise.
1447 (NUM_COLORS): New macro.
1448 (grub_ncurses_setcolorstate): Handle color properly.
1449 (grub_ncurses_setcolor): Don't change color here, just remember the
1450 settings, color will be set in grub_ncurses_setcolorstate.
1451 (grub_ncurses_getcolor): New function.
1452 (grub_ncurses_init): Initialize color pairs.
1453 (grub_ncurses_term): New member grub_ncurses_getcolor.
1455 2008-08-05 Colin D Bennett <colin@gibibit.com>
1457 High resolution timer support. Implemented for x86 CPUs using TSC.
1458 Extracted generic grub_millisleep() so it's linked in only as needed.
1459 This requires a Pentium compatible CPU; if the RDTSC instruction is
1460 not supported, then it falls back on the generic grub_get_time_ms()
1461 implementation that uses the machine's RTC.
1463 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
1464 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
1465 `kern/generic/millisleep.c'.
1467 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
1468 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
1470 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
1471 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
1473 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
1475 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
1476 `kern/generic/millisleep.c'.
1478 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
1480 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
1482 * kern/generic/rtc_get_time_ms.c: New file.
1484 * kern/generic/millisleep.c: New file.
1486 * kern/misc.c: Don't include
1487 <kern/time.h> anymore.
1488 (grub_millisleep_generic): Removed.
1490 * commands/sleep.c (grub_interruptible_millisleep): Uses
1491 grub_get_time_ms() instead of grub_get_rtc().
1493 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
1495 (grub_cpu_is_cpuid_supported): New inline function.
1496 (grub_cpu_is_tsc_supported): New inline function.
1497 (grub_tsc_init): New function prototype.
1498 (grub_tsc_get_time_ms): New function prototype.
1500 * kern/i386/tsc.c (grub_get_time_ms): New file.
1502 * include/grub/time.h: Include <grub/types.h.
1503 (grub_millisleep_generic): Removed.
1504 (grub_get_time_ms): New prototype.
1505 (grub_install_get_time_ms): New prototype.
1506 (grub_rtc_get_time_ms): New prototype.
1508 * kern/time.c (grub_get_time_ms): New function.
1509 (grub_install_get_time_ms): New function.
1511 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
1512 <grub/time.h> anymore.
1513 (grub_millisleep): Removed.
1514 (grub_machine_init): Call grub_tsc_init.
1516 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
1517 get_time_ms() implementation.
1519 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
1520 (ieee1275_get_time_ms): New function.
1521 (grub_machine_init): Install get_time_ms() implementation.
1523 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
1524 (grub_machine_init): Call grub_tsc_init().
1525 (grub_millisleep): Removed.
1527 * kern/ieee1275/init.c (grub_millisleep): Removed.
1528 (grub_machine_init): Install ieee1275_get_time_ms()
1530 (ieee1275_get_time_ms): New function.
1531 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
1534 2008-08-05 Marco Gerards <marco@gnu.org>
1536 * disk/ata.c: Include <grub/pci.h>.
1537 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
1538 (grub_ata_initialize): Rewritten.
1539 (grub_ata_device_initialize): New function.
1541 2008-08-04 Pavel Roskin <proski@gnu.org>
1543 * kern/main.c: Include grub/mm.h.
1545 2008-08-04 Robert Millan <rmh@aybabtu.com>
1547 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
1548 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
1549 corruption problem).
1551 2008-08-04 Robert Millan <rmh@aybabtu.com>
1553 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
1554 warnings introduced in my last commit.
1556 2008-08-03 Robert Millan <rmh@aybabtu.com>
1558 Make PCI available on all i386 architectures.
1560 * include/grub/i386/pc/pci.h: Move from here ...
1561 * include/grub/i386/pci.h: ... to here.
1563 * include/grub/i386/pc/pci.h: Remove.
1564 * include/grub/i386/efi/pci.h: Remove.
1565 * include/grub/x86_64/efi/pci.h: Remove.
1567 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
1570 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
1571 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
1572 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
1574 * conf/i386-ieee1275.rmk: Likewise.
1576 2008-08-03 Robert Millan <rmh@aybabtu.com>
1578 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
1579 (grub_console_setcursor): Make it possible to set cursor off.
1581 2008-08-03 Robert Millan <rmh@aybabtu.com>
1583 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
1584 of modules instead of assuming which platform provides what.
1585 * util/update-grub.in: Likewise.
1587 2008-08-03 Robert Millan <rmh@aybabtu.com>
1589 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
1590 instead of `grub_install_dos_part' to determine whether a drive needs
1591 to be prepended to prefix (`grub_install_dos_part' is not reliable,
1592 because it can be overridden when loading GRUB via Multiboot).
1594 2008-08-02 Robert Millan <rmh@aybabtu.com>
1596 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
1598 2008-08-02 Robert Millan <rmh@aybabtu.com>
1600 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
1601 of informational grub_dprintf() calls.
1603 2008-08-02 Robert Millan <rmh@aybabtu.com>
1605 * disk/memdisk.c (memdisk_size): Don't initialize.
1606 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
1608 * include/grub/i386/pc/kernel.h
1609 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
1610 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
1611 (grub_memdisk_image_size, grub_arch_memdisk_addr)
1612 (grub_arch_memdisk_size): Remove.
1614 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
1615 field (was only used to transfer a constant). Add `type' field to
1616 support multiple module types.
1617 (grub_module_iterate): New function.
1619 * kern/device.c (grub_device_open): Do not hide error messages
1620 when grub_disk_open() fails. Use grub_print_error() instead.
1622 * kern/i386/pc/init.c (grub_arch_modules_addr)
1623 (grub_arch_memdisk_size): Remove functions.
1624 (grub_arch_modules_addr): Return the module address in high memory
1625 (now that it isn't copied anymore).
1627 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
1628 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
1629 decompression routine (grub_total_module_size already includes that
1630 now). Don't copy modules back to low memory.
1632 * kern/main.c: Include `<grub/mm.h>'.
1633 (grub_load_modules): Split out (and use) ...
1634 (grub_module_iterate): ... this function, which iterates through
1635 module objects and runs a hook.
1636 Comment out grub_mm_init_region() call, as it would cause non-ELF
1637 modules to be overwritten.
1639 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
1640 the memdisk image in its own region, make it part of the module list.
1641 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
1642 (main): Parse --memdisk|-m option, and pass user-provided path as
1643 parameter to generate_image().
1644 (add_segments): Pass `memdisk_path' down to load_modules().
1645 (load_modules): Embed memdisk image in module section when requested.
1646 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
1647 `header.type' instead of `header.offset'.
1649 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
1650 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
1651 (memdisk_mod_LDFLAGS): New variables.
1652 * conf/i386-coreboot.rmk: Likewise.
1653 * conf/i386-ieee1275.rmk: Likewise.
1655 2008-08-02 Robert Millan <rmh@aybabtu.com>
1657 * loader/i386/pc/multiboot.c (playground, forward_relocator)
1658 (backward_relocator): New variables. Used to allocate and relocate
1659 the payload, respectively.
1660 (grub_multiboot_load_elf32): Load into heap instead of requested
1661 address, install the appropriate relocator code in each bound of
1662 the payload, and set the entry point such that
1663 grub_multiboot_real_boot() will jump to one of them.
1665 * kern/i386/loader.S (grub_multiboot_payload_size)
1666 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
1667 (grub_multiboot_payload_entry_offset): New variables.
1668 (grub_multiboot_real_boot): Set cpu context to what the relocator
1669 expects, and jump to the relocator instead of the payload.
1671 * include/grub/i386/loader.h (grub_multiboot_payload_size)
1672 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
1673 (grub_multiboot_payload_entry_offset): Export.
1675 2008-08-01 Bean <bean123ch@gmail.com>
1677 * normal/menu_entry.c (editor_getline): Don't return the original
1678 string as result, as it will be released by lexer once it has done
1681 2008-08-01 Robert Millan <rmh@aybabtu.com>
1683 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
1684 within menuentries, not before them.
1685 util/grub.d/10_hurd.in: Likewise.
1687 2008-08-01 Bean <bean123ch@gmail.com>
1689 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
1690 (bufio_mod_SOURCES): New macro.
1691 (bufio_mod_CFLAGS): Likewise.
1692 (bufio_mod_LDFLAGS): Likewise.
1694 * include/grub/bufio.h: New file.
1696 * io/bufio.c: Likewise.
1698 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
1699 (grub_video_reader_png): Use grub_buffile_open to open file.
1701 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
1702 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
1704 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
1705 (grub_video_reader_tga): Use grub_buffile_open to open file.
1707 * font/manager.c: Include <grub/bufio.h>.
1708 (add_font): Use grub_buffile_open to open file.
1710 2008-07-31 Robert Millan <rmh@aybabtu.com>
1712 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
1713 ELF segments, use a macro for arbitrarily accessing any of them instead
1714 of preparing a pointer that allows access to one at a time.
1715 (grub_multiboot_load_elf64): Likewise.
1717 2008-07-31 Bean <bean123ch@gmail.com>
1719 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
1720 GRUB_KERNEL_MACHINE_DATA_END.
1722 2008-07-30 Robert Millan <rmh@aybabtu.com>
1724 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
1725 Increase from 0x50 to 0x60.
1726 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
1727 use UUIDs to identify the root drive for them. If that's not
1729 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
1730 check, for cross-disk installs.
1732 2008-07-30 Robert Millan <rmh@aybabtu.com>
1734 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
1735 is non-empty, use it to set the `prefix' environment variable instead
1736 of the usual approach.
1737 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
1738 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
1739 environment variable instead of dummy make_install_device().
1741 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
1742 (start): Insert a data section, with `grub_prefix' variable.
1743 * kern/i386/linuxbios/startup.S: Likewise.
1745 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
1746 New variable reference.
1747 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
1748 New macro. Defines offset of `grub_prefix' within startup.S (relative
1750 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
1751 section within startup.S (relative to `start').
1752 * include/grub/i386/coreboot/kernel.h: Likewise.
1754 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
1755 Overwrite grub_prefix with its contents, at the beginning of the
1757 (main): Understand -p|--prefix.
1759 2008-07-30 Robert Millan <rmh@aybabtu.com>
1761 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
1763 2008-07-30 Robert Millan <rmh@aybabtu.com>
1765 * term/i386/pc/vga_text.c (grub_console_cls): Use
1766 grub_console_gotoxy() to go back to beginning of the screen.
1767 Found by Patrick Georgi <patrick.georgi@coresystems.de>
1769 2008-07-29 Christian Franke <franke@computer.org>
1771 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
1772 Add conversion of emulated mount points on Cygwin.
1774 2008-07-29 Christian Franke <franke@computer.org>
1776 * util/update-grub.in: Add a check for admin
1778 Remove old `grub.cfg.new' before creation.
1779 Add `-f' to `mv' to handle the different filesystem
1780 semantics of Windows.
1782 2008-07-29 Bean <bean123ch@gmail.com>
1784 * normal/main.c (get_line): Fix buffer overflow bug.
1786 2008-07-28 Robert Millan <rmh@aybabtu.com>
1788 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
1789 (struct grub_apple_header): New struct. Describes the layout of
1791 (apple_partition_map_iterate): Check the header magic as well as the
1792 partition magic (which was already being checked).
1794 2008-07-28 Pavel Roskin <proski@gnu.org>
1796 * genmk.rb: Add a warning to the beginning of the output that
1797 it's a generated file and should not be edited.
1799 2008-07-28 Robert Millan <rmh@aybabtu.com>
1801 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
1802 with the same number are found, just use issue a warning with
1803 grub_dprintf(), as this error has been reported to be non-fatal.
1805 2008-07-27 Robert Millan <rmh@aybabtu.com>
1807 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
1810 2008-07-27 Bean <bean123ch@gmail.com>
1812 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
1813 (grub_fat_find_dir): Ignore case when comparing filename.
1815 2008-07-27 Bean <bean123ch@gmail.com>
1817 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
1818 smallino, as it's more descriptive, and i8count can be confused with
1819 the other field count.
1820 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
1823 2008-07-27 Bean <bean123ch@gmail.com>
1825 * commands/crc.c: New file.
1827 * lib/crc.c: Likewise.
1829 * include/grub/lib/crc.h: Likewise.
1831 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
1833 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
1834 (hexdump): Move this function to ...
1836 * lib/hexdump.c: ... here.
1838 * include/grub/hexdump.h: Renamed to ...
1840 * include/grub/lib/hexdump.h: ... this.
1842 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
1844 * util/grub-editenv.c: Likewise.
1846 * include/envblk.h: Renamed to ...
1848 * include/lib/envblk.h: ... this.
1850 * util/envblk.c: Renamed to ...
1852 * lib/envblk.c: ... this.
1854 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
1856 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
1857 (pkglib_MODULES): Add crc.mod.
1858 (hexdump_mod_SOURCES): Add lib/hexdump.c.
1859 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
1860 (crc_mod_SOURCES): New macro.
1861 (crc_mod_CFLAGS): Likewise.
1862 (crc_mod_LDFLAGS): Likewise.
1864 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
1866 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1868 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
1870 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1872 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1874 2008-07-27 Felix Zielcke <fzielcke@z-51.de>
1876 * commands/help.c: Include <grub/term.h>.
1877 (TERM_WIDTH): Removed. Updated all users.
1879 2008-07-27 Pavel Roskin <proski@gnu.org>
1881 * util/getroot.c (find_root_device): Rephrase a comment to avoid
1882 spurious warnings about a comment within a comment.
1884 2008-07-25 Robert Millan <rmh@aybabtu.com>
1886 * util/getroot.c (find_root_device): Skip devices that match
1887 /dev/dm-[0-9]. This lets the real device be found for any type of
1888 abstraction (LVM, EVMS, RAID..).
1889 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
1890 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
1891 device is found first, find_root_device() will now skip it.
1893 2008-07-24 Pavel Roskin <proski@gnu.org>
1895 * include/grub/types.h: Use __builtin_bswap32() and
1896 __builtin_bswap64() with gcc 4.3 and newer.
1898 2008-07-24 Christian Franke <franke@computer.org>
1900 * util/i386/pc/grub-install.in: If `--debug' is specified,
1901 pass `--verbose' to grub-setup.
1902 Abort script if make_system_path_relative_to_its_root() fails.
1904 2008-07-24 Bean <bean123ch@gmail.com>
1906 * configure.ac: Fixed a bug caused by the previous cygwin patch,
1907 variable `target_platform' should be `platform'.
1909 2008-07-24 Bean <bean123ch@gmail.com>
1911 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
1912 (grub_png_init_fixed_block): New function.
1913 (grub_png_decode_image_data): Handle fixed huffman code compression.
1915 2008-07-24 Bean <bean123ch@gmail.com>
1917 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
1918 (grub_pe2elf_SOURCES): New macro.
1919 (CLEANFILES): Add grub-pe2elf.
1921 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
1922 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
1923 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
1924 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
1925 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
1926 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
1927 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
1928 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
1929 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
1930 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
1931 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
1932 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
1933 (GRUB_PE32_DT_FUNCTION): Likewise.
1934 (GRUB_PE32_REL_I386_DIR32): Likewise.
1935 (GRUB_PE32_REL_I386_REL32): Likewise.
1936 (grub_pe32_symbol): New structure.
1937 (grub_pe32_reloc): Likewise.
1939 * util/grub-pe2elf.c: New file.
1941 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
1942 start symbol in non pc platform.
1944 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
1946 The following patches are from Christian Franke.
1948 * include/grub/dl.h: Remove .previous, gas supports this only
1951 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
1952 Remove .type, gas supports this only for ELF format.
1954 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
1955 nullbytes in symbol table. This fixes an infinite loop if table is
1958 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
1959 TARGET_IMG_LDFLAGS and EXEEXT.
1961 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
1962 TARGET_IMG_LDFLAGS_AC.
1963 (grub_CHECK_STACK_ARG_PROBE): New function.
1965 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
1967 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
1969 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
1970 to set TARGET_IMG_LD* accordingly.
1971 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
1972 Add call to grub_CHECK_STACK_ARG_PROBE.
1973 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
1975 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
1977 * genmk.rb: Add EXEEXT to CLEANFILES.
1979 2008-07-23 Robert Millan <rmh@aybabtu.com>
1981 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
1982 define the codes for arrows and lines used for the menu).
1983 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
1986 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
1987 fonts, because the latter are too slow.
1989 2008-07-21 Bean <bean123ch@gmail.com>
1991 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
1992 a20. Run keyboard test last, as it will cause macbook to halt.
1994 2008-07-18 Pavel Roskin <proski@gnu.org>
1996 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
1997 load foreign architecture modules correctly anyway. Keep
1998 support for loading host architecture modules, whether we
1999 compile them or not.
2001 2008-07-17 Pavel Roskin <proski@gnu.org>
2003 * configure.ac: Use -m32 or -m64 regardless of whether we had to
2004 change target_cpu. The compiler default can mismatch target_cpu
2007 * disk/efi/efidisk.c: Fix format warnings on x86_64.
2008 * kern/efi/efi.c: Likewise.
2010 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
2011 target compiler is functional.
2012 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
2015 * configure.ac: Default to efi platform for x86_64-apple. Allow
2016 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
2017 adjustments from the rest, only do them if target is not
2018 explicitly given. Merge other adjustments with the final sanity
2019 check. Remove an extraneous check for supported CPU. Be
2020 specific which CPU and which platform is not supported.
2022 * configure.ac: Default to pc platform for x86_64.
2024 2008-07-17 Robert Millan <rmh@aybabtu.com>
2026 Partial LinuxBIOS -> Coreboot rename.
2028 * conf/i386-linuxbios.rmk: Renamed to ...
2029 * conf/i386-coreboot.rmk: ... this.
2030 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
2031 * configure.ac: Accept "coreboot" as input platform (but maintain
2032 compatibility with "linuxbios").
2033 * include/grub/i386/linuxbios: Renamed to ...
2034 * include/grub/i386/coreboot: ... this.
2036 2008-07-17 Bean <bean123ch@gmail.com>
2038 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
2039 (appleldr_mod_SOURCE): New variable.
2040 (appleldr_mod_CFLAGS): Likewise.
2041 (appleldr_mod_LDFLAGS): Likewise.
2042 (pci_mod_SOURCES): Likewise.
2043 (pci_mod_CFLAGS): Likewise.
2044 (pci_mod_LDFLAGS): Likewise.
2045 (lspci_mod_SOURCES): Likewise.
2046 (lspci_mod_CFLAGS): Likewise.
2047 (lspci_mod_LDFLAGS): Likewise.
2049 * conf/x86_64-efi.rmk: New file.
2051 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
2053 (grub_efidisk_write): Likewise.
2055 * include/efi/api.h (efi_call_0): New macro.
2056 (efi_call_1): Likewise.
2057 (efi_call_2): Likewise.
2058 (efi_call_3): Likewise.
2059 (efi_call_4): Likewise.
2060 (efi_call_5): Likewise.
2061 (efi_call_6): Likewise.
2063 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
2064 grub_rescue_cmd_chainloader.
2066 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
2067 (grub_pe32_optional_header): Change some fields based on i386 or
2069 (GRUB_PE32_PE32_MAGIC): Likewise.
2071 * include/grub/efi/uga_draw.h: New file.
2073 * include/grub/elf.h (STN_ABS): New constant.
2074 (R_X86_64_NONE): Relocation constant for x86_64.
2075 (R_X86_64_64): Likewise.
2076 (R_X86_64_PC32): Likewise.
2077 (R_X86_64_GOT32): Likewise.
2078 (R_X86_64_PLT32): Likewise.
2079 (R_X86_64_COPY): Likewise.
2080 (R_X86_64_GLOB_DAT): Likewise.
2081 (R_X86_64_JUMP_SLOT): Likewise.
2082 (R_X86_64_RELATIVE): Likewise.
2083 (R_X86_64_GOTPCREL): Likewise.
2084 (R_X86_64_32): Likewise.
2085 (R_X86_64_32S): Likewise.
2086 (R_X86_64_16): Likewise.
2087 (R_X86_64_PC16): Likewise.
2088 (R_X86_64_8): Likewise.
2089 (R_X86_64_PC8): Likewise.
2091 * include/grub/i386/efi/pci.h: New file.
2093 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
2094 Change it value based on platform.
2095 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
2096 (GRUB_E820_RAM): Likewise.
2097 (GRUB_E820_RESERVED): Likewise.
2098 (GRUB_E820_ACPI): Likewise.
2099 (GRUB_E820_NVS): Likewise.
2100 (GRUB_E820_EXEC_CODE): Likewise.
2101 (GRUB_E820_MAX_ENTRY): Likewise.
2102 (grub_e820_mmap): New structure.
2103 (linux_kernel_header): Change the efi field according to different
2104 kernel version, also field from linux_kernel_header.
2106 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
2108 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
2109 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
2110 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
2111 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
2112 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
2113 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
2114 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
2115 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
2116 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
2117 (GRUB_PCI_ADDR_IO_MASK): Likewise.
2119 * include/grub/x86_64/efi/kernel.h: New file.
2121 * include/grub/x86_64/efi/loader.h: Likewise.
2123 * include/grub/x86_64/efi/machine.h: Likewise.
2125 * include/grub/x86_64/efi/pci.h: Likewise.
2127 * include/grub/x86_64/efi/time.h: Likewise.
2129 * include/grub/x86_64/linux.h: Likewise.
2131 * include/grub/x86_64/setjmp.h: Likewise.
2133 * include/grub/x86_64/time.h: Likewise.
2135 * include/grub/x86_64/types.h: Likewise.
2137 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
2138 GRUB_TARGET_SIZEOF_VOID_P.
2140 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
2141 (grub_efi_locate_handle): Likewise.
2142 (grub_efi_open_protocol): Likewise.
2143 (grub_efi_set_text_mode): Likewise.
2144 (grub_efi_stall): Likewise.
2145 (grub_exit): Likewise.
2146 (grub_reboot): Likewise.
2147 (grub_halt): Likewise.
2148 (grub_efi_exit_boot_services): Likewise.
2149 (grub_get_rtc): Likewise.
2151 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
2152 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
2153 (grub_efi_allocate_pages): Wrap efi calls.
2154 (grub_efi_free_pages): Wrap efi calls.
2155 (grub_efi_get_memory_map): Wrap efi calls.
2157 * kern/x86_64/dl.c: New file.
2159 * kern/x86_64/efi/callwrap.S: Likewise.
2161 * kern/x86_64/efi/startup.S: Likewise.
2163 * loader/efi/appleloader.c: Likewise.
2165 * loader/efi/chainloader.c (cmdline): New variable.
2166 (grub_chainloader_unload): Wrap efi calls.
2167 (grub_chainloader_boot): Likewise.
2168 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
2171 * loader/efi/chainloader_normal.c (chainloader_command):
2172 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
2175 * loader/i386/efi/linux.c (allocate_pages): Change allocation
2177 (grub_e820_add_region): New function.
2178 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
2180 (grub_find_video_card): New function.
2181 (grub_linux_setup_video): New function.
2182 (grub_rescue_cmd_linux): Probe for video information.
2184 * normal/x86_64/setjmp.S: New file.
2186 * term/efi/console.c (map_char): New function.
2187 (grub_console_putchar): Map unicode char.
2188 (grub_console_checkkey): Wrap efi calls.
2189 (grub_console_getkey): Likewise.
2190 (grub_console_getwh): Likewise.
2191 (grub_console_gotoxy): Likewise.
2192 (grub_console_cls): Likewise.
2193 (grub_console_setcolorstate): Likewise.
2194 (grub_console_setcursor): Likewise.
2196 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
2198 2008-07-16 Pavel Roskin <proski@gnu.org>
2200 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
2203 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
2204 pointer, not an integer. This fixes a warning and prevents
2205 precision loss on 64-bit systems.
2206 (relocate_addresses): Remove unneeded cast.
2208 2008-07-15 Pavel Roskin <proski@gnu.org>
2210 * kern/i386/ieee1275/init.c: Include grub/cache.h.
2212 * term/ieee1275/ofconsole.c: Disable code unused on i386.
2214 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
2215 Fix comparison between signed and unsigned.
2217 * include/grub/i386/ieee1275/console.h: Declare
2218 grub_console_init() and grub_console_fini().
2220 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
2221 It's empty and unused.
2223 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
2224 beginning to avoid warnings with some compilers.
2226 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
2227 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
2229 2008-07-14 Pavel Roskin <proski@gnu.org>
2231 * kern/env.c (grub_register_variable_hook): Don't copy empty
2232 string, it leaks memory. Pass "" to grub_env_set(), it should
2233 handle constant strings.
2235 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
2236 * commands/cmp.c (grub_cmd_cmp): Likewise.
2237 * kern/dl.c (grub_dl_flush_cache): Likewise.
2238 (grub_dl_load_core): Likewise.
2239 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
2240 (grub_elf64_load_phdrs): Likewise.
2242 2008-07-13 Pavel Roskin <proski@gnu.org>
2244 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
2245 between signed and unsigned.
2246 (LzmaEnc_Finish): Fix warning about an unused parameter.
2248 2008-07-13 Bean <bean123ch@gmail.com>
2250 * Makefile.in (enable_lzo): New rule.
2252 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
2254 * configure.ac (ENABLE_LZO): New option --enable-lzo.
2256 * boot/i386/pc/lnxboot.S: #include <config.h>.
2258 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
2259 its value according to the compression algorithm used, lzo or lzma.
2261 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
2262 compression algorithm according to configure macro.
2264 * kern/i386/pc/startup.S (codestart): Likewise.
2266 * kern/i386/pc/lzma_decode.S: New file.
2268 * include/grub/lib/LzFind.h: Likewise.
2270 * include/grub/lib/LzHash.h: Likewise.
2272 * include/grub/lib/LzmaDec.h: Likewise.
2274 * include/grub/lib/LzmaEnc.h: Likewise.
2276 * include/grub/lib/LzmaTypes.h: Likewise.
2278 * lib/LzFind.c: Likewise.
2280 * lib/LzmaDec.c: Likewise.
2282 * lib/LzmaEnc.c: Likewise.
2284 2008-07-13 Bean <bean123ch@gmail.com>
2286 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
2287 (grub_ext4_extent_header): New structure.
2288 (grub_ext4_extent): Likewise.
2289 (grub_ext4_extent_idx): Likewise.
2290 (grub_ext4_find_leaf): New function.
2291 (grub_ext2_read_block): Handle extents.
2293 2008-07-12 Robert Millan <rmh@aybabtu.com>
2295 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
2297 2008-07-11 Robert Millan <rmh@aybabtu.com>
2299 * util/grub.d/40_custom.in: New file. Example on how to add custom
2300 entries to /etc/grub.d.
2301 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
2302 40_custom (implicitly, by merging all the grub.d rules).
2304 2008-07-11 Pavel Roskin <proski@gnu.org>
2306 * commands/read.c (grub_getline): Fix invalid memory access.
2307 Don't add newline to the variable value.
2309 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
2310 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
2311 (serial_hw_get_port): Check validity of the port number.
2312 (grub_cmd_serial): Check return value of serial_hw_get_port().
2314 2008-07-07 Pavel Roskin <proski@gnu.org>
2316 * boot/i386/pc/diskboot.S (notification_string): Replace
2317 "Loading kernel" with just "loading". This is shorter, less
2318 confusing and saves a few bytes for possible future changes.
2320 2008-07-05 Pavel Roskin <proski@gnu.org>
2322 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
2323 size for ATAPI devices, they are undefined. Output sector
2324 number in decimal form.
2326 * disk/ata.c: Use named constants for status bits.
2328 2008-07-04 Pavel Roskin <proski@gnu.org>
2330 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
2331 grub_addr_t before casting it to the void pointer to fix a
2332 warning. Non-addressable regions are discarded earlier.
2333 (grub_arch_modules_addr): Cast _end to grub_addr_t.
2334 * kern/i386/linuxbios/table.c: Include grub/misc.h.
2335 (check_signature): Don't shadow table_header.
2336 (grub_linuxbios_table_iterate): Cast numeric constants to
2337 grub_linuxbios_table_header_t.
2338 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
2341 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
2344 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
2345 pointer, which can cause warnings. Support 64-bit addresses.
2347 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
2348 of sizeof(long). This fixes PowerPC image generation on x86_64.
2350 2008-07-04 Robert Millan <rmh@aybabtu.com>
2352 This fixes a performance issue when pc & gpt partmap iterators
2353 didn't abort iteration even after our hook found what it was
2354 looking for (often causing expensive probes of non-existent drives).
2356 Some callers relied on previous buggy behaviour, since they would
2357 rise an error when their own hooks caused early abortion of its
2360 * kern/device.c (grub_device_open): Improve error message.
2361 * disk/lvm.c (grub_lvm_open): Likewise.
2362 * disk/raid.c (grub_raid_open): Likewise.
2364 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
2365 when hook requests it, independently of grub_errno.
2366 (pc_partition_map_probe): Do not fail when find_func() caused
2367 early abortion of pc_partition_map_iterate().
2369 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
2370 when hook requests it, independently of grub_errno.
2371 (gpt_partition_map_probe): Do not fail when find_func() caused
2372 early abortion of gpt_partition_map_iterate().
2374 * kern/partition.c (grub_partition_iterate): Abort parent iteration
2375 when hook requests it, independently of grub_errno. Do not fail when
2376 part_map_iterate_hook() caused early abortion of p->iterate().
2378 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
2379 when grub_partition_iterate() returned with non-zero.
2381 2008-07-03 Pavel Roskin <proski@gnu.org>
2383 * disk/ata.c (grub_ata_pio_write): Check status before writing,
2384 like we do in grub_ata_pio_read().
2385 (grub_ata_readwrite): Always write individual sectors. Fix the
2386 sector count for the remainder.
2387 (grub_ata_write): Enable writing to ATA devices. Correctly
2388 report error for ATAPI devices.
2390 2008-07-02 Pavel Roskin <proski@gnu.org>
2392 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
2395 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
2396 for every read sector, we already increment it for the whole
2397 batch. This fixes reading more than 256 sectors at once.
2399 * util/grub-editenv.c (cmd_info): Cast argument to long
2400 explicitly. ptrdiff_t reduces to int on i386.
2402 * util/grub-editenv.c (main): Be specific which parameter is
2405 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
2406 (memdisk): Make memdisk_orig_addr a pointer.
2408 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
2409 for file offsets, use grub_off_t instead. Fix printf format
2412 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
2413 there. Real unexpected warnings should not drown in the noise
2414 about known problems.
2416 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
2417 grub_disk_addr_t for memory addresses.
2419 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
2420 explicitly to fix a warning.
2422 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
2424 * Makefile.in (MODULE_LDFLAGS): New variable.
2425 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
2426 the linker accepts --build-id=none.
2427 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
2429 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
2431 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
2432 those in Linux XFS code. Provide a way to access 64-bit parent
2434 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
2435 the end of struct grub_xfs_dir_header.
2437 2008-07-02 Bean <bean123ch@gmail.com>
2439 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
2440 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
2441 and GRUB_IEEE1275_FLAG_NO_ANSI.
2443 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
2444 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
2445 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
2447 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
2448 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
2450 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
2451 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
2453 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
2454 esc sequence on non ANSI terminal.
2455 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
2457 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
2460 2008-07-02 Bean <bean123ch@gmail.com>
2462 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
2463 (grub_editenv_SOURCES): New variable.
2464 (pkglib_MODULES): Add loadenv.mod.
2465 (loadenv_mod_SOURCES): New variable.
2466 (loadenv_mod_CFLAGS): Likewise.
2467 (loadenv_mod_LDFLAGS): Likewise.
2469 * include/grub/envblk.h: New file.
2471 * util/envblk.c: New file.
2473 * util/grub-editenv.c: New file.
2475 * commands/loadenv.c: New file.
2477 2008-07-01 Pavel Roskin <proski@gnu.org>
2479 * include/multiboot2.h (struct multiboot_tag_module): Use char,
2480 not unsigned char. This fixes warnings and is consistent with
2483 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
2485 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
2487 * term/tparm.c (analyze): Always set *popcount.
2489 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
2490 cast to fix a warning.
2492 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
2493 cast to suppress a warning.
2495 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
2496 grub_fshelp_read_file() expects.
2498 * fs/fat.c: Fix UUID calculation on big-endian systems. We
2499 write uuid as a 32-bit value in CPU byte order, so declare and
2502 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
2503 long if the format specifier expects it.
2504 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
2505 * partmap/pc.c (pc_partition_map_iterate): Likewise.
2506 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
2507 long to fix a warning.
2508 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
2509 grub_dprintf() arguments to fix warnings.
2511 2008-06-30 Pavel Roskin <proski@gnu.org>
2513 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
2514 install_bsd_part immediately before core.img is embedded or
2515 modified on disk. This fixes core.img verification if core.img
2518 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
2519 core_path to calculate the blocklist.
2520 Patch from Javier MartÃn <lordhabbit@gmail.com>
2522 2008-06-29 Robert Millan <rmh@aybabtu.com>
2524 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
2525 block to disk block.
2526 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
2527 Patch from Niels Böhm <bitbucket@arcor.de>
2529 2008-06-29 Robert Millan <rmh@aybabtu.com>
2531 * util/update-grub_lib.in (font_path): Search for fonts in
2532 /boot/grub first, which is more likely to be readable (we aren't
2533 deciding where fonts live, just looking for them).
2535 2008-06-26 Pavel Roskin <proski@gnu.org>
2537 * util/biosdisk.c (read_device_map): Don't leave dead map
2538 entries for devices failing stat() check.
2540 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
2541 core_path_dev for the core.img path on the target device.
2543 2008-06-26 Robert Millan <rmh@aybabtu.com>
2545 * disk/fs_uuid.c: New file.
2546 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
2547 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
2548 (fs_uuid_mod_LDFLAGS): New variables.
2549 * include/grub/disk.h (grub_disk_dev_id): Add
2550 `GRUB_DISK_DEVICE_UUID_ID'.
2551 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
2552 implement iterate().
2554 2008-06-26 Robert Millan <rmh@aybabtu.com>
2556 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
2557 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
2558 Linux image includes no initrd.
2560 2008-06-21 Javier MartÃn <lordhabbit@gmail.com>
2562 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
2563 call to resolve the core image location that effectively appended the
2566 2008-06-21 Robert Millan <rmh@aybabtu.com>
2568 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
2571 * util/grub.d/10_hurd.in: ... to here ...
2572 * util/grub.d/10_linux.in: ... and here.
2574 2008-06-19 Robert Millan <rmh@aybabtu.com>
2576 * kern/main.c (grub_main): Export `prefix' variable immediately
2577 after it has been set by grub_machine_set_prefix().
2579 2008-06-19 Robert Millan <rmh@aybabtu.com>
2581 * commands/search.c (search_label, search_fs_uuid, search_file): Print
2582 search result when not saving to variable, not the other way around.
2583 When saving to variable, abort iteration as soon as a match is found.
2585 2008-06-19 Robert Millan <rmh@aybabtu.com>
2587 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
2588 check for partition that provides /boot/grub. Its logic is flawed,
2589 as it prevents prepare_grub_to_access_device() from being called
2592 2008-06-19 Robert Millan <rmh@aybabtu.com>
2594 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
2595 "insmod" command directly when abstraction modules are needed,
2596 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
2597 since it had already been processed).
2599 2008-06-19 Pavel Roskin <proski@gnu.org>
2601 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
2602 changed. This is needed in case GRUB_LIBDIR changes.
2603 * conf/i386-ieee1275.rmk: Likewise.
2604 * conf/i386-linuxbios.rmk: Likewise.
2605 * conf/i386-pc.rmk: Likewise.
2606 * conf/powerpc-ieee1275.rmk: Likewise.
2608 2008-06-18 Pavel Roskin <proski@gnu.org>
2610 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
2611 kernel_elf_symlist.c to symlist.c for consistency with other
2612 architectures. Update all users.
2613 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
2615 2008-06-18 Robert Millan <rmh@aybabtu.com>
2617 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
2620 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
2621 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
2622 a RAID device, run setup() for all members independently on whether
2623 LVM abstraction is being used.
2624 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
2625 If grub-mkimage has set `*install_dos_part == -2', don't override this
2627 Perform *install_dos_part adjustments independently on whether
2628 we're embedding or not.
2629 Clarify error message when image is too big for embedding.
2630 Remove duplicate *install_dos_part stanza.
2632 2008-06-17 Robert Millan <rmh@aybabtu.com>
2634 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
2635 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
2637 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
2638 values in grub_ofconsole_normal_color and
2639 grub_ofconsole_highlight_color (they're not directly related to
2640 background and foreground).
2641 (grub_ofconsole_setcolorstate): Extract background and foreground
2642 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
2644 2008-06-17 Robert Millan <rmh@aybabtu.com>
2646 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
2647 /boot/grub for the check in last commit, not /boot (they could be
2648 different partitions).
2650 2008-06-16 Robert Millan <rmh@aybabtu.com>
2652 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
2653 asked to setup access for the same partition that provides /boot,
2654 don't bother using UUIDs since our root already has the value we
2657 2008-06-16 Robert Millan <rmh@aybabtu.com>
2659 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
2661 Patch from Sven Mueller <sven@debian.org>.
2663 2008-06-16 Robert Millan <rmh@aybabtu.com>
2665 * util/update-grub.in: Check for $EUID instead of $UID.
2666 Reported by Vincent Zweije.
2668 2008-06-16 Bean <bean123ch@gmail.com>
2670 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
2671 (grub_ext2_read_block): Likewise.
2672 (grub_ext2_read_inode): Likewise.
2673 (grub_ext2_mount): Likewise.
2674 (grub_ext2_close): Likewise.
2675 (grub_ext3_get_journal): Removed.
2677 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
2678 (grub_reiserfs_read_symlink): Likewise.
2679 (grub_reiserfs_mount): Likewise.
2680 (grub_reiserfs_open): Likewise.
2681 (grub_reiserfs_read): Likewise.
2682 (grub_reiserfs_close): Likewise.
2683 (grub_reiserfs_get_journal): Removed.
2685 * fs/fshelp.c (grub_fshelp_read): Removed.
2686 (grub_fshelp_map_block): Likewise.
2688 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
2689 (grub_fshelp_journal): Likewise.
2690 (grub_fshelp_read): Likewise.
2691 (grub_fshelp_map_block): Likewise.
2693 2008-06-16 Pavel Roskin <proski@gnu.org>
2695 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
2696 floating point anymore.
2697 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
2699 2008-06-15 Pavel Roskin <proski@gnu.org>
2701 * commands/ls.c (grub_ls_list_files): Use integer calculations
2702 for human readable format, avoid floating point use.
2703 * kern/misc.c (grub_ftoa): Remove.
2704 (grub_vsprintf): Remove floating point support.
2706 2008-06-15 Robert Millan <rmh@aybabtu.com>
2708 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
2710 Reported by Max Vozeler.
2712 2008-06-15 Robert Millan <rmh@aybabtu.com>
2714 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
2715 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
2717 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
2718 the beginning of the prefix.
2720 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
2721 It is assumed that if we have a memdisk, grub-mkimage has set
2722 grub_prefix to include the "(memdisk)" drive in it.
2724 2008-06-15 Robert Millan <rmh@aybabtu.com>
2726 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
2727 Initialize keyboard controller after registering the terminal, so that
2728 grub_printf() can be called from grub_keyboard_controller_init().
2730 2008-06-15 Robert Millan <rmh@aybabtu.com>
2732 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
2733 extent-btree which is written as big endian on disk.
2734 Reported by Alain Greppin <al@chilibi.org>.
2736 2008-06-14 Robert Millan <rmh@aybabtu.com>
2738 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
2739 * util/i386/pc/grub-install.in (modules): Likewise.
2741 2008-06-13 Pavel Roskin <proski@gnu.org>
2743 * commands/ls.c (grub_ls_list_files): Fix format warnings.
2745 2008-06-13 Bean <bean123ch@gmail.com>
2747 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
2749 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
2751 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
2752 to indicate sparse block.
2754 2008-06-12 Pavel Roskin <proski@gnu.org>
2756 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
2757 number, grub_fshelp_read() does it for us.
2759 * fs/fshelp.c (grub_fshelp_read): New function. Implement
2760 linear disk read with journal translation.
2761 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
2762 * include/grub/fshelp.h: Declare grub_fshelp_read().
2764 2008-06-09 Pavel Roskin <proski@gnu.org>
2766 * fs/minix.c (grub_minix_mount): Handle error reading
2769 2008-06-08 Robert Millan <rmh@aybabtu.com>
2771 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
2772 don't append the RAID prefix afterwards.
2773 Reported by Clint Adams.
2775 2008-06-08 Robert Millan <rmh@aybabtu.com>
2777 Based on description from Pavel:
2778 * kern/disk.c (grub_disk_check_range): Rename to ...
2779 (grub_disk_adjust_range): ... this. Add a comment explaining the
2780 tasks performed by this function.
2782 2008-06-08 Robert Millan <rmh@aybabtu.com>
2784 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
2785 `num_serial' (for consistency with other variables).
2786 (struct grub_ntfs_data): Add `uuid' member.
2787 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
2788 (grub_ntfs_uuid): New function.
2789 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
2791 2008-06-07 Pavel Roskin <proski@gnu.org>
2793 * util/biosdisk.c (open_device): Revert last change to the
2794 function, it broke installation. The sector needs to be
2795 different dependent on which device is opened.
2797 2008-06-06 Robert Millan <rmh@aybabtu.com>
2799 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
2800 rest of GRUB, and breakage doesn't happen if its value were modified.
2802 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
2803 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
2804 a constant (same value).
2805 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
2806 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
2808 2008-06-06 Robert Millan <rmh@aybabtu.com>
2810 * util/biosdisk.c (open_device): Do not modify sector offset when
2811 accessing a partition. kern/disk.c already handles this for us.
2813 2008-06-06 Robert Millan <rmh@aybabtu.com>
2815 * util/grub-emu.c (grub_machine_init): Move code in this function from
2817 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
2818 segfault in case grub_printf() is called).
2820 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
2821 grub_probe. Update all users not to explicitly add it again.
2822 (grub_device): New variable; contains corresponding device for grubdir.
2823 (fs_module, partmap_module, devabstraction_module): Pass
2824 `--device ${grub_device}' to grub_probe to avoid traversing /dev
2827 2008-06-05 Robert Millan <rmh@aybabtu.com>
2829 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
2830 is found, print it (same layout as with labels).
2832 2008-06-04 Robert Millan <rmh@aybabtu.com>
2834 * util/biosdisk.c (get_drive): Rename to ...
2835 (find_grub_drive): ... this. Update all users.
2837 (get_os_disk): Rename to ...
2838 (convert_system_partition_to_system_disk): ... this. Update all users.
2840 (find_drive): Rename to ...
2841 (find_system_device): ... this. Update all users.
2843 2008-06-04 Robert Millan <rmh@aybabtu.com>
2845 * util/biosdisk.c (get_os_disk): Handle IDA devices.
2846 * util/grub-mkdevicemap.c (get_mmc_disk_name)
2847 (make_device_map): Likewise.
2849 2008-06-01 Robert Millan <rmh@aybabtu.com>
2851 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
2852 before dereferencing it.
2854 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
2855 union with fat12/fat16-specific ones. Add some new fields, including
2856 `num_serial' for both versions.
2857 (struct grub_fat_data): Add `uuid' member.
2858 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
2859 names. Initialize `data->uuid' using `num_serial'.
2860 (grub_fat_uuid): New function.
2861 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
2863 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
2864 (grub_reiserfs_uuid): New function.
2865 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
2868 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
2869 (grub_xfs_uuid): New function.
2870 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
2872 2008-06-01 Robert Millan <rmh@aybabtu.com>
2874 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
2875 code that is backward compatible with pre-uuid search command.
2877 2008-05-31 Robert Millan <rmh@aybabtu.com>
2879 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
2880 floppies after everything else, to ensure floppy drive isn't accessed
2881 unnecessarily (patch from Bean).
2883 2008-05-31 Robert Millan <rmh@aybabtu.com>
2885 * commands/search.c (search_label, search_fs_uuid, search_file): Do
2886 not print device names when we were asked to set a variable.
2888 2008-05-31 Robert Millan <rmh@aybabtu.com>
2890 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
2891 using "cursor-on" and "cursor-off" commands (understood at least by
2892 the Open Firmware flavour on OLPC).
2894 2008-05-31 Michael Gorven <michael@gorven.za.net>
2896 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
2897 on and off sequences.
2899 2008-05-31 Robert Millan <rmh@aybabtu.com>
2901 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
2902 * util/update-grub.in: Likewise.
2904 2008-05-30 Pavel Roskin <proski@gnu.org>
2906 * util/biosdisk.c (linux_find_partition): Simplify logic and
2907 make the code more universal. Keep special processing for
2908 devfs, but use a simple rule for all other devices. If the
2909 device ends with a number, append 'p' and the partition number.
2910 Otherwise, append only the partition number.
2912 2008-05-30 Robert Millan <rmh@aybabtu.com>
2914 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
2915 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
2916 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
2917 the `root' parameter to Linux.
2919 2008-05-30 Robert Millan <rmh@aybabtu.com>
2921 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
2922 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
2923 --fs_uuid with --fs-uuid.
2924 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
2925 all filesystems support them).
2927 2008-05-30 Robert Millan <rmh@aybabtu.com>
2929 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
2930 grub_printf() flags, since we're printing in units of 2 bytes.
2932 2008-05-30 Robert Millan <rmh@aybabtu.com>
2934 * util/grub.d/00_header.in: Remove obsolete comment referencing
2935 convert_system_path_to_grub_path().
2936 * util/update-grub.in: Likewise.
2937 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
2938 (convert_system_path_to_grub_path): Add a warning message explaining
2939 that this function is deprecated. Rely on is_path_readable_by_grub()
2940 for the readability checks.
2941 (font_path): Use is_path_readable_by_grub() for the readability
2942 check rather than convert_system_path_to_grub_path().
2944 2008-05-30 Robert Millan <rmh@aybabtu.com>
2946 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
2947 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
2948 converting it first.
2949 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
2950 grub.cfg for access to font file, and afterwards call it again to set
2953 2008-05-30 Robert Millan <rmh@aybabtu.com>
2955 * commands/search.c (options): Add --fs_uuid option.
2956 (search_fs_uuid): New function.
2957 (grub_cmd_search): Fix --set argument passing.
2958 Use search_fs_uuid() when requested via --fs_uuid.
2959 (grub_search_init): Update help message.
2960 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
2961 and redeclare it as an array of 16-bit words.
2962 (grub_ext2_uuid): New function.
2963 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
2964 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
2965 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
2966 (GRUB_DEVICE_BOOT_UUID): New variables.
2967 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
2968 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
2970 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
2971 just assume `root' variable has the right value.
2972 * util/grub.d/10_linux.in: Likewise.
2973 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
2975 (main): Recognise `-t fs_uuid' argument.
2977 2008-05-30 Robert Millan <rmh@aybabtu.com>
2979 * util/biosdisk.c (map): Redefine structure to hold information
2980 about GRUB drive name.
2981 (get_drive): Reimplement without assuming (and verifying) BIOS-like
2983 (call_hook): Remove.
2984 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
2985 member. Assume drive has partitions.
2986 (grub_util_biosdisk_open): Access device names via `.device' struct
2988 (open_device): Likewise.
2989 (find_drive): Likewise.
2990 (read_device_map): Adjust map[] usage to match the new struct
2991 definition. Don't check for duplicates (still possible, but not cheap
2993 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
2994 (make_device_name): Remove assumption of BIOS-like drive names.
2996 2008-05-30 Pavel Roskin <proski@gnu.org>
2998 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
2999 compiling execute.c doesn't need grub_script.tab.h anymore.
3000 (normal/command.c_DEPENDENCIES): Likewise.
3001 (normal/function.c_DEPENDENCIES): Likewise.
3002 * conf/i386-ieee1275.rmk: Likewise.
3003 * conf/i386-linuxbios.rmk: Likewise.
3004 * conf/i386-pc.rmk: Likewise.
3005 * conf/powerpc-ieee1275.rmk: Likewise.
3006 * conf/sparc64-ieee1275.rmk: Likewise.
3008 2008-05-29 Pavel Roskin <proski@gnu.org>
3010 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
3011 when scanning metadata for volume group name.
3013 * include/grub/script.h: Don't include grub_script.tab.h. It's
3014 a generated file, which may only be included from the files with
3015 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
3016 use union YYSTYPE, as the later allows forward declaration.
3017 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
3019 2008-05-29 Robert Millan <rmh@aybabtu.com>
3021 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
3022 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
3023 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
3024 (grub_console_checkkey): Add grub_dprintf() call to report unknown
3027 2008-05-29 Robert Millan <rmh@aybabtu.com>
3029 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
3030 control key combinations.
3032 2008-05-29 Robert Millan <rmh@aybabtu.com>
3034 * util/powerpc/ieee1275/grub-install.in: Move from here ...
3035 * util/ieee1275/grub-install.in: ... to here.
3036 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
3037 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
3038 (grub_install_SOURCES): Likewise.
3040 2008-05-29 Robert Millan <rmh@aybabtu.com>
3042 * fs/affs.c: Update copyright year.
3043 * fs/ext2.c: Likewise.
3044 * fs/fshelp.c: Likewise.
3045 * fs/hfsplus.c: Likewise.
3046 * fs/ntfs.c: Likewise.
3047 * fs/xfs.c: Likewise.
3048 * include/grub/fshelp.h: Likewise.
3049 * util/grub-mkdevicemap.c: Likewise.
3051 2008-05-28 Robert Millan <rmh@aybabtu.com>
3053 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
3054 might need to be fatfs to support some firmware implementations
3057 2008-05-28 Robert Millan <rmh@aybabtu.com>
3059 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
3061 * util/grub-mkdevicemap.c (get_mmc_disk_name)
3062 (make_device_map): Likewise.
3064 2008-05-20 Bean <bean123ch@gmail.com>
3066 * fs/fshelp.c (grub_fshelp_map_block): New function.
3067 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
3068 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
3070 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
3071 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
3072 (grub_fshelp_journal): New structure.
3073 (grub_fshelp_map_block): New function prototype.
3074 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
3075 (grub_fshelp_map_block): Likewise.
3077 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
3078 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
3079 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
3080 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
3081 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
3082 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
3083 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
3084 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
3085 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
3086 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
3087 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
3088 (grub_ext2_sblock): New members for journal support.
3089 (grub_ext3_journal_header): New structure.
3090 (grub_ext3_journal_revoke_header): Likewise.
3091 (grub_ext3_journal_block_tag): Likewise.
3092 (grub_ext3_journal_sblock): Likewise.
3093 (grub_fshelp_node): New members logfile and journal.
3094 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
3095 grub_fshelp_map_block to get real block number.
3096 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
3098 (grub_ext2_read_inode): Likewise.
3099 (grub_ext3_get_journal): New function.
3100 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
3101 (grub_ext2_close): Release memory used by journal.
3103 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
3104 (REISERFS_MAGIC_DESC_BLOCK): New macro.
3105 (grub_reiserfs_transaction_header): Renamed to
3106 grub_reiserfs_description_block, replace field data with real_blocks.
3107 (grub_reiserfs_commit_block): New structure.
3108 (grub_reiserfs_data): New member journal.
3109 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
3111 (grub_reiserfs_read_symlink): Likewise.
3112 (grub_reiserfs_iterate_dir): Likewise.
3113 (grub_reiserfs_open): Likewise.
3114 (grub_reiserfs_read): Likewise.
3115 (grub_reiserfs_get_journal): New function.
3116 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
3117 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
3118 using grub_reiserfs_get_journal.
3119 (grub_reiserfs_close): Release memory used by journal.
3121 * fs/affs.c (grub_affs_read_block): Change block type to
3122 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
3124 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
3126 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
3128 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
3130 * fs/udf.c (grub_udf_read_block): Change block type to
3131 grub_disk_addr_t. Use type cast to avoid warning.
3133 * fs/xfs.c (grub_xfs_read_block): Likewise.
3135 2008-05-16 Christian Franke <franke@computer.org>
3137 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
3138 to ensure that break with ESC will always work.
3139 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
3140 Remove ESC from keyboard queue.
3142 2008-05-16 Christian Franke <franke@computer.org>
3144 * util/biosdisk.c: [__CYGWIN__] Add includes.
3145 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
3146 (get_os_disk): Move variable declarations to OS specific
3147 parts to avoid warning.
3148 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
3149 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
3150 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
3152 * util/getroot.c: [__CYGWIN__] Add includes.
3153 (strip_extra_slashes): Fix "/" case.
3154 [__CYGWIN__] (get_win32_path): New function.
3155 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
3156 [__CYGWIN__] (find_root_device): Disable.
3157 [__CYGWIN__] (get_bootsec_serial): New function.
3158 [__CYGWIN__] (find_cygwin_root_device): Likewise.
3159 [__linux__] (grub_guess_root_device): Add early returns to simplify
3161 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
3162 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
3163 check for Linux only.
3165 2008-05-15 Bean <bean123ch@gmail.com>
3167 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
3168 keyboard hang problem in apple's intel mac.
3170 2008-05-09 Robert Millan <rmh@aybabtu.com>
3172 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
3174 * util/grub-mkdevicemap.c (get_virtio_disk_name)
3175 (make_device_map): Likewise.
3176 Reported by Aurelien Jarno <aurel32@debian.org>
3178 2008-05-07 Ian Campbell <ijc@hellion.org.uk>
3180 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
3181 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
3182 (make_device_map): Output entries for xvd type disks.
3184 2008-05-07 Robert Millan <rmh@aybabtu.com>
3186 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
3188 * util/grub-mkdevicemap.c (get_cciss_disk_name)
3189 (make_device_map): Likewise.
3190 Reported by Roland Dreier <rdreier@cisco.com>
3192 2008-05-07 Robert Millan <rmh@aybabtu.com>
3194 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
3195 grub_strstr() call. Correct a few mistakes in failure path handling.
3197 2008-05-06 Robert Millan <rmh@aybabtu.com>
3199 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
3200 Do not print a trailing slash (therefore, the root directory is an
3202 (convert_system_path_to_grub_path): Do not remove trailing slash
3203 from make_system_path_relative_to_its_root() output.
3205 * util/i386/pc/grub-install.in: Add trailing slash to output from
3206 make_system_path_relative_to_its_root().
3208 2008-05-06 Robert Millan <rmh@aybabtu.com>
3210 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
3211 ensures that output lines aren't intermangled with those sent to
3212 stderr (via grub_util_info()).
3213 * util/grub-probe.c (grub_refresh): Likewise.
3214 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
3216 2008-05-05 Christian Franke <franke@computer.org>
3218 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
3219 Add Cygwin device names.
3220 (get_ide_disk_name) [__CYGWIN__]: Likewise.
3221 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
3222 (check_device): Return error instead of success on empty name.
3223 (make_device_map): Move label inside linux specific code to
3224 prevent compiler warning.
3226 2008-04-30 Robert Millan <rmh@aybabtu.com>
3228 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
3229 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
3231 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
3233 2008-04-29 Robert Millan <rmh@aybabtu.com>
3235 * docs/grub.cfg: New file (example GRUB configuration).
3237 2008-04-26 Robert Millan <rmh@aybabtu.com>
3239 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
3240 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
3241 and `disk/ieee1275/nand.c'.
3243 2008-04-25 Bean <bean123ch@gmail.com>
3245 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
3248 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
3249 change the buffer size to 4096 for cdrom device.
3251 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
3253 (_linux_mod_SOURCES): New variable.
3254 (_linux_mod_CFLAGS): Likewise.
3255 (_linux_mod_LDFLAGS): Likewise.
3256 (linux_mod_SOURCES): Likewise.
3257 (linux_mod_CFLAGS): Likewise.
3258 (linux_mod_LDFLAGS): Likewise.
3259 (nand_mod_SOURCES): Likewise.
3260 (nand_mod_CFLAGS): Likewise.
3261 (nand_mod_LDFLAGS): Likewise.
3263 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
3264 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
3265 type property. (nand device in olpc don't have this property)
3267 * include/grub/disk.h (grub_disk_dev_id): New macro
3268 GRUB_DISK_DEVICE_NAND_ID.
3270 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
3272 (grub_rescue_cmd_initrd): Likewise.
3274 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
3275 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
3276 ofw_cif_handler and ofw_idt, adjust padding number.
3278 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
3279 GRUB_MACHINE_IEEE1275 is defined.
3281 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
3282 Use NESTED_FUNC_ATTR attribute on the hook parameter.
3284 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
3285 on nested function heap_init.
3286 (grub_upper_mem): New variable for i386-ieee1275.
3287 (grub_get_extended_memory): New function for i386-ieee1275.
3288 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
3290 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
3291 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
3294 * loader/i386/ieee1275/linux.c: New file.
3296 * loader/i386/ieee1275/linux_normal.c: New file.
3298 * disk/ieee1275/nand.c: New file.
3300 2008-04-18 Thomas Schwinge <tschwinge@gnu.org>
3302 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
3304 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
3306 2008-04-18 Robert Millan <rmh@aybabtu.com>
3308 Restructures early code path on ieee1275 to unify grub_main() as
3309 the first C function that is executed in every platform.
3311 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
3312 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
3314 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
3315 * kern/ieee1275/cmain.c (cmain): Rename to ...
3316 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
3317 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
3320 2008-04-18 Robert Millan <rmh@aybabtu.com>
3322 * util/update-grub.in: Fix syntax error when setting
3323 `GRUB_PRELOAD_MODULES'.
3324 Reported by Stephane Chazelas <stephane@artesyncp.com>
3326 2008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
3328 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
3329 section into account, newer toolchains generate unique build ids
3330 * configure.ac: remove the test for --build-id=none acceptance,
3331 we want build ids to be preserved
3332 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
3333 far from other sections don't cause the raw binary images grow
3336 2008-04-15 Robert Millan <rmh@aybabtu.com>
3338 * disk/lvm.c: Update copyright year.
3339 * kern/misc.c: Likewise.
3341 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
3343 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
3344 there is no memory left for physical volume name.
3346 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
3348 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
3349 volume name mapping to support bigger than 9 character names properly.
3351 2008-04-13 Robert Millan <rmh@aybabtu.com>
3353 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
3354 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
3356 2008-04-13 Christian Franke <franke@computer.org>
3358 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
3359 to create a floppy emulation boot CD when non emulation mode
3361 Enable Joliet CD filesystem extension.
3363 2008-04-13 Robert Millan <rmh@aybabtu.com>
3365 * kern/misc.c (grub_strncat): Fix off-by-one error.
3366 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
3368 * kern/env.c (grub_env_context_close): Clear current context, not
3370 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
3372 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
3374 2008-04-13 Robert Millan <rmh@aybabtu.com>
3376 Improve robustness when handling LVM.
3378 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
3379 (and leave `*p' unmodified).
3380 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
3382 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
3383 iterating through it.
3384 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
3386 (grub_lvm_scan_device): Check the return value (and fail gracefully
3387 when due) on each grub_lvm_getvalue() or grub_strstr() call.
3388 Don't assume `vg->pvs != NULL' when iterating through it.
3390 2008-04-13 Robert Millan <rmh@aybabtu.com>
3392 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
3393 * genmk.rb (partmap): New variable.
3394 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
3395 (#{partmap}): New target rule.
3396 * genpartmaplist.sh: New file.
3397 * Makefile.in (pkglib_DATA): Add partmap.lst.
3398 (partmap.lst): New target rule.
3399 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
3400 modules (including all partition maps), instead of preloading them.
3402 2007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
3404 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
3405 `linux-boot-prober' (if installed) to detect other operating
3406 systems which are installed on the computer and add them to
3408 * conf/common.rmk: Build and install 30_os-prober.
3410 2008-04-12 Robert Millan <rmh@aybabtu.com>
3412 * kern/powerpc/ieee1275/init.c: Move from here ...
3413 * kern/ieee1275/init.c: ... to here. Update all users.
3415 * kern/powerpc/ieee1275/cmain.c: Move from here ...
3416 * kern/ieee1275/cmain.c: ... to here. Update all users.
3418 * kern/powerpc/ieee1275/openfw.c: Move from here ...
3419 * kern/ieee1275/openfw.c: ... to here. Update all users.
3421 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
3422 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
3424 2008-04-10 Pavel Roskin <proski@gnu.org>
3426 * configure.ac: Always use "_cv_" in cache variables for
3427 compatibility with Autoconf 2.62.
3429 2008-04-07 Robert Millan <rmh@aybabtu.com>
3431 Revert grub/machine/init.h addition by Pavel (since it breaks on
3432 i386-ieee1275 and others):
3433 * util/i386/pc/misc.c: Remove grub/machine/init.h.
3434 * util/powerpc/ieee1275/misc.c: Likewise.
3436 2008-04-07 Robert Millan <rmh@aybabtu.com>
3438 * util/grub-probe.c (probe): Improve error message.
3440 2008-04-07 Robert Millan <rmh@aybabtu.com>
3442 * util/biosdisk.c (read_device_map): Skip devices that don't exist
3443 (this prevents the presence of a bogus entry from ruining the whole
3446 2008-04-06 Pavel Roskin <proski@gnu.org>
3448 * util/biosdisk.c: Include grub/util/biosdisk.h.
3449 * util/grub-fstest.c (execute_command): Make static.
3450 * util/grub-mkdevicemap.c (check_device): Likewise.
3451 * util/i386/pc/misc.c: Include grub/machine/init.h.
3452 * util/powerpc/ieee1275/misc.c: Likewise.
3453 * util/lvm.c: Include grub/util/lvm.h.
3454 * util/misc.c: Include grub/kernel.h, grub/misc.h and
3456 * util/raid.c: Include grub/util/raid.h.
3457 (grub_util_getdiskname): Make static.
3459 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
3460 grub_hostfs_fini(), as they are called from grub_init_all() and
3461 grub_fini_all() respectively. This fixes an infinite loop in
3462 grub-fstest due to double registration of hostfs.
3463 Reported by Christian Franke <Christian.Franke@t-online.de>
3465 2008-04-05 Pavel Roskin <proski@gnu.org>
3467 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
3468 all 8 functions. Otherwise, probe function 0 only.
3470 2008-04-04 Pavel Roskin <proski@gnu.org>
3472 * commands/lspci.c (grub_lspci_iter): Print the bus number
3475 * commands/lspci.c (grub_pci_classes): Fix typos.
3476 (grub_lspci_iter): Don't print func twice. Print vendor ID
3477 before device ID, as it's normally done.
3479 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
3480 Fix signedness warnings.
3481 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
3483 * util/ieee1275/get_disk_name.c: Include config.h so that
3484 _GNU_SOURCE is defined and getline() is declared. Mark an
3485 unused argument as such. Fix a signedness warning.
3487 2008-04-02 Pavel Roskin <proski@gnu.org>
3489 * genkernsyms.sh.in: Use more robust assignments for CC and
3490 srcdir. Quote srcdir.
3491 * gensymlist.sh.in: Likewise. Assert at the compile time that
3492 the symbol table is not empty.
3494 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
3495 * fs/cpio.c (grub_cpio_read): Likewise.
3497 2008-04-01 Pavel Roskin <proski@gnu.org>
3499 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
3500 * disk/host.c (grub_host_open): Likewise.
3501 * disk/loopback.c (grub_loopback_open): Likewise.
3502 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
3503 disk->id as in disk/host.c, not a multi-character constant.
3505 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
3506 later is obsolete, potentially dangerous and sets a bad example.
3507 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
3508 * util/misc.c (grub_util_get_image_size): Likewise.
3510 * disk/loopback.c (options): Improve help for "--partitions".
3512 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
3513 options to align them with the short options, e.g. "echo -e".
3515 2008-03-31 Bean <bean123ch@gmail.com>
3517 * video/reader/png.c (grub_png_data): New member is_16bit and
3519 (grub_png_decode_image_header): Detect 16 bit png image.
3520 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
3521 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
3522 (grub_video_reader_png): Release memory occupied by image_data.
3524 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
3526 (grub_nfs_mount): Skip the test for sector per cluster.
3528 * include/grub/ntfs.h (MAX_SPC): Removed.
3530 2008-03-31 Bean <bean123ch@gmail.com>
3532 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
3533 (grub_probe_SOURCES): Add fs/afs.c.
3534 (grub_fstest_SOURCES): Likewise.
3535 (afs_mod_SOURCES): New variable.
3536 (afs_mod_CFLAGS): Likewise.
3537 (afs_mod_LDFLAGS): Likewise.
3539 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
3540 (grub_emu_SOURCES): Likewise.
3542 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3544 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3546 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3548 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3550 * fs/afs.c: New file.
3552 2008-03-30 Pavel Roskin <proski@gnu.org>
3554 * disk/host.c: Include grub/misc.h to fix a warning.
3555 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
3556 warnings about implicit declarations.
3558 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
3560 * include/grub/i386/loader.h: Change declaration of
3561 grub_linux_boot() to match what grub_loader_set() expects.
3562 * util/getroot.c (grub_guess_root_device): Return const char* to
3564 * util/grub-probe.c (probe): Fix a warning about uninitialized
3565 abstraction_name variable.
3566 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
3567 second argument as unused to fix a warning.
3569 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
3570 missing grub_error() call.
3572 * util/update-grub_lib.in: Define datarootdir, since Autoconf
3573 2.60 and newer uses it to define datadir.
3575 * commands/sleep.c: Fix warning about implicit declaration.
3576 * disk/memdisk.c: Likewise.
3577 * loader/aout.c: Likewise.
3578 * loader/i386/bsd_normal.c: Likewise.
3579 * util/grub-probe.c: Likewise.
3581 * commands/i386/cpuid.c (has_longmode): Make static.
3582 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
3583 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
3585 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
3586 GDT. This is more robust, as %ds can change.
3587 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
3588 calling real_to_prot().
3589 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
3591 2008-03-28 Pavel Roskin <proski@gnu.org>
3593 * kern/i386/pc/startup.S: Assert that uncompressed functions
3594 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
3595 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
3596 code, as they push parts of the code (error handlers) beyond
3597 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
3598 code as correctness and size.
3600 2008-03-28 Pavel Roskin <proski@gnu.org>
3602 * kern/i386/pc/startup.S
3603 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
3604 data block address to the real mode, keep offset minimal. This
3605 works around a bug in AWARD BIOS on old Athlon systems, which
3606 makes CD detection hang.
3608 2008-03-26 Pavel Roskin <proski@gnu.org>
3610 * normal/color.c (grub_parse_color_name_pair): Make `name' a
3612 * include/grub/normal.h: Add grub_parse_color_name_pair()
3615 2008-03-24 Bean <bean123ch@gmail.com>
3617 * disk/i386/pc/biosdisk.c (cd_start): Removed.
3618 (cd_count): Removed.
3619 (cd_drive): New variable.
3620 (grub_biosdisk_get_drive): Don't check for (cdN) device.
3621 (grub_biosdisk_call_hook): Likewise.
3622 (grub_biosdisk_iterate): Change cdrom detection method.
3623 (grub_biosdisk_open): Replace cd_start with cd_drive.
3624 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
3625 detect cdrom device.
3627 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
3629 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
3630 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
3631 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
3632 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
3633 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
3634 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
3635 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
3636 (grub_biosdisk_cdrp): New structure.
3637 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
3639 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
3641 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
3644 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
3647 2008-03-20 Robert Millan <rmh@aybabtu.com>
3649 Remove 2 TiB limit in ata.mod.
3650 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
3651 (grub_ata_dumpinfo): Print sector count with 0x%llx.
3652 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
3653 grub_uint64_t instead of grub_uint32_t.
3655 2008-03-05 Bean <bean123ch@gmail.com>
3657 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
3658 (grub_multiboot): Set boot device.
3660 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
3662 2008-03-02 Bean <bean123ch@gmail.com>
3664 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
3667 2008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
3669 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
3672 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
3675 * docs/fdl.texi: New file.
3677 * docs/mdate-sh: New file. Copied from gnulib.
3678 * docs/texinfo.tex: Likewise.
3680 * config.guess: Updated from gnulib.
3681 * install-sh: Likewise.
3683 2008-02-28 Robert Millan <rmh@aybabtu.com>
3685 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
3686 (aout_mod_SOURCES): New variable.
3687 (aout_mod_CFLAGS): Likewise.
3688 (aout_mod_LDFLAGS): Likewise.
3690 * conf/i386-ieee1275.rmk: Likewise.
3692 2008-02-28 Robert Millan <rmh@aybabtu.com>
3694 * util/update-grub.in: Reorganise terminal validity check. Accept
3695 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
3696 Based on suggestion by Franklin PIAT.
3698 2008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
3700 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
3702 * util/getroot.c (grub_util_check_block_device): New function that
3703 returns the given argument if it is a block device and returns NULL else.
3704 * util/grub-probe.c (argument_is_device): New variable.
3705 (probe): Promote device_name from a variable to an argument. Receive
3706 device_name from grub_util_check_block_device() if path is NULL and from
3707 grub_guess_root_device() else. Do not free() device_name anymore.
3708 (options): Introduce new parameter '-d, --device'.
3709 (main): Add description of the new parameter to the help screen.
3710 Rename path variable to argument. Set argument_is_device if the '-d'
3711 option is given. Pass argument to probe() depending on
3714 2008-02-24 Bean <bean123ch@gmail.com>
3716 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
3717 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
3718 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
3719 (GRUB_ISO9660_VOLDESC_PART): Likewise.
3720 (GRUB_ISO9660_VOLDESC_END): Likewise.
3721 (grub_iso9660_primary_voldesc): New member escape.
3722 (grub_iso9660_data): New member joliet.
3723 (grub_iso9660_convert_string): New function.
3724 (grub_iso9660_mount): Detect joliet extension.
3725 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
3726 (grub_iso9660_iso9660_label): Likewise.
3728 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
3729 (grub_setup_SOURCES): Add fs/udf.c.
3730 (grub_fstest_SOURCES): Likewise.
3731 (udf_mod_SOURCES): New variable.
3732 (udf_mod_CFLAGS): Likewise.
3733 (udf_mod_LDFLAGS): Likewise.
3735 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
3736 (grub_emu_SOURCES): Likewise.
3738 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3740 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3742 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3744 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3746 * fs/udf.c: New file.
3748 2008-02-24 Robert Millan <rmh@aybabtu.com>
3750 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
3751 (normal/lexer.c_DEPENDENCIES): New variables.
3752 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
3753 (normal/lexer.c_DEPENDENCIES): Likewise.
3754 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
3755 (normal/lexer.c_DEPENDENCIES): Likewise.
3756 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
3757 (normal/lexer.c_DEPENDENCIES): Likewise.
3758 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
3759 (normal/lexer.c_DEPENDENCIES): Likewise.
3760 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
3761 (normal/lexer.c_DEPENDENCIES): Likewise.
3763 2008-02-23 Robert Millan <rmh@aybabtu.com>
3765 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
3766 since they were intended to be in hex. This didn't break previously
3767 because of a bug in gpt_partition_map_iterate() (see below).
3769 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
3770 when checking the validity of GPT header.
3771 Remove `partno', since it always provides the same information as `i'.
3773 2008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
3775 * include/grub/efi/time.h: Fix a wrong comment.
3777 2008-02-19 Pavel Roskin <proski@gnu.org>
3779 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
3782 2008-02-19 Bean <bean123ch@gmail.com>
3784 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
3785 (aout_mod_SOURCES): New variable.
3786 (aout_mod_CFLAGS): Likewise.
3787 (aout_mod_LDFLAGS): Likewise.
3788 (_bsd_mod_SOURCES): New variable.
3789 (_bsd_mod_CFLAGS): Likewise.
3790 (_bsd_mod_LDFLAGS): Likewise.
3791 (bsd_mod_SOURCES): New variable.
3792 (bsd_mod_CFLAGS): Likewise.
3793 (bsd_mod_LDFLAGS): Likewise.
3795 * include/grub/aout.h: New file.
3797 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
3799 * include/grub/i386/bsd.h: New file.
3801 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
3804 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
3805 function is called, so that it's possible to change it inside the hook.
3806 (grub_elf64_load): Likewise.
3807 (grub_elf_file): Don't close the file if elf header is not found.
3808 (grub_elf_close): Close the file if grub_elf_file fails (The new
3809 grub_elf_file won't close it).
3810 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
3811 (grub_elf64_size): Likewise.
3813 * kern/i386/loader.S (grub_unix_real_boot): New function.
3815 * loader/aout.c: New file.
3817 * loader/i386/bsd.c: New file.
3819 * loader/i386/bsd_normal.c: New file.
3821 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
3823 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
3824 can test other formats.
3826 2008-02-19 Robert Millan <rmh@aybabtu.com>
3828 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
3829 (grub_gpt_partition_type_empty): Redefine with macro from
3830 `<grub/gpt_partition.h>'.
3831 (gpt_partition_map_iterate): Adjust partition type comparison.
3833 Export `entry' as partmap-specific `part.data' struct.
3834 (grub_gpt_header, grub_gpt_partentry): Move from here ...
3836 * include/grub/gpt_partition.h (grub_gpt_header)
3837 (grub_gpt_partentry): ... to here (new file).
3839 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
3841 (grub_gpt_partition_type_bios_boot): New const variable, defined
3842 with macro from `<grub/gpt_partition.h>'.
3844 (setup): Replace `first_start' with `embed_region', which keeps
3845 track of the embed region (and is partmap-agnostic).
3847 Replace find_first_partition_start() with find_usable_region(),
3848 which finds a usable region for embedding using partmap-specific
3849 knowledge (supports PC/MSDOS and GPT).
3851 Fix all assumptions that the embed region start at sector 1, using
3852 `embed_region.start' from now on. Similarly, use `embed_region.end'
3853 rather than `first_start' to calculate available size.
3855 In grub_util_info() message, replace "into after the MBR" with an
3856 indication of the specific sector our embed region starts at.
3858 2008-02-19 Robert Millan <rmh@aybabtu.com>
3860 * DISTLIST: Replace `commands/ieee1275/halt.c' and
3861 `commands/ieee1275/reboot.c' with `commands/halt.c' and
3862 `commands/reboot.c'.
3863 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
3864 (halt_mod_SOURCES): Likewise.
3865 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
3866 (halt_mod_SOURCES): Likewise.
3868 2008-02-17 Christian Franke <franke@computer.org>
3870 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
3872 2008-02-17 Robert Millan <rmh@aybabtu.com>
3874 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
3875 set `first_start' to 0 for non-PC/MSDOS partition maps.
3877 2008-02-16 Robert Millan <rmh@aybabtu.com>
3879 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
3880 do not assume partition map is PC/MSDOS before performing checks that
3881 are specific to that layout.
3883 2008-02-13 Robert Millan <rmh@aybabtu.com>
3885 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
3886 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
3887 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
3889 2008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
3891 * configure.ac: Only a cosmetic change on the handling of
3892 -fno-stack-protector.
3894 2008-02-12 Alexandre Boeglin <alex@boeglin.org>
3896 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
3897 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
3899 (grub_install_SOURCES): Add halt.mod and reboot.mod.
3900 (halt_mod_SOURCES): New variable.
3901 (halt_mod_CFLAGS): Likewise.
3902 (halt_mod_LDFLAGS): Likewise.
3903 (reboot_mod_SOURCES): Likewise.
3904 (reboot_mod_CFLAGS): Likewise.
3905 (reboot_mod_LDFLAGS): Likewise.
3907 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
3908 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
3910 (halt_mod_SOURCES): Likewise.
3911 (reboot_mod_SOURCES): Likewise.
3913 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
3914 commands/i386/pc/reboot.c by commands/reboot.c.
3915 (reboot_mod_SOURCES): Likewise.
3917 * commands/i386/pc/reboot.c: merge this file ...
3919 * commands/ieee1275/reboot.c: ... and this file ...
3921 * commands/reboot.c: ... to this file.
3922 Add some precompiler directive to include the correct header for
3925 * commands/ieee1275/halt.c: move this file ...
3927 * commands/halt.c: ... to here.
3928 Add some precompiler directive to include the correct header for
3931 * include/grub/efi/efi.h (grub_reboot): New function declaration.
3932 (grub_halt): Likewise.
3934 * kern/efi/efi.c (grub_reboot): New function.
3935 (grub_halt): Likewise.
3937 2008-02-12 Robert Millan <rmh@aybabtu.com>
3939 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
3940 /dev (like it is done for /dev/mapper). This doesn't provide support
3941 for EVMS, but at least it is now easy to identify the problem when it
3944 2008-02-11 Robert Millan <rmh@aybabtu.com>
3946 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
3947 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
3948 comparing it with -1, not 0.
3950 2008-02-10 Robert Millan <rmh@aybabtu.com>
3952 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
3954 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3955 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
3957 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
3958 `disk/lvm.c' to the end of the list.
3959 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3960 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3962 2008-02-10 Robert Millan <rmh@aybabtu.com>
3964 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
3965 grub_print_error() instead. This will let user know why we're entering
3967 Based on suggestions from Sam Morris.
3969 2008-02-10 Alexandre Boeglin <alex@boeglin.org>
3971 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
3972 on remaining N args, instead of "--" arg N times.
3974 2008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
3976 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
3977 (fill_with_default_glyph): Changed to use unknown_glyph for fill
3978 pattern for unknown glyphs.
3980 2008-02-09 Robert Millan <rmh@aybabtu.com>
3982 * configure.ac: Probe for `help2man'.
3983 * Makefile.in (builddir): New variable.
3984 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
3985 or otherwise add a few flags/options to it.
3986 (install-local): For every executable utility or script that is
3987 installed, invoke $(HELP2MAN) to install a manpage based on --help
3990 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
3991 that it doesn't prevent --help from working in build tree.
3993 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
3994 with `bug-grub@gnu.org'.
3995 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
3996 * util/update-grub.in (usage): New function.
3997 Implement proper argument check, with support for --help and --version
3998 (as well as existing -y).
4000 2008-02-09 Christian Franke <franke@computer.org>
4002 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
4003 avoid overwriting previous output.
4004 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
4006 2008-02-09 Robert Millan <rmh@aybabtu.com>
4008 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
4011 2008-02-09 Robert Millan <rmh@aybabtu.com>
4013 * commands/sleep.c: New file.
4014 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
4015 (sleep_mod_SOURCES): New variable.
4016 (sleep_mod_CFLAGS): Likewise.
4017 (sleep_mod_LDFLAGS): Likewise.
4019 2008-02-09 Robert Millan <rmh@aybabtu.com>
4021 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
4022 situations in which we can deduce the RAID size and the superblock
4025 2008-02-09 Robert Millan <rmh@aybabtu.com>
4027 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
4028 and return a grub_diskmemberlist_t composed of LVM physical volumes.
4029 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
4031 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
4032 and return a grub_diskmemberlist_t composed of physical array members.
4033 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
4035 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
4037 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
4038 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
4039 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
4041 * util/grub-probe.c (probe): Move partmap probing code from here ...
4042 (probe_partmap): ... to here.
4043 (probe): Use probe_partmap() once for the disk we're probing, and
4044 additionally, when such disk contains a memberlist() struct member,
4045 once for each disk that is contained in the structure returned by
4048 2008-02-09 Robert Millan <rmh@aybabtu.com>
4050 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
4051 environment variable to 'all' in order to obtain debug output from
4053 * util/i386/pc/grub-setup.c (main): Likewise.
4055 2008-02-08 Robert Millan <rmh@aybabtu.com>
4057 * disk/raid.c (grub_raid_scan_device): Check for
4058 `array->device[sb.this_disk.number]' rather than for
4059 `array->device[sb.this_disk.number]->name', since the latter is not
4060 guaranteed to be accessible.
4062 2008-02-08 Robert Millan <rmh@aybabtu.com>
4064 * disk/raid.c: Update copyright.
4065 * fs/cpio.c: Likewise.
4066 * include/grub/raid.h: Likewise.
4067 * loader/i386/pc/multiboot.c: Likewise.
4068 * util/hostfs.c: Likewise.
4070 2008-02-08 Robert Millan <rmh@aybabtu.com>
4072 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
4073 to a grub_disk_t array.
4074 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
4076 (grub_raid_scan_device): Replace `device[x].name' accesses with
4077 `device[x]->name'. Simplify initialization of `array->device[x]'.
4079 2008-02-08 Robert Millan <rmh@aybabtu.com>
4081 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
4082 grub_dprintf() calls.
4083 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
4086 2008-02-07 Christian Franke <franke@computer.org>
4088 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
4089 instead of fseek and ftell to support large files.
4090 (grub_hostfs_read): Likewise.
4092 2008-02-07 Robert Millan <rmh@aybabtu.com>
4094 Patch from Jeroen Dekkers.
4095 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
4096 failure, since successfully reading all array members might not be
4099 2008-02-06 Robert Millan <rmh@aybabtu.com>
4101 * util/grub-probe.c (probe): Simplify partmap probing (with the
4102 assumption that the first word up to the underscore equals to
4105 2008-02-06 Christian Franke <franke@computer.org>
4107 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
4108 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
4109 last block of a cpio or tar stream.
4110 Check for "TRAILER!!!" instead of any empty data
4111 block to detect last block of a cpio stream.
4112 (grub_cpio_dir): Fix constness of variable np.
4113 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
4114 cpio or tar trailer is detected. This fixes a crash
4115 on open of a non existing file.
4117 2008-02-05 Bean <bean123ch@gmail.com>
4119 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
4121 (grub_multiboot_load_elf64): Likewise.
4122 (grub_multiboot): Initialize mbi structure.
4124 * util/grub-fstest.c: Don't include unused header file script.h.
4126 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
4128 (grub_fstest_SOURCES): Likewise.
4130 2008-02-05 Robert Millan <rmh@aybabtu.com>
4132 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
4133 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
4134 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
4135 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
4137 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
4138 (translation_table): Replace hardcoded values with macros
4139 provided by `<grub/term.h>'.
4141 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
4142 (keyboard_map): Correct/add a few values, with macros provided
4144 (keyboard_map_shift): Zero values that don't differ from their
4145 `keyboard_map' equivalents.
4146 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
4147 Discard the second scan code that is always sent by Caps lock.
4148 Only use `keyboard_map_shift' when it provides a non-zero value,
4149 otherwise fallback to `keyboard_map'.
4151 2008-02-04 Bean <bean123ch@gmail.com>
4153 * Makefile.in (enable_grub_fstest): New variable.
4155 * conf/common.rmk (grub_fstest_init.lst): New rule.
4156 (grub_fstest_init.h): Likewise.
4157 (grub_fstest_init.c): Likewise.
4158 (util/grub-fstest.c_DEPENDENCIES): New variable.
4159 (grub_fstest_SOURCES): Likewise.
4161 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
4163 * util/grub-fstest.c: New file.
4165 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
4167 Make grub-setup handle a separate root device.
4169 * util/i386/pc/grub-setup.c (setup): Always open the root device,
4170 so that the root device can be compared with the destination
4172 When embedding the core image, if the root and destination devices
4173 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
4175 When not embedding, set ROOT_DRIVE to 0xFF.
4177 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
4179 Add support for having a grub directory in a different drive. This
4180 is still only the data handling part.
4182 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
4183 (codestart): Save %dh in GRUB_ROOT_DRIVE.
4184 (grub_root_drive): New variable.
4186 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
4187 instead of GRUB_BOOT_DRIVE to construct a device name. Set
4188 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
4191 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
4193 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
4195 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
4197 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
4198 is bogus, because PXE booting does not specify any drive
4201 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
4202 am not sure if this is really correct.
4204 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
4205 is always identical to the boot drive when booting from a CD.
4207 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
4209 (root_drive): New variable.
4210 (real_start): Unconditionally set %dh to ROOT_DRIVE.
4211 (setup_sectors): Push %dx right after popping it, because %dh will
4213 (copy_buffer): Restore %dx.
4215 2008-02-03 Robert Millan <rmh@aybabtu.com>
4217 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
4218 use `cdboot.img' for cdrom images.
4220 2008-02-03 Robert Millan <rmh@aybabtu.com>
4222 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
4223 only setup gfxterm when `font' command has succeeded.
4225 2008-02-03 Robert Millan <rmh@aybabtu.com>
4227 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
4228 (grub_rescue_cmd_multiboot_loader)
4229 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
4231 2008-02-03 Pavel Roskin <proski@gnu.org>
4233 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
4234 %edx and %esi from stack only after grub_gate_a20() is called.
4235 grub_gate_a20() clobbers %edx.
4237 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
4239 * configure.ac (AC_INIT): Bumped to 1.96.
4241 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
4242 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
4243 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
4244 video/readers/png.c.
4246 2008-02-03 Bean <bean123ch@gmail.com>
4248 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
4249 (cdboot_img_SOURCES): New variable.
4250 (cdboot_img_ASFLAGS): New variable.
4251 (cdboot_img_LDFLAGS): New variable.
4253 * boot/i386/pc/cdboot.S: New file.
4255 * disk/i386/pc/biosdisk.c (cd_start): New variable.
4256 (cd_count): Likewise.
4257 (grub_biosdisk_get_drive): Add support for cd device.
4258 (grub_biosdisk_call_hook): Likewise.
4259 (grub_biosdisk_iterate): Likewise.
4260 (grub_biosdisk_open): Likewise.
4261 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
4262 (grub_biosdisk_rw): Support reading from cd device.
4263 (GRUB_MOD_INIT): Iterate cd devices.
4265 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
4266 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
4267 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
4269 * kern/i386/pc/init.c (make_install_device): Check for cd device.
4271 2008-02-02 Robert Millan <rmh@aybabtu.com>
4273 * commands/read.c: New file.
4274 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
4275 (read_mod_SOURCES): New variable.
4276 (read_mod_CFLAGS): Likewise.
4277 (read_mod_LDFLAGS): Likewise.
4279 2008-02-02 Robert Millan <rmh@aybabtu.com>
4281 * normal/main.c (grub_normal_execute): Check for `menu->size' when
4282 determining whether menu has to be displayed.
4284 2008-02-02 Marco Gerards <marco@gnu.org>
4286 * bus/pci.c: New file.
4288 * include/grub/pci.h: Likewise.
4290 * include/grub/i386/pc/pci.h: Likewise.
4292 * commands/lspci.c: Likewise.
4294 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
4296 (pci_mod_SOURCES): New variable.
4297 (pci_mod_CFLAGS): Likewise.
4298 (pci_mod_LDFLAGS): Likewise.
4299 (lspci_mod_SOURCES): Likewise.
4300 (lspci_mod_CFLAGS): Likewise.
4301 (lspci_mod_LDFLAGS): Likewise.
4303 2008-02-02 Bean <bean123ch@gmail.com>
4305 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
4306 (grub_ufs_get_file_block): Fix indirect block calculation problem.
4308 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
4309 (grub_xfs_btree_node): New structure.
4310 (grub_xfs_btree_root): New structure.
4311 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
4312 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
4313 (GRUB_XFS_EXTENT_BLOCK): Likewise.
4314 (GRUB_XFS_EXTENT_SIZE): Likewise.
4315 (grub_xfs_read_block): Support btree format type.
4316 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
4317 Use directory block as basic unit.
4319 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
4321 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
4322 __attribute__ ((__regparm__ (1))).
4324 2008-02-01 Robert Millan <rmh@aybabtu.com>
4326 Correct a mistake in previous commit.
4328 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
4330 (normal/command.c_DEPENDENCIES): New variable.
4332 2008-02-01 Robert Millan <rmh@aybabtu.com>
4334 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
4336 (normal/command.c_DEPENDENCIES): New variable.
4337 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
4338 * conf/i386-ieee1275.rmk: Likewise.
4339 * conf/i386-linuxbios.rmk: Likewise.
4340 * conf/i386-pc.rmk: Likewise.
4341 * conf/sparc64-ieee1275.rmk: Likewise.
4342 * conf/powerpc-ieee1275.rmk: Likewise.
4343 (grub_emu_SOURCES): Add `fs/fshelp.c'.
4345 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
4347 2008-02-01 Robert Millan <rmh@aybabtu.com>
4349 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
4350 call at beginning of function.
4352 2008-01-31 Pavel Roskin <proski@gnu.org>
4354 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
4355 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
4356 (grub_mkrescue_SOURCES): Likewise.
4357 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
4359 2008-01-30 Robert Millan <rmh@aybabtu.com>
4361 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
4362 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
4363 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
4364 (grub_probe_SOURCES): ... to here.
4366 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
4367 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
4368 * conf/i386-ieee1275.rmk: Likewise.
4369 * conf/i386-linuxbios.rmk: Likewise.
4370 * conf/powerpc-ieee1275.rmk: Likewise.
4372 2008-01-30 Tristan Gingold <gingold@free.fr>
4374 * kern/rescue.c: Silently accept empty lines.
4376 2008-01-29 Bean <bean123ch@gmail.com>
4378 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
4379 (real_code_2): Code cleanup and change comment style.
4380 (move_memory): Avoid using 32-bit address mode.
4382 2008-01-29 Bean <bean123ch@gmail.com>
4384 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
4385 (png_mod_SOURCES): New variable.
4386 (png_mod_CFLAGS): Likewise.
4387 (png_mod_LDFLAGS): Likewise.
4389 * video/readers/png.c: New file.
4391 2008-01-28 Robert Millan <rmh@aybabtu.com>
4393 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
4394 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
4395 `ifndef GRUB_MOD_GAP' hack.
4396 * util/elf/grub-mkimage.c (add_segments): Likewise.
4398 2008-01-27 Robert Millan <rmh@aybabtu.com>
4400 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
4401 `GRUB_MOD_GAP' for platforms in which it's not defined.
4402 * util/elf/grub-mkimage.c (add_segments): Likewise.
4404 2008-01-27 Robert Millan <rmh@aybabtu.com>
4406 Get grub-emu to build again (including parallel builds).
4408 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
4410 (util/grub-emu.c_DEPENDENCIES): ... this, ...
4411 (normal/execute.c_DEPENDENCIES): ... this, ...
4412 (grub-emu_DEPENDENCIES): ... and this.
4414 * conf/i386-efi.rmk: Likewise.
4415 * conf/i386-linuxbios.rmk: Likewise.
4416 * conf/i386-ieee1275.rmk: Likewise.
4417 * conf/powerpc-ieee1275.rmk: Likewise.
4418 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
4420 2008-01-27 Robert Millan <rmh@aybabtu.com>
4422 * NEWS: Add a few items.
4424 2008-01-27 Robert Millan <rmh@aybabtu.com>
4426 Fix parallel builds with grub-emu. Based on earlier commit for
4427 grub-probe and grub-setup.
4429 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4430 (util/grub-emu.c_DEPENDENCIES): ... this.
4431 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4432 (util/grub-emu.c_DEPENDENCIES): ... this.
4433 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4434 (util/grub-emu.c_DEPENDENCIES): ... this.
4435 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4436 (util/grub-emu.c_DEPENDENCIES): ... this.
4437 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4438 (util/grub-emu.c_DEPENDENCIES): ... this.
4440 2008-01-27 Pavel Roskin <proski@gnu.org>
4442 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
4443 to create a gap between _end and the modules added to the image
4444 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
4445 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
4446 * util/elf/grub-mkimage.c (add_segments): Likewise.
4448 2008-01-26 Pavel Roskin <proski@gnu.org>
4450 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
4451 just return an error.
4453 2008-01-26 Bean <bean123ch@gmail.com>
4455 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
4456 (grub_reiserfs_get_item): Save offset of the next item.
4457 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
4459 2008-01-25 Robert Millan <rmh@aybabtu.com>
4461 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
4462 make all filesystem sources appear together (possibly fixing omissions
4464 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4465 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4466 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4467 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4469 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
4471 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
4472 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
4473 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
4474 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
4476 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
4477 (probe): Add a sanity check to make sure of our ability to read
4478 requested files when probing for filesystem type.
4480 * genmk.rb: Update copyright year (2007).
4482 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
4483 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
4484 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
4485 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
4486 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
4487 : Remove function prototypes.
4489 2008-01-25 Robert Millan <rmh@aybabtu.com>
4491 Revert my previous commits (based on wrong assumption of how grub_errno
4494 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
4495 * kern/file.c (grub_file_open): Likewise.
4497 2008-01-24 Pavel Roskin <proski@gnu.org>
4499 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
4500 that hang if GRUB tries to setup colors.
4501 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
4502 colors for firmwares that don't support it.
4503 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
4504 Recognize Open Hack'Ware, set flags to work around its
4507 2008-01-24 Robert Millan <rmh@aybabtu.com>
4509 * kern/file.c (grub_file_open): Do not account previous failures of
4510 unrelated functions when grub_errno is checked for.
4511 Reported by Oleg Strikov.
4513 2008-01-24 Bean <bean123ch@gmail.com>
4515 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
4516 (grub_ufs_sblock): New member volume name.
4517 (grub_ufs_find_file): Fix string copy bug.
4518 (grub_ufs_label): Implement this function properly.
4520 * fs/hfs.c (grub_hfs_cnid_type): New enum.
4521 (grub_hfs_iterate_records): Use the correct file number for extents
4522 and catalog file. Fix problem in next index calculation.
4523 (grub_hfs_find_node): Replace recursive function call with loop.
4524 (grub_hfs_iterate_dir): Replace recursive function call with loop.
4526 2008-01-23 Robert Millan <rmh@aybabtu.com>
4528 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
4529 `<grub/symbol.h>' and `<grub/multiboot.h>'.
4530 (grub_multiboot2_real_boot): New function prototype.
4532 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
4533 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
4535 * kern/i386/ieee1275/init.c (grub_os_area_addr)
4536 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
4538 2008-01-23 Robert Millan <rmh@aybabtu.com>
4540 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
4541 #ifdef'ed out grub_printf().
4543 2008-01-23 Robert Millan <rmh@aybabtu.com>
4545 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
4546 grub_dprintf calls, since they make "debug=all" mode unusable.
4547 (grub_console_checkkey): Likewise.
4549 2008-01-23 Robert Millan <rmh@aybabtu.com>
4551 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
4552 `term/i386/pc/at_keyboard.c'.
4553 (pkglib_MODULES): Add `serial.mod'.
4554 (serial_mod_SOURCES): New variable.
4555 (serial_mod_CFLAGS): Likewise.
4556 (serial_mod_LDFLAGS): Likewise.
4558 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
4559 `<grub/powerpc/ieee1275/console.h>'.
4560 (grub_keyboard_controller_init): New function prototype.
4561 (grub_console_checkkey): Likewise.
4562 (grub_console_getkey): Likewise.
4564 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
4567 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
4568 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
4570 2008-01-23 Robert Millan <rmh@aybabtu.com>
4572 * kern/i386/pc/init.c (make_install_device): When memdisk image is
4573 present, "(memdisk)/boot/grub" becomes the default prefix.
4575 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
4576 a memdisk tarball with all the modules. Add --overlay=DIR option that
4577 allows users to overlay additional files into the image.
4579 2008-01-23 Robert Millan <rmh@aybabtu.com>
4581 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
4582 and `machine/memory.h'.
4583 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
4584 (_multiboot_mod_SOURCES): New variable.
4585 (_multiboot_mod_CFLAGS): Likewise.
4586 (_multiboot_mod_LDFLAGS): Likewise.
4587 (multiboot_mod_SOURCES): Likewise.
4588 (multiboot_mod_CFLAGS): Likewise.
4589 (multiboot_mod_LDFLAGS): Likewise.
4591 * include/grub/i386/ieee1275/loader.h: New file.
4593 * include/grub/i386/ieee1275/machine.h: Likewise.
4595 * include/grub/i386/ieee1275/memory.h: Likewise.
4597 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
4598 variable declaration.
4599 (grub_os_area_size): Likewise.
4601 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
4602 (grub_lower_mem, grub_upper_mem): New variables.
4603 (grub_stop_floppy): New function (just to make
4604 grub_multiboot2_real_boot() happy).
4606 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
4607 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
4608 (grub_stop): New function.
4609 Include `"../realmode.S"' and `"../loader.S"'.
4611 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
4612 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
4614 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
4615 rely on grub_multiboot2_real_boot() for final boot.
4617 2008-01-22 Robert Millan <rmh@aybabtu.com>
4619 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
4620 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
4621 device that doesn't look like an SD card.
4622 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
4623 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
4624 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
4625 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
4628 2008-01-22 Robert Millan <rmh@aybabtu.com>
4630 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
4631 avoid claiming over our own code.
4633 2008-01-22 Bean <bean123ch@gmail.com>
4635 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
4636 (jpeg_mod_SOURCES): New variable.
4637 (jpeg_mod_CFLAGS): Likewise.
4638 (jpeg_mod_LDFLAGS): Likewise.
4640 * video/readers/jpeg.c : New file.
4642 2008-01-22 Bean <bean123ch@gmail.com>
4644 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
4645 there are no more items.
4647 2008-01-21 Robert Millan <rmh@aybabtu.com>
4649 * kern/mm.c (grub_mm_init_region): Improve debug message.
4651 2008-01-21 Robert Millan <rmh@aybabtu.com>
4653 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
4654 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
4656 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
4658 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
4659 Indicates start of upper memory.
4660 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
4661 (generate_image): Abort when image size is big enough to corrupt
4664 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
4665 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
4666 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
4667 instead of hardcoding 0xA0000.
4668 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
4669 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
4670 instead of hardcoding 0xA0000.
4672 2008-01-21 Robert Millan <rmh@aybabtu.com>
4674 * disk/memdisk.c (memdisk_size): New variable.
4675 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
4677 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
4678 image to dynamic memory.
4679 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
4680 `memdisk_size'. Free memdisk block.
4682 2008-01-21 Robert Millan <rmh@aybabtu.com>
4684 Fix detection of very small filesystems (like tar).
4686 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
4687 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
4688 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
4689 a problem with this disk).
4691 2008-01-21 Robert Millan <rmh@aybabtu.com>
4693 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
4694 on grub_biosdisk_rw_standard() error.
4696 2008-01-21 Robert Millan <rmh@aybabtu.com>
4698 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
4700 * kern/elf.c: Likewise.
4701 * kern/ieee1275/ieee1275.c: Likewise.
4702 * kern/powerpc/ieee1275/openfw.c: Likewise.
4703 * term/ieee1275/ofconsole.c: Likewise.
4705 2008-01-21 Robert Millan <rmh@aybabtu.com>
4707 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
4709 * include/grub/kernel.h (grub_arch_memdisk_addr)
4710 (grub_arch_memdisk_size): Moved from here ...
4712 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
4713 (grub_arch_memdisk_size): ... to here.
4715 2008-01-21 Robert Millan <rmh@aybabtu.com>
4717 Mostly based on bugfix from Bean.
4719 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
4720 attribute with hook() parameter.
4721 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
4723 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
4724 attribute with hook() parameter.
4725 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
4728 2008-01-21 Robert Millan <rmh@aybabtu.com>
4730 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
4731 (pkglib_MODULES): Add `memdisk.mod'.
4732 (memdisk_mod_SOURCES): New variable.
4733 (memdisk_mod_CFLAGS): Likewise.
4734 (memdisk_mod_LDFLAGS): Likewise.
4736 * disk/memdisk.c: New file.
4738 * include/grub/disk.h (grub_disk_dev_id): Add
4739 `GRUB_DISK_DEVICE_MEMDISK_ID'.
4741 * include/grub/i386/pc/kernel.h
4742 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
4743 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
4744 (grub_kernel_image_size): New variable declaration.
4745 (grub_total_module_size): Likewise.
4746 (grub_memdisk_image_size): Likewise.
4748 * include/grub/i386/pc/memory.h
4749 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
4751 * include/grub/kernel.h: Include `<grub/symbol.h>'.
4752 (grub_arch_memdisk_addr): New variable declaration.
4753 (grub_arch_memdisk_size): Likewise.
4755 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
4756 (grub_arch_memdisk_size): Likewise.
4758 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
4759 (codestart): Replace hardcoded `0x100000' with
4760 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
4762 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
4763 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
4764 not NULL, append the contents of the file it refers to, at the end of
4765 the compressed kernel image. Initialize `grub_memdisk_image_size'
4766 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
4767 (options): Add "memdisk"|'m' option.
4768 (main): Parse --memdisk|-m option, and pass user-provided path as
4769 parameter to generate_image().
4771 2008-01-20 Robert Millan <rmh@aybabtu.com>
4773 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
4774 grub_dprintf() calls from here ...
4775 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
4777 2008-01-20 Robert Millan <rmh@aybabtu.com>
4779 Fix detection of "real mode" when /options/real-mode? doesn't exist.
4781 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
4783 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
4784 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
4785 `GRUB_IEEE1275_FLAG_REAL_MODE'.
4786 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
4788 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
4789 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
4791 2008-01-19 Robert Millan <rmh@aybabtu.com>
4793 Get rid of confusing function (superseded by
4794 `grub_ieee1275_get_integer_property')
4795 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
4797 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
4799 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
4800 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
4801 in native endianness from grub_ieee1275_get_integer_property().
4803 2008-01-19 Robert Millan <rmh@aybabtu.com>
4805 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
4806 command after "shut-down", since implementations differ on which
4807 the command for halt is.
4809 2008-01-19 Robert Millan <rmh@aybabtu.com>
4811 * include/grub/i386/linuxbios/console.h: Add header protection.
4812 (grub_keyboard_controller_init): New function prototype.
4813 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
4814 (KEYBOARD_COMMAND_READ): Likewise.
4815 (KEYBOARD_COMMAND_WRITE): Likewise.
4816 (KEYBOARD_SCANCODE_SET1): Likewise.
4817 (grub_keyboard_controller_write): New function.
4818 (grub_keyboard_controller_read): Likewise.
4819 (grub_keyboard_controller_init): Likewise.
4821 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
4822 (grub_console_init): On coreboot/LinuxBIOS, call
4823 grub_keyboard_controller_init().
4825 2008-01-19 Robert Millan <rmh@aybabtu.com>
4827 PowerPC changes provided by Pavel Roskin.
4829 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
4830 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
4831 don't rely on cmain() doing it.
4832 * kern/i386/ieee1275/startup.S (_start): Store %eax in
4833 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
4835 2008-01-16 Robert Millan <rmh@aybabtu.com>
4837 * include/grub/i386/linuxbios/memory.h
4838 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
4839 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
4840 receive `table_header' as argument. Instead, probe for it in the
4841 known memory ranges where it can be present.
4842 (grub_available_iterate): Do not pass a fixed `table_header' address
4843 to grub_linuxbios_table_iterate().
4845 2008-01-15 Robert Millan <rmh@aybabtu.com>
4847 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
4848 * conf/i386-ieee1275.rmk: New file.
4849 * include/grub/i386/ieee1275/console.h: Likewise.
4850 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
4851 * include/grub/i386/ieee1275/kernel.h: Likewise.
4852 * include/grub/i386/ieee1275/time.h: Likewise.
4853 * kern/i386/ieee1275/init.c: Likewise.
4854 * kern/i386/ieee1275/startup.S: Likewise.
4856 2008-01-15 Robert Millan <rmh@aybabtu.com>
4858 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
4859 when pointers are 32-bit (but still do set it to one when they are
4862 2008-01-15 Robert Millan <rmh@aybabtu.com>
4864 * include/grub/ieee1275/ieee1275.h
4865 (grub_ieee1275_get_integer_property): New function prototype.
4867 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
4868 (grub_ieee1275_get_integer_property): New function. Wraps around
4869 grub_ieee1275_get_property() to handle endianness.
4871 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
4872 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
4874 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
4875 (grub_map): Likewise.
4876 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
4878 2008-01-15 Bean <bean123ch@gmail.com>
4880 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
4881 (grub_script_execute_cmdline): Reset grub_errno.
4883 * normal/main.c (read_config_file): Reset grub_errno.
4885 * normal/parse.y (script_init): New.
4886 (script): Move function and menuentry here.
4888 (command): Add delimiter at the end of command.
4889 (commands): Adjust to match the new command.
4890 (commandblock): Remove grub_script_lexer_record_start.
4891 (menuentry): Add grub_script_lexer_record_start, use the new commands.
4892 (if): Use the new commands.
4894 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
4896 2008-01-15 Robert Millan <rmh@aybabtu.com>
4898 * normal/menu.c (run_menu): Move timeout message from here ...
4899 (print_timeout): ... to here.
4900 (run_menu): Use print_timeout() once during initial draw to print
4901 the whole message, and again in every clock tick to update only
4902 the number of seconds.
4904 2008-01-15 Robert Millan <rmh@aybabtu.com>
4906 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
4907 actual size of `available' from grub_ieee1275_get_property(), and
4908 restrict parsing to that bound.
4910 2008-01-15 Christian Franke <franke@computer.org>
4912 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
4913 (argp_program_version): Remove variable.
4914 (argp_program_bug_address): Likewise.
4915 (options): Convert from struct argp_option to struct option.
4916 (struct arguments): Remove.
4917 (parse_opt): Remove.
4918 (usage): New function.
4919 (main): Replace struct args members by simple variables.
4920 Replace argp_parse() by getopt_long().
4921 Add switch to evaluate options.
4922 Add missing "(...)" around root_dev in prefix string.
4924 2008-01-14 Robert Millan <rmh@aybabtu.com>
4926 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
4927 for grub_ieee1275_exit(), in order to improve portability.
4929 2008-01-14 Robert Millan <rmh@aybabtu.com>
4931 * util/grub.d/10_linux.in (prefix): Define.
4932 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
4934 2008-01-13 Pavel Roskin <proski@gnu.org>
4936 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
4937 grub_errno if no errors have been detected.
4939 2008-01-12 Robert Millan <rmh@aybabtu.com>
4941 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
4942 (grub_util_get_dev_abstraction): New function prototype.
4944 * util/getroot.c: Include `<grub/util/getroot.h>'
4945 (grub_util_get_grub_dev): Move detection of abstraction type to ...
4946 (grub_util_get_dev_abstraction): ... here (new function).
4948 * util/grub-probe.c: Convert PRINT_* to an enum. Add
4949 `PRINT_ABSTRACTION'.
4950 (probe): Probe for abstraction type when requested.
4951 (main): Understand `--target=abstraction'.
4953 * util/i386/efi/grub-install.in: Add abstraction module to core
4954 image when it is found to be necessary.
4955 * util/i386/pc/grub-install.in: Likewise.
4956 * util/powerpc/ieee1275/grub-install.in: Likewise.
4958 * util/update-grub_lib.in (font_path): Return system path without
4959 converting to GRUB path.
4960 * util/update-grub.in: Convert system path returned by font_path()
4961 to a GRUB path. Use `grub-probe -t abstraction' to determine what
4962 abstraction module is needed for loading fonts (if any). Export
4963 that as `GRUB_PRELOAD_MODULES'.
4964 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
4967 2008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
4969 Remove some unused code from reiserfs.
4971 * fs/reiserfs.c (struct grub_reiserfs_key)
4972 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
4973 (struct grub_reiserfs_node_body): Removed.
4974 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
4976 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
4978 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
4980 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
4982 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
4984 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
4986 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
4987 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
4988 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
4990 2008-01-10 Robert Millan <rmh@aybabtu.com>
4992 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
4993 Determines if a file is garbage left by packaging systems, etc.
4994 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
4995 for processing /etc/grub.d scripts.
4996 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
4997 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
4998 as a condition for processing Linux images.
5000 2008-01-10 Pavel Roskin <proski@gnu.org>
5002 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
5003 to compile reiserfs.c on PowerPC.
5005 2008-01-10 Robert Millan <rmh@aybabtu.com>
5007 * kern/device.c (grub_device_iterate): Do not abort device iteration
5008 when one of the devices cannot be opened.
5009 * kern/disk.c (grub_disk_open): Do not account previous failures of
5010 unrelated functions when grub_errno is checked for.
5012 2008-01-08 Robert Millan <rmh@aybabtu.com>
5014 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
5015 `! grub_linux_is_bzimage', change order of address comparison to make
5016 it more intuitive, and improve "too big zImage" error message.
5018 2008-01-08 Robert Millan <rmh@aybabtu.com>
5020 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
5021 `$(update-grub_DATA)'.
5022 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
5025 2008-01-07 Robert Millan <rmh@aybabtu.com>
5027 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
5028 which instruction is modified by grub-setup during installation
5029 (since it wasn't obvious by only looking at this file).
5031 2008-01-07 Robert Millan <rmh@aybabtu.com>
5033 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
5034 listing actual TODO items.
5036 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
5038 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
5040 (grub_reiserfs_get_key_offset): Likewise.
5041 (grub_reiserfs_set_key_offset): Likewise.
5042 (grub_reiserfs_set_key_type): Likewise.
5043 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
5045 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
5046 better to remove the bitfield version completely.
5048 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
5050 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
5051 allocated from the heap, due to the fshelp implementation.
5052 (grub_reiserfs_dir): Free NODE, due to the same reason.
5054 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
5056 Mostly from Vincent Pelletier:
5058 * fs/reiserfs.c: New file.
5060 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
5061 (reiserfs_mod_SOURCES): New variable.
5062 (reiserfs_mod_CFLAGS): Likewise.
5063 (reiserfs_mod_LDFLAGS): Likewise.
5065 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
5066 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
5067 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
5070 2008-01-06 Robert Millan <rmh@aybabtu.com>
5072 * normal/color.c: Remove `<grub/env.h>'.
5074 2008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
5076 * include/grub/normal.h: Include <grub/env.h>.
5078 2008-01-05 Robert Millan <rmh@aybabtu.com>
5080 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
5081 usage example with `(hd0,1)'.
5082 Reported by Samuel Thibault.
5084 2008-01-05 Robert Millan <rmh@aybabtu.com>
5086 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
5087 (grub_linux_boot_zimage): Rename to ...
5088 (grub_linux_boot): ... this.
5089 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
5090 (grub_linux_boot_zimage): Conditionalize zImage copy.
5092 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
5093 (grub_linux_boot_bzimage): Remove prototype.
5094 (grub_linux_boot_zimage): Rename to ...
5095 (grub_linux_boot): ... this.
5097 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
5098 (grub_linux_boot): Remove function.
5100 2008-01-05 Robert Millan <rmh@aybabtu.com>
5102 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
5103 (grub_env_write_color_highlight): Likewise.
5104 (grub_wait_after_message): Likewise.
5106 * normal/color.c: New file.
5108 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
5109 (normal_mod_DEPENDENCIES): Likewise.
5111 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
5112 (normal_mod_DEPENDENCIES): Likewise.
5114 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
5115 (normal_mod_DEPENDENCIES): Likewise.
5117 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
5118 (normal_mod_DEPENDENCIES): Likewise.
5120 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
5121 for waiting after a message is printed.
5122 * normal/main.c (read_config_file): Likewise.
5123 (grub_normal_init): Register grub_env_write_color_normal() and
5124 grub_env_write_color_highlight() hooks. Mark `color_normal' and
5125 `color_highlight' variables as global.
5127 * normal/menu.c (grub_wait_after_message): New function.
5128 (grub_color_menu_normal): New variable. Replaces ...
5129 (GRUB_COLOR_MENU_NORMAL): ... this macro.
5130 (grub_color_menu_highlight): New variable. Replaces ...
5131 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
5132 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
5133 `GRUB_TERM_COLOR_STANDARD'.
5134 (print_message): Use `grub_setcolorstate' to reload colors. Rename
5135 `normal_code' and `highlight_code' to `old_color_normal' and
5136 `old_color_highlight', respectively.
5137 (grub_menu_init_page): Update colors when drawing the menu, based on
5138 `menu_color_normal' and `menu_color_highlight' variables.
5139 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
5140 a message is printed.
5142 2008-01-05 Robert Millan <rmh@aybabtu.com>
5144 * kern/env.c (grub_env_context_open): Propagate hooks for global
5145 variables to new context.
5147 * kern/main.c (grub_set_root_dev): Export `root' variable.
5149 2008-01-05 Robert Millan <rmh@aybabtu.com>
5151 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
5152 discs unconditionally, since udev and others have options to provide
5155 2008-01-05 Robert Millan <rmh@aybabtu.com>
5157 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
5159 2008-01-04 Christian Franke <franke@computer.org>
5161 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
5164 2008-01-03 Pavel Roskin <proski@gnu.org>
5166 * kern/i386/linuxbios/init.c: Put "void" to all function
5167 declarations with no arguments.
5168 * kern/powerpc/ieee1275/init.c: Likewise.
5169 * term/i386/pc/at_keyboard.c: Likewise.
5170 * term/i386/pc/vga_text.c: Likewise.
5171 * util/grub-mkdevicemap.c: Likewise.
5173 2008-01-02 Robert Millan <rmh@aybabtu.com>
5175 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
5176 message when loaded image is out of bounds.
5177 (grub_multiboot_load_elf64): Likewise.
5179 2008-01-02 Pavel Roskin <proski@gnu.org>
5181 * util/grub.d/10_linux.in: Try version without ".old" when
5182 looking for initrd. It's better to use initrd from the newer
5183 kernel of the same version than no initrd at all.
5185 2008-01-01 Robert Millan <rmh@aybabtu.com>
5187 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
5189 2008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
5191 * include/grub/video.h: Added grub_video_unmap_color and
5192 grub_video_get_active_render_target.
5193 (grub_video_adapter): Added unmap_color and get_active_render_target.
5195 * video/video.c: Added grub_video_unmap_color and
5196 grub_video_get_active_render_target.
5197 (grub_video_get_info): Changed method to accept NULL pointer as an
5198 argument to allow detection of active video adapter.
5200 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
5201 grub_video_vbe_unmap_color_int.
5202 Added grub_video_vbe_unmap_color and
5203 grub_video_vbe_get_active_render_target.
5204 (grub_video_vbe_adapter): Added unmap_color and
5205 get_active_render_target.
5207 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
5208 with grub_video_vbe_unmap_color_int.
5210 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
5211 (DEFAULT_NORMAL_COLOR): Likewise.
5212 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
5213 (DEFAULT_FG_COLOR): Removed.
5214 (DEFAULT_BG_COLOR): Likewise.
5215 (DEFAULT_CURSOR_COLOR): Changed value.
5216 (grub_virtual_screen): Added standard_color_setting,
5217 normal_color_setting, highlight_color_setting and term_color.
5218 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
5219 (bitmap_width): Added.
5220 (bitmap_height): Likewise.
5222 (set_term_color): Likewise.
5223 (grub_virtual_screen_setup): Changed to use new terminal coloring
5225 (grub_gfxterm_init): Added init for bitmap.
5226 (grub_gfxterm_fini): Added destroy for bitmap.
5227 (redraw_screen_rect): Updated to use background bitmap and new
5229 (scroll_up): Added optimization for case when there is no bitmap.
5230 (grub_gfxterm_cls): Fixed to use correct background color.
5231 (grub_virtual_screen_setcolorstate): Changed to use new terminal
5233 (grub_virtual_screen_setcolor): Likewise.
5234 (grub_virtual_screen_getcolor): Added.
5235 (grub_gfxterm_background_image_cmd): Likewise.
5236 (grub_video_term): Added setcolor and getcolor.
5237 (MOD_INIT): Added registration of background_image command.
5238 (MOD_TERM): Added unregistration for background_image command.
5240 2007-12-30 Pavel Roskin <proski@gnu.org>
5242 * loader/multiboot_loader.c: Fix multiboot command
5243 unregistration. Fix all typos in the word "multiboot".
5245 2007-12-29 Pavel Roskin <proski@gnu.org>
5247 * util/grub.d/10_linux.in: Refactor search for initrd. Add
5248 support for initrd names used in Fedora.
5250 2007-12-26 Bean <bean123ch@gmail.com>
5252 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
5253 (cpio_mod_SOURCES): New variable.
5254 (cpio_mod_CFLAGS): Likewise.
5255 (cpio_mod_LDFLAGS): Likewise.
5257 * fs/cpio.c: New file.
5259 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
5261 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5263 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5265 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5267 2007-12-25 Robert Millan <rmh@aybabtu.com>
5269 * include/grub/term.h (struct grub_term): Add `getcolor' function.
5270 (grub_getcolor): New function.
5272 * kern/term.c (grub_getcolor): New function.
5273 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
5274 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
5275 (print_entry): Set normal and highlight colors to
5276 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
5277 respectively, before printing and restore them to old
5279 (grub_menu_init_page): Likewise. Fill an additional colored space
5280 that would otherwise be left blank.
5282 * term/efi/console.c (grub_console_getcolor): New function.
5283 (struct grub_console_term.getcolor): New variable.
5284 * term/i386/pc/console.c (grub_console_getcolor): New function.
5285 (struct grub_console_term.getcolor): New variable.
5286 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
5287 (struct grub_console_term.getcolor): New variable.
5289 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
5290 (struct grub_console_term.setcolor): Remove variable.
5291 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
5292 (struct grub_console_term.setcolor): Remove variable.
5293 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
5294 (struct grub_console_term.setcolor): Remove variable.
5295 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
5296 (struct grub_console_term.setcolor): Remove variable.
5298 2007-12-25 Robert Millan <rmh@aybabtu.com>
5300 * configure.ac: Search for possible unifont.hex locations, and
5301 define UNIFONT_HEX if found.
5303 * Makefile.in (UNIFONT_HEX): Define variable.
5304 (DATA): Rename to ...
5305 (PKGLIB): ... this. Update all users.
5306 (PKGDATA): New variable.
5307 (pkgdata_IMAGES): Rename to ...
5308 (pkglib_IMAGES): ... this. Update all users.
5309 (pkgdata_MODULES): Rename to ...
5310 (pkglib_MODULES): ... this. Update all users.
5311 (pkgdata_PROGRAMS): Rename to ...
5312 (pkglib_PROGRAMS): ... this. Update all users.
5313 (pkgdata_DATA): Rename to ...
5314 (pkglib_DATA): ... this. Update all users.
5315 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
5316 (unicode.pff, ascii.pff): New rules.
5317 (all-local): Add `$(PKGDATA)' dependency.
5318 (install-local): Process `$(PKGDATA)'.
5320 * util/update-grub_lib.in (font_path): Search for *.pff files in
5321 a few more locations, including `${pkgdata}'.
5323 2007-12-23 Robert Millan <rmh@aybabtu.com>
5325 Patch from Bean <bean123ch@gmail.com>:
5326 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
5329 2007-12-21 Bean <bean123ch@gmail.com>
5331 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
5332 (ntfscomp_mod_SOURCES): New variable.
5333 (ntfscomp_mod_CFLAGS): Likewise.
5334 (ntfscomp_mod_LDFLAGS): Likewise.
5336 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
5337 (grub_probe_SOURCES): Likewise.
5338 (grub_emu_SOURCES): Likewise.
5340 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
5341 (grub_emu_SOURCES): Likewise.
5343 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
5344 (grub_emu_SOURCES): Likewise.
5346 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
5347 (grub_emu_SOURCES): Likewise.
5349 * fs/ntfs.c (grub_ntfscomp_func): New variable.
5350 (read_run_list): Renamed to grub_ntfs_read_run_list.
5351 (decomp_nextvcn): Moved to ntfscomp.c.
5352 (decomp_getch): Likewise.
5353 (decomp_get16): Likewise.
5354 (decomp_block): Likewise.
5355 (read_block): Likewise.
5356 (read_data): Partially moved to ntfscomp.c.
5357 (fixup): Change unsigned to grub_uint16_t.
5358 (read_mft): Change unsigned long to grub_uint32_t.
5359 (read_attr): Likewise.
5360 (read_data): Likewise.
5361 (read_run_data): Likewise.
5362 (read_run_list): Likewise.
5363 (read_mft): Likewise.
5365 * fs/ntfscomp.c: New file.
5367 * include/grub/ntfs.h: New file.
5369 2007-12-16 Robert Millan <rmh@aybabtu.com>
5371 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
5372 IDE disk check, since Linux is known to support 20 IDE disks.
5373 Reported by Colin Watson.
5375 2007-12-15 Bean <bean123ch@gmail.com>
5377 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
5378 (lnxboot_img_SOURCES): New variable.
5379 (lnxboot_img_ASFLAGS): Likewise.
5380 (lnxboot_img_LDFLAGS): Likewise.
5382 * boot/i386/pc/lnxboot.S: New file.
5384 2007-11-24 Pavel Roskin <proski@gnu.org>
5386 * configure.ac: Test if '--build-id=none' is supported by the
5387 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
5388 objcopy to generate incorrect binary files (binutils
5389 2.17.50.0.18-1 as shipped by Fedora 8).
5390 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
5391 linking, so that build ID doesn't break the test.
5393 2007-11-24 Pavel Roskin <proski@gnu.org>
5395 * include/grub/i386/time.h: use "void" in the argument list
5397 * include/grub/powerpc/time.h: Likewise.
5398 * include/grub/sparc64/time.h: Likewise.
5400 2007-11-18 Christian Franke <franke@computer.org>
5402 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
5403 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
5404 This fixes the problem that function keys did not work in grub-emu.
5406 2007-11-18 Christian Franke <franke@computer.org>
5408 * disk/host.c (grub_host_open): Remove attribute unused from
5409 name parameter. Add check for "host". This fixes the problem
5410 that grub-emu does not find partitions.
5412 2007-11-18 Christian Franke <franke@computer.org>
5414 * util/hostfs.c (is_dir): New function.
5415 (grub_hostfs_dir): Handle missing dirent.d_type case.
5416 (grub_hostfs_read): Add missing fseek().
5417 (grub_hostfs_label): Clear label pointer. This fixes a crash
5418 of grub-emu on "ls (host)".
5420 2007-11-18 Christian Franke <franke@computer.org>
5422 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
5423 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
5424 to 64 bit boundary by default.
5426 2007-11-18 Bean <bean123ch@gmail.com>
5428 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
5429 (hexdump_mod_SOURCES): New variable.
5430 (hexdump_mod_CFLAGS): Likewise.
5431 (hexdump_mod_LDFLAGS): Likewise.
5433 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5435 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5437 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5439 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5441 * include/grub/hexdump.h: New file.
5443 * commands/hexdump.c: New file.
5445 2007-11-10 Robert Millan <rmh@aybabtu.com>
5447 * commands/i386/pc/play.c (beep_off): Switch order of arguments
5448 in grub_outb() calls.
5449 (beep_on): Likewise.
5451 2007-11-10 Christian Franke <franke@computer.org>
5453 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
5454 (grub_menu_run): Likewise.
5456 2007-11-10 Robert Millan <rmh@aybabtu.com>
5458 * include/grub/i386/efi/machine.h: New file.
5459 * include/grub/i386/linuxbios/machine.h: Likewise.
5460 * include/grub/i386/pc/machine.h: Likewise.
5461 * include/grub/powerpc/ieee1275/machine.h: Likewise.
5462 * include/grub/sparc64/ieee1275/machine.h: Likewise.
5464 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
5465 (serial_hw_io_addr): New variable.
5466 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
5467 instead of `(unsigned short *) 0x400'.
5469 2007-11-10 Bean <bean123ch@gmail.com>
5471 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
5473 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
5475 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
5476 (vga_mod_SOURCES): Added.
5477 (vga_mod_CFLAGS): Likewise.
5478 (vga_mod_LDFLAGS): Likewise.
5480 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
5482 (set_map_mask): Likewise.
5483 (set_read_map): Likewise.
5484 (set_read_address): Likewise.
5485 (vga_font): Removed variable.
5486 (get_vga_glyph): Removed function.
5487 (invalidate_char): Likewise.
5488 (write_char): Changed to use grub_font_get_glyph() for font
5490 (grub_vga_putchar): Likewise.
5491 (grub_vga_getcharwidth): Likewise.
5493 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
5495 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
5497 (pxeboot_img_LDFLAGS): Likewise.
5498 (diskboot_img_LDFLAGS): Likewise.
5499 (kernel_img_LDFLAGS): Likewise.
5501 2007-11-06 Robert Millan <rmh@aybabtu.com>
5503 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
5504 in grub_outb() calls.
5505 (serial_hw_init): Likewise.
5507 2007-11-05 Robert Millan <rmh@aybabtu.com>
5509 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
5510 spaces. Skip non-regular files.
5512 2007-11-05 Robert Millan <rmh@aybabtu.com>
5514 * kern/disk.c (grub_disk_firmware_fini)
5515 (grub_disk_firmware_is_tainted): New variables.
5517 * include/grub/disk.h (grub_disk_firmware_fini)
5518 (grub_disk_firmware_is_tainted): Likewise.
5520 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
5521 (grub_disk_biosdisk_fini): ... to here.
5522 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
5523 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
5524 is set. Register grub_disk_biosdisk_fini() in
5525 `grub_disk_firmware_fini'.
5527 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
5528 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
5529 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
5530 to finish existing firmware disk interface.
5532 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
5533 (ata_mod_SOURCES): New variable.
5534 (ata_mod_CFLAGS): Likewise.
5535 (ata_mod_LDFLAGS): Likewise.
5537 2007-11-05 Robert Millan <rmh@aybabtu.com>
5539 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
5540 (grub_ata_wait): Reimplement using grub_millisleep().
5542 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
5543 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
5545 2007-11-03 Marco Gerards <marco@gnu.org>
5547 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
5548 (CRTC_ADDR_PORT): New macro.
5549 (CRTC_DATA_PORT): Likewise.
5550 (CRTC_CURSOR): Likewise.
5551 (CRTC_CURSOR_ADDR_HIGH): Likewise.
5552 (CRTC_CURSOR_ADDR_LOW): Likewise.
5553 (update_cursor): New function.
5554 (grub_console_real_putchar): Call `update_cursor'.
5555 (grub_console_gotoxy): Likewise.
5556 (grub_console_cls): Set the default color when clearing the
5558 (grub_console_setcursor): Implemented.
5560 2007-11-03 Marco Gerards <marco@gnu.org>
5562 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
5564 (grub_ata_pio_write): Likewise.
5566 (grub_atapi_identify): Wait after issuing an ATA command.
5567 (grub_atapi_packet): Likewise.
5568 (grub_ata_identify): Likewise.
5569 (grub_ata_readwrite): Likewise.
5571 2007-11-03 Marco Gerards <marco@gnu.org>
5573 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
5574 (grub_ata_pio_write): Likewise.
5575 (grub_ata_readwrite): Use `grub_error', instead of
5576 returning `grub_errno'.
5578 2007-11-03 Marco Gerards <marco@gnu.org>
5580 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
5581 grub_ata_pio_write once for every single sector, instead of for
5584 2007-10-31 Robert Millan <rmh@aybabtu.com>
5586 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
5588 * conf/i386-linuxbios.rmk: New file.
5590 * kern/i386/pc/hardware.c: Likewise.
5591 * term/i386/pc/at_keyboard.c: Likewise.
5592 * term/i386/pc/vga_text.c: Likewise.
5594 * include/grub/i386/linuxbios/boot.h: Likewise.
5595 * include/grub/i386/linuxbios/console.h: Likewise.
5596 * include/grub/i386/linuxbios/init.h: Likewise.
5597 * include/grub/i386/linuxbios/kernel.h: Likewise.
5598 * include/grub/i386/linuxbios/loader.h: Likewise.
5599 * include/grub/i386/linuxbios/memory.h: Likewise.
5600 * include/grub/i386/linuxbios/serial.h: Likewise.
5601 * include/grub/i386/linuxbios/time.h: Likewise.
5603 * kern/i386/linuxbios/init.c: Likewise.
5604 * kern/i386/linuxbios/startup.S: Likewise.
5605 * kern/i386/linuxbios/table.c: Likewise.
5607 2007-10-31 Marco Gerards <marco@gnu.org>
5609 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
5610 (ata_mod_SOURCES): New variable.
5611 (ata_mod_CFLAGS): Likewise.
5612 (ata_mod_LDFLAGS): Likewise.
5614 * disk/ata.c: New file.
5616 * include/grub/disk.h (grub_disk_dev_id): Add
5617 `GRUB_DISK_DEV_ATA_ID'.
5619 2007-10-31 Robert Millan <rmh@aybabtu.com>
5621 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
5622 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
5624 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
5625 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
5627 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
5630 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
5632 2007-10-27 Robert Millan <rmh@aybabtu.com>
5634 * include/grub/types.h (ULONG_MAX): Define macro.
5636 2007-10-22 Robert Millan <rmh@aybabtu.com>
5638 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
5640 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
5642 2007-10-22 Robert Millan <rmh@aybabtu.com>
5644 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
5645 (pkgdata_MODULES): Add `biosdisk.mod'.
5646 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
5649 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
5650 (grub_biosdisk_init): Replace with ...
5651 (GRUB_MOD_INIT(biosdisk)): ... this.
5652 (grub_biosdisk_fini): Replace with ...
5653 (GRUB_MOD_FINI(biosdisk)): ... this.
5655 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
5656 (grub_machine_init): Remove call to grub_biosdisk_init().
5657 (grub_machine_fini): Remove call to grub_machine_fini().
5659 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
5661 2007-10-22 Robert Millan <rmh@aybabtu.com>
5663 * include/grub/time.h: New file.
5664 * include/grub/i386/time.h: Likewise.
5665 * include/grub/powerpc/time.h: Likewise.
5666 * include/grub/sparc64/time.h: Likewise.
5668 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
5670 (KERNEL_MACHINE_TIME_HEADER): ... this.
5671 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
5673 (KERNEL_MACHINE_TIME_HEADER): ... this.
5674 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
5676 (KERNEL_MACHINE_TIME_HEADER): ... this.
5678 * kern/i386/efi/init.c: Include `<grub/time.h>'.
5679 (grub_millisleep): New function.
5680 * kern/i386/pc/init.c: Include `<grub/time.h>'.
5681 (grub_millisleep): New function.
5682 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
5683 Remove `grub/machine/time.h' include.
5684 (grub_millisleep): New function.
5685 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
5686 Remove `grub/machine/time.h' include.
5687 (grub_millisleep): New function.
5689 * include/grub/misc.h (grub_div_roundup): New function.
5691 * kern/misc.c: Include `<grub/time.h>'.
5692 (grub_millisleep_generic): New function.
5694 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
5696 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
5698 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
5699 `machine/time.h'. Add `time.h'.
5700 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
5702 2007-10-21 Robert Millan <rmh@aybabtu.com>
5704 * include/grub/misc.h (grub_max): New function.
5706 2007-10-21 Robert Millan <rmh@aybabtu.com>
5708 * util/misc.c (grub_util_info): Call fflush() before returning.
5710 2007-10-20 Robert Millan <rmh@aybabtu.com>
5712 * genmk.rb (Image): Copy `extra_flags' from here ...
5713 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
5715 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
5716 to `argc' and `args' arguments.
5718 2007-10-17 Robert Millan <rmh@aybabtu.com>
5720 * kern/i386/loader.S: New file.
5722 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
5723 * kern/i386/loader.S (grub_linux_prot_size)... to here.
5724 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
5725 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
5726 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
5727 * kern/i386/loader.S (grub_linux_real_addr)... to here.
5728 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
5729 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
5730 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
5731 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
5732 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
5733 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
5734 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
5735 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
5737 * kern/i386/realmode.S: New file.
5739 * kern/i386/pc/startup.S (protstack): Moved from here ...
5740 * kern/i386/realmode.S (protstack)... to here.
5741 * kern/i386/pc/startup.S (gdt): Moved from here ...
5742 * kern/i386/realmode.S (gdt)... to here.
5743 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
5744 * kern/i386/realmode.S (prot_to_real)... to here.
5746 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
5747 `kern/i386/realmode.S'.
5749 2007-10-17 Robert Millan <rmh@aybabtu.com>
5751 * include/grub/i386/loader.h: New file.
5753 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
5754 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
5755 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
5756 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
5757 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
5758 * include/grub/i386/loader.h (grub_linux_prot_size)
5759 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
5760 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
5761 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
5762 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
5764 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
5766 2007-10-15 Robert Millan <rmh@aybabtu.com>
5768 * normal/misc.c (grub_normal_print_device_info): Do not probe for
5769 filesystem when dev->disk is unset.
5770 Do probe for filesystem even when dev->disk->has_partitions is set.
5771 In case a filesystem is found, always report it.
5772 In case it isn't, if dev->disk->has_partitions is set, report that
5773 a partition table was found instead of reporting that no filesystem
5774 could be identified.
5776 2007-10-12 Robert Millan <rmh@aybabtu.com>
5778 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
5779 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
5781 * include/grub/types.h (grub_host_to_target16): New macro.
5782 (grub_host_to_target32): Likewise.
5783 (grub_host_to_target64): Likewise.
5784 (grub_target_to_host16): Likewise.
5785 (grub_target_to_host32): Likewise.
5786 (grub_target_to_host64): Likewise.
5788 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
5790 (GRUB_MOD_ALIGN): ...this. Update all users.
5792 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
5793 grub_host_to_target32.
5794 Replace grub_be_to_cpu32 with grub_target_to_host32.
5795 (load_modules): Likewise.
5796 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
5797 Replace grub_be_to_cpu32 with grub_target_to_host32.
5798 Replace grub_cpu_to_be16 with grub_host_to_target16.
5799 Replace grub_cpu_to_be32 grub_host_to_target32.
5801 2007-10-12 Robert Millan <rmh@aybabtu.com>
5803 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
5804 * util/elf/grub-mkimage.c: ... here.
5806 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
5807 `util/powerpc/ieee1275/grub-mkimage.c'.
5809 2007-10-07 Robert Millan <rmh@aybabtu.com>
5811 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
5812 and make it easier to figure out.
5813 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
5814 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
5815 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
5816 leave us with less than HEAP_MIN_SIZE total heap.
5817 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
5819 2007-10-03 Robert Millan <rmh@aybabtu.com>
5821 * include/grub/i386/io.h: New file.
5822 * commands/i386/pc/play.c (inb): Removed.
5824 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
5826 * term/i386/pc/serial.c (inb): Removed.
5828 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
5830 * term/i386/pc/vga.c (inb): Removed.
5832 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
5835 2007-10-02 Robert Millan <rmh@aybabtu.com>
5837 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
5838 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5839 Reported by Marcin Kurek.
5841 2007-09-07 Robert Millan <rmh@aybabtu.com>
5843 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
5844 SmartFirmware version updates (as released by Sven Luther), and avoid
5845 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
5846 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
5849 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
5852 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
5853 when merging two regions.
5855 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
5857 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
5858 * normal/completion.c (grub_normal_do_completion): Likewise.
5859 Reported by Hitoshi Ozeki.
5861 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
5863 Do not use devices at boot in chainloading.
5865 * loader/i386/pc/chainloader.c (boot_drive): New variable.
5866 (boot_part_addr): Likewise.
5867 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
5868 with BOOT_DRIVE and BOOT_PART_ADDR.
5869 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
5870 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
5872 2007-08-29 Robert Millan <rmh@aybabtu.com>
5874 Patch from Simon Peter <dn.tlp@gmx.net>:
5875 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
5876 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
5877 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
5878 util/i386/pc/grub-setup.c_DEPENDENCIES.
5879 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
5880 util/grub-probe.c_DEPENDENCIES.
5881 * conf/powerpc-ieee1275.rmk: Likewise.
5883 2007-08-28 Robert Millan <rmh@aybabtu.com>
5885 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
5886 to tell grub-mkdevicemap how to name devices.
5887 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
5890 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
5891 util/i386/get_disk_name.c.
5892 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
5893 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
5894 util/ieee1275/get_disk_name.c.
5896 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
5898 * DISTLIST: Add util/i386/get_disk_name.c and
5899 util/ieee1275/get_disk_name.c.
5901 * util/grub-mkdevicemap.c: Replace device naming logic with
5902 grub_util_get_disk_name() calls.
5904 2007-08-20 Robert Millan <rmh@aybabtu.com>
5906 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
5907 (so that it works for both plural and singular quantities).
5909 2007-08-05 Robert Millan <rmh@aybabtu.com>
5911 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
5912 so that [xz] isn't taken into account when determining order.
5914 2007-08-02 Marco Gerards <marco@gnu.org>
5916 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
5917 `include/multiboot2.h', `include/grub/elfload.h',
5918 `include/multiboot.h', `include/grub/multiboot.h',
5919 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
5920 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
5921 `kern/elf.c', `loader/multiboot_loader.c',
5922 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
5923 `loader/i386/pc/multiboot2.c',
5924 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
5925 `util/i386/pc/grub-mkrescue.in'. Remove
5926 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
5927 `include/grub/i386/pc/util/biosdisk.h' and
5928 `include/grub/powerpc/ieee1275/multiboot.h'.
5930 2007-08-02 Bean <bean123ch@gmail.com>
5932 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
5933 (ntfs_mod_SOURCES): New variable.
5934 (ntfs_mod_CFLAGS): Likewise.
5935 (ntfs_mod_LDFLAGS): Likewise.
5937 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
5938 (grub_probe_SOURCES): Likewise.
5939 (grub_emu_SOURCES): Likewise.
5941 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
5942 (grub_emu_SOURCES): Likewise.
5944 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
5945 (grub_emu_SOURCES): Likewise.
5947 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
5949 * fs/ntfs.c: New file.
5951 2007-08-02 Bean <bean123ch@gmail.com>
5953 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
5955 * file.h (grub_file): Likewise.
5957 * fshelp.h (grub_fshelp_read_file): Likewise.
5959 * util/i386/pc/grub-setup.c (setup): Likewise.
5960 (save_first_sector): Likewise.
5961 (save_blocklists): Likewise.
5963 * fs/affs.c (grub_affs_read_file): Likewise.
5965 * fs/ext2.c (grub_ext2_read_file): Likewise.
5967 * fs/fat.c (grub_fat_read_data): Likewise.
5969 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
5971 * fs/hfs.c (grub_hfs_read_file): Likewise.
5973 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
5975 * fs/jfs.c (grub_jfs_read_file): Likewise.
5977 * fs/minix.c (grub_minix_read_file): Likewise.
5979 * fs/sfs.c (grub_sfs_read_file): Likewise.
5981 * fs/ufs.c (grub_ufs_read_file): Likewise.
5983 * fs/xfs.c (grub_xfs_read_file): Likewise.
5985 * command/blocklist.c (read_blocklist): Likewise.
5986 (print_blocklist): Likewise.
5988 2007-08-02 Marco Gerards <marco@gnu.org>
5990 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
5993 * disk/host.c: New file.
5995 * util/hostfs.c: Likewise.
5997 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
5998 return `GRUB_ERR_BAD_FS'.
5999 * fs/sfs.c (grub_sfs_mount): Likewise.
6000 * fs/xfs.c (grub_xfs_mount): Likewise.
6002 * include/grub/disk.h (enum grub_disk_dev_id): Add
6003 `GRUB_DISK_DEVICE_HOST_ID'.
6005 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
6007 2007-07-24 Jerone Young <jerone@gmail.com>
6009 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
6010 modules for compilation.
6011 * conf/powerpc-ieee1275.rmk: Likewise.
6013 * include/multiboot.h: Move multiboot definitions to one file. Rename
6014 many definitions to not get grub specific.
6015 * include/multiboot2.h: Create header with multiboot 2 definitions.
6016 * include/grub/multiboot.h: Header for grub specific function
6017 prototypes and definitions.
6018 * include/grub/multiboot2.h: Likewise.
6019 * include/grub/multiboot_loader.h: Likewise.
6020 * include/grub/i386/pc/multiboot.h: Removed.
6021 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
6023 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
6024 and 2 to allow for one multiboot and module commands.
6025 * loader/multiboot2.c: Add multiboot2 functionality.
6026 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
6027 and definition names.
6028 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
6030 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
6031 ieee1275 specific multiboot2 code.
6033 * kern/i386/pc/startup.S: Change headers and definition names for
6034 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
6036 2007-07-22 Robert Millan <rmh@aybabtu.com>
6038 * geninitheader.sh: Process file specified in first parameter rather
6039 than hardcoding grub_modules_init.lst.
6040 * geninit.sh: Likewise. Also, construct header name dynamically rather
6041 than hardcoding grub_modules_init.h.
6043 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
6044 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
6045 grub_probe_init.[ch] and grub_setup_init.[ch].
6047 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
6048 grub_modules_init.h with grub_emu_init.h.
6049 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
6050 grub_probe_init.[ch] files.
6051 * conf/i386-efi.rmk: Likewise.
6052 * conf/i386-pc.rmk: Likewise.
6053 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
6054 grub_setup_init.[ch] files.
6056 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
6057 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
6058 to initialize modules rather than a list of hardcoded functions.
6059 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
6060 grub_init_all() to initialize modules rather than a list of hardcoded
6063 2007-07-22 Robert Millan <rmh@aybabtu.com>
6065 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
6066 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
6068 2007-07-22 Robert Millan <rmh@aybabtu.com>
6070 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
6071 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
6072 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
6073 flag when running on SmartFirmware.
6074 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
6075 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
6078 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
6079 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
6080 rather than decreasing it.
6082 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
6083 there's not enough space to do it, fail in the same way as when it
6084 can't be done because there are no partitions.
6086 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
6087 when nvsetenv failed.
6089 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
6091 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
6092 because this rule is automatically generated.
6093 (grub-mkrescue): Removed for the same reason as above.
6095 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
6097 Migrate to GNU General Public License Version 3.
6099 * COPYING: Replaced with the plain text version of GPLv3.
6101 * config.guess: Updated from gnulib.
6102 * config.sub: Likewise.
6104 * geninit.sh: Output a GPLv3 copyright notice.
6105 * geninitheader.sh: Likewise.
6106 * genmodsrc.sh: Likewise.
6107 * gensymlist.sh.in: Likewise.
6109 * boot/i386/pc/boot.S: Upgraded to GPLv3.
6110 * boot/i386/pc/diskboot.S: Likewise.
6111 * boot/i386/pc/pxeboot.S: Likewise.
6112 * commands/blocklist.c: Likewise.
6113 * commands/boot.c: Likewise.
6114 * commands/cat.c: Likewise.
6115 * commands/cmp.c: Likewise.
6116 * commands/configfile.c: Likewise.
6117 * commands/echo.c: Likewise.
6118 * commands/help.c: Likewise.
6119 * commands/ls.c: Likewise.
6120 * commands/search.c: Likewise.
6121 * commands/terminal.c: Likewise.
6122 * commands/test.c: Likewise.
6123 * commands/videotest.c: Likewise.
6124 * commands/i386/cpuid.c: Likewise.
6125 * commands/i386/pc/halt.c: Likewise.
6126 * commands/i386/pc/play.c: Likewise.
6127 * commands/i386/pc/reboot.c: Likewise.
6128 * commands/i386/pc/vbeinfo.c: Likewise.
6129 * commands/i386/pc/vbetest.c: Likewise.
6130 * commands/ieee1275/halt.c: Likewise.
6131 * commands/ieee1275/reboot.c: Likewise.
6132 * commands/ieee1275/suspend.c: Likewise.
6133 * disk/loopback.c: Likewise.
6134 * disk/lvm.c: Likewise.
6135 * disk/raid.c: Likewise.
6136 * disk/efi/efidisk.c: Likewise.
6137 * disk/i386/pc/biosdisk.c: Likewise.
6138 * disk/ieee1275/ofdisk.c: Likewise.
6139 * font/manager.c: Likewise.
6140 * fs/affs.c: Likewise.
6141 * fs/ext2.c: Likewise.
6142 * fs/fat.c: Likewise.
6143 * fs/fshelp.c: Likewise.
6144 * fs/hfs.c: Likewise.
6145 * fs/hfsplus.c: Likewise.
6146 * fs/iso9660.c: Likewise.
6147 * fs/jfs.c: Likewise.
6148 * fs/minix.c: Likewise.
6149 * fs/sfs.c: Likewise.
6150 * fs/ufs.c: Likewise.
6151 * fs/xfs.c: Likewise.
6152 * hello/hello.c: Likewise.
6153 * include/grub/acorn_filecore.h: Likewise.
6154 * include/grub/arg.h: Likewise.
6155 * include/grub/bitmap.h: Likewise.
6156 * include/grub/boot.h: Likewise.
6157 * include/grub/cache.h: Likewise.
6158 * include/grub/device.h: Likewise.
6159 * include/grub/disk.h: Likewise.
6160 * include/grub/dl.h: Likewise.
6161 * include/grub/elfload.h: Likewise.
6162 * include/grub/env.h: Likewise.
6163 * include/grub/err.h: Likewise.
6164 * include/grub/file.h: Likewise.
6165 * include/grub/font.h: Likewise.
6166 * include/grub/fs.h: Likewise.
6167 * include/grub/fshelp.h: Likewise.
6168 * include/grub/gzio.h: Likewise.
6169 * include/grub/hfs.h: Likewise.
6170 * include/grub/kernel.h: Likewise.
6171 * include/grub/loader.h: Likewise.
6172 * include/grub/lvm.h: Likewise.
6173 * include/grub/misc.h: Likewise.
6174 * include/grub/mm.h: Likewise.
6175 * include/grub/net.h: Likewise.
6176 * include/grub/normal.h: Likewise.
6177 * include/grub/parser.h: Likewise.
6178 * include/grub/partition.h: Likewise.
6179 * include/grub/pc_partition.h: Likewise.
6180 * include/grub/raid.h: Likewise.
6181 * include/grub/rescue.h: Likewise.
6182 * include/grub/script.h: Likewise.
6183 * include/grub/setjmp.h: Likewise.
6184 * include/grub/symbol.h: Likewise.
6185 * include/grub/term.h: Likewise.
6186 * include/grub/terminfo.h: Likewise.
6187 * include/grub/tparm.h: Likewise.
6188 * include/grub/types.h: Likewise.
6189 * include/grub/video.h: Likewise.
6190 * include/grub/efi/api.h: Likewise.
6191 * include/grub/efi/chainloader.h: Likewise.
6192 * include/grub/efi/console.h: Likewise.
6193 * include/grub/efi/console_control.h: Likewise.
6194 * include/grub/efi/disk.h: Likewise.
6195 * include/grub/efi/efi.h: Likewise.
6196 * include/grub/efi/pe32.h: Likewise.
6197 * include/grub/efi/time.h: Likewise.
6198 * include/grub/i386/linux.h: Likewise.
6199 * include/grub/i386/setjmp.h: Likewise.
6200 * include/grub/i386/types.h: Likewise.
6201 * include/grub/i386/efi/kernel.h: Likewise.
6202 * include/grub/i386/efi/loader.h: Likewise.
6203 * include/grub/i386/efi/time.h: Likewise.
6204 * include/grub/i386/pc/biosdisk.h: Likewise.
6205 * include/grub/i386/pc/boot.h: Likewise.
6206 * include/grub/i386/pc/chainloader.h: Likewise.
6207 * include/grub/i386/pc/console.h: Likewise.
6208 * include/grub/i386/pc/init.h: Likewise.
6209 * include/grub/i386/pc/kernel.h: Likewise.
6210 * include/grub/i386/pc/loader.h: Likewise.
6211 * include/grub/i386/pc/memory.h: Likewise.
6212 * include/grub/i386/pc/multiboot.h: Likewise.
6213 * include/grub/i386/pc/serial.h: Likewise.
6214 * include/grub/i386/pc/time.h: Likewise.
6215 * include/grub/i386/pc/vbe.h: Likewise.
6216 * include/grub/i386/pc/vbeblit.h: Likewise.
6217 * include/grub/i386/pc/vbefill.h: Likewise.
6218 * include/grub/i386/pc/vbeutil.h: Likewise.
6219 * include/grub/i386/pc/vga.h: Likewise.
6220 * include/grub/ieee1275/ieee1275.h: Likewise.
6221 * include/grub/ieee1275/ofdisk.h: Likewise.
6222 * include/grub/powerpc/libgcc.h: Likewise.
6223 * include/grub/powerpc/setjmp.h: Likewise.
6224 * include/grub/powerpc/types.h: Likewise.
6225 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
6226 * include/grub/powerpc/ieee1275/console.h: Likewise.
6227 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
6228 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
6229 * include/grub/powerpc/ieee1275/loader.h: Likewise.
6230 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
6231 * include/grub/powerpc/ieee1275/time.h: Likewise.
6232 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
6233 * include/grub/sparc64/libgcc.h: Likewise.
6234 * include/grub/sparc64/setjmp.h: Likewise.
6235 * include/grub/sparc64/types.h: Likewise.
6236 * include/grub/sparc64/ieee1275/console.h: Likewise.
6237 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
6238 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
6239 * include/grub/sparc64/ieee1275/time.h: Likewise.
6240 * include/grub/util/biosdisk.h: Likewise.
6241 * include/grub/util/getroot.h: Likewise.
6242 * include/grub/util/lvm.h: Likewise.
6243 * include/grub/util/misc.h: Likewise.
6244 * include/grub/util/raid.h: Likewise.
6245 * include/grub/util/resolve.h: Likewise.
6246 * io/gzio.c: Likewise.
6247 * kern/device.c: Likewise.
6248 * kern/disk.c: Likewise.
6249 * kern/dl.c: Likewise.
6250 * kern/elf.c: Likewise.
6251 * kern/env.c: Likewise.
6252 * kern/err.c: Likewise.
6253 * kern/file.c: Likewise.
6254 * kern/fs.c: Likewise.
6255 * kern/loader.c: Likewise.
6256 * kern/main.c: Likewise.
6257 * kern/misc.c: Likewise.
6258 * kern/mm.c: Likewise.
6259 * kern/parser.c: Likewise.
6260 * kern/partition.c: Likewise.
6261 * kern/rescue.c: Likewise.
6262 * kern/term.c: Likewise.
6263 * kern/efi/efi.c: Likewise.
6264 * kern/efi/init.c: Likewise.
6265 * kern/efi/mm.c: Likewise.
6266 * kern/i386/dl.c: Likewise.
6267 * kern/i386/efi/init.c: Likewise.
6268 * kern/i386/efi/startup.S: Likewise.
6269 * kern/i386/pc/init.c: Likewise.
6270 * kern/i386/pc/lzo1x.S: Likewise.
6271 * kern/i386/pc/startup.S: Likewise.
6272 * kern/ieee1275/ieee1275.c: Likewise.
6273 * kern/powerpc/cache.S: Likewise.
6274 * kern/powerpc/dl.c: Likewise.
6275 * kern/powerpc/ieee1275/cmain.c: Likewise.
6276 * kern/powerpc/ieee1275/crt0.S: Likewise.
6277 * kern/powerpc/ieee1275/init.c: Likewise.
6278 * kern/powerpc/ieee1275/openfw.c: Likewise.
6279 * kern/sparc64/cache.S: Likewise.
6280 * kern/sparc64/dl.c: Likewise.
6281 * kern/sparc64/ieee1275/init.c: Likewise.
6282 * kern/sparc64/ieee1275/openfw.c: Likewise.
6283 * loader/efi/chainloader.c: Likewise.
6284 * loader/efi/chainloader_normal.c: Likewise.
6285 * loader/i386/efi/linux.c: Likewise.
6286 * loader/i386/efi/linux_normal.c: Likewise.
6287 * loader/i386/pc/chainloader.c: Likewise.
6288 * loader/i386/pc/chainloader_normal.c: Likewise.
6289 * loader/i386/pc/linux.c: Likewise.
6290 * loader/i386/pc/linux_normal.c: Likewise.
6291 * loader/i386/pc/multiboot.c: Likewise.
6292 * loader/i386/pc/multiboot_normal.c: Likewise.
6293 * loader/powerpc/ieee1275/linux.c: Likewise.
6294 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
6295 * normal/arg.c: Likewise.
6296 * normal/cmdline.c: Likewise.
6297 * normal/command.c: Likewise.
6298 * normal/completion.c: Likewise.
6299 * normal/execute.c: Likewise.
6300 * normal/function.c: Likewise.
6301 * normal/lexer.c: Likewise.
6302 * normal/main.c: Likewise.
6303 * normal/menu.c: Likewise.
6304 * normal/menu_entry.c: Likewise.
6305 * normal/misc.c: Likewise.
6306 * normal/parser.y: Likewise.
6307 * normal/script.c: Likewise.
6308 * normal/i386/setjmp.S: Likewise.
6309 * normal/powerpc/setjmp.S: Likewise.
6310 * normal/sparc64/setjmp.S: Likewise.
6311 * partmap/acorn.c: Likewise.
6312 * partmap/amiga.c: Likewise.
6313 * partmap/apple.c: Likewise.
6314 * partmap/gpt.c: Likewise.
6315 * partmap/pc.c: Likewise.
6316 * partmap/sun.c: Likewise.
6317 * term/gfxterm.c: Likewise.
6318 * term/terminfo.c: Likewise.
6319 * term/efi/console.c: Likewise.
6320 * term/i386/pc/console.c: Likewise.
6321 * term/i386/pc/serial.c: Likewise.
6322 * term/i386/pc/vesafb.c: Likewise.
6323 * term/i386/pc/vga.c: Likewise.
6324 * term/ieee1275/ofconsole.c: Likewise.
6325 * util/biosdisk.c: Likewise.
6326 * util/console.c: Likewise.
6327 * util/genmoddep.c: Likewise.
6328 * util/getroot.c: Likewise.
6329 * util/grub-emu.c: Likewise.
6330 * util/grub-mkdevicemap.c: Likewise.
6331 * util/grub-probe.c: Likewise.
6332 * util/lvm.c: Likewise.
6333 * util/misc.c: Likewise.
6334 * util/raid.c: Likewise.
6335 * util/resolve.c: Likewise.
6336 * util/update-grub.in: Likewise.
6337 * util/update-grub_lib.in: Likewise.
6338 * util/grub.d/00_header.in: Likewise.
6339 * util/grub.d/10_hurd.in: Likewise.
6340 * util/grub.d/10_linux.in: Likewise.
6341 * util/i386/efi/grub-install.in: Likewise.
6342 * util/i386/efi/grub-mkimage.c: Likewise.
6343 * util/i386/pc/grub-install.in: Likewise.
6344 * util/i386/pc/grub-mkimage.c: Likewise.
6345 * util/i386/pc/grub-mkrescue.in: Likewise.
6346 * util/i386/pc/grub-setup.c: Likewise.
6347 * util/i386/pc/misc.c: Likewise.
6348 * util/powerpc/ieee1275/grub-install.in: Likewise.
6349 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
6350 * util/powerpc/ieee1275/misc.c: Likewise.
6351 * video/bitmap.c: Likewise.
6352 * video/video.c: Likewise.
6353 * video/i386/pc/vbe.c: Likewise.
6354 * video/i386/pc/vbeblit.c: Likewise.
6355 * video/i386/pc/vbefill.c: Likewise.
6356 * video/i386/pc/vbeutil.c: Likewise.
6357 * video/readers/tga.c: Likewise.
6359 2007-07-02 Robert Millan <rmh@aybabtu.com>
6361 * conf/i386-efi.rmk: Replace obsolete reference to
6362 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
6363 with util/getroot.c.
6364 * conf/powerpc-ieee1275.rmk: Likewise.
6365 * conf/sparc64-ieee1275.rmk: Likewise.
6367 * util/grub-emu.c (main): Fix unchecked pointer handling.
6369 2007-07-02 Robert Millan <rmh@aybabtu.com>
6371 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
6372 invocation to fail, in order to support partition-less media.
6374 * util/i386/pc/grub-install.in: Likewise.
6376 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
6377 which fs or partmap modules are needed (akin to its sister scripts).
6379 Also use grub-probe to get rid of unportable /proc/mounts check.
6381 Print the same informational message that the other scripts do, before
6384 2007-06-23 Robert Millan <rmh@aybabtu.com>
6386 * util/update-grub_lib.in (font_path): New function. Determine whether
6387 a font file can be found and, if so, echo the GRUB path to it.
6389 * util/update-grub.in: Handle multiple terminals depending on user
6390 input, platform availability and font file presence. Propagate
6391 variables of our findings to /etc/grub.d/ children.
6393 * util/grub.d/00_header.in: Handle multiple terminals, based on
6394 environment setup by update-grub.
6396 2007-06-23 Robert Millan <rmh@aybabtu.com>
6398 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
6400 2007-06-21 Robert Millan <rmh@aybabtu.com>
6402 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
6403 indicate end of data section in kernel image.
6404 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
6405 GRUB_KERNEL_MACHINE_DATA_END.
6407 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
6409 * kern/i386/efi/startup.S: Likewise.
6411 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
6412 during image generation. Implement --prefix option to override this
6414 * util/i386/efi/grub-mkimage.c: Likewise.
6416 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
6417 code to make path relative to its root into a separate function.
6419 * util/i386/pc/grub-install.in: Use newly provided
6420 make_system_path_relative_to_its_root() to convert ${grubdir}, then
6421 pass the result to grub-install --prefix.
6423 2007-06-13 Robert Millan <rmh@aybabtu.com>
6425 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
6427 * util/grub-emu.c: Use above definitions from misc.h instead of
6429 * util/grub-mkdevicemap.c: Likewise.
6430 * util/i386/pc/grub-setup.c: Likewise.
6431 * util/grub-probe.c: Likewise.
6432 (probe): Abort with grub_util_error() when either
6433 grub_guess_root_device or grub_util_get_grub_dev fails.
6435 2007-06-12 Robert Millan <rmh@aybabtu.com>
6437 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
6439 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
6441 * util/grub-probe.c (probe): Likewise for "drive_name".
6443 2007-06-11 Robert Millan <rmh@aybabtu.com>
6445 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
6446 not just the cdrom one.
6448 2007-06-11 Robert Millan <rmh@aybabtu.com>
6450 * util/i386/pc/grub-mkrescue.in: Add "set -e".
6451 Add --pkglibdir=DIR option to override pkglibdir.
6452 Mention --image-type=TYPE in help output.
6453 Fix --grub-mkimage (it was a no-op).
6454 Abort gracefully when no parameter is given.
6456 2007-06-11 Robert Millan <rmh@aybabtu.com>
6458 * util/i386/pc/grub-mkrescue.in: New file.
6459 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
6460 * Makefile.in: Handle bin_SCRIPTS.
6462 2007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
6464 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
6465 list of video modes.
6467 2007-06-06 Robert Millan <rmh@aybabtu.com>
6469 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
6470 file doesn't exist, or if it is in a filesystem grub can't read.
6472 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
6473 not abort if GRUB_DRIVE could not be defined. Rearrange generated
6474 header comment to fit in 80 columns when the variables are resolved.
6476 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
6477 could be identified by update-grub. Remove redundant check for
6478 unifont.pff existence (since convert_system_path_to_grub_path now
6481 2007-06-04 Robert Millan <rmh@aybabtu.com>
6483 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
6485 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
6487 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
6489 2007-06-04 Robert Millan <rmh@aybabtu.com>
6491 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
6493 * include/grub/partition.h: Declare grub_apple_partition_map_init and
6494 grub_apple_partition_map_fini.
6497 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
6498 to access >2 TiB disks).
6500 Print disk->total_sectors with %llu instead of %lu, since this
6501 variable is always 64-bit (prevents wrong disk size from being displayed
6502 on either >2 TiB disk or big-endian CPU).
6504 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
6505 into a generic case that supports all (sane) partition maps.
6507 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
6510 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
6511 and grub_apple_partition_map_fini() after that.
6513 2007-06-01 Robert Millan <rmh@aybabtu.com>
6515 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
6517 * util/grub.d/00_header.in: Only enable gfxterm when
6518 convert_system_path_to_grub_path() succeeds.
6520 2007-05-20 Robert Millan <rmh@aybabtu.com>
6522 * util/update-grub_lib.in: New file.
6523 * DISTLIST: Add update-grub_lib.in.
6524 * conf/common.rmk: Generate update-grub_lib and install it in
6526 * Makefile.in: Add install routine for $(lib_DATA).
6528 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
6529 function provided by update-grub_lib to support arbitrary paths of
6531 * util/update-grub.in: Use convert_system_path_to_grub_path() to
6532 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
6534 2007-05-19 Robert Millan <rmh@aybabtu.com>
6536 * commands/i386/cpuid.c: New module.
6538 * conf/i386-efi.rmk: Enable cpuid.mod.
6539 * conf/i386-pc.rmk: Likewise.
6541 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
6543 * kern/disk.c (grub_disk_read): Check return value of
6546 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
6548 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
6550 * disk/raid.c (grub_raid_open): Likewise.
6552 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
6554 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
6555 stack instead of on the heap.
6557 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
6558 before doing a read on it.
6560 * configure.ac: Only use -fno-stack-protector for the target
6563 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
6565 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
6566 __attribute_ ((unused)) to mode_type argument.
6568 * util/getroot.c (grub_guess_root_device): Fix #endif.
6570 * kern/misc.c (memcmp): Fix prototype.
6572 * include/grub/partition.h [GRUB_UTIL]
6573 (grub_gpt_partition_map_init): Add prototype.
6574 (grub_gpt_partition_map_fini): Likewise.
6576 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
6579 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
6580 (grub_fat_read_data): Likewise.
6581 (grub_fat_find_dir): Likewise.
6583 * font/manager.c (find_glyph): Make table a const.
6584 (grub_font_get_glyph): Remove bitmap from if statement.
6586 2007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
6588 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
6589 code, first search for device in /dev/mapper, then in /dev.
6590 (grub_util_get_grub_dev): New function.
6591 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
6593 * util/grub-probe.c (probe): Remove check for RAID, call
6594 grub_util_get_grub_dev() instead of
6595 grub_util_biosdisk_get_grub_dev().
6596 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
6597 grub_util_biosdisk_get_grub_dev().
6598 * util/i386/pc/grub-setup.c (main): Likewise.
6600 2007-05-16 Robert Millan <rmh@aybabtu.com>
6602 * DISTLIST: Update for the latest changes.
6603 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
6604 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
6605 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
6606 grub/util/biosdisk.h.
6607 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
6608 grub/util/biosdisk.h.
6610 2007-05-16 Robert Millan <rmh@aybabtu.com>
6612 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
6614 2007-05-16 Robert Millan <rmh@aybabtu.com>
6616 * util/i386/efi/grub-install.in: New.
6617 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
6618 newly added grub-install.
6619 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
6621 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
6622 grub/util/biosdisk.h.
6623 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
6624 grub/util/biosdisk.h.
6626 2007-05-16 Robert Millan <rmh@aybabtu.com>
6628 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
6629 * include/grub/util/biosdisk.h: ... here.
6630 * util/i386/pc/biosdisk.c: Moved to ...
6631 * util/biosdisk.c: ... here.
6632 * util/i386/pc/getroot.c: Moved to ...
6633 * util/getroot.c: ... here.
6634 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
6635 * util/grub-mkdevicemap.c: ... here.
6636 * util/i386/pc/grub-probe.c: Moved to ...
6637 * util/grub-probe.c: ... here.
6639 2007-05-15 Robert Millan <rmh@aybabtu.com>
6641 * util/update-grub.in: Remove duplicated line in grub.cfg header
6644 2007-05-13 Robert Millan <rmh@aybabtu.com>
6646 * util/update-grub.in: Fix a few assumptions about the devices holding
6647 /, /boot and /boot/grub being the same.
6648 * util/grub.d/00_header.in: Likewise.
6649 * util/grub.d/10_hurd.in: Likewise.
6650 * util/grub.d/10_linux.in: Likewise.
6652 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
6653 patterns. Use that to define the `.old' suffix as older than `'.
6655 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
6657 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
6658 the grub.cfg header message.
6660 2007-05-11 Robert Millan <rmh@aybabtu.com>
6662 * util/update-grub.in: Create device.map if it doesn't already exist,
6663 before attempting to run grub-probe.
6664 Check for grub-probe and grub-mkdevicemap with the same code
6665 grub-install is using.
6668 2007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
6670 * Makefile.in: Add the datarootdir autoconf variable.
6672 2007-05-09 Robert Millan <rmh@aybabtu.com>
6674 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
6675 fail gracefully if dev->disk->partition == NULL.
6677 2007-05-07 Robert Millan <rmh@aybabtu.com>
6679 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
6680 determine partition map module.
6681 * util/i386/pc/grub-install.in: Use this feature to decide which
6682 partition module to load, instead of hardcoding pc and gpt.
6684 2007-05-07 Robert Millan <rmh@aybabtu.com>
6686 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
6687 source directory differs from build directory.
6689 2007-05-05 Robert Millan <rmh@aybabtu.com>
6691 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
6694 2007-05-05 Robert Millan <rmh@aybabtu.com>
6696 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
6698 2007-05-05 Robert Millan <rmh@aybabtu.com>
6700 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
6701 command-line arguments via ${GRUB_CMDLINE_LINUX}.
6703 2007-05-05 Robert Millan <rmh@aybabtu.com>
6705 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
6706 (grub_probe_SOURCES): Likewise.
6707 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
6708 GPT and initialize dos_part and bsd_part accordingly.
6709 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
6711 (main): Activate gpt module for use during partition identification,
6712 and deactivate it afterwards.
6713 * util/i386/pc/grub-install.in: Add gpt module to core.img.
6714 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
6715 partition identification, and deactivate it afterwards.
6717 2007-05-05 Robert Millan <rmh@aybabtu.com>
6719 * term/i386/pc/console.c (grub_console_fini): Call
6720 grub_term_set_current() before grub_term_unregister().
6722 2007-05-04 Robert Millan <rmh@aybabtu.com>
6724 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
6725 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
6726 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
6727 and update-grub_DATA.
6728 * conf/common.rmk: Build and install update-grub components.
6729 * conf/common.mk: Regenerate.
6730 * util/update-grub.in: New. Core of update-grub.
6731 * util/grub.d/00_header.in: New. Generates grub.cfg header.
6732 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
6733 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
6734 * util/grub.d/README: New. Document grub.d directory layout.
6736 2007-05-01 Robert Millan <rmh@aybabtu.com>
6738 * util/grub-emu.c: Move initialization functions
6739 grub_util_biosdisk_init() and grub_init_all() before
6740 grub_util_biosdisk_get_grub_dev(), which relies on them.
6742 2007-04-19 Robert Millan <rmh@aybabtu.com>
6744 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
6747 2007-04-18 Jerone Young <jerone@gmail.com>
6749 * kernel/elf.c: Add missing parenthesis for conditional statement
6752 2007-04-10 Jerone Young <jerone@gmail.com>
6754 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
6755 continue on and look for device node with real device name.
6757 2007-04-10 Jerone Young <jerone@gmail.com>
6759 * configure.ac: Add argument for autoconf to use transformation
6761 * Makefile.in: Add autoconf package transformation code.
6762 * util/i386/pc/grub-install.in: Likewise.
6763 * util/powerpc/ieee1275/grub-install.in: Likewise.
6765 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
6767 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
6768 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
6769 (EXT2_REVISION): Likewise.
6770 (EXT2_INODE_SIZE): Likewise.
6771 (struct grub_ext2_block_group): Added a missing member
6773 (grub_ext2_read_inode): Divide by the inode size in a superblock
6774 instead of 128 to obtain INODES_PER_BLOCK.
6775 Use the macro EXT2_INODE_SIZE instead of directly using
6778 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
6780 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
6781 superblock instead of the structure size to compute an
6782 offset. This fixes the problem that GRUB could not read a
6783 filesystem when inode size is different from 128-byte.
6785 2007-03-05 Marco Gerards <marco@gnu.org>
6787 * normal/main.c (read_config_file): When "menu" is not set, create
6790 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
6792 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
6793 (HEAP_LIMIT): New macro.
6794 (grub_claim_heap): Claim memory up to `heaplimit'.
6796 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
6798 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
6799 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
6801 (grub_arch_modules_addr): Return address after `_end'.
6802 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
6803 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
6804 (add_segments): Calculate `_end' from phdr size and location.
6805 (ALIGN_UP): Moved to ...
6806 * include/grub/misc.h: here.
6807 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
6809 (GRUB_IEEE1275_MODULE_BASE): Removed.
6811 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
6813 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
6816 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
6818 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
6820 (grub_elf64_load_hook_t): Likewise.
6821 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
6824 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
6826 * kern/mm.c: Update copyright.
6827 (grub_mm_debug): Correct syntax error.
6828 (grub_mm_dump_free): New function.
6829 (grub_debug_free): Call `grub_free'.
6830 * include/grub/mm.h: Update copyright.
6831 (grub_mm_dump_free): Add declaration.
6833 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
6835 * include/grub/ieee1275/ieee1275.h: Update copyright.
6836 * kern/powerpc/ieee1275/init.c: Likewise.
6837 * kern/powerpc/ieee1275/openfw.c: Likewise.
6839 * loader/powerpc/ieee1275/linux.c: Likewise.
6840 * include/grub/elfload.h: Likewise.
6841 * kern/elf.c: Likewise.
6842 (grub_elf32_load): Pass `base' and `size' parameters. Update all
6844 (grub_elf64_load): Likewise.
6845 (grub_elf32_load_segment): Move to a nested function.
6846 (grub_elf64_load_segment): Likewise.
6848 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
6850 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
6852 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
6853 (grub_heap_len): Likewise.
6854 (HEAP_SIZE): New macro.
6855 (grub_claim_heap): New function.
6856 (grub_machine_init): Don't claim heap directly. Call
6858 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
6859 (grub_available_iterate): New function.
6861 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
6863 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
6864 * configure.ac: Use it for testing the HOST and TARGET compilers.
6866 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
6868 * Makefile.in (enable_grub_emu): New variable.
6869 * configure.ac (--enable-grub-emu): New option.
6870 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
6871 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
6872 * conf/i386-pc.rmk: Likewise.
6873 * conf/powerpc-ieee1275.rmk: Likewise.
6874 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
6876 2006-12-12 Marco Gerards <marco@gnu.org>
6878 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
6880 * kern/env.c (grub_env_unset): Don't free the member `value' when
6881 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
6884 * normal/main.c (current_menu): Removed.
6885 (free_menu): Unset the `menu' environment variable.
6886 (grub_normal_menu_addentry): Make use of the environment variable
6887 `menu', instead of using the global `current_menu'. Allocate
6888 memory for the sourcecode of this entry.
6889 (read_config_file): New argument `nested', changed all callers.
6890 Only in the case of a new context, initialize a new menu. Set the
6891 `menu' environment variable.
6892 (grub_normal_execute): Don't set and unset the environment
6893 variable `menu' here anymore. Only free the menu when leaving the
6896 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
6899 2006-12-11 Marco Gerards <marco@gnu.org>
6901 * normal/menu_entry.c (run): Fix off by one bug so the last line
6902 is executed. Move the loader check to outside the loop.
6904 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
6906 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
6908 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
6910 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
6911 the number of sectors. Reported by Andrey Shuvikov
6912 <mr_hyro@yahoo.com>.
6914 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
6916 * kern/disk.c (grub_disk_read): When there is a read error, always
6917 try to read only the necessary data.
6919 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
6921 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
6923 [GRUB_UTIL] (grub_raid_fini): Likewise.
6924 [GRUB_UTIL] (grub_lvm_init): Likewise.
6925 [GRUB_UTIL] (grub_lvm_fini): Likewise.
6926 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
6927 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
6928 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
6929 and grub_raid_fini().
6931 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
6933 * include/grub/types.h (__unused): Rename to UNUSED.
6934 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
6935 (grub_elf64_size): Likewise.
6937 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
6939 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
6940 grub_error_push and grub_error_pop in the error-handling path.
6941 (grub_elf32_load_segment): Only call grub_file_read with non-zero
6944 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
6946 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
6947 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
6948 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6949 (kernel_elf_SOURCES): Likewise.
6950 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
6951 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
6952 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
6953 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
6954 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
6955 (elf_mod_SOURCES): New variable.
6956 (elf_mod_CFLAGS): Likewise.
6957 (elf_mod_LDFLAGS): Likewise.
6958 * include/grub/types.h (__unused): New macro.
6959 * include/grub/elfload.h: New file.
6960 * kern/elf.c: Likewise.
6961 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
6962 (ELF32_LOADMASK): New macro.
6963 (ELF64_LOADMASK): Likewise.
6965 (grub_linux_load32): New function.
6966 (grub_linux_load64): Likewise.
6967 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
6968 Use grub_elf_t instead of grub_file_t.
6970 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
6972 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
6973 `catch_result' to struct set_color_args.
6975 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
6977 * normal/menu.c: Include grub/script.h.
6978 * normal/menu_entry.c: Likewise.
6979 * include/grub/normal.h: Do not include grub/script.h.
6981 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
6983 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
6985 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
6987 * kern/disk.c (grub_disk_open): Print debug messages when opening a
6989 (grub_disk_close): Print debug messages when closing a disk.
6990 (grub_disk_read): Print debug messages when disk read fails.
6991 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
6993 * kern/partition.c: Include misc.h.
6994 (grub_partition_iterate): Print debug messages when detecting
6997 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
6999 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
7001 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
7003 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
7005 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
7006 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
7008 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
7010 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
7011 instead of sizeof(lv). Patch by Michael Guntsche.
7013 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
7015 * disk/lvm.c: Rename VGS to VG_LIST.
7016 (grub_lvm_iterate): Change VGS->LV to VG-LV.
7017 (grub_lvm_open): Likewise.
7018 Thanks to Michael Guntsche for finding this bug.
7020 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
7022 * configure.ac (AC_INIT): Bumped to 1.95.
7024 2006-10-14 Robert Millan <rmh@aybabtu.com>
7026 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
7027 with "/dev/.static/dev/md".
7029 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
7031 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
7032 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
7033 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
7034 DRIVE_NAME are always freed.
7036 * util/i386/pc/biosdisk.c (make_device_name): Add one into
7037 DOS_PART, as a DOS partition is counted from one instead of zero
7038 now. Reported by Robert Millan.
7040 2006-10-14 Robert Millan <rmh@aybabtu.com>
7042 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
7043 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
7044 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
7045 string returned by grub_guess_root_device.
7046 * util/i386/pc/grub-setup.c: Likewise.
7047 * util/i386/pc/grub-probefs.c: Likewise.
7049 * util/i386/pc/grub-probefs.c: Rename to ...
7050 * util/i386/pc/grub-probe.c: ... this.
7051 * DISTLIST: Remove grub-probefs, add grub-probe.
7052 * conf/i386-efi.rmk: Likewise.
7053 * conf/i386-pc.rmk: Likewise.
7054 * util/i386/pc/grub-install.in: Likewise.
7056 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
7057 choose which information we want to print.
7059 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
7061 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
7062 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
7063 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
7064 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
7065 video/readers/tga.c and video/i386/pc/vbeutil.c.
7067 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
7069 Added support for RAID and LVM.
7071 * disk/lvm.c: New file.
7072 * disk/raid.c: Likewise.
7073 * include/grub/lvm.h: Likewise.
7074 * include/grub/raid.h: Likewise.
7075 * include/grub/util/lvm.h: Likewise.
7076 * include/grub/util/raid.h: Likewise.
7077 * util/lvm.c: Likewise.
7078 * util/raid.c: Likewise.
7080 * include/grub/disk.h (grub_disk_dev_id): Add
7081 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
7082 (grub_disk_get_size): New prototype.
7083 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
7084 returns a partition.
7085 (grub_disk_get_size): New function.
7087 * kern/i386/pc/init.c (make_install_device): Copy the prefix
7088 verbatim if grub_install_dos_part is -2.
7090 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
7093 * util/i386/pc/grub-setup.c (setup): New argument
7094 MUST_EMBED. Force embedding of GRUB when the argument is
7095 true. Close FILE before returning.
7096 (main): Add support for RAID and LVM.
7098 * conf/common.rmk: Add RAID and LVM modules.
7099 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
7101 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
7103 * kern/misc.c (grub_strstr): New function.
7104 * include/grub/misc.h (grub_strstr): New prototype.
7106 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
7108 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
7110 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
7112 * kern/misc.c (grub_strtoull): Guess the base only if not
7115 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
7117 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
7120 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
7122 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
7124 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
7125 Remove `flags' argument. All callers changed.
7126 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
7127 (IEEE1275_IHANDLE_INVALID): New variable.
7128 (IEEE1275_CELL_INVALID): New variable.
7129 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
7130 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
7131 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
7132 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
7133 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
7134 codes from Open Firmware. All callers updated.
7135 (grub_ieee1275_next_property): Directly return Open Firmware return
7137 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
7138 Standardize error checking from `grub_ieee1275_get_property'.
7139 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
7140 `devalias' to `aliases'. Correct comments. Consolidate error paths.
7142 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
7144 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
7145 `instance_to_package_args' to `instance_to_path_args'.
7147 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
7148 `grub_ieee1275_chosen'.
7150 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
7151 `grub_ieee1275_interpret'.
7153 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
7155 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
7157 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
7159 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
7160 (__cmpdi): Likewise.
7162 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
7163 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
7166 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
7168 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
7169 to type `grub_ssize_t'.
7170 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
7172 2006-09-22 Marco Gerards <marco@gnu.org>
7174 * normal/script.c (grub_script_create_cmdmenu): Skip leading
7177 2006-09-22 Marco Gerards <marco@gnu.org>
7179 * commands/echo.c: New file.
7181 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
7183 * conf/common.rmk (echo_mod_SOURCES): New variable.
7184 (echo_mod_CFLAGS): Likewise.
7185 (echo_mod_LDFLAGS): Likewise.
7187 2006-09-22 Marco Gerards <marco@gnu.org>
7189 * normal/main.c (get_line): Malloc memory instead of using
7190 preallocated memory. Removed the arguments `cmdline' and
7191 `max_len'. Updated all callers.
7193 2006-09-22 Marco Gerards <marco@gnu.org>
7195 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
7196 (normal_mod_DEPENDENCIES): Likewise.
7198 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
7199 (normal_mod_DEPENDENCIES): Likewise.
7201 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
7203 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
7205 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
7207 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
7208 (normal_mod_DEPENDENCIES): Likewise.
7209 * conf/i386-pc.mk: Regenerate.
7210 * conf/i386-efi.mk: Likewise
7211 * conf/common.mk: Likewise.
7212 * conf/powerpc-ieee1275.mk: Likewise.
7213 * conf/sparc64-ieee1275.mk: Likewise.
7215 2006-09-22 Robert Millan <rmh@aybabtu.com>
7217 Sync with i386 version.
7218 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
7219 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
7221 2006-09-21 Robert Millan <rmh@aybabtu.com>
7223 Import from GRUB Legacy (lib/device.c):
7224 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
7225 (init_device_map) [__linux__]: Add support for I2O devices.
7227 2006-09-14 Marco Gerards <marco@gnu.org>
7229 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
7232 2006-09-14 Robert Millan <rmh@aybabtu.com>
7234 * util/i386/pc/grub-install.in: Skip menu.lst when removing
7237 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
7239 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
7240 before adding it to device.map.
7242 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
7244 * genmk.rb: Let GCC generate dependencies the first time it
7245 compiles a file; using the -MD option.
7246 * conf/common.mk: Regenerate.
7247 * conf/i386-pc.mk: Likewise.
7248 * conf/i386-efi.mk: Likewise.
7249 * conf/powerpc-ieee1275.mk: Likewise.
7250 * conf/sparc64-ieee1275.mk: Likewise.
7252 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
7254 Move the prototypes of grub_setjmp and grub_longjmp to
7255 cpu/setjmp.h, so that each architecture may specify different
7258 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
7259 (grub_longjmp): Likewise.
7260 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
7261 (grub_longjmp): Likewise.
7262 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
7263 (grub_longjmp): Likewise.
7265 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
7266 [!GRUB_UTIL] (grub_longjmp): Removed.
7268 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
7270 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
7271 "color!" method does not return any value.
7273 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
7275 * include/grub/bitmap.h: New file.
7277 * include/grub/i386/pc/vbeutil.h: Likewise.
7279 * video/bitmap.c: Likewise.
7281 * video/readers/tga.c: Likewise.
7283 * video/i386/pc/vbeutil.c: Likewise.
7285 * commands/videotest.c: Code cleanup and updated to reflect to new
7288 * term/gfxterm.c: Likewise.
7290 * video/video.c: Likewise.
7292 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
7293 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
7294 (bitmap_mod_SOURCES): New entry.
7295 (bitmap_mod_CFLAGS): Likewise.
7296 (bitmap_mod_LDFLAGS): Likewise.
7297 (tga_mod_SOURCES): Likewise.
7298 (tga_mod_CFLAGS): Likewise.
7299 (tga_mod_LDFLAGS): Likewise.
7301 * include/grub/video.h (grub_video_blit_operators): New enum type.
7302 (grub_video_render_target): Changed as forward declaration and moved
7303 actual definition to be video driver specific.
7304 (grub_video_adapter.blit_bitmap): Added blitting operator.
7305 (grub_video_adapter.blit_render_target): Likewise.
7306 (grub_video_blit_bitmap): Likewise.
7307 (grub_video_blit_render_target): Likewise.
7309 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
7310 driver specific render target definition.
7311 (grub_video_vbe_map_rgba): Added driver internal helper.
7312 (grub_video_vbe_unmap_color): Updated to use
7313 grub_video_i386_vbeblit_info.
7314 (grub_video_vbe_get_video_ptr): Likewise.
7316 * include/grub/i386/pc/vbeblit.h
7317 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
7318 grub_video_i386_vbeblit_info.
7319 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
7320 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
7321 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
7322 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
7323 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
7324 (grub_video_i386_vbeblit_index_index): Likewise.
7325 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
7326 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
7327 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
7328 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
7330 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
7333 * video/i386/pc/vbeblit.c: Updated to reflect changes on
7334 include/grub/i386/pc/vbeblit.h.
7336 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
7337 Updated to use grub_video_i386_vbeblit_info.
7338 (grub_video_i386_vbefill_R8G8B8): Likewise.
7339 (grub_video_i386_vbefill_index): Likewise.
7340 (grub_video_i386_vbefill): Added generic filler.
7342 * video/i386/pc/vbefill.c: Updated to reflect changes on
7343 include/grub/i386/pc/vbefill.h.
7345 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
7346 grub_video_i386_vbeblit_info.
7347 (grub_video_vbe_unmap_color): Likewise.
7348 (grub_video_vbe_blit_glyph): Likewise.
7349 (grub_video_vbe_scroll): Likewise.
7350 (grub_video_vbe_draw_pixel): Removed function.
7351 (grub_video_vbe_get_pixel): Likewise.
7352 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
7353 updated code to use it.
7354 (common_blitter): Added common blitter for render target and bitmap.
7355 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
7356 (grub_video_vbe_blit_render_target): Likewise.
7358 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
7360 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
7361 is in text mode if there is no console control protocol instance
7364 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
7366 * include/grub/video.h: Code cleanup.
7368 * include/grub/i386/pc/vbe.h: Likewise.
7370 * video/i386/pc/vbe.c: Likewise.
7372 * video/i386/pc/vbeblit.c: Likewise.
7374 * video/i386/pc/vbefill.c: Likewise.
7376 * video/video.c: Likewise. Also added more comments.
7378 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
7380 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
7381 (struct grub_biosdisk_dap): Likewise.
7383 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
7384 linkage settings for all functions.
7386 2006-07-12 Marco Gerards <marco@gnu.org>
7388 * configure.ac (--enable-mm-debug): Fix typo.
7390 * genkernsyms.sh.in: Use proper quoting for `CC'.
7392 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
7394 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
7395 (normal_mod_ASFLAGS): Remove "-m32".
7397 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
7399 * util/misc.c: Include config.h.
7400 [!HAVE_MEMALIGN]: Do not include malloc.h.
7401 (grub_memalign): Use posix_memalign, if present. Then, use
7402 memalign, if present. Otherwise, emit an error.
7404 * util/grub-emu.c: Do not include malloc.h.
7406 * include/grub/util/misc.h: Include unistd.h. This is required for
7407 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
7408 D. Eades III <hde@foobar-qux.org>.
7410 * configure.ac (AC_GNU_SOURCE): Added.
7411 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
7414 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
7416 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
7417 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
7419 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
7421 * include/grub/types.h (grub_host_addr_t): Rename to
7423 (grub_host_off_t): Rename to grub_target_off_t.
7424 (grub_host_size_t): Rename to grub_target_size_t.
7425 (grub_host_ssize_t): Rename to grub_target_ssize_t.
7426 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
7428 * include/grub/kernel.h (struct grub_module_header): Change type
7429 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
7430 (grub_module_info): Likewise.
7432 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
7434 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
7435 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
7436 Velazquez <jesus.velazquez@gmail.com>.
7438 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
7440 Count partitions from 1 instead of 0 in the string representation
7441 of partitions. Still use 0-based internally.
7443 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
7444 (sun_partition_map_iterate): Use grub_partition_t instead of
7445 struct grub_partition *. Cast DESC->START_CYLINDER to
7446 grub_uint64_t after converting the endian.
7447 (sun_partition_map_probe): Subtract 1 for PARTNUM.
7448 (sun_partition_map_get_name): Add 1 to P->INDEX.
7450 * partmap/pc.c (grub_partition_parse): Subtract 1 for
7452 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
7454 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
7455 zero instead of one.
7456 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
7457 (gpt_partition_map_get_name): Add 1 into P->INDEX.
7459 * partmap/apple.c (apple_partition_map_iterate): Change the type
7461 (apple_partition_map_probe): Subtract 1 for PARTNUM.
7462 (apple_partition_map_get_name): Add 1 into P->INDEX.
7464 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
7466 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
7467 calculate the offset of a partition.
7468 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
7469 (amiga_partition_map_get_name): Add 1 into P->INDEX.
7471 * partmap/acorn.c (acorn_partition_map_find): Change the type of
7472 SECTOR to grub_disk_addr_t.
7473 (acorn_partition_map_iterate): Likewise.
7474 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
7475 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
7477 (acorn_partition_map_get_name): Add 1 into P->INDEX.
7479 * kern/i386/pc/init.c (make_install_device): Add 1 into
7480 GRUB_INSTALL_DOS_PART.
7482 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
7485 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
7487 Clean up the code to support 64-bit addressing in disks and
7488 files. This change is not enough for filesystems yet.
7490 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
7491 type of "start" to grub_uint64_t.
7492 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
7493 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
7494 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
7497 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
7498 to grub_disk_addr_t.
7500 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
7503 * partmap/pc.c (pc_partition_map_iterate): Likewise.
7505 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
7508 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
7510 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
7512 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
7514 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
7515 to grub_off_t, to detect an error from grub_file_seek.
7516 (grub_multiboot_load_elf32): Likewise.
7518 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
7519 maximum unsigned long value when an overflow is detected.
7520 (grub_strtoull): New function.
7521 (grub_divmod64): Likewise.
7522 (grub_lltoa): use grub_divmod64.
7524 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
7526 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
7527 the pointer to next character. Use grub_strtoull instead of
7529 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
7530 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
7533 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
7534 return value is signed.
7535 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
7536 test if OFFSET is less than zero, as OFFSET is unsigned now.
7538 * kern/disk.c (struct grub_disk_cache): Change the type of
7539 "sector" to grub_disk_addr_t.
7540 (grub_disk_cache_get_index): Change the type of SECTOR to
7541 grub_disk_addr_t. Calculate the hash with SECTOR casted to
7542 unsigned after shifting.
7543 (grub_disk_cache_invalidate): Change the type of SECTOR to
7545 (grub_disk_cache_unlock): Likewise.
7546 (grub_disk_cache_store): Likewise.
7547 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
7548 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
7549 grub_disk_addr_t and grub_uint64_t, respectively.
7550 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
7551 body, as the value of OFFSET is tweaked by
7552 grub_disk_check_range. Change the types of START_SECTOR, LEN and
7553 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
7555 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
7556 body, as the value of OFFSET is tweaked by
7557 grub_disk_check_range. Change the types of LEN and N to
7560 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
7561 and "saved_offset" to grub_off_t.
7562 (test_header): Cast BUF to char *.
7563 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
7565 (grub_gzio_read): Change the types of OFFSET and SIZE to
7566 grub_off_t and grub_size_t, respectively.
7568 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
7570 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
7571 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
7572 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
7573 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
7574 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
7576 * include/grub/types.h (grub_off_t): Unconditionally set to
7578 (grub_disk_addr_t): Changed to grub_uint64_t.
7580 * include/grub/partition.h (struct grub_partition): Change the
7581 types of "start", "len" and "offset" to grub_disk_addr_t,
7582 grub_uint64_t and grub_disk_addr_t, respectively.
7583 (grub_partition_get_start): Return grub_disk_addr_t.
7584 (grub_partition_get_len): Return grub_uint64_t.
7586 * include/grub/misc.h (grub_strtoull): New prototype.
7587 (grub_divmod64): Likewise.
7589 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
7590 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
7591 grub_off_t, respectively.
7592 All callers and references changed.
7594 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
7595 grub_size_t in "read".
7596 All callers and references changed.
7598 * include/grub/file.h (struct grub_file): Change the types of
7599 "offset" and "size" to grub_off_t and grub_off_t,
7600 respectively. Change the type of SECTOR to grub_disk_addr_t in
7602 (grub_file_read): Change the type of LEN to grub_size_t.
7603 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
7605 (grub_file_size): Return grub_off_t.
7606 (grub_file_tell): Likewise.
7607 All callers and references changed.
7609 * include/grub/disk.h (struct grub_disk_dev): Change the types of
7610 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
7612 (struct grub_disk): Change the type of "total_sectors" to
7613 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
7615 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
7616 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
7617 (grub_disk_write): Likewise.
7618 All callers and references changed.
7620 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
7621 char * for grub_strncmp to silence gcc.
7622 (grub_iso9660_mount): Likewise.
7623 (grub_iso9660_mount): Likewise.
7624 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
7626 (grub_iso9660_iterate_dir): Likewise.
7627 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
7629 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
7630 LEN to grub_disk_addr_t and grub_size_t, respectively.
7632 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
7634 * fs/jfs.c (grub_jfs_read_file): Likewise.
7636 * fs/minix.c (grub_jfs_read_file): Likewise.
7638 * fs/sfs.c (grub_jfs_read_file): Likewise.
7640 * fs/ufs.c (grub_jfs_read_file): Likewise.
7642 * fs/xfs.c (grub_jfs_read_file): Likewise.
7644 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
7645 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
7648 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
7649 BLKNR to -1 instead of returning GRUB_ERRNO.
7650 (grub_ext2_read_file): Change the types of SECTOR and
7651 LEN to grub_disk_addr_t and grub_size_t, respectively.
7653 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
7654 LEN to grub_disk_addr_t and grub_size_t, respectively.
7656 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
7659 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
7660 string. Do not cast SECTOR explicitly.
7662 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
7663 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
7664 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
7665 grub_disk_addr_t and grub_size_t, respectively. If the sector is
7666 over 2TB and LBA mode is not supported, raise an error.
7667 (get_safe_sectors): New function.
7668 (grub_biosdisk_read): Use get_safe_sectors.
7669 (grub_biosdisk_write): Likewise.
7671 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
7672 (grub_efidisk_write): Likewise.
7674 * disk/loopback.c (delete_loopback): Cosmetic changes.
7675 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
7677 (grub_loopback_open): Likewise.
7678 (grub_loopback_read): Likewise. Also, change the type of POS to
7679 grub_off_t, and fix the usage of grub_memset.
7681 * commands/i386/pc/play.c: Include grub/machine/time.h.
7683 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
7686 * commands/configfile.c: Include grub/env.h.
7688 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
7689 GRUB_ERRNO directly instead. Change the type of POS to
7690 grub_off_t. Follow the coding standard.
7692 * commands/blocklist.c: Include grub/partition.h.
7693 (grub_cmd_blocklist): Return an error if the underlying device is
7694 not a disk. Take the starting sector of a partition into account,
7695 if a partition is used.
7697 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
7699 (lba_mode): Support 64-bit addresses.
7700 (chs_mode): Likewise.
7701 (copy_buffer): Adapted to the new offsets of a length field and a
7703 (blocklist_default_start): Allocate 64-bit space.
7705 * boot/i386/pc/boot.S (force_lba): Removed.
7706 (boot_drive): Moved to under KERNEL_SECTOR.
7707 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
7709 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
7711 (lba_mode): Refactored to support a 64-bit address. More size
7713 (setup_sectors): Likewise.
7715 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
7717 * DISTLIST: Added include/grub/i386/linux.h. Removed
7718 include/grub/i386/pc/linux.h
7720 * configure.ac (AC_INIT): Bumped to 1.94.
7722 * config.guess: Updated from gnulib.
7723 * config.sub: Likewise.
7724 * install-sh: Likewise.
7725 * mkinstalldirs: Likewise.
7727 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
7729 * conf/common.rmk (grub_modules_init.lst): Depended on
7730 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
7733 * genmk.rb (PModule::rule): Reverted the previous change.
7735 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
7737 * conf/common.rmk (grub_modules_init.lst): Depends on
7738 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
7739 that the target does not exist before producing.
7740 (grub_modules_init.h): Remove the target before generating.
7741 (grub_emu_init.c): Likewise.
7743 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
7745 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
7747 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
7748 for the target-specific tests. Make sure that we also have the
7749 up-to-date target variables for those tests.
7751 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
7753 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
7754 (PModule::rule): Likewise.
7756 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
7758 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
7759 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
7760 target-specific flags should be prefixed.
7761 (PModule::rule): Likewise.
7763 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
7765 * configure.ac (CMP): Check if cmp is available explicitly.
7767 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
7769 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
7770 (target_cpu): New variable.
7771 (pkglibdir): Use target_cpu instead of host_cpu.
7773 * util/i386/pc/grub-install.in (host_cpu): Removed.
7774 (target_cpu): New variable.
7775 (pkglibdir): Use target_cpu instead of host_cpu.
7777 * util/genmoddep.c: Removed.
7779 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
7780 instead of GRUB_HOST_SIZEOF_VOID_P.
7781 * kern/dl.c: Likewise.
7783 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
7785 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
7786 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
7787 (GRUB_TARGET_SIZEOF_LONG): ... this.
7788 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
7789 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
7790 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
7792 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
7793 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
7794 (GRUB_TARGET_SIZEOF_LONG): ... this.
7795 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
7796 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
7797 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
7799 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
7800 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
7801 (GRUB_TARGET_SIZEOF_LONG): ... this.
7802 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
7803 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
7805 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
7806 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
7807 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
7808 instead of GRUB_HOST_SIZEOF_LONG.
7809 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
7810 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
7811 GRUB_CPU_WORDS_BIGENDIAN.
7812 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
7813 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
7816 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
7817 (genmoddep_SOURCES): Likewise.
7818 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
7819 (genmoddep_SOURCES): Likewise.
7820 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
7821 (genmoddep_SOURCES): Likewise.
7822 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
7824 (genmoddep_SOURCES): Likewise.
7826 * genmoddep.awk: New file.
7828 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
7829 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
7830 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
7831 (PModule::rule): Likewise.
7832 (Program::rule): Likewise.
7833 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
7834 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
7837 * configure.ac: Rewritten intensively to use host and target
7838 instead of build and host, respectively.
7840 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
7841 (host_cpu): Removed.
7842 (target_cpu): New variable.
7843 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
7844 (BUILD_CC): Removed.
7845 (BUILD_CFLAGS): Likewise.
7846 (BUILD_CPPFLAGS): Likewise.
7847 (TARGET_CC): New variable.
7848 (TARGET_CFLAGS): Likewise.
7849 (TARGET_CPPFLAGS): Likewise.
7850 (TARGET_LDFLAGS): Likewise.
7852 (include): Use target_cpu instead of host_cpu.
7853 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
7855 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
7857 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
7859 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
7860 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
7861 field 'false' to 'exec_on_false'.
7862 (grub_script_create_cmdif): Renamed argument names to reflect above
7865 * normal/execute.c (grub_script_execute_cmdif): Likewise.
7867 * normal/script.c (grub_script_create_cmdif): Likewise.
7869 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
7871 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
7873 (grub_hfsplus_btree_recptr): Likewise.
7874 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
7875 FILEBLOCK both to pass a block number and store next block
7877 (grub_hfsplus_read_block): Rewritten heavily to support an extent
7878 overflow file correctly. Specify errors appropriately, because
7879 fshelp expects that GRUB_ERRNO is set when fails. Reuse
7880 grub_hfsplus_btree_recptr to get the pointer to a found key.
7881 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
7884 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
7886 (_linux_mod_SOURCES): New variable.
7887 (_linux_mod_CFLAGS): Likewise.
7888 (_linux_mod_LDFLAGS): Likewise.
7889 (linux_mod_SOURCES): Likewise.
7890 (linux_mod_CFLAGS): Likewise.
7891 (linux_mod_LDFLAGS): Likewise.
7893 * DISTLIST: Added loader/i386/efi/linux.c,
7894 loader/i386/efi/linux_normal.c and
7895 include/grub/i386/efi/loader.h.
7897 * loader/i386/efi/linux.c: New file.
7898 * loader/i386/efi/linux_normal.c: Likewise.
7899 * include/grub/i386/efi/loader.h: Likewise.
7901 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
7903 * commands/blocklist.c: New file.
7905 * DISTLIST: Added commands/blocklist.c.
7907 * term/efi/console.c (grub_console_highlight_color): Use a lighter
7908 color for the background, and a darker color for the foreground.
7909 (grub_console_checkkey): Return READ_KEY.
7910 (grub_console_cls): Set the background to
7911 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
7913 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
7915 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
7916 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
7918 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
7921 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
7922 BG. The spec is wrong again.
7924 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
7926 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
7928 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
7929 commands/blocklist.c.
7930 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7932 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
7933 (blocklist_mod_SOURCES): New variable.
7934 (blocklist_mod_CFLAGS): Likewise.
7935 (blocklist_mod_LDFLAGS): Likewise.
7937 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
7939 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
7941 (lba_mode): Use %eax more intensively to reduce the code size.
7943 2006-05-20 Marco Gerards <marco@gnu.org>
7945 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
7947 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
7949 (script): Accept leading newlines.
7950 (newlines): New rule to describe 0 or more newlines.
7951 (commands): Accept `command' with trailing newline. Fixed the
7952 order in which arguments were passed to `grub_script_add_cmd'.
7953 Accept commands separated by newlines.
7954 (function): Changed to accept newlines.
7955 (menuentry) Rewritten.
7957 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
7958 front of the list, instead of to the end.
7960 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
7962 * util/i386/pc/grub-install.in (bindir): New variable.
7963 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
7964 Shaver <lbgwjl@gmail.com>.
7966 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
7968 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
7969 grub/machine/linux.h
7970 * loader/i386/pc/linux.c: Likewise.
7972 * include/grub/i386/pc/linux.h: Moved to ...
7973 * include/grub/i386/linux.h: ... here.
7975 * include/grub/i386/linux.h (struct linux_kernel_params): New
7978 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
7980 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
7982 (grub_video_vbe_blit_glyph): Likewise.
7983 (grub_video_vbe_blit_bitmap): Likewise.
7984 (grub_video_vbe_blit_render_target): Likewise.
7986 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
7988 * configure.ac (--with-platform): Properly quote the square
7991 2006-05-08 Marco Gerards <marco@gnu.org>
7993 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
7995 (kernel_elf_HEADERS): ...to this. Updated all users.
7996 (grubof_symlist.c): Renamed from this...
7997 (kernel_elf_symlist.c): ...to this. Updated all users.
7998 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
7999 (grubof_SOURCES): Renamed from this...
8000 (kernel_elf_SOURCES): ...to this.
8001 (grubof_HEADERS): Renamed from this...
8002 (kernel_elf_HEADERS): ...to this.
8003 (grubof_CFLAGS): Renamed from this...
8004 (kernel_elf_CFLAGS): ...to this.
8005 (grubof_ASFLAGS): Renamed from this...
8006 (kernel_elf_ASFLAGS): ...to this.
8007 (grubof_LDFLAGS): Renamed from this...
8008 (kernel_elf_LDFLAGS): ...to this.
8010 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
8012 (kernel_elf_HEADERS): ...to this. Updated all users.
8013 (grubof_symlist.c): Renamed from this...
8014 (kernel_elf_symlist.c): ...to this. Updated all users.
8015 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
8016 (grubof_SOURCES): Renamed from this...
8017 (kernel_elf_SOURCES): ...to this.
8018 (grubof_HEADERS): Renamed from this...
8019 (kernel_elf_HEADERS): ...to this.
8020 (grubof_CFLAGS): Renamed from this...
8021 (kernel_elf_CFLAGS): ...to this.
8022 (grubof_ASFLAGS): Renamed from this...
8023 (kernel_elf_ASFLAGS): ...to this.
8024 (grubof_LDFLAGS): Renamed from this...
8025 (kernel_elf_LDFLAGS): ...to this.
8027 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
8028 `kernel.elf' instead of `grubof'.
8030 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
8032 Add --with-platform to configure. Use pkglibdir instead of
8033 pkgdatadir. This is reported by Roger Leigh.
8035 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
8036 (host_vendor): Likewise.
8037 (host_os): Likewise.
8038 (pkgdatadir): Likewise.
8039 (platform): New variable.
8040 (pkglibdir): Likewise.
8041 Use PKGLIBDIR instead of PKGDATADIR.
8043 * util/i386/pc/grub-install.in (datadir): Removed.
8044 (host_vendor): Likewise.
8045 (host_os): Likewise.
8046 (pkgdatadir): Likewise.
8047 (platform): New variable.
8048 (pkglibdir): Likewise.
8049 Use PKGLIBDIR instead of PKGDATADIR.
8051 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
8052 instead of GRUB_DATADIR.
8054 * util/i386/pc/grub-mkimage.c (usage): Likewise.
8056 * util/i386/efi/grub-mkimage.c (usage): Likewise.
8059 * configure.ac (--with-platform): New option.
8060 Use PLATFORM instead of HOST_VENDOR to specify a platform.
8062 * Makefile.in: Include a makefile based on PLATFORM instead of
8064 (pkgdatadir): Not appended by the machine type.
8065 (pkglibdir): Appended by the machine type.
8066 (host_vendor): Removed.
8067 (platform): New variable.
8068 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
8069 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
8070 (uninstall): Likewise.
8072 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
8074 Use the environment context in the menu. Remove the commands
8075 "default" and "timeout", and use variables instead.
8077 * normal/menu.c: Include grub/env.h.
8078 (print_entry): Cast TITLE to silence gcc.
8079 (get_timeout): New function.
8080 (set_timeout): Likewise.
8081 (get_entry_number): Likewise.
8082 (run_menu): Use a default entry, a fallback entry and a timeout
8083 in the environment variables "default", "fallback" and
8084 "timeout". Also, tweak the default entry if it is not within the
8085 current menu entries.
8086 (grub_menu_run): Use a fallback entry in the environment variable
8089 * normal/main.c (read_config_file): Do not initialize
8090 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
8092 (grub_normal_execute): Use a data slot to store the menu.
8094 * include/grub/normal.h (struct grub_menu): Removed default_entry,
8095 fallback_entry and timeout.
8096 (struct grub_menu_list): Removed.
8097 (grub_menu_list_t): Likewise.
8098 (struct grub_context): Likewise.
8099 (grub_context_t): Likewise.
8100 (grub_context_get): Likewise.
8101 (grub_context_get_current_menu): Likewise.
8102 (grub_context_push_menu): Likewise.
8103 (grub_context_pop_menu): Likewise.
8104 (grub_default_init): Likewise.
8105 (grub_default_fini): Likewise.
8106 (grub_timeout_init): Likewise.
8107 (grub_timeout_fini): Likewise.
8109 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
8111 (normal_mod_SOURCES): Removed normal/context.c.
8113 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
8114 commands/default.c, commands/timeout.c and normal/context.c.
8115 (normal_mod_SOURCES): Removed normal/context.c.
8117 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
8118 commands/timeout.c and normal/context.c.
8119 (normal_mod_SOURCES): Removed normal/context.c.
8121 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
8122 commands/default.c, commands/timeout.c and normal/context.c.
8123 (normal_mod_SOURCES): Removed normal/context.c.
8125 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
8127 (default_mod_SOURCES): Removed.
8128 (default_mod_CFLAGS): Likewise.
8129 (default_mod_LDFLAGS): Likewise.
8130 (timeout_mod_SOURCES): Removed.
8131 (timeout_mod_CFLAGS): Likewise.
8132 (timeout_mod_LDFLAGS): Likewise.
8134 * DISTLIST: Removed commands/default.c, commands/timeout.c and
8137 * commands/default.c: Removed.
8138 * commands/timeout.c: Likewise.
8139 * normal/context.c: Likewise.
8141 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
8143 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
8145 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
8147 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
8148 "next" to "prev" for readability.
8149 (struct grub_env_sorted_var): New struct.
8150 (grub_env_context): Renamed to ...
8151 (initial_context): ... this.
8152 (grub_env_var_context): Renamed to ...
8153 (current_context): ... this.
8154 (grub_env_find): Look only at CURRENT_CONTEXT.
8155 (grub_env_context_open): Rewritten to copy exported variables from
8157 (grub_env_context_close): Rewritten according to the new
8158 scheme. Also, add an assertion to prevent the initial context from
8160 (grub_env_insert): Removed the code for the sorted list.
8161 (grub_env_remove): Likewise.
8162 (grub_env_export): Simply mark the variable with
8163 GRUB_ENV_VAR_GLOBAL.
8164 (grub_env_set): A cosmetic change for naming consistency.
8165 (grub_env_get): Likewise.
8166 (grub_env_unset): Likewise.
8167 (grub_env_iterate): Rewritten to sort variables within this
8169 (grub_register_variable_hook): Fixed for naming consistency. Call
8170 grub_env_find again, only if NAME is not found at the first time.
8171 (mangle_data_slot_name): New function.
8172 (grub_env_set_data_slot): Likewise.
8173 (grub_env_get_data_slot): Likewise.
8174 (grub_env_unset_data_slot): Likewise.
8176 * include/grub/env.h (grub_env_var_type): New enum.
8177 (GRUB_ENV_VAR_LOCAL): New constant.
8178 (GRUB_ENV_VAR_GLOBAL): Likewise.
8179 (GRUB_ENV_VAR_DATA): Likewise.
8180 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
8182 (grub_env_set): Replace VAR with NAME for consistency.
8183 (grub_register_variable_hook): Likewise.
8184 (grub_env_export): Specify the name of the argument.
8185 (grub_env_set_data_slot): New prototype.
8186 (grub_env_get_data_slot): Likewise.
8187 (grub_env_unset_data_slot): Likewise.
8189 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
8191 Extend the loader so that GRUB can accept a loader which comes
8192 back to GRUB when a loaded image exits. Also, this change adds
8193 support for a chainloader on EFI.
8195 * term/efi/console.c: Include grub/misc.h.
8196 (grub_console_checkkey): Display a scan code on the top for
8197 debugging. This will be removed once the EFI port gets stable.
8198 Correct the scan code mapping.
8200 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
8201 allocate memory from larger regions, in order to reduce the number
8202 of allocated regions. Otherwise, the MacOSX loader panics.
8203 (filter_memory_map): Avoid less than 1MB for compatibility with
8205 (add_memory_regions): Allocate from the tail of a region, if
8206 possible, to avoid allocating a region near to 1MB, for the MacOSX
8209 * kern/efi/init.c (grub_efi_set_prefix): Specify
8210 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
8212 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
8213 argument IMAGE_HANDLE and specify it to get a loaded image.
8214 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
8215 grub_efi_get_loaded_image.
8216 (grub_efi_get_filename): Divide the length by the size of
8218 (grub_efi_get_device_path): New function.
8219 (grub_efi_print_device_path): Print End Device Path nodes. Divide
8220 the length by the size of grub_efi_char16_t for a file path device
8223 * kern/loader.c (grub_loader_noreturn): New variable.
8224 (grub_loader_set): Accept a new argument NORETURN. Set
8225 GRUB_LOADER_NORETURN to NORETURN.
8226 All callers changed.
8227 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
8230 * include/grub/efi/efi.h (grub_efi_get_device_path): New
8232 (grub_efi_get_loaded_image): Take an argument to specify an image
8235 * include/grub/loader.h (grub_loader_set): Added one more argument
8238 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
8239 instead of grub_efi_open_protocol.
8240 (grub_efidisk_get_device_name): Likewise.
8241 (grub_efidisk_close): Print a newline.
8242 (grub_efidisk_get_device_handle): Fixed to use
8243 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
8244 GRUB_EFI_DEVICE_PATH_TYPE.
8246 * disk/efi/efidisk.c (device_path_guid): Moved to ...
8247 * kern/efi/efi.c (device_path_guid): ... here.
8249 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
8251 (kernel_mod_HEADERS): Added efi/disk.h.
8252 (_chain_mod_SOURCES): New variable.
8253 (_chain_mod_CFLAGS): Likewise.
8254 (_chain_mod_LDFLAGS): Likewise.
8255 (chain_mod_SOURCES): Likewise.
8256 (chain_mod_CFLAGS): Likewise.
8257 (chain_mod_LDFLAGS): Likewise.
8259 * DISTLIST: Added include/grub/efi/chainloader.h,
8260 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
8262 * include/grub/efi/chainloader.h: New file.
8263 * loader/efi/chainloader.c: Likewise.
8264 * loader/efi/chainloader_normal.c: Likewise.
8266 2006-04-30 Marco Gerards <marco@gnu.org>
8268 * commands/configfile.c (grub_cmd_source): New function.
8269 (GRUB_MOD_INIT): Register the commands `source' and `.'.
8270 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
8272 2006-04-30 Marco Gerards <marco@gnu.org>
8274 * normal/execute.c (grub_script_execute_cmd): Change the return
8275 type to `grub_err_t'. Correctly return the error.
8276 (grub_script_execute_cmdline): In case a command line is not a
8277 command or a function, try to interpret it as an assignment.
8279 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
8281 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
8282 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
8283 skip a node whose name is obviously invalid as UTF-16,
8284 i.e. contains a NUL character. Stop the iteration when the last
8285 directory entry is found. Instead of using the return value of
8286 grub_hfsplus_btree_iterate_node, store the value in RET and use
8287 it, because the iterator can be stopped by the last directory
8290 2006-04-30 Marco Gerards <marco@gnu.org>
8292 * include/grub/env.h (grub_env_export): New prototype. Reported
8293 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
8295 2006-04-30 Marco Gerards <marco@gnu.org>
8297 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
8298 size of the extents in a catalog file record.
8300 2006-04-29 Marco Gerards <marco@gnu.org>
8302 * commands/configfile.c (grub_cmd_configfile): Execute the
8303 configfile within its own context.
8305 * include/grub/env.h (grub_env_context_open): New prototype.
8306 (grub_env_context_close): Likewise.
8308 * kern/env.c (grub_env): Removed.
8309 (grub_env_sorted): Likewise.
8310 (grub_env_context): New variable.
8311 (grub_env_var_context): Likewise.
8312 (grub_env_find): Search both the active context and the global
8314 (grub_env_context_open): New function.
8315 (grub_env_context_close): Likewise.
8316 (grub_env_insert): Likewise.
8317 (grub_env_remove): Likewise.
8318 (grub_env_export): Likewise.
8319 (grub_env_set): Changed to use helper functions to avoid code
8321 (grub_env_iterate): Rewritten so both the current context and the
8322 global context are being used.
8324 * normal/command.c (export_command): New function.
8325 (grub_command_init): Register the `export' function.
8327 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
8329 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
8330 explicitly to suppress gcc's warnings.
8331 * fs/fat.c (grub_fat_find_dir): Likewise.
8332 (grub_fat_label): Likewise.
8333 * fs/xfs.c (grub_xfs_read_inode): Likewise.
8334 (grub_xfs_mount): Likewise.
8335 (grub_xfs_label): Likewise.
8336 * fs/affs.c (grub_affs_mount): Likewise.
8337 (grub_affs_label): Likewise.
8338 (grub_affs_iterate_dir): Likewise.
8339 * fs/sfs.c (grub_sfs_mount): Likewise.
8340 (grub_sfs_iterate_dir): Likewise.
8341 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
8342 * fs/hfs.c (grub_hfs_mount): Likewise.
8343 (grub_hfs_cmp_catkeys): Likewise.
8344 (grub_hfs_find_dir): Likewise.
8345 (grub_hfs_dir): Likewise.
8346 (grub_hfs_label): Likewise.
8347 * fs/jfs.c (grub_jfs_mount): Likewise.
8348 (grub_jfs_opendir): Likewise.
8349 (grub_jfs_getent): Likewise.
8350 (grub_jfs_lookup_symlink): Likewise.
8351 (grub_jfs_label): Likewise.
8352 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
8353 (grub_hfsplus_iterate_dir): Likewise.
8354 (grub_hfsplus_btree_iterate_node): Made static.
8356 * util/grub-emu.c (prefix): New variable.
8357 (grub_machine_set_prefix): New function.
8358 (main): Do not set the environment variable "prefix" here. Only
8359 set PREFIX, which is used later by grub_machine_set_prefix.
8361 * include/grub/video.h: Do not include grub/symbol.h.
8362 (grub_video_register): Not exported. This symbol is not defined in
8364 (grub_video_unregister): Likewise.
8365 (grub_video_iterate): Likewise.
8366 (grub_video_setup): Likewise.
8367 (grub_video_restore): Likewise.
8368 (grub_video_get_info): Likewise.
8369 (grub_video_get_blit_format): Likewise.
8370 (grub_video_set_palette): Likewise.
8371 (grub_video_get_palette): Likewise.
8372 (grub_video_set_viewport): Likewise.
8373 (grub_video_get_viewport): Likewise.
8374 (grub_video_map_color): Likewise.
8375 (grub_video_map_rgb): Likewise.
8376 (grub_video_map_rgba): Likewise.
8377 (grub_video_fill_rect): Likewise.
8378 (grub_video_blit_glyph): Likewise.
8379 (grub_video_blit_bitmap): Likewise.
8380 (grub_video_blit_render_target): Likewise.
8381 (grub_video_scroll): Likewise.
8382 (grub_video_swap_buffers): Likewise.
8383 (grub_video_create_render_target): Likewise.
8384 (grub_video_delete_render_target): Likewise.
8385 (grub_video_set_active_render_target): Likewise.
8387 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
8389 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
8391 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
8392 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
8393 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
8394 instead of $(srcdir)/genkernsyms.sh.
8396 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
8397 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
8398 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
8399 instead of $(srcdir)/genkernsyms.sh.
8401 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
8402 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
8403 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
8404 instead of $(srcdir)/genkernsyms.sh.
8406 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
8407 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
8408 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
8409 instead of $(srcdir)/genkernsyms.sh.
8411 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
8414 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
8416 (gensymlist.sh): New target.
8417 (genkernsyms.sh): Likewise.
8419 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
8420 genkernsyms.sh.in and gensymlist.sh.in.
8422 * genkernsyms.sh: Removed.
8423 * gensymlist.sh: Likewise.
8425 * genkernsyms.sh.in: New file.
8426 * gensymlist.sh.in: Likewise.
8428 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
8430 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
8431 clobber "prefix", since we may have already set it manually.
8433 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
8435 * kern/misc.c (abort): New alias for grub_abort.
8437 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
8439 A new machine-specific function "grub_machine_set_prefix" is
8440 defined. This is called after loading modules, so that a prefix
8441 initialization can use modules. Also, this change adds an
8442 intensive debugging feature for the memory manager via the
8443 configure option "--enable-mm-debug".
8445 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
8448 * kern/sparc64/ieee1275/init.c (abort): Removed.
8449 (grub_stop): Likewise.
8450 (grub_exit): New function.
8451 (grub_set_prefix): Renamed to ...
8452 (grub_machine_set_prefix): ... this.
8453 (grub_machine_init): Do not call grub_set_prefix.
8455 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
8456 (grub_machine_set_prefix): ... this.
8457 (grub_machine_init): Do not call grub_set_prefix.
8459 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
8460 (grub_machine_init): Do not set the prefix here.
8462 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
8464 * kern/efi/init.c: Include grub/mm.h.
8465 (grub_efi_set_prefix): New function.
8467 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
8468 (grub_efi_get_filename): New function.
8469 (grub_print_device_path): Renamed to ...
8470 (grub_efi_print_device_path): ... this.
8472 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
8473 [MM_DEBUG] (grub_realloc): Likewise.
8474 [MM_DEBUG] (grub_free): Likewise.
8475 [MM_DEBUG] (grub_memalign): Likewise.
8476 [MM_DEBUG] (grub_mm_debug): New variable.
8477 [MM_DEBUG] (grub_debug_malloc): New function.
8478 [MM_DEBUG] (grub_debug_free): New function.
8479 [MM_DEBUG] (grub_debug_realloc): New function.
8480 [MM_DEBUG] (grub_debug_memalign): New function.
8482 * kern/misc.c (grub_abort): Print a newline to distinguish
8485 * kern/main.c (grub_main): Call grub_machine_set_prefix and
8486 grub_set_root_dev after loading modules. This is necessary when
8487 setting a prefix depends on modules.
8489 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
8490 (grub_efi_print_device_path): ... this.
8491 (grub_efi_get_filename): New prototype.
8492 (grub_efi_set_prefix): Likewise.
8494 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
8496 (grub_efidisk_get_device_handle): New prototype.
8497 (grub_efidisk_get_device_name): Likewise.
8499 * include/grub/mm.h: Include config.h.
8500 (MM_DEBUG): Removed.
8501 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
8502 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
8503 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
8504 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
8505 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
8506 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
8507 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
8508 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
8509 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
8511 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
8513 * disk/efi/efidisk.c: Include grub/partition.h.
8514 (iterate_child_devices): New function.
8515 (add_device): First, compare only last device path nodes, so that
8516 devices are sorted by the types.
8517 (grub_efidisk_get_device_handle): New function.
8518 (grub_efidisk_get_device_name): Likewise.
8520 * configure.ac (--enable-mm-debug): New option to enable the
8521 memory manager debugging feature. This makes the binary much
8522 bigger, so is disabled by default.
8524 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
8526 Use grub_abort instead of grub_stop, and grub_exit must be
8527 define in each architecture now. Also, this change adds support
8530 * util/i386/pc/grub-probefs.c: Include grub/term.h.
8531 (grub_getkey): New function.
8532 (grub_term_get_current): Likewise.
8534 * util/i386/pc/grub-setup.c: Include grub/term.h.
8535 (grub_getkey): New function.
8536 (grub_term_get_current): Likewise.
8538 * util/misc.c (grub_stop): Renamed to ...
8539 (grub_exit): ... this.
8541 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
8542 (grub_exit): ... this.
8543 (grub_machine_init): Use grub_abort instead of abort.
8544 (grub_stop): Removed.
8546 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
8549 * kern/i386/pc/startup.S (grub_exit): New function.
8550 (cold_reboot): New label.
8552 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
8553 (grub_efi_init): Call grub_efidisk_init.
8554 (grub_efi_fini): Call grub_efidisk_fini.
8556 * kern/efi/efi.c: Include grub/mm.h.
8557 (grub_efi_console_control_guid): Renamed to ...
8558 (console_control_guid): ... this.
8559 (grub_efi_loaded_image_guid): Renamed to ...
8560 (loaded_image_guid): ... this.
8561 (grub_efi_locate_handle): New function.
8562 (grub_efi_open_protocol): Likewise.
8563 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
8564 GRUB_EFI_CONSOLE_CONTROL_GUID.
8565 (grub_efi_exit): Removed.
8566 (grub_stop): Likewise.
8567 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
8568 (grub_exit): New function.
8569 (grub_print_device_path): Likewise.
8571 * kern/rescue.c (grub_rescue_cmd_exit): New function.
8572 (grub_enter_rescue_mode): Register "exit".
8574 * kern/misc.c (grub_real_dprintf): A cosmetic change.
8575 (grub_abort): New function.
8577 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
8579 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
8581 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
8583 * include/grub/efi/efi.h (grub_efi_exit): Removed.
8584 (grub_print_device_path): New prototype.
8585 (grub_efi_locate_handle): Likewise.
8586 (grub_efi_open_protocol): Likewise.
8588 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
8589 * disk/efi/efidisk.c: Likewise.
8591 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
8593 * include/grub/efi/console_control.h
8594 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
8596 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
8597 last 8 bytes as an array.
8598 (GRUB_EFI_DISK_IO_GUID): New macro.
8599 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
8600 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
8601 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
8603 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
8604 (struct grub_efi_device_path): Rename the member "sub_type" to
8606 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
8607 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
8608 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
8609 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
8610 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
8611 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
8612 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
8613 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
8614 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
8615 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
8616 (struct grub_efi_pci_device_path): New structure.
8617 (grub_efi_pci_device_path_t): New type.
8618 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
8619 (struct grub_efi_pccard_device_path): New structure.
8620 (grub_efi_pccard_device_path_t): New type.
8621 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
8622 (struct grub_efi_memory_mapped_device_path): New structure.
8623 (grub_efi_memory_mapped_device_path_t): New type.
8624 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
8625 (struct grub_efi_vendor_device_path): New structure.
8626 (grub_efi_vendor_device_path_t): New type.
8627 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
8628 (struct grub_efi_controller_device_path): New structure.
8629 (grub_efi_controller_device_path_t): New type.
8630 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
8631 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
8632 (struct grub_efi_acpi_device_path): New structure.
8633 (grub_efi_acpi_device_path_t): New type.
8634 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
8635 (struct grub_efi_expanded_acpi_device_path): New structure.
8636 (grub_efi_expanded_acpi_device_path_t): New type.
8637 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
8638 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
8639 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
8640 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
8641 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
8642 (struct grub_efi_atapi_device_path): New structure.
8643 (grub_efi_atapi_device_path_t): New type.
8644 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
8645 (struct grub_efi_fibre_channel_device_path): New structure.
8646 (grub_efi_fibre_channel_device_path_t): New type.
8647 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
8648 (struct grub_efi_1394_device_path): New structure.
8649 (grub_efi_1394_device_path_t): New type.
8650 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
8651 (struct grub_efi_usb_device_path): New structure.
8652 (grub_efi_usb_device_path_t): New type.
8653 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
8654 (struct grub_efi_usb_class_device_path): New structure.
8655 (grub_efi_usb_class_device_path_t): New type.
8656 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
8657 (struct grub_efi_i2o_device_path): New structure.
8658 (grub_efi_i2o_device_path_t): New type.
8659 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
8660 (struct grub_efi_mac_address_device_path): New structure.
8661 (grub_efi_mac_address_device_path_t): New type.
8662 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
8663 (struct grub_efi_ipv4_device_path): New structure.
8664 (grub_efi_ipv4_device_path_t): New type.
8665 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
8666 (struct grub_efi_ipv6_device_path): New structure.
8667 (grub_efi_ipv6_device_path_t): New type.
8668 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
8669 (struct grub_efi_infiniband_device_path): New structure.
8670 (grub_efi_infiniband_device_path_t): New type.
8671 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
8672 (struct grub_efi_uart_device_path): New structure.
8673 (grub_efi_uart_device_path_t): New type.
8674 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
8675 (struct grub_efi_vendor_messaging_device_path): New structure.
8676 (grub_efi_vendor_messaging_device_path_t): New type.
8677 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
8678 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
8679 (struct grub_efi_hard_drive_device_path): New structure.
8680 (grub_efi_hard_drive_device_path_t): New type.
8681 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
8682 (struct grub_efi_cdrom_device_path): New structure.
8683 (grub_efi_cdrom_device_path_t): New type.
8684 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
8685 (struct grub_efi_vendor_media_device_path): New structure.
8686 (grub_efi_vendor_media_device_path_t): New type.
8687 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
8688 (struct grub_efi_file_path_device_path): New structure.
8689 (grub_efi_file_path_device_path_t): New type.
8690 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
8691 (struct grub_efi_protocol_device_path): New structure.
8692 (grub_efi_protocol_device_path_t): New type.
8693 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
8694 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
8695 (struct grub_efi_bios_device_path): New structure.
8696 (grub_efi_bios_device_path_t): New type.
8697 (struct grub_efi_disk_io): New structure.
8698 (grub_efi_disk_io_t): New type.
8699 (struct grub_efi_block_io_media): New structure.
8700 (grub_efi_block_io_media_t): New type.
8701 (struct grub_efi_block_io): New structure.
8702 (grub_efi_block_io_t): New type.
8704 * include/grub/misc.h (grub_stop): Removed.
8705 (grub_exit): New prototype.
8706 (grub_abort): Likewise.
8708 * include/grub/disk.h (enum grub_disk_dev_id): Added
8709 GRUB_DISK_DEVICE_EFIDISK_ID.
8711 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
8713 (kernel_syms.lst): Remove the target if an error occurs.
8715 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
8717 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
8718 as it was simply too buggy.
8720 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
8722 * kern/misc.c (grub_lltoa): New function.
8723 (grub_vsprintf): Added support for the long long suffix,
8726 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
8728 * Makefile.in (LDFLAGS): Add variable.
8729 (LD): Remove variable.
8730 * configure.ac: Add -m32 to LDFLAGS.
8731 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
8732 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
8733 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
8734 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
8735 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
8737 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
8738 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
8739 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
8741 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
8743 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
8744 length for unknown glyph.
8746 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
8748 Add support for pre-loaded modules into the EFI port.
8750 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
8751 completely. Accept one more argument DIR. The caller has changed.
8753 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
8755 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
8756 (grub_efi_loaded_image_guid): New variable.
8757 (grub_efi_get_loaded_image): New function.
8758 (grub_arch_modules_addr): Likewise.
8760 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
8763 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
8764 (struct grub_efi_loaded_image): New structure.
8765 (grub_efi_loaded_image_t): New type.
8767 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
8769 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
8770 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
8771 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
8773 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
8775 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
8777 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
8779 * DISTLIST: Added include/grub/efi/console.h,
8780 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
8781 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
8783 * include/grub/efi/console.h: New file.
8784 * include/grub/efi/time.h: Likewise.
8785 * include/grub/i386/efi/kernel.h: Likewise.
8786 * kern/efi/init.c: Likewise.
8787 * kern/efi/mm.c: Likewise.
8788 * term/efi/console.c: Likewise.
8790 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
8791 (grub_stop): Removed.
8792 (grub_get_rtc): Likewise.
8793 (grub_machine_init): Simply call grub_efi_init.
8794 (grub_machine_fini): Call grub_efi_fini.
8796 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
8797 (grub_efi_output_string): Removed.
8798 (grub_efi_stall): New function.
8799 (grub_stop): Likewise.
8800 (grub_get_rtc): Likewise.
8802 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
8803 (grub_efi_stall): New prototype.
8804 (grub_efi_allocate_pages): Likewise.
8805 (grub_efi_free_pages): Likewise.
8806 (grub_efi_get_memory_map): Likewise.
8807 (grub_efi_mm_init): Likewise.
8808 (grub_efi_mm_fini): Likewise.
8809 (grub_efi_init): Likewise.
8810 (grub_efi_fini): Likewise.
8812 * include/grub/i386/efi/time.h: Do not include
8813 grub/symbol.h. Include grub/efi/time.h.
8814 (GRUB_TICKS_PER_SECOND): Removed.
8815 (grub_get_rtc): Likewise.
8817 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
8818 Added padding. The EFI spec is buggy.
8819 (GRUB_EFI_BLACK): New macro.
8820 (GRUB_EFI_BLUE): Likewise.
8821 (GRUB_EFI_GREEN): Likewise.
8822 (GRUB_EFI_CYAN): Likewise.
8823 (GRUB_EFI_RED): Likewise.
8824 (GRUB_EFI_MAGENTA): Likewise.
8825 (GRUB_EFI_BROWN): Likewise.
8826 (GRUB_EFI_LIGHTGRAY): Likewise.
8827 (GRUB_EFI_BRIGHT): Likewise.
8828 (GRUB_EFI_DARKGRAY): Likewise.
8829 (GRUB_EFI_LIGHTBLUE): Likewise.
8830 (GRUB_EFI_LIGHTGREEN): Likewise.
8831 (GRUB_EFI_LIGHTCYAN): Likewise.
8832 (GRUB_EFI_LIGHTRED): Likewise.
8833 (GRUB_EFI_LIGHTMAGENTA): Likewise.
8834 (GRUB_EFI_YELLOW): Likewise.
8835 (GRUB_EFI_WHITE): Likewise.
8836 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
8837 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
8838 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
8839 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
8840 (GRUB_EFI_BACKGROUND_RED): Likewise.
8841 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
8842 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
8843 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
8844 (GRUB_EFI_TEXT_ATTR): Likewise.
8846 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
8847 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
8848 (kernel_mod_HEADERS): Added efi/time.h.
8850 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
8852 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
8853 include/grub/efi/api.h, include/grub/efi/console_control.h,
8854 include/grub/efi/efi.h, include/grub/efi/pe32.h,
8855 include/grub/i386/efi/time.h, kern/efi/efi.c,
8856 kern/i386/efi/init.c, kern/i386/efi/startup.S,
8857 and util/i386/efi/grub-mkimage.c.
8859 * Makefile.in (RMKFILES): Added i386-efi.rmk.
8861 * genmk.rb (PModule#rule): Do not export symbols if
8862 #{prefix}_EXPORTS is set to "no".
8864 * conf/i386-efi.mk: New file.
8865 * conf/i386-efi.rmk: Likewise.
8866 * include/grub/efi/api.h: Likewise.
8867 * include/grub/efi/console_control.h: Likewise.
8868 * include/grub/efi/efi.h: Likewise.
8869 * include/grub/efi/pe32.h: Likewise.
8870 * include/grub/i386/efi/time.h: Likewise.
8871 * kern/efi/efi.c: Likewise.
8872 * kern/i386/efi/init.c: Likewise.
8873 * kern/i386/efi/startup.S: Likewise.
8874 * util/i386/efi/grub-mkimage.c: Likewise.
8876 2006-04-17 Marco Gerards <marco@gnu.org>
8878 * include/grub/script.h: Include <grub/parser.h> and
8879 "grub_script.tab.h".
8880 (struct grub_lexer_param): New struct.
8881 (struct grub_parser_param): Likewise.
8882 (grub_script_create_arglist): Pass the state in an argument.
8883 (grub_script_add_arglist): Likewise.
8884 (grub_script_create_cmdline): Likewise.
8885 (grub_script_create_cmdblock): Likewise.
8886 (grub_script_create_cmdif): Likewise.
8887 (grub_script_create_cmdmenu): Likewise.
8888 (grub_script_add_cmd): Likewise.
8889 (grub_script_arg_add): Likewise.
8890 (grub_script_lexer_ref): Likewise.
8891 (grub_script_lexer_deref): Likewise.
8892 (grub_script_lexer_record_start): Likewise.
8893 (grub_script_lexer_record_stop): Likewise.
8894 (grub_script_mem_record): Likewise.
8895 (grub_script_mem_record_stop): Likewise.
8896 (grub_script_malloc): Likewise.
8897 (grub_script_yylex): Likewise.
8898 (grub_script_yyparse): Likewise.
8899 (grub_script_yyerror): Likewise.
8900 (grub_script_yylex): Likewise.
8901 (grub_script_lexer_init): Return the state.
8903 * normal/lexer.c (grub_script_lexer_state): Removed variable.
8904 (grub_script_lexer_done): Likewise.
8905 (grub_script_lexer_getline): Likewise.
8906 (grub_script_lexer_refs): Likewise.
8908 (newscript): Likewise.
8910 (recording): Likewise.
8911 (recordpos): Likewise.
8912 (recordlen): Likewise.
8913 (grub_script_lexer_init): Return the state instead of setting
8915 (grub_script_lexer_ref): Use the newly added argument for state
8917 (grub_script_lexer_deref): Likewise.
8918 (grub_script_lexer_record_start): Likewise.
8919 (grub_script_lexer_record_stop): Likewise.
8920 (recordchar): Likewise.
8921 (nextchar): Likewise.
8922 (grub_script_yylex2): Likewise.
8923 (grub_script_yylex): Likewise.
8924 (grub_script_yyerror): Likewise.
8926 * normal/parser.y (func_mem): Removed variable.
8927 (menu_entry): Likewise.
8929 (%lex-param): New parser option.
8930 (%parse-param): Likewise.
8931 (script): Always return the AST.
8932 (argument): Pass the state around.
8933 (arguments): Likewise.
8934 (grubcmd): Likewise.
8935 (commands): Likewise.
8936 (function): Likewise.
8937 (menuentry): Likewise.
8938 (if_statement): Likewise.
8941 * normal/script.c (grub_script_memused): Removed variable.
8942 (grub_script_parsed): Likewise.
8943 (grub_script_malloc): Added a state argument. Use that instead of
8945 (grub_script_mem_record): Likewise.
8946 (grub_script_mem_record_stop): Likewise.
8947 (grub_script_arg_add): Likewise.
8948 (grub_script_add_arglist): Likewise.
8949 (grub_script_create_cmdline): Likewise.
8950 (grub_script_create_cmdif): Likewise.
8951 (grub_script_create_cmdmenu): Likewise.
8952 (grub_script_add_cmd): Likewise.
8953 (grub_script_parse): Setup the state before calling the parser.
8955 2006-04-16 Marco Gerards <marco@gnu.org>
8957 * normal/command.c (grub_command_init): Remove the title command.
8959 * normal/lexer.c (grub_script_yylex): Renamed from this...
8960 (grub_script_yylex2): ... to this.
8961 (grub_script_yylex): New function. Temporary
8962 introduced to filter some tokens.
8963 (grub_script_yyerror): Print a newline.
8965 * normal/main.c (read_config_file): Output information about the
8966 lines that contain errors. Wait for a key after all lines have
8967 been processed. Don't return an empty menu.
8969 * normal/parser.y (func_mem): Don't initialize.
8970 (menu_entry): Likewise.
8971 (err): New variable.
8972 (script): Don't return anything when an error was encountered.
8973 (ws, returns): Removed rules.
8974 (argument): Disabled concatenated variable support.
8975 (arguments): Remove explicit separators.
8976 (grubcmd): Likewise.
8977 (function): Likewise.
8978 (menuentry): Likewise.
8980 (commands): Likewise. Add error handling.
8982 * normal/script.c (grub_script_create_cmdline): If
8983 `grub_script_parsed' is 0, assume the parser encountered an error.
8985 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
8987 * configure.ac: Add support for EFI. Fix the typo
8988 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
8990 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
8992 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
8993 foreign multibyte characters should be shown correctly.
8995 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
8997 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
8999 (read_config_file): Made it to close file before returning.
9001 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
9003 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
9004 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
9005 video/i386/pc/vbefill.c.
9007 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
9008 video/i386/pc/vbefill.c.
9010 * include/grub/video.h (grub_video_blit_format): New enum.
9011 (grub_video_mode_info): Added new member blit_format.
9012 (grub_video_get_blit_format): New function prototype.
9014 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
9016 (grub_video_vbe_map_rgb): Likewise.
9017 (grub_video_vbe_unmap_color): Likewise.
9019 * include/grub/i386/pc/vbeblit.h: New file.
9021 * include/grub/i386/pc/vbefill.h: New file.
9023 * video/video.c (grub_video_get_blit_format): New function.
9024 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
9025 (grub_video_vbe_map_rgb): Likewise.
9026 (grub_video_vbe_unmap_color): Likewise.
9028 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
9030 (grub_video_vbe_blit_render_target): Changed to use more optimized
9032 (grub_video_vbe_setup): Added detection for optimized settings.
9033 (grub_video_vbe_create_render_target): Likewise.
9035 * video/i386/pc/vbeblit.c: New file.
9037 * video/i386/pc/vbefill.c: New file.
9039 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
9041 * font/manager.c (grub_font_get_glyph): Removed font fixup from
9044 * util/unifont2pff.rb: ... and moved it to here. Improved argument
9045 parsing to support both hex and dec ranges. If filename was missing
9046 show usage information.
9048 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
9050 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
9051 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
9053 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
9054 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
9055 (video_mod_SOURCES): Added.
9056 (video_mod_CFLAGS): Likewise.
9057 (video_mod_LDFLAGS): Likewise.
9058 (gfxterm_mod_SOURCES): Likewise.
9059 (gfxterm_mod_CFLAGS): Likewise.
9060 (gfxterm_mod_LDFLAGS): Likewise.
9061 (videotest_mod_SOURCES): Likewise.
9062 (videotest_mod_CFLAGS): Likewise.
9063 (videotest_mod_LDFLAGS): Likewise.
9064 (vesafb_mod_SOURCES): Removed.
9065 (vesafb_mod_CFLAGS): Likewise.
9066 (vesafb_mod_LDFLAGS): Likewise.
9067 (vga_mod_SOURCES): Likewise.
9068 (vga_mod_CFLAGS): Likewise.
9069 (vga_mod_LDFLAGS): Likewise.
9071 * commands/videotest.c: New file.
9073 * font/manager.c (fill_with_default_glyph): Modified to use
9075 (grub_font_get_glyph): Likewise.
9076 (fontmanager): Renamed from this...
9077 (font_manager): ... to this.
9079 * include/grub/font.h (grub_font_glyph): Added new structure.
9080 (grub_font_get_glyph): Modified to use grub_font_glyph.
9082 * include/grub/misc.h (grub_abs): Added as inline function.
9084 * include/grub/video.h: New file.
9086 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
9087 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
9088 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
9089 (grub_vbe_get_controller_info): Renamed from this...
9090 (grub_vbe_bios_get_controller_info): ... to this.
9091 (grub_vbe_get_mode_info): Renamed from this...
9092 (grub_vbe_bios_get_mode_info): ... to this.
9093 (grub_vbe_set_mode): Renamed from this...
9094 (grub_vbe_bios_set_mode): ... to this.
9095 (grub_vbe_get_mode): Renamed from this...
9096 (grub_vbe_bios_get_mode): ... to this.
9097 (grub_vbe_set_memory_window): Renamed from this...
9098 (grub_vbe_bios_set_memory_window): ... to this.
9099 (grub_vbe_get_memory_window): Renamed from this...
9100 (grub_vbe_bios_get_memory_window): ... to this.
9101 (grub_vbe_set_scanline_length): Renamed from this...
9102 (grub_vbe_set_scanline_length): ... to this.
9103 (grub_vbe_get_scanline_length): Renamed from this...
9104 (grub_vbe_bios_get_scanline_length): ... to this.
9105 (grub_vbe_set_display_start): Renamed from this...
9106 (grub_vbe_bios_set_display_start): ... to this.
9107 (grub_vbe_get_display_start): Renamed from this...
9108 (grub_vbe_bios_get_display_start): ... to this.
9109 (grub_vbe_set_palette_data): Renamed from this...
9110 (grub_vbe_bios_set_palette_data): ... to this.
9111 (grub_vbe_set_pixel_rgb): Removed.
9112 (grub_vbe_set_pixel_index): Likewise.
9114 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
9116 (grub_vbe_bios_get_controller_info): ... to this.
9117 (grub_vbe_get_mode_info): Renamed from this...
9118 (grub_vbe_bios_get_mode_info): ... to this.
9119 (grub_vbe_set_mode): Renamed from this...
9120 (grub_vbe_bios_set_mode): ... to this.
9121 (grub_vbe_get_mode): Renamed from this...
9122 (grub_vbe_bios_get_mode): ... to this.
9123 (grub_vbe_set_memory_window): Renamed from this...
9124 (grub_vbe_bios_set_memory_window): ... to this.
9125 (grub_vbe_get_memory_window): Renamed from this...
9126 (grub_vbe_bios_get_memory_window): ... to this.
9127 (grub_vbe_set_scanline_length): Renamed from this...
9128 (grub_vbe_set_scanline_length): ... to this.
9129 (grub_vbe_get_scanline_length): Renamed from this...
9130 (grub_vbe_bios_get_scanline_length): ... to this.
9131 (grub_vbe_set_display_start): Renamed from this...
9132 (grub_vbe_bios_set_display_start): ... to this.
9133 (grub_vbe_get_display_start): Renamed from this...
9134 (grub_vbe_bios_get_display_start): ... to this.
9135 (grub_vbe_set_palette_data): Renamed from this...
9136 (grub_vbe_bios_set_palette_data): ... to this.
9137 (grub_vbe_bios_get_controller_info): Fixed problem with registers
9138 getting corrupted after calling it. Added more pushes and pops.
9139 (grub_vbe_bios_set_mode): Likewise.
9140 (grub_vbe_bios_get_mode): Likewise.
9141 (grub_vbe_bios_get_memory_window): Likewise.
9142 (grub_vbe_bios_set_scanline_length): Likewise.
9143 (grub_vbe_bios_get_scanline_length): Likewise.
9144 (grub_vbe_bios_get_display_start): Likewise.
9145 (grub_vbe_bios_set_palette_data): Likewise.
9147 * normal/cmdline.c (cl_set_pos): Refresh the screen.
9148 (cl_insert): Likewise.
9149 (cl_delete): Likewise.
9151 * term/gfxterm.c: New file.
9153 * term/i386/pc/vesafb.c: Removed file.
9155 * video/video.c: New file.
9157 * video/i386/pc/vbe.c (real2pm): Added new function.
9158 (grub_video_vbe_draw_pixel): Likewise.
9159 (grub_video_vbe_get_video_ptr): Likewise.
9160 (grub_video_vbe_get_pixel): Likewise
9161 (grub_video_vbe_init): Likewise.
9162 (grub_video_vbe_fini): Likewise.
9163 (grub_video_vbe_setup): Likewise.
9164 (grub_video_vbe_get_info): Likewise.
9165 (grub_video_vbe_set_palette): Likewise.
9166 (grub_video_vbe_get_palette): Likewise.
9167 (grub_video_vbe_set_viewport): Likewise.
9168 (grub_video_vbe_get_viewport): Likewise.
9169 (grub_video_vbe_map_color): Likewise.
9170 (grub_video_vbe_map_rgb): Likewise.
9171 (grub_video_vbe_map_rgba): Likewise.
9172 (grub_video_vbe_unmap_color): Likewise.
9173 (grub_video_vbe_fill_rect): Likewise.
9174 (grub_video_vbe_blit_glyph): Likewise.
9175 (grub_video_vbe_blit_bitmap): Likewise.
9176 (grub_video_vbe_blit_render_target): Likewise.
9177 (grub_video_vbe_scroll): Likewise.
9178 (grub_video_vbe_swap_buffers): Likewise.
9179 (grub_video_vbe_create_render_target): Likewise.
9180 (grub_video_vbe_delete_render_target): Likewise.
9181 (grub_video_vbe_set_active_render_target): Likewise.
9182 (grub_vbe_set_pixel_rgb): Remove function.
9183 (grub_vbe_set_pixel_index): Likewise.
9184 (index_color_mode): Remove static variable.
9185 (active_mode): Likewise.
9186 (framebuffer): Likewise.
9187 (bytes_per_scan_line): Likewise.
9188 (grub_video_vbe_adapter): Added new static variable.
9189 (framebuffer): Likewise.
9190 (render_target): Likewise.
9191 (initial_mode): Likewise.
9192 (mode_in_use): Likewise.
9193 (mode_list): Likewise.
9195 2006-03-10 Marco Gerards <marco@gnu.org>
9197 * configure.ac (AC_INIT): Bumped to 1.93.
9199 * DISTLIST: Added `include/grub/hfs.h'.
9201 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
9203 * boot/i386/pc/boot.S (general_error): Before looping, try INT
9204 18H, which might help the BIOS falling back to next boot media.
9206 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
9208 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
9209 Poe Chen <poe.poechen@gmail.com>.
9211 2006-01-17 Marco Gerards <marco@gnu.org>
9213 * include/grub/normal.h: Include <grub/script.h>.
9214 (grub_command_list): Removed struct.
9215 (grub_command_list_t): Removed type.
9216 (grub_menu_entry): Remove members `num' and `command_list'. Add
9217 members `commands' and `sourcecode'.
9218 * include/grub/script.h: Add inclusion guards.
9219 (grub_script_cmd_menuentry): New struct.
9220 (grub_script_execute_menuentry): New prototype.
9221 (grub_script_lexer_record_start): Likewise.
9222 (grub_script_lexer_record_stop): Likewise.
9223 * normal/execute.c (grub_script_execute_menuentry): New function.
9224 * normal/lexer.c (record, recording, recordpos, recordlen): New
9226 (grub_script_lexer_record_start): New function.
9227 (grub_script_lexer_record_stop): Likewise.
9228 (recordchar): Likewise.
9229 (nextchar): Likewise.
9230 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
9231 2048 as the buffer size. Add the tokens `menuentry' and `@'.
9232 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
9233 (current_menu): New variable.
9234 (free_menu): Mainly rewritten.
9235 (grub_normal_menu_addentry): New function.
9236 (read_config_file): Rewritten.
9237 * normal/menu.c (run_menu_entry): Mainly rewritten.
9238 * normal/menu_entry.c (make_screen): Rewritten the code to insert
9240 (run): Mainly rewritten.
9241 * normal/parser.y (menu_entry): New variable.
9242 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
9243 (menuentry): New rule.
9244 (command): Add `menuentry'.
9245 (if_statement): Allow additional returns before `fi'.
9246 * normal/script.c (grub_script_create_cmdmenu): New function.
9248 2006-01-03 Marco Gerards <marco@gnu.org>
9250 * INSTALL: GNU Bison is required.
9251 * configure.ac: Rewritten the test to detect Bison.
9252 * Makefile.in (YACC): New variable. Reported by Xun Sun
9253 <xun.sun.cn@gmail.com>.
9255 2006-01-03 Marco Gerards <marco@gnu.org>
9257 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
9258 the HFS+ filesystem to filesystem blocks.
9259 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
9260 GCC warning is silenced.
9262 2006-01-03 Marco Gerards <marco@gnu.org>
9264 * partmap/apple.c (apple_partition_map_iterate): Convert the data
9265 read from disk from big endian to host byte order.
9267 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
9269 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
9271 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
9272 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
9273 embedded HFS+ filesystem.
9274 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
9275 (grub_hfs_sblock): Move from here...
9276 * include/grub/hfs.h: To here... New file.
9277 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
9279 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
9281 (grub_hfsplus_volheader): Change type of member `magic' to
9283 (grub_hfsplus_data): Add new member `embedded_offset'.
9284 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
9286 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
9287 Calculate the offset.
9289 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
9291 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
9293 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
9295 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
9297 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
9298 ENV->NAME is NULL after allocating ENV->VALUE.
9300 2005-12-25 Marco Gerards <marco@gnu.org>
9302 * kern/env.c (grub_env_set): Rewritten the error handling code.
9304 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
9306 * geninit.sh: Made more robust, and more portable.
9308 2005-12-25 Marco Gerards <marco@gnu.org>
9310 Add support for Apple HFS+ filesystems.
9312 * fs/hfsplus.c: New file.
9314 * DISTLIST: Added `fs/hfsplus.c'.
9316 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
9317 (hfsplus_mod_SOURCES): New variable.
9318 (hfsplus_mod_CFLAGS): Likewise.
9319 (hfsplus_mod_LDFLAGS): Likewise.
9320 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
9321 (grub_setup_SOURCES): Likewise.
9322 (grub_mkdevicemap_SOURCES): Likewise.
9323 (grub_emu_SOURCES): Likewise.
9324 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9326 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
9328 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
9330 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
9332 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
9333 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
9334 include/grub/parser.h, include/grub/script.h, kern/parser.c,
9335 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
9336 normal/lexer.c, normal/parser.y, normal/script.c, and
9338 Removed kern/sparc64/cache.c.
9340 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
9341 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
9344 * configure.ac (AC_INIT): Bumped to 1.92.
9346 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
9348 * kern/err.c (grub_error_push): Added new function to support error
9350 (grub_error_pop): Likewise.
9351 (grub_error_stack_items): New local variable to support error stacks.
9352 (grub_error_stack_pos): Likewise.
9353 (grub_error_stack_assert): Likewise.
9354 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
9356 (grub_print_error): Added support to print errors from error stack.
9358 * include/grub/err.h (grub_error_push): Added function prototype.
9359 (grub_error_pop): Likewise.
9361 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
9363 * configure.ac: Accept `powerpc64' as host_cpu.
9364 (amd64): Rename to `biarch32'.
9366 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
9367 non-cacheline-aligned addresses.
9369 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
9370 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
9371 if `size' is non-zero.
9373 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
9375 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
9376 and `cd' to make sure the filename is not prefixed with a
9378 (pkgdata_MODULES): Add `gpt.mod'.
9379 (gpt_mod_SOURCES): New variable.
9380 (gpt_mod_CFLAGS): Likewise.
9381 (gpt_mod_LDFLAGS): Likewise.
9383 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
9385 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
9388 * partmap/gpt.c: New file.
9390 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
9391 GPT partition map is detected.
9393 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
9395 * commands/i386/pc/play.c: New file.
9396 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
9397 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
9400 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
9402 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
9403 ((unused))' to silence gcc warning.
9405 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
9407 * configure.ac: Correct `AC_PROG_YACC' test.
9409 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
9411 * util/powerpc/ieee1275/grub-install.in: Run the mount point
9412 check before installing files.
9414 2005-11-22 Mike Small <smallm@panix.com>
9416 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
9417 number regex so multidigit numbers are recognized correctly.
9419 2005-11-22 Mike Small <smallm@panix.com>
9421 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
9422 debugging message before attempting to claim memory.
9423 (grub_rescue_cmd_initrd): Add a claim debugging message and try
9424 multiple addresses in case of failure.
9426 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
9428 * term/tparm.c (get_space): Remove empty `if' statement.
9430 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
9432 * kern/parser.c (check_varstate): Rename `state' to 's'.
9434 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
9436 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
9437 variable definitions to the beginning of each function. Sort stack
9439 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
9440 `buf' argument to `char *'.
9442 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
9444 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
9445 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
9446 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
9447 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
9448 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
9449 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
9450 configfile.mod, search.mod, gzio.mod and test.mod.
9451 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
9452 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
9453 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
9454 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
9455 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
9456 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
9457 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
9458 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
9459 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
9460 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
9461 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
9462 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
9463 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
9464 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
9465 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
9466 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
9467 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
9468 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
9469 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
9470 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
9471 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
9472 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
9473 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
9475 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
9477 (pkgdata_MODULES): Add test.mod.
9479 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
9481 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
9482 appending to variables with "+=".
9483 (PModule): Use full pathname to generate *.lst filenames.
9485 * Makefile.in: Fixed list rules moved from genmk.rb.
9486 (.DELETE_ON_ERROR): New special target.
9487 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
9489 * conf/i386-pc.rmk: Include conf/common.mk.
9490 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
9491 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
9492 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
9493 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
9494 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
9495 configfile.mod, search.mod, gzio.mod and test.mod.
9496 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
9497 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
9498 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
9499 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
9500 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
9501 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
9502 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
9503 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
9504 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
9505 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
9506 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
9507 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
9508 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
9509 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
9510 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
9511 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
9512 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
9513 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
9514 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
9515 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
9516 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
9517 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
9518 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
9520 * conf/common.rmk: ... to here. New file.
9522 * conf/common.mk: New file.
9524 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
9526 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
9527 (grub_script.tab.c): ... here.
9529 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
9530 (grub_script.tab.c): ... here.
9532 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
9533 (grub_script.tab.c): ... here.
9535 * normal/command.c (grub_command_find): Fixed a memory leak of
9536 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
9538 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
9540 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
9541 "@" which marks the start of a comment on ARM.
9542 (VARIABLE): Likewise.
9544 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
9546 Add support for Linux/ADFS partition tables.
9548 * partmap/acorn.c: New file.
9550 * include/grub/acorn_filecore.h: Likewise.
9552 * DISTLIST: Added `partmap/acorn.c' and
9553 `include/grub/acorn_filecore.h'.
9555 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
9557 (pkgdata_MODULES): Add `acorn.mod'.
9558 (acorn_mod_SOURCES): New variable.
9559 (acorn_mod_CFLAGS): Likewise.
9561 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
9563 (pkgdata_MODULES): Add `acorn.mod'.
9564 (acorn_mod_SOURCES): New variable.
9565 (acorn_mod_CFLAGS): Likewise.
9567 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
9568 (pkgdata_MODULES): Add `acorn.mod'.
9569 (acorn_mod_SOURCES): New variable.
9570 (acorn_mod_CFLAGS): Likewise.
9571 (acorn_mod_LDFLAGS): Likewise.
9573 * include/types.h (grub_disk_addr_t): New typedef.
9575 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
9577 * geninit.sh: New file.
9579 * geninitheader.sh: Likewise.
9581 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
9582 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
9583 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
9584 * commands/configfile.c (grub_configfile_init)
9585 (grub_configfile_fini): Likewise.
9586 * commands/default.c (grub_default_init, grub_default_fini):
9588 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
9589 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
9590 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
9591 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
9593 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
9594 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
9596 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
9597 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
9599 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
9601 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
9603 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
9604 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
9605 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
9606 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
9607 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
9608 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
9609 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
9610 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
9611 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
9612 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
9613 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
9614 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
9615 * partmap/amiga.c (grub_amiga_partition_map_init)
9616 (grub_amiga_partition_map_fini): Likewise.
9617 * partmap/apple.c (grub_apple_partition_map_init)
9618 (grub_apple_partition_map_fini): Likewise.
9619 * partmap/pc.c (grub_pc_partition_map_init)
9620 (grub_pc_partition_map_fini): Likewise.
9621 * partmap/sun.c (grub_sun_partition_map_init,
9622 grub_sun_partition_map_fini): Likewise.
9623 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
9626 * util/grub-emu.c: Include <grub_modules_init.h>.
9627 (main): Don't initialize and de-initialize any modules directly,
9628 use `grub_init_all' and `grub_fini_all' instead.
9630 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
9631 `grub_vesafb_mod_init'.
9632 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
9634 * term/i386/pc/vga.c (grub_vga_init): Renamed to
9635 `grub_vga_mod_init'. Updated all users.
9636 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
9638 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
9639 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
9642 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
9643 Generate a function to initialize the module in utilities.
9644 Updated all callers.
9645 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
9646 initialize the module in utilities. Updated all callers.
9648 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
9650 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
9651 escape sequence and a literal ^L to clear the screen.
9653 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
9654 when returning from Open Firmware.
9656 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
9658 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
9659 (grub_ofconsole_height): Likewise.
9660 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
9661 manually insert a '\n'.
9662 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
9663 `grub_ofconsole_height'. Return early if these are already set.
9665 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
9667 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
9668 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
9669 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
9670 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
9671 and `normal/script.c'.
9672 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
9673 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9674 (test_mod_SOURCES): New variable.
9675 (test_mod_CFLAGS): Likewise.
9676 (test_mod_LDFLAGS): Likewise.
9677 (pkgdata_MODULES): Add `test.mod'.
9678 (grub_script.tab.c): New rule.
9679 (grub_script.tab.h): Likewise.
9681 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
9683 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
9684 `commands/test.c', `normal/execute.c', `normal/lexer.c',
9685 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9686 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
9687 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9688 (test_mod_SOURCES): New variable.
9689 (test_mod_CFLAGS): Likewise.
9690 (pkgdata_MODULES): Add `test.mod'.
9691 (grub_script.tab.c): New rule.
9692 (grub_script.tab.h): Likewise.
9694 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
9696 Add initial scripting support.
9698 * commands/test.c: New file.
9699 * include/grub/script.h: Likewise.
9700 * normal/execute.c: Likewise.
9701 * normal/function.c: Likewise.
9702 * normal/lexer.c: Likewise.
9703 * normal/parser.y: Likewise.
9704 * normal/script.c: Likewise.
9706 * configure.ac: Add `AC_PROG_YACC' test.
9708 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
9709 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
9710 `normal/function.c' and `normal/script.c'.
9711 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
9712 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9713 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
9715 (pkgdata_MODULES): Add `test.mod'.
9716 (grub_script.tab.c): New rule.
9717 (grub_script.tab.h): Likewise.
9719 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
9721 * include/grub/normal.h (grub_test_init): New prototype.
9722 (grub_test_fini): Likewise.
9724 * normal/command.c: Include <grub/script.h>.
9725 (grub_command_execute): Rewritten.
9727 * util/grub-emu.c (main): Call `grub_test_init' and
9730 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
9732 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
9734 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
9735 there are no pending characters.
9737 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
9739 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
9740 `grub_strndup' to drop device arguments. Replace unnecessary
9741 `grub_strndup' with `grub_strdup'.
9743 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
9745 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
9746 `debug' environment variable has been set.
9748 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
9750 * Makefile.in (install-local): Use $(DATA).
9751 (uninstall): Likewise.
9752 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
9753 (sbin_UTILITIES): ... to here.
9754 (sbin_SCRIPTS): New variable.
9755 (grub_install_SOURCES): New variable.
9756 * util/powerpc/ieee1275/grub-install.in: New file.
9757 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
9759 (add_segments): Call `grub_util_get_path'.
9761 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
9763 From Timothy Baldwin:
9764 * commands/ls.c (grub_ls_list_files): Close FILE with
9766 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
9768 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
9770 * include/grub/parser.h: New file.
9772 * kern/parser.c: Likewise.
9774 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
9775 (grub_setup_SOURCES): Likewise.
9776 (grub_probefs_SOURCES): Likewise.
9777 (grub_emu_SOURCES): Likewise.
9778 (kernel_img_HEADERS): Add `parser.h'.
9780 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
9781 (grub_emu_SOURCES): Add `kern/parser.c'.
9782 (grubof_SOURCES): Likewise.
9784 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
9785 (grubof_SOURCES): Add `kern/parser.c'.
9787 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
9789 * kern/misc.c (grub_split_cmdline): Removed function.
9791 * kern/rescue.c: Include <grub/parser.h>.
9792 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
9793 of `grub_split_cmdline'.
9795 * normal/command.c: Include <grub/parser.h>.
9796 (grub_command_execute): Use `grub_parser_split_cmdline' instead
9797 of `grub_split_cmdline'.
9799 * normal/completion.c: Include <grub/parser.h>.
9800 (cmdline_state): New variable.
9801 (iterate_dir): End the filename with a quote depending on the
9803 (get_state): new function.
9804 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
9805 split the arguments and determine the current argument. When the
9806 argument string is not quoted, escape all spaces.
9808 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
9810 * normal/sparc64/setjmp.S: New file.
9812 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
9814 * include/grub/sparc64/libgcc.h: New file.
9815 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
9816 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
9817 normal/sparc64/setjmp.c.
9819 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
9821 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
9822 * kern/sparc64/cache.S: New file.
9823 * kern/sparc64/cache.c: Removed.
9824 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
9825 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
9827 (COMMON_LDFLAGS): Add -melf64_sparc.
9828 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
9829 (grubof_SOURCES): Use cache.S instead of cache.c.
9830 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
9831 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
9832 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
9834 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
9835 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
9836 (linux_mod_CFLAGS): Commented out.
9837 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
9838 out because module isn't built.
9839 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
9840 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
9841 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
9842 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
9843 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
9844 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
9845 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
9846 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
9847 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
9848 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
9849 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
9850 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
9851 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
9852 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
9854 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
9856 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
9857 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
9858 longer, because HFS should not be used on PC.
9860 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
9862 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
9863 consistently within the loop.
9865 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
9867 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
9868 directory can not be read.
9870 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
9872 * configure.ac (AC_INIT): Increase the version number to 1.91.
9874 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
9875 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
9876 term/i386/pc/serial.c.
9878 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
9880 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
9881 file size must be permitted.
9883 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
9884 between %ah and %al.
9886 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
9888 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
9890 Call the hook with a NUL-terminated filename.
9891 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
9894 * kern/term.c (cursor_state): New variable.
9895 (grub_term_set_current): Reset the cursor state on a new
9897 (grub_setcursor): Rewritten to use CURSOR_STATE.
9898 (grub_getcursor): New function.
9900 * include/grub/term.h (grub_getcursor): New prototype.
9902 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
9903 integers on ARM. Reported by Timothy Baldwin
9904 <T.E.Baldwin99@members.leeds.ac.uk>.
9906 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
9908 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
9910 (grub_sfs_dir): Likewise.
9912 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
9914 Add support for the SFS filesystem.
9916 * fs/sfs.c: New file.
9918 * DISTLIST: Added `fs/sfs.c'.
9920 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
9921 (grub_probefs_SOURCES): Likewise.
9922 (grub_emu_SOURCES): Likewise.
9923 (pkgdata_MODULES): Add `sfs.mod'.
9924 (sfs_mod_SOURCES): New variable.
9925 (sfs_mod_CFLAGS): Likewise.
9926 (sfs_mod_LDFLAGS): Likewise.
9928 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
9929 (pkgdata_MODULES): Add `sfs.mod'.
9930 (sfs_mod_SOURCES): New variable.
9931 (sfs_mod_CFLAGS): Likewise.
9933 * util/grub-emu.c (main): Call `grub_sfs_init' and
9936 * include/grub/fs.h (grub_sfs_init): New prototype.
9937 (grub_sfs_fini): Likewise.
9939 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
9941 Add support for the AFFS filesystem.
9943 * fs/affs.c: New file.
9945 * DISTLIST: Added `fs/affs.c'.
9947 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
9948 (grub_probefs_SOURCES): Likewise.
9949 (grub_emu_SOURCES): Likewise.
9950 (pkgdata_MODULES): Add `affs.mod'.
9951 (affs_mod_SOURCES): New variable.
9952 (affs_mod_CFLAGS): Likewise.
9953 (affs_mod_LDFLAGS): Likewise.
9955 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
9956 (pkgdata_MODULES): Add `affs.mod'.
9957 (affs_mod_SOURCES): New variable.
9958 (affs_mod_CFLAGS): Likewise.
9960 * util/grub-emu.c (main): Call `grub_affs_init' and
9963 * include/grub/fs.h (grub_affs_init): New prototype.
9964 (grub_affs_fini): Likewise.
9966 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
9968 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
9970 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
9972 * configure.ac: Accept `x86_64' as host_cpu. In that case add
9975 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
9978 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
9979 (COMMON_LDFLAGS): New variable.
9980 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
9981 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
9982 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
9983 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
9984 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
9985 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
9986 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
9987 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
9988 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
9989 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
9990 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
9991 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
9992 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
9993 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
9994 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
9996 (normal_mod_ASFLAGS): Add `-m32'.
9998 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
9999 (grub_host_size_t, grub_host_ssize_t): New types.
10000 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
10001 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
10002 `GRUB_HOST_SIZEOF_VOID_P'.
10004 * include/grub/kernel.h (struct grub_module_header): Type of
10005 member offset changed to `grub_host_off_t'. Type of member size
10006 changed to `grub_host_size_t'.
10007 (struct grub_module_info): Type of member offset changed to
10008 `grub_host_off_t'. Type of member size changed to
10009 `grub_host_size_t'.
10011 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
10013 Make GRUB's kernel compliant to Multiboot Specification.
10015 * kern/i386/pc/startup.S (multiboot_header): New label.
10016 (multiboot_entry): Likewise.
10017 (multiboot_trampoline): Likewise.
10019 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
10020 Increased to 0x4A0.
10022 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
10023 put parentheses after a question mark.
10024 [!GRUB_UTIL] (my_mod): New variable.
10026 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
10028 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
10030 Adds support for the XFS filesystem. Btrees are not supported
10033 * fs/xfs.c: New file.
10035 * DISTLIST: Added `fs/xfs.c'.
10037 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
10038 (grub_probefs_SOURCES): Likewise.
10039 (grub_emu_SOURCES): Likewise.
10040 (pkgdata_MODULES): Add `xfs.mod'.
10041 (xfs_mod_SOURCES): New variable.
10042 (xfs_mod_CFLAGS): Likewise.
10044 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
10045 (pkgdata_MODULES): Add `xfs.mod'.
10046 (xfs_mod_SOURCES): New variable.
10047 (xfs_mod_CFLAGS): Likewise.
10049 * util/grub-emu.c (main): Call `grub_xfs_init' and
10052 * include/grub/fs.h (grub_xfs_init): New prototype.
10053 (grub_xfs_fini): Likewise.
10056 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
10058 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
10059 color modes, allow greater than 16 colors to be configured as
10062 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
10064 * normal/completion.c (complete_arguments): Add the qualifier
10065 const into OPTIONS.
10067 From Omniflux <omniflux+lists@omniflux.com>:
10068 * include/grub/terminfo.h: New file.
10069 * include/grub/tparm.h: Likewise.
10070 * include/grub/i386/pc/serial.h: Likewise.
10071 * term/terminfo.c: Likewise.
10072 * term/tparm.c: Likewise.
10073 * term/i386/pc/serial.c: Likewise.
10074 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
10076 (terminfo_mod_SOURCES): New variable.
10077 (terminfo_mod_CFLAGS): Likewise.
10078 (serial_mod_SOURCES): Likewise.
10079 (serial_mod_CFLAGS): Likewise.
10081 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
10083 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
10084 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
10085 and kern/powerpc/ieee1275/cmain.c, respectively.
10087 * boot/powerpc/ieee1275/crt0.S: Moved to ...
10088 * kern/powerpc/ieee1275/crt0.S: ... here.
10090 * boot/powerpc/ieee1275/cmain.c: Moved to ...
10091 * kern/powerpc/ieee1275/cmain.c: ... here.
10093 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
10094 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
10095 instead of boot/powerpc/ieee1275/crt0.S and
10096 boot/powerpc/ieee1275/cmain.c, respectively.
10098 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
10099 sectors. It was not used anyway.
10101 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
10103 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
10104 `unused parameter' warning.
10106 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
10108 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
10110 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
10113 2005-08-28 Marco Gerards <metgerards@student.han.nl>
10115 * include/grub/normal.h (enum grub_completion_type): Added
10116 `GRUB_COMPLETION_TYPE_ARGUMENT'.
10118 * normal/cmdline.c (print_completion): Handle
10119 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
10120 * normal/menu_entry.c (store_completion): Likewise.
10122 * normal/completion.c (complete_arguments): New function.
10123 (grub_normal_do_completion): Call `complete_arguments' when the
10124 current words start with a dash.
10126 2005-08-27 Marco Gerards <metgerards@student.han.nl>
10128 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
10129 `gzio.mod' instead of `io.mod').
10131 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
10133 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
10134 (DISTDIRS): Added io and video.
10135 Rewrite the search routine to make an output consistently.
10137 * DISTLIST: Added conf/sparc64-ieee1275.mk,
10138 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
10139 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
10140 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
10141 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
10142 util/powerpc/ieee1275/misc.c.
10144 * include/grub/gzio.h: New file.
10145 * io/gzio.c: Likewise.
10147 * kern/file.c (grub_file_close): Call grub_device_close only if
10148 FILE->DEVICE is not NULL.
10150 * include/grub/mm.h [!NULL] (NULL): New macro.
10152 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
10154 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
10155 (pkgdata_MODULES): Added gzio.mod.
10156 (gzio_mod_SOURCES): New variable.
10157 (gzio_mod_CFLAGS): Likewise.
10159 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
10160 (pkgdata_MODULES): Added gzio.mod.
10161 (gzio_mod_SOURCES): New variable.
10162 (gzio_mod_CFLAGS): Likewise.
10164 * commands/cat.c: Include grub/gzio.h.
10165 (grub_cmd_cat): Use grub_gzfile_open instead of
10168 * commands/cmp.c: Include grub/gzio.h.
10169 (grub_cmd_cmp): Use grub_gzfile_open instead of
10172 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
10173 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
10175 (grub_rescue_cmd_module): Likewise.
10177 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
10179 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
10180 kern/sparc64/ieee1275/init.c because it contains _start.
10181 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
10183 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
10185 * configure.ac: Add support for sparc64 host with ieee1275
10187 * configure: Generated from configure.ac.
10188 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
10190 (grub_ofdisk_read): Likewise.
10191 (grub_ofdisk_open): Use %p to print pointer values, and cast the
10192 pointers as (void *) to remove a warning.
10193 (grub_ofdisk_close): Likewise.
10194 (grub_ofdisk_read): Likewise.
10195 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
10196 returns, so make it return void to remove a warning.
10197 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
10198 Corresponding prototype change.
10199 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
10200 values, and cast the pointers as (void *) to remove a warning.
10201 (grub_mm_dump): Likewise.
10202 * conf/sparc64-ieee1275.mk: New file.
10203 * conf/sparc64-ieee1275.rmk: Likewise.
10204 * include/grub/sparc64/setjmp.h: Likewise.
10205 * include/grub/sparc64/types.h: Likewise.
10206 * include/grub/sparc64/ieee1275/console.h: Likewise.
10207 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
10208 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
10209 * include/grub/sparc64/ieee1275/time.h: Likewise.
10210 * kern/sparc64/cache.c: Likewise.
10211 * kern/sparc64/dl.c: Likewise.
10212 * kern/sparc64/ieee1275/init.c: Likewise.
10213 * kern/sparc64/ieee1275/openfw.c: Likewise.
10215 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
10217 * util/console.c (grub_ncurses_putchar): If C is greater than
10218 0x7f, set C to a question mark.
10219 (grub_ncurses_getcharwidth): New function.
10220 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
10223 * normal/menu.c (print_entry): Made aware of Unicode. First,
10224 convert TITLE to UCS-4, and predict the cursor position by
10227 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
10229 * kern/misc.c (grub_utf16_to_utf8): Likewise.
10231 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
10233 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
10234 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
10237 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
10238 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
10239 grub_strcpy and grub_strlen. Take it into account that a space
10240 character is inserted as a delimiter.
10242 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
10244 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
10245 invalid magic in the error.
10247 * commands/search.c: New file.
10249 * util/grub-emu.c (main): Call grub_search_init and
10252 * kern/rescue.c (grub_rescue_print_disks): Removed.
10253 (grub_rescue_print_devices): New function.
10254 (grub_rescue_cmd_ls): Use grub_device_iterate with
10255 grub_rescue_print_devices instead of grub_disk_dev_iterate with
10256 grub_rescue_print_disks.
10258 * kern/partition.c (grub_partition_iterate): Return the result of
10259 PARTMAP->ITERATE instead of GRUB_ERRNO.
10261 * kern/device.c: Include grub/partition.h.
10262 (grub_device_iterate): New function.
10264 * include/grub/partition.h (grub_partition_iterate): Return int
10265 instead of grub_err_t.
10267 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
10269 [GRUB_UTIL] (grub_search_fini): Likewise.
10271 * include/grub/device.h (grub_device_iterate): New prototype.
10273 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
10275 (pkgdata_MODULES): Added search.mod.
10276 (search_mod_SOURCES): New variable.
10277 (search_mod_CFLAGS): Likewise.
10279 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
10280 (pkgdata_MODULES): Added search.mod.
10281 (search_mod_SOURCES): New variable.
10282 (search_mod_CFLAGS): Likewise.
10284 * commands/ls.c (grub_ls_list_disks): Renamed to ...
10285 (grub_ls_list_devices): ... this, and use grub_device_iterate.
10286 All callers changed.
10288 * DISTLIST: Added commands/search.c.
10290 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
10292 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
10294 (grub_getcharwidth): New function.
10296 * kern/misc.c (grub_utf8_to_ucs4): New function.
10298 * include/grub/term.h (struct grub_term): Added a new member
10300 (grub_getcharwidth): New prototype.
10302 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
10304 * term/i386/pc/console.c (map_char): New function. Segregated from
10305 grub_console_putchar.
10306 (grub_console_putchar): Use map_char.
10307 (grub_console_getcharwidth): New function.
10308 (grub_console_term): Specified grub_console_getcharwidth as
10311 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
10312 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
10314 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
10316 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
10317 on grub_strtoul completely.
10318 (write_char): Declare local variables in the beginning of the
10320 (grub_vesafb_getcharwidth): New function.
10321 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
10324 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
10326 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
10327 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
10328 commands/i386/pc/vbetest.c.
10330 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
10331 call grub_vbe_get_controller_info again, because the returned
10332 information is volatile.
10333 (grub_vbe_set_video_mode): Mostly rewritten.
10334 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
10335 grub_vbe_status_t correctly.
10336 (grub_vbe_get_video_mode_info): Likewise.
10337 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
10338 several if statements.
10340 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
10341 * commands/i386/pc/vbeinfo.c: ... this.
10343 * commands/i386/pc/vbe_test.c: Renamed to ...
10344 * commands/i386/pc/vbetest.c: ... this.
10346 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
10348 (grub_cmd_vbeinfo): ... this. Save video modes before
10349 iterating. Skip a video mode, if it is not available, not enough
10350 information is given or it is monochrome. Show the memory
10351 model. Leave the interpretation of MODEVAR to grub_strtoul
10353 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
10354 (GRUB_MOD_FINI): Likewise.
10356 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
10357 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
10358 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
10359 duplicated grub_env_get. Leave the interpretation of MODEVAR to
10360 grub_strtoul completely.
10361 (real2pm): Removed.
10362 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
10363 (GRUB_MOD_FINI): Likewise.
10365 * normal/misc.c: Include grub/mm.h.
10367 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
10368 vbe_list_modes with vbetest.mod and vbeinfo.mod.
10369 (vbe_list_modes_mod_SOURCES): Removed.
10370 (vbe_list_modes_mod_CFLAGS): Likewise.
10371 (vbe_test_mod_SOURCES): Likewise.
10372 (vbe_test_mod_CFLAGS): Likewise.
10373 (vbeinfo_mod_SOURCES): New variable.
10374 (vbeinfo_mod_CFLAGS): Likewise.
10375 (vbetest_mod_SOURCES): Likewise.
10376 (vbetest_mod_CFLAGS): Likewise.
10378 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
10380 * normal/misc.c: New file.
10382 * DISTLIST: Added normal/misc.c.
10384 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
10385 DISK to HOOK. Call HOOK with DISK.
10386 * partmap/apple.c (apple_partition_map_iterate): Likewise.
10387 * partmap/pc.c (pc_partition_map_iterate): Likewise.
10388 * partmap/sun.c (sun_partition_map_iterate): Likewise.
10390 * normal/menu_entry.c (struct screen): Added a new member
10391 "completion_shown".
10392 (completion_buffer): New global variable.
10393 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
10394 (store_completion): New function.
10395 (complete): Likewise.
10396 (clear_completions): Likewise.
10397 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
10398 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
10399 a tab, call complete.
10401 * normal/completion.c (disk_dev): Removed.
10402 (print_simple_completion): Likewise.
10403 (print_partition_completion): Likewise.
10404 (print_func): New global variable.
10405 (add_completion): Do not take the arguments WHAT or PRINT any
10406 longer. Added a new argument TYPE. Instead of printing directly,
10407 call PRINT_FUNC if not NULL.
10408 All callers changed.
10409 (complete_device): Use a local variable DEV instead of
10410 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
10411 (grub_normal_do_completion): Take a new argument HOOK. Do not
10412 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
10413 empty string, return NULL instead.
10414 All callers changed.
10416 * normal/cmdline.c (print_completion): New function.
10418 * kern/partition.c (grub_partition_iterate): Add an argument DISK
10420 All callers changed.
10422 * kern/disk.c (grub_print_partinfo): Removed.
10424 * include/grub/partition.h (struct grub_partition_map): Add a new
10425 argument DISK into HOOK of ITERATE.
10426 (grub_partition_iterate): Add a new argument DISK to HOOK.
10428 * include/grub/normal.h (enum grub_completion_type): New enum.
10429 (grub_completion_type_t): New type.
10430 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
10431 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
10432 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
10433 (GRUB_COMPLETION_TYPE_FILE): Likewise.
10434 (grub_normal_do_completion): Added a new argument HOOK.
10435 (grub_normal_print_device_info): New prototype.
10437 * include/grub/disk.h (grub_print_partinfo): Removed.
10439 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
10440 (normal_mod_SOURCES): Likewise.
10441 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10442 (normal_mod_SOURCES): Likewise.
10444 * commands/ls.c (grub_ls_list_disks): Use
10445 grub_normal_print_device_info instead of grub_print_partinfo. Free
10447 (grub_ls_list_files): Use grub_normal_print_device_info instead of
10448 duplicating the code.
10450 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
10452 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
10453 follow GCS more precisely.
10454 * commands/i386/pc/vbe_test.c: Likewise.
10455 * include/grub/i386/pc/vbe.h: Likewise.
10456 * term/i386/pc/vesafb.c: Likewise.
10457 * video/i386/pc/vbe.c: Likewise.
10459 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
10461 * DISTLIST: Added term/i386/pc/vesafb.c
10462 DISTLIST: Added video/i386/pc/vbe.c
10463 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
10464 DISTLIST: Added commands/i386/pc/vbe_test.c.
10465 * commands/i386/pc/vbe_list_modes.c: New file.
10466 * commands/i386/pc/vbe_test.c: Likewise.
10467 * term/i386/pc/vesafb.c: Likewise.
10468 * video/i386/pc/vbe.c: Likewise.
10469 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
10470 (grub_vbe_probe) Added prototype.
10471 (grub_vbe_set_video_mode) Likewise.
10472 (grub_vbe_get_video_mode) Likewise.
10473 (grub_vbe_get_video_mode_info) Likewise.
10474 (grub_vbe_set_pixel_rgb) Likewise.
10475 (grub_vbe_set_pixel_index) Likewise.
10476 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
10477 (pkgdata_MODULES): Added vesafb.mod.
10478 (pkgdata_MODULES): Added vbe_list_modes.mod.
10479 (pkgdata_MODULES): Added vbe_test.mod.
10480 (vbe_mod_SOURCES): Added.
10481 (vbe_mod_CFLAGS): Likewise.
10482 (vesafb_mod_SOURCES): Likewise.
10483 (vesafb_mod_CFLAGS): Likewise.
10484 (vbe_list_modes_mod_SOURCES): Likewise.
10485 (vbe_list_modes_mod_CFLAGS): Likewise.
10486 (vbe_test_mod_SOURCES): Likewise.
10487 (vbe_test_mod_CFLAGS): Likewise.
10489 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
10491 * normal/command.c (grub_command_execute): If INTERACTIVE is
10492 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
10493 CMDLINE. Disable the pager if INTERACTIVE is true.
10494 All callers are changed.
10496 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
10497 before reading a config file.
10498 * normal/main.c (read_config_file): Even if a command is not
10499 found, register it if it is within an entry.
10501 * util/grub-emu.c: Include sys/types.h and unistd.h.
10502 (options): Added --hold.
10503 (struct arguments): Added a new member "hold".
10504 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
10506 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
10507 cleared by a debugger, if it is not zero.
10509 * include/grub/normal.h (grub_command_execute): Add an argument
10512 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
10514 * DISTLIST: Added include/grub/i386/pc/vbe.h.
10516 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
10518 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
10519 program with another one, because the old one didn't detect a bug
10520 in gcc-3.4. Always use regparm 2, because the new test is still
10521 not enough for gcc-4.0. Someone must investigate a simple test
10522 case which detects a bug in gcc-4.0.
10524 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
10526 * DISTLIST: Added normal/completion.c.
10528 * normal/completion.c: New file.
10530 * term/i386/pc/console.c (grub_console_getwh): New function.
10531 (grub_console_term): Assign grub_console_getwh to getwh.
10533 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
10534 function is defined in normal/completion.c as
10535 grub_normal_do_completion.
10536 (grub_cmdline_get): Use grub_normal_do_completion instead of
10539 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
10540 returns non-zero, otherwise return 0.
10541 (grub_partition_iterate): First, probe the partition map. Then,
10542 call ITERATE only for this partition map.
10544 * kern/misc.c (grub_strncmp): Rewritten.
10546 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
10547 returns non-zero. Otherwise return 0.
10549 * include/grub/partition.h (grub_partition_map_iterate): Return
10550 int instead of void.
10552 * include/grub/normal.h (grub_normal_do_completion): New prototype.
10554 * include/grub/misc.h (grub_strncmp): Change the type of N to
10557 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
10560 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
10561 unsigned explicitly before comparing it with I.
10563 * kern/main.c (grub_env_write_root): Add the attribute unused into
10566 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
10567 normal/completion.c.
10568 (normal_mod_SOURCES): Likewise.
10569 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
10570 (normal_mod_SOURCES): Likewise.
10572 * normal/command.c (grub_iterate_commands): If ITERATE returns
10573 non-zero, return one immediately.
10575 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
10577 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
10578 * kern/i386/pc/startup.S: Updated Global Descriptor table's
10580 (grub_vbe_get_controller_info): New function.
10581 (grub_vbe_get_mode_info): Likewise.
10582 (grub_vbe_set_mode): Likewise.
10583 (grub_vbe_get_mode): Likewise.
10584 (grub_vbe_set_memory_window): Likewise.
10585 (grub_vbe_get_memory_window): Likewise.
10586 (grub_vbe_set_scanline_length): Likewise.
10587 (grub_vbe_get_scanline_length): Likewise.
10588 (grub_vbe_set_display_start): Likewise.
10589 (grub_vbe_get_display_start): Likewise.
10590 (grub_vbe_set_palette_data): Likewise.
10591 * include/grub/i386/pc/vbe.h: New file.
10593 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
10595 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
10596 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
10597 * DISTLIST: Likewise.
10598 * kern/ieee1275/of.c: Moved to ...
10599 * kern/ieee1275/ieee1275.c: ... here.
10601 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
10603 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
10604 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
10605 Pass 0 as `end' parameter to grub_strtoul().
10607 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
10609 * include/grub/powerpc/ieee1275/console.h: Do not include
10610 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
10612 (grub_console_cur_color): Remove i386-specific prototype.
10613 (grub_console_real_putchar): Likewise.
10614 (grub_console_checkkey): Likewise.
10615 (grub_console_getkey): Likewise.
10616 (grub_console_getxy): Likewise.
10617 (grub_console_gotoxy): Likewise.
10618 (grub_console_cls): Likewise.
10619 (grub_console_setcursor): Likewise.
10620 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
10621 Include <grub/machine/console.h>.
10622 * term/ieee1275/ofconsole.c: Likewise.
10624 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
10626 * Makefile.in (LIBLZO): New variable.
10628 * configure.ac: Check for LZO version 2.
10630 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
10631 lzo/lzo1x.h instead of lzo1x.h.
10633 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
10636 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
10637 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
10639 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
10640 copying the data from PARTITION to P.
10642 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
10644 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
10645 negative, unload the module.
10647 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
10648 map is "pc_partition_map" but not "pc".
10649 (usage): Fix the description. The options are --boot-image and
10650 --core-image but not --boot-file or --core-file.
10651 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
10652 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
10655 * util/i386/pc/grub-install.in: Do not specify --boot-file or
10656 --core-file. Specify INSTALL_DEVICE as an argument.
10658 * util/console.c: Include config.h.
10659 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
10660 [HAVE_NCURSES_H]: Include ncurses.h.
10661 [HAVE_CURSES_H]: Include curses.h.
10662 [!A_NORMAL] (A_NORMAL): Defined as zero.
10663 [!A_STANDOUT] (A_STANDOUT): Likewise.
10665 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
10667 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
10669 * configure.ac: Check for curses libraries and headers.
10671 * Makefile.in (LIBCURSES): New variable.
10673 * genmk.rb (Script::rule): Set the executable bits.
10675 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
10676 name of the PC partition map is "pc_partition_map" but not "pc".
10678 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
10680 * util/i386/pc/grub-install.in (grub_probefs): New variable.
10681 (modules): Likewise.
10682 (usage): Added descriptions for --modules and --grub-probefs.
10683 Handle --modules and --grub-probefs. Save the arguments in MODULES
10684 and GRUB_PROBEFS, respectively.
10685 Auto-detect a filesystem module against GRUBDIR. If the result is
10686 empty and modules are not specified explicitly, abort the
10687 installation. Add the result to MODULES.
10689 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
10690 disk/powerpc/ieee1275/ofdisk.c,
10691 include/grub/powerpc/ieee1275/init.h and
10692 term/powerpc/ieee1275/ofconsole.c.
10693 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
10694 term/ieee1275/ofconsole.c.
10696 * include/grub/powerpc/ieee1275/console.h: Resurrected.
10698 * COPYING: Upgraded to the latest version. Only the address of the
10699 FSF office has changed.
10701 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
10703 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
10704 kern/ieee1275.c with kern/ieee1275/of.c.
10706 * kern/ieee1275.c: Moved to ...
10707 * kern/ieee1275/of.c: ... here.
10709 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
10711 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
10714 * config.guess: Updated to the latest version from gnulib.
10715 * config.sub: Likewise.
10716 * install.sh: Likewise.
10717 * mkinstalldirs: Likewise.
10719 * include/grub/console.h: Removed. This file is arch-specific. Do
10720 not put this in include/grub.
10722 * include/grub/i386/pc/console.h: Resurrected.
10724 * util/console.c: Include grub/machine/console.h instead of
10726 * util/grub-emu.c: Likewise.
10728 2005-08-04 Marco Gerards <metgerards@student.han.nl>
10730 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
10733 From Vincent Pelletier <subdino2004@yahoo.fr>
10734 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
10735 Redefined to use grub_getwh.
10736 (grub_term): New member named getwh.
10737 (grub_getwh): New prototype.
10738 * kern/term.c (grub_getwh): New function.
10739 * term/i386/pc/console.c (grub_console_getwh): New function.
10740 (grub_console_term): New member `getwh'.
10741 * term/i386/pc/vga.c (grub_vga_getwh): New function.
10742 (grub_vga_term): New member `getwh'.
10743 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
10745 (grub_ofconsole_getw): New function.
10746 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
10747 (grub_ofconsole_term): New field named getwh and new initial
10750 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
10752 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
10753 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
10754 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
10755 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
10756 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
10757 of <grub/machine/ieee1275.h>.
10758 * commands/ieee1275/reboot.c: Likewise.
10759 * boot/powerpc/ieee1275/ieee1275.c: Move ...
10760 * kern/ieee1275.c: ... to here. All users updated. Change all
10761 parameter structs to use new type `grub_ieee1275_cell_t'.
10762 * term/powerpc/ieee1275/ofconsole.c: Move ...
10763 * term/ieee1275/ofconsole.c: ... to here. All users updated.
10764 * disk/powerpc/ieee1275/ofdisk.c: Move ...
10765 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
10766 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
10768 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
10769 Remove unused prototypes. All users updated.
10770 * include/grub/powerpc/ieee1275/console.h: Removed.
10771 * include/grub/powerpc/ieee1275/ieee1275.h: Define
10772 `grub_ieee1275_cell_t'.
10773 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
10774 Cast comparisons with -1 to the correct type.
10775 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
10776 type to match `grub_ieee1275_entry_fn'.
10778 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
10780 * DISTLIST: Added util/i386/pc/grub-probefs.c.
10782 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
10783 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
10785 (grub_probefs_SOURCES): New variable.
10787 * util/i386/pc/grub-probefs.c: New file.
10789 * util/i386/pc/grub-setup.c (main): Call
10790 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
10791 grub_hfs_init and grub_jfs_init to initialize the system. Call
10792 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
10793 grub_pc_partition_map_fini to finish the system.
10795 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
10797 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
10799 (grub_multiboot_load_elf32): Likewise.
10800 (grub_multiboot_is_elf64): Likewise.
10801 (grub_multiboot_load_elf64): Likewise.
10802 (grub_multiboot_load_elf): Likewise.
10803 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
10804 an ELF32 or ELF64 file.
10805 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
10807 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
10808 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
10809 NULL before calling FS->LABEL.
10810 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
10811 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
10812 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
10813 before calling FS->LABEL.
10815 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
10817 * util/i386/pc/grub-install.in (datadir): New variable.
10819 (pkgdatadir): New variable.
10820 (pkglibdir): Removed.
10822 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
10824 * DISTLIST: Added util/i386/pc/grub-install.in.
10826 * util/i386/pc/grub-install.in: New file.
10828 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
10829 (grub_install_SOURCES): Likewise.
10831 * genmk.rb: Added support for scripts.
10832 (Script): New class.
10833 (scripts): New variable.
10835 * Makefile.in (install-local): Install sbin_SCRIPTS by
10837 (uninstall): Remove sbin_SCRIPTS.
10839 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
10840 device, try to get a GRUB device by
10841 grub_util_biosdisk_get_grub_dev.
10844 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
10845 description for --device-map.
10847 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
10849 Change the semantics of variable hooks. They now return strings
10850 instead of error values.
10852 * util/i386/pc/grub-setup.c: Include grub/env.h.
10853 (setup): Use grub_device_set_root instead of grub_env_set.
10855 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
10856 grub_env_get instead of grub_device_set_root and
10857 grub_device_get_root, respectively.
10859 * kern/main.c (grub_env_write_root): New function.
10860 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
10861 grub_env_set instead of grub_device_set_root.
10863 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
10865 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
10866 rather than calling ENV->WRITE_HOOK afterwards.
10867 (grub_env_get): Return the result of ENV->READ_HOOK rather than
10868 passing a pointer of a pointer.
10869 (grub_register_variable_hook): Change the types of "read_hook" and
10870 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
10872 Allocate the default empty string on the heap, because this string
10873 may be freed later.
10875 * kern/device.c: Include grub/env.h.
10876 (grub_device_set_root): Removed.
10877 (grub_device_get_root): Likewise.
10878 (grub_device_open): Use grub_env_get instead of
10879 grub_device_get_root.
10881 * include/grub/env.h (grub_env_read_hook_t): New type.
10882 (grub_env_write_hook_t): Likewise.
10883 (grub_env_var): Change the types of "read_hook" and "write_hook"
10884 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
10885 (grub_register_variable_hook): Likewise.
10887 * include/grub/device.h (grub_device_set_root): Removed.
10888 (grub_device_set_root): Likewise.
10890 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
10891 make sure that DIRNAME terminates with '/', so that
10892 grub_fat_find_dir will fail if PATH is not a directory.
10894 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
10896 Use the qualifier auto for print_files and print_files_long.
10897 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
10899 Put a newline only if there is no error.
10900 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
10903 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
10905 * kern/partition.c (grub_partition_probe): Initialize PART to
10906 NULL. Otherwise, when no partition map is registered, this returns
10909 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
10911 * partmap/apple.c (apple_partition_map_iterate): Check if POS
10912 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
10915 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
10917 * commands/ls.c (grub_ls_list_disks): Print the filesystem
10918 information on each device, if it does not have partitions. Print
10919 "Device" instead of "Disk", because this function is not specific
10922 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
10923 static to ensure that it is put on the memory rather than a
10926 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
10928 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
10929 (grub_cat_init): Likewise.
10930 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
10931 (options): Likewise.
10932 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
10933 (grub_configfile_init): Likewise.
10934 * font/manager.c (GRUB_MOD_INIT): Likewise.
10935 * commands/help.c (GRUB_MOD_INIT): Likewise.
10936 (grub_help_init): Likewise.
10937 * normal/command.c (grub_command_init): Likewise.
10938 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
10939 * disk/loopback.c (grub_loop_init): Likewise.
10940 (GRUB_MOD_INIT): Likewise.
10941 * commands/ls.c (grub_ls_init): Likewise.
10942 (GRUB_MOD_INIT): Likewise.
10943 (options): Likewise.
10944 * commands/boot.c (grub_boot_init): Likewise.
10945 (GRUB_MOD_INIT): Likewise.
10946 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
10947 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
10948 (GRUB_MOD_INIT): Likewise.
10949 * commands/cmp.c (grub_cmp_init): Likewise.
10950 (GRUB_MOD_INIT): Likewise.
10952 * normal/arg.c: Use <> instead of "" to include header files.
10953 (SHORT_ARG_HELP): New macro.
10954 (SHORT_ARG_USAGE): Likewise.
10955 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
10956 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
10958 (find_short): Check if C is 'h' or 'u' explicitly.
10959 (grub_arg_show_help): Use space characters instead of tabs. Treat
10960 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
10961 are shown with --help and --usage only if they are not used for
10962 the command itself.
10963 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
10966 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
10967 const into "longarg". Change the type of "shortarg" to int.
10969 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
10971 * boot/i386/pc/boot.S (boot_drive_check): New label.
10973 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
10976 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
10977 which do not pass a boot drive correctly. Copied from GRUB Legacy.
10979 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
10981 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
10982 When turning off Gate A20, skip the check and return immediately,
10983 because this is not fatal usually.
10985 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
10987 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
10988 be 0x7C00 instead of 0x8000.
10990 * boot/i386/pc/pxeboot.S: Rewritten.
10992 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
10994 (gate_a20_check_state): Read a byte from 0x108000. Invert the
10997 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
10999 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
11000 robustness. This routine now supports a BIOS call and System
11001 Control Port A to modify the gate A20.
11003 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
11004 Increased to 0x440.
11006 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
11008 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
11009 device path and resulting ihandle.
11010 (grub_ofdisk_close): dprintf the ihandle being closed.
11011 (grub_ofdisk_read): dprintf function parameters.
11012 * kern/mm.c (grub_mm_init_region): Likewise.
11013 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
11014 (grub_linux_boot): dprintf the Linux entry point, initrd address and
11015 size, and boot arguments.
11016 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
11017 before loading into memory.
11018 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
11019 before loading into memory.
11021 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
11023 * kern/mm.c: Added much documentation.
11024 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
11025 8, set to 5 instead of 8.
11027 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
11029 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
11031 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
11032 (grub_mkdevicemap_SOURCES): New variable.
11034 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
11035 lib/device.c of GRUB Legacy.
11037 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
11039 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
11040 instead of PATH is NULL.
11042 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
11044 * commands/cmp.c (BUFFER_SIZE): New macro.
11045 (grub_cmd_cmp): Close the right file at the right time. Compare
11046 only data just read. Don't report files of different size as
11047 identical. Dynamically allocate buffers. Move variable
11048 declarations at the beginning of function.
11050 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
11052 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
11055 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
11057 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
11058 when backspace is pressed at beginning of line.
11060 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
11062 * DISTLIST: Added genfslist.sh.
11064 * normal/main.c (fs_module_list): New variable.
11065 (autoload_fs_module): New function.
11066 (read_fs_list): Likewise.
11067 (grub_normal_execute): Call read_fs_list.
11069 * kern/fs.c (grub_fs_autoload_hook): New variable.
11070 (grub_fs_probe): Added support for auto-loading.
11072 * include/grub/normal.h (struct grub_fs_module_list): New struct.
11073 (grub_fs_module_list_t): New type.
11075 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
11076 (grub_fs_autoload_hook): New prototype.
11078 * genfslist.sh: New file.
11080 * genmk.rb: Added a rule to generate a filesystem list.
11082 2005-06-30 Marco Gerards <metgerards@student.han.nl>
11084 * configure.ac: Fix the test for cross-compiling.
11086 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
11087 define GRUB_UTIL anymore.
11089 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
11090 so this function works on other systems than just big endian.
11091 (load_modules): Likewise.
11092 (add_segments): Likewise.
11094 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
11096 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
11097 contains `l' modifier, get a long from va_arg().
11099 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
11101 * kern/mm.c (grub_free): If the next free block which is being
11102 merged is the first free block, set the first block to the block
11104 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
11106 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
11108 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
11109 `grub_ieee1275_chosen'.
11111 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
11113 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
11114 (grub_ieee1275_chosen): New variable.
11115 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
11117 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
11118 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
11119 Rename first argument to `phandle' for consistency.
11120 (grub_ieee1275_get_property_length): Likewise.
11121 (grub_ieee1275_next_property): Likewise. Change type of first argument
11122 to grub_ieee1275_phandle_t.
11123 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
11124 Move export next to declaration.
11125 (grub_ieee1275_chosen): New variable.
11126 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
11127 Correct cosmetic typo.
11128 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
11129 `grub_ieee1275_chosen'.
11130 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
11131 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
11132 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
11133 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
11134 `grub_ieee1275_chosen'.
11136 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
11138 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
11140 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
11141 /chosen/bootargs as "variable=value" pairs.
11143 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
11145 * include/grub/misc.h (grub_dprintf): New macro.
11146 (grub_real_dprintf): New prototype.
11147 (grub_strword): Likewise.
11148 (grub_iswordseparator): Likewise.
11149 * kern/misc.c (grub_real_dprintf): New function.
11150 (grub_strword): Likewise.
11151 (grub_iswordseparator): Likewise.
11153 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
11155 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
11156 (roundup): Remove macro.
11157 (grub_ieee1275_flags): Make static.
11158 (grub_ieee1275_realmode): Remove.
11159 (grub_ieee1275_test_flag): New function.
11160 (grub_ieee1275_set_flag): Likewise.
11161 (find_options): Rename to `grub_ieee1275_find_options'; update
11162 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
11163 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
11164 (cmain): New prototype.
11165 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
11166 `grub_ieee1275_flags' directly.
11167 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
11168 machine/biosdisk.h.
11169 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
11170 Don't include grub/machine/init.h.
11171 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
11172 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
11174 (grub_ieee1275_realmode): Likewise.
11175 (grub_ieee1275_flag): New enum.
11176 (grub_ieee1275_test_flag): New prototype.
11177 (grub_ieee1275_set_flag): New prototype.
11178 * include/grub/powerpc/ieee1275/init.h: Remove file.
11179 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
11180 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
11181 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
11182 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
11184 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
11185 `grub_ieee1275_test_flag'.
11186 (grub_ieee1275_encode_devname): Likewise.
11188 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
11190 * include/grub/powerpc/ieee1275/ieee1275.h
11191 (grub_ieee1275_encode_devname): New prototype.
11192 (grub_ieee1275_get_filename): Likewise.
11193 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
11195 (grub_set_prefix): Likewise.
11196 (grub_machine_init): Call grub_set_prefix.
11197 * kern/powerpc/ieee1275/openfw.c: Fix typos.
11198 (grub_parse_type): New enum.
11199 (grub_ieee1275_get_devargs): New function.
11200 (grub_ieee1275_get_devname): Likewise.
11201 (grub_ieee1275_parse_args): Likewise.
11202 (grub_ieee1275_get_filename): Likewise.
11203 (grub_ieee1275_encode_devname): Likewise.
11205 2005-03-30 Marco Gerards <metgerards@student.han.nl>
11207 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
11208 `grub_loader_unset'.
11210 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
11212 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
11213 instead of grub_ieee1275_interpret.
11214 (grub_halt_init): New function.
11215 (grub_halt_fini): Likewise.
11216 (GRUB_MOD_INIT): Correct message grammar.
11217 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
11218 instead of grub_ieee1275_interpret.
11219 (grub_reboot_init): New function.
11220 (grub_reboot_fini): Likewise.
11221 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
11222 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
11223 util/i386/pc/misc.c with commands/ieee1275/halt.c,
11224 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
11225 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
11227 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
11229 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
11231 (grub_halt): Likewise.
11232 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
11233 (cmain): Remove __attribute__((unused)).
11234 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
11235 (grub_heap_len): Likewise.
11236 (grub_machine_fini): New function.
11237 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
11238 (grub_halt): Likewise.
11239 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
11241 * util/powerpc/ieee1275/misc.c: New file.
11243 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
11245 * DISTLIST: New file.
11246 * gendistlist.sh: Likewise.
11248 * Makefile.in (COMMON_DISTFILES): Removed.
11249 (BOOT_DISTFILES): Likewise.
11250 (CONF_DISTFILES): Likewise.
11251 (DISK_DISTFILES): Likewise.
11252 (FS_DISTFILES): Likewise.
11253 (INCLUDE_DISTFILES): Likewise.
11254 (KERN_DISTFILES): Likewise.
11255 (LOADER_DISTFILES): Likewise.
11256 (TERM_DISTFILES): Likewise.
11257 (UTIL_DISTFILES): Likewise.
11258 (DISTFILES): Likewise.
11259 (uninstall): Uninstall files in $(pkgdata_DATA).
11260 (DISTLIST): New target.
11261 (distdir): Use the contents of the file DISTLIST to get a list of
11264 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
11266 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
11267 descriptor. This is ported from GRUB Legacy.
11269 * gencmdlist.sh: Added an extra semicolon to make it work with
11270 old sed versions. Reported by Robert Bihlmeyer
11271 <robbe@orcus.priv.at>.
11273 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
11275 Automatic loading of commands is supported.
11277 * normal/main.c (read_command_list): New function.
11278 (grub_normal_execute): Call read_command_list.
11280 * normal/command.c (grub_register_command): Return zero or CMD.
11281 Allocate CMD->NAME from the heap.
11282 Initialize CMD->MODULE_NAME to zero.
11283 Find the same name as well. If the same command is found and it is
11284 a dummy command, overwrite members. If it is not a dummy command,
11286 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
11287 (grub_command_find): If a dummy command is found, load a module
11288 and retry to find a command only once.
11290 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
11291 make sure that each command is loaded.
11293 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
11295 (struct grub_command): Remove const from the member `name'.
11296 Add a new member `module_name'.
11297 (grub_register_command): Return grub_command_t.
11299 * commands/help.c (grub_cmd_help): Call grub_command_find to make
11300 sure that each command is loaded.
11302 * genmk.rb (PModule::rule): Specify a module name without the
11303 suffix ".mod" to gencmdlist.sh.
11305 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
11307 * gencmdlist.sh: New file.
11309 * genmk.rb (PModule::rule): Generate a rule for a command list.
11311 Generate command.lst from $(COMMANDFILES).
11313 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
11314 (DATA): Added $(pkgdata_DATA).
11315 (install-local): Install files in $(pkgdata_DATA).
11317 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
11319 * term/i386/pc/vga.c (debug_command): Removed.
11320 (GRUB_MOD_INIT): Do not register the command "debug".
11322 From Hollis Blanchard:
11323 * commands/configfile.c: New file.
11324 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11325 commands/configfile.c.
11326 (pkgdata_MODULES): Added configfile.mod.
11327 (configfile_mod_SOURCES): New variable.
11328 (configfile_mod_CFLAGS): Likewise.
11329 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
11330 commands/configfile.c.
11331 (pkgdata_MODULES): Added configfile.mod.
11332 (configfile_mod_SOURCES): New variable.
11333 (configfile_mod_CFLAGS): Likewise.
11334 * util/grub-emu.c (main): Call grub_configfile_init and
11335 grub_configfile_fini.
11336 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
11338 [GRUB_UTIL] (grub_configfile_fini): Likewise.
11340 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
11342 * normal/arg.c (grub_arg_show_help): Do not show the bug report
11345 * commands/help.c (grub_cmd_help): Do not print newlines after
11346 the last command in print_command_help.
11348 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
11350 * commands/default.h: New file.
11351 * commands/timeout.h: Likewise.
11352 * normal/context.c: Likewise.
11354 * util/misc.c: Do not include sys/times.h.
11355 Include sys/time.h and grub/machine/time.h.
11356 (grub_get_rtc): Rewritten with gettimeofday.
11358 * util/grub-emu.c (main): Call grub_default_init and
11359 grub_timeout_init before grub_normal_init, and call
11360 grub_timeout_fini and grub_default_fini after grub_main.
11362 * util/console.c (grub_ncurses_checkkey): Return the read
11365 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
11368 * normal/main.c (read_config_file): Push MENU. If this fails,
11369 print an error and wait for a user input.
11370 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
11371 If a menu is empty or an error occurs, pop MENU.
11372 (grub_normal_execute): Pop and free MENU after grub_menu_run
11375 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
11377 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
11379 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
11381 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
11383 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
11386 * include/grub/normal.h (struct grub_menu_list): New struct.
11387 (grub_menu_list_t): New type.
11388 (struct grub_context): New struct.
11389 (grub_context_t): New type.
11390 (grub_register_command): Got rid of EXPORT_FUNC.
11391 (grub_unregister_command): Likewise.
11392 (grub_context_get): New prototype.
11393 (grub_context_get_current_menu): Likewise.
11394 (grub_context_push_menu): Likewise.
11395 (grub_context_pop_menu): Likewise.
11396 [GRUB_UTIL] (grub_default_init): Likewise.
11397 [GRUB_UTIL] (grub_default_fini): Likewise.
11398 [GRUB_UTIL] (grub_timeout_init): Likewise.
11399 [GRUB_UTIL] (grub_timeout_fini): Likewise.
11401 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
11402 commands/timeout.c and normal/context.c.
11403 (pkgdata_MODULES): Added default.mod and timeout.mod.
11404 (normal_mod_SOURCES): Added normal/context.c.
11405 (default_mod_SOURCES): New variable.
11406 (default_mod_CFLAGS): Likewise.
11407 (timeout_mod_SOURCES): Likewise.
11408 (timeout_mod_CFLAGS): Likewise.
11409 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
11411 (pkgdata_MODULES): Added default.mod and timeout.mod.
11412 (normal_mod_SOURCES): Added normal/context.c.
11413 (default_mod_SOURCES): New variable.
11414 (default_mod_CFLAGS): Likewise.
11415 (timeout_mod_SOURCES): Likewise.
11416 (timeout_mod_CFLAGS): Likewise.
11418 * Makefile.in (all-local): Added $(MKFILES).
11420 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
11422 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
11423 (grub_emu_SOURCES): Likewise.
11424 (pkgdata_MODULES): Add `sun.mod'.
11425 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
11426 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11428 (pkgdata_MODULES): Add `sun.mod'.
11429 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
11430 * include/grub/partition.h (grub_sun_partition_map_init): New
11432 (grub_sun_partition_map_fini): Likewise.
11433 * partmap/sun.c: New file.
11434 * util/grub-emu.c (main): Initialize and de-initialize the sun
11435 partitionmap support.
11437 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
11439 This implements an Emacs-like menu entry editor.
11441 * normal/menu_entry.c: New file.
11443 * util/console.c (grub_ncurses_putchar): Translate some Unicode
11444 characters to ASCII.
11445 (saved_char): New variable.
11446 (grub_ncurses_checkkey): Rewritten completely.
11447 (grub_ncurses_getkey): Likewise.
11448 (grub_ncurses_init): Call raw instead of cbreak.
11450 * normal/menu.c (print_entry): Do not put a space.
11451 (init_page): Renamed to ...
11452 (grub_menu_init_page): ... this. All callers changed.
11453 (edit_menu_entry): Removed.
11454 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
11456 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
11458 * kern/misc.c (grub_vprintf): Call grub_refresh.
11460 * normal/menu.c (DISP_LEFT): Renamed to ...
11461 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
11462 * normal/menu.c (DISP_UP): Renamed to ...
11463 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
11464 * normal/menu.c (DISP_RIGHT): Renamed to ...
11465 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
11466 * normal/menu.c (DISP_DOWN): Renamed to ...
11467 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
11468 * normal/menu.c (DISP_HLINE): Renamed to ...
11469 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
11470 * normal/menu.c (DISP_VLINE): Renamed to ...
11471 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
11472 * normal/menu.c (DISP_UL): Renamed to ...
11473 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
11474 * normal/menu.c (DISP_UR): Renamed to ...
11475 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
11476 * normal/menu.c (DISP_LL): Renamed to ...
11477 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
11478 * normal/menu.c (DISP_LR): Renamed to ...
11479 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
11480 * normal/menu.c (TERM_WIDTH): Renamed to ...
11481 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
11482 * normal/menu.c (TERM_HEIGHT): Renamed to ...
11483 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
11484 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
11485 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
11486 * normal/menu.c (TERM_MARGIN): Renamed to ...
11487 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
11488 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
11489 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
11490 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
11491 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
11492 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
11493 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
11494 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
11495 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
11496 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
11497 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
11498 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
11499 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
11500 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
11501 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
11502 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
11503 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
11504 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
11505 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
11506 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
11507 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
11508 All callers changed.
11510 * include/grub/normal.h: New prototype.
11512 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11513 normal/menu_entry.c.
11514 (normal_mod_SOURCES): Likewise.
11515 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11516 (normal_mod_SOURCES): Likewise.
11518 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
11520 * include/grub/normal.h (grub_halt_init): New prototype.
11521 (grub_halt_fini): Likewise.
11522 (grub_reboot_init): Likewise.
11523 (grub_reboot_fini): Likewise.
11525 * util/grub-emu.c: Include signal.h.
11526 (main_env): New global variable.
11527 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
11529 (grub_machine_fini): New function.
11530 (main): Call grub_halt_init and grub_reboot_init before
11531 grub_main, and grub_reboot_fini and grub_halt_fini after it.
11532 Call setjmp with MAIN_ENV to go back afterwards.
11533 Call grub_machine_fini right before return.
11535 * include/grub/util/misc.h: Include setjmp.h.
11536 (main_env): New prototype.
11538 * include/grub/kernel.h (grub_machine_fini): New prototype.
11539 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
11540 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
11542 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
11543 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
11544 * term/i386/pc/console.c (grub_console_fini): Likewise.
11546 * util/i386/pc/misc.c: New file.
11548 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11549 util/i386/pc/misc.c, commands/i386/pc/halt.c and
11550 commands/i386/pc/reboot.c.
11552 2005-02-14 Guillem Jover <guillem@hadrons.org>
11554 * include/grub/dl.h (grub_dl_check_header): New prototype.
11555 (grub_arch_dl_check_header): Change return type to grub_err_t,
11556 remove size parameter and export function. Update all callers.
11557 * kern/dl.c (grub_dl_check_header): New function.
11558 (grub_dl_load_core): Use `grub_dl_check_header' instead of
11559 `grub_arch_dl_check_header'. Check ELF type. Check if sections
11560 are inside the core.
11561 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
11562 independent ELF header checks.
11563 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
11564 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
11565 `grub_dl_check_header' instead of explicit checks. Check for the
11567 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
11568 `grub_dl_check_header' instead of explicit checks. Remove arch
11569 specific ELF header checks.
11571 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
11574 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
11576 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
11577 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
11579 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
11581 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
11582 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
11583 (part_map_iterate): Clear `grub_errno' and return 0 if
11584 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
11585 * partmap/amiga.c (amiga_partition_map_iterate): Return
11586 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
11587 * partmap/apple.c (apple_partition_map_iterate): Likewise.
11589 2005-02-01 Guillem Jover <guillem@hadrons.org>
11591 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
11594 2005-01-31 Marco Gerards <metgerards@student.han.nl>
11596 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
11598 (grub_rescue_cmd_linux): New prototype.
11599 (grub_rescue_cmd_initrd): Likewise.
11600 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
11602 (grub_linux_release_mem): Release the memory for the initrd.
11603 (grub_load_linux): Renamed from this...
11604 (grub_rescue_cmd_linux): ...To this. Changed all callers.
11605 Changed `entry' not to be static. Loop over memory regions to
11606 find another one when the default fails.
11607 (grub_rescue_cmd_initrd): New function.
11608 (grub_linux_init): Remove function.
11609 (grub_linux_fini): Likewise.
11610 (GRUB_MOD_INIT): Register `initrd'.
11611 (GRUB_MOD_FINI): Unregister `initrd'.
11612 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
11614 (grub_linux_normal_fini): Likewise.
11615 (GRUB_MOD_INIT): Register `initrd'.
11616 (GRUB_MOD_FINI): Unregister `initrd'.
11618 2005-01-31 Marco Gerards <metgerards@student.han.nl>
11620 * commands/help.c: New file.
11621 * normal/arg.c (show_help): Renamed to...
11622 (grub_arg_show_help): ... this.
11623 * commands/i386/pc/halt.c: New file.
11624 * commands/i386/pc/reboot.c: Likewise.
11625 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
11626 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
11627 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
11628 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
11630 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11632 (pkgdata_MODULES): Add `help.mod'.
11633 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
11634 * grub/i386/pc/init.h (grub_reboot): New prototype.
11635 (grub_halt): Likewise.
11636 * include/grub/normal.h (grub_arg_show_help): New prototype.
11637 (grub_help_init): Likewise.
11638 (grub_help_fini): Likewise.
11639 * util/grub-emu.c (main): Initialize and deinitialize the help
11642 * normal/cmdline.c (grub_cmdline_get): Doc fix.
11644 * normal/command.c (grub_command_init): Fixed the description of
11645 the `set' and `unset' commands.
11647 2005-01-31 Marco Gerards <metgerards@student.han.nl>
11649 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
11651 * commands/ieee1275/halt.c: New file.
11652 * commands/ieee1275/reboot.c: Likewise.
11653 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
11654 `__attribute__ ((unused))'. Some GCS related fixed.
11655 (grub_suspend_init) [GRUB_UTIL]: Function removed.
11656 (grub_suspend_fini): Likewise.
11657 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
11659 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
11660 (halt_mod_CFLAGS): New variables.
11661 * include/grub/powerpc/ieee1275/ieee1275.h
11662 (grub_ieee1275_interpret): New prototype.
11664 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
11666 * include/grub/misc.h (memmove): New prototype.
11667 (memcpy): Likewise.
11669 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
11671 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
11672 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
11674 2005-01-22 Marco Gerards <metgerards@student.han.nl>
11676 * kern/misc.c (grub_strndup): Function rewritten.
11678 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
11680 * normal/menu.c (TERM_WIDTH): Macro redefined.
11681 (TERM_TOP_BORDER_Y): Likewise.
11682 (draw_border): Replaced while-loop by a for-loop. Make the number
11683 of lines consistent with the number of lines displayed in
11684 print_entries. Added a margin below the rectangle.
11685 (print_entry): Make the entry fit in the rectangle.
11686 (print_entries): Display the scroll arrows next to the right
11689 2005-01-21 Marco Gerards <metgerards@student.han.nl>
11691 * fs/minix.c (grub_minix_find_file): Reserve more space for
11692 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
11693 `grub_strncpy' to copy `path' into it.
11695 2005-01-21 Marco Gerards <metgerards@student.han.nl>
11697 Add the loopback device, a device via which files can be accessed
11700 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
11701 (pkgdata_MODULES): Add loopback.mod.
11702 (loopback_mod_SOURCES): New variable.
11703 (loopback_mod_CFLAGS): Likewise.
11704 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11706 (pkgdata_MODULES): Add loopback.mod.
11707 (loopback_mod_SOURCES): New variable.
11708 (loopback_mod_CFLAGS): Likewise.
11709 * disk/loopback.c: new file.
11710 * include/grub/normal.h (grub_loop_init): New prototype.
11711 (grub_loop_fini): New prototype.
11712 * util/grub-emu.c (main): Initialize and de-initialize loopback
11714 * include/grub/disk.h (grub_disk_dev_id): Add
11715 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
11717 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
11719 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
11721 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
11722 (suspend_mod_SOURCES): New variable.
11723 (suspend_mod_CFLAGS): Likewise.
11724 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
11726 * commands/ieee1275/suspend.c: New file.
11728 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
11730 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
11731 ((unused))' to `__attribute__ ((used))'.
11732 (GRUB_MOD_FINI): Likewise.
11733 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
11734 * genmk.rb (PModule): Assign space to common symbols when linking
11737 2005-01-20 Marco Gerards <metgerards@student.han.nl>
11739 * include/grub/mm.h (grub_mm_init_region): Change the type of the
11740 `unsigned' arguments to `grub_size_t'.
11741 (grub_malloc): Likewise.
11742 (grub_realloc): Likewise.
11743 (grub_memalign): Likewise.
11744 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
11745 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
11746 * util/misc.c (grub_malloc): Likewise.
11747 (grub_realloc): Likewise.
11748 * kern/mm.c (get_header_from_pointer): Change the casts to
11749 `unsigned' into a cast to `grub_size_t'.
11751 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
11752 point to `currnode' when `currnode' is changed.
11754 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
11755 Schottelius <nico-linux@schottelius.org>.
11757 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
11759 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
11760 (note_path): Remove variable.
11761 (GRUB_IEEE1275_NOTE_NAME): New macro.
11762 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
11763 (grub_ieee1275_note_hdr): New structure.
11764 (grub_ieee1275_note_desc): Likewise.
11765 (grub_ieee1275_note): Likewise.
11766 (load_note): Remove `dir' argument. All callers updated. Remove
11767 `note_img' and `path'. Do not load a file from `note_path'.
11768 Initialize a struct grub_ieee1275_note and write that to `out'.
11769 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
11771 2005-01-05 Marco Gerards <metgerards@student.han.nl>
11773 * util/misc.c (grub_util_read_image): Revert last change. It
11774 called `grub_util_read_at', which seeks from the beginning of the
11777 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
11779 * TODO: Add note about endianness in grub-mkimage.
11780 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
11782 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
11783 (grub_mkimage_SOURCES): New target.
11784 * include/grub/kernel.h (grub_start_addr): Remove variable.
11785 (grub_end_addr): Likewise.
11786 (grub_total_module_size): Likewise.
11787 (grub_kernel_image_size): Likewise.
11788 (GRUB_MODULE_MAGIC): New constant.
11789 (grub_module_info): New structure.
11790 (grub_arch_modules_addr): New prototype.
11791 (grub_get_end_addr): Remove prototype.
11792 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
11793 * include/grub/powerpc/ieee1275/kernel.h: New file.
11794 * include/grub/util/misc.h (grub_util_get_fp_size): New
11796 (grub_util_read_at): Likewise.
11797 (grub_util_write_image_at): Likewise.
11798 * kern/main.c (grub_get_end_addr): Remove function.
11799 (grub_load_modules): Call grub_arch_modules_addr instead of using
11800 grub_end_addr. Look for a grub_module_info struct in memory. Use
11801 the grub_module_info fields instead of calling grub_get_end_addr
11802 as loop conditions. Move grub_add_unused_region code here.
11803 (grub_add_unused_region): Remove function.
11804 * kern/i386/pc/init.c: Include grub/cache.h.
11805 (grub_machine_init): Remove call to grub_get_end_addr. Remove
11806 one call to add_mem_region.
11807 (grub_arch_modules_addr): New function.
11808 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
11809 (grub_total_module_size): Likewise.
11810 Include grub/machine/kernel.h.
11811 (grub_arch_modules_addr): New function.
11812 * util/grub-emu.c (grub_end_addr): Remove variable.
11813 (grub_total_module_size): Likewise.
11814 (grub_arch_modules_addr): New function.
11815 * util/misc.c: Include unistd.h.
11816 (grub_util_get_fp_size): New function.
11817 (grub_util_read_at): Likewise.
11818 (grub_util_write_image_at): Likewise.
11819 (grub_util_read_image): Call grub_util_read_at.
11820 (grub_util_write_image): Call grub_util_write_image_at.
11821 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
11822 additional memory in kernel_img for a struct grub_module_info.
11823 Fill in that grub_module_info.
11824 * util/powerpc/ieee1275/grub-mkimage.c: New file.
11826 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
11828 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
11830 * include/grub/powerpc/ieee1275/ieee1275.h
11831 (grub_ieee1275_milliseconds): New prototype.
11832 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
11834 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
11835 grub_ieee1275_milliseconds.
11837 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
11839 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
11841 (find_options): New function.
11842 (cmain): Call find_options.
11843 * include/grub/powerpc/ieee1275/ieee1275.h
11844 (grub_ieee1275_realmode): New extern variable.
11845 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
11846 grub_map if grub_ieee1275_realmode is false.
11848 2004-12-29 Marco Gerards <metgerards@student.han.nl>
11850 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
11851 lines are inserted and make it work like readline. Reported by
11852 Vincent Pelletier <subdino2004@yahoo.fr>.
11854 2004-12-28 Marco Gerards <metgerards@student.han.nl>
11856 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
11858 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
11859 `kern/powerpc/cache.S'.
11861 2004-12-27 Marco Gerards <metgerards@student.han.nl>
11863 * genmk.rb: Handle the `Program' class in the main loop. Written
11864 by Johan Rydberg <jrydberg@gnu.org>.
11865 (Program): New class.
11866 (programs): New variable.
11867 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
11868 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
11869 instead of "grub/kernel.h". Include <grub/machine/init.h>.
11870 (help_arch): Function removed.
11871 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
11872 `powerpc/libgcc.h' and `loader.h'.
11873 (pkgdata_PROGRAMS): New variable.
11874 (sbin_UTILITIES): Variable removed.
11875 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
11876 (grubof_SOURCES): Variable re-defined so it only includes the
11877 core functionality.
11878 (grubof_CFLAGS): Remove `-DGRUBOF'.
11879 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
11880 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
11881 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
11882 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
11883 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
11884 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
11885 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
11886 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
11887 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
11888 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
11889 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
11890 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
11891 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
11892 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
11893 (pc_mod_CFLAGS): New variables.
11894 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
11895 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
11896 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
11897 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
11899 * include/grub/i386/pc/init.h (grub_os_area_addr)
11900 (rub_os_area_size): ... to here.
11901 * include/grub/powerpc/ieee1275/ieee1275.h
11902 (grub_ieee1275_entry_fn): Export symbol.
11903 * include/grub/powerpc/ieee1275/init.h: New file.
11904 * include/grub/powerpc/libgcc.h: Likewise.
11905 * include/grub/cache.h: Likewise.
11906 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
11907 <hollis@penguinppc.org>.
11908 * kern/dl.c: Include <grub/cache.h>.
11909 (grub_dl_flush_cache): New function.
11910 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
11912 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
11913 (grub_console_init): Removed prototypes.
11914 (grub_machine_init): Don't initialize the modules anymore.
11915 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
11917 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
11918 Macro undef removed.
11919 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
11920 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
11921 relocation `R_PPC_REL32'. Return an error when the relocation is
11923 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
11924 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
11925 * util/misc.c (grub_arch_sync_caches): Likewise.
11927 2004-12-19 Marco Gerards <metgerards@student.han.nl>
11929 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
11930 `symlist.c', add `grubof_symlist.c'.
11931 (symlist.c): Variable removed.
11932 (grubof_HEADERS): Variable added.
11933 (grubof_symlist.c): New target.
11934 (kernel_syms.lst): Use `grubof_HEADERS' instead of
11935 `kernel_img_HEADERS'.
11936 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
11937 * kern/powerpc/dl.c: New file.
11938 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
11940 (grub_arch_dl_relocate_symbols): Likewise.
11941 (grub_register_exported_symbols): Likewise.
11943 2004-12-13 Marco Gerards <metgerards@student.han.nl>
11945 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
11946 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
11947 to fail instead. Reported by Vincent Pelletier
11948 <subdino2004@yahoo.fr>.
11950 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
11951 it is not allocated. Reported by Vincent Pelletier
11952 <subdino2004@yahoo.fr>.
11954 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
11955 output so the output looks better.
11957 2004-12-04 Marco Gerards <metgerards@student.han.nl>
11959 Modulize the partition map support and add support for the amiga
11962 * commands/ls.c: Include <grub/partition.h> instead of
11963 <grub/machine/partition.h>.
11964 * kern/disk.c: Likewise.
11965 * kern/rescue.c: Likewise.
11966 * loader/i386/pc/chainloader.c: Likewise.
11967 * normal/cmdline.c: Likewise.
11968 * kern/powerpc/ieee1275/init.c: Likewise.
11969 (grub_machine_init): Call `grub_pc_partition_map_init',
11970 `grub_amiga_partition_map_init' and
11971 `grub_apple_partition_map_init'.
11972 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
11973 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
11974 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
11975 `partition.h' and `pc_partition.h'.
11976 (grub_setup_SOURCES): Remove
11977 `disk/i386/pc/partition.c'. Add `kern/partition.c',
11978 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
11979 (grub_emu_SOURCES): Likewise.
11980 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
11981 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
11982 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
11983 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
11984 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
11985 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
11986 (grubof_SOURCES): Likewise.
11987 * disk/i386/pc/partition.c: File removed.
11988 * disk/powerpc/ieee1275/partition.c: Likewise.
11989 * include/grub/powerpc/ieee1275/partition.h: Likewise.
11990 * include/grub/i386/pc/partition.h: Likewise.
11991 * kern/partition.c: New file.
11992 * partmap/amiga.c: Likewise.
11993 * partmap/apple.c: Likewise.
11994 * partmap/pc.c: Likewise.
11995 * include/grub/partition.h: Likewise..
11996 * include/grub/pc_partition.h: Likewise.
11997 * util/grub-emu.c: Include <grub/partition.h> instead of
11998 <grub/machine/partition.h>.
11999 (main): Call `grub_pc_partition_map_init',
12000 `grub_amiga_partition_map_init' and
12001 `grub_apple_partition_map_init' and deinitialize afterwards.
12002 * util/i386/pc/biosdisk.c: Include `#include
12003 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
12004 `<grub/machine/partition.h>'.
12005 * util/i386/pc/grub-setup.c: Likewise.
12006 * util/i386/pc/biosdisk.c: Likewise.
12007 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
12008 partition information in case of a PC partition.
12009 * util/i386/pc/grub-setup.c: Include `#include
12010 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
12011 `<grub/machine/partition.h>'.
12012 (setup): Only access the PC specific partition information in case
12015 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
12017 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
12018 (grub_longjmp): Likewise.
12019 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
12021 * normal/powerpc/setjmp.S: New file.
12022 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
12023 `normal/powerpc/setjmp.S'.
12024 (grubof_CFLAGS): Add `-DGRUBOF'.
12025 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
12026 [GRUB_UTIL && !GRUBOF].
12028 2004-11-16 Marco Gerards <metgerards@student.han.nl>
12030 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
12031 property named `name'. Correctly handle the error returned by
12032 `grub_ieee1275_finddevice' if a device can not be opened.
12034 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
12036 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
12037 `actual' for negativity.
12038 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
12041 2004-11-01 Marco Gerards <metgerards@student.han.nl>
12043 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
12044 (PAGE_OFFSET): New macro.
12045 (CRTC_ADDR_PORT): Likewise.
12046 (CRTC_DATA_PORT): Likewise.
12047 (START_ADDR_HIGH_REGISTER): Likewise.
12048 (START_ADDR_LOW_REGISTER): Likewise.
12049 (GRAPHICS_ADDR_PORT): Likewise.
12050 (GRAPHICS_DATA_PORT): Likewise.
12051 (READ_MAP_REGISTER): Likewise.
12052 (INPUT_STATUS1_REGISTER): Likewise.
12053 (INPUT_STATUS1_VERTR_BIT): Likewise.
12054 (page): New variable.
12055 (wait_vretrace): New function.
12056 (set_read_map): Likewise.
12057 (set_start_address): Likewise.
12058 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
12060 (check_vga_mem): Take the page into account.
12061 (write_char): Likewise.
12062 (write_cursor): Likewise.
12063 (scroll_up): Likewise. Copy the page to the page that is not
12064 shown and switch between both pages.
12065 (grub_vga_putchar): Fix off by one error.
12066 (grub_vga_cls): Wait for the vertical retrace. Take the page into
12069 2004-11-01 Marco Gerards <metgerards@student.han.nl>
12071 Add support for iso9660 (including rockridge).
12073 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
12074 (iso9660_mod_SOURCES): New variable.
12075 (iso9660_mod_CFLAGS): Likewise.
12076 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
12077 * include/grub/fs.h (grub_iso9660_init): New prototype.
12078 * util/grub-emu.c (main): Call `grub_iso9660_init'.
12079 * fs/iso9660.c: New file.
12081 * include/grub/misc.h (grub_strncat): New prototype.
12082 * kern/misc.c (grub_strncat): New function.
12084 * fs/hfs.c (grub_hfs_mount): Translate the error
12085 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
12086 * fs/jfs.c (grub_jfs_mount): Likewise.
12087 * fs/ufs.c (grub_ufs_mount): Likewise.
12089 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
12091 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
12092 which initialized BAT registers.
12093 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
12094 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
12096 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
12097 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
12099 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
12100 (grub_mapclaim): Likewise.
12101 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
12102 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
12105 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
12107 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
12108 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
12109 -ffreestanding and -msoft-float.
12111 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
12113 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
12114 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
12115 set in grub_ieee1275_flags.
12117 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
12119 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
12121 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
12122 grub_console_init first.
12123 Change the memory range used for grub_ieee1275_claim and
12124 grub_mm_init_region.
12125 Print an error message if the claim fails.
12126 Include <grub/misc.h>.
12128 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
12130 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
12131 Call grub_children_iterate for device nodes of type `scsi',
12133 (grub_ofdisk_open): Remove manual device alias resolution.
12134 Fix memory leak when device cannot be opened.
12135 * include/grub/powerpc/ieee1275/ieee1275.h
12136 (grub_children_iterate): New prototype.
12137 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
12139 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
12140 Return -1 if args.size was -1.
12142 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
12144 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
12145 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
12146 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
12147 Open Firmware's memory for it; claim memory from _start to _end.
12148 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
12149 (_end): New extern.
12150 (_start): Zero BSS from __bss_start to _end.
12151 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
12153 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
12155 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
12157 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
12158 -1 if args.base was -1.
12160 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
12162 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
12163 escape sequence instead of a literal ^L. Also call
12164 grub_ofconsole_gotoxy.
12166 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
12168 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
12169 void * arguments to grub_addr_t. All callers updated. Also make
12170 the `result' argument optional.
12171 (grub_ieee1275_release): change void * arguments to grub_addr_t.
12172 All callers updated.
12174 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
12176 * commands/ls.c (grub_ls_list_files): Use the string following the
12177 initial ')', if present, as the filesystem path.
12178 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
12180 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
12182 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
12184 Make the source code of the menu interface more readable.
12186 * normal/menu.c: Include grub/mm.h.
12187 (TERM_WIDTH): New macro.
12188 (TERM_HEIGHT): Likewise.
12189 (TERM_INFO_HEIGHT): Likewise.
12190 (TERM_MARGIN): Likewise.
12191 (TERM_SCROLL_WIDTH): Likewise.
12192 (TERM_TOP_BORDER_Y): Likewise.
12193 (TERM_LEFT_BORDER_X): Likewise.
12194 (TERM_BORDER_WIDTH): Likewise.
12195 (TERM_MESSAGE_HEIGHT): Likewise.
12196 (TERM_BORDER_HEIGHT): Likewise.
12197 (TERM_NUM_ENTRIES): Likewise.
12198 (TERM_FIRST_ENTRY_Y): Likewise.
12199 (TERM_ENTRY_WIDTH): Likewise.
12200 (TERM_CURSOR_X): Likewise.
12201 (draw_border): Use macros instead of magic numbers.
12202 (print_entry): Likewise.
12203 (print_entries): Likewise.
12204 (run_menu): Likewise. Also, handle the key 'e'.
12205 (run_menu_entry): Ignore empty command lines.
12206 (print_message): Added a new argument EDIT. If EDIT is true,
12207 print a different message.
12208 (init_page): Likewise.
12209 (edit_menu_entry): New function. Not implemented yet.
12211 2004-09-17 Marco Gerards <metgerards@student.han.nl>
12213 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
12214 can be loaded from normal mode.
12216 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
12218 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
12219 (multiboot_mod_CFLAGS): New variables.
12220 * loader/i386/pc/linux_normal.c: New file.
12221 * loader/i386/pc/multiboot_normal.c: Likewise.
12223 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
12224 attribute `unused'.
12226 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
12227 `fdiro' to read the mode information from instead of `diro'.
12229 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
12230 looking up a symlink.
12232 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
12234 * normal/command.c (grub_command_execute): Don't parse the
12235 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
12236 flags of the command.
12238 * normal/menu.c (grub_menu_run): Fix typo.
12240 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
12242 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
12244 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
12245 `y + 1' instead of `y - 1'.
12247 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
12249 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
12251 From Hollis Blanchard <hollis@penguinppc.org>:
12252 * kern/misc.c (memmove): New alias for grub_memmove.
12253 (memcmp): New alias for grub_memcmp.
12254 (memset): New alias for grub_memset.
12255 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
12256 Change "int handle" to "grub_ieee1275_phandle_t handle".
12257 * include/grub/powerpc/ieee1275/ieee1275.h
12258 (grub_ieee1275_get_property): Likewise.
12260 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
12262 Added normal mode command `chainloader' as module chain.mod, which
12263 depends on normal.mod and _chain.mod.
12265 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
12266 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
12267 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
12269 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
12270 but arguments parsing moved to ...
12271 (grub_chainloader_cmd): ... here. New function.
12272 * include/grub/i386/pc/chainloader.h: New file.
12273 * loader/i386/pc/chainloader_normal.c: Likewise.
12275 2004-09-11 Marco Gerards <metgerards@student.han.nl>
12277 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
12278 (grub_mkimage_LDFLAGS): Likewise.
12279 (grub_emu_SOURCES): Likewise.
12280 (kernel_img_HEADERS): Added fshelp.h.
12281 * fs/ext2.c: Include <grub/fshelp.h>.
12282 (FILETYPE_REG): New macro.
12283 (FILETYPE_INO_REG): Likewise.
12284 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
12286 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
12288 (grub_fshelp_node): New struct.
12289 (grub_ext2_data): Added member `diropen'. Changed member `inode'
12291 (grub_ext2_get_file_block): Removed function.
12292 (grub_ext2_read_block): New function.
12293 (grub_ext2_read_file): Replaced parameter `data' by `node'.
12294 This function was written.
12295 (grub_ext2_mount): Read the root inode. Create a diropen struct.
12296 (grub_ext2_find_file): Removed function.
12297 (grub_ext2_read_symlink): New function.
12298 (grub_ext2_iterate_dir): Likewise.
12299 (grub_ext2_open): Rewritten.
12300 (grub_ext2_dir): Rewritten.
12301 * include/grub/fshelp.h: New file.
12302 * fs/fshelp.c: Likewise.
12304 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
12306 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
12307 (print_message): Add a missing newline.
12308 (run_menu): Added timeout support.
12309 (run_menu_entry): New local function.
12310 (grub_menu_run): Added support for booting.
12312 * kern/loader.c (grub_loader_is_loaded): New function.
12314 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
12315 (grub_get_rtc): Exported.
12317 * include/grub/i386/pc/time.h: Include grub/symbol.h.
12318 (grub_get_rtc): Exported.
12320 * include/grub/normal.h (struct grub_command_list): Remove
12321 constant from the member `command'.
12323 * include/grub/loader.h (grub_loader_is_loaded): Declared.
12325 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
12327 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
12329 2004-08-28 Marco Gerards <metgerards@student.han.nl>
12331 Add support for the JFS filesystem.
12333 * fs/jfs.c: New file.
12334 * include/grub/fs.h (grub_jfs_init): New prototype.
12335 (grub_jfs_fini): New prototype.
12336 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
12337 (grub_emu_SOURCES): Likewise.
12338 (pkgdata_MODULES): Add jfs.mod.
12339 (jfs_mod_SOURCES): New variable.
12340 (jfs_mod_CFLAGS): Likewise.
12341 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
12342 (grubof_SOURCES): Likewise.
12343 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
12345 * fs/fat.c (grub_fat_find_dir): Convert the filename little
12346 endian to the host endian.
12347 (grub_fat_utf16_to_utf8): Move function from there...
12348 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
12349 the endianness of the source string anymore.
12350 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
12352 2004-08-24 Marco Gerards <metgerards@student.han.nl>
12354 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
12355 (grub_boot_fini) [GRUB_UTIL]: Likewise.
12356 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
12357 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
12359 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
12360 (grub_hfs_iterate_dir): Make the function static. Add prototypes
12361 for `node_found' and `it_dir'.
12362 (grub_hfs_dir): Add prototype for `dir_hook'.
12364 * fs/minix.c (grub_minix_get_file_block): Add prototype for
12365 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
12366 and `indir32' to silence a gcc warning.
12368 * include/grub/fs.h (grub_hfs_init): New prototype.
12369 (grub_hfs_fini): Likewise.
12372 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
12374 Each disk device has its own id now. This is useful to make use
12375 of multiple disk devices.
12377 * include/grub/disk.h (grub_disk_dev_id): New enum.
12378 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
12379 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
12381 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
12382 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
12384 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
12385 GRUB_DISK_DEVICE_OFDISK_ID as an id.
12387 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
12388 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
12390 * include/grub/disk.h (struct grub_disk_dev): Added a new member
12391 "id" which is used by the cache manager.
12393 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
12396 2004-08-18 Marco Gerards <metgerards@student.han.nl>
12398 * fs/hfs.c: New file.
12399 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
12400 (grub_emu_SOURCES): Likewise.
12401 (pkgdata_MODULES): Add hfs.mod.
12402 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
12403 (grubof_SOURCES): Likewise.
12404 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
12406 * include/grub/misc.h (grub_strncasecmp): Add prototype.
12407 * kern/misc.c (grub_strncasecmp): Add function.
12409 2004-08-14 Marco Gerards <metgerards@student.han.nl>
12411 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
12414 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
12415 (grub_ext2_dir): In case the directory entry type is unknown, read
12418 2004-08-02 Peter Bruin <pjbruin@dds.nl>
12420 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
12421 grub_load_linux instead of grub_rescue_cmd_linux as second
12422 argument of grub_rescue_register_command.
12424 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
12426 2004-07-27 Marco Gerards <metgerards@student.han.nl>
12428 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
12430 * commands/boot.c: Remove the check for `GRUB_UTIL'.
12431 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
12432 `loader/powerpc/ieee1275/linux.c',
12433 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
12434 * include/grub/powerpc/ieee1275/ieee1275.h
12435 (grub_ieee1275_release): New prototype.
12436 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
12437 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
12438 normal, boot, linux and linux_normal.
12439 * loader/powerpc/ieee1275/linux.c: New file.
12440 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
12442 2004-07-12 Marco Gerards <metgerards@student.han.nl>
12444 * normal/arg.c (grub_arg_parse): Correct error handling after
12445 reallocating the argumentlist (check if `argl' is not null instead
12446 of checking if `args' is not null).
12447 * kern/mm.c (grub_realloc): Return the same pointer when using the
12448 same region, instead of returning the header address.
12450 2004-07-11 Marco Gerards <metgerards@student.han.nl>
12452 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
12453 one block instead of two when looking for the initial partition.
12454 (grub_partition_probe): Initialize the local variable `p' with 0.
12455 Use base 10 for the grub_strtoul call.
12456 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
12457 need for one local variable.
12458 (grub_strtoul): Don't add the new value to `num', instead of that
12461 2004-07-11 Marco Gerards <metgerards@student.han.nl>
12463 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
12464 (pxeboot_img_SOURCES): New variable.
12465 (pxeboot_img_ASFLAGS): Likewise.
12466 (pxeboot_img_LDFLAGS): Likewise.
12467 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
12468 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
12469 <lode_leroy@hotmail.com>.
12471 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
12473 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
12474 there was no input.
12476 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
12478 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
12479 the history buffer logic.
12481 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
12483 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
12484 (FILETYPE_INO_SYMLINK): New macros.
12485 (grub_ext2_find_file): Check if the node is a directory using the
12486 inode stat information instead of using the filetype in the
12487 dirent. Exclude the first character of an absolute symlink.
12488 (grub_ext2_dir): Mask out the filetype part of the mode member of
12491 2004-05-24 Marco Gerards <metgerards@student.han.nl>
12493 Add support for UFS version 1 and 2. Add support for the minix
12494 filesystem version 1 and 2, both the variants with 14 and 30 long
12497 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
12499 (grub_emu_SOURCES): Likewise.
12500 (pkgdata_MODULES): Add ufs.mod and minix.mod.
12501 (ufs_mod_SOURCES): New variable.
12502 (ufs_mod_CFLAGS): Likewise.
12503 (minix_mod_SOURCES): Likewise.
12504 (minix_mod_CFLAGS): Likewise.
12505 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
12507 (grubof_SOURCES): Likewise.
12508 * fs/ufs.c: New file.
12509 * fs/minix.c: New file.
12510 * include/grub/fs.h (grub_ufs_init): New prototype.
12511 (grub_ufs_fini): Likewise.
12512 (grub_minix_init): Likewise.
12513 (grub_minix_fini): Likewise.
12514 * util/grub-emu.c (main): Initialize and deinitialize UFS and
12517 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
12519 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
12520 commands/ls.c, commands/terminal.c, commands/boot.c,
12521 commands/cmp.c and commands/cat.c.
12522 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
12524 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
12527 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
12529 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
12530 and grub_, respectively. Because the conversion is trivial and
12531 mechanical, I omit the details here. Please refer to the CVS
12532 if you need more information.
12534 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
12536 * include/pupa: Renamed to ...
12537 * include/grub: ... this.
12538 * util/i386/pc/pupa-mkimage.c: Renamed to ...
12539 * util/i386/pc/grub-mkimage.c: ... this.
12540 * util/i386/pc/pupa-setup.c: Renamed to ...
12541 * util/i386/pc/grub-setup.c: ... this.
12542 * util/pupa-emu.c: Renamed to ...
12543 * util/grub-emu.c: ... this.
12545 2004-03-29 Marco Gerards <metgerards@student.han.nl>
12547 Add support for the newworld apple macintosh (PPC). This has been
12548 tested on the powerbook 2000 only. It only adds support for
12549 generic ieee1275 functions, console and disk support. This should
12550 be easy to port to other architectures with support for Open
12553 * configure.ac: Accept the powerpc as host_cpu. In the case of
12554 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
12555 specific tests are only executed while building for the i386.
12556 Inverse test for crosscompile.
12557 * genmk.rb (Utility): Allow assembler files.
12558 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
12559 * conf/powerpc-ieee1275.rmk: New file.
12560 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
12561 * disk/powerpc/ieee1275/partition.c: Likewise.
12562 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
12563 * include/pupa/powerpc/ieee1275/console.h: Likewise.
12564 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
12565 * include/pupa/powerpc/ieee1275/time.h: Likewise.
12566 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
12567 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
12568 * include/pupa/powerpc/ieee1275/loader.h
12569 * include/pupa/powerpc/setjmp.h: Likewise.
12570 * include/pupa/powerpc/types.h: Likewise.
12571 * kern/powerpc/ieee1275/init.c: Likewise.
12572 * kern/powerpc/ieee1275/openfw.c: Likewise.
12573 * term/powerpc/ieee1275/ofconsole.c: Likewise.
12575 These files were written by Johan Rydberg
12576 (jrydberg@night.trouble.net) and I only modified them slightly.
12578 * boot/powerpc/ieee1275/cmain.c: New file.
12579 * boot/powerpc/ieee1275/crt0.S: Likewise.
12580 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
12581 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
12583 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
12585 * Makefile.in: Update copyright.
12586 * genmodsrc.sh: Likewise.
12587 * gensymlist.sh: Likewise.
12588 * term/i386/pc/vga.c: Indent correctly.
12590 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
12591 bugreporting address.
12592 * util/i386/pc/pupa-setup.c (usage): Likewise,
12593 (main): Call pupa_ext2_init and pupa_ext2_fini.
12595 * fs/fat.c (log2): Renamed to ...
12596 (fat_log2): ... this.
12597 All callers changed.
12598 * kern/misc.c (memcpy): Alias to pupa_memmove.
12599 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
12601 * util/console.c (pupa_ncurses_fini): Return 0.
12603 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
12604 Move fail label here.
12605 [__GNU__]: Don't warn when using stat.
12606 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
12607 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
12608 long int. Use strtol instead of strtoul.
12610 2004-03-14 Marco Gerards <metgerards@student.han.nl>
12612 * commands/boot.c: New file.
12613 * commands/cat.c: Likewise.
12614 * commands/cmp.c: Likewise.
12615 * commands/ls.c: Likewise.
12616 * commands/terminal.c: Likewise.
12617 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
12618 (pupa_register_command): Changed interface to match the new
12620 (pupa_command_execute): Changed (almost rewritten) so it uses
12621 pupa_split_command. Added support for setting variables using the
12623 (rescue_command): Changed to work with the new argument parser.
12624 (terminal_command): Moved from here to commands/terminal.c.
12625 (set_command): New function.
12626 (unset_command): New function.
12627 (insmod_command): New function.
12628 (rmmod_command): New function.
12629 (lsmod_command): New function.
12630 (pupa_command_init): Don't initialize the command terminal
12631 anymore. Initialize the commands set, unset, insmod, rmmod and
12633 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
12634 (kernel_img_HEADERS): Add arg.h and env.h.
12635 (pupa_mkimage_LDFLAGS): Add kern/env.c.
12636 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
12637 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
12639 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
12641 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
12642 (boot_mod_SOURCES): New variable.
12643 (terminal_mod_SOURCES): Likewise.
12644 (ls_mod_SOURCES): Likewise.
12645 (cmp_mod_SOURCES): Likewise.
12646 (cat_mod_SOURCES): Likewise.
12648 * normal/arg.c: New file.
12649 * kern/env.c: Likewise.
12650 * include/pupa/arg.h: Likewise.
12651 * include/pupa/env.h: Likewise.
12652 * font/manager.c (font_command): Changed to match argument parsing
12654 (PUPA_MOD_INIT): Likewise.
12655 * hello/hello.c (pupa_cmd_hello): Likewise.
12656 (PUPA_MOD_INIT): Likewise.
12657 * include/pupa/disk.h: Include <pupa/device.h>.
12658 (pupa_print_partinfo): New prototype.
12659 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
12660 (pupa_dl_get_prefix): Likewise.
12661 * include/pupa/misc.h: Include <pupa/err.h>.
12662 (pupa_isgraph): New prototype.
12663 (pupa_isdigit): Likewise.
12664 (pupa_split_cmdline): Likewise.
12665 * include/pupa/normal.h: Include <pupa/arg.h>.
12666 (pupa_command): Changed the prototype of the member `func' to
12667 match the argument parsing interface. Added member `options'.
12668 (pupa_register_command): Updated to match function.
12669 (pupa_arg_parse): New prototype.
12670 (pupa_hello_init) [PUPA_UTIL]: New prototype.
12671 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
12672 (pupa_ls_init) [PUPA_UTIL]: Likewise.
12673 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
12674 (pupa_cat_init) [PUPA_UTIL]: Likewise.
12675 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
12676 (pupa_boot_init) [PUPA_UTIL]: Likewise.
12677 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
12678 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
12679 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
12680 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
12681 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
12682 * kern/disk.c: Include <pupa/file.h>.
12683 (pupa_print_partinfo): New function.
12684 * kern/dl.c: Include <pupa/env.h>.
12685 (pupa_dl_dir): Variable removed.
12686 (pupa_dl_load): Use the environment variable `prefix' instead of
12687 the variable pupa_dl_dir.
12688 (pupa_dl_set_prefix): Function removed.
12689 (pupa_dl_get_prefix): Likewise.
12690 * kern/i386/pc/init.c: Include <pupa/env.h>.
12691 (pupa_machine_init): Use the environment variable `prefix' instead of
12692 using pupa_dl_set_prefix to set the prefix.
12693 * kern/main.c: Include <pupa/env.h>.
12694 (pupa_set_root_dev): Use the environment variable `prefix' instead of
12695 using pupa_dl_get_prefix to get the prefix.
12696 * kern/misc.c: Include <pupa/env.h>.
12697 (pupa_isdigit): New function.
12698 (pupa_isgraph): Likewise.
12699 (pupa_ftoa): Likewise.
12700 (pupa_vsprintf): Added support for printing values of the type
12701 `double'. Make it possible to format variable output when using
12702 formatting like `%1.2%f'.
12703 (pupa_split_cmdline): New function.
12704 * kern/rescue.c: Include <pupa/env.h>.
12705 (next_word): Removed function.
12706 (pupa_rescue_cmd_prefix): Likewise.
12707 (pupa_rescue_cmd_set): New function.
12708 (pupa_rescue_cmd_unset): New function.
12709 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
12710 split the command line instead of splitting it here. Added
12711 support for setting variables using the syntax `foo=bar'. Don't
12712 initialize the prefix command anymore. Initialized the set and
12714 * normal/cmdline.c: Include <pupa/env.h>.
12715 (pupa_tab_complete): Added prototypes for print_simple_completion,
12716 print_partition_completion, add_completion, iterate_commands,
12717 iterate_dev, iterate_part and iterate_dir. Moved code to print
12718 partition information from here to kern/disk.c.
12719 (pupa_cmdline_run): Don't check if the function exists anymore.
12720 * normal/main.c: Include <pupa/env.h>.
12721 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
12722 instead of using pupa_dl_get_prefix to get the prefix.
12723 * term/i386/pc/vga.c: Include <pupa/arg.h>.
12724 (check_vga_mem): Cast pointers to `void *' to silence a gcc
12726 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
12727 (pupa_vga_setcolor): Declare unused variables with `__attribute__
12728 ((unused))' to silence a gcc warning.
12729 (pupa_vga_setcolor): Likewise.
12730 (debug_command): Changed to match argument parsing
12732 * util/pupa-emu.c: Include <pupa/env.h>.
12733 (options): Added 0's for unused fields to silence a gcc warning.
12735 (main): Use the environment variable `prefix' instead of using
12736 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
12737 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
12740 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
12741 * util/misc.c: Include <malloc.h>.
12742 (pupa_malloc): Rewritten so errors are correctly reported.
12743 (pupa_realloc): Likewise.
12744 (pupa_memalign): Likewise.
12745 (pupa_mm_init_region): Declare unused variables with
12746 `__attribute__ ((unused))' to silence a gcc warning.
12747 * normal/i386/setjmp.S: Remove tab at the end of the file to
12748 silence a gcc warning.
12749 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
12750 variables with `__attribute__ ((unused))' to silence a gcc
12752 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
12753 local variable i unsigned to silence a gcc warning.
12755 * kern/term.c: Include <pupa/misc.h>.
12756 (pupa_more_lines): New variable.
12757 (pupa_more): Likewise.
12758 (pupa_putcode): When the pager is active pause at the end of every
12760 (pupa_set_more): New function.
12761 * include/pupa/term.h (pupa_set_more): New prototype.
12764 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
12766 Now this project is GRUB 2 rather than PUPA. The location of
12767 the CVS repository was moved to GRUB's.
12769 * configure.ac: Use bug-grub as the reporting address.
12770 Use GRUB instead of PUPA.
12771 Change the version number to 1.90.
12773 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
12775 * genkernsyms.sh: Updated copyright information.
12776 * genmk.rb: Likewise.
12777 * genmodsrc.sh: Likewise.
12778 * gensymlist.sh: Likewise.
12779 * boot/i386/pc/boot.S: Likewise.
12780 * boot/i386/pc/diskboot.S: Likewise.
12781 * disk/i386/pc/biosdisk.c: Likewise.
12782 * disk/i386/pc/partition.c: Likewise.
12783 * font/manager.c: Likewise.
12784 * fs/ext2.c: Likewise.
12785 * fs/fat.c: Likewise.
12786 * include/pupa/boot.h: Likewise.
12787 * include/pupa/device.h: Likewise.
12788 * include/pupa/disk.h: Likewise.
12789 * include/pupa/dl.h: Likewise.
12790 * include/pupa/elf.h: Likewise.
12791 * include/pupa/err.h: Likewise.
12792 * include/pupa/file.h: Likewise.
12793 * include/pupa/font.h: Likewise.
12794 * include/pupa/fs.h: Likewise.
12795 * include/pupa/kernel.h: Likewise.
12796 * include/pupa/loader.h: Likewise.
12797 * include/pupa/misc.h: Likewise.
12798 * include/pupa/mm.h: Likewise.
12799 * include/pupa/net.h: Likewise.
12800 * include/pupa/normal.h: Likewise.
12801 * include/pupa/rescue.h: Likewise.
12802 * include/pupa/setjmp.h: Likewise.
12803 * include/pupa/symbol.h: Likewise.
12804 * include/pupa/term.h: Likewise.
12805 * include/pupa/types.h: Likewise.
12806 * include/pupa/i386/setjmp.h: Likewise.
12807 * include/pupa/i386/types.h: Likewise.
12808 * include/pupa/i386/pc/biosdisk.h: Likewise.
12809 * include/pupa/i386/pc/boot.h: Likewise.
12810 * include/pupa/i386/pc/console.h: Likewise.
12811 * include/pupa/i386/pc/init.h: Likewise.
12812 * include/pupa/i386/pc/kernel.h: Likewise.
12813 * include/pupa/i386/pc/linux.h: Likewise.
12814 * include/pupa/i386/pc/loader.h: Likewise.
12815 * include/pupa/i386/pc/memory.h: Likewise.
12816 * include/pupa/i386/pc/multiboot.h: Likewise.
12817 * include/pupa/i386/pc/partition.h: Likewise.
12818 * include/pupa/i386/pc/time.h: Likewise.
12819 * include/pupa/i386/pc/vga.h: Likewise.
12820 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
12821 * include/pupa/util/getroot.h: Likewise.
12822 * include/pupa/util/misc.h: Likewise.
12823 * include/pupa/util/resolve.h: Likewise.
12824 * kern/device.c: Likewise.
12825 * kern/disk.c: Likewise.
12826 * kern/dl.c: Likewise.
12827 * kern/err.c: Likewise.
12828 * kern/file.c: Likewise.
12829 * kern/fs.c: Likewise.
12830 * kern/loader.c: Likewise.
12831 * kern/main.c: Likewise.
12832 * kern/misc.c: Likewise.
12833 * kern/mm.c: Likewise.
12834 * kern/rescue.c: Likewise.
12835 * kern/term.c: Likewise.
12836 * kern/i386/dl.c: Likewise.
12837 * kern/i386/pc/init.c: Likewise.
12838 * kern/i386/pc/lzo1x.S: Likewise.
12839 * kern/i386/pc/startup.S: Likewise.
12840 * loader/i386/pc/chainloader.c: Likewise.
12841 * loader/i386/pc/linux.c: Likewise.
12842 * loader/i386/pc/multiboot.c: Likewise.
12843 * normal/cmdline.c: Likewise.
12844 * normal/command.c: Likewise.
12845 * normal/main.c: Likewise.
12846 * normal/menu.c: Likewise.
12847 * normal/i386/setjmp.S: Likewise.
12848 * term/i386/pc/console.c: Likewise.
12849 * term/i386/pc/vga.c: Likewise.
12850 * util/console.c: Likewise.
12851 * util/genmoddep.c: Likewise.
12852 * util/misc.c: Likewise.
12853 * util/pupa-emu.c: Likewise.
12854 * util/resolve.c: Likewise.
12855 * util/unifont2pff.rb: Likewise.
12856 * util/i386/pc/biosdisk.c: Likewise.
12857 * util/i386/pc/getroot.c: Likewise.
12858 * util/i386/pc/pupa-mkimage.c: Likewise.
12859 * util/i386/pc/pupa-setup.c: Likewise.
12861 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
12863 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
12864 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
12865 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
12866 reading and reset it after reading.
12867 (pupa_ext2_close): Return PUPA_ERR_NONE.
12869 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
12871 (struct linux_kernel_header): Add kernel_version and
12873 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
12874 pupa_file_read succeeds.
12875 (pupa_rescue_cmd_initrd): Implement.
12877 2003-12-03 Marco Gerards <metgerards@student.han.nl>
12879 * fs/ext2.c (pupa_ext2_label): New function.
12880 (pupa_ext2_fs): Added label.
12881 * fs/fat.c (pupa_fat_label): New function.
12882 (pupa_fat_fs): Added label.
12883 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
12885 * kern/misc.c (pupa_strndup): New function.
12886 * include/pupa/misc.h (pupa_strndup): New prototype.
12888 * include/pupa/normal.h: Include <pupa/err.h>.
12889 (pupa_set_history): New prototype.
12890 (pupa_iterate_commands): New prototype.
12891 * normal/cmdline.c: Include <pupa/machine/partition.h>,
12892 <pupa/disk.h>, <pupa/file.h>.
12893 (hist_size): New variable.
12894 (hist_lines): Likewise.
12895 (hist_end): Likewise.
12896 (hist_used): Likewise.
12897 (pupa_set_history): New function.
12898 (pupa_history_get): Likewise.
12899 (pupa_history_add): Likewise.
12900 (pupa_history_replace): Likewise.
12901 (pupa_tab_complete): Likewise.
12902 (pupa_cmdline_run): Added tab completion and history buffer. Tab
12903 completion shows partitionnames while completing partitions, this
12904 feature was suggested by Jeff Bailey.
12905 * normal/command.c (pupa_iterate_commands): New function.
12906 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
12907 (pupa_normal_init): Initialize history buffer.
12908 (PUPA_MOD_INIT): Likewise.
12909 (pupa_normal_fini): Free the history buffer.
12910 (PUPA_MOD_FINI): Likewise.
12912 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
12915 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
12916 * configure.ac [i386]: Check for regparam bug.
12917 (NESTED_FUNC_ATTR) [! i386]: Defined.
12919 2003-11-17 Marco Gerards <metgerards@student.han.nl>
12921 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
12922 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
12923 (pupa_emu_SOURCES): New variable.
12924 (pupa_emu_LDFLAGS): Likewise.
12925 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
12926 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
12927 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
12928 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
12929 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
12930 (pupa_jmp_buf): New typedef.
12931 (pupa_setjmp) [PUPA_UTIL]: New macro.
12932 (pupa_longjmp) [PUPA_UTIL]: Likewise.
12933 * include/pupa/term.h (struct pupa_term): New member `refresh'.
12934 (pupa_refresh): New prototype.
12935 * include/pupa/util/getroot.h: New file.
12936 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
12938 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
12939 (pupa_rescue_cmd_cat): Likewise.
12940 (pupa_rescue_cmd_ls): Likewise.
12941 (pupa_rescue_cmd_testload): Likewise.
12942 (pupa_rescue_cmd_lsmod): Likewise.
12943 * normal/cmdline.c (pupa_cmdline_get): Likewise.
12944 * normal/menu.c (run_menu): Likewise.
12945 * kern/term.c (pupa_cls): Likewise.
12946 (pupa_refresh): New function.
12947 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
12948 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
12949 * util/console.c: New file.
12951 * util/i386/pc/getroot.c: New file.
12952 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
12953 (pupa_putchar): New function.
12954 (pupa_refresh): Likewise.
12955 (xgetcwd): Function moved to ...
12956 (strip_extra_slashes): Likewise.
12957 (get_prefix): Likewise.
12958 * util/i386/pc/getroot.c: ... here.
12959 (find_root_device): Function moved and renamed to...
12960 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
12961 Changed all callers.
12962 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
12964 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
12965 Changed all callers.
12966 * util/misc.c (pupa_memalign): New function.
12967 (pupa_mm_init_region): Likewise.
12968 (pupa_register_exported_symbols): Likewise.
12969 (pupa_putchar): Function removed.
12970 * util/pupa-emu.c: New file.
12972 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
12974 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
12975 (_multiboot_mod_SOURCES): New variable.
12976 (_multiboot_mod_CFLAGS): Likewise.
12977 * loader/i386/pc/multiboot.c: New file.
12978 * include/pupa/i386/pc/multiboot.h: Likewise.
12979 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
12980 (pupa_multiboot_real_boot): New function.
12981 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
12982 (pupa_multiboot_real_boot): New prototype.
12983 (pupa_rescue_cmd_multiboot): Likewise
12984 (pupa_rescue_cmd_module): Likewise.
12986 * kern/loader.c (pupa_loader_set): Continue when
12987 pupa_loader_unload_func() fails.
12988 (pupa_loader_unset): New function.
12989 * include/pupa/loader.h (pupa_loader_unset): New prototype.
12991 * kern/misc.c (pupa_stpcpy): New function.
12992 * include/pupa/misc.h (pupa_stpcpy): New prototype.
12994 2003-11-12 Marco Gerards <metgerards@student.han.nl>
12996 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
12997 for available extensions.
12999 * include/pupa/i386/pc/time.h: New file.
13000 * kern/disk.c: Include <pupa/machine/time.h>.
13001 (PUPA_CACHE_TIMEOUT): New macro.
13002 (pupa_last_time): New variable.
13003 (pupa_disk_open): Flush the cache when there was a timeout.
13004 (pupa_disk_close): Reset the timer.
13005 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
13007 * util/misc.c: Include <sys/times.h>
13008 (pupa_get_rtc): New function.
13010 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
13012 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
13014 (pupa_ext2_get_file_block): Use blocks member.
13016 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
13017 first block. Return -1 instead of pupa_errno on error.
13019 2003-10-27 Marco Gerards <metgerards@student.han.nl>
13021 * README: In the pupa-mkimage example use _chain instead of chain
13022 and ext2 instead of fat.
13023 * TODO: Replace ext2fs with jfs as an example. Add an item for
13024 adding journal playback for ext2fs.
13025 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
13026 (pkgdata_MODULES): Added ext2.mod.
13027 (ext2_mod_SOURCES): New variable.
13028 (ext2_mod_CFLAGS): Likewise.
13029 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
13030 * include/pupa/misc.h (pupa_strncpy): New prototype.
13031 (pupa_strcat): Likewise.
13032 (pupa_strncmp): Likewise.
13033 * kern/misc.c (pupa_strcat): Enable function.
13034 (pupa_strncpy): New function.
13035 (pupa_strncmp): Likewise.
13036 * fs/ext2.c: New file.
13038 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
13039 when the read failed before retrying.
13040 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
13041 (_FILE_OFFSET_BITS): Likewise.
13042 * configure.ac: Added AC_SYS_LARGEFILE.
13044 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
13046 * genmk.rb (PModule#rule): Make sure to get only symbol names
13047 from the output of nm.
13048 Reported by Robert Millan <zeratul2@wanadoo.es>.
13050 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
13052 I forgot to check in these changes for a long time. This adds
13053 incomplete support for VGA console, and this is still very
13054 buggy. Also, a lot of consideration is required for I18N,
13055 UNICODE, and VGA font issues. Therefore, assume that this is
13056 such that "better than nothing".
13058 * font/manager.c: New file.
13059 * include/pupa/font.h: Likewise.
13060 * include/pupa/i386/pc/vga.h: Likewise.
13061 * term/i386/pc/vga.c: Likewise.
13062 * util/unifont2pff.rb: Likewise.
13064 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
13065 (pkgdata_MODULES): Added vga.mod and font.mod.
13066 (vga_mod_SOURCES): New variables.
13067 (vga_mod_CFLAGS): Likewise.
13068 (font_mod_SOURCES): Likewise.
13069 (font_mod_CFLAGS): Likewise.
13071 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
13073 * include/pupa/term.h: Include pupa/err.h.
13074 (struct pupa_term): Added init and fini.
13075 Changed the argument of putchar to pupa_uint32_t.
13077 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
13078 (pupa_console_real_putchar): New prototype.
13079 (pupa_console_putchar): Removed.
13080 (pupa_console_checkkey): Exported.
13081 (pupa_console_getkey): Likewise.
13083 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
13086 * kern/term.c (pupa_term_set_current): Rewritten.
13087 (pupa_putchar): Likewise.
13088 (pupa_putcode): New function.
13090 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
13091 (pupa_console_real_putchar): ... this.
13092 (pupa_vga_set_mode): New function.
13093 (pupa_vga_get_font): Likewise.
13095 * normal/command.c: Include pupa/term.h.
13096 (terminal_command): New function.
13097 (pupa_command_init): Register the command "terminal".
13099 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
13100 (DISP_UP): Likewise.
13101 (DISP_RIGHT): Likewise.
13102 (DISP_DOWN): Likewise.
13103 (DISP_HLINE): Likewise.
13104 (DISP_VLINE): Likewise.
13105 (DISP_UL): Likewise.
13106 (DISP_UR): Likewise.
13107 (DISP_LL): Likewise.
13108 (DISP_LR): Likewise.
13110 * term/i386/pc/console.c (pupa_console_putchar): New function.
13112 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
13114 * util/resolve.c (pupa_util_resolve_dependencies): BUG
13115 FIX. Reverse the path_list.
13117 * include/pupa/normal.h: Export pupa_register_command and
13118 pupa_unregister_command.
13120 * hello/hello.c (pupa_cmd_hello): New module.
13121 * conf/i386-pc.rmk: Added hello.mod.
13123 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
13125 * kern/i386/pc/lzo1x.S: New file.
13127 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
13128 (compress_kernel): New variable.
13129 (generate_image): Heavily modified to support compressing a
13130 large part of the core image.
13132 * util/misc.c (pupa_util_read_image): Fix a file descriptor
13134 (pupa_util_load_image): New function.
13136 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
13137 (pupa_compressed_size): New variable.
13138 (codestart): Enable Gate A20 here.
13139 Decompress the compressed part of the core image.
13140 Rearrange the code to put functions and variables which are
13141 required for initialization in the non-compressed part.
13144 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
13147 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
13149 * include/pupa/i386/pc/kernel.h
13150 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
13151 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
13152 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
13153 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
13154 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
13156 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
13158 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
13159 (Utility#rule): Likewise.
13161 * configure.ac: Check if LZO is available.
13163 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
13165 * include/pupa/normal.h: New file.
13166 * include/pupa/setjmp.h: Likewise.
13167 * include/pupa/i386/setjmp.h: Likewise.
13168 * normal/cmdline.c: Likewise.
13169 * normal/command.c: Likewise.
13170 * normal/main.c: Likewise.
13171 * normal/menu.c: Likewise.
13172 * normal/i386/setjmp.S: Likewise.
13174 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
13175 (pupa_rescue_cmd_initrd): Likewise.
13177 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
13180 * kern/i386/pc/startup.S (translation_table): New variable.
13181 (translate_keycode): New function.
13182 (pupa_console_getkey): Call translate_keycode.
13184 * kern/rescue.c (attempt_normal_mode): New function.
13185 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
13186 it failed, print a message.
13188 * kern/mm.c (pupa_real_malloc): Print more information when a
13189 free magic is broken.
13190 (pupa_free): If the first free header is not free actually, set
13193 * kern/main.c (pupa_load_normal_mode): Just load the module
13195 (pupa_main): Don't print the message
13196 "Entering into rescue mode..." here.
13198 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
13200 (pupa_rescue_cmd_initrd): Likewise.
13201 (pupa_rescue_cmd_initrd): Likewise.
13203 * include/pupa/symbol.h (FUNCTION): Specify the type.
13204 (VARIABLE): Likewise.
13206 * include/pupa/err.h (pupa_err_t): Added
13207 PUPA_ERR_UNKNOWN_COMMAND.
13209 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
13210 (pupa_dl_get_prefix): Likewise.
13212 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
13213 Added _chain.mod and _linux.mod instead of chain.mod and
13215 (chain_mod_SOURCES): Renamed to ...
13216 (_chain_mod_SOURCES): ... this.
13217 (chain_mod_CFLAGS): Renamed to ...
13218 (_chain_mod_CFLAGS): ... this.
13219 (linux_mod_SOURCES): Renamed to ...
13220 (_linux_mod_SOURCES): ... this.
13221 (linux_mod_CFLAGS): Renamed to ...
13222 (_linux_mod_CFLAGS): ... this.
13223 (normal_mod_SOURCES): New variable.
13224 (normal_mod_CFLAGS): Likewise.
13225 (normal_mod_ASFLAGS): Likewise.
13227 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
13229 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
13232 * kern/dl.c (pupa_dl_ref): Refer depending modules
13234 (pupa_dl_unref): Unrefer depending modules recursively.
13235 Don't call pupa_dl_unload implicitly, because PUPA can crash if
13236 a module is unloaded before one depending on that module is
13238 (pupa_dl_unload): Unload depending modules explicitly,
13241 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
13243 * include/pupa/i386/pc/linux.h: New file.
13244 * loader/i386/pc/linux.c: Likewise.
13246 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
13248 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
13249 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
13250 of PUPA_CHAINLOADER_BOOT_SECTOR.
13252 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
13253 (pupa_linux_prot_size): New variable.
13254 (pupa_linux_tmp_addr): Likewise.
13255 (pupa_linux_real_addr): Likewise.
13256 (pupa_linux_boot_zimage): New function.
13257 (pupa_linux_boot_bzimage): Likewise.
13259 * kern/i386/pc/init.c (struct mem_region): New structure.
13260 (MAX_REGIONS): New macro.
13261 (mem_regions): New variable.
13262 (num_regions): Likewise.
13263 (pupa_os_area_addr): Likewise.
13264 (pupa_os_area_size): Likewise.
13265 (pupa_lower_mem): Likewise.
13266 (pupa_upper_mem): Likewise.
13267 (add_mem_region): New function.
13268 (compact_mem_regions): Likewise.
13269 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
13270 the size of the conventional memory and that of so-called upper
13271 memory (before the first memory hole).
13272 Instead of adding each found region to free memory, use
13273 add_mem_region and add them after removing overlaps.
13274 Also, add only 1/4 of the upper memory to free memory. The rest
13275 is used for loading OS images. Maybe this is ad hoc, but this
13276 makes it much easier to relocate OS images when booting.
13278 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
13279 (pupa_enter_rescue_mode): Don't register initrd and module.
13281 * kern/mm.c: Include pupa/dl.h.
13283 * kern/main.c: Include pupa/file.h and pupa/device.h.
13285 * kern/loader.c (pupa_loader_load_module_func): Removed.
13286 (pupa_loader_load_module): Likewise.
13288 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
13291 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
13292 (pupa_linux_tmp_addr): Likewise.
13293 (pupa_linux_real_addr): Likewise.
13294 (pupa_linux_boot_zimage): Likewise.
13295 (pupa_linux_boot_bzimage): Likewise.
13297 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
13298 (pupa_upper_mem): Likewise.
13299 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
13300 module is too dangerous.
13302 * include/pupa/loader.h (pupa_os_area_addr): Declared.
13303 (pupa_os_area_size): Likewise.
13304 (pupa_loader_set): Remove the first argument. Loader doesn't
13305 manage modules or initrd any longer.
13306 (pupa_loader_load_module): Removed.
13308 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
13309 (linux_mod_SOURCES): New variable.
13310 (linux_mod_CFLAGS): Likewise.
13312 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
13314 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
13315 the length of a blocklist correctly.
13317 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
13318 Use ioctl only if the OS file is a block device.
13319 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
13320 not very useful for normal files.
13322 * kern/main.c (pupa_set_root_dev): New function.
13323 (pupa_load_normal_mode): Likewise.
13324 (pupa_main): Call those above.
13326 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
13329 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
13331 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
13333 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
13334 (setup): Configure the installed partition information and the
13337 * loader/i386/pc/chainloader.c (my_mod): New variable.
13338 (pupa_chainloader_unload): New function.
13339 (pupa_rescue_cmd_chainloader): Refer itself.
13340 (PUPA_MOD_INIT): Save its own module in MY_MOD.
13342 * kern/i386/pc/startup.S (install_partition): Removed.
13343 (version_string): Likewise.
13344 (config_file): Likewise.
13345 (pupa_install_dos_part): New variable.
13346 (pupa_install_bsd_part): Likewise.
13347 (pupa_prefix): Likewise.
13348 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
13350 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
13352 (make_install_device): New function.
13353 (pupa_machine_init): Set the dl prefix.
13355 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
13356 (buf): Renamed to ...
13357 (linebuf): ... this.
13358 (pupa_rescue_cmd_prefix): New function.
13359 (pupa_rescue_cmd_insmod): Likewise.
13360 (pupa_rescue_cmd_rmmod): Likewise.
13361 (pupa_rescue_cmd_lsmod): Likewise.
13362 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
13365 * kern/mm.c (pupa_memalign): If failed even after invalidating
13366 disk caches, unload unneeded modules and retry.
13368 * kern/misc.c (pupa_memmove): New function.
13369 (pupa_memcpy): Removed.
13370 (pupa_strcpy): New function.
13371 (pupa_itoa): Made static.
13373 * kern/dl.c (pupa_dl_iterate): New function.
13374 (pupa_dl_ref): Likewise.
13375 (pupa_dl_unref): Likewise.
13376 (pupa_dl_unload): Return if succeeded or not.
13377 (pupa_dl_unload_unneeded): New function.
13378 (pupa_dl_unload_all): Likewise.
13379 (pupa_dl_init): Renamed to ...
13380 (pupa_dl_set_prefix): ... this.
13381 (pupa_dl_get_prefix): New function.
13383 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
13384 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
13385 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
13386 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
13387 (pupa_install_dos_part): Declared.
13388 (pupa_install_bsd_part): Likewise.
13389 (pupa_prefix): Likewise.
13390 (pupa_boot_drive): Likewise.
13392 * include/pupa/types.h: Fix a typo.
13394 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
13396 (pupa_memmove): Declared.
13397 (pupa_strcpy): Likewise.
13399 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
13400 pupa_mod_init takes one argument, its own module.
13401 (pupa_dl_unload_unneeded): Declared.
13402 (pupa_dl_unload_all): Likewise.
13403 (pupa_dl_ref): Likewise.
13404 (pupa_dl_unref): Likewise.
13405 (pupa_dl_iterate): Likewise.
13406 (pupa_dl_init): Renamed to ...
13407 (pupa_dl_set_prefix): ... this.
13408 (pupa_dl_get_prefix): Declared.
13410 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
13411 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
13413 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
13414 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
13416 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
13417 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
13419 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
13421 * util/i386/pc/pupa-setup.c (setup): Define the internal
13422 function find_first_partition_start at the top level, because GCC
13423 3.0.x cannot compile internal functions in deeper scopes
13425 (find_root_device): Use lstat instead of stat.
13426 Don't follow symbolic links.
13427 Fix the path-constructing code.
13429 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
13430 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
13431 by a BLKGETSIZE ioctl first, because block devices don't fill
13432 the member st_mode of the structure stat on Linux.
13433 [__linux__] (linux_find_partition): Use a temporary buffer
13434 REAL_DEV for the working space. Copy it to DEV before returning.
13435 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
13436 buffer cache consistent.
13437 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
13438 strncmp. The previous value was merely wrong.
13439 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
13441 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
13442 FAT size is 12. The previous value was merely wrong.
13444 * kern/main.c (pupa_main): Don't split the starting message from
13447 * kern/term.c (pupa_putchar): Put CR after LF instead of before
13448 LF, because BIOS goes crazy about character attributes in this
13451 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
13453 * include/i386/pc/util/biosdisk.h: New file.
13454 * util/i386/pc/biosdisk.c: Likewise.
13455 * util/i386/pc/pupa-setup.c: Likewise.
13457 * Makefile.in (INCLUDE_DISTFILES): Added
13458 include/pupa/i386/pc/util/biosdisk.h.
13459 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
13460 directory util/i386/pc.
13461 (install-local): Added a rule for sbin_UTILITIES.
13462 (uninstall): Likewise.
13464 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
13466 * util/misc.c (xrealloc): New function.
13467 (pupa_malloc): Likewise.
13468 (pupa_free): Likewise.
13469 (pupa_realloc): Likewise.
13470 (pupa_stop): Likewise.
13471 (pupa_putchar): Likewise.
13473 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
13475 * include/pupa/util/misc.h (xrealloc): Declared.
13477 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
13479 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
13480 (PUPA_BOOT_MACHINE_BPB_END): ... this.
13482 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
13483 [PUPA_UTIL] (pupa_fat_fini): Likewise.
13485 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
13486 way should be implemented.
13487 [PUPA_UTIL] (pupa_fat_fini): Likewise.
13489 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
13490 the size of NAME for safety.
13491 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
13494 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
13495 (pupa_setup_SOURCES): Likewise.
13497 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
13499 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
13501 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
13502 bunch of pushl's from pusha, because this destroys the return
13505 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
13507 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
13508 This means that any missing prototypes could be fatal. Also, you
13509 must take care when writing assembly code. See the comments at
13510 the beginning of startup.S, for more details.
13512 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
13513 compilation mechanism.
13514 (pupa_chainloader_real_boot): Likewise.
13515 (pupa_biosdisk_rw_int13_extensions): Likewise.
13516 (pupa_biosdisk_rw_standard): Likewise.
13517 (pupa_biosdisk_check_int13_extensions): Likewise.
13518 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
13519 (pupa_biosdisk_get_diskinfo_standard): Likewise.
13520 (pupa_get_memsize): Likewise.
13521 (pupa_get_mmap_entry): Likewise.
13522 (pupa_console_putchar): Likewise.
13523 (pupa_console_setcursor): Likewise.
13524 (pupa_getrtsecs): Use pushl instead of push.
13526 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
13527 memory instead of the stack for a mmap entry, because some
13528 BIOSes may ignore the maximum size and overflow.
13530 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
13532 * genmk.rb (PModule#rule): Compile automatically generated
13533 sources with module-specific CFLAGS as well as other sources.
13535 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
13537 * configure.ac: Check ld.
13538 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
13539 respectively, before checking endianness and sizes.
13541 * Makefile.in (LD): New variable.
13543 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
13545 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
13547 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
13549 * Changelog: New file.